kiss-for-react 1.1.0 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (155) hide show
  1. package/README.md +699 -156
  2. package/lib/cjs/ClassPersistor.js +177 -112
  3. package/lib/cjs/Esserializer/DeserializationOptions.js +4 -4
  4. package/lib/cjs/Esserializer/SerializeOptions.js +4 -4
  5. package/lib/cjs/Esserializer/builtins.js +258 -0
  6. package/lib/cjs/Esserializer/constant.js +39 -131
  7. package/lib/cjs/Esserializer/deserializer.js +226 -313
  8. package/lib/cjs/Esserializer/general.js +91 -39
  9. package/lib/cjs/Esserializer/index.js +47 -43
  10. package/lib/cjs/Esserializer/serializer.js +168 -133
  11. package/lib/cjs/Evt.js +132 -0
  12. package/lib/cjs/Hooks.js +1472 -969
  13. package/lib/cjs/KissAction.js +4635 -1333
  14. package/lib/cjs/LoadPages.js +336 -0
  15. package/lib/cjs/Persistor.js +189 -120
  16. package/lib/cjs/ProcessPersistence.js +579 -262
  17. package/lib/cjs/Store.js +4278 -1534
  18. package/lib/cjs/StoreException.js +162 -75
  19. package/lib/cjs/StoreProvider.js +88 -0
  20. package/lib/cjs/UserException.js +212 -218
  21. package/lib/cjs/Wait.js +309 -309
  22. package/lib/cjs/index.js +69 -42
  23. package/lib/cjs/server.js +54 -0
  24. package/lib/cjs/types/ClassPersistor.d.ts +143 -112
  25. package/lib/cjs/types/ClassPersistor.d.ts.map +1 -1
  26. package/lib/cjs/types/Esserializer/DeserializationOptions.d.ts +13 -6
  27. package/lib/cjs/types/Esserializer/DeserializationOptions.d.ts.map +1 -1
  28. package/lib/cjs/types/Esserializer/SerializeOptions.d.ts +11 -5
  29. package/lib/cjs/types/Esserializer/SerializeOptions.d.ts.map +1 -1
  30. package/lib/cjs/types/Esserializer/builtins.d.ts +36 -0
  31. package/lib/cjs/types/Esserializer/builtins.d.ts.map +1 -0
  32. package/lib/cjs/types/Esserializer/constant.d.ts +25 -49
  33. package/lib/cjs/types/Esserializer/constant.d.ts.map +1 -1
  34. package/lib/cjs/types/Esserializer/deserializer.d.ts +27 -17
  35. package/lib/cjs/types/Esserializer/deserializer.d.ts.map +1 -1
  36. package/lib/cjs/types/Esserializer/general.d.ts +28 -4
  37. package/lib/cjs/types/Esserializer/general.d.ts.map +1 -1
  38. package/lib/cjs/types/Esserializer/index.d.ts +33 -29
  39. package/lib/cjs/types/Esserializer/index.d.ts.map +1 -1
  40. package/lib/cjs/types/Esserializer/serializer.d.ts +14 -3
  41. package/lib/cjs/types/Esserializer/serializer.d.ts.map +1 -1
  42. package/lib/cjs/types/Evt.d.ts +124 -0
  43. package/lib/cjs/types/Evt.d.ts.map +1 -0
  44. package/lib/cjs/types/Hooks.d.ts +1174 -837
  45. package/lib/cjs/types/Hooks.d.ts.map +1 -1
  46. package/lib/cjs/types/KissAction.d.ts +5199 -1398
  47. package/lib/cjs/types/KissAction.d.ts.map +1 -1
  48. package/lib/cjs/types/LoadPages.d.ts +287 -0
  49. package/lib/cjs/types/LoadPages.d.ts.map +1 -0
  50. package/lib/cjs/types/Persistor.d.ts +187 -118
  51. package/lib/cjs/types/Persistor.d.ts.map +1 -1
  52. package/lib/cjs/types/ProcessPersistence.d.ts +197 -99
  53. package/lib/cjs/types/ProcessPersistence.d.ts.map +1 -1
  54. package/lib/cjs/types/Store.d.ts +2253 -1042
  55. package/lib/cjs/types/Store.d.ts.map +1 -1
  56. package/lib/cjs/types/StoreException.d.ts +97 -28
  57. package/lib/cjs/types/StoreException.d.ts.map +1 -1
  58. package/lib/cjs/types/StoreProvider.d.ts +80 -0
  59. package/lib/cjs/types/StoreProvider.d.ts.map +1 -0
  60. package/lib/cjs/types/UserException.d.ts +178 -169
  61. package/lib/cjs/types/UserException.d.ts.map +1 -1
  62. package/lib/cjs/types/index.d.ts +12 -9
  63. package/lib/cjs/types/index.d.ts.map +1 -1
  64. package/lib/cjs/types/server.d.ts +12 -0
  65. package/lib/cjs/types/server.d.ts.map +1 -0
  66. package/lib/cjs/types/utils.d.ts +15 -1
  67. package/lib/cjs/types/utils.d.ts.map +1 -1
  68. package/lib/cjs/utils.js +45 -7
  69. package/lib/esm/ClassPersistor.mjs +177 -0
  70. package/lib/esm/Esserializer/{DeserializationOptions.js → DeserializationOptions.mjs} +3 -3
  71. package/lib/esm/Esserializer/{SerializeOptions.js → SerializeOptions.mjs} +3 -3
  72. package/lib/esm/Esserializer/builtins.mjs +254 -0
  73. package/lib/esm/Esserializer/constant.mjs +28 -0
  74. package/lib/esm/Esserializer/deserializer.mjs +221 -0
  75. package/lib/esm/Esserializer/general.mjs +81 -0
  76. package/lib/esm/Esserializer/index.mjs +43 -0
  77. package/lib/esm/Esserializer/serializer.mjs +164 -0
  78. package/lib/esm/Evt.mjs +151 -0
  79. package/lib/esm/Hooks.mjs +1446 -0
  80. package/lib/esm/KissAction.mjs +4689 -0
  81. package/lib/esm/LoadPages.mjs +340 -0
  82. package/lib/esm/Persistor.mjs +180 -0
  83. package/lib/esm/ProcessPersistence.mjs +581 -0
  84. package/lib/esm/Store.mjs +4400 -0
  85. package/lib/esm/StoreException.mjs +153 -0
  86. package/lib/esm/StoreProvider.mjs +80 -0
  87. package/lib/esm/{UserException.js → UserException.mjs} +240 -246
  88. package/lib/esm/{Wait.js → Wait.mjs} +309 -309
  89. package/lib/esm/index.mjs +12 -9
  90. package/lib/esm/server.mjs +23 -0
  91. package/lib/esm/types/ClassPersistor.d.ts +143 -112
  92. package/lib/esm/types/ClassPersistor.d.ts.map +1 -1
  93. package/lib/esm/types/Esserializer/DeserializationOptions.d.ts +13 -6
  94. package/lib/esm/types/Esserializer/DeserializationOptions.d.ts.map +1 -1
  95. package/lib/esm/types/Esserializer/SerializeOptions.d.ts +11 -5
  96. package/lib/esm/types/Esserializer/SerializeOptions.d.ts.map +1 -1
  97. package/lib/esm/types/Esserializer/builtins.d.ts +36 -0
  98. package/lib/esm/types/Esserializer/builtins.d.ts.map +1 -0
  99. package/lib/esm/types/Esserializer/constant.d.ts +25 -49
  100. package/lib/esm/types/Esserializer/constant.d.ts.map +1 -1
  101. package/lib/esm/types/Esserializer/deserializer.d.ts +27 -17
  102. package/lib/esm/types/Esserializer/deserializer.d.ts.map +1 -1
  103. package/lib/esm/types/Esserializer/general.d.ts +28 -4
  104. package/lib/esm/types/Esserializer/general.d.ts.map +1 -1
  105. package/lib/esm/types/Esserializer/index.d.ts +33 -29
  106. package/lib/esm/types/Esserializer/index.d.ts.map +1 -1
  107. package/lib/esm/types/Esserializer/serializer.d.ts +14 -3
  108. package/lib/esm/types/Esserializer/serializer.d.ts.map +1 -1
  109. package/lib/esm/types/Evt.d.ts +124 -0
  110. package/lib/esm/types/Evt.d.ts.map +1 -0
  111. package/lib/esm/types/Hooks.d.ts +1174 -837
  112. package/lib/esm/types/Hooks.d.ts.map +1 -1
  113. package/lib/esm/types/KissAction.d.ts +5199 -1398
  114. package/lib/esm/types/KissAction.d.ts.map +1 -1
  115. package/lib/esm/types/LoadPages.d.ts +287 -0
  116. package/lib/esm/types/LoadPages.d.ts.map +1 -0
  117. package/lib/esm/types/Persistor.d.ts +187 -118
  118. package/lib/esm/types/Persistor.d.ts.map +1 -1
  119. package/lib/esm/types/ProcessPersistence.d.ts +197 -99
  120. package/lib/esm/types/ProcessPersistence.d.ts.map +1 -1
  121. package/lib/esm/types/Store.d.ts +2253 -1042
  122. package/lib/esm/types/Store.d.ts.map +1 -1
  123. package/lib/esm/types/StoreException.d.ts +97 -28
  124. package/lib/esm/types/StoreException.d.ts.map +1 -1
  125. package/lib/esm/types/StoreProvider.d.ts +80 -0
  126. package/lib/esm/types/StoreProvider.d.ts.map +1 -0
  127. package/lib/esm/types/UserException.d.ts +178 -169
  128. package/lib/esm/types/UserException.d.ts.map +1 -1
  129. package/lib/esm/types/index.d.ts +12 -9
  130. package/lib/esm/types/index.d.ts.map +1 -1
  131. package/lib/esm/types/server.d.ts +12 -0
  132. package/lib/esm/types/server.d.ts.map +1 -0
  133. package/lib/esm/types/utils.d.ts +15 -1
  134. package/lib/esm/types/utils.d.ts.map +1 -1
  135. package/lib/esm/utils.mjs +38 -0
  136. package/package.json +54 -30
  137. package/lib/cjs/UnmodifiableSetView.js +0 -53
  138. package/lib/cjs/types/UnmodifiableSetView.d.ts +0 -24
  139. package/lib/cjs/types/UnmodifiableSetView.d.ts.map +0 -1
  140. package/lib/esm/ClassPersistor.js +0 -112
  141. package/lib/esm/Esserializer/constant.js +0 -81
  142. package/lib/esm/Esserializer/deserializer.js +0 -307
  143. package/lib/esm/Esserializer/general.js +0 -34
  144. package/lib/esm/Esserializer/index.js +0 -39
  145. package/lib/esm/Esserializer/serializer.js +0 -130
  146. package/lib/esm/Hooks.js +0 -955
  147. package/lib/esm/KissAction.js +0 -1459
  148. package/lib/esm/Persistor.js +0 -113
  149. package/lib/esm/ProcessPersistence.js +0 -262
  150. package/lib/esm/Store.js +0 -1606
  151. package/lib/esm/StoreException.js +0 -69
  152. package/lib/esm/UnmodifiableSetView.js +0 -50
  153. package/lib/esm/types/UnmodifiableSetView.d.ts +0 -24
  154. package/lib/esm/types/UnmodifiableSetView.d.ts.map +0 -1
  155. package/lib/esm/utils.js +0 -3
@@ -1,10 +1,13 @@
1
- import { PersistAction, PersistException, Persistor, PersistorDummy, PersistorPrinterDecorator } from './Persistor';
2
- import { ClassPersistor } from './ClassPersistor';
3
- import { ProcessPersistence } from './ProcessPersistence';
4
- import { ActionStatus, AsyncReducer, AsyncReducerResult, OptimisticUpdate, KissAction, UserExceptionAction, ReduxReducer, Retry, RetryOptions, SyncReducer, UpdateStateAction } from './KissAction';
5
- import { Store, createStore, ShowUserException, StoreProvider } from './Store';
6
- import { useAllState, useClearExceptionFor, useDispatch, useDispatchAll, useDispatchAndWait, useDispatchAndWaitAll, useDispatcher, useDispatchSync, useExceptionFor, useIsFailed, useIsWaiting, useSelect, useSelector, useStore } from './Hooks';
7
- import { StoreException } from './StoreException';
8
- import { UserException } from './UserException';
9
- export { Persistor, PersistorPrinterDecorator, PersistorDummy, PersistException, PersistAction, UpdateStateAction, ClassPersistor, ProcessPersistence, KissAction, UserExceptionAction, ActionStatus, ReduxReducer, SyncReducer, AsyncReducer, AsyncReducerResult, Store, createStore, useStore, useAllState, useSelect, useSelector, StoreProvider, ShowUserException, useIsWaiting, useIsFailed, useExceptionFor, useClearExceptionFor, useDispatch, useDispatchAll, useDispatchAndWait, useDispatchAndWaitAll, useDispatchSync, useDispatcher, StoreException, UserException, OptimisticUpdate, Retry, RetryOptions, };
1
+ import { PersistAction, PersistException, Persistor, PersistorDummy, PersistorPrinterDecorator } from './Persistor';
2
+ import { ClassPersistor } from './ClassPersistor';
3
+ import { ProcessPersistence } from './ProcessPersistence';
4
+ import { ActionStatus, AsyncReducer, AsyncReducerResult, OptimisticCommand, OptimisticSync, OptimisticSyncWithPush, PushMetadata, ServerPush, KissAction, MergeServerStateAction, Poll, UserExceptionAction, ReduxReducer, Retry, RetryOptions, UnlimitedRetryCheckInternet, SyncReducer, UpdateStateAction, StatusOptions } from './KissAction';
5
+ import { LoadPages, PageDirection, Pages, PagesToLoad } from './LoadPages';
6
+ import { Store, createStore, ShowUserException, PropDispose, PropPredicate, SetPropOptions, AppSignalSource } from './Store';
7
+ import { StoreProvider, StoreProviderProps, StoreSlice, StoreSliceProps } from './StoreProvider';
8
+ import { useAllState, useIsFocused, useIsOnline, useClearExceptionFor, useConfiguration, useDispatch, useDispatchAll, useDispatchAndWait, useDispatchAndWaitAll, useDispatcher, useDispatchSync, useDispatchWhen, useEnvironment, useEvent, useExceptionFor, useIsFailed, useIsStoreReady, useIsWaiting, useLayoutEvent, useObject, useSelect, useSelector, useStore, useStoreEffect, UseStoreEffectOptions, useSuspense, SuspenseOptions } from './Hooks';
9
+ import { AbortDispatchException, StoreException, TimeoutException } from './StoreException';
10
+ import { Evt, EvtState } from './Evt';
11
+ import { UserException } from './UserException';
12
+ export { Persistor, PersistorPrinterDecorator, PersistorDummy, PersistException, PersistAction, UpdateStateAction, ClassPersistor, ProcessPersistence, KissAction, MergeServerStateAction, UserExceptionAction, ActionStatus, ReduxReducer, SyncReducer, AsyncReducer, AsyncReducerResult, StatusOptions, Store, createStore, PropDispose, PropPredicate, SetPropOptions, AppSignalSource, useStore, useStoreEffect, UseStoreEffectOptions, useAllState, useSelect, useSelector, useObject, StoreProvider, StoreProviderProps, StoreSlice, StoreSliceProps, ShowUserException, useIsStoreReady, useIsWaiting, useIsFailed, useExceptionFor, useClearExceptionFor, useSuspense, SuspenseOptions, useIsFocused, useIsOnline, useEnvironment, useConfiguration, Evt, EvtState, useEvent, useLayoutEvent, useDispatch, useDispatchAll, useDispatchAndWait, useDispatchAndWaitAll, useDispatchSync, useDispatchWhen, useDispatcher, StoreException, AbortDispatchException, TimeoutException, UserException, OptimisticCommand, OptimisticSync, OptimisticSyncWithPush, ServerPush, PushMetadata, Retry, RetryOptions, UnlimitedRetryCheckInternet, Poll, LoadPages, Pages, PagesToLoad, PageDirection, };
10
13
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,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,gBAAgB,EAChB,UAAU,EACV,mBAAmB,EACnB,YAAY,EACZ,KAAK,EACL,YAAY,EACZ,WAAW,EACX,iBAAiB,EAClB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC/E,OAAO,EACL,WAAW,EACX,oBAAoB,EACpB,WAAW,EACX,cAAc,EACd,kBAAkB,EAClB,qBAAqB,EACrB,aAAa,EACb,eAAe,EACf,eAAe,EACf,WAAW,EACX,YAAY,EACZ,SAAS,EACT,WAAW,EACX,QAAQ,EACT,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,OAAO,EACL,SAAS,EAAE,yBAAyB,EAAE,cAAc,EAAE,gBAAgB,EAAE,aAAa,EAAE,iBAAiB,EACxG,cAAc,EACd,kBAAkB,EAClB,UAAU,EACV,mBAAmB,EACnB,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,YAAY,EAAE,kBAAkB,EACzE,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,WAAW,EAAE,SAAS,EAAE,WAAW,EAAE,aAAa,EAAE,iBAAiB,EACnG,YAAY,EAAE,WAAW,EAAE,eAAe,EAAE,oBAAoB,EAChE,WAAW,EAAE,cAAc,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,eAAe,EAAE,aAAa,EACtG,cAAc,EACd,aAAa,EACb,gBAAgB,EAAE,KAAK,EAAE,YAAY,GACtC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,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,aAAa,EAAE,kBAAkB,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACjG,OAAO,EACL,WAAW,EACX,YAAY,EACZ,WAAW,EACX,oBAAoB,EACpB,gBAAgB,EAChB,WAAW,EACX,cAAc,EACd,kBAAkB,EAClB,qBAAqB,EACrB,aAAa,EACb,eAAe,EACf,eAAe,EACf,cAAc,EACd,QAAQ,EACR,eAAe,EACf,WAAW,EACX,eAAe,EACf,YAAY,EACZ,cAAc,EACd,SAAS,EACT,SAAS,EACT,WAAW,EACX,QAAQ,EACR,cAAc,EACd,qBAAqB,EACrB,WAAW,EACX,eAAe,EAChB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,sBAAsB,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAC5F,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,OAAO,EACL,SAAS,EAAE,yBAAyB,EAAE,cAAc,EAAE,gBAAgB,EAAE,aAAa,EAAE,iBAAiB,EACxG,cAAc,EACd,kBAAkB,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,QAAQ,EAAE,cAAc,EAAE,qBAAqB,EAAE,WAAW,EAAE,SAAS,EAAE,WAAW,EAAE,SAAS,EAAE,aAAa,EAAE,kBAAkB,EAAE,UAAU,EAAE,eAAe,EAAE,iBAAiB,EACnQ,eAAe,EAAE,YAAY,EAAE,WAAW,EAAE,eAAe,EAAE,oBAAoB,EAAE,WAAW,EAAE,eAAe,EAAE,YAAY,EAAE,WAAW,EAC1I,cAAc,EAAE,gBAAgB,EAChC,GAAG,EAAE,QAAQ,EAAE,QAAQ,EAAE,cAAc,EACvC,WAAW,EAAE,cAAc,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,eAAe,EAAE,eAAe,EAAE,aAAa,EACvH,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"}
@@ -0,0 +1,12 @@
1
+ import { PersistAction, PersistException, Persistor, PersistorDummy, PersistorPrinterDecorator } from './Persistor';
2
+ import { ClassPersistor } from './ClassPersistor';
3
+ import { ProcessPersistence } from './ProcessPersistence';
4
+ import { ActionStatus, AsyncReducer, AsyncReducerResult, OptimisticCommand, OptimisticSync, OptimisticSyncWithPush, PushMetadata, ServerPush, KissAction, MergeServerStateAction, Poll, UserExceptionAction, ReduxReducer, Retry, RetryOptions, UnlimitedRetryCheckInternet, SyncReducer, UpdateStateAction, StatusOptions } from './KissAction';
5
+ import { LoadPages, PageDirection, Pages, PagesToLoad } from './LoadPages';
6
+ import { Store, createStore, ShowUserException, PropDispose, PropPredicate, SetPropOptions, AppSignalSource } from './Store';
7
+ import { StoreProvider, StoreProviderProps, StoreSlice, StoreSliceProps } from './StoreProvider';
8
+ import { AbortDispatchException, StoreException, TimeoutException } from './StoreException';
9
+ import { Evt, EvtState } from './Evt';
10
+ import { UserException } from './UserException';
11
+ export { Persistor, PersistorPrinterDecorator, PersistorDummy, PersistException, PersistAction, UpdateStateAction, ClassPersistor, ProcessPersistence, KissAction, MergeServerStateAction, UserExceptionAction, ActionStatus, ReduxReducer, SyncReducer, AsyncReducer, AsyncReducerResult, StatusOptions, Store, createStore, PropDispose, PropPredicate, SetPropOptions, AppSignalSource, ShowUserException, StoreProvider, StoreProviderProps, StoreSlice, StoreSliceProps, Evt, EvtState, StoreException, AbortDispatchException, TimeoutException, UserException, OptimisticCommand, OptimisticSync, OptimisticSyncWithPush, ServerPush, PushMetadata, Retry, RetryOptions, UnlimitedRetryCheckInternet, Poll, LoadPages, Pages, PagesToLoad, PageDirection, };
12
+ //# sourceMappingURL=server.d.ts.map
@@ -0,0 +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,aAAa,EAAE,kBAAkB,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACjG,OAAO,EAAE,sBAAsB,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAC5F,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,OAAO,EACL,SAAS,EAAE,yBAAyB,EAAE,cAAc,EAAE,gBAAgB,EAAE,aAAa,EAAE,iBAAiB,EACxG,cAAc,EACd,kBAAkB,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"}
@@ -1,2 +1,16 @@
1
- export declare function delayMillis(ms: number): Promise<void>;
1
+ export declare function delayMillis(ms: number): Promise<void>;
2
+ /** The largest delay `setTimeout` accepts (about 24.8 days). Larger delays fire after 1 ms. */
3
+ export declare const MAX_TIMEOUT_MILLIS: number;
4
+ /**
5
+ * Returns the given delay, capped at the largest delay `setTimeout` accepts (about 24.8 days).
6
+ * Without the cap, a larger delay would fire after 1 ms.
7
+ */
8
+ export declare function capTimeoutMillis(millis: number): number;
9
+ /** True for an object literal, or an object with no prototype. Not for class instances or arrays. */
10
+ export declare function isPlainObject(value: unknown): value is Record<string, unknown>;
11
+ /**
12
+ * Turns a value into a string, for logging. Never throws, so that a circular, BigInt,
13
+ * prototype-less or otherwise unserializable value can still be logged.
14
+ */
15
+ export declare function describeValue(value: any): string;
2
16
  //# sourceMappingURL=utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/utils.ts"],"names":[],"mappings":"AAAA,wBAAgB,WAAW,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAErD"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/utils.ts"],"names":[],"mappings":"AAAA,wBAAgB,WAAW,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAErD;AAED,+FAA+F;AAC/F,eAAO,MAAM,kBAAkB,QAAc,CAAC;AAE9C;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAEvD;AAED,qGAAqG;AACrG,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAI9E;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,GAAG,GAAG,MAAM,CAWhD"}
@@ -0,0 +1,38 @@
1
+ export function delayMillis(ms) {
2
+ return new Promise(resolve => setTimeout(resolve, capTimeoutMillis(ms)));
3
+ }
4
+ /** The largest delay `setTimeout` accepts (about 24.8 days). Larger delays fire after 1 ms. */
5
+ export const MAX_TIMEOUT_MILLIS = 2 ** 31 - 1;
6
+ /**
7
+ * Returns the given delay, capped at the largest delay `setTimeout` accepts (about 24.8 days).
8
+ * Without the cap, a larger delay would fire after 1 ms.
9
+ */
10
+ export function capTimeoutMillis(millis) {
11
+ return Math.min(millis, MAX_TIMEOUT_MILLIS);
12
+ }
13
+ /** True for an object literal, or an object with no prototype. Not for class instances or arrays. */
14
+ export function isPlainObject(value) {
15
+ if (value === null || typeof value !== 'object')
16
+ return false;
17
+ const proto = Object.getPrototypeOf(value);
18
+ return proto === Object.prototype || proto === null;
19
+ }
20
+ /**
21
+ * Turns a value into a string, for logging. Never throws, so that a circular, BigInt,
22
+ * prototype-less or otherwise unserializable value can still be logged.
23
+ */
24
+ export function describeValue(value) {
25
+ if (typeof value === 'bigint')
26
+ return `${value}n`;
27
+ try {
28
+ return JSON.stringify(value, (_key, v) => typeof v === 'bigint' ? `${v}n` : v);
29
+ }
30
+ catch {
31
+ try {
32
+ return String(value);
33
+ }
34
+ catch {
35
+ return '[object]';
36
+ }
37
+ }
38
+ }
package/package.json CHANGED
@@ -1,9 +1,19 @@
1
1
  {
2
2
  "name": "kiss-for-react",
3
- "version": "1.1.0",
3
+ "version": "2.0.0",
4
4
  "description": "Kiss state management, launched May 2025. Visit kissforreact.org for detailed docs and plenty of examples.",
5
5
  "exports": {
6
6
  ".": {
7
+ "react-server": {
8
+ "import": {
9
+ "types": "./lib/esm/types/server.d.ts",
10
+ "default": "./lib/esm/server.mjs"
11
+ },
12
+ "require": {
13
+ "types": "./lib/cjs/types/server.d.ts",
14
+ "default": "./lib/cjs/server.js"
15
+ }
16
+ },
7
17
  "import": {
8
18
  "types": "./lib/esm/types/index.d.ts",
9
19
  "default": "./lib/esm/index.mjs"
@@ -12,7 +22,18 @@
12
22
  "types": "./lib/cjs/types/index.d.ts",
13
23
  "default": "./lib/cjs/index.js"
14
24
  }
15
- }
25
+ },
26
+ "./server": {
27
+ "import": {
28
+ "types": "./lib/esm/types/server.d.ts",
29
+ "default": "./lib/esm/server.mjs"
30
+ },
31
+ "require": {
32
+ "types": "./lib/cjs/types/server.d.ts",
33
+ "default": "./lib/cjs/server.js"
34
+ }
35
+ },
36
+ "./package.json": "./package.json"
16
37
  },
17
38
  "types": "./lib/cjs/types/index.d.ts",
18
39
  "main": "./lib/cjs/index.js",
@@ -20,19 +41,14 @@
20
41
  "lib/**/*"
21
42
  ],
22
43
  "scripts": {
23
- "clean": "del-cli ./lib",
44
+ "clean": "node -e \"require('fs').rmSync('lib', { recursive: true, force: true })\"",
24
45
  "build": "npm run clean && npm run build:esm && npm run build:cjs",
25
- "build:esm": "tsc -p ./tsconfig.esm.json && node -e \"require('fs').rename('lib/esm/index.js', 'lib/esm/index.mjs', (err) => { if (err) throw err; })\"",
46
+ "build:esm": "tsc -p ./tsconfig.esm.json && node scripts/fix-esm.cjs",
26
47
  "build:cjs": "tsc -p ./tsconfig.cjs.json",
27
48
  "test": "jest",
28
- "semantic-release": "semantic-release",
49
+ "lint": "eslint .",
29
50
  "prepack": "npm run build"
30
51
  },
31
- "release": {
32
- "branches": [
33
- "main"
34
- ]
35
- },
36
52
  "publishConfig": {
37
53
  "access": "public"
38
54
  },
@@ -58,28 +74,36 @@
58
74
  "bugs": {
59
75
  "url": "https://github.com/marcglasberg/kiss-for-react/issues"
60
76
  },
61
- "homepage": "https://github.com/marcglasberg/kiss-for-react#readme",
77
+ "homepage": "https://github.com/marcglasberg/kiss-for-react#readme",
62
78
  "peerDependencies": {
63
79
  "react": "^18.0.0 || ^19.0.0"
64
80
  },
81
+ "dependencies": {
82
+ "use-sync-external-store": "^1.7.0"
83
+ },
65
84
  "devDependencies": {
66
- "@babel/core": "^7.20.0",
67
- "@babel/preset-env": "^7.20.0",
68
- "@babel/preset-typescript": "^7.23.2",
69
- "@babel/runtime": "^7.20.0",
70
- "@types/jest": "^29.5.12",
71
- "@types/react-test-renderer": "^18.0.0",
72
- "babel-jest": "^29.2.1",
73
- "del-cli": "^5.1.0",
74
- "easy-bdd-tool-jest": "^1.0.4",
75
- "eslint": "^8.54.0",
76
- "jest": "^29.6.3",
77
- "move-file": "^3.1.0",
78
- "prettier": "^2.4.1",
79
- "react": "^18.0.0 || ^19.0.0",
80
- "react-test-renderer": "^18.0.0 || ^19.0.0",
81
- "semantic-release": "^19.0.3",
82
- "ts-jest": "^29.1.2",
83
- "typescript": "4.8.4"
85
+ "@eslint/js": "^10.0.1",
86
+ "@types/jest": "^30.0.0",
87
+ "@types/node": "^26.6.5",
88
+ "@types/react": "^19.3.0",
89
+ "@types/react-dom": "^19.3.0",
90
+ "@types/react-test-renderer": "^19.3.0",
91
+ "@types/use-sync-external-store": "^1.7.0",
92
+ "easy-bdd-tool-jest": "^1.1.0",
93
+ "eslint": "^10.13.0",
94
+ "eslint-plugin-react-hooks": "^7.1.1",
95
+ "jest": "^30.5.2",
96
+ "jest-environment-jsdom": "^30.5.2",
97
+ "prettier": "^3.9.10",
98
+ "react": "^18.3.1 || ^19.3.1",
99
+ "react-dom": "^19.3.1",
100
+ "react-test-renderer": "^19.3.1",
101
+ "ts-jest": "^29.4.15",
102
+ "typescript": "~6.0.3",
103
+ "typescript-eslint": "^8.72.0"
104
+ },
105
+ "allowScripts": {
106
+ "@parcel/watcher": false,
107
+ "unrs-resolver": false
84
108
  }
85
- }
109
+ }
@@ -1,53 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.UnmodifiableSetView = void 0;
4
- /**
5
- * An unmodifiable set.
6
- *
7
- * An [UnmodifiableSetView] contains a [Set], and prevents that set from being changed through the view.
8
- * Methods that could change the set, such as [add] and [remove], throw an [UnsupportedError].
9
- * Permitted operations defer to the wrapped set.
10
- */
11
- class UnmodifiableSetView {
12
- constructor(set) {
13
- this._set = set;
14
- }
15
- has(value) {
16
- return this._set.has(value);
17
- }
18
- get size() {
19
- return this._set.size;
20
- }
21
- forEach(callbackfn, thisArg) {
22
- return this._set.forEach(callbackfn, thisArg);
23
- }
24
- [Symbol.iterator]() {
25
- return this._set[Symbol.iterator]();
26
- }
27
- entries() {
28
- return this._set.entries();
29
- }
30
- values() {
31
- return this._set.values();
32
- }
33
- keys() {
34
- return this._set.keys();
35
- }
36
- add(value) {
37
- throw new Error('Cannot modify the set. Create a copy in necessary.');
38
- }
39
- clear() {
40
- throw new Error('Cannot modify the set. Create a copy in necessary.');
41
- }
42
- delete(value) {
43
- throw new Error('Cannot modify the set. Create a copy in necessary.');
44
- }
45
- get [Symbol.toStringTag]() {
46
- return this._set[Symbol.toStringTag];
47
- }
48
- toString() {
49
- return Array.from(this).toString();
50
- }
51
- ;
52
- }
53
- exports.UnmodifiableSetView = UnmodifiableSetView;
@@ -1,24 +0,0 @@
1
- /**
2
- * An unmodifiable set.
3
- *
4
- * An [UnmodifiableSetView] contains a [Set], and prevents that set from being changed through the view.
5
- * Methods that could change the set, such as [add] and [remove], throw an [UnsupportedError].
6
- * Permitted operations defer to the wrapped set.
7
- */
8
- export declare class UnmodifiableSetView<T> implements Set<T> {
9
- private readonly _set;
10
- constructor(set: Set<T>);
11
- has(value: T): boolean;
12
- get size(): number;
13
- forEach(callbackfn: (value: T, value2: T, set: Set<T>) => void, thisArg?: any): void;
14
- [Symbol.iterator](): IterableIterator<T>;
15
- entries(): IterableIterator<[T, T]>;
16
- values(): IterableIterator<T>;
17
- keys(): IterableIterator<T>;
18
- add(value: T): this;
19
- clear(): void;
20
- delete(value: T): boolean;
21
- get [Symbol.toStringTag](): string;
22
- toString(): string;
23
- }
24
- //# sourceMappingURL=UnmodifiableSetView.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"UnmodifiableSetView.d.ts","sourceRoot":"","sources":["../../../src/UnmodifiableSetView.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,qBAAa,mBAAmB,CAAC,CAAC,CAAE,YAAW,GAAG,CAAC,CAAC,CAAC;IACnD,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAS;gBAElB,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC;IAIvB,GAAG,CAAC,KAAK,EAAE,CAAC,GAAG,OAAO;IAItB,IAAI,IAAI,IAAI,MAAM,CAEjB;IAED,OAAO,CAAC,UAAU,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC,KAAK,IAAI,EAAE,OAAO,CAAC,EAAE,GAAG,GAAG,IAAI;IAIpF,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,gBAAgB,CAAC,CAAC,CAAC;IAIxC,OAAO,IAAI,gBAAgB,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAInC,MAAM,IAAI,gBAAgB,CAAC,CAAC,CAAC;IAI7B,IAAI,IAAI,gBAAgB,CAAC,CAAC,CAAC;IAI3B,GAAG,CAAC,KAAK,EAAE,CAAC,GAAG,IAAI;IAInB,KAAK,IAAI,IAAI;IAIb,MAAM,CAAC,KAAK,EAAE,CAAC,GAAG,OAAO;IAIzB,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,MAAM,CAEjC;IAED,QAAQ;CAGT"}
@@ -1,112 +0,0 @@
1
- import { ESSerializer } from './Esserializer';
2
- import { Persistor } from './Persistor';
3
- /**
4
- * Use it like this:
5
- *
6
- * ```ts
7
- * const store = createStore<AppState>({
8
- * initialState: initialState,
9
- * persistor: new MyPersistor(),
10
- * });
11
- * ```
12
- *
13
- * Example for web:
14
- * ```
15
- * return new ClassPersistor<State>(
16
- * async () => window.localStorage.getItem('state'),
17
- * async (serialized) => window.localStorage.setItem('state', serialized),
18
- * async () => window.localStorage.clear(),
19
- * [State, TodoList, TodoItem, Filter] // All state classes the app uses.
20
- * );
21
- * ```
22
- *
23
- * Example for React Native:
24
- * ```
25
- * return new ClassPersistor<State>(
26
- * async () => AsyncStorage.getItem('state'),
27
- * async (serialized) => AsyncStorage.setItem('state', serialized),
28
- * async () => AsyncStorage.clear(),
29
- * [State, TodoList, TodoItem, Filter] // All state classes the app uses.
30
- * );
31
- * ```
32
- */
33
- export class ClassPersistor extends Persistor {
34
- loadSerialized;
35
- saveSerialized;
36
- deleteSerialized;
37
- classesToSerialize;
38
- constructor(
39
- /**
40
- * Returns the serialized state. You can use this to load from localStorage or IndexedDB
41
- * (in React web), or AsyncStorage (in React Native) or other.
42
- * It should return a Promise that resolves to the serialized state, or to null if the state
43
- * is not yet persisted.
44
- */
45
- loadSerialized,
46
- //
47
- /**
48
- * Saves the given serialized state. You can use this to save to localStorage or IndexedDB
49
- * (in React web), or AsyncStorage (in React Native) or other.
50
- * It should return a Promise that resolves when the state is saved.
51
- */
52
- saveSerialized,
53
- //
54
- /**
55
- * Deletes the serialized state. You can use this to delete from the localStorage or IndexedDB
56
- * (in React web), or AsyncStorage (in React Native) or other.
57
- * It should return a Promise that resolves when the state is deleted.
58
- */
59
- deleteSerialized,
60
- //
61
- /**
62
- * You HAVE to list here all the custom classes that are part of your state, directly or
63
- * indirectly. Note: You don't need to list native JavaScript classes, like Date.
64
- * For example, suppose you have a class `State` that has a property `todoList` of
65
- * type `TodoList`.
66
- * And the class `TodoList` has a property `items` of type `Array<TodoItem>`.
67
- * Then you have to list all three classes here: `[State, TodoList, TodoItem]`.
68
- */
69
- classesToSerialize) {
70
- super();
71
- this.loadSerialized = loadSerialized;
72
- this.saveSerialized = saveSerialized;
73
- this.deleteSerialized = deleteSerialized;
74
- this.classesToSerialize = classesToSerialize;
75
- }
76
- /**
77
- * Read the saved state from the persistence. Should return null if the state is not yet
78
- * persisted. This method should be called only once, when the app starts, before the store
79
- * is created. The state it returns may become the store's initial-state. If some error
80
- * occurs while loading the info, we have to deal with it by fixing the problem. In the worse
81
- * case, if we think the state is corrupted and cannot be fixed, one alternative is deleting
82
- * all persisted files and returning null.
83
- */
84
- async readState() {
85
- // Reads the JSON file as a string.
86
- const serializedString = await this.loadSerialized();
87
- if (serializedString === null)
88
- return null;
89
- ESSerializer.registerClasses(this.classesToSerialize);
90
- return ESSerializer.deserialize(serializedString);
91
- }
92
- /**
93
- * Save an initial-state to the persistence.
94
- */
95
- async saveInitialState(state) {
96
- const serializedString = ESSerializer.serialize(state);
97
- await this.saveSerialized(serializedString);
98
- }
99
- /**
100
- * Delete the saved state from the persistence.
101
- */
102
- async deleteState() {
103
- return this.deleteSerialized();
104
- }
105
- /**
106
- * We assume the state is small, and we save `newState` everytime, ignoring `lastPersistedState`.
107
- */
108
- async persistDifference(_lastPersistedState, newState) {
109
- const serializedString = ESSerializer.serialize(newState);
110
- await this.saveSerialized(serializedString);
111
- }
112
- }
@@ -1,81 +0,0 @@
1
- // The Esserializer code was copied and adapted from the original copyrighted work, MIT licensed, by cshao.
2
- // All credit goes to him. See: https://www.npmjs.com/package/esserializer
3
- const ESSERIALIZER_NULL = '__ESSERIALIZER_NULL__';
4
- const ARRAY_FIELD = 'ess_arr';
5
- const BOOLEAN_FIELD = 'ess_bool';
6
- const CLASS_NAME_FIELD = '*type';
7
- const OPTIONS_FIELD = 'ess_opt';
8
- const TIMESTAMP_FIELD = 'ess_ts';
9
- const TO_STRING_FIELD = 'ess_str';
10
- const BUILTIN_CLASS_INT8ARRAY = 'Int8Array';
11
- const BUILTIN_CLASS_UINT8ARRAY = 'Uint8Array';
12
- const BUILTIN_CLASS_UINT8CLAMPEDARRAY = 'Uint8ClampedArray';
13
- const BUILTIN_CLASS_INT16ARRAY = 'Int16Array';
14
- const BUILTIN_CLASS_UINT16ARRAY = 'Uint16Array';
15
- const BUILTIN_CLASS_INT32ARRAY = 'Int32Array';
16
- const BUILTIN_CLASS_UINT32ARRAY = 'Uint32Array';
17
- const BUILTIN_CLASS_FLOAT32ARRAY = 'Float32Array';
18
- const BUILTIN_CLASS_FLOAT64ARRAY = 'Float64Array';
19
- const BUILTIN_CLASS_BIGINT64ARRAY = 'BigInt64Array';
20
- const BUILTIN_CLASS_BIGUINT64ARRAY = 'BigUint64Array';
21
- const BUILTIN_CLASS_ARRAYBUFFER = 'ArrayBuffer';
22
- const BUILTIN_CLASS_SHAREDARRAYBUFFER = 'SharedArrayBuffer';
23
- const BUILTIN_CLASS_BOOLEAN = 'Boolean';
24
- const BUILTIN_CLASS_DATAVIEW = 'DataView';
25
- const BUILTIN_CLASS_DATE = 'Date';
26
- const BUILTIN_CLASS_INTL_COLLATOR = 'Collator';
27
- const BUILTIN_CLASS_INTL_DATETIMEFORMAT = 'DateTimeFormat';
28
- const BUILTIN_CLASS_INTL_LISTFORMAT = 'ListFormat';
29
- const BUILTIN_CLASS_INTL_LOCALE = 'Locale';
30
- const BUILTIN_CLASS_INTL_NUMBERFORMAT = 'NumberFormat';
31
- const BUILTIN_CLASS_INTL_PLURALRULES = 'PluralRules';
32
- const BUILTIN_CLASS_INTL_RELATIVETIMEFORMAT = 'RelativeTimeFormat';
33
- const BUILTIN_CLASS_REGEXP = 'RegExp';
34
- const BUILTIN_CLASS_SET = 'Set';
35
- const BUILTIN_CLASS_STRING = 'String';
36
- const BUILTIN_CLASS_ERROR = 'Error';
37
- const BUILTIN_CLASS_EVAL_ERROR = 'EvalError';
38
- const BUILTIN_CLASS_RANGE_ERROR = 'RangeError';
39
- const BUILTIN_CLASS_REFERENCE_ERROR = 'ReferenceError';
40
- const BUILTIN_CLASS_SYNTAX_ERROR = 'SyntaxError';
41
- const BUILTIN_CLASS_TYPE_ERROR = 'TypeError';
42
- const BUILTIN_CLASS_URI_ERROR = 'URIError';
43
- const BUILTIN_CLASS_AGGREGATE_ERROR = 'AggregateError';
44
- const BUILTIN_TYPE_BIG_INT = 'BI';
45
- const BUILTIN_TYPE_NOT_FINITE = 'NF';
46
- const BUILTIN_TYPE_UNDEFINED = 'UD';
47
- const ALL_BUILTIN_ARRAYS = [
48
- BUILTIN_CLASS_INT8ARRAY,
49
- BUILTIN_CLASS_UINT8ARRAY,
50
- BUILTIN_CLASS_UINT8CLAMPEDARRAY,
51
- BUILTIN_CLASS_INT16ARRAY,
52
- BUILTIN_CLASS_UINT16ARRAY,
53
- BUILTIN_CLASS_INT32ARRAY,
54
- BUILTIN_CLASS_UINT32ARRAY,
55
- BUILTIN_CLASS_FLOAT32ARRAY,
56
- BUILTIN_CLASS_FLOAT64ARRAY,
57
- BUILTIN_CLASS_BIGINT64ARRAY,
58
- BUILTIN_CLASS_BIGUINT64ARRAY
59
- ];
60
- const ALL_BUILTIN_ERRORS = [
61
- BUILTIN_CLASS_ERROR,
62
- BUILTIN_CLASS_EVAL_ERROR,
63
- BUILTIN_CLASS_RANGE_ERROR,
64
- BUILTIN_CLASS_REFERENCE_ERROR,
65
- BUILTIN_CLASS_SYNTAX_ERROR,
66
- BUILTIN_CLASS_TYPE_ERROR,
67
- BUILTIN_CLASS_URI_ERROR,
68
- BUILTIN_CLASS_AGGREGATE_ERROR
69
- ];
70
- const ALL_BUILTIN_INTLS = [
71
- BUILTIN_CLASS_INTL_COLLATOR,
72
- BUILTIN_CLASS_INTL_DATETIMEFORMAT,
73
- BUILTIN_CLASS_INTL_LISTFORMAT,
74
- BUILTIN_CLASS_INTL_NUMBERFORMAT,
75
- BUILTIN_CLASS_INTL_PLURALRULES,
76
- BUILTIN_CLASS_INTL_RELATIVETIMEFORMAT
77
- ];
78
- const CLASSNAMES_WHOSE_ENUMERABLE_PROPERTIES_SHOULD_BE_IGNORED = [
79
- BUILTIN_CLASS_STRING, ...ALL_BUILTIN_ARRAYS
80
- ];
81
- export { ESSERIALIZER_NULL, ALL_BUILTIN_ARRAYS, ALL_BUILTIN_ERRORS, ALL_BUILTIN_INTLS, CLASSNAMES_WHOSE_ENUMERABLE_PROPERTIES_SHOULD_BE_IGNORED, BUILTIN_CLASS_INT8ARRAY, BUILTIN_CLASS_UINT8ARRAY, BUILTIN_CLASS_UINT8CLAMPEDARRAY, BUILTIN_CLASS_INT16ARRAY, BUILTIN_CLASS_UINT16ARRAY, BUILTIN_CLASS_INT32ARRAY, BUILTIN_CLASS_UINT32ARRAY, BUILTIN_CLASS_FLOAT32ARRAY, BUILTIN_CLASS_FLOAT64ARRAY, BUILTIN_CLASS_BIGINT64ARRAY, BUILTIN_CLASS_BIGUINT64ARRAY, BUILTIN_CLASS_ARRAYBUFFER, BUILTIN_CLASS_SHAREDARRAYBUFFER, BUILTIN_CLASS_BOOLEAN, BUILTIN_CLASS_DATAVIEW, BUILTIN_CLASS_DATE, BUILTIN_CLASS_INTL_COLLATOR, BUILTIN_CLASS_INTL_DATETIMEFORMAT, BUILTIN_CLASS_INTL_LISTFORMAT, BUILTIN_CLASS_INTL_LOCALE, BUILTIN_CLASS_INTL_NUMBERFORMAT, BUILTIN_CLASS_INTL_PLURALRULES, BUILTIN_CLASS_INTL_RELATIVETIMEFORMAT, BUILTIN_CLASS_REGEXP, BUILTIN_CLASS_SET, BUILTIN_CLASS_STRING, BUILTIN_CLASS_ERROR, BUILTIN_CLASS_EVAL_ERROR, BUILTIN_CLASS_RANGE_ERROR, BUILTIN_CLASS_REFERENCE_ERROR, BUILTIN_CLASS_SYNTAX_ERROR, BUILTIN_CLASS_TYPE_ERROR, BUILTIN_CLASS_URI_ERROR, BUILTIN_CLASS_AGGREGATE_ERROR, BUILTIN_TYPE_BIG_INT, BUILTIN_TYPE_NOT_FINITE, BUILTIN_TYPE_UNDEFINED, ARRAY_FIELD, BOOLEAN_FIELD, CLASS_NAME_FIELD, OPTIONS_FIELD, TIMESTAMP_FIELD, TO_STRING_FIELD };