kiss-for-react 2.0.7 → 2.0.9

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
@@ -16,7 +16,7 @@ npm install kiss-for-react
16
16
  ## Linter → **[eslint-plugin-kiss-for-react](https://www.npmjs.com/package/eslint-plugin-kiss-for-react)**
17
17
 
18
18
  ---
19
-
19
+
20
20
  # Overview
21
21
 
22
22
  ## Store and state
@@ -24,9 +24,6 @@ npm install kiss-for-react
24
24
  The **store** holds all application **state**. Here are a few examples:
25
25
 
26
26
  ```tsx
27
- // Your state is a number
28
- const store = createStore<number>({initialState: 1});
29
-
30
27
  // Your state is a plain JavaScript object
31
28
  const store = createStore({initialState: {name: 'Mary', age: 25}});
32
29
 
@@ -51,25 +48,13 @@ function App() {
51
48
 
52
49
  ## Components use the state
53
50
 
54
- The `useAllState` hook lets you access the whole state from any component.
55
- The component re-renders when any part of the state changes (not recommended, but good for
56
- fast prototyping).
57
-
58
- ```tsx
59
- function MyComponent() {
60
- const state = useAllState<State>();
61
-
62
- return <div>{state.name} is {state.age} years old</div>;
63
- };
64
- ```
65
-
66
51
  The `useSelect` hook selects only the part of the state that your component needs.
67
52
  The component re-renders only when that part changes.
68
53
 
69
54
  ```tsx
70
55
  function MyComponent() {
71
- const name = useSelect((state: State) => state.name);
72
- const age = useSelect((state: State) => state.age);
56
+ const name = useSelect((st: State) => st.name);
57
+ const age = useSelect((st: State) => st.age);
73
58
 
74
59
  return <div>{name} is {age} years old</div>;
75
60
  };
@@ -80,23 +65,15 @@ The `useObject` hook also causes the component to re-render only when needed:
80
65
  ```tsx
81
66
  function MyComponent() {
82
67
 
83
- const state = useObject((state: State) => ({
84
- name: state.name,
85
- age: state.age,
68
+ const state = useObject((st: State) => ({
69
+ name: st.name,
70
+ age: st.age,
86
71
  }));
87
72
 
88
73
  return <div>{state.name} is {state.age} years old</div>;
89
74
  };
90
75
  ```
91
76
 
92
- These hooks connect to the store with React's own
93
- [`useSyncExternalStore`](https://react.dev/reference/react/useSyncExternalStore),
94
- so React reads the state itself, compares what each component selected, and renders only
95
- the components whose selection changed. React also checks the state again before
96
- committing a
97
- render it paused (a transition), and renders again if the state changed meanwhile, so a
98
- screen never shows parts of two different states at the same time.
99
-
100
77
  &nbsp;
101
78
 
102
79
  ## Actions and reducers
@@ -121,8 +98,8 @@ class Increment extends Action {
121
98
  The store's state is **immutable**.
122
99
 
123
100
  The only way to change the store's state is by dispatching an **action**,
124
- wich runs the action's reducer to get a new state.
125
- The new state replaces the current one, and affected components re-render.
101
+ which runs the action's reducer to get a new state.
102
+ The new state replaces the current one, and components re-render.
126
103
 
127
104
  ```tsx
128
105
  // Dispatch an action
@@ -175,8 +152,7 @@ function MyComponent() {
175
152
  ```
176
153
 
177
154
  To dispatch actions when the component mounts, when some values change, and when it
178
- unmounts,
179
- use `useStoreEffect` instead of a `useEffect`:
155
+ unmounts, use `useStoreEffect` instead of a `useEffect`:
180
156
 
181
157
  ```tsx
182
158
  useStoreEffect({
@@ -196,23 +172,22 @@ useStoreEffect({
196
172
  });
197
173
  ```
198
174
 
199
- To reload the data on screen when the user comes back to the browser tab, or when the
200
- internet
201
- comes back, add `onFocus` and `onOnline` (there are also `onBlur` and `onOffline`). They
202
- run
203
- only on the transitions, while the component is mounted, never on mount. Give the action a
204
- `fresh` period to skip the reload when the data is recent:
175
+ There are also:
176
+
177
+ * `onFocus` to run an action when the user comes back to the browser tab.
178
+ * `onBlur` to run an action when the user leaves the browser tab.
179
+ * `onOnline` to run an action when the internet connection comes back.
180
+ * `onOffline` to run an action when the internet connection is lost.
205
181
 
206
182
  ```tsx
207
- useStoreEffect({
208
- onMount: (store) => store.dispatch(new LoadPrices()),
183
+ useStoreEffect({
209
184
  onFocus: (store) => store.dispatch(new LoadPrices()),
210
185
  onOnline: (store) => store.dispatch(new LoadPrices()),
211
186
  });
212
187
  ```
213
188
 
214
- Also available in components with `useIsFocused()` and `useIsOnline()`,
215
- for an "offline" banner.
189
+ These are also available in components with `useIsFocused()` and `useIsOnline()`,
190
+ so that you can show an "offline" banner.
216
191
 
217
192
  &nbsp;
218
193
 
@@ -304,9 +279,9 @@ function UserRow({ userId }: { userId: string }) {
304
279
  }
305
280
  ```
306
281
 
307
- To show one spinner or one error while any of several actions runs or fails, pass an array.
308
- `useExceptionFor([LoadUser, LoadPosts])` returns the `UserException` of the first type in
309
- the array that has one:
282
+ You can also pass an array to check several action types at once. For example, to show a
283
+ spinner while either `LoadUser` or `LoadPosts` is running, or an error message if either
284
+ has failed:
310
285
 
311
286
  ```tsx
312
287
  const isLoading = useIsWaiting([LoadUser, LoadPosts]);
@@ -314,16 +289,15 @@ const isFailed = useIsFailed([LoadUser, LoadPosts]);
314
289
  const error = useExceptionFor([LoadUser, LoadPosts]);
315
290
  ```
316
291
 
317
- Don't write `useIsWaiting(LoadUser) || useIsWaiting(LoadPosts)`. When the first hook returns
318
- true, the second one is not called, and that breaks the rules of hooks.
292
+ Note the `useExceptionFor` above returns the `UserException` thrown by `LoadUser` or by
293
+ `LoadPosts`. If no error happened, it returns `null`. You can then show this error message
294
+ in the screen.
319
295
 
320
296
  ### Suspense and error boundaries
321
297
 
322
298
  If you prefer React's `<Suspense>` and error boundaries to `isWaiting`/`isFailed` checks,
323
- use
324
- `useSuspense` instead. It suspends the component while the action runs, and throws the
325
- error
326
- to the nearest error boundary if the action failed:
299
+ use `useSuspense` instead. It suspends the component while the action runs, and throws the
300
+ error to the nearest error boundary if the action failed:
327
301
 
328
302
  ```tsx
329
303
  function UserName({ userId }: { userId: string }) {
@@ -484,22 +458,6 @@ class LoadText extends Action {
484
458
  }
485
459
  ```
486
460
 
487
- By default, it checks the action class. To let actions of the same class run in parallel
488
- when they have different parameters, override `nonReentrantKeyParams()`:
489
-
490
- ```tsx
491
- class SaveItem extends Action {
492
- constructor(readonly itemId: string) { super(); }
493
-
494
- nonReentrant = true;
495
- nonReentrantKeyParams() { return this.itemId; }
496
- ...
497
- }
498
- ```
499
-
500
- Now `SaveItem('A')` and `SaveItem('B')` can run in parallel, but two `SaveItem('A')`
501
- cannot.
502
-
503
461
  ### Retry
504
462
 
505
463
  To retry an action a few times with exponential backoff if it fails,
@@ -529,22 +487,6 @@ class LoadText extends Action {
529
487
  }
530
488
  ```
531
489
 
532
- By default, every error is retried.
533
- To give up on errors that will fail again anyway (like a 404 or a 401),
534
- override `shouldRetry`.
535
-
536
- ```tsx
537
- class LoadText extends Action {
538
- retry = {on: true}
539
-
540
- shouldRetry(error: unknown, attempt: number) {
541
- return !(error instanceof NotFoundError);
542
- }
543
-
544
- async reduce() { ... }
545
- }
546
- ```
547
-
548
490
  ### CheckInternet
549
491
 
550
492
  To check for an internet connection before running the action, add the `checkInternet`
@@ -559,27 +501,6 @@ class LoadPrices extends Action {
559
501
  }
560
502
  ```
561
503
 
562
- Use `checkInternet = { dialog: false }` to fail without a dialog, so you can show the
563
- error in your components with `isFailed`. Or use `checkInternet = { abort: true }` to
564
- abort the action silently, as if it had never been dispatched, without any errors.
565
-
566
- To show a different error, override `noInternetException()`:
567
-
568
- ```tsx
569
- class LoadPrices extends Action {
570
- checkInternet = { dialog: true }
571
-
572
- noInternetException() {
573
- return new UserException('You are offline. The prices could not be loaded.');
574
- }
575
-
576
- async reduce() { ... }
577
- }
578
- ```
579
-
580
- The store checks the internet before it calls the action's `before()` method. So you can
581
- override `before()` without calling `super.before()`.
582
-
583
504
  ### UnlimitedRetryCheckInternet
584
505
 
585
506
  To keep trying an action until it succeeds, add the `unlimitedRetryCheckInternet`
@@ -640,9 +561,9 @@ You can also check `this.isAborted` inside the reducer to know if the action was
640
561
 
641
562
  ### Aborting actions
642
563
 
643
- Call `store.abort(ActionType)` to abort all the actions of that type that are in progress,
644
- for example, from a "Cancel" button, or when the component that started a request
645
- unmounts.
564
+ Call `store.abort(ActionType)` to abort all the actions of that type that are in
565
+ progress, for example, from a "Cancel" button, or when the component that started a
566
+ request unmounts.
646
567
 
647
568
  ```tsx
648
569
  useStoreEffect({
@@ -651,7 +572,8 @@ useStoreEffect({
651
572
  });
652
573
  ```
653
574
 
654
- To abort the actions of several types, pass an array: `store.abort([LoadUser, LoadPosts])`.
575
+ To abort the actions of several types, pass an array:
576
+ `store.abort([LoadUser, LoadPosts])`.
655
577
 
656
578
  ### Throttle
657
579
 
@@ -671,18 +593,6 @@ class LoadPrices extends Action {
671
593
  }
672
594
  ```
673
595
 
674
- Override `ignoreThrottle` to run the action anyway under some conditions (for example,
675
- a `force` flag).
676
-
677
- ```tsx
678
- class LoadPrices extends Action {
679
- constructor(public force = false) { super(); }
680
- throttle = 5000;
681
- get ignoreThrottle() { return this.force; }
682
- ...
683
- }
684
- ```
685
-
686
596
  ### Fresh
687
597
 
688
598
  To avoid reloading the same information too often, add a `fresh` property to your action
@@ -719,27 +629,15 @@ class SaveItem extends Action {
719
629
  }
720
630
  ```
721
631
 
722
- By default, all sequential actions share a single queue, even if they are of different
723
- classes. To have independent queues, override `sequentialKeyParams()`. Actions with the
724
- same key run one at a time, while actions with different keys run in parallel:
725
-
726
- ```tsx
727
- class SaveUser extends Action {
728
- sequential = true;
729
- constructor(readonly userId: string) { super(); }
730
- sequentialKeyParams() { return this.userId; }
731
- ...
732
- }
733
- ```
734
-
735
632
  ### Polling
736
633
 
737
634
  To periodically dispatch an action at a fixed interval, add a `poll` property to your
738
635
  action class (usually as a constructor parameter), and override `createPollingAction()` to
739
- return the action each tick dispatches. Dispatch it with `Poll.start` to run it right away
740
- and start polling, and with `Poll.stop` to stop polling. Use `Poll.runNowAndRestart` to
741
- run it now and restart the timer, and `Poll.once` (the default) to run it once, without
742
- affecting the polling.
636
+ return the action each tick dispatches.
637
+
638
+ Dispatch it with `Poll.start` to run it right away and start polling, and with `Poll.stop`
639
+ to stop polling. Use `Poll.once` (the default) to run it once, without affecting the
640
+ polling.
743
641
 
744
642
  ```tsx
745
643
  class LoadPrices extends Action {
@@ -757,17 +655,6 @@ dispatch(new LoadPrices(Poll.start)); // Start polling.
757
655
  dispatch(new LoadPrices(Poll.stop)); // Stop polling.
758
656
  ```
759
657
 
760
- Each tick waits for the previous run to finish, so runs never overlap.
761
- Set `pollWaitsForRun = false` to tick at a fixed rate instead.
762
-
763
- By default, the ticks only run while the app is focused (in the browser, the tab is
764
- visible) and online. A tick that comes due while the user is away waits, and runs as soon
765
- as the user comes back to the tab, or the internet comes back. Set
766
- `pollOnlyWhenFocused = false` or `pollOnlyWhenOnline = false` to keep polling anyway.
767
-
768
- To stop all polling at once (for example, on logout), call `stopAllPolling()` from any
769
- action.
770
-
771
658
  ## Advanced Features
772
659
 
773
660
  ### OptimisticCommand
@@ -806,8 +693,7 @@ again.
806
693
  ## Disposing the store
807
694
 
808
695
  Apps have long-lived things that are not state, and must not go in the state: intervals,
809
- WebSockets, `EventSource`s, `AbortController`s, listeners (like Firebase's `onSnapshot`,
810
- which returns an unsubscribe function), RxJS subscriptions.
696
+ WebSockets, `EventSource`s, `AbortController`s, listeners etc.
811
697
 
812
698
  Keep them in the store **props**, with `setProp`, and close them with `disposeProp`:
813
699
 
@@ -828,22 +714,9 @@ class StopClock extends Action {
828
714
  }
829
715
  ```
830
716
 
831
- The props belong to the store, so each test (or each request, in server-side rendering)
832
- has its own, and they can all be closed at once. Kiss knows how to automatically dispose
833
- an `AbortController` (aborted), a `WebSocket`, `EventSource`, `BroadcastChannel`,
834
- `MessagePort` or `Worker` (closed or terminated), an object with `unsubscribe()` (RxJS)
835
- and an object with `[Symbol.dispose]()` or `[Symbol.asyncDispose]()`.
836
-
837
- Setting a prop again with the same key disposes the previous value, so dispatching
838
- `StartClock` twice doesn't leak the first interval. Read a prop with
839
- `prop(key)`, list them with `props`, and dispose many with `disposeProps(predicate?)`.
840
-
841
- The same methods exist on the store. On logout, `store.logOut({ disposeProps: true })`
842
- disposes them too.
843
-
844
- To end the store, when the app finishes or at the end of each test, call
845
- `store.dispose()`. It shuts down the store, stops all the action features, cancels the
846
- waiting `dispatchWhen`s, pauses the persistor, and disposes all the props.
717
+ To end the store, when the app finishes, the user logs out, or at the end of each test,
718
+ call `store.dispose()`. It shuts down the store, stops all the action features, cancels
719
+ the waiting `dispatchWhen`s, pauses the persistor, and disposes all the props.
847
720
  It returns a promise that waits for the async disposals.
848
721
 
849
722
  &nbsp;
@@ -854,10 +727,7 @@ Inject the services the actions use (API clients, repositories, analytics...) in
854
727
  store, instead of importing them from modules. Each test then creates its own store with
855
728
  its own dependencies (fakes, for example), with nothing global to set up or reset, and two
856
729
  stores can live side by side (tests running concurrently, or one store per request in
857
- server-side rendering). The store takes the `environment` (production, staging,
858
- testing...), a `configuration` factory (feature flags) and a `dependencies` factory. The
859
- factories get the store, so they can depend on the environment, and the configuration is
860
- created first, so the dependencies can read it:
730
+ server-side rendering).
861
731
 
862
732
  ```tsx
863
733
  const store = createStore<State>({
@@ -868,12 +738,6 @@ const store = createStore<State>({
868
738
  });
869
739
  ```
870
740
 
871
- In components, `useEnvironment()` and `useConfiguration()` return the environment and the
872
- configuration, and never re-render, since the values don't change. Components should
873
- usually not need the dependencies. The `errorObserver` gets the store, so it can read
874
- `store.environment`, for example to send the errors to a monitoring service only in
875
- production.
876
-
877
741
  In tests:
878
742
 
879
743
  ```tsx
@@ -906,64 +770,20 @@ store.dispatch(new InitAppAction());
906
770
 
907
771
  ## Server-side rendering
908
772
 
909
- Kiss works with server-side rendering out of the box: plain Node with `renderToString` or
910
- streaming, and Next.js with the app router or the pages router. The server renders the HTML
911
- from the store, the browser hydrates it with no mismatches, and from then on it's a normal
912
- Kiss app.
773
+ Kiss supports server-side rendering with Node and Next.js, including both the App Router
774
+ and the Pages Router. Load the data on the server, render the page, and let the browser
775
+ continue with the same state.
913
776
 
914
- On the server, create a store per request with `server: true`, load the data with the same
915
- actions the client uses, render, and dispose the store:
777
+ * **Reuse your actions.** The same actions can load data on the server and in the browser.
778
+ * **Keep the first render consistent.** Kiss keeps the initial browser state in sync with
779
+ the server-rendered HTML to avoid hydration mismatches.
780
+ * **Keep requests separate.** Each server request gets its own store and state.
781
+ * **Use streaming and server components.** Kiss works with React streaming and Next.js
782
+ Server Components.
916
783
 
917
- ```tsx
918
- const store = createStore<State>({ initialState: new State(), server: true });
919
- await store.dispatchAndWait(new LoadData());
920
- const html = renderToString(
921
- <StoreProvider store={store} serverState={store.state}>
922
- <App />
923
- </StoreProvider>
924
- );
925
- const transfer = JSON.stringify(store.state); // Goes in the HTML, for the browser.
926
- await store.dispose();
927
- ```
928
-
929
- In the browser, create the store with the state the server sent, and hydrate with the same
930
- `StoreProvider`. That's all the setup. What you get:
931
-
932
- - **No hydration mismatches.** While hydrating, the hooks render the state the server
933
- rendered, even if a persistor already restored a newer state in the browser. After
934
- hydration, the components catch up with the live state.
935
- - **The same actions on both sides.** A `LoadData` that polls, retries or debounces in the
936
- browser simply runs once in the server store, so a request leaves nothing running in Node.
937
- - **Next.js, both routers.** A server component (or `getServerSideProps`) loads the data, and
938
- a client component creates the store once and provides it. Each route gives its own data to
939
- the store with `StoreSlice`: the HTML shows it, and client-side navigation shows the new
940
- route's data in its very first render, with no empty or stale frame.
941
-
942
- ```tsx
943
- // app/users/[id]/page.tsx, a server component.
944
- export default async function UserPage({ params }) {
945
- const user = await fetchUser((await params).id);
946
- return <StoreSlice state={{ user }} key={user.id}><UserView /></StoreSlice>;
947
- }
948
- ```
949
-
950
- Mutations are ordinary Kiss actions, which call a server action or an API route, so you keep
951
- `useIsWaiting`, `useIsFailed`, retries and optimistic updates on top of them.
952
- - **Streaming.** `renderToPipeableStream` and `renderToReadableStream` work, Suspense
953
- boundaries included.
954
- - **Nothing half-loaded in the HTML.** On the server, `useIsWaiting` and `useIsFailed` are
955
- `false`, and `useSuspense` never suspends, so the HTML never shows a spinner or an error.
956
-
957
- Complete examples, each with a persistor in the browser and Playwright tests that check the
958
- server HTML, the hydration and the store:
959
- [Next.js app router](examples/nextjs-app-router),
960
- [Next.js pages router](examples/nextjs-pages-router),
961
- [Express with streaming](examples/ssr-express), and a
962
- [todo app with Next.js](examples/todo-app-nextjs) with a class-based state and the
963
- `ClassPersistor`. The details (serialization, the persistor, streaming, React Server
964
- Components) are in the
965
- [server-side rendering](https://kissforreact.org/react/miscellaneous/server-side-rendering)
966
- page of the docs.
784
+ See
785
+ the [server-side rendering docs](https://kissforreact.org/react/miscellaneous/server-side-rendering)
786
+ for setup and examples.
967
787
 
968
788
  &nbsp;
969
789
 
@@ -1016,12 +836,9 @@ const store = createStore<string>({
1016
836
  });
1017
837
  ```
1018
838
 
1019
- The `errorObserver` gets all errors thrown by your actions, and also the errors of the
1020
- persistor (with a `null` action). It returns the error to use: the same one, a different
1021
- one,
1022
- or `null` to swallow it. Then, a `UserException` is shown to the user in an error dialog,
1023
- and
1024
- any other error is thrown.
839
+ The `errorObserver` gets all errors thrown by your actions and persistor. It can log them,
840
+ swallow them, or return a `UserException` to show a message to the user in an error
841
+ dialog.
1025
842
 
1026
843
  For example, here we convert the `FirestoreError` errors thrown by Firebase into
1027
844
  `UserException` errors, which automatically show a message to the user. Other errors are
@@ -1039,28 +856,13 @@ errorObserver: ({ error, action }) => {
1039
856
  }
1040
857
  ```
1041
858
 
1042
- By default, Kiss logs what it does (for example, each dispatched action) to the console.
1043
- Use `logger` to send these messages somewhere else, or set it to `null` to turn logging
1044
- off.
1045
- With `null`, Kiss doesn't even build the log messages:
1046
-
1047
- ```tsx
1048
- const store = createStore<State>({
1049
- initialState: new State(),
1050
- logger: (obj) => myLogger.info(obj), // Or `null` to turn logging off.
1051
- logStateChanges: true, // Also log every state change.
1052
- });
1053
- ```
1054
-
1055
859
  &nbsp;
1056
860
 
1057
861
  ## Advanced action configuration
1058
862
 
1059
863
  The team lead can create a base action class that all actions will extend, and add some
1060
- common
1061
- functionality to it. For example, the base class can provide getter shortcuts to important
1062
- parts of the state
1063
- and helper methods to find information.
864
+ common functionality to it. For example, the base class can provide getter shortcuts to
865
+ important parts of the state and helper methods to find information.
1064
866
 
1065
867
  ```tsx
1066
868
  class State {
@@ -9,7 +9,7 @@ const StoreException_1 = require("./StoreException");
9
9
  * Use it like this:
10
10
  *
11
11
  * ```ts
12
- * const store = createStore<AppState>({
12
+ * const store = createStore<State>({
13
13
  * initialState: initialState,
14
14
  * persistor: new MyPersistor(),
15
15
  * });
@@ -8,8 +8,8 @@ const utils_1 = require("./utils");
8
8
  * Use it like this:
9
9
  *
10
10
  * ```ts
11
- * const store = createStore<AppState>({
12
- * initialState: AppState.initialState(),
11
+ * const store = createStore<State>({
12
+ * initialState: State.initialState(),
13
13
  * persistor: new MyPersistor(),
14
14
  * });
15
15
  *
@@ -97,9 +97,9 @@ exports.Persistor = Persistor;
97
97
  * Use it like this:
98
98
  *
99
99
  * ```ts
100
- * const store = createStore<AppState>({
100
+ * const store = createStore<State>({
101
101
  * ...otherOptions,
102
- * persistor: new PersistorPrinterDecorator<AppState>(persistor),
102
+ * persistor: new PersistorPrinterDecorator<State>(persistor),
103
103
  * });
104
104
  * ```
105
105
  */
package/lib/cjs/Store.js CHANGED
@@ -823,8 +823,8 @@ class Store {
823
823
  * the store to be ready before dispatching any actions:
824
824
  *
825
825
  * ```ts
826
- * const store = createStore<AppState>({
827
- * initialState: AppState.initialState(),
826
+ * const store = createStore<State>({
827
+ * initialState: State.initialState(),
828
828
  * persistor: new MyPersistor(),
829
829
  * });
830
830
  *
@@ -3566,7 +3566,7 @@ class Store {
3566
3566
  *
3567
3567
  * ```ts
3568
3568
  * try {
3569
- * await store.logOut({ initialState: AppState.initialState() });
3569
+ * await store.logOut({ initialState: State.initialState() });
3570
3570
  * goToLoginScreen();
3571
3571
  * } catch (error) {
3572
3572
  * goToLogOutFailedScreen(error);
package/lib/cjs/Wait.js CHANGED
@@ -122,8 +122,8 @@
122
122
  // * This is useful when you want to wait for an Action to finish. For example:
123
123
  // *
124
124
  // * ```
125
- // * class MyAction extends KissAction<AppState> {
126
- // * Future<AppState?> reduce() async {
125
+ // * class MyAction extends KissAction<State> {
126
+ // * Future<State?> reduce() async {
127
127
  // * await doSomething();
128
128
  // * return null;
129
129
  // * }
@@ -185,9 +185,9 @@
185
185
  // * `copyWith` method that copies this field as a named parameter. For example:
186
186
  // *
187
187
  // * ```
188
- // * class AppState {
188
+ // * class State {
189
189
  // * wait: Wait;
190
- // * copy({wait :Wait}) :AppState => AppState({wait: wait});
190
+ // * copy({wait :Wait}) :State => State({wait: wait});
191
191
  // * }
192
192
  // * ```
193
193
  // */
package/lib/cjs/server.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Pages = exports.LoadPages = exports.Poll = exports.ServerPush = exports.OptimisticSyncWithPush = exports.OptimisticSync = exports.OptimisticCommand = exports.UserException = exports.TimeoutException = exports.AbortDispatchException = exports.StoreException = exports.EvtState = exports.Evt = exports.StoreSlice = exports.StoreProvider = exports.createStore = exports.Store = exports.ActionStatus = exports.UserExceptionAction = exports.MergeServerStateAction = exports.KissAction = exports.ProcessPersistence = exports.ClassPersistor = exports.UpdateStateAction = exports.PersistAction = exports.PersistException = exports.PersistorDummy = exports.PersistorPrinterDecorator = exports.Persistor = void 0;
3
+ exports.Pages = exports.LoadPages = exports.Poll = exports.ServerPush = exports.OptimisticSyncWithPush = exports.OptimisticSync = exports.OptimisticCommand = exports.UserException = exports.TimeoutException = exports.AbortDispatchException = exports.StoreException = exports.EvtState = exports.Evt = exports.StoreSlice = exports.StoreProvider = exports.createStore = exports.Store = exports.ActionStatus = exports.UserExceptionAction = exports.MergeServerStateAction = exports.KissAction = exports.ProcessPersistence = exports.ClassPersistor = exports.UpdateStateAction = exports.PersistAction = exports.PersistException = exports.PersistorDummy = exports.PersistorPrinterDecorator = exports.Persistor = exports.stateClass = void 0;
4
4
  // The entry point of the package under the `react-server` export condition (see package.json),
5
5
  // which React Server Components bundlers (like the Next.js app router) use for the modules of
6
6
  // server components. It has everything of the main entry point except the hooks, which need
@@ -13,6 +13,8 @@ exports.Pages = exports.LoadPages = exports.Poll = exports.ServerPush = exports.
13
13
  //
14
14
  // Keep it in sync with `index.ts`: `__tests__/bdd.ServerEntryPoint.test.ts` checks that it
15
15
  // exports everything of `index.ts` that is not a hook.
16
+ var stateClass_1 = require("./stateClass");
17
+ Object.defineProperty(exports, "stateClass", { enumerable: true, get: function () { return stateClass_1.stateClass; } });
16
18
  const Persistor_1 = require("./Persistor");
17
19
  Object.defineProperty(exports, "PersistAction", { enumerable: true, get: function () { return Persistor_1.PersistAction; } });
18
20
  Object.defineProperty(exports, "PersistException", { enumerable: true, get: function () { return Persistor_1.PersistException; } });
@@ -4,7 +4,7 @@ import { Persistor } from './Persistor';
4
4
  * Use it like this:
5
5
  *
6
6
  * ```ts
7
- * const store = createStore<AppState>({
7
+ * const store = createStore<State>({
8
8
  * initialState: initialState,
9
9
  * persistor: new MyPersistor(),
10
10
  * });
@@ -3,8 +3,8 @@ import { KissAction } from './KissAction';
3
3
  * Use it like this:
4
4
  *
5
5
  * ```ts
6
- * const store = createStore<AppState>({
7
- * initialState: AppState.initialState(),
6
+ * const store = createStore<State>({
7
+ * initialState: State.initialState(),
8
8
  * persistor: new MyPersistor(),
9
9
  * });
10
10
  *
@@ -45,7 +45,7 @@ export declare abstract class Persistor<St> {
45
45
  * can report an error with `addError` instead of throwing. For example:
46
46
  *
47
47
  * ```ts
48
- * async readState(): Promise<AppState | null> {
48
+ * async readState(): Promise<State | null> {
49
49
  * try {
50
50
  * return await this.read();
51
51
  * } catch (error) {
@@ -143,9 +143,9 @@ export declare abstract class Persistor<St> {
143
143
  * Use it like this:
144
144
  *
145
145
  * ```ts
146
- * const store = createStore<AppState>({
146
+ * const store = createStore<State>({
147
147
  * ...otherOptions,
148
- * persistor: new PersistorPrinterDecorator<AppState>(persistor),
148
+ * persistor: new PersistorPrinterDecorator<State>(persistor),
149
149
  * });
150
150
  * ```
151
151
  */
@@ -918,8 +918,8 @@ export declare class Store<St> {
918
918
  * the store to be ready before dispatching any actions:
919
919
  *
920
920
  * ```ts
921
- * const store = createStore<AppState>({
922
- * initialState: AppState.initialState(),
921
+ * const store = createStore<State>({
922
+ * initialState: State.initialState(),
923
923
  * persistor: new MyPersistor(),
924
924
  * });
925
925
  *
@@ -1760,7 +1760,7 @@ export declare class Store<St> {
1760
1760
  *
1761
1761
  * ```ts
1762
1762
  * try {
1763
- * await store.logOut({ initialState: AppState.initialState() });
1763
+ * await store.logOut({ initialState: State.initialState() });
1764
1764
  * goToLoginScreen();
1765
1765
  * } catch (error) {
1766
1766
  * goToLogOutFailedScreen(error);
@@ -1,3 +1,4 @@
1
+ export { stateClass } from './stateClass';
1
2
  import { PersistAction, PersistException, Persistor, PersistorDummy, PersistorPrinterDecorator } from './Persistor';
2
3
  import { ClassPersistor } from './ClassPersistor';
3
4
  import { ProcessPersistence } from './ProcessPersistence';
@@ -1 +1 @@
1
- {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../../src/server.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,SAAS,EAAE,cAAc,EAAE,yBAAyB,EAAG,MAAM,aAAa,CAAC;AACrH,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EACL,YAAY,EACZ,YAAY,EACZ,kBAAkB,EAClB,iBAAiB,EACjB,cAAc,EACd,sBAAsB,EACtB,YAAY,EACZ,UAAU,EACV,UAAU,EACV,sBAAsB,EACtB,IAAI,EACJ,mBAAmB,EACnB,YAAY,EACZ,KAAK,EACL,YAAY,EACZ,2BAA2B,EAC3B,WAAW,EACX,iBAAiB,EACjB,aAAa,EACd,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC3E,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,iBAAiB,EAAE,WAAW,EAAE,aAAa,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC7H,OAAO,EAAE,aAA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AU,EAAE,YAAY,EAAE,KAAK,EAAE,YAAY,EAAE,2BAA2B,EACrI,IAAI,EACJ,SAAS,EAAE,KAAK,EAAE,WAAW,EAAE,aAAa,GAC7C,CAAC"}
@@ -6,7 +6,7 @@ import { StoreException } from './StoreException.mjs';
6
6
  * Use it like this:
7
7
  *
8
8
  * ```ts
9
- * const store = createStore<AppState>({
9
+ * const store = createStore<State>({
10
10
  * initialState: initialState,
11
11
  * persistor: new MyPersistor(),
12
12
  * });
@@ -5,8 +5,8 @@ import { describeValue } from './utils.mjs';
5
5
  * Use it like this:
6
6
  *
7
7
  * ```ts
8
- * const store = createStore<AppState>({
9
- * initialState: AppState.initialState(),
8
+ * const store = createStore<State>({
9
+ * initialState: State.initialState(),
10
10
  * persistor: new MyPersistor(),
11
11
  * });
12
12
  *
@@ -91,9 +91,9 @@ export class Persistor {
91
91
  * Use it like this:
92
92
  *
93
93
  * ```ts
94
- * const store = createStore<AppState>({
94
+ * const store = createStore<State>({
95
95
  * ...otherOptions,
96
- * persistor: new PersistorPrinterDecorator<AppState>(persistor),
96
+ * persistor: new PersistorPrinterDecorator<State>(persistor),
97
97
  * });
98
98
  * ```
99
99
  */
package/lib/esm/Store.mjs CHANGED
@@ -940,8 +940,8 @@ export class Store {
940
940
  * the store to be ready before dispatching any actions:
941
941
  *
942
942
  * ```ts
943
- * const store = createStore<AppState>({
944
- * initialState: AppState.initialState(),
943
+ * const store = createStore<State>({
944
+ * initialState: State.initialState(),
945
945
  * persistor: new MyPersistor(),
946
946
  * });
947
947
  *
@@ -3693,7 +3693,7 @@ export class Store {
3693
3693
  *
3694
3694
  * ```ts
3695
3695
  * try {
3696
- * await store.logOut({ initialState: AppState.initialState() });
3696
+ * await store.logOut({ initialState: State.initialState() });
3697
3697
  * goToLoginScreen();
3698
3698
  * } catch (error) {
3699
3699
  * goToLogOutFailedScreen(error);
package/lib/esm/Wait.mjs CHANGED
@@ -122,8 +122,8 @@
122
122
  // * This is useful when you want to wait for an Action to finish. For example:
123
123
  // *
124
124
  // * ```
125
- // * class MyAction extends KissAction<AppState> {
126
- // * Future<AppState?> reduce() async {
125
+ // * class MyAction extends KissAction<State> {
126
+ // * Future<State?> reduce() async {
127
127
  // * await doSomething();
128
128
  // * return null;
129
129
  // * }
@@ -185,9 +185,9 @@
185
185
  // * `copyWith` method that copies this field as a named parameter. For example:
186
186
  // *
187
187
  // * ```
188
- // * class AppState {
188
+ // * class State {
189
189
  // * wait: Wait;
190
- // * copy({wait :Wait}) :AppState => AppState({wait: wait});
190
+ // * copy({wait :Wait}) :State => State({wait: wait});
191
191
  // * }
192
192
  // * ```
193
193
  // */
@@ -10,6 +10,7 @@
10
10
  //
11
11
  // Keep it in sync with `index.ts`: `__tests__/bdd.ServerEntryPoint.test.ts` checks that it
12
12
  // exports everything of `index.ts` that is not a hook.
13
+ export { stateClass } from './stateClass.mjs';
13
14
  import { PersistAction, PersistException, Persistor, PersistorDummy, PersistorPrinterDecorator, } from './Persistor.mjs';
14
15
  import { ClassPersistor } from './ClassPersistor.mjs';
15
16
  import { ProcessPersistence } from './ProcessPersistence.mjs';
@@ -4,7 +4,7 @@ import { Persistor } from './Persistor';
4
4
  * Use it like this:
5
5
  *
6
6
  * ```ts
7
- * const store = createStore<AppState>({
7
+ * const store = createStore<State>({
8
8
  * initialState: initialState,
9
9
  * persistor: new MyPersistor(),
10
10
  * });
@@ -3,8 +3,8 @@ import { KissAction } from './KissAction';
3
3
  * Use it like this:
4
4
  *
5
5
  * ```ts
6
- * const store = createStore<AppState>({
7
- * initialState: AppState.initialState(),
6
+ * const store = createStore<State>({
7
+ * initialState: State.initialState(),
8
8
  * persistor: new MyPersistor(),
9
9
  * });
10
10
  *
@@ -45,7 +45,7 @@ export declare abstract class Persistor<St> {
45
45
  * can report an error with `addError` instead of throwing. For example:
46
46
  *
47
47
  * ```ts
48
- * async readState(): Promise<AppState | null> {
48
+ * async readState(): Promise<State | null> {
49
49
  * try {
50
50
  * return await this.read();
51
51
  * } catch (error) {
@@ -143,9 +143,9 @@ export declare abstract class Persistor<St> {
143
143
  * Use it like this:
144
144
  *
145
145
  * ```ts
146
- * const store = createStore<AppState>({
146
+ * const store = createStore<State>({
147
147
  * ...otherOptions,
148
- * persistor: new PersistorPrinterDecorator<AppState>(persistor),
148
+ * persistor: new PersistorPrinterDecorator<State>(persistor),
149
149
  * });
150
150
  * ```
151
151
  */
@@ -918,8 +918,8 @@ export declare class Store<St> {
918
918
  * the store to be ready before dispatching any actions:
919
919
  *
920
920
  * ```ts
921
- * const store = createStore<AppState>({
922
- * initialState: AppState.initialState(),
921
+ * const store = createStore<State>({
922
+ * initialState: State.initialState(),
923
923
  * persistor: new MyPersistor(),
924
924
  * });
925
925
  *
@@ -1760,7 +1760,7 @@ export declare class Store<St> {
1760
1760
  *
1761
1761
  * ```ts
1762
1762
  * try {
1763
- * await store.logOut({ initialState: AppState.initialState() });
1763
+ * await store.logOut({ initialState: State.initialState() });
1764
1764
  * goToLoginScreen();
1765
1765
  * } catch (error) {
1766
1766
  * goToLogOutFailedScreen(error);
@@ -1,3 +1,4 @@
1
+ export { stateClass } from './stateClass';
1
2
  import { PersistAction, PersistException, Persistor, PersistorDummy, PersistorPrinterDecorator } from './Persistor';
2
3
  import { ClassPersistor } from './ClassPersistor';
3
4
  import { ProcessPersistence } from './ProcessPersistence';
@@ -1 +1 @@
1
- {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../../src/server.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,SAAS,EAAE,cAAc,EAAE,yBAAyB,EAAG,MAAM,aAAa,CAAC;AACrH,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EACL,YAAY,EACZ,YAAY,EACZ,kBAAkB,EAClB,iBAAiB,EACjB,cAAc,EACd,sBAAsB,EACtB,YAAY,EACZ,UAAU,EACV,UAAU,EAC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B,EAClB,UAAU,EACV,sBAAsB,EACtB,mBAAmB,EACnB,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,YAAY,EAAE,kBAAkB,EAAE,aAAa,EACxF,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,aAAa,EAAE,cAAc,EAAE,eAAe,EAAE,iBAAiB,EAClG,aAAa,EAAE,kBAAkB,EAAE,UAAU,EAAE,eAAe,EAC9D,GAAG,EAAE,QAAQ,EACb,cAAc,EACd,sBAAsB,EACtB,gBAAgB,EAChB,aAAa,EACb,iBAAiB,EAAE,cAAc,EAAE,sBAAsB,EAAE,UAAU,EAAE,YAAY,EAAE,KAAK,EAAE,YAAY,EAAE,2BAA2B,EACrI,IAAI,EACJ,SAAS,EAAE,KAAK,EAAE,WAAW,EAAE,aAAa,GAC7C,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kiss-for-react",
3
- "version": "2.0.7",
3
+ "version": "2.0.9",
4
4
  "description": "Kiss state management, launched May 2025. Visit kissforreact.org for detailed docs and plenty of examples.",
5
5
  "exports": {
6
6
  ".": {