@viewfly/core 1.2.2 → 1.2.5
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/bundles/index.d.ts +16 -10
- package/bundles/index.esm.js +305 -393
- package/bundles/index.js +305 -393
- package/package.json +2 -2
package/bundles/index.d.ts
CHANGED
|
@@ -245,12 +245,6 @@ interface ComponentAtom {
|
|
|
245
245
|
namespace: ElementNamespace;
|
|
246
246
|
}
|
|
247
247
|
type Atom = TextAtom | ElementAtom | ComponentAtom;
|
|
248
|
-
interface ComponentView {
|
|
249
|
-
atom: ComponentAtom;
|
|
250
|
-
host: NativeNode;
|
|
251
|
-
isParent: boolean;
|
|
252
|
-
rootHost: NativeNode;
|
|
253
|
-
}
|
|
254
248
|
|
|
255
249
|
type NativeNode = Record<string, any>;
|
|
256
250
|
declare abstract class NativeRenderer<ElementNode = NativeNode, TextNode = NativeNode> {
|
|
@@ -416,6 +410,12 @@ type JSXNode = JSX.Element | JSX.ElementClass | string | number | boolean | null
|
|
|
416
410
|
interface ComponentSetup<P = any> {
|
|
417
411
|
(props: P): (() => JSXNode) | ComponentInstance<P>;
|
|
418
412
|
}
|
|
413
|
+
interface ComponentViewMetadata {
|
|
414
|
+
atom: ComponentAtom;
|
|
415
|
+
host: NativeNode;
|
|
416
|
+
isParent: boolean;
|
|
417
|
+
rootHost: NativeNode;
|
|
418
|
+
}
|
|
419
419
|
/**
|
|
420
420
|
* Viewfly 组件管理类,用于管理组件的生命周期,上下文等
|
|
421
421
|
*/
|
|
@@ -423,11 +423,15 @@ declare class Component {
|
|
|
423
423
|
readonly parentComponent: Component | null;
|
|
424
424
|
readonly type: ComponentSetup;
|
|
425
425
|
props: Props;
|
|
426
|
-
readonly key?: Key
|
|
426
|
+
readonly key?: Key;
|
|
427
427
|
instance: ComponentInstance<Props>;
|
|
428
428
|
changedSubComponents: Set<Component>;
|
|
429
429
|
get dirty(): boolean;
|
|
430
430
|
get changed(): boolean;
|
|
431
|
+
/**
|
|
432
|
+
* @internal
|
|
433
|
+
*/
|
|
434
|
+
viewMetadata: ComponentViewMetadata;
|
|
431
435
|
unmountedCallbacks?: LifeCycleCallback[] | null;
|
|
432
436
|
mountCallbacks?: LifeCycleCallback[] | null;
|
|
433
437
|
propsChangedCallbacks?: PropsChangedCallback<any>[] | null;
|
|
@@ -439,11 +443,13 @@ declare class Component {
|
|
|
439
443
|
private isFirstRendering;
|
|
440
444
|
private refs;
|
|
441
445
|
private listener;
|
|
442
|
-
constructor(parentComponent: Component | null, type: ComponentSetup, props: Props, key?: Key
|
|
446
|
+
constructor(parentComponent: Component | null, type: ComponentSetup, props: Props, key?: Key);
|
|
443
447
|
markAsDirtied(): void;
|
|
444
448
|
markAsChanged(changedComponent?: Component): void;
|
|
445
449
|
render(update: (template: JSXNode, portalHost?: NativeNode) => void): void;
|
|
446
|
-
|
|
450
|
+
updateProps(newProps: Record<string, any>): void;
|
|
451
|
+
canUpdate(oldProps: Record<string, any>, newProps: Record<string, any>): boolean;
|
|
452
|
+
rerender(): JSXNode;
|
|
447
453
|
destroy(): void;
|
|
448
454
|
rendered(): void;
|
|
449
455
|
private invokePropsChangedHooks;
|
|
@@ -608,4 +614,4 @@ interface Module {
|
|
|
608
614
|
}
|
|
609
615
|
declare function viewfly<T extends NativeNode>(config: Config): Application<T>;
|
|
610
616
|
|
|
611
|
-
export { type AbstractInstanceType, type AbstractProvider, type AbstractType, type Application, type Atom, type ClassNames, type ClassProvider, Component, type ComponentAnnotation, type ComponentInstance, type ComponentSetup, type
|
|
617
|
+
export { type AbstractInstanceType, type AbstractProvider, type AbstractType, type Application, type Atom, type ClassNames, type ClassProvider, Component, type ComponentAnnotation, type ComponentInstance, type ComponentSetup, type ComponentViewMetadata, type Config, type ConstructorProvider, Context, type ContextProps, DynamicRef, type ElementNamespace, ElementNamespaceMap, type ExistingProvider, type ExtractInstanceType, type ExtractValueType, type FactoryProvider, ForwardRef, Fragment, Inject, type InjectDecorator, InjectFlags, Injectable, type InjectableDecorator, type InjectableOptions, InjectionToken, Injector, JSX, type JSXNode, JSXNodeFactory, type Key, type LifeCycleCallback, type Module, type NativeNode, NativeRenderer, type NormalizedProvider, NullInjector, Optional, type OptionalDecorator, Prop, type PropDecorator, type Props, type PropsChangedCallback, type ProvideScope, type Provider, type RefListener, type ReflectiveDependency, ReflectiveInjector, RootComponent, Scope, Self, type SelfDecorator, type Signal, SkipSelf, type SkipSelfDecorator, type StaticProvider, StaticRef, THROW_IF_NOT_FOUND, Type, type TypeProvider, type ValueProvider, type ViewFlyNode, type WatchCallback, computed, createContext, createDerived, createDynamicRef, createRef, createRenderer, createSignal, forwardRef, getCurrentInstance, getSetupContext, inject, jsx, jsxs, makeError, normalizeProvider, onMounted, onPropsChanged, onUnmounted, onUpdated, viewfly, watch, withAnnotation, withMemo };
|