@cascateer/core 2.4.5 → 2.4.7

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cascateer/core",
3
- "version": "2.4.5",
3
+ "version": "2.4.7",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/cascateer/core.git"
package/src/index.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  export { ApiProvider, type ApiEffect } from "./api";
2
2
  export { App } from "./app";
3
- export { ComponentConstructor, createComponent } from "./component";
3
+ export { createComponent } from "./component";
4
4
  export { defineCustomProperties } from "./dom";
5
5
  export { createElement, createFragment } from "./jsx-runtime";
6
6
  export { Serializable, type BrandedSerializer } from "./serializable";
package/src/slice.ts CHANGED
@@ -77,17 +77,31 @@ interface SliceConfig<
77
77
  >;
78
78
  }
79
79
 
80
- export const createSlice = <
81
- Data,
82
- StoreSignals extends Dictionary<ComputedSignal<any>>,
83
- StoreActions extends Dictionary<Action<any, any>>,
84
- ApiEffects extends Dictionary<ApiEffect<any, any>>,
85
- ApiActions extends Dictionary<Action<any, any>>,
86
- TerminalEffects extends Dictionary<TerminalEffect<any, any>>,
87
- TerminalActions extends Dictionary<Action<any, any>>,
88
- Components extends Dictionary<ComponentConstructor<any>>,
89
- >(
90
- config: SliceConfig<
80
+ export const createSlice =
81
+ <Data>(data: Data) =>
82
+ <
83
+ StoreSignals extends Dictionary<ComputedSignal<any>>,
84
+ StoreActions extends Dictionary<Action<any, any>>,
85
+ ApiEffects extends Dictionary<ApiEffect<any, any>>,
86
+ ApiActions extends Dictionary<Action<any, any>>,
87
+ TerminalEffects extends Dictionary<TerminalEffect<any, any>>,
88
+ TerminalActions extends Dictionary<Action<any, any>>,
89
+ Components extends Dictionary<ComponentConstructor<any>>,
90
+ >(
91
+ config: Omit<
92
+ SliceConfig<
93
+ Data,
94
+ StoreSignals,
95
+ StoreActions,
96
+ ApiEffects,
97
+ ApiActions,
98
+ TerminalEffects,
99
+ TerminalActions,
100
+ Components
101
+ >,
102
+ "data"
103
+ >,
104
+ ): SliceConfig<
91
105
  Data,
92
106
  StoreSignals,
93
107
  StoreActions,
@@ -96,8 +110,7 @@ export const createSlice = <
96
110
  TerminalEffects,
97
111
  TerminalActions,
98
112
  Components
99
- >,
100
- ) => config;
113
+ > => ({ data, ...config });
101
114
 
102
115
  export class Slice<
103
116
  Data,