@motifx/core 1.1.0 → 1.2.0-rc.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.
- package/dist/chunks/{core-BI6Lk585.cjs → core-SS-LXi1V.cjs} +364 -47
- package/dist/chunks/core-SS-LXi1V.cjs.map +1 -0
- package/dist/chunks/{core-BGdhUeHu.esm.js → core-vVL0WG0n.esm.js} +364 -47
- package/dist/chunks/core-vVL0WG0n.esm.js.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 +19 -8
- package/dist/index.d.ts +19 -8
- 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 +363 -46
- 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/dist/jsx-runtime.cjs.map +1 -1
- package/dist/jsx-runtime.d.cts +17 -3
- package/dist/jsx-runtime.d.ts +17 -3
- package/dist/jsx-runtime.esm.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunks/core-BGdhUeHu.esm.js.map +0 -1
- package/dist/chunks/core-BI6Lk585.cjs.map +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { MotifDomEventProps } from './jsx-runtime.cjs';
|
|
1
2
|
export { AnyFunctionalComponent, JSX, MotifBaseProps, MotifBindable, MotifClass, MotifComponentConstructor, MotifComponentType, MotifFunctionalComponent, MotifFunctionalComponentBasic, MotifStyle, MotifValue, __attr } from './jsx-runtime.cjs';
|
|
2
3
|
|
|
3
4
|
interface IDisposable {
|
|
@@ -290,7 +291,7 @@ declare class ComponentMotif<TSelf extends ComponentBase = ComponentBase, TProps
|
|
|
290
291
|
stopAnimations(): Promise<void>;
|
|
291
292
|
}
|
|
292
293
|
|
|
293
|
-
type IBaseProp<T extends any> = OptionalParams<T> & {
|
|
294
|
+
type IBaseProp<T extends any> = OptionalParams<T> & MotifDomEventProps & {
|
|
294
295
|
childs?: any[];
|
|
295
296
|
options?: any;
|
|
296
297
|
onElementCreating?(): any;
|
|
@@ -395,7 +396,8 @@ declare abstract class ComponentBase<TElement extends ElementType = any, TProps
|
|
|
395
396
|
set siblings(value: SiblingsApi);
|
|
396
397
|
private _createSiblingsApi;
|
|
397
398
|
get serviceProvider(): ServiceProvider | null;
|
|
398
|
-
getService<T
|
|
399
|
+
getService<T>(token: abstract new (...args: any[]) => T): T | null;
|
|
400
|
+
getService<T = any>(token: string | symbol | object): T | null;
|
|
399
401
|
$(selector: string): {
|
|
400
402
|
fromDom: () => any;
|
|
401
403
|
fromComponent: () => ComponentBase<any, any>[];
|
|
@@ -821,9 +823,11 @@ declare const motifMessages: {
|
|
|
821
823
|
MJX121: (compiled: number, runtime: number) => string;
|
|
822
824
|
MJX122: (hook: string) => string;
|
|
823
825
|
MJX123: (event: string) => string;
|
|
824
|
-
MJX124: () => string;
|
|
826
|
+
MJX124: (key: string) => string;
|
|
825
827
|
MJX125: (key: string) => string;
|
|
826
828
|
MJX126: () => string;
|
|
829
|
+
MJX127: (got: string) => string;
|
|
830
|
+
MJX128: (cls: string, member: string, how: "method" | "field" | "replaced") => string;
|
|
827
831
|
MJX201: () => string;
|
|
828
832
|
MJX202: (key: unknown, index: number) => string;
|
|
829
833
|
MJX203: (max: number) => string;
|
|
@@ -1022,8 +1026,10 @@ declare class ServiceProvider {
|
|
|
1022
1026
|
constructor(services: ServiceCollection, parent?: ServiceProvider, root?: ServiceProvider);
|
|
1023
1027
|
createScope(name?: string): ServiceProvider;
|
|
1024
1028
|
enableAutoDisposeTransients(enable?: boolean): this;
|
|
1025
|
-
get<T
|
|
1026
|
-
|
|
1029
|
+
get<T>(token: abstract new (...args: any[]) => T): T;
|
|
1030
|
+
get<T = any>(token: string | symbol | object): T;
|
|
1031
|
+
getAsync<T>(token: abstract new (...args: any[]) => T): Promise<T>;
|
|
1032
|
+
getAsync<T = any>(token: string | symbol | object): Promise<T>;
|
|
1027
1033
|
getAllServices(): ServiceCollection;
|
|
1028
1034
|
private _releaseIfUnused;
|
|
1029
1035
|
private _scopeFor;
|
|
@@ -1319,6 +1325,7 @@ declare class RouterLink extends Component<any, RouterLinkOptions> {
|
|
|
1319
1325
|
onBuilt(sender: ComponentBase, e: EventArgs): void;
|
|
1320
1326
|
}
|
|
1321
1327
|
|
|
1328
|
+
type ApplicationState = 'initializing' | 'running' | 'disposing' | 'disposed';
|
|
1322
1329
|
declare class ApplicationBuilder {
|
|
1323
1330
|
services: ServiceCollection;
|
|
1324
1331
|
constructor();
|
|
@@ -1356,6 +1363,9 @@ declare class Application {
|
|
|
1356
1363
|
provider: ServiceProvider;
|
|
1357
1364
|
static get main(): Application;
|
|
1358
1365
|
constructor(provider: ServiceProvider);
|
|
1366
|
+
private _state;
|
|
1367
|
+
private _disposing?;
|
|
1368
|
+
get state(): ApplicationState;
|
|
1359
1369
|
private _middlewares;
|
|
1360
1370
|
private _beforeEachGuards;
|
|
1361
1371
|
readonly router: Router;
|
|
@@ -1369,7 +1379,7 @@ declare class Application {
|
|
|
1369
1379
|
attach(component: Component): void;
|
|
1370
1380
|
detach(component: Component): void;
|
|
1371
1381
|
appendToMainHost(component: Node): void;
|
|
1372
|
-
dispose(): void
|
|
1382
|
+
dispose(): Promise<void>;
|
|
1373
1383
|
useTransitions(options: {
|
|
1374
1384
|
mode?: TransitionMode;
|
|
1375
1385
|
}): Application;
|
|
@@ -1428,7 +1438,8 @@ declare function Injectable(options?: {
|
|
|
1428
1438
|
lifetime?: ServiceLifetime;
|
|
1429
1439
|
deps?: any[];
|
|
1430
1440
|
}): (target: any, context?: ClassDecoratorContext) => void;
|
|
1431
|
-
declare function FromService<T
|
|
1441
|
+
declare function FromService<T>(token: abstract new (...args: any[]) => T): T;
|
|
1442
|
+
declare function FromService<T = any>(token: string | symbol | object): T;
|
|
1432
1443
|
|
|
1433
1444
|
type AsyncOrSync<T> = Promise<T> | T;
|
|
1434
1445
|
interface ResilienceContext {
|
|
@@ -1487,4 +1498,4 @@ declare class Resilience implements ResiliencePolicy {
|
|
|
1487
1498
|
}
|
|
1488
1499
|
|
|
1489
1500
|
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 };
|
|
1490
|
-
export type { AnyEvents, AppLifecycleEventArgs, AppLifecycleState, 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 };
|
|
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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { MotifDomEventProps } from './jsx-runtime.js';
|
|
1
2
|
export { AnyFunctionalComponent, JSX, MotifBaseProps, MotifBindable, MotifClass, MotifComponentConstructor, MotifComponentType, MotifFunctionalComponent, MotifFunctionalComponentBasic, MotifStyle, MotifValue, __attr } from './jsx-runtime.js';
|
|
2
3
|
|
|
3
4
|
interface IDisposable {
|
|
@@ -290,7 +291,7 @@ declare class ComponentMotif<TSelf extends ComponentBase = ComponentBase, TProps
|
|
|
290
291
|
stopAnimations(): Promise<void>;
|
|
291
292
|
}
|
|
292
293
|
|
|
293
|
-
type IBaseProp<T extends any> = OptionalParams<T> & {
|
|
294
|
+
type IBaseProp<T extends any> = OptionalParams<T> & MotifDomEventProps & {
|
|
294
295
|
childs?: any[];
|
|
295
296
|
options?: any;
|
|
296
297
|
onElementCreating?(): any;
|
|
@@ -395,7 +396,8 @@ declare abstract class ComponentBase<TElement extends ElementType = any, TProps
|
|
|
395
396
|
set siblings(value: SiblingsApi);
|
|
396
397
|
private _createSiblingsApi;
|
|
397
398
|
get serviceProvider(): ServiceProvider | null;
|
|
398
|
-
getService<T
|
|
399
|
+
getService<T>(token: abstract new (...args: any[]) => T): T | null;
|
|
400
|
+
getService<T = any>(token: string | symbol | object): T | null;
|
|
399
401
|
$(selector: string): {
|
|
400
402
|
fromDom: () => any;
|
|
401
403
|
fromComponent: () => ComponentBase<any, any>[];
|
|
@@ -821,9 +823,11 @@ declare const motifMessages: {
|
|
|
821
823
|
MJX121: (compiled: number, runtime: number) => string;
|
|
822
824
|
MJX122: (hook: string) => string;
|
|
823
825
|
MJX123: (event: string) => string;
|
|
824
|
-
MJX124: () => string;
|
|
826
|
+
MJX124: (key: string) => string;
|
|
825
827
|
MJX125: (key: string) => string;
|
|
826
828
|
MJX126: () => string;
|
|
829
|
+
MJX127: (got: string) => string;
|
|
830
|
+
MJX128: (cls: string, member: string, how: "method" | "field" | "replaced") => string;
|
|
827
831
|
MJX201: () => string;
|
|
828
832
|
MJX202: (key: unknown, index: number) => string;
|
|
829
833
|
MJX203: (max: number) => string;
|
|
@@ -1022,8 +1026,10 @@ declare class ServiceProvider {
|
|
|
1022
1026
|
constructor(services: ServiceCollection, parent?: ServiceProvider, root?: ServiceProvider);
|
|
1023
1027
|
createScope(name?: string): ServiceProvider;
|
|
1024
1028
|
enableAutoDisposeTransients(enable?: boolean): this;
|
|
1025
|
-
get<T
|
|
1026
|
-
|
|
1029
|
+
get<T>(token: abstract new (...args: any[]) => T): T;
|
|
1030
|
+
get<T = any>(token: string | symbol | object): T;
|
|
1031
|
+
getAsync<T>(token: abstract new (...args: any[]) => T): Promise<T>;
|
|
1032
|
+
getAsync<T = any>(token: string | symbol | object): Promise<T>;
|
|
1027
1033
|
getAllServices(): ServiceCollection;
|
|
1028
1034
|
private _releaseIfUnused;
|
|
1029
1035
|
private _scopeFor;
|
|
@@ -1319,6 +1325,7 @@ declare class RouterLink extends Component<any, RouterLinkOptions> {
|
|
|
1319
1325
|
onBuilt(sender: ComponentBase, e: EventArgs): void;
|
|
1320
1326
|
}
|
|
1321
1327
|
|
|
1328
|
+
type ApplicationState = 'initializing' | 'running' | 'disposing' | 'disposed';
|
|
1322
1329
|
declare class ApplicationBuilder {
|
|
1323
1330
|
services: ServiceCollection;
|
|
1324
1331
|
constructor();
|
|
@@ -1356,6 +1363,9 @@ declare class Application {
|
|
|
1356
1363
|
provider: ServiceProvider;
|
|
1357
1364
|
static get main(): Application;
|
|
1358
1365
|
constructor(provider: ServiceProvider);
|
|
1366
|
+
private _state;
|
|
1367
|
+
private _disposing?;
|
|
1368
|
+
get state(): ApplicationState;
|
|
1359
1369
|
private _middlewares;
|
|
1360
1370
|
private _beforeEachGuards;
|
|
1361
1371
|
readonly router: Router;
|
|
@@ -1369,7 +1379,7 @@ declare class Application {
|
|
|
1369
1379
|
attach(component: Component): void;
|
|
1370
1380
|
detach(component: Component): void;
|
|
1371
1381
|
appendToMainHost(component: Node): void;
|
|
1372
|
-
dispose(): void
|
|
1382
|
+
dispose(): Promise<void>;
|
|
1373
1383
|
useTransitions(options: {
|
|
1374
1384
|
mode?: TransitionMode;
|
|
1375
1385
|
}): Application;
|
|
@@ -1428,7 +1438,8 @@ declare function Injectable(options?: {
|
|
|
1428
1438
|
lifetime?: ServiceLifetime;
|
|
1429
1439
|
deps?: any[];
|
|
1430
1440
|
}): (target: any, context?: ClassDecoratorContext) => void;
|
|
1431
|
-
declare function FromService<T
|
|
1441
|
+
declare function FromService<T>(token: abstract new (...args: any[]) => T): T;
|
|
1442
|
+
declare function FromService<T = any>(token: string | symbol | object): T;
|
|
1432
1443
|
|
|
1433
1444
|
type AsyncOrSync<T> = Promise<T> | T;
|
|
1434
1445
|
interface ResilienceContext {
|
|
@@ -1487,4 +1498,4 @@ declare class Resilience implements ResiliencePolicy {
|
|
|
1487
1498
|
}
|
|
1488
1499
|
|
|
1489
1500
|
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 };
|
|
1490
|
-
export type { AnyEvents, AppLifecycleEventArgs, AppLifecycleState, 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 };
|
|
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 };
|
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-vVL0WG0n.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-vVL0WG0n.esm.js';
|
|
3
3
|
|
|
4
4
|
class NameValuePair {
|
|
5
5
|
Key;
|