@motifx/core 1.2.0-rc.0 → 1.2.0-rc.2
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/chunks/{core-vVL0WG0n.esm.js → core-C5z0P3iY.esm.js} +55 -20
- package/dist/chunks/core-C5z0P3iY.esm.js.map +1 -0
- package/dist/chunks/{core-SS-LXi1V.cjs → core-CX1Sz73P.cjs} +55 -20
- package/dist/chunks/core-CX1Sz73P.cjs.map +1 -0
- package/dist/devtools.cjs +1 -1
- package/dist/devtools.esm.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +23 -9
- package/dist/index.d.ts +23 -9
- package/dist/index.esm.js +2 -2
- package/dist/index.esm.js.map +1 -1
- package/dist/index.esm.min.js +1 -1
- package/dist/index.esm.min.js.map +1 -1
- package/dist/index.umd.js +54 -19
- package/dist/index.umd.js.map +1 -1
- package/dist/index.umd.min.js +1 -1
- package/dist/index.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunks/core-SS-LXi1V.cjs.map +0 -1
- package/dist/chunks/core-vVL0WG0n.esm.js.map +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -396,7 +396,9 @@ declare abstract class ComponentBase<TElement extends ElementType = any, TProps
|
|
|
396
396
|
set siblings(value: SiblingsApi);
|
|
397
397
|
private _createSiblingsApi;
|
|
398
398
|
get serviceProvider(): ServiceProvider | null;
|
|
399
|
-
getService<T>(token: abstract new (...args: any
|
|
399
|
+
getService<T>(token: (abstract new (...args: any) => T) | {
|
|
400
|
+
prototype: T;
|
|
401
|
+
}): T | null;
|
|
400
402
|
getService<T = any>(token: string | symbol | object): T | null;
|
|
401
403
|
$(selector: string): {
|
|
402
404
|
fromDom: () => any;
|
|
@@ -1006,7 +1008,9 @@ declare function createSignal<T>(initialValue: T): Signal<T>;
|
|
|
1006
1008
|
declare function createComputed<T>(getter: () => T): Computed<T>;
|
|
1007
1009
|
declare function createLazyComputed<T>(getter: () => T): LazyComputed<T>;
|
|
1008
1010
|
|
|
1009
|
-
declare function inject<T>(token: abstract new (...args: any
|
|
1011
|
+
declare function inject<T>(token: (abstract new (...args: any) => T) | {
|
|
1012
|
+
prototype: T;
|
|
1013
|
+
}): T;
|
|
1010
1014
|
declare function inject<T = any>(token: string | symbol | object): T;
|
|
1011
1015
|
declare class ServiceProvider {
|
|
1012
1016
|
private services;
|
|
@@ -1026,9 +1030,13 @@ declare class ServiceProvider {
|
|
|
1026
1030
|
constructor(services: ServiceCollection, parent?: ServiceProvider, root?: ServiceProvider);
|
|
1027
1031
|
createScope(name?: string): ServiceProvider;
|
|
1028
1032
|
enableAutoDisposeTransients(enable?: boolean): this;
|
|
1029
|
-
get<T>(token: abstract new (...args: any
|
|
1033
|
+
get<T>(token: (abstract new (...args: any) => T) | {
|
|
1034
|
+
prototype: T;
|
|
1035
|
+
}): T;
|
|
1030
1036
|
get<T = any>(token: string | symbol | object): T;
|
|
1031
|
-
getAsync<T>(token: abstract new (...args: any
|
|
1037
|
+
getAsync<T>(token: (abstract new (...args: any) => T) | {
|
|
1038
|
+
prototype: T;
|
|
1039
|
+
}): Promise<T>;
|
|
1032
1040
|
getAsync<T = any>(token: string | symbol | object): Promise<T>;
|
|
1033
1041
|
getAllServices(): ServiceCollection;
|
|
1034
1042
|
private _releaseIfUnused;
|
|
@@ -1242,6 +1250,10 @@ interface ResolveResult {
|
|
|
1242
1250
|
meta?: Record<string, any>;
|
|
1243
1251
|
aliasOf?: string | null;
|
|
1244
1252
|
}
|
|
1253
|
+
type RouteResolution = {
|
|
1254
|
+
chain: string[];
|
|
1255
|
+
result: ResolveResult;
|
|
1256
|
+
};
|
|
1245
1257
|
type Router = {
|
|
1246
1258
|
readonly params: Record<string, any>;
|
|
1247
1259
|
readonly route: RouteItem | null;
|
|
@@ -1249,8 +1261,8 @@ type Router = {
|
|
|
1249
1261
|
readonly uri: string;
|
|
1250
1262
|
readonly fullPath: string | null;
|
|
1251
1263
|
readonly aliasOf: string | null;
|
|
1252
|
-
navigate: (uri: string, options?: NavigationOptions) => Promise<
|
|
1253
|
-
navigateByName: (name: string, params?: Record<string, any>, options?: NavigationOptions) => Promise<
|
|
1264
|
+
navigate: (uri: string, options?: NavigationOptions) => Promise<any>;
|
|
1265
|
+
navigateByName: (name: string, params?: Record<string, any>, options?: NavigationOptions) => Promise<any>;
|
|
1254
1266
|
evict: (route?: RouteItem | string | null) => Promise<void>;
|
|
1255
1267
|
readonly chain: string[];
|
|
1256
1268
|
readonly extend: Record<string, any>;
|
|
@@ -1258,7 +1270,7 @@ type Router = {
|
|
|
1258
1270
|
readonly direction?: NavigationDirection;
|
|
1259
1271
|
readonly state?: any;
|
|
1260
1272
|
readonly stack?: StackEntryInfo[];
|
|
1261
|
-
resolve: (uri: string) =>
|
|
1273
|
+
resolve: (uri: string) => RouteResolution;
|
|
1262
1274
|
href: (name: string, params?: Record<string, any>) => string;
|
|
1263
1275
|
readonly routes: RouteInfo[];
|
|
1264
1276
|
};
|
|
@@ -1438,7 +1450,9 @@ declare function Injectable(options?: {
|
|
|
1438
1450
|
lifetime?: ServiceLifetime;
|
|
1439
1451
|
deps?: any[];
|
|
1440
1452
|
}): (target: any, context?: ClassDecoratorContext) => void;
|
|
1441
|
-
declare function FromService<T>(token: abstract new (...args: any
|
|
1453
|
+
declare function FromService<T>(token: (abstract new (...args: any) => T) | {
|
|
1454
|
+
prototype: T;
|
|
1455
|
+
}): T;
|
|
1442
1456
|
declare function FromService<T = any>(token: string | symbol | object): T;
|
|
1443
1457
|
|
|
1444
1458
|
type AsyncOrSync<T> = Promise<T> | T;
|
|
@@ -1498,4 +1512,4 @@ declare class Resilience implements ResiliencePolicy {
|
|
|
1498
1512
|
}
|
|
1499
1513
|
|
|
1500
1514
|
export { Application, ApplicationBuilder, Component, ComponentBase, ComponentMotif, Computed, ContentBlock, ContentBody, ControlCollection, Dictionary, Disposable, DisposableStore, Emitter, ErrorHandler, FNComponent, FragmentNode, Frame, FromService, Injectable, Lazy, LazyComputed, LinkedList, List, MotifError, NameValuePair, NodeTypes, Query, Resilience, RouterLink, RouterView, ServiceCollection, ServiceProvider, Signal, Transport, TransportTo, Transporter, Virtualization, asyncTracking, clearModel, configureReactivityLeakMonitor, createComputed, createLazyComputed, createSignal, decorate, deepClone, disposableCore, dom, effect, errorHandler, inject, motifCompiled, motifComponent, motifFragment, preProcessing, reactive, read, safeCall, safeCallAsync, safeCallSilent, setUnexpectedErrorHandler, toDisposable, toGetter, untracked, useApplication, useModel, useNavigation };
|
|
1501
|
-
export type { AnyEvents, AppLifecycleEventArgs, AppLifecycleState, ApplicationState, AsyncTrackingToken, Bind, BulkheadOptions, CSSTransitionInfo, CircuitBreakerOptions, CircuitState, ComponentBaseOptions, CustomParameters, EffectFn, ElementType, Event$1 as Event, EventArgs, FallbackOptions, Group, HtmlElementEvents, IAttribute, IBaseProp, IClass, IDisposable, IDisposableTracker, IDisposeOptions, IElement, IHtmlElement, IsOptional, LazyOptions, LazyRetryOptions, MotifErrorCode, NavigationDirection, NavigationGuard, NavigationGuardContext, NavigationOptions, OptionalParams, RateLimiterOptions, ReadonlySignal, RedirectTarget, ResilienceAction, ResilienceContext, ResiliencePolicy, ResolveResult, RetryOptions, RouteControl, RouteInfo, RouteItem, RouteItemBase, RouteRedirect, RouteResolveContext, Router, RouterClassingSettings, RouterEvents, RouterNavigatedEventArgs, RouterOptions, RouterValidateEventArgs, RouterViewProps, ScrollMemoryOptions, ServiceDescriptor, ServiceLifetime, StackEntryInfo, StackOptions, StackSwipeBackOptions, StackTransitionContext, TimeoutOptions, TransitionMode, TransitionProps, TransportOptions, VirtualizationDataRequest, VirtualizationDataResponse, VirtualizationProps, VirtualizationState };
|
|
1515
|
+
export type { AnyEvents, AppLifecycleEventArgs, AppLifecycleState, ApplicationState, AsyncTrackingToken, Bind, BulkheadOptions, CSSTransitionInfo, CircuitBreakerOptions, CircuitState, ComponentBaseOptions, CustomParameters, EffectFn, ElementType, Event$1 as Event, EventArgs, FallbackOptions, Group, HtmlElementEvents, IAttribute, IBaseProp, IClass, IDisposable, IDisposableTracker, IDisposeOptions, IElement, IHtmlElement, IsOptional, LazyOptions, LazyRetryOptions, MotifErrorCode, NavigationDirection, NavigationGuard, NavigationGuardContext, NavigationOptions, OptionalParams, RateLimiterOptions, ReadonlySignal, RedirectTarget, ResilienceAction, ResilienceContext, ResiliencePolicy, ResolveResult, RetryOptions, RouteControl, RouteInfo, RouteItem, RouteItemBase, RouteRedirect, RouteResolution, RouteResolveContext, Router, RouterClassingSettings, RouterEvents, RouterNavigatedEventArgs, RouterOptions, RouterValidateEventArgs, RouterViewProps, ScrollMemoryOptions, ServiceDescriptor, ServiceLifetime, StackEntryInfo, StackOptions, StackSwipeBackOptions, StackTransitionContext, TimeoutOptions, TransitionMode, TransitionProps, TransportOptions, VirtualizationDataRequest, VirtualizationDataResponse, VirtualizationProps, VirtualizationState };
|
package/dist/index.d.ts
CHANGED
|
@@ -396,7 +396,9 @@ declare abstract class ComponentBase<TElement extends ElementType = any, TProps
|
|
|
396
396
|
set siblings(value: SiblingsApi);
|
|
397
397
|
private _createSiblingsApi;
|
|
398
398
|
get serviceProvider(): ServiceProvider | null;
|
|
399
|
-
getService<T>(token: abstract new (...args: any
|
|
399
|
+
getService<T>(token: (abstract new (...args: any) => T) | {
|
|
400
|
+
prototype: T;
|
|
401
|
+
}): T | null;
|
|
400
402
|
getService<T = any>(token: string | symbol | object): T | null;
|
|
401
403
|
$(selector: string): {
|
|
402
404
|
fromDom: () => any;
|
|
@@ -1006,7 +1008,9 @@ declare function createSignal<T>(initialValue: T): Signal<T>;
|
|
|
1006
1008
|
declare function createComputed<T>(getter: () => T): Computed<T>;
|
|
1007
1009
|
declare function createLazyComputed<T>(getter: () => T): LazyComputed<T>;
|
|
1008
1010
|
|
|
1009
|
-
declare function inject<T>(token: abstract new (...args: any
|
|
1011
|
+
declare function inject<T>(token: (abstract new (...args: any) => T) | {
|
|
1012
|
+
prototype: T;
|
|
1013
|
+
}): T;
|
|
1010
1014
|
declare function inject<T = any>(token: string | symbol | object): T;
|
|
1011
1015
|
declare class ServiceProvider {
|
|
1012
1016
|
private services;
|
|
@@ -1026,9 +1030,13 @@ declare class ServiceProvider {
|
|
|
1026
1030
|
constructor(services: ServiceCollection, parent?: ServiceProvider, root?: ServiceProvider);
|
|
1027
1031
|
createScope(name?: string): ServiceProvider;
|
|
1028
1032
|
enableAutoDisposeTransients(enable?: boolean): this;
|
|
1029
|
-
get<T>(token: abstract new (...args: any
|
|
1033
|
+
get<T>(token: (abstract new (...args: any) => T) | {
|
|
1034
|
+
prototype: T;
|
|
1035
|
+
}): T;
|
|
1030
1036
|
get<T = any>(token: string | symbol | object): T;
|
|
1031
|
-
getAsync<T>(token: abstract new (...args: any
|
|
1037
|
+
getAsync<T>(token: (abstract new (...args: any) => T) | {
|
|
1038
|
+
prototype: T;
|
|
1039
|
+
}): Promise<T>;
|
|
1032
1040
|
getAsync<T = any>(token: string | symbol | object): Promise<T>;
|
|
1033
1041
|
getAllServices(): ServiceCollection;
|
|
1034
1042
|
private _releaseIfUnused;
|
|
@@ -1242,6 +1250,10 @@ interface ResolveResult {
|
|
|
1242
1250
|
meta?: Record<string, any>;
|
|
1243
1251
|
aliasOf?: string | null;
|
|
1244
1252
|
}
|
|
1253
|
+
type RouteResolution = {
|
|
1254
|
+
chain: string[];
|
|
1255
|
+
result: ResolveResult;
|
|
1256
|
+
};
|
|
1245
1257
|
type Router = {
|
|
1246
1258
|
readonly params: Record<string, any>;
|
|
1247
1259
|
readonly route: RouteItem | null;
|
|
@@ -1249,8 +1261,8 @@ type Router = {
|
|
|
1249
1261
|
readonly uri: string;
|
|
1250
1262
|
readonly fullPath: string | null;
|
|
1251
1263
|
readonly aliasOf: string | null;
|
|
1252
|
-
navigate: (uri: string, options?: NavigationOptions) => Promise<
|
|
1253
|
-
navigateByName: (name: string, params?: Record<string, any>, options?: NavigationOptions) => Promise<
|
|
1264
|
+
navigate: (uri: string, options?: NavigationOptions) => Promise<any>;
|
|
1265
|
+
navigateByName: (name: string, params?: Record<string, any>, options?: NavigationOptions) => Promise<any>;
|
|
1254
1266
|
evict: (route?: RouteItem | string | null) => Promise<void>;
|
|
1255
1267
|
readonly chain: string[];
|
|
1256
1268
|
readonly extend: Record<string, any>;
|
|
@@ -1258,7 +1270,7 @@ type Router = {
|
|
|
1258
1270
|
readonly direction?: NavigationDirection;
|
|
1259
1271
|
readonly state?: any;
|
|
1260
1272
|
readonly stack?: StackEntryInfo[];
|
|
1261
|
-
resolve: (uri: string) =>
|
|
1273
|
+
resolve: (uri: string) => RouteResolution;
|
|
1262
1274
|
href: (name: string, params?: Record<string, any>) => string;
|
|
1263
1275
|
readonly routes: RouteInfo[];
|
|
1264
1276
|
};
|
|
@@ -1438,7 +1450,9 @@ declare function Injectable(options?: {
|
|
|
1438
1450
|
lifetime?: ServiceLifetime;
|
|
1439
1451
|
deps?: any[];
|
|
1440
1452
|
}): (target: any, context?: ClassDecoratorContext) => void;
|
|
1441
|
-
declare function FromService<T>(token: abstract new (...args: any
|
|
1453
|
+
declare function FromService<T>(token: (abstract new (...args: any) => T) | {
|
|
1454
|
+
prototype: T;
|
|
1455
|
+
}): T;
|
|
1442
1456
|
declare function FromService<T = any>(token: string | symbol | object): T;
|
|
1443
1457
|
|
|
1444
1458
|
type AsyncOrSync<T> = Promise<T> | T;
|
|
@@ -1498,4 +1512,4 @@ declare class Resilience implements ResiliencePolicy {
|
|
|
1498
1512
|
}
|
|
1499
1513
|
|
|
1500
1514
|
export { Application, ApplicationBuilder, Component, ComponentBase, ComponentMotif, Computed, ContentBlock, ContentBody, ControlCollection, Dictionary, Disposable, DisposableStore, Emitter, ErrorHandler, FNComponent, FragmentNode, Frame, FromService, Injectable, Lazy, LazyComputed, LinkedList, List, MotifError, NameValuePair, NodeTypes, Query, Resilience, RouterLink, RouterView, ServiceCollection, ServiceProvider, Signal, Transport, TransportTo, Transporter, Virtualization, asyncTracking, clearModel, configureReactivityLeakMonitor, createComputed, createLazyComputed, createSignal, decorate, deepClone, disposableCore, dom, effect, errorHandler, inject, motifCompiled, motifComponent, motifFragment, preProcessing, reactive, read, safeCall, safeCallAsync, safeCallSilent, setUnexpectedErrorHandler, toDisposable, toGetter, untracked, useApplication, useModel, useNavigation };
|
|
1501
|
-
export type { AnyEvents, AppLifecycleEventArgs, AppLifecycleState, ApplicationState, AsyncTrackingToken, Bind, BulkheadOptions, CSSTransitionInfo, CircuitBreakerOptions, CircuitState, ComponentBaseOptions, CustomParameters, EffectFn, ElementType, Event$1 as Event, EventArgs, FallbackOptions, Group, HtmlElementEvents, IAttribute, IBaseProp, IClass, IDisposable, IDisposableTracker, IDisposeOptions, IElement, IHtmlElement, IsOptional, LazyOptions, LazyRetryOptions, MotifErrorCode, NavigationDirection, NavigationGuard, NavigationGuardContext, NavigationOptions, OptionalParams, RateLimiterOptions, ReadonlySignal, RedirectTarget, ResilienceAction, ResilienceContext, ResiliencePolicy, ResolveResult, RetryOptions, RouteControl, RouteInfo, RouteItem, RouteItemBase, RouteRedirect, RouteResolveContext, Router, RouterClassingSettings, RouterEvents, RouterNavigatedEventArgs, RouterOptions, RouterValidateEventArgs, RouterViewProps, ScrollMemoryOptions, ServiceDescriptor, ServiceLifetime, StackEntryInfo, StackOptions, StackSwipeBackOptions, StackTransitionContext, TimeoutOptions, TransitionMode, TransitionProps, TransportOptions, VirtualizationDataRequest, VirtualizationDataResponse, VirtualizationProps, VirtualizationState };
|
|
1515
|
+
export type { AnyEvents, AppLifecycleEventArgs, AppLifecycleState, ApplicationState, AsyncTrackingToken, Bind, BulkheadOptions, CSSTransitionInfo, CircuitBreakerOptions, CircuitState, ComponentBaseOptions, CustomParameters, EffectFn, ElementType, Event$1 as Event, EventArgs, FallbackOptions, Group, HtmlElementEvents, IAttribute, IBaseProp, IClass, IDisposable, IDisposableTracker, IDisposeOptions, IElement, IHtmlElement, IsOptional, LazyOptions, LazyRetryOptions, MotifErrorCode, NavigationDirection, NavigationGuard, NavigationGuardContext, NavigationOptions, OptionalParams, RateLimiterOptions, ReadonlySignal, RedirectTarget, ResilienceAction, ResilienceContext, ResiliencePolicy, ResolveResult, RetryOptions, RouteControl, RouteInfo, RouteItem, RouteItemBase, RouteRedirect, RouteResolution, RouteResolveContext, Router, RouterClassingSettings, RouterEvents, RouterNavigatedEventArgs, RouterOptions, RouterValidateEventArgs, RouterViewProps, ScrollMemoryOptions, ServiceDescriptor, ServiceLifetime, StackEntryInfo, StackOptions, StackSwipeBackOptions, StackTransitionContext, TimeoutOptions, TransitionMode, TransitionProps, TransportOptions, VirtualizationDataRequest, VirtualizationDataResponse, VirtualizationProps, VirtualizationState };
|
package/dist/index.esm.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { m as motifError, C as Component, r as reportWarning, A as Application, c as contentBlocks, f as findAppendableComponent, u as untracked, e as effect, a as reportError, b as ComponentBase, n as notifyDeactivated, d as autoRegistry, M as MotifError, g as formatMotifMessage } from './chunks/core-
|
|
2
|
-
export { h as ApplicationBuilder, k as ComponentMotif, l as Computed, p as ControlCollection, D as Disposable, x as DisposableStore, E as Emitter, B as ErrorHandler, F as FNComponent, G as FragmentNode, H as Frame, L as Lazy, J as LazyComputed, K as LinkedList, Q as NodeTypes, S as RouterView, W as ServiceCollection, X as ServiceProvider, Z as Signal, i as asyncTracking, j as clearModel, o as configureReactivityLeakMonitor, q as createComputed, s as createLazyComputed, t as createSignal, v as deepClone, w as disposableCore, y as dom, z as errorHandler, I as inject, N as motifCompiled, O as motifComponent, P as motifFragment, R as reactive, T as safeCall, U as safeCallAsync, V as safeCallSilent, Y as setUnexpectedErrorHandler, _ as toDisposable, $ as useApplication, a0 as useModel, a1 as useNavigation } from './chunks/core-
|
|
1
|
+
import { m as motifError, C as Component, r as reportWarning, A as Application, c as contentBlocks, f as findAppendableComponent, u as untracked, e as effect, a as reportError, b as ComponentBase, n as notifyDeactivated, d as autoRegistry, M as MotifError, g as formatMotifMessage } from './chunks/core-C5z0P3iY.esm.js';
|
|
2
|
+
export { h as ApplicationBuilder, k as ComponentMotif, l as Computed, p as ControlCollection, D as Disposable, x as DisposableStore, E as Emitter, B as ErrorHandler, F as FNComponent, G as FragmentNode, H as Frame, L as Lazy, J as LazyComputed, K as LinkedList, Q as NodeTypes, S as RouterView, W as ServiceCollection, X as ServiceProvider, Z as Signal, i as asyncTracking, j as clearModel, o as configureReactivityLeakMonitor, q as createComputed, s as createLazyComputed, t as createSignal, v as deepClone, w as disposableCore, y as dom, z as errorHandler, I as inject, N as motifCompiled, O as motifComponent, P as motifFragment, R as reactive, T as safeCall, U as safeCallAsync, V as safeCallSilent, Y as setUnexpectedErrorHandler, _ as toDisposable, $ as useApplication, a0 as useModel, a1 as useNavigation } from './chunks/core-C5z0P3iY.esm.js';
|
|
3
3
|
|
|
4
4
|
class NameValuePair {
|
|
5
5
|
Key;
|