@sigx/runtime-core 0.1.4 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app-types.d.ts +35 -15
- package/dist/app-types.d.ts.map +1 -1
- package/dist/app.d.ts +4 -8
- package/dist/app.d.ts.map +1 -1
- package/dist/component.d.ts +147 -39
- package/dist/component.d.ts.map +1 -1
- package/dist/compound.d.ts +34 -0
- package/dist/compound.d.ts.map +1 -0
- package/dist/di/factory.d.ts +3 -2
- package/dist/di/factory.d.ts.map +1 -1
- package/dist/di/injectable.d.ts +80 -6
- package/dist/di/injectable.d.ts.map +1 -1
- package/dist/hydration/index.d.ts +88 -0
- package/dist/hydration/index.d.ts.map +1 -0
- package/dist/index.d.ts +7 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +556 -682
- package/dist/index.js.map +1 -1
- package/dist/jsx-runtime.d.ts +3 -2
- package/dist/jsx-runtime.d.ts.map +1 -1
- package/dist/lazy.d.ts.map +1 -1
- package/dist/model.d.ts +68 -0
- package/dist/model.d.ts.map +1 -0
- package/dist/platform.d.ts +9 -9
- package/dist/platform.d.ts.map +1 -1
- package/dist/plugins.d.ts +25 -1
- package/dist/plugins.d.ts.map +1 -1
- package/dist/renderer.d.ts +22 -21
- package/dist/renderer.d.ts.map +1 -1
- package/dist/utils/is-component.d.ts +30 -0
- package/dist/utils/is-component.d.ts.map +1 -0
- package/dist/utils/normalize.d.ts +34 -0
- package/dist/utils/normalize.d.ts.map +1 -0
- package/dist/utils/props-accessor.d.ts +20 -0
- package/dist/utils/props-accessor.d.ts.map +1 -0
- package/dist/utils/slots.d.ts +46 -0
- package/dist/utils/slots.d.ts.map +1 -0
- package/package.json +7 -6
- package/dist/sheet.d.ts +0 -51
- package/dist/sheet.d.ts.map +0 -1
- package/dist/stores/store.d.ts +0 -70
- package/dist/stores/store.d.ts.map +0 -1
- package/dist/styled.d.ts +0 -15
- package/dist/styled.d.ts.map +0 -1
package/dist/app-types.d.ts
CHANGED
|
@@ -6,12 +6,13 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import type { VNode } from './jsx-runtime.js';
|
|
8
8
|
import type { ComponentSetupContext } from './component.js';
|
|
9
|
+
import type { InjectableFunction } from './di/injectable.js';
|
|
9
10
|
/**
|
|
10
11
|
* Component instance info passed to lifecycle hooks.
|
|
11
12
|
* This is renderer-agnostic - works with DOM, Terminal, or any platform.
|
|
12
13
|
*/
|
|
13
14
|
export interface ComponentInstance {
|
|
14
|
-
/** Component name (if defined via
|
|
15
|
+
/** Component name (if defined via component options) */
|
|
15
16
|
name?: string;
|
|
16
17
|
/** The component's setup context with props, slots, emit, etc. */
|
|
17
18
|
ctx: ComponentSetupContext;
|
|
@@ -81,10 +82,12 @@ export interface AppContext {
|
|
|
81
82
|
*
|
|
82
83
|
* @example
|
|
83
84
|
* ```typescript
|
|
85
|
+
* const useMyService = defineInjectable(() => new MyService());
|
|
86
|
+
*
|
|
84
87
|
* const myPlugin: Plugin<{ debug?: boolean }> = {
|
|
85
88
|
* name: 'my-plugin',
|
|
86
89
|
* install(app, options) {
|
|
87
|
-
* app.
|
|
90
|
+
* app.defineProvide(useMyService);
|
|
88
91
|
* app.hook({
|
|
89
92
|
* onComponentMounted: (instance) => {
|
|
90
93
|
* if (options?.debug) console.log('Mounted:', instance.name);
|
|
@@ -109,8 +112,10 @@ export interface Plugin<Options = any> {
|
|
|
109
112
|
*
|
|
110
113
|
* @example
|
|
111
114
|
* ```typescript
|
|
115
|
+
* const useLogger = defineInjectable(() => createLogger());
|
|
116
|
+
*
|
|
112
117
|
* const simplePlugin: PluginInstallFn = (app) => {
|
|
113
|
-
* app.
|
|
118
|
+
* app.defineProvide(useLogger);
|
|
114
119
|
* };
|
|
115
120
|
* ```
|
|
116
121
|
*/
|
|
@@ -153,13 +158,11 @@ export type UnmountFn<TContainer = any> = (container: TContainer) => void;
|
|
|
153
158
|
*
|
|
154
159
|
* // Using with defineInjectable tokens
|
|
155
160
|
* const useConfig = defineInjectable(() => ({ apiUrl: 'https://...' }));
|
|
156
|
-
* app.
|
|
157
|
-
*
|
|
158
|
-
* // Or with simple symbols/values
|
|
159
|
-
* app.provide(ConfigToken, myConfig);
|
|
161
|
+
* const config = app.defineProvide(useConfig);
|
|
162
|
+
* config.apiUrl = 'https://custom.api.com';
|
|
160
163
|
*
|
|
161
164
|
* app.use(routerPlugin)
|
|
162
|
-
* .mount(document.getElementById('app')
|
|
165
|
+
* .mount(document.getElementById('app')!);
|
|
163
166
|
* ```
|
|
164
167
|
*/
|
|
165
168
|
export interface App<TContainer = any> {
|
|
@@ -172,16 +175,28 @@ export interface App<TContainer = any> {
|
|
|
172
175
|
*/
|
|
173
176
|
use<Options>(plugin: Plugin<Options> | PluginInstallFn<Options>, options?: Options): App<TContainer>;
|
|
174
177
|
/**
|
|
175
|
-
* Provide a
|
|
178
|
+
* Provide a new instance of an injectable at app level.
|
|
179
|
+
* All components will receive this instance when calling the injectable function.
|
|
180
|
+
*
|
|
181
|
+
* @param useFn - An injectable function created by defineInjectable
|
|
182
|
+
* @param factory - Optional custom factory. If not provided, uses the injectable's default factory.
|
|
183
|
+
* @returns The created instance
|
|
184
|
+
*
|
|
185
|
+
* @example
|
|
186
|
+
* ```typescript
|
|
187
|
+
* const useApiConfig = defineInjectable(() => ({ baseUrl: 'https://api.example.com' }));
|
|
176
188
|
*
|
|
177
|
-
*
|
|
178
|
-
* - A function created by defineInjectable
|
|
179
|
-
* - A Symbol
|
|
180
|
-
* - Any unique object reference
|
|
189
|
+
* const app = defineApp(<App />);
|
|
181
190
|
*
|
|
182
|
-
*
|
|
191
|
+
* // Use default factory
|
|
192
|
+
* const config = app.defineProvide(useApiConfig);
|
|
193
|
+
* config.baseUrl = 'https://custom.api.com';
|
|
194
|
+
*
|
|
195
|
+
* // Or provide custom factory
|
|
196
|
+
* app.defineProvide(useApiConfig, () => ({ baseUrl: 'https://other.api.com' }));
|
|
197
|
+
* ```
|
|
183
198
|
*/
|
|
184
|
-
|
|
199
|
+
defineProvide<T>(useFn: InjectableFunction<T>, factory?: () => T): T;
|
|
185
200
|
/**
|
|
186
201
|
* Register lifecycle hooks to observe all components
|
|
187
202
|
*/
|
|
@@ -222,5 +237,10 @@ export interface App<TContainer = any> {
|
|
|
222
237
|
* @internal
|
|
223
238
|
*/
|
|
224
239
|
_container: TContainer | null;
|
|
240
|
+
/**
|
|
241
|
+
* The root component passed to defineApp()
|
|
242
|
+
* @internal
|
|
243
|
+
*/
|
|
244
|
+
_rootComponent: any;
|
|
225
245
|
}
|
|
226
246
|
//# sourceMappingURL=app-types.d.ts.map
|
package/dist/app-types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app-types.d.ts","sourceRoot":"","sources":["../src/app-types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"app-types.d.ts","sourceRoot":"","sources":["../src/app-types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AAC5D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAM7D;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAC9B,wDAAwD;IACxD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,kEAAkE;IAClE,GAAG,EAAE,qBAAqB,CAAC;IAC3B,mCAAmC;IACnC,KAAK,EAAE,KAAK,CAAC;CAChB;AAMD;;GAEG;AACH,MAAM,WAAW,SAAS;IACtB;;;OAGG;IACH,YAAY,CAAC,EAAE,CAAC,GAAG,EAAE,KAAK,EAAE,QAAQ,EAAE,iBAAiB,G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G;IACH,OAAO,IAAI,IAAI,CAAC;IAEhB;;;OAGG;IACH,QAAQ,EAAE,UAAU,CAAC;IAErB;;;OAGG;IACH,UAAU,EAAE,OAAO,CAAC;IAEpB;;;OAGG;IACH,UAAU,EAAE,UAAU,GAAG,IAAI,CAAC;IAE9B;;;OAGG;IACH,cAAc,EAAE,GAAG,CAAC;CACvB"}
|
package/dist/app.d.ts
CHANGED
|
@@ -6,10 +6,6 @@
|
|
|
6
6
|
*/
|
|
7
7
|
export type { ComponentInstance, AppConfig, AppLifecycleHooks, AppContext, Plugin, PluginInstallFn, MountFn, UnmountFn, App } from './app-types.js';
|
|
8
8
|
import type { ComponentInstance, AppContext, MountFn, App } from './app-types.js';
|
|
9
|
-
/**
|
|
10
|
-
* Unique symbol for app context injection
|
|
11
|
-
*/
|
|
12
|
-
export declare const AppContextKey: unique symbol;
|
|
13
9
|
/**
|
|
14
10
|
* Set the default mount function for the platform.
|
|
15
11
|
* Called by platform packages (runtime-dom, runtime-terminal) on import.
|
|
@@ -33,7 +29,6 @@ export declare function getDefaultMount(): MountFn<any> | null;
|
|
|
33
29
|
* @example
|
|
34
30
|
* ```tsx
|
|
35
31
|
* import { defineApp, defineInjectable } from '@sigx/runtime-core';
|
|
36
|
-
* import { render } from '@sigx/runtime-dom';
|
|
37
32
|
*
|
|
38
33
|
* // Define an injectable service
|
|
39
34
|
* const useApiConfig = defineInjectable(() => ({ baseUrl: 'https://api.example.com' }));
|
|
@@ -42,10 +37,11 @@ export declare function getDefaultMount(): MountFn<any> | null;
|
|
|
42
37
|
*
|
|
43
38
|
* app.use(myPlugin, { option: 'value' });
|
|
44
39
|
*
|
|
45
|
-
* // Provide
|
|
46
|
-
* app.
|
|
40
|
+
* // Provide custom instance at app level
|
|
41
|
+
* const config = app.defineProvide(useApiConfig);
|
|
42
|
+
* config.baseUrl = 'https://custom.api.com';
|
|
47
43
|
*
|
|
48
|
-
* app.mount(document.getElementById('app')
|
|
44
|
+
* app.mount(document.getElementById('app')!);
|
|
49
45
|
* ```
|
|
50
46
|
*/
|
|
51
47
|
export declare function defineApp<TContainer = any>(rootComponent: any): App<TContainer>;
|
package/dist/app.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../src/app.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,YAAY,EACR,iBAAiB,EACjB,SAAS,EACT,iBAAiB,EACjB,UAAU,EACV,MAAM,EACN,eAAe,EACf,OAAO,EACP,SAAS,EACT,GAAG,EACN,MAAM,gBAAgB,CAAC;AAGxB,OAAO,KAAK,EACR,iBAAiB,EAEjB,UAAU,EAGV,OAAO,EACP,GAAG,EACN,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../src/app.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,YAAY,EACR,iBAAiB,EACjB,SAAS,EACT,iBAAiB,EACjB,UAAU,EACV,MAAM,EACN,eAAe,EACf,OAAO,EACP,SAAS,EACT,GAAG,EACN,MAAM,gBAAgB,CAAC;AAGxB,OAAO,KAAK,EACR,iBAAiB,EAEjB,UAAU,EAGV,OAAO,EACP,GAAG,EACN,MAAM,gBAAgB,CAAC;AAsBxB;;;;;;;;;;GAUG;AACH,wBAAgB,eAAe,CAAC,UAAU,GAAG,GAAG,EAAE,OAAO,EAAE,OAAO,CAAC,UAAU,CAAC,GAAG,IAAI,CAEpF;AAED;;;GAGG;AACH,wBAAgB,eAAe,IAAI,OAAO,CAAC,GAAG,CAAC,GAAG,IAAI,CAErD;AAMD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,SAAS,CAAC,UAAU,GAAG,GAAG,EAAE,aAAa,EAAE,GAAG,GAAG,GAAG,CAAC,UAAU,CAAC,CAuI/E;AAMD;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,UAAU,GAAG,IAAI,EAAE,QAAQ,EAAE,iBAAiB,GAAG,IAAI,CASpG;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,UAAU,GAAG,IAAI,EAAE,QAAQ,EAAE,iBAAiB,GAAG,IAAI,CASpG;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,UAAU,GAAG,IAAI,EAAE,QAAQ,EAAE,iBAAiB,GAAG,IAAI,CAStG;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,UAAU,GAAG,IAAI,EAAE,QAAQ,EAAE,iBAAiB,GAAG,IAAI,CASpG;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAChC,OAAO,EAAE,UAAU,GAAG,IAAI,EAC1B,GAAG,EAAE,KAAK,EACV,QAAQ,EAAE,iBAAiB,GAAG,IAAI,EAClC,IAAI,EAAE,MAAM,GACb,OAAO,CAyBT"}
|
package/dist/component.d.ts
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
import { JSXElement } from "./jsx-runtime.js";
|
|
2
2
|
import { signal } from "@sigx/reactivity";
|
|
3
|
+
import type { Model as ModelType } from "./model.js";
|
|
4
|
+
/**
|
|
5
|
+
* Extension point for additional component attributes.
|
|
6
|
+
* Use module augmentation to add attributes to all components:
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```ts
|
|
10
|
+
* // In @sigx/server-renderer
|
|
11
|
+
* declare module '@sigx/runtime-core' {
|
|
12
|
+
* interface ComponentAttributeExtensions {
|
|
13
|
+
* 'client:load'?: boolean;
|
|
14
|
+
* 'client:visible'?: boolean;
|
|
15
|
+
* 'client:idle'?: boolean;
|
|
16
|
+
* }
|
|
17
|
+
* }
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
export interface ComponentAttributeExtensions {
|
|
21
|
+
}
|
|
3
22
|
/**
|
|
4
23
|
* Define a single prop with type, required/optional status
|
|
5
24
|
*/
|
|
@@ -9,9 +28,79 @@ export type DefineProp<TName extends string, TType, Required extends boolean = f
|
|
|
9
28
|
[K in TName]: TType;
|
|
10
29
|
};
|
|
11
30
|
/**
|
|
12
|
-
*
|
|
31
|
+
* Model binding tuple type - [stateObject, key] for forwarding
|
|
32
|
+
* @deprecated Use Model<T> interface instead
|
|
33
|
+
*/
|
|
34
|
+
export type ModelBinding<T> = [Record<string, T>, string];
|
|
35
|
+
/**
|
|
36
|
+
* Re-export Model type for convenience
|
|
37
|
+
*/
|
|
38
|
+
export type { ModelType as Model };
|
|
39
|
+
/**
|
|
40
|
+
* Define a 2-way bound model.
|
|
41
|
+
*
|
|
42
|
+
* The component receives a Model<T> object with:
|
|
43
|
+
* - `.value` - Get or set the current value
|
|
44
|
+
* - `.binding` - The underlying binding for forwarding
|
|
45
|
+
*
|
|
46
|
+
* Default form: DefineModel<T>
|
|
47
|
+
* - props.model: Model<T> (read/write/forward)
|
|
48
|
+
* - props.model.value to read/write
|
|
49
|
+
* - <Child model={props.model} /> to forward
|
|
50
|
+
*
|
|
51
|
+
* Named form: DefineModel<"name", T>
|
|
52
|
+
* - props.name: Model<T> (read/write/forward)
|
|
53
|
+
* - props.name.value to read/write
|
|
54
|
+
* - <Child model={props.name} /> to forward
|
|
55
|
+
*
|
|
56
|
+
* Callers use: model={() => state.prop} or model:name={() => state.prop}
|
|
57
|
+
*
|
|
58
|
+
* @example
|
|
59
|
+
* ```tsx
|
|
60
|
+
* interface InputProps extends DefineModel<string> {
|
|
61
|
+
* placeholder?: string;
|
|
62
|
+
* }
|
|
63
|
+
*
|
|
64
|
+
* const Input = component<InputProps>(({ props }) => {
|
|
65
|
+
* // Read
|
|
66
|
+
* console.log(props.model.value);
|
|
67
|
+
*
|
|
68
|
+
* // Write
|
|
69
|
+
* props.model.value = "new value";
|
|
70
|
+
*
|
|
71
|
+
* // Forward
|
|
72
|
+
* <Child model={props.model} />
|
|
73
|
+
* });
|
|
74
|
+
* ```
|
|
75
|
+
*/
|
|
76
|
+
export type DefineModel<TNameOrType, TType = void> = TType extends void ? {
|
|
77
|
+
model?: ModelType<TNameOrType>;
|
|
78
|
+
/** @internal Marker for JSX to accept binding tuples */
|
|
79
|
+
__modelBindings?: {
|
|
80
|
+
model: TNameOrType;
|
|
81
|
+
};
|
|
82
|
+
} & DefineEvent<"update:modelValue", TNameOrType> : TNameOrType extends string ? {
|
|
83
|
+
[K in TNameOrType]?: ModelType<TType>;
|
|
84
|
+
} & {
|
|
85
|
+
/** @internal Marker for JSX to accept binding tuples */
|
|
86
|
+
__modelBindings?: {
|
|
87
|
+
[K in TNameOrType]: TType;
|
|
88
|
+
};
|
|
89
|
+
} & DefineEvent<`update:${TNameOrType}`, TType> : never;
|
|
90
|
+
/**
|
|
91
|
+
* Extract model binding definitions from a component props type.
|
|
92
|
+
* Used at JSX level to allow binding tuples for model props.
|
|
93
|
+
*/
|
|
94
|
+
type ExtractModelBindings<T> = T extends {
|
|
95
|
+
__modelBindings?: infer M;
|
|
96
|
+
} ? NonNullable<M> : {};
|
|
97
|
+
/**
|
|
98
|
+
* Transform Model<T> props to also accept binding syntax at JSX level.
|
|
99
|
+
* This allows: model={[state, "value"]} or model={props.model}
|
|
13
100
|
*/
|
|
14
|
-
|
|
101
|
+
type ExternalModelProps<T> = {
|
|
102
|
+
[K in keyof ExtractModelBindings<T>]?: ModelType<ExtractModelBindings<T>[K]> | ModelBinding<ExtractModelBindings<T>[K]> | (() => ExtractModelBindings<T>[K]);
|
|
103
|
+
};
|
|
15
104
|
export type EventDefinition<T> = {
|
|
16
105
|
__eventDetail: T;
|
|
17
106
|
};
|
|
@@ -93,14 +182,6 @@ export interface MountContext<TElement = PlatformElement> {
|
|
|
93
182
|
*/
|
|
94
183
|
export interface SetupContext {
|
|
95
184
|
}
|
|
96
|
-
/**
|
|
97
|
-
* Type for defaults object - REQUIRES all optional keys to be provided.
|
|
98
|
-
* Required props (where undefined is not assignable) get type 'never' to prevent setting them.
|
|
99
|
-
* This ensures you don't forget to add a default when adding a new optional prop.
|
|
100
|
-
*/
|
|
101
|
-
type DefaultsFor<TProps> = {
|
|
102
|
-
[K in keyof TProps as undefined extends TProps[K] ? K : never]-?: NonNullable<TProps[K]>;
|
|
103
|
-
};
|
|
104
185
|
/**
|
|
105
186
|
* Props type after defaults are applied - all props become required (non-undefined)
|
|
106
187
|
*/
|
|
@@ -108,47 +189,53 @@ export type PropsWithDefaults<TProps, D> = {
|
|
|
108
189
|
readonly [K in keyof TProps]-?: K extends keyof D ? NonNullable<TProps[K]> : TProps[K];
|
|
109
190
|
};
|
|
110
191
|
/**
|
|
111
|
-
* Props accessor -
|
|
112
|
-
*
|
|
113
|
-
*
|
|
114
|
-
* When calling props(), you MUST provide defaults for ALL optional props.
|
|
115
|
-
* This ensures you don't forget to add a default when adding a new optional prop.
|
|
116
|
-
* Required props cannot be in the defaults object.
|
|
192
|
+
* Props accessor - a reactive proxy for component props.
|
|
193
|
+
* Use destructuring with defaults for optional props.
|
|
117
194
|
*
|
|
118
195
|
* @example
|
|
119
196
|
* ```tsx
|
|
120
|
-
* //
|
|
121
|
-
* const
|
|
122
|
-
* return () => <button class={
|
|
197
|
+
* // Destructure with defaults
|
|
198
|
+
* const { variant = 'primary', size = 'md' } = ctx.props;
|
|
199
|
+
* return () => <button class={variant}>...</button>
|
|
200
|
+
*
|
|
201
|
+
* // Or spread to forward all props
|
|
202
|
+
* return () => <ChildComponent {...ctx.props} />
|
|
123
203
|
* ```
|
|
124
204
|
*/
|
|
125
205
|
export type PropsAccessor<TProps> = {
|
|
126
206
|
readonly [K in keyof TProps]: TProps[K];
|
|
127
|
-
} & {
|
|
128
|
-
(defaults: DefaultsFor<TProps>): PropsWithDefaults<TProps, DefaultsFor<TProps>> & PropsAccessor<TProps>;
|
|
129
207
|
};
|
|
130
208
|
export interface ComponentSetupContext<TElement = PlatformElement, TProps extends Record<string, any> = {}, TEvents extends Record<string, any> = {}, TRef = any, TSlots = {}> extends SetupContext {
|
|
131
209
|
el: TElement;
|
|
132
210
|
signal: typeof signal;
|
|
133
211
|
/**
|
|
134
|
-
* Component props -
|
|
135
|
-
*
|
|
212
|
+
* Component props - includes regular props and Model<T> objects.
|
|
213
|
+
*
|
|
214
|
+
* Models are accessed via props: props.model.value, props.title.value
|
|
136
215
|
*
|
|
137
216
|
* @example
|
|
138
217
|
* ```tsx
|
|
139
|
-
* //
|
|
140
|
-
*
|
|
218
|
+
* // Read model
|
|
219
|
+
* const value = props.model.value;
|
|
220
|
+
*
|
|
221
|
+
* // Write model
|
|
222
|
+
* props.model.value = "new value";
|
|
141
223
|
*
|
|
142
|
-
* //
|
|
143
|
-
*
|
|
224
|
+
* // Forward to child
|
|
225
|
+
* <Child model={props.model} />
|
|
226
|
+
*
|
|
227
|
+
* // Forward via context
|
|
228
|
+
* defineProvide(ctx, () => props.model);
|
|
144
229
|
* ```
|
|
145
230
|
*/
|
|
146
231
|
props: PropsAccessor<TProps>;
|
|
147
232
|
slots: SlotsObject<TSlots>;
|
|
148
233
|
emit: EmitFn<TEvents>;
|
|
149
234
|
parent: any | null;
|
|
150
|
-
|
|
151
|
-
|
|
235
|
+
onMounted(fn: (ctx: MountContext<TElement>) => void): void;
|
|
236
|
+
onUnmounted(fn: (ctx: MountContext<TElement>) => void): void;
|
|
237
|
+
onCreated(fn: () => void): void;
|
|
238
|
+
onUpdated(fn: () => void): void;
|
|
152
239
|
expose(exposed: TRef): void;
|
|
153
240
|
/**
|
|
154
241
|
* The current render function. Can be replaced directly for HMR.
|
|
@@ -163,14 +250,17 @@ export interface ComponentSetupContext<TElement = PlatformElement, TProps extend
|
|
|
163
250
|
}
|
|
164
251
|
export declare function getCurrentInstance(): ComponentSetupContext<any, any, any, any, {}> | null;
|
|
165
252
|
export declare function setCurrentInstance(ctx: ComponentSetupContext<any, any, any> | null): ComponentSetupContext<any, any, any, any, {}> | null;
|
|
166
|
-
export declare function
|
|
167
|
-
export declare function
|
|
253
|
+
export declare function onMounted(fn: (ctx: MountContext) => void): void;
|
|
254
|
+
export declare function onUnmounted(fn: (ctx: MountContext) => void): void;
|
|
255
|
+
export declare function onCreated(fn: () => void): void;
|
|
256
|
+
export declare function onUpdated(fn: () => void): void;
|
|
168
257
|
export type ViewFn = () => JSXElement | JSXElement[] | undefined;
|
|
169
258
|
/**
|
|
170
259
|
* Type for component setup functions.
|
|
171
|
-
* Includes Props, Events, Ref and Slots generics to preserve type information.
|
|
260
|
+
* Includes Props, Events, Ref, and Slots generics to preserve type information.
|
|
261
|
+
* Can be sync or async - async setup is awaited on server, runs sync on client hydration.
|
|
172
262
|
*/
|
|
173
|
-
export type SetupFn<TProps extends Record<string, any> = {}, TEvents extends Record<string, any> = {}, TRef = any, TSlots = {}> = (ctx: ComponentSetupContext<PlatformElement, TProps, TEvents, TRef, TSlots>) => ViewFn
|
|
263
|
+
export type SetupFn<TProps extends Record<string, any> = {}, TEvents extends Record<string, any> = {}, TRef = any, TSlots = {}> = (ctx: ComponentSetupContext<PlatformElement, TProps, TEvents, TRef, TSlots>) => ViewFn | Promise<ViewFn>;
|
|
174
264
|
/**
|
|
175
265
|
* Get component metadata (for DevTools)
|
|
176
266
|
*/
|
|
@@ -219,9 +309,17 @@ export type ComponentRef<T extends {
|
|
|
219
309
|
__ref: any;
|
|
220
310
|
}> = Ref<T["__ref"]>;
|
|
221
311
|
/**
|
|
222
|
-
* Strip internal type markers from props
|
|
312
|
+
* Strip internal type markers from component props.
|
|
313
|
+
* This ensures the component's internal `props` accessor only shows actual props,
|
|
314
|
+
* not internal type markers or event definitions.
|
|
315
|
+
*
|
|
316
|
+
* Note: `model` and named models (from DefineModel) are now kept as they are
|
|
317
|
+
* actual Model<T> objects on props. Only the JSX-level `model:name` syntax
|
|
318
|
+
* and event markers are stripped.
|
|
223
319
|
*/
|
|
224
|
-
type StripInternalMarkers<T> =
|
|
320
|
+
type StripInternalMarkers<T> = {
|
|
321
|
+
[K in keyof T as K extends "__exposed" | "__slots" | "__models" | "__modelBindings" ? never : K extends `model:${string}` ? never : K extends `update:${string}` ? never : K]: T[K];
|
|
322
|
+
};
|
|
225
323
|
/**
|
|
226
324
|
* Component options (optional second param)
|
|
227
325
|
*/
|
|
@@ -235,7 +333,18 @@ export interface ComponentOptions {
|
|
|
235
333
|
type SlotProps<TSlots> = TSlots extends Record<string, any> ? {
|
|
236
334
|
slots?: Partial<TSlots>;
|
|
237
335
|
} : {};
|
|
238
|
-
|
|
336
|
+
/**
|
|
337
|
+
* Sync binding type - used at JSX level to enable two-way binding
|
|
338
|
+
* The JSX runtime transforms sync into value + onUpdate:value
|
|
339
|
+
*/
|
|
340
|
+
type SyncBinding<T> = [object, string] | (() => T);
|
|
341
|
+
/**
|
|
342
|
+
* Sync props - if the component has a 'value' prop, allow 'sync' binding
|
|
343
|
+
*/
|
|
344
|
+
type SyncProps<TCombined> = 'value' extends keyof TCombined ? {
|
|
345
|
+
sync?: SyncBinding<TCombined['value']>;
|
|
346
|
+
} : {};
|
|
347
|
+
export type ComponentFactory<TCombined extends Record<string, any>, TRef, TSlots> = ((props: StripInternalMarkers<Omit<TCombined, EventNames<TCombined>>> & EventHandlers<TCombined> & SlotProps<TSlots> & SyncProps<TCombined> & ExternalModelProps<TCombined> & JSX.IntrinsicAttributes & ComponentAttributeExtensions & {
|
|
239
348
|
ref?: Ref<TRef>;
|
|
240
349
|
children?: any;
|
|
241
350
|
}) => JSXElement) & {
|
|
@@ -262,7 +371,7 @@ export type ComponentFactory<TCombined extends Record<string, any>, TRef, TSlots
|
|
|
262
371
|
* ```tsx
|
|
263
372
|
* type CardProps = DefineProp<"title", string> & DefineSlot<"header">;
|
|
264
373
|
*
|
|
265
|
-
* export const Card =
|
|
374
|
+
* export const Card = component<CardProps>((ctx) => {
|
|
266
375
|
* const { title } = ctx.props;
|
|
267
376
|
* const { slots } = ctx;
|
|
268
377
|
*
|
|
@@ -275,6 +384,5 @@ export type ComponentFactory<TCombined extends Record<string, any>, TRef, TSlots
|
|
|
275
384
|
* });
|
|
276
385
|
* ```
|
|
277
386
|
*/
|
|
278
|
-
export declare function
|
|
279
|
-
export {};
|
|
387
|
+
export declare function component<TCombined extends Record<string, any> = {}, TRef = ExtractExposed<TCombined>, TSlots = ExtractSlots<TCombined>>(setup: (ctx: ComponentSetupContext<PlatformElement, StripInternalMarkers<TCombined>, TCombined, TRef, TSlots>) => ViewFn | Promise<ViewFn>, options?: ComponentOptions): ComponentFactory<TCombined, TRef, TSlots>;
|
|
280
388
|
//# sourceMappingURL=component.d.ts.map
|
package/dist/component.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../src/component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../src/component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAE1C,OAAO,KAAK,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,YAAY,CAAC;AAKrD;;;;;;;;;;;;;;;GAeG;AACH,MAAM,WAAW,4BAA4B;CAE5C;AAED;;GAEG;AACH,MAAM,MAAM,UAAU,CAAC,KAAK,SAAS,MAAM,EAAE,KAAK,EAAE,QAAQ,SAAS,OAAO,GAAG,KAAK,IAAI,QAAQ,SAAS,KAAK,GACxG;KAAG,CAAC,IAAI,KAAK,CAAC,CAAC,EAAE,KAAK;CAAE,GACxB;KAAG,CAAC,IAAI,KAAK,GAAG,KAAK;CAAE,CAAC;AAE9B;;;GAGG;AACH,MAAM,MAAM,YAAY,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC;AAE1D;;GAEG;AACH,YAAY,EAAE,SAAS,IAAI,KAAK,EAAE,CAAC;AAEnC;;;;;;;;;;;;;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AAqC;IACrC,OAAO,EAAE,oBAAoB,CAAC,SAAS,CAAC,CAAC;IACzC,sCAAsC;IACtC,QAAQ,EAAE,SAAS,CAAC;IACpB,mCAAmC;IACnC,KAAK,EAAE,IAAI,CAAC;IACZ,qCAAqC;IACrC,OAAO,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,SAAS,CACrB,SAAS,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,EAAE,EAC1C,IAAI,GAAG,cAAc,CAAC,SAAS,CAAC,EAChC,MAAM,GAAG,YAAY,CAAC,SAAS,CAAC,EAEhC,KAAK,EAAE,CAAC,GAAG,EAAE,qBAAqB,CAAC,eAAe,EAAE,oBAAoB,CAAC,SAAS,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,CAAC,KAAK,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,EAC1I,OAAO,CAAC,EAAE,gBAAgB,GAC3B,gBAAgB,CAAC,SAAS,EAAE,IAAI,EAAE,MAAM,CAAC,CA4B3C"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { ComponentFactory } from './component.js';
|
|
2
|
+
/**
|
|
3
|
+
* Creates a compound component by attaching sub-components as static properties.
|
|
4
|
+
*
|
|
5
|
+
* This enables the pattern of `Parent.Child` components (e.g., `Menu.Item`, `Card.Body`)
|
|
6
|
+
* while preserving full TypeScript type inference for both the parent and children.
|
|
7
|
+
*
|
|
8
|
+
* @param main - The main/parent component factory
|
|
9
|
+
* @param sub - An object containing sub-components to attach
|
|
10
|
+
* @returns The main component with sub-components attached as static properties
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```tsx
|
|
14
|
+
* // Define individual components
|
|
15
|
+
* const _Menu = component<MenuProps>(ctx => { ... });
|
|
16
|
+
* const _MenuItem = component<MenuItemProps>(ctx => { ... });
|
|
17
|
+
* const _MenuTitle = component<MenuTitleProps>(ctx => { ... });
|
|
18
|
+
*
|
|
19
|
+
* // Create compound component
|
|
20
|
+
* export const Menu = compound(_Menu, {
|
|
21
|
+
* Item: _MenuItem,
|
|
22
|
+
* Title: _MenuTitle,
|
|
23
|
+
* });
|
|
24
|
+
*
|
|
25
|
+
* // Usage in JSX
|
|
26
|
+
* <Menu>
|
|
27
|
+
* <Menu.Title>Navigation</Menu.Title>
|
|
28
|
+
* <Menu.Item value="home">Home</Menu.Item>
|
|
29
|
+
* <Menu.Item value="about">About</Menu.Item>
|
|
30
|
+
* </Menu>
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
export declare function compound<TMain extends ComponentFactory<any, any, any>, TSub extends Record<string, ComponentFactory<any, any, any>>>(main: TMain, sub: TSub): TMain & TSub;
|
|
34
|
+
//# sourceMappingURL=compound.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compound.d.ts","sourceRoot":"","sources":["../src/compound.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAEvD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,wBAAgB,QAAQ,CACpB,KAAK,SAAS,gBAAgB,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,EAC7C,IAAI,SAAS,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,EAC9D,IAAI,EAAE,KAAK,EAAE,GAAG,EAAE,IAAI,GAAG,KAAK,GAAG,IAAI,CAEtC"}
|
package/dist/di/factory.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type InjectableFunction } from "./injectable.js";
|
|
1
2
|
import { InstanceLifetimes, guid } from "../models/index.js";
|
|
2
3
|
export declare class SubscriptionHandler {
|
|
3
4
|
private unsubs;
|
|
@@ -9,9 +10,9 @@ export interface SetupFactoryContext {
|
|
|
9
10
|
subscriptions: SubscriptionHandler;
|
|
10
11
|
overrideDispose(onDispose: (fn: () => void) => void): void;
|
|
11
12
|
}
|
|
12
|
-
export declare function defineFactory<InferReturnSetup>(setup: (ctx: SetupFactoryContext, ...args: any) => InferReturnSetup, lifetime: InstanceLifetimes, typeIdentifier?: guid):
|
|
13
|
+
export declare function defineFactory<InferReturnSetup>(setup: (ctx: SetupFactoryContext, ...args: any) => InferReturnSetup, lifetime: InstanceLifetimes, typeIdentifier?: guid): InjectableFunction<InferReturnSetup & {
|
|
13
14
|
dispose?: () => void;
|
|
14
|
-
}
|
|
15
|
+
}>;
|
|
15
16
|
export declare function defineFactory<InferReturnSetup, T1>(setup: (ctx: SetupFactoryContext, param1: T1) => InferReturnSetup, lifetime: InstanceLifetimes, typeIdentifier?: guid): (param1: T1) => InferReturnSetup;
|
|
16
17
|
export declare function defineFactory<InferReturnSetup, T1, T2>(setup: (ctx: SetupFactoryContext, param1: T1, param2: T2) => InferReturnSetup, lifetime: InstanceLifetimes, typeIdentifier?: string): (param1: T1, param2: T2) => InferReturnSetup;
|
|
17
18
|
export declare function defineFactory<InferReturnSetup, T1, T2, T3>(setup: (ctx: SetupFactoryContext, param1: T1, param2: T2, param3: T3) => InferReturnSetup, lifetime: InstanceLifetimes, typeIdentifier?: guid): (param1: T1, param2: T2, param3: T3) => InferReturnSetup;
|
package/dist/di/factory.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../src/di/factory.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../src/di/factory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAC5E,OAAO,EAAE,iBAAiB,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAG7D,qBAAa,mBAAmB;IAC5B,OAAO,CAAC,MAAM,CAAsB;IACpC,G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
/**
|
|
3
|
-
*
|
|
3
|
+
* Injectable function type with metadata
|
|
4
4
|
*/
|
|
5
|
-
export
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
export interface InjectableFunction<T> {
|
|
6
|
+
(): T;
|
|
7
|
+
_factory: () => T;
|
|
8
|
+
_token: symbol;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Define an injectable service/value that can be provided at app or component level.
|
|
12
|
+
*
|
|
13
|
+
* The returned function can be called to get the current instance:
|
|
14
|
+
* - If provided at component level via `defineProvide()`, returns that instance
|
|
15
|
+
* - If provided at app level via `app.defineProvide()`, returns that instance
|
|
16
|
+
* - Otherwise falls back to a global singleton created by the factory
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```typescript
|
|
20
|
+
* // Define a service
|
|
21
|
+
* const useApiConfig = defineInjectable(() => ({
|
|
22
|
+
* baseUrl: 'https://api.example.com'
|
|
23
|
+
* }));
|
|
24
|
+
*
|
|
25
|
+
* // Use it in any component - gets nearest provided instance or global singleton
|
|
26
|
+
* const config = useApiConfig();
|
|
27
|
+
* console.log(config.baseUrl);
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
export declare function defineInjectable<T>(factory: () => T): InjectableFunction<T>;
|
|
31
|
+
/**
|
|
32
|
+
* Provide a new instance of an injectable at the current component level.
|
|
33
|
+
* Child components will receive this instance when calling the injectable function.
|
|
34
|
+
*
|
|
35
|
+
* @param useFn - The injectable function created by defineInjectable
|
|
36
|
+
* @param factory - Optional custom factory to create the instance (overrides default)
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* ```typescript
|
|
40
|
+
* const useApiConfig = defineInjectable(() => ({ baseUrl: 'https://api.example.com' }));
|
|
41
|
+
*
|
|
42
|
+
* const MyComponent = component(() => {
|
|
43
|
+
* // Create and provide a new instance for this subtree
|
|
44
|
+
* const config = defineProvide(useApiConfig);
|
|
45
|
+
* config.baseUrl = 'https://custom.api.com';
|
|
46
|
+
*
|
|
47
|
+
* return () => <ChildComponent />;
|
|
48
|
+
* });
|
|
49
|
+
*
|
|
50
|
+
* // Or provide a pre-constructed instance:
|
|
51
|
+
* const MyComponent2 = component(() => {
|
|
52
|
+
* const customService = createMyService({ custom: 'options' });
|
|
53
|
+
* defineProvide(useMyService, () => customService);
|
|
54
|
+
*
|
|
55
|
+
* return () => <ChildComponent />;
|
|
56
|
+
* });
|
|
57
|
+
* ```
|
|
58
|
+
*/
|
|
59
|
+
export declare function defineProvide<T>(useFn: InjectableFunction<T>, factory?: () => T): T;
|
|
60
|
+
/**
|
|
61
|
+
* Get the current AppContext from the component tree.
|
|
62
|
+
* The AppContext is provided at the root component level during mount/hydrate/SSR.
|
|
63
|
+
*
|
|
64
|
+
* @example
|
|
65
|
+
* ```typescript
|
|
66
|
+
* const appContext = useAppContext();
|
|
67
|
+
* console.log(appContext?.app);
|
|
68
|
+
* ```
|
|
69
|
+
*/
|
|
70
|
+
export declare function useAppContext(): AppContext | null;
|
|
71
|
+
/**
|
|
72
|
+
* Get the AppContext token.
|
|
73
|
+
* Used by renderers to provide the AppContext at the root component level.
|
|
74
|
+
* @internal
|
|
75
|
+
*/
|
|
76
|
+
export declare function getAppContextToken(): symbol;
|
|
77
|
+
/**
|
|
78
|
+
* Provide the AppContext on a component's provides Map.
|
|
79
|
+
* Called by the renderer for the ROOT component only.
|
|
80
|
+
* @internal
|
|
81
|
+
*/
|
|
82
|
+
export declare function provideAppContext(ctx: any, appContext: AppContext): void;
|
|
9
83
|
//# sourceMappingURL=injectable.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"injectable.d.ts","sourceRoot":"","sources":["../../src/di/injectable.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"injectable.d.ts","sourceRoot":"","sources":["../../src/di/injectable.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AA6DlD;;GAEG;AACH,MAAM,WAAW,kBAAkB,CAAC,CAAC;IACjC,IAAI,CAAC,CAAC;IACN,QAAQ,EAAE,MAAM,CAAC,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;CAClB;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,OAAO,EAAE,MAAM,CAAC,GAAG,kBAAkB,CAAC,CAAC,CAAC,CAuB3E;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAgB,aAAa,CAAC,CAAC,EAAE,KAAK,EAAE,kBAAkB,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,GAAG,CAAC,CAWnF;AAED;;;;;;;;;GASG;AACH,wBAAgB,aAAa,IAAI,UAAU,GAAG,IAAI,CAEjD;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,IAAI,MAAM,CAE3C;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,GAAG,EAAE,UAAU,EAAE,UAAU,GAAG,IAAI,CAaxE"}
|