orchestore 0.1.1 → 0.1.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/README.md CHANGED
@@ -2,7 +2,11 @@
2
2
 
3
3
  ### 🚧 Coming Soon
4
4
 
5
- > OrcheStore is currently under active development and is not yet ready for production use.
5
+ OrcheStore is currently under active development and is not yet ready for production use.
6
+
7
+ > 📅 **Planned First Stable Release:** **2026-06-30**
8
+
9
+ > ⚠️ APIs, behavior, and internal implementation details may change without notice until the first stable release.
6
10
 
7
11
  ---
8
12
 
@@ -28,3 +32,27 @@ The goal is simple:
28
32
  - Preserve predictable state transitions
29
33
  - Maintain strong TypeScript inference
30
34
  - Scale naturally through composition
35
+
36
+ ---
37
+
38
+ ## Release Status
39
+
40
+ ### Pre-release Notice
41
+
42
+ OrcheStore is currently in a pre-release phase.
43
+
44
+ - Not recommended for production use
45
+ - APIs may change before the first stable release
46
+ - Internal architecture and runtime behavior are still evolving
47
+ - Documentation and feature coverage are actively being expanded
48
+
49
+ ### Roadmap
50
+
51
+ | Milestone | Status |
52
+ | -------------------- | -------------- |
53
+ | Core Architecture | 🚧 In Progress |
54
+ | Documentation | 🚧 In Progress |
55
+ | Public Preview | 🚧 Planned |
56
+ | First Stable Release | 📅 2026-06-30 |
57
+
58
+ Stay tuned for updates.
package/dist/index.cjs CHANGED
@@ -1,13 +1,30 @@
1
- "use strict";var E=Object.create;var a=Object.defineProperty;var I=Object.getOwnPropertyDescriptor;var K=Object.getOwnPropertyNames;var N=Object.getPrototypeOf,q=Object.prototype.hasOwnProperty;var F=(e,t)=>{for(var r in t)a(e,r,{get:t[r],enumerable:!0})},O=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of K(t))!q.call(e,o)&&o!==r&&a(e,o,{get:()=>t[o],enumerable:!(n=I(t,o))||n.enumerable});return e};var V=(e,t,r)=>(r=e!=null?E(N(e)):{},O(t||!e||!e.__esModule?a(r,"default",{value:e,enumerable:!0}):r,e)),_=e=>O(a({},"__esModule",{value:!0}),e);var Z={};F(Z,{StoreProvider:()=>m,createSlice:()=>f,createStore:()=>S,default:()=>Y,getGlobalUtils:()=>v,provideGlobalUtils:()=>P});module.exports=_(Z);var R=require("@reduxjs/toolkit");var U=require("@reduxjs/toolkit"),G=[];function C(e){return G.find(t=>t.slice===e)?.redux}function f(e){let t=e,r=(0,U.createSlice)({name:e.name,initialState:e.state,reducers:e.mutations});return G.push({slice:t,redux:r}),t}var g=typeof globalThis<"u"&&typeof globalThis.process<"u"&&globalThis.process?.env?.NODE_ENV!=="production",h=!1,D=globalThis.console?.log?.bind?.(globalThis.console)||globalThis.console?.log,J=globalThis.console?.warn?.bind?.(globalThis.console)||globalThis.console?.warn,W=globalThis.console?.error?.bind?.(globalThis.console)||globalThis.console?.error,X=globalThis.console?.clear?.bind?.(globalThis.console)||globalThis.console?.clear;globalThis.console?.clear&&(globalThis.console.clear=(...e)=>{h=!1,X?.(...e)});var $=`[OrcheStore] Development diagnostics are enabled.
2
- Warnings and errors from OrcheStore are not shown in production builds.
3
- Runtime exceptions that stop code execution may still occur.
1
+ "use strict";var te=Object.create;var O=Object.defineProperty;var re=Object.getOwnPropertyDescriptor;var oe=Object.getOwnPropertyNames;var ne=Object.getPrototypeOf,ie=Object.prototype.hasOwnProperty;var se=(t,e)=>{for(var r in e)O(t,r,{get:e[r],enumerable:!0})},z=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of oe(e))!ie.call(t,o)&&o!==r&&O(t,o,{get:()=>e[o],enumerable:!(n=re(e,o))||n.enumerable});return t};var ae=(t,e,r)=>(r=t!=null?te(ne(t)):{},z(e||!t||!t.__esModule?O(r,"default",{value:t,enumerable:!0}):r,t)),le=t=>z(O({},"__esModule",{value:!0}),t);var Re={};se(Re,{StoreProvider:()=>k,configureDiagnostics:()=>I,createSlice:()=>K,createStore:()=>L,default:()=>Oe,getGlobalUtils:()=>g,provideGlobalUtils:()=>U});module.exports=le(Re);var Q=require("@reduxjs/toolkit");var $=require("@reduxjs/toolkit"),B=require("react-redux");var C="all",P={diagnostics:!1,prerelease:!1},F=globalThis.console?.log?.bind?.(globalThis.console)||globalThis.console?.log,ce=globalThis.console?.warn?.bind?.(globalThis.console)||globalThis.console?.warn,de=globalThis.console?.error?.bind?.(globalThis.console)||globalThis.console?.error,ue=globalThis.console?.clear?.bind?.(globalThis.console)||globalThis.console?.clear;globalThis.console?.clear&&(globalThis.console.clear=(...t)=>{P.diagnostics=!1,ue?.(...t)});var fe=`[OrcheStore] \u{1F6A7} Pre-release Notice
2
+ Thank you for your interest in OrcheStore.
3
+ OrcheStore is currently under active development and is not yet ready for production use.
4
+ APIs, behavior, and internal implementation details may change without notice.
5
+ The first stable release is currently planned for 2026-06-30.
6
+ Stay tuned for updates!
7
+ `,pe=`[OrcheStore] Diagnostics are enabled.
8
+ OrcheStore may emit warnings and errors to help identify incorrect usage, invalid configurations, and potential runtime issues.
9
+ Runtime exceptions that stop code execution may still occur regardless of diagnostics settings.
4
10
  Please resolve all OrcheStore warnings and errors before deploying to production.
5
- `,y=()=>{h||(h=!0,D?.($))},i={log(...e){g&&(y(),D?.(...e))},warn(...e){g&&(y(),J?.(...e))},error(...e){g&&(y(),W?.(...e))}};var d=[];function A(e){return d.find(t=>t.store===e)?.redux}function S({slices:e}){if(d.length===1)return i.warn(`[OrcheStore] createStore(...) was called more than once.
11
+ Diagnostics can be configured with configureDiagnostics("off" | "errors" | "all").
12
+ `,i={inform(t){P[t]||(P[t]=!0,C==="all"&&F?.(t==="prerelease"?fe:pe))},log(...t){C==="all"&&(i.inform("diagnostics"),F?.(...t))},warn(...t){C==="all"&&(i.inform("diagnostics"),ce?.(...t))},error(...t){C!=="off"&&(i.inform("diagnostics"),de?.(...t))}};function I(t){C=t}var J=(...t)=>{let[e,r]=[t[2],t[3]],n=`${t[0]||"Received"}: `,o=t[1]!==!1?"(type: "+typeof e+")":"";if(!r?.(e))return e==null?[`${n}(type: ${e})`]:typeof e=="number"||typeof e=="bigint"||typeof e=="boolean"?[`${n}${o} ${e}`]:typeof e=="object"?[n,e]:e===""?[`${n}Empty String`]:[`${n}${o}`,e]},h=((t,e)=>J("Received",!0,t,e));h.prefixed=(t,e,r,n)=>J(t,e,r,n);var V={InvalidStore:t=>({StoreType:[`[OrcheStore::StoreProvider] Expected a store instance created with createStore(...).
13
+ `,...h(t)]})},R={GetMissingProp:t=>["[OrcheStore::global-utils] Attempted to access a global utility before it became available. Missing property",t,`
14
+ If this utility is optional, register it as undefined using provideGlobalUtils(...) to suppress future warnings.
15
+ `],DeleteProp:t=>["[OrcheStore::global-utils] Avoid deleting properties. Trying to delete property",t,`
16
+ Use provideGlobalUtils(...) to set them to undefined instead for type safety.
17
+ `],InvalidArgs:()=>`[OrcheStore::global-utils] Expected provideGlobalUtils(...) to receive a non-null object.
18
+ `},y={InvalidChild:t=>`[OrcheStore::createStore] Child slice '${t}' must be a slice created with createSlice(...).`,ReduxConflict:t=>`[OrcheStore::createStore] '${t}' is a Redux Toolkit configureStore(...) option and is ignored by OrcheStore.`,singletoneLimitation:()=>`[OrcheStore::createStore] createStore(...) was called more than once.
6
19
  OrcheStore currently supports only a single global store instance and will return the existing store.
7
20
  If you are creating a store inside a React component, create it only once, for example:
8
21
  const [store] = useState(() => createStore(...));
9
- Avoid useState(createStore(...)) because createStore(...) will be executed on every render.`),d[0].store;let t={},r={};for(let o in e){let T=e[o],w=C(T);w&&(t[o]=T,r[o]=w.reducer)}let n=(0,R.configureStore)({reducer:r});return d.push({store:t,redux:n}),t}var l=V(require("react"),1),p=require("react-redux");var M=[];function z({store:e,children:t}){let r=(0,p.useDispatch)(),n=M.find(o=>o.store===e);return n||M.push(n={store:e,dispatch:r}),n.dispatch=r,l.default.createElement(l.default.Fragment,null,t)}function m(e){let{store:t,stabilityCheck:r,identityFunctionCheck:n}=e,o=A(t);if(!o)throw new Error("[OrcheStore] <StoreProvider> requires a store instance created with createStore(...).");return l.default.createElement(p.Provider,{stabilityCheck:r,identityFunctionCheck:n,store:o},l.default.createElement(z,{...e}))}var B=Object.assign,b=Object.getOwnPropertyDescriptor(Object,"defineProperty")?.value||Object.defineProperty,H=(e,t,r)=>{b(e,t,{get:r,enumerable:!0,configurable:!1})},L=(e,t,r)=>{b(e,t,{value:r,writable:!1,enumerable:!0,configurable:!1})},k={assign:B,defineProp:b,defineReadonly:H,defineMethod:L},j={isArray:Array.isArray},u={get:Reflect.get,set:Reflect.set,delete:Reflect.deleteProperty};var c={GetMissingProp:e=>["OrcheStore[global-utils] Attempted to access a global utility before it became available. Missing property",e,`
10
- If this utility is optional, register it as undefined using provideGlobalUtils(...) to suppress future warnings.
11
- `],DeleteProp:e=>["OrcheStore[global-utils] Avoid deleting properties. Trying to delete property",e,`
12
- Use provideGlobalUtils(...) to set them to undefined instead for type safety.
13
- `],InvalidArgs:"OrcheStore[global-utils] Expected provideGlobalUtils(...) to receive a non-null object. Received:"},x=new Proxy({},{get(e,t,r){return t in e||i.error(...c.GetMissingProp(t)),u.get(e,t,r)},set(e,t,r,n){return u.set(e,t,r,n)},deleteProperty(e,t){return i.warn(...c.DeleteProp(t)),u.delete(e,t)}});function v(){return x}function P(e){return e==null?i.error(c.InvalidArgs,e):j.isArray(e)?i.error(c.InvalidArgs,"(type: array)",e):typeof e!="object"?i.error(c.InvalidArgs,`(type: ${typeof e})`,e):k.assign(x,e),x}var Q={createStore:S,createSlice:f,StoreProvider:m,provideGlobalUtils:P,getGlobalUtils:v},Y=Q;0&&(module.exports={StoreProvider,createSlice,createStore,getGlobalUtils,provideGlobalUtils});
22
+ Avoid useState(createStore(...)) because createStore(...) will execute on every render.`},d={InvalidStore:(t,e,r)=>({StoreType:[`[OrcheStore::${e}] Unable to resolve a valid store instance.
23
+ This operation requires a store created with createStore(...).
24
+ `,...h(t)],NeverExposed:[`[OrcheStore::${e}] Slice {${r}} has not been exposed in any store.
25
+ Ensure the slice is reachable from a store instance.
26
+ This can be done by exposing the slice directly through createStore({ slices: ... }) or indirectly through a parent slice using createSlice({ children: ... }).`],NotInTree:[`[OrcheStore::${e}] Slice {${r}} is not exposed within the target store.
27
+ A slice can only be accessed through stores that expose it.
28
+ `,...h.prefixed("Current store",!1,t)]}),RequiredName:()=>"[OrcheStore::createSlice] Missing required slice name. Expected a non-empty string.",InvalidName:t=>`[OrcheStore::createSlice] Slice names cannot contain '.' or '/'. Received: {${t}}`,RequiredState:t=>`[OrcheStore::createSlice] Missing required state for slice {${t}}.`,InvalidState:(t,e)=>[`[OrcheStore::createSlice]${m.target({slice:t})}Slice state must be a non-null object or a function that returns a non-null object.
29
+ `,...h(e)],InvalidMutation:t=>`[OrcheStore::createSlice] Mutation '${t}' must be a function.`,InvalidMethod:t=>`[OrcheStore::createSlice] Method '${t}' must be a function.`,InvalidChild:t=>`[OrcheStore::createSlice] Child slice '${t}' must be a slice created with createSlice(...).`,ReduxConflict:t=>`[OrcheStore::createSlice] '${t}' is a Redux Toolkit createSlice(...) option and is ignored by OrcheStore.`,ReduxReducerConflict:()=>"[OrcheStore::createSlice] Redux Toolkit asyncThunk reducers are not supported inside mutations. Use methods instead."},m={target:({slice:t})=>t?` Affected slice '${t}':
30
+ `:" ",RequiredName:t=>`[OrcheStore::${t.module}]${m.target(t)}${t.type} keys must be non-empty strings.`,InvalidName:(t,e)=>`[OrcheStore::${t.module}]${m.target(t)}${t.type} names cannot contain '.' or '/'. Received: ${e}.`,ReservedKey:(t,e)=>`[OrcheStore::${t.module}]${m.target(t)}'${e}' is a reserved name and cannot be used as a ${t.type} key.`,DuplicateKey:(t,e)=>`[OrcheStore::${t.module}]${m.target(t)}${t.type} name '${e}' conflicts with another member.`};var W=(t,e)=>{if(t)if(e==="warn")i.warn(t);else if(e==="error")i.error(t);else throw new Error(t);else return!1},M=(t,e="",r="",n)=>typeof t!="string"||!t?!!W(e,n?.[0]):t.includes(".")||t.includes("/")?!!W(r,n?.[1]):!0,Se=(t,e,r)=>{let n=m.RequiredName(t),o=m.InvalidName(t,e);if(M(e,n,o,["error","error"])){if(r[0].includes(e))return i.error(m.ReservedKey(t,e));if(r[1].includes(e))return i.error(m.DuplicateKey(t,e))}else return;return!0},b=(t,e,r,n)=>(Object.entries(e).forEach(([o,l])=>{let u=Se(t,o,r)?n(o,l):void 0;if(u===void 0)return delete e[o];e[o]=u,r[1].push(o)}),e);var me=Object.assign,j=Object.getOwnPropertyDescriptor(Object,"defineProperty")?.value||Object.defineProperty,ye=(t,e,r)=>{j(t,e,{get:r,enumerable:!0,configurable:!1})},ge=(t,e,r)=>{j(t,e,{value:r,writable:!1,enumerable:!0,configurable:!1})},p={assign:me,defineProp:j,defineReadonly:ye,defineMethod:ge},X={isArray:Array.isArray},E={get:Reflect.get,set:Reflect.set,delete:Reflect.deleteProperty};var A=new Proxy({},{get(t,e,r){return e in t||i.error(...R.GetMissingProp(e)),E.get(t,e,r)},set(t,e,r,n){return E.set(t,e,r,n)},deleteProperty(t,e){return i.warn(...R.DeleteProp(e)),E.delete(t,e)}});function g(){return A}function U(t){let e=h(t,r=>r&&typeof r=="object"&&!X.isArray(r));return e?i.error(R.InvalidArgs(),...e):p.assign(A,t),A}function v(t,e){let r={children:{}};return Object.keys(t).filter(o=>o.startsWith(e)).map(o=>o.split(".")).sort((o,l)=>o.length-l.length).forEach(o=>{let l=r;o.slice(0,o.length-1).forEach(u=>l=l[u]||={}),l.children||={},l.children[o[o.length-1]]={...t[o.join(".")]}}),r.children}function _(t,e){return e.split(".").forEach(r=>t=t[r]),t}var H=[],G=t=>t.name,N=(t,e)=>({module:"createSlice",type:t,slice:e.name}),xe=(t,e)=>({root:t.store,rootState:e,global:g()});function K(t){i.inform("prerelease");let e={},r=be(t),n=["name","computed","root","global","getState","useSelect","getPath"],o=[];p.defineReadonly(e,"name",()=>r.name),p.defineReadonly(e,"global",()=>g()),b(N("mutation",e),r.mutations,[n,o],(a,s)=>s?._reducerDefinitionType===$.ReducerType.asyncThunk||"reducer"in{...s||{}}?i.error(d.ReduxReducerConflict()):typeof s!="function"?i.error(d.InvalidMutation(a)):((f,x)=>s(f,...x.payload)));let l=(0,$.createSlice)({name:r.name,initialState:r.state,reducers:r.mutations}),u={path:r.name,slice:e,redux:l,children:{},exposedIn:[]};return p.defineMethod(e,"getPath",()=>G(e)),p.defineMethod(e,"getState",()=>{let a=d.InvalidStore(void 0,"slice.getState",r.name),c=w(u,void 0,a).redux.getState();return v(c,G(e))}),p.defineMethod(e,"useSelect",a=>{let s=d.InvalidStore(void 0,"slice.useSelect",r.name),c=w(u,void 0,s);return(0,B.useSelector)(f=>{let x=xe(c,v(f,""));return a.call(x,_(x.rootState,G(e)),x)})}),Object.entries(l.actions).map(([a,s])=>{e[a]=(...c)=>{let f=d.InvalidStore(void 0,"slice mutation",r.name);return w(u,void 0,f).redux.dispatch(s(c))}}),b(N("method",e),r.methods,[n,o],(a,s)=>typeof s!="function"?i.error(d.InvalidMethod(a)):e[a]=(...c)=>s.apply(e,c)),b(N("child",e),r.children,[n,o],(a,s)=>{}),H.push(u),e}var be=t=>{let e={...t||{}};if(M(e.name,d.RequiredName(),d.InvalidName(e.name)),typeof e.state=="function"){let a=e.state;e.state=()=>{let s=a();if(typeof s!="object"){let c=d.InvalidState(e.name,s);throw c.every(f=>typeof f=="string")?new Error(c.join(" ")):(i.error(...c),new Error)}if(!s)throw new Error(d.RequiredState(e.name));return s}}else{if(typeof e.state!="object"){let a=d.InvalidState(e.name,e.state);throw a.every(s=>typeof s=="string")?new Error(a.join(" ")):(i.error(...a),new Error)}if(!e.state)throw new Error(d.RequiredState(e.name))}e.mutations=typeof e.mutations=="object"&&e.mutations?{...e.mutations}:{},e.computed=typeof e.computed=="object"&&e.computed?{...e.computed}:{},e.methods=typeof e.methods=="object"&&e.methods?{...e.methods}:{},e.children=typeof e.children=="object"&&e.children?{...e.children}:{};let{reducers:r,extraReducers:n,reducerPath:o,initialState:l,selectors:u}=e;return l!==void 0&&i.warn(d.ReduxConflict("initialState")),r!==void 0&&i.warn(d.ReduxConflict("reducers")),n!==void 0&&i.warn(d.ReduxConflict("extraReducers")),o!==void 0&&i.warn(d.ReduxConflict("reducerPath")),u!==void 0&&i.warn(d.ReduxConflict("selectors")),Object.keys(e.computed).length>0&&i.warn("[OrcheStore::createSlice] Computed properties are not yet supported and will be ignored."),Object.keys(e.children).length>0&&i.warn("[OrcheStore::createSlice] Children slices are not yet supported and will be ignored."),e};function D(t){return H.find(e=>e.slice===t)}var q=(t,e,r,n,o)=>{let{redux:l,children:u}=e;return e.path=t,e.exposedIn.push(n),o[t]=l.reducer,Object.entries(u).forEach(([a,s])=>{q(t+"."+a,D(s),e.slice,n,o)}),r[t]=e.slice};var Y=require("react-redux");var T=[],ve=(t,e)=>({root:t,rootState:e,global:g()}),we=t=>({module:"createStore",type:t,slice:""});function L(t){if(T.length===1)return i.warn(y.singletoneLimitation()),T[0].store;i.inform("prerelease");let e={},r=Ce(t),n=["name","computed","global","getState","useSelect"],o=[];p.defineReadonly(e,"global",()=>g());let l={};b(we("slice"),r.slices,[n,o],(s,c)=>{let f=D(c);return f?q(s,f,e,e,l):i.error(y.InvalidChild(s))});let u=(0,Q.configureStore)({reducer:l}),a={provided:!1,store:e,redux:u};return p.defineMethod(e,"getState",()=>v(u.getState(),"")),p.defineMethod(e,"useSelect",s=>(0,Y.useSelector)(c=>{let f=ve(e,v(c,""));return s.call(f,f.rootState,f)})),T.push(a),e}var Ce=t=>{let e={...t||{}};e.slices=typeof e.slices=="object"&&e.slices?{...e.slices}:{};let{reducer:r,devTools:n,duplicateMiddlewareCheck:o,enhancers:l,middleware:u,preloadedState:a}=e;return r!==void 0&&i.warn(y.ReduxConflict("reducer")),n!==void 0&&i.warn(y.ReduxConflict("devTools")),o!==void 0&&i.warn(y.ReduxConflict("duplicateMiddlewareCheck")),l!==void 0&&i.warn(y.ReduxConflict("enhancers")),u!==void 0&&i.warn(y.ReduxConflict("middleware")),a!==void 0&&i.warn(y.ReduxConflict("preloadedState")),e};function w(t,e,r={}){let n;if((!t||e!==void 0)&&!T.find(o=>o.store===e)?n=r.StoreType:t&&!t.exposedIn.length?n=r.NeverExposed:t&&e&&!t.exposedIn.includes(e)&&(n=r.NotInTree),e=t&&e===void 0?t.exposedIn[0]:e,n)throw n.every(o=>typeof o=="string")?new Error(n.join(" ")):(i.error(...n),new Error);return T.find(o=>o.store===e)}var Z=ae(require("react"),1),ee=require("react-redux");function k(t){let{store:e,...r}={...t||{}},n=w(void 0,e,V.InvalidStore(e));return n.provided||(n.provided=!0),Z.default.createElement(ee.Provider,{...r,store:n.redux})}var Te={createStore:L,createSlice:K,StoreProvider:k,provideGlobalUtils:U,getGlobalUtils:g,configureDiagnostics:I},Oe=Te;0&&(module.exports={StoreProvider,configureDiagnostics,createSlice,createStore,getGlobalUtils,provideGlobalUtils});
package/dist/index.d.cts CHANGED
@@ -1,7 +1,7 @@
1
- import React from 'react';
2
1
  import { ProviderProps } from 'react-redux';
2
+ import React from 'react';
3
3
 
4
- type Dict<Value = any> = Record<string | number | symbol, Value>;
4
+ type Dict<Value = any> = Record<string, Value>;
5
5
  type Tail<T extends any[]> = T extends [any, ...infer R] ? R : T extends (infer U)[] ? U[] : never;
6
6
  type DeepReadonly<T> = T extends (...args: any[]) => any ? T : T extends readonly (infer U)[] ? ReadonlyArray<DeepReadonly<U>> : T extends object ? {
7
7
  readonly [K in keyof T]: DeepReadonly<T[K]>;
@@ -16,33 +16,59 @@ declare global {
16
16
  }
17
17
  /** Resolves a type slot with validation and fallback support. */
18
18
  type Definition<T, Rule, Default> = T extends keyof OrcheStore.Slots ? Exclude<OrcheStore.Slots[T], undefined | null> extends Rule ? Exclude<OrcheStore.Slots[T], undefined | null> : Default : Default;
19
- /** Validation rule for the `global` type slot. */
20
- type GlobalUtilsRule = Record<PropertyKey, any>;
21
- /** Validation rule for the `root` type slot. */
22
- type RootStoreRule = Record<PropertyKey, any>;
23
19
  /** Resolved type for application-wide global utilities. */
24
- type GlobalUtils = Definition<"global", GlobalUtilsRule, any>;
20
+ type GlobalUtils = Definition<"global", Record<PropertyKey, any>, any>;
25
21
  /** Resolved type for the application root store. */
26
- type RootStore = Definition<"root", RootStoreRule, any>;
22
+ type RootStore = Definition<"root", AnyStore, any>;
23
+
24
+ /** Exposes immutable store state. */
25
+ type ExposedState$1<C extends Dict<AnySlice>> = {
26
+ readonly [K in keyof C]: ReturnType<C[K]["getState"]>;
27
+ };
28
+ /** Reserved store member names that cannot be overridden by user-defined APIs. */
29
+ type ReservedKeys$1<R = {}, M = {}> = "name" | "computed" | "global" | "getState" | "useSelect" | keyof R | keyof M;
30
+ type AnyStore = store<any>;
31
+ /** Runtime store API exposed by createStore(...). */
32
+ type store<C extends Dict<AnySlice>> = {
33
+ /** Application-wide global utilities. */
34
+ readonly global: GlobalUtils;
35
+ /** Returns the latest immutable state snapshot. */
36
+ readonly getState: () => ExposedState$1<C>;
37
+ /** Subscribes to state changes within React components. Runs with a context-bound `this` containing `global` utilities. */
38
+ readonly useSelect: <T>(selector: (this: UseSelectContext<store<C>>, state: ExposedState$1<C>, context: UseSelectContext<store<C>>) => T) => T;
39
+ } & {
40
+ /** Exposed slices. */
41
+ readonly [K in Exclude<keyof C, ReservedKeys$1>]: C[K];
42
+ };
43
+ /** Configuration object used to create a store. */
44
+ type storeOptions<C extends Dict<AnySlice>> = {
45
+ /** Collection of slices. */
46
+ slices?: C;
47
+ };
48
+ type StoreProviderProps = Omit<ProviderProps, "store" | "serverState" | "context"> & {
49
+ /** The root OrcheStore instance created with `createStore(...)`. */
50
+ store: AnyStore;
51
+ };
27
52
 
28
53
  /** Reserved slice member names that cannot be overridden by user-defined APIs. */
29
- type ReservedKeys<R = {}, M = {}> = "name" | "path" | "computed" | "root" | "global" | "getState" | "useSelect" | keyof R | keyof M;
54
+ type ReservedKeys<R = {}, M = {}> = "name" | "computed" | "root" | "global" | "getState" | "useSelect" | "getPath" | keyof R | keyof M;
30
55
  /** Defines the mutations available on a slice. */
31
- type Mutations<S extends Dict> = Dict<(state: Omit<S, "root" | "computed">, ...args: any[]) => void>;
56
+ type Mutations<S extends Dict> = Dict<(state: Omit<S, "computed" | "children">, ...args: any[]) => void>;
32
57
  /** Defines the computed functions available on a slice. */
33
- type Computed<S extends Dict, C extends Dict> = Dict<(state: ExposedState<S, C>, ...args: any[]) => any>;
58
+ type Computed<S extends Dict, R extends Mutations<S>, M extends Methods, C extends Dict<AnySlice>> = Dict<(state: ExposedState<S, R, M, C>, ...args: any[]) => any>;
34
59
  /** Defines the methods available on a slice with contextual `this` typing. */
35
- type Methods<Context = any> = Dict<(...args: any[]) => any> & ThisType<Context>;
36
- /** Defines the child slices nested within a slice. */
37
- type Children = Dict<slice<any, Mutations<any>, Methods, Dict, Computed<any, any>, any>>;
60
+ type Methods = Dict<(...args: any[]) => any>;
38
61
  /** Exposes immutable slice state with optional runtime helpers. */
39
- type ExposedState<S extends Dict, C extends Children = Children, Root = {}> = DeepReadonly<Omit<S, "root"> & Root>;
62
+ type ExposedState<S extends Dict, R extends Mutations<S>, M extends Methods, C extends Dict<AnySlice>> = DeepReadonly<Omit<S, "computed" | "children">> & {
63
+ children: {
64
+ [K in Exclude<keyof C, ReservedKeys<R, M>>]: ReturnType<C[K]["getState"]>;
65
+ };
66
+ };
67
+ type AnySlice = slice<any, any, any, any, any>;
40
68
  /** Runtime slice API exposed by createSlice(...). */
41
- type slice<S extends Dict = Dict, R extends Mutations<S> = Mutations<S>, M extends Methods = Methods, C extends Children = Children, G extends Computed<S, C> = Computed<S, C>, N extends string = string> = {
69
+ type slice<S extends Dict, R extends Mutations<S>, M extends Methods, C extends Dict<AnySlice>, G extends Computed<S, R, M, C>, N extends string = string> = {
42
70
  /** Unique slice identifier. */
43
71
  readonly name: N;
44
- /** Fully qualified runtime path of the slice. */
45
- readonly path: string;
46
72
  /** Application-wide global utilities. */
47
73
  readonly global: GlobalUtils;
48
74
  /** Collection of derived state functions. */
@@ -50,9 +76,13 @@ type slice<S extends Dict = Dict, R extends Mutations<S> = Mutations<S>, M exten
50
76
  readonly [K in keyof G]: (...args: Tail<Parameters<G[K]>>) => ReturnType<G[K]>;
51
77
  };
52
78
  /** Returns the latest immutable state snapshot. */
53
- readonly getState: () => ExposedState<S, C>;
54
- /** Subscribes to state changes within React components. */
55
- readonly useSelect: <T>(selector: (state: ExposedState<S, C, true>) => T) => T;
79
+ readonly getState: (store?: slice<any, any, any, any, any>) => ExposedState<S, R, M, C>;
80
+ /** Subscribes to state changes within React components. Runs with a context-bound `this` containing `root` store, `rootState` and `global` utilities. */
81
+ readonly useSelect: {
82
+ <T, Store extends AnyStore = RootStore>(selector: (this: UseSelectContext<Store>, state: ExposedState<S, R, M, C>, context: UseSelectContext<any>) => T): T;
83
+ };
84
+ /** Returns fully qualified runtime path of the slice. */
85
+ readonly getPath: (store?: slice<any, any, any, any, any>) => string;
56
86
  } & {
57
87
  /** Exposed mutation functions. */
58
88
  readonly [K in Exclude<keyof R, ReservedKeys>]: (...args: Tail<Parameters<R[K]>>) => ReturnType<R[K]>;
@@ -64,7 +94,7 @@ type slice<S extends Dict = Dict, R extends Mutations<S> = Mutations<S>, M exten
64
94
  readonly [K in Exclude<keyof C, ReservedKeys<R, M>>]: C[K];
65
95
  };
66
96
  /** Configuration object used to create a slice. */
67
- type sliceOptions<S extends Dict = Dict, R extends Mutations<S> = Mutations<S>, M extends Methods = Methods, C extends Children = Children, G extends Computed<S, C> = Computed<S, C>, N extends string = string> = {
97
+ type sliceOptions<S extends Dict, R extends Mutations<S>, M extends Methods, C extends Dict<AnySlice>, G extends Computed<S, R, M, C>, N extends string = string> = {
68
98
  /** Unique slice identifier. */
69
99
  name: N;
70
100
  /** Initial state object or lazy state initializer. */
@@ -80,41 +110,50 @@ type sliceOptions<S extends Dict = Dict, R extends Mutations<S> = Mutations<S>,
80
110
  /** Collection of nested child slices. */
81
111
  children?: C;
82
112
  };
113
+ /** Context available inside `useSelect`, providing access to the root store, root state snapshot, and global utilities. */
114
+ type UseSelectContext<Store extends AnyStore> = {
115
+ /** Root store instance. */
116
+ root: Store;
117
+ /** Latest root state snapshot. */
118
+ rootState: ReturnType<Store["getState"]>;
119
+ /** Global utilities shared across slices. */
120
+ global: GlobalUtils;
121
+ };
83
122
 
84
- type store = Record<string, slice>;
123
+ /** Creates and initializes an OrcheStore instance. */
124
+ declare function createStore<C extends Dict<AnySlice>>(props: {
125
+ slices: C;
126
+ }): store<C>;
127
+
128
+ /** Creates and initializes an OrcheStore slice. */
129
+ declare function createSlice<S extends Dict, R extends Mutations<S>, M extends Methods, C extends Dict<AnySlice>, G extends Computed<S, R, M, C>, N extends string = string>(props: sliceOptions<S, R, M, C, G, N>): slice<S, R, M, C, G, N>;
130
+
131
+ /** Provides an OrcheStore instance to the React component tree. */
132
+ declare function StoreProvider(props: StoreProviderProps): React.JSX.Element;
85
133
 
86
134
  type orchestore = {};
87
135
  declare global {
88
136
  type OrcheStore = orchestore;
89
137
  namespace OrcheStore {
90
- type Store = store;
138
+ /** Runtime store API exposed by createStore(...). */
139
+ type Store<C extends Dict<AnySlice>> = store<C>;
140
+ /** Configuration object used to create a store. */
141
+ type StoreOptions<C extends Dict<AnySlice>> = storeOptions<C>;
91
142
  /** Runtime slice API exposed by createSlice(...). */
92
- type Slice<S extends Dict = Dict, R extends Mutations<S> = Mutations<S>, M extends Methods = Methods, C extends Children = Children, G extends Computed<S, C> = Computed<S, C>, N extends string = string> = slice<S, R, M, C, G, N>;
143
+ type Slice<S extends Dict, R extends Mutations<S>, M extends Methods, C extends Dict<AnySlice>, G extends Computed<S, R, M, C>, N extends string = string> = slice<S, R, M, C, G, N>;
93
144
  /** Configuration object used to create a slice. */
94
- type SliceOptions<S extends Dict = Dict, R extends Mutations<S> = Mutations<S>, M extends Methods = Methods, C extends Children = Children, G extends Computed<S, C> = Computed<S, C>, N extends string = string> = sliceOptions<S, R, M, C, G, N>;
145
+ type SliceOptions<S extends Dict, R extends Mutations<S>, M extends Methods, C extends Dict<AnySlice>, G extends Computed<S, R, M, C>, N extends string = string> = sliceOptions<S, R, M, C, G, N>;
95
146
  }
96
147
  }
97
148
 
98
- /** Creates and initializes an OrcheStore instance. */
99
- declare function createStore({ slices }: {
100
- slices: Record<string, slice>;
101
- }): store;
102
-
103
- /** Creates and initializes an OrcheStore slice. */
104
- declare function createSlice<S extends Dict = Dict, R extends Mutations<S> = Mutations<S>, M extends Methods = Methods, C extends Children = Children, G extends Computed<S, C> = Computed<S, C>, N extends string = string>(options: sliceOptions<S, R, M, C, G, N>): slice<S, R, M, C, G, N>;
105
-
106
- type StoreProviderProps = Omit<ProviderProps, "store" | "serverState" | "context"> & {
107
- /** The root OrcheStore instance created with createStore(...). */
108
- store: store;
109
- };
110
- /** Provides an OrcheStore instance to the React component tree. */
111
- declare function StoreProvider(props: StoreProviderProps): React.JSX.Element;
112
-
113
149
  /** Returns the current global utilities object. */
114
150
  declare function getGlobalUtils(): GlobalUtils;
115
151
  /** Registers or updates application-wide global utilities. */
116
152
  declare function provideGlobalUtils(value: Partial<GlobalUtils>): GlobalUtils;
117
153
 
154
+ /** Configures diagnostics output level ("off" | "errors" | "all"). */
155
+ declare function configureDiagnostics(level: "off" | "errors" | "all"): void;
156
+
118
157
  declare const OrcheStore$1: {
119
158
  /** Creates and initializes an OrcheStore instance. */
120
159
  createStore: typeof createStore;
@@ -126,6 +165,8 @@ declare const OrcheStore$1: {
126
165
  provideGlobalUtils: typeof provideGlobalUtils;
127
166
  /** Returns the current global utilities object. */
128
167
  getGlobalUtils: typeof getGlobalUtils;
168
+ /** Configures diagnostics output level ("off" | "errors" | "all"). */
169
+ configureDiagnostics: typeof configureDiagnostics;
129
170
  };
130
171
 
131
- export { type GlobalUtils, type orchestore as OrcheStore, type RootStore, type slice as Slice, type sliceOptions as SliceOptions, type store as Store, StoreProvider, createSlice, createStore, OrcheStore$1 as default, getGlobalUtils, provideGlobalUtils };
172
+ export { type GlobalUtils, type orchestore as OrcheStore, type RootStore, type slice as Slice, type sliceOptions as SliceOptions, type store as Store, type storeOptions as StoreOptions, StoreProvider, configureDiagnostics, createSlice, createStore, OrcheStore$1 as default, getGlobalUtils, provideGlobalUtils };
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- import React from 'react';
2
1
  import { ProviderProps } from 'react-redux';
2
+ import React from 'react';
3
3
 
4
- type Dict<Value = any> = Record<string | number | symbol, Value>;
4
+ type Dict<Value = any> = Record<string, Value>;
5
5
  type Tail<T extends any[]> = T extends [any, ...infer R] ? R : T extends (infer U)[] ? U[] : never;
6
6
  type DeepReadonly<T> = T extends (...args: any[]) => any ? T : T extends readonly (infer U)[] ? ReadonlyArray<DeepReadonly<U>> : T extends object ? {
7
7
  readonly [K in keyof T]: DeepReadonly<T[K]>;
@@ -16,33 +16,59 @@ declare global {
16
16
  }
17
17
  /** Resolves a type slot with validation and fallback support. */
18
18
  type Definition<T, Rule, Default> = T extends keyof OrcheStore.Slots ? Exclude<OrcheStore.Slots[T], undefined | null> extends Rule ? Exclude<OrcheStore.Slots[T], undefined | null> : Default : Default;
19
- /** Validation rule for the `global` type slot. */
20
- type GlobalUtilsRule = Record<PropertyKey, any>;
21
- /** Validation rule for the `root` type slot. */
22
- type RootStoreRule = Record<PropertyKey, any>;
23
19
  /** Resolved type for application-wide global utilities. */
24
- type GlobalUtils = Definition<"global", GlobalUtilsRule, any>;
20
+ type GlobalUtils = Definition<"global", Record<PropertyKey, any>, any>;
25
21
  /** Resolved type for the application root store. */
26
- type RootStore = Definition<"root", RootStoreRule, any>;
22
+ type RootStore = Definition<"root", AnyStore, any>;
23
+
24
+ /** Exposes immutable store state. */
25
+ type ExposedState$1<C extends Dict<AnySlice>> = {
26
+ readonly [K in keyof C]: ReturnType<C[K]["getState"]>;
27
+ };
28
+ /** Reserved store member names that cannot be overridden by user-defined APIs. */
29
+ type ReservedKeys$1<R = {}, M = {}> = "name" | "computed" | "global" | "getState" | "useSelect" | keyof R | keyof M;
30
+ type AnyStore = store<any>;
31
+ /** Runtime store API exposed by createStore(...). */
32
+ type store<C extends Dict<AnySlice>> = {
33
+ /** Application-wide global utilities. */
34
+ readonly global: GlobalUtils;
35
+ /** Returns the latest immutable state snapshot. */
36
+ readonly getState: () => ExposedState$1<C>;
37
+ /** Subscribes to state changes within React components. Runs with a context-bound `this` containing `global` utilities. */
38
+ readonly useSelect: <T>(selector: (this: UseSelectContext<store<C>>, state: ExposedState$1<C>, context: UseSelectContext<store<C>>) => T) => T;
39
+ } & {
40
+ /** Exposed slices. */
41
+ readonly [K in Exclude<keyof C, ReservedKeys$1>]: C[K];
42
+ };
43
+ /** Configuration object used to create a store. */
44
+ type storeOptions<C extends Dict<AnySlice>> = {
45
+ /** Collection of slices. */
46
+ slices?: C;
47
+ };
48
+ type StoreProviderProps = Omit<ProviderProps, "store" | "serverState" | "context"> & {
49
+ /** The root OrcheStore instance created with `createStore(...)`. */
50
+ store: AnyStore;
51
+ };
27
52
 
28
53
  /** Reserved slice member names that cannot be overridden by user-defined APIs. */
29
- type ReservedKeys<R = {}, M = {}> = "name" | "path" | "computed" | "root" | "global" | "getState" | "useSelect" | keyof R | keyof M;
54
+ type ReservedKeys<R = {}, M = {}> = "name" | "computed" | "root" | "global" | "getState" | "useSelect" | "getPath" | keyof R | keyof M;
30
55
  /** Defines the mutations available on a slice. */
31
- type Mutations<S extends Dict> = Dict<(state: Omit<S, "root" | "computed">, ...args: any[]) => void>;
56
+ type Mutations<S extends Dict> = Dict<(state: Omit<S, "computed" | "children">, ...args: any[]) => void>;
32
57
  /** Defines the computed functions available on a slice. */
33
- type Computed<S extends Dict, C extends Dict> = Dict<(state: ExposedState<S, C>, ...args: any[]) => any>;
58
+ type Computed<S extends Dict, R extends Mutations<S>, M extends Methods, C extends Dict<AnySlice>> = Dict<(state: ExposedState<S, R, M, C>, ...args: any[]) => any>;
34
59
  /** Defines the methods available on a slice with contextual `this` typing. */
35
- type Methods<Context = any> = Dict<(...args: any[]) => any> & ThisType<Context>;
36
- /** Defines the child slices nested within a slice. */
37
- type Children = Dict<slice<any, Mutations<any>, Methods, Dict, Computed<any, any>, any>>;
60
+ type Methods = Dict<(...args: any[]) => any>;
38
61
  /** Exposes immutable slice state with optional runtime helpers. */
39
- type ExposedState<S extends Dict, C extends Children = Children, Root = {}> = DeepReadonly<Omit<S, "root"> & Root>;
62
+ type ExposedState<S extends Dict, R extends Mutations<S>, M extends Methods, C extends Dict<AnySlice>> = DeepReadonly<Omit<S, "computed" | "children">> & {
63
+ children: {
64
+ [K in Exclude<keyof C, ReservedKeys<R, M>>]: ReturnType<C[K]["getState"]>;
65
+ };
66
+ };
67
+ type AnySlice = slice<any, any, any, any, any>;
40
68
  /** Runtime slice API exposed by createSlice(...). */
41
- type slice<S extends Dict = Dict, R extends Mutations<S> = Mutations<S>, M extends Methods = Methods, C extends Children = Children, G extends Computed<S, C> = Computed<S, C>, N extends string = string> = {
69
+ type slice<S extends Dict, R extends Mutations<S>, M extends Methods, C extends Dict<AnySlice>, G extends Computed<S, R, M, C>, N extends string = string> = {
42
70
  /** Unique slice identifier. */
43
71
  readonly name: N;
44
- /** Fully qualified runtime path of the slice. */
45
- readonly path: string;
46
72
  /** Application-wide global utilities. */
47
73
  readonly global: GlobalUtils;
48
74
  /** Collection of derived state functions. */
@@ -50,9 +76,13 @@ type slice<S extends Dict = Dict, R extends Mutations<S> = Mutations<S>, M exten
50
76
  readonly [K in keyof G]: (...args: Tail<Parameters<G[K]>>) => ReturnType<G[K]>;
51
77
  };
52
78
  /** Returns the latest immutable state snapshot. */
53
- readonly getState: () => ExposedState<S, C>;
54
- /** Subscribes to state changes within React components. */
55
- readonly useSelect: <T>(selector: (state: ExposedState<S, C, true>) => T) => T;
79
+ readonly getState: (store?: slice<any, any, any, any, any>) => ExposedState<S, R, M, C>;
80
+ /** Subscribes to state changes within React components. Runs with a context-bound `this` containing `root` store, `rootState` and `global` utilities. */
81
+ readonly useSelect: {
82
+ <T, Store extends AnyStore = RootStore>(selector: (this: UseSelectContext<Store>, state: ExposedState<S, R, M, C>, context: UseSelectContext<any>) => T): T;
83
+ };
84
+ /** Returns fully qualified runtime path of the slice. */
85
+ readonly getPath: (store?: slice<any, any, any, any, any>) => string;
56
86
  } & {
57
87
  /** Exposed mutation functions. */
58
88
  readonly [K in Exclude<keyof R, ReservedKeys>]: (...args: Tail<Parameters<R[K]>>) => ReturnType<R[K]>;
@@ -64,7 +94,7 @@ type slice<S extends Dict = Dict, R extends Mutations<S> = Mutations<S>, M exten
64
94
  readonly [K in Exclude<keyof C, ReservedKeys<R, M>>]: C[K];
65
95
  };
66
96
  /** Configuration object used to create a slice. */
67
- type sliceOptions<S extends Dict = Dict, R extends Mutations<S> = Mutations<S>, M extends Methods = Methods, C extends Children = Children, G extends Computed<S, C> = Computed<S, C>, N extends string = string> = {
97
+ type sliceOptions<S extends Dict, R extends Mutations<S>, M extends Methods, C extends Dict<AnySlice>, G extends Computed<S, R, M, C>, N extends string = string> = {
68
98
  /** Unique slice identifier. */
69
99
  name: N;
70
100
  /** Initial state object or lazy state initializer. */
@@ -80,41 +110,50 @@ type sliceOptions<S extends Dict = Dict, R extends Mutations<S> = Mutations<S>,
80
110
  /** Collection of nested child slices. */
81
111
  children?: C;
82
112
  };
113
+ /** Context available inside `useSelect`, providing access to the root store, root state snapshot, and global utilities. */
114
+ type UseSelectContext<Store extends AnyStore> = {
115
+ /** Root store instance. */
116
+ root: Store;
117
+ /** Latest root state snapshot. */
118
+ rootState: ReturnType<Store["getState"]>;
119
+ /** Global utilities shared across slices. */
120
+ global: GlobalUtils;
121
+ };
83
122
 
84
- type store = Record<string, slice>;
123
+ /** Creates and initializes an OrcheStore instance. */
124
+ declare function createStore<C extends Dict<AnySlice>>(props: {
125
+ slices: C;
126
+ }): store<C>;
127
+
128
+ /** Creates and initializes an OrcheStore slice. */
129
+ declare function createSlice<S extends Dict, R extends Mutations<S>, M extends Methods, C extends Dict<AnySlice>, G extends Computed<S, R, M, C>, N extends string = string>(props: sliceOptions<S, R, M, C, G, N>): slice<S, R, M, C, G, N>;
130
+
131
+ /** Provides an OrcheStore instance to the React component tree. */
132
+ declare function StoreProvider(props: StoreProviderProps): React.JSX.Element;
85
133
 
86
134
  type orchestore = {};
87
135
  declare global {
88
136
  type OrcheStore = orchestore;
89
137
  namespace OrcheStore {
90
- type Store = store;
138
+ /** Runtime store API exposed by createStore(...). */
139
+ type Store<C extends Dict<AnySlice>> = store<C>;
140
+ /** Configuration object used to create a store. */
141
+ type StoreOptions<C extends Dict<AnySlice>> = storeOptions<C>;
91
142
  /** Runtime slice API exposed by createSlice(...). */
92
- type Slice<S extends Dict = Dict, R extends Mutations<S> = Mutations<S>, M extends Methods = Methods, C extends Children = Children, G extends Computed<S, C> = Computed<S, C>, N extends string = string> = slice<S, R, M, C, G, N>;
143
+ type Slice<S extends Dict, R extends Mutations<S>, M extends Methods, C extends Dict<AnySlice>, G extends Computed<S, R, M, C>, N extends string = string> = slice<S, R, M, C, G, N>;
93
144
  /** Configuration object used to create a slice. */
94
- type SliceOptions<S extends Dict = Dict, R extends Mutations<S> = Mutations<S>, M extends Methods = Methods, C extends Children = Children, G extends Computed<S, C> = Computed<S, C>, N extends string = string> = sliceOptions<S, R, M, C, G, N>;
145
+ type SliceOptions<S extends Dict, R extends Mutations<S>, M extends Methods, C extends Dict<AnySlice>, G extends Computed<S, R, M, C>, N extends string = string> = sliceOptions<S, R, M, C, G, N>;
95
146
  }
96
147
  }
97
148
 
98
- /** Creates and initializes an OrcheStore instance. */
99
- declare function createStore({ slices }: {
100
- slices: Record<string, slice>;
101
- }): store;
102
-
103
- /** Creates and initializes an OrcheStore slice. */
104
- declare function createSlice<S extends Dict = Dict, R extends Mutations<S> = Mutations<S>, M extends Methods = Methods, C extends Children = Children, G extends Computed<S, C> = Computed<S, C>, N extends string = string>(options: sliceOptions<S, R, M, C, G, N>): slice<S, R, M, C, G, N>;
105
-
106
- type StoreProviderProps = Omit<ProviderProps, "store" | "serverState" | "context"> & {
107
- /** The root OrcheStore instance created with createStore(...). */
108
- store: store;
109
- };
110
- /** Provides an OrcheStore instance to the React component tree. */
111
- declare function StoreProvider(props: StoreProviderProps): React.JSX.Element;
112
-
113
149
  /** Returns the current global utilities object. */
114
150
  declare function getGlobalUtils(): GlobalUtils;
115
151
  /** Registers or updates application-wide global utilities. */
116
152
  declare function provideGlobalUtils(value: Partial<GlobalUtils>): GlobalUtils;
117
153
 
154
+ /** Configures diagnostics output level ("off" | "errors" | "all"). */
155
+ declare function configureDiagnostics(level: "off" | "errors" | "all"): void;
156
+
118
157
  declare const OrcheStore$1: {
119
158
  /** Creates and initializes an OrcheStore instance. */
120
159
  createStore: typeof createStore;
@@ -126,6 +165,8 @@ declare const OrcheStore$1: {
126
165
  provideGlobalUtils: typeof provideGlobalUtils;
127
166
  /** Returns the current global utilities object. */
128
167
  getGlobalUtils: typeof getGlobalUtils;
168
+ /** Configures diagnostics output level ("off" | "errors" | "all"). */
169
+ configureDiagnostics: typeof configureDiagnostics;
129
170
  };
130
171
 
131
- export { type GlobalUtils, type orchestore as OrcheStore, type RootStore, type slice as Slice, type sliceOptions as SliceOptions, type store as Store, StoreProvider, createSlice, createStore, OrcheStore$1 as default, getGlobalUtils, provideGlobalUtils };
172
+ export { type GlobalUtils, type orchestore as OrcheStore, type RootStore, type slice as Slice, type sliceOptions as SliceOptions, type store as Store, type storeOptions as StoreOptions, StoreProvider, configureDiagnostics, createSlice, createStore, OrcheStore$1 as default, getGlobalUtils, provideGlobalUtils };
package/dist/index.js CHANGED
@@ -1,13 +1,30 @@
1
- import{configureStore as I}from"@reduxjs/toolkit";import{createSlice as A}from"@reduxjs/toolkit";var b=[];function x(e){return b.find(t=>t.slice===e)?.redux}function v(e){let t=e,r=A({name:e.name,initialState:e.state,reducers:e.mutations});return b.push({slice:t,redux:r}),t}var u=typeof globalThis<"u"&&typeof globalThis.process<"u"&&globalThis.process?.env?.NODE_ENV!=="production",g=!1,P=globalThis.console?.log?.bind?.(globalThis.console)||globalThis.console?.log,M=globalThis.console?.warn?.bind?.(globalThis.console)||globalThis.console?.warn,k=globalThis.console?.error?.bind?.(globalThis.console)||globalThis.console?.error,j=globalThis.console?.clear?.bind?.(globalThis.console)||globalThis.console?.clear;globalThis.console?.clear&&(globalThis.console.clear=(...e)=>{g=!1,j?.(...e)});var E=`[OrcheStore] Development diagnostics are enabled.
2
- Warnings and errors from OrcheStore are not shown in production builds.
3
- Runtime exceptions that stop code execution may still occur.
1
+ import{configureStore as ce}from"@reduxjs/toolkit";import{createSlice as ne,ReducerType as ie}from"@reduxjs/toolkit";import{useSelector as se}from"react-redux";var T="all",D={diagnostics:!1,prerelease:!1},G=globalThis.console?.log?.bind?.(globalThis.console)||globalThis.console?.log,_=globalThis.console?.warn?.bind?.(globalThis.console)||globalThis.console?.warn,B=globalThis.console?.error?.bind?.(globalThis.console)||globalThis.console?.error,H=globalThis.console?.clear?.bind?.(globalThis.console)||globalThis.console?.clear;globalThis.console?.clear&&(globalThis.console.clear=(...t)=>{D.diagnostics=!1,H?.(...t)});var Q=`[OrcheStore] \u{1F6A7} Pre-release Notice
2
+ Thank you for your interest in OrcheStore.
3
+ OrcheStore is currently under active development and is not yet ready for production use.
4
+ APIs, behavior, and internal implementation details may change without notice.
5
+ The first stable release is currently planned for 2026-06-30.
6
+ Stay tuned for updates!
7
+ `,Y=`[OrcheStore] Diagnostics are enabled.
8
+ OrcheStore may emit warnings and errors to help identify incorrect usage, invalid configurations, and potential runtime issues.
9
+ Runtime exceptions that stop code execution may still occur regardless of diagnostics settings.
4
10
  Please resolve all OrcheStore warnings and errors before deploying to production.
5
- `,f=()=>{g||(g=!0,P?.(E))},i={log(...e){u&&(f(),P?.(...e))},warn(...e){u&&(f(),M?.(...e))},error(...e){u&&(f(),k?.(...e))}};var a=[];function T(e){return a.find(t=>t.store===e)?.redux}function w({slices:e}){if(a.length===1)return i.warn(`[OrcheStore] createStore(...) was called more than once.
11
+ Diagnostics can be configured with configureDiagnostics("off" | "errors" | "all").
12
+ `,i={inform(t){D[t]||(D[t]=!0,T==="all"&&G?.(t==="prerelease"?Q:Y))},log(...t){T==="all"&&(i.inform("diagnostics"),G?.(...t))},warn(...t){T==="all"&&(i.inform("diagnostics"),_?.(...t))},error(...t){T!=="off"&&(i.inform("diagnostics"),B?.(...t))}};function N(t){T=t}var K=(...t)=>{let[e,r]=[t[2],t[3]],o=`${t[0]||"Received"}: `,n=t[1]!==!1?"(type: "+typeof e+")":"";if(!r?.(e))return e==null?[`${o}(type: ${e})`]:typeof e=="number"||typeof e=="bigint"||typeof e=="boolean"?[`${o}${n} ${e}`]:typeof e=="object"?[o,e]:e===""?[`${o}Empty String`]:[`${o}${n}`,e]},h=((t,e)=>K("Received",!0,t,e));h.prefixed=(t,e,r,o)=>K(t,e,r,o);var q={InvalidStore:t=>({StoreType:[`[OrcheStore::StoreProvider] Expected a store instance created with createStore(...).
13
+ `,...h(t)]})},R={GetMissingProp:t=>["[OrcheStore::global-utils] Attempted to access a global utility before it became available. Missing property",t,`
14
+ If this utility is optional, register it as undefined using provideGlobalUtils(...) to suppress future warnings.
15
+ `],DeleteProp:t=>["[OrcheStore::global-utils] Avoid deleting properties. Trying to delete property",t,`
16
+ Use provideGlobalUtils(...) to set them to undefined instead for type safety.
17
+ `],InvalidArgs:()=>`[OrcheStore::global-utils] Expected provideGlobalUtils(...) to receive a non-null object.
18
+ `},g={InvalidChild:t=>`[OrcheStore::createStore] Child slice '${t}' must be a slice created with createSlice(...).`,ReduxConflict:t=>`[OrcheStore::createStore] '${t}' is a Redux Toolkit configureStore(...) option and is ignored by OrcheStore.`,singletoneLimitation:()=>`[OrcheStore::createStore] createStore(...) was called more than once.
6
19
  OrcheStore currently supports only a single global store instance and will return the existing store.
7
20
  If you are creating a store inside a React component, create it only once, for example:
8
21
  const [store] = useState(() => createStore(...));
9
- Avoid useState(createStore(...)) because createStore(...) will be executed on every render.`),a[0].store;let t={},r={};for(let n in e){let S=e[n],m=x(S);m&&(t[n]=S,r[n]=m.reducer)}let o=I({reducer:r});return a.push({store:t,redux:o}),t}import d from"react";import{Provider as K,useDispatch as N}from"react-redux";var O=[];function q({store:e,children:t}){let r=N(),o=O.find(n=>n.store===e);return o||O.push(o={store:e,dispatch:r}),o.dispatch=r,d.createElement(d.Fragment,null,t)}function U(e){let{store:t,stabilityCheck:r,identityFunctionCheck:o}=e,n=T(t);if(!n)throw new Error("[OrcheStore] <StoreProvider> requires a store instance created with createStore(...).");return d.createElement(K,{stabilityCheck:r,identityFunctionCheck:o,store:n},d.createElement(q,{...e}))}var F=Object.assign,y=Object.getOwnPropertyDescriptor(Object,"defineProperty")?.value||Object.defineProperty,V=(e,t,r)=>{y(e,t,{get:r,enumerable:!0,configurable:!1})},_=(e,t,r)=>{y(e,t,{value:r,writable:!1,enumerable:!0,configurable:!1})},G={assign:F,defineProp:y,defineReadonly:V,defineMethod:_},C={isArray:Array.isArray},p={get:Reflect.get,set:Reflect.set,delete:Reflect.deleteProperty};var c={GetMissingProp:e=>["OrcheStore[global-utils] Attempted to access a global utility before it became available. Missing property",e,`
10
- If this utility is optional, register it as undefined using provideGlobalUtils(...) to suppress future warnings.
11
- `],DeleteProp:e=>["OrcheStore[global-utils] Avoid deleting properties. Trying to delete property",e,`
12
- Use provideGlobalUtils(...) to set them to undefined instead for type safety.
13
- `],InvalidArgs:"OrcheStore[global-utils] Expected provideGlobalUtils(...) to receive a non-null object. Received:"},h=new Proxy({},{get(e,t,r){return t in e||i.error(...c.GetMissingProp(t)),p.get(e,t,r)},set(e,t,r,o){return p.set(e,t,r,o)},deleteProperty(e,t){return i.warn(...c.DeleteProp(t)),p.delete(e,t)}});function D(){return h}function R(e){return e==null?i.error(c.InvalidArgs,e):C.isArray(e)?i.error(c.InvalidArgs,"(type: array)",e):typeof e!="object"?i.error(c.InvalidArgs,`(type: ${typeof e})`,e):G.assign(h,e),h}var J={createStore:w,createSlice:v,StoreProvider:U,provideGlobalUtils:R,getGlobalUtils:D},ye=J;export{U as StoreProvider,v as createSlice,w as createStore,ye as default,D as getGlobalUtils,R as provideGlobalUtils};
22
+ Avoid useState(createStore(...)) because createStore(...) will execute on every render.`},d={InvalidStore:(t,e,r)=>({StoreType:[`[OrcheStore::${e}] Unable to resolve a valid store instance.
23
+ This operation requires a store created with createStore(...).
24
+ `,...h(t)],NeverExposed:[`[OrcheStore::${e}] Slice {${r}} has not been exposed in any store.
25
+ Ensure the slice is reachable from a store instance.
26
+ This can be done by exposing the slice directly through createStore({ slices: ... }) or indirectly through a parent slice using createSlice({ children: ... }).`],NotInTree:[`[OrcheStore::${e}] Slice {${r}} is not exposed within the target store.
27
+ A slice can only be accessed through stores that expose it.
28
+ `,...h.prefixed("Current store",!1,t)]}),RequiredName:()=>"[OrcheStore::createSlice] Missing required slice name. Expected a non-empty string.",InvalidName:t=>`[OrcheStore::createSlice] Slice names cannot contain '.' or '/'. Received: {${t}}`,RequiredState:t=>`[OrcheStore::createSlice] Missing required state for slice {${t}}.`,InvalidState:(t,e)=>[`[OrcheStore::createSlice]${y.target({slice:t})}Slice state must be a non-null object or a function that returns a non-null object.
29
+ `,...h(e)],InvalidMutation:t=>`[OrcheStore::createSlice] Mutation '${t}' must be a function.`,InvalidMethod:t=>`[OrcheStore::createSlice] Method '${t}' must be a function.`,InvalidChild:t=>`[OrcheStore::createSlice] Child slice '${t}' must be a slice created with createSlice(...).`,ReduxConflict:t=>`[OrcheStore::createSlice] '${t}' is a Redux Toolkit createSlice(...) option and is ignored by OrcheStore.`,ReduxReducerConflict:()=>"[OrcheStore::createSlice] Redux Toolkit asyncThunk reducers are not supported inside mutations. Use methods instead."},y={target:({slice:t})=>t?` Affected slice '${t}':
30
+ `:" ",RequiredName:t=>`[OrcheStore::${t.module}]${y.target(t)}${t.type} keys must be non-empty strings.`,InvalidName:(t,e)=>`[OrcheStore::${t.module}]${y.target(t)}${t.type} names cannot contain '.' or '/'. Received: ${e}.`,ReservedKey:(t,e)=>`[OrcheStore::${t.module}]${y.target(t)}'${e}' is a reserved name and cannot be used as a ${t.type} key.`,DuplicateKey:(t,e)=>`[OrcheStore::${t.module}]${y.target(t)}${t.type} name '${e}' conflicts with another member.`};var L=(t,e)=>{if(t)if(e==="warn")i.warn(t);else if(e==="error")i.error(t);else throw new Error(t);else return!1},P=(t,e="",r="",o)=>typeof t!="string"||!t?!!L(e,o?.[0]):t.includes(".")||t.includes("/")?!!L(r,o?.[1]):!0,Z=(t,e,r)=>{let o=y.RequiredName(t),n=y.InvalidName(t,e);if(P(e,o,n,["error","error"])){if(r[0].includes(e))return i.error(y.ReservedKey(t,e));if(r[1].includes(e))return i.error(y.DuplicateKey(t,e))}else return;return!0},v=(t,e,r,o)=>(Object.entries(e).forEach(([n,l])=>{let u=Z(t,n,r)?o(n,l):void 0;if(u===void 0)return delete e[n];e[n]=u,r[1].push(n)}),e);var ee=Object.assign,I=Object.getOwnPropertyDescriptor(Object,"defineProperty")?.value||Object.defineProperty,te=(t,e,r)=>{I(t,e,{get:r,enumerable:!0,configurable:!1})},re=(t,e,r)=>{I(t,e,{value:r,writable:!1,enumerable:!0,configurable:!1})},p={assign:ee,defineProp:I,defineReadonly:te,defineMethod:re},k={isArray:Array.isArray},E={get:Reflect.get,set:Reflect.set,delete:Reflect.deleteProperty};var M=new Proxy({},{get(t,e,r){return e in t||i.error(...R.GetMissingProp(e)),E.get(t,e,r)},set(t,e,r,o){return E.set(t,e,r,o)},deleteProperty(t,e){return i.warn(...R.DeleteProp(e)),E.delete(t,e)}});function x(){return M}function z(t){let e=h(t,r=>r&&typeof r=="object"&&!k.isArray(r));return e?i.error(R.InvalidArgs(),...e):p.assign(M,t),M}function w(t,e){let r={children:{}};return Object.keys(t).filter(n=>n.startsWith(e)).map(n=>n.split(".")).sort((n,l)=>n.length-l.length).forEach(n=>{let l=r;n.slice(0,n.length-1).forEach(u=>l=l[u]||={}),l.children||={},l.children[n[n.length-1]]={...t[n.join(".")]}}),r.children}function F(t,e){return e.split(".").forEach(r=>t=t[r]),t}var J=[],j=t=>t.name,A=(t,e)=>({module:"createSlice",type:t,slice:e.name}),ae=(t,e)=>({root:t.store,rootState:e,global:x()});function V(t){i.inform("prerelease");let e={},r=le(t),o=["name","computed","root","global","getState","useSelect","getPath"],n=[];p.defineReadonly(e,"name",()=>r.name),p.defineReadonly(e,"global",()=>x()),v(A("mutation",e),r.mutations,[o,n],(a,s)=>s?._reducerDefinitionType===ie.asyncThunk||"reducer"in{...s||{}}?i.error(d.ReduxReducerConflict()):typeof s!="function"?i.error(d.InvalidMutation(a)):((f,b)=>s(f,...b.payload)));let l=ne({name:r.name,initialState:r.state,reducers:r.mutations}),u={path:r.name,slice:e,redux:l,children:{},exposedIn:[]};return p.defineMethod(e,"getPath",()=>j(e)),p.defineMethod(e,"getState",()=>{let a=d.InvalidStore(void 0,"slice.getState",r.name),c=C(u,void 0,a).redux.getState();return w(c,j(e))}),p.defineMethod(e,"useSelect",a=>{let s=d.InvalidStore(void 0,"slice.useSelect",r.name),c=C(u,void 0,s);return se(f=>{let b=ae(c,w(f,""));return a.call(b,F(b.rootState,j(e)),b)})}),Object.entries(l.actions).map(([a,s])=>{e[a]=(...c)=>{let f=d.InvalidStore(void 0,"slice mutation",r.name);return C(u,void 0,f).redux.dispatch(s(c))}}),v(A("method",e),r.methods,[o,n],(a,s)=>typeof s!="function"?i.error(d.InvalidMethod(a)):e[a]=(...c)=>s.apply(e,c)),v(A("child",e),r.children,[o,n],(a,s)=>{}),J.push(u),e}var le=t=>{let e={...t||{}};if(P(e.name,d.RequiredName(),d.InvalidName(e.name)),typeof e.state=="function"){let a=e.state;e.state=()=>{let s=a();if(typeof s!="object"){let c=d.InvalidState(e.name,s);throw c.every(f=>typeof f=="string")?new Error(c.join(" ")):(i.error(...c),new Error)}if(!s)throw new Error(d.RequiredState(e.name));return s}}else{if(typeof e.state!="object"){let a=d.InvalidState(e.name,e.state);throw a.every(s=>typeof s=="string")?new Error(a.join(" ")):(i.error(...a),new Error)}if(!e.state)throw new Error(d.RequiredState(e.name))}e.mutations=typeof e.mutations=="object"&&e.mutations?{...e.mutations}:{},e.computed=typeof e.computed=="object"&&e.computed?{...e.computed}:{},e.methods=typeof e.methods=="object"&&e.methods?{...e.methods}:{},e.children=typeof e.children=="object"&&e.children?{...e.children}:{};let{reducers:r,extraReducers:o,reducerPath:n,initialState:l,selectors:u}=e;return l!==void 0&&i.warn(d.ReduxConflict("initialState")),r!==void 0&&i.warn(d.ReduxConflict("reducers")),o!==void 0&&i.warn(d.ReduxConflict("extraReducers")),n!==void 0&&i.warn(d.ReduxConflict("reducerPath")),u!==void 0&&i.warn(d.ReduxConflict("selectors")),Object.keys(e.computed).length>0&&i.warn("[OrcheStore::createSlice] Computed properties are not yet supported and will be ignored."),Object.keys(e.children).length>0&&i.warn("[OrcheStore::createSlice] Children slices are not yet supported and will be ignored."),e};function $(t){return J.find(e=>e.slice===t)}var U=(t,e,r,o,n)=>{let{redux:l,children:u}=e;return e.path=t,e.exposedIn.push(o),n[t]=l.reducer,Object.entries(u).forEach(([a,s])=>{U(t+"."+a,$(s),e.slice,o,n)}),r[t]=e.slice};import{useSelector as de}from"react-redux";var O=[],ue=(t,e)=>({root:t,rootState:e,global:x()}),fe=t=>({module:"createStore",type:t,slice:""});function W(t){if(O.length===1)return i.warn(g.singletoneLimitation()),O[0].store;i.inform("prerelease");let e={},r=pe(t),o=["name","computed","global","getState","useSelect"],n=[];p.defineReadonly(e,"global",()=>x());let l={};v(fe("slice"),r.slices,[o,n],(s,c)=>{let f=$(c);return f?U(s,f,e,e,l):i.error(g.InvalidChild(s))});let u=ce({reducer:l}),a={provided:!1,store:e,redux:u};return p.defineMethod(e,"getState",()=>w(u.getState(),"")),p.defineMethod(e,"useSelect",s=>de(c=>{let f=ue(e,w(c,""));return s.call(f,f.rootState,f)})),O.push(a),e}var pe=t=>{let e={...t||{}};e.slices=typeof e.slices=="object"&&e.slices?{...e.slices}:{};let{reducer:r,devTools:o,duplicateMiddlewareCheck:n,enhancers:l,middleware:u,preloadedState:a}=e;return r!==void 0&&i.warn(g.ReduxConflict("reducer")),o!==void 0&&i.warn(g.ReduxConflict("devTools")),n!==void 0&&i.warn(g.ReduxConflict("duplicateMiddlewareCheck")),l!==void 0&&i.warn(g.ReduxConflict("enhancers")),u!==void 0&&i.warn(g.ReduxConflict("middleware")),a!==void 0&&i.warn(g.ReduxConflict("preloadedState")),e};function C(t,e,r={}){let o;if((!t||e!==void 0)&&!O.find(n=>n.store===e)?o=r.StoreType:t&&!t.exposedIn.length?o=r.NeverExposed:t&&e&&!t.exposedIn.includes(e)&&(o=r.NotInTree),e=t&&e===void 0?t.exposedIn[0]:e,o)throw o.every(n=>typeof n=="string")?new Error(o.join(" ")):(i.error(...o),new Error);return O.find(n=>n.store===e)}import Se from"react";import{Provider as me}from"react-redux";function X(t){let{store:e,...r}={...t||{}},o=C(void 0,e,q.InvalidStore(e));return o.provided||(o.provided=!0),Se.createElement(me,{...r,store:o.redux})}var ye={createStore:W,createSlice:V,StoreProvider:X,provideGlobalUtils:z,getGlobalUtils:x,configureDiagnostics:N},gt=ye;export{X as StoreProvider,N as configureDiagnostics,V as createSlice,W as createStore,gt as default,x as getGlobalUtils,z as provideGlobalUtils};
package/package.json CHANGED
@@ -1,73 +1,74 @@
1
- {
2
- "name": "orchestore",
3
- "version": "0.1.1",
4
- "description": "A function-oriented architecture built on top of Redux Toolkit for simplifying and automating application development.",
5
- "author": "Oussama Saadaoui",
6
- "license": "MIT",
7
- "type": "module",
8
- "main": "./src/index.cjs",
9
- "module": "./dist/index.js",
10
- "types": "./dist/index.d.ts",
11
- "scripts": {
12
- "start": "tsup",
13
- "build": "tsup",
14
- "check": "tsc --noEmit",
15
- "lint": "eslint .",
16
- "prepublishOnly": "npm run build"
17
- },
18
- "exports": {
19
- ".": {
20
- "types": "./dist/index.d.ts",
21
- "import": "./dist/index.js",
22
- "require": "./dist/index.cjs"
23
- }
24
- },
25
- "files": [
26
- "dist"
27
- ],
28
- "homepage": "https://github.com/saadaoui-oussama-dev/OrcheStore#readme",
29
- "bugs": {
30
- "url": "https://github.com/saadaoui-oussama-dev/OrcheStore/issues"
31
- },
32
- "repository": {
33
- "type": "git",
34
- "url": "https://github.com/saadaoui-oussama-dev/OrcheStore.git"
35
- },
36
- "dependencies": {
37
- "@reduxjs/toolkit": "^2.12.0",
38
- "react-redux": "^9.3.0"
39
- },
40
- "devDependencies": {
41
- "@types/react": "^19.0.0",
42
- "@types/react-dom": "^19.0.0",
43
- "eslint": "^9.0.0",
44
- "tsup": "^8.5.1",
45
- "typescript": "^6.0.3"
46
- },
47
- "peerDependencies": {
48
- "react": "^16.9.0 || ^17 || ^18 || ^19",
49
- "react-dom": "^16.9.0 || ^17 || ^18 || ^19"
50
- },
51
- "keywords": [
52
- "orchestore",
53
- "store",
54
- "slice",
55
- "state",
56
- "global-store",
57
- "global-state",
58
- "typed-store",
59
- "typed-state",
60
- "react",
61
- "react-store",
62
- "react-state",
63
- "react-redux",
64
- "redux",
65
- "redux-toolkit",
66
- "redux-automation",
67
- "frontend",
68
- "typescript",
69
- "orchestration",
70
- "state-management",
71
- "state-orchestration"
72
- ]
73
- }
1
+ {
2
+ "name": "orchestore",
3
+ "version": "0.1.3",
4
+ "description": "A function-oriented architecture built on top of Redux Toolkit for simplifying and automating application development.",
5
+ "author": "Oussama Saadaoui",
6
+ "license": "MIT",
7
+ "type": "module",
8
+ "main": "./src/index.cjs",
9
+ "module": "./dist/index.js",
10
+ "types": "./dist/index.d.ts",
11
+ "scripts": {
12
+ "init": "node scripts/install.mjs",
13
+ "start": "tsup && node scripts/build.mjs",
14
+ "build": "tsup && node scripts/build.mjs",
15
+ "publish": "tsup && node scripts/publish.mjs",
16
+ "check": "tsc --noEmit",
17
+ "lint": "eslint ."
18
+ },
19
+ "exports": {
20
+ ".": {
21
+ "types": "./dist/index.d.ts",
22
+ "import": "./dist/index.js",
23
+ "require": "./dist/index.cjs"
24
+ }
25
+ },
26
+ "files": [
27
+ "dist"
28
+ ],
29
+ "homepage": "https://github.com/saadaoui-oussama-dev/OrcheStore#readme",
30
+ "bugs": {
31
+ "url": "https://github.com/saadaoui-oussama-dev/OrcheStore/issues"
32
+ },
33
+ "repository": {
34
+ "type": "git",
35
+ "url": "https://github.com/saadaoui-oussama-dev/OrcheStore.git"
36
+ },
37
+ "dependencies": {
38
+ "@reduxjs/toolkit": "^2.12.0",
39
+ "react-redux": "^9.3.0"
40
+ },
41
+ "devDependencies": {
42
+ "@types/react": "^19.0.0",
43
+ "@types/react-dom": "^19.0.0",
44
+ "eslint": "^9.0.0",
45
+ "tsup": "^8.5.1",
46
+ "typescript": "^6.0.3"
47
+ },
48
+ "peerDependencies": {
49
+ "react": "^16.9.0 || ^17 || ^18 || ^19",
50
+ "react-dom": "^16.9.0 || ^17 || ^18 || ^19"
51
+ },
52
+ "keywords": [
53
+ "orchestore",
54
+ "store",
55
+ "slice",
56
+ "state",
57
+ "global-store",
58
+ "global-state",
59
+ "typed-store",
60
+ "typed-state",
61
+ "react",
62
+ "react-store",
63
+ "react-state",
64
+ "react-redux",
65
+ "redux",
66
+ "redux-toolkit",
67
+ "redux-automation",
68
+ "frontend",
69
+ "typescript",
70
+ "orchestration",
71
+ "state-management",
72
+ "state-orchestration"
73
+ ]
74
+ }