update deps & fix compilation
This commit is contained in:
parent
50147329a4
commit
54b79e7f1e
@ -22,11 +22,11 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"child_process": "^1.0.2",
|
"child_process": "^1.0.2",
|
||||||
"chokidar": "^3.3.1",
|
"chokidar": "^3.3.1",
|
||||||
"commander": "^4.0.1",
|
"commander": "^4.1.0",
|
||||||
"keypress": "^0.2.1",
|
"keypress": "^0.2.1",
|
||||||
"nodejs-websocket": "^1.7.2",
|
"nodejs-websocket": "^1.7.2",
|
||||||
"qrcode-terminal": "^0.12.0",
|
"qrcode-terminal": "^0.12.0",
|
||||||
"rollup": "^1.28.0",
|
"rollup": "^1.29.0",
|
||||||
"shelljs": "^0.8.3",
|
"shelljs": "^0.8.3",
|
||||||
"source-map-merger": "^0.2.0",
|
"source-map-merger": "^0.2.0",
|
||||||
"typescript": "^3.7.4"
|
"typescript": "^3.7.4"
|
||||||
@ -34,4 +34,4 @@
|
|||||||
"publishConfig": {
|
"publishConfig": {
|
||||||
"registry": "https://registry.npmjs.org"
|
"registry": "https://registry.npmjs.org"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -11,10 +11,10 @@
|
|||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@rollup/plugin-commonjs": "^11.0.1",
|
"@rollup/plugin-commonjs": "^11.0.1",
|
||||||
"@rollup/plugin-node-resolve": "^6.1.0",
|
"@rollup/plugin-node-resolve": "^7.0.0",
|
||||||
"doric": "file:../doric-js",
|
"doric": "file:../doric-js",
|
||||||
"reflect-metadata": "^0.1.13",
|
"reflect-metadata": "^0.1.13",
|
||||||
"rollup": "^1.28.0",
|
"rollup": "^1.29.0",
|
||||||
"tslib": "^1.10.0",
|
"tslib": "^1.10.0",
|
||||||
"typescript": "^3.7.4"
|
"typescript": "^3.7.4"
|
||||||
}
|
}
|
||||||
|
@ -766,7 +766,7 @@ class Panel {
|
|||||||
this.context.shader.render(model);
|
this.context.shader.render(model);
|
||||||
}
|
}
|
||||||
hookBeforeNativeCall() {
|
hookBeforeNativeCall() {
|
||||||
if (Environment.platform !== 'h5') {
|
if (Environment.platform !== 'web') {
|
||||||
this.__root__.clean();
|
this.__root__.clean();
|
||||||
for (let map of this.headviews.values()) {
|
for (let map of this.headviews.values()) {
|
||||||
for (let v of map.values()) {
|
for (let v of map.values()) {
|
||||||
@ -776,7 +776,7 @@ class Panel {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
hookAfterNativeCall() {
|
hookAfterNativeCall() {
|
||||||
if (Environment.platform !== 'h5') {
|
if (Environment.platform !== 'web') {
|
||||||
//Here insert a native call to ensure the promise is resolved done.
|
//Here insert a native call to ensure the promise is resolved done.
|
||||||
nativeEmpty();
|
nativeEmpty();
|
||||||
if (this.__root__.isDirty()) {
|
if (this.__root__.isDirty()) {
|
||||||
|
@ -2225,7 +2225,7 @@ class Panel {
|
|||||||
this.context.shader.render(model);
|
this.context.shader.render(model);
|
||||||
}
|
}
|
||||||
hookBeforeNativeCall() {
|
hookBeforeNativeCall() {
|
||||||
if (Environment.platform !== 'h5') {
|
if (Environment.platform !== 'web') {
|
||||||
this.__root__.clean();
|
this.__root__.clean();
|
||||||
for (let map of this.headviews.values()) {
|
for (let map of this.headviews.values()) {
|
||||||
for (let v of map.values()) {
|
for (let v of map.values()) {
|
||||||
@ -2235,7 +2235,7 @@ class Panel {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
hookAfterNativeCall() {
|
hookAfterNativeCall() {
|
||||||
if (Environment.platform !== 'h5') {
|
if (Environment.platform !== 'web') {
|
||||||
//Here insert a native call to ensure the promise is resolved done.
|
//Here insert a native call to ensure the promise is resolved done.
|
||||||
nativeEmpty();
|
nativeEmpty();
|
||||||
if (this.__root__.isDirty()) {
|
if (this.__root__.isDirty()) {
|
||||||
|
608
doric-js/index.d.ts
vendored
608
doric-js/index.d.ts
vendored
@ -21,7 +21,7 @@ declare module 'doric/lib/src/runtime/global' {
|
|||||||
global {
|
global {
|
||||||
const context: BridgeContext;
|
const context: BridgeContext;
|
||||||
const Environment: {
|
const Environment: {
|
||||||
platform: "Android" | "iOS" | "Qt" | "h5";
|
platform: "Android" | "iOS" | "Qt" | "web";
|
||||||
platformVersion: string;
|
platformVersion: string;
|
||||||
appName: string;
|
appName: string;
|
||||||
appVersion: string;
|
appVersion: string;
|
||||||
@ -31,10 +31,10 @@ declare module 'doric/lib/src/runtime/global' {
|
|||||||
[index: string]: number | string | boolean | object | undefined;
|
[index: string]: number | string | boolean | object | undefined;
|
||||||
};
|
};
|
||||||
function Entry(constructor: {
|
function Entry(constructor: {
|
||||||
new(...args: any[]): {};
|
new (...args: any[]): {};
|
||||||
}): any;
|
}): any;
|
||||||
}
|
}
|
||||||
export { };
|
export {};
|
||||||
}
|
}
|
||||||
|
|
||||||
declare module 'doric/lib/src/ui/index.ui' {
|
declare module 'doric/lib/src/ui/index.ui' {
|
||||||
@ -91,157 +91,157 @@ declare module 'doric/lib/src/ui/view' {
|
|||||||
import { IAnimation } from "doric/lib/src/ui/animation";
|
import { IAnimation } from "doric/lib/src/ui/animation";
|
||||||
export function Property(target: Object, propKey: string): void;
|
export function Property(target: Object, propKey: string): void;
|
||||||
export interface IView {
|
export interface IView {
|
||||||
width?: number;
|
width?: number;
|
||||||
height?: number;
|
height?: number;
|
||||||
backgroundColor?: Color | GradientColor;
|
backgroundColor?: Color | GradientColor;
|
||||||
corners?: number | {
|
corners?: number | {
|
||||||
leftTop?: number;
|
leftTop?: number;
|
||||||
rightTop?: number;
|
rightTop?: number;
|
||||||
leftBottom?: number;
|
leftBottom?: number;
|
||||||
rightBottom?: number;
|
rightBottom?: number;
|
||||||
};
|
};
|
||||||
border?: {
|
border?: {
|
||||||
width: number;
|
width: number;
|
||||||
color: Color;
|
color: Color;
|
||||||
};
|
};
|
||||||
shadow?: {
|
shadow?: {
|
||||||
color: Color;
|
color: Color;
|
||||||
opacity: number;
|
opacity: number;
|
||||||
radius: number;
|
radius: number;
|
||||||
offsetX: number;
|
offsetX: number;
|
||||||
offsetY: number;
|
offsetY: number;
|
||||||
};
|
};
|
||||||
/**
|
/**
|
||||||
* float [0,..1]
|
* float [0,..1]
|
||||||
*/
|
*/
|
||||||
alpha?: number;
|
alpha?: number;
|
||||||
hidden?: boolean;
|
hidden?: boolean;
|
||||||
padding?: {
|
padding?: {
|
||||||
left?: number;
|
left?: number;
|
||||||
right?: number;
|
right?: number;
|
||||||
top?: number;
|
top?: number;
|
||||||
bottom?: number;
|
bottom?: number;
|
||||||
};
|
};
|
||||||
layoutConfig?: LayoutConfig;
|
layoutConfig?: LayoutConfig;
|
||||||
onClick?: Function;
|
onClick?: Function;
|
||||||
identifier?: string;
|
identifier?: string;
|
||||||
/**++++++++++transform++++++++++*/
|
/**++++++++++transform++++++++++*/
|
||||||
translationX?: number;
|
translationX?: number;
|
||||||
translationY?: number;
|
translationY?: number;
|
||||||
scaleX?: number;
|
scaleX?: number;
|
||||||
scaleY?: number;
|
scaleY?: number;
|
||||||
/**
|
/**
|
||||||
* float [0,..1]
|
* float [0,..1]
|
||||||
*/
|
*/
|
||||||
pivotX?: number;
|
pivotX?: number;
|
||||||
/**
|
/**
|
||||||
* float [0,..1]
|
* float [0,..1]
|
||||||
*/
|
*/
|
||||||
pivotY?: number;
|
pivotY?: number;
|
||||||
/**
|
/**
|
||||||
* rotation*PI
|
* rotation*PI
|
||||||
*/
|
*/
|
||||||
rotation?: number;
|
rotation?: number;
|
||||||
}
|
}
|
||||||
export type NativeViewModel = {
|
export type NativeViewModel = {
|
||||||
id: string;
|
id: string;
|
||||||
type: string;
|
type: string;
|
||||||
props: {
|
props: {
|
||||||
[index: string]: Model;
|
[index: string]: Model;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
export abstract class View implements Modeling, IView {
|
export abstract class View implements Modeling, IView {
|
||||||
width: number;
|
|
||||||
height: number;
|
|
||||||
x: number;
|
|
||||||
y: number;
|
|
||||||
backgroundColor?: Color | GradientColor;
|
|
||||||
corners?: number | {
|
|
||||||
leftTop?: number;
|
|
||||||
rightTop?: number;
|
|
||||||
leftBottom?: number;
|
|
||||||
rightBottom?: number;
|
|
||||||
};
|
|
||||||
border?: {
|
|
||||||
width: number;
|
width: number;
|
||||||
color: Color;
|
height: number;
|
||||||
};
|
|
||||||
shadow?: {
|
|
||||||
color: Color;
|
|
||||||
opacity: number;
|
|
||||||
radius: number;
|
|
||||||
offsetX: number;
|
|
||||||
offsetY: number;
|
|
||||||
};
|
|
||||||
alpha?: number;
|
|
||||||
hidden?: boolean;
|
|
||||||
viewId: string;
|
|
||||||
padding?: {
|
|
||||||
left?: number;
|
|
||||||
right?: number;
|
|
||||||
top?: number;
|
|
||||||
bottom?: number;
|
|
||||||
};
|
|
||||||
layoutConfig?: LayoutConfig;
|
|
||||||
onClick?: Function;
|
|
||||||
superview?: Superview;
|
|
||||||
callbacks: Map<String, Function>;
|
|
||||||
constructor();
|
|
||||||
/** Anchor start*/
|
|
||||||
get left(): number;
|
|
||||||
set left(v: number);
|
|
||||||
get right(): number;
|
|
||||||
set right(v: number);
|
|
||||||
get top(): number;
|
|
||||||
set top(v: number);
|
|
||||||
get bottom(): number;
|
|
||||||
set bottom(v: number);
|
|
||||||
get centerX(): number;
|
|
||||||
get centerY(): number;
|
|
||||||
set centerX(v: number);
|
|
||||||
set centerY(v: number);
|
|
||||||
get dirtyProps(): {
|
|
||||||
[index: string]: Model;
|
|
||||||
};
|
|
||||||
nativeViewModel: NativeViewModel;
|
|
||||||
onPropertyChanged(propKey: string, oldV: Model, newV: Model): void;
|
|
||||||
clean(): void;
|
|
||||||
isDirty(): boolean;
|
|
||||||
responseCallback(id: string, ...args: any): any;
|
|
||||||
toModel(): NativeViewModel;
|
|
||||||
let(block: (it: this) => void): void;
|
|
||||||
also(block: (it: this) => void): this;
|
|
||||||
apply(config: IView): this;
|
|
||||||
in(group: Group): this;
|
|
||||||
nativeChannel(context: any, name: string): (args?: any) => Promise<any>;
|
|
||||||
getWidth(context: BridgeContext): Promise<number>;
|
|
||||||
getHeight(context: BridgeContext): Promise<number>;
|
|
||||||
getLocationOnScreen(context: BridgeContext): Promise<{
|
|
||||||
x: number;
|
x: number;
|
||||||
y: number;
|
y: number;
|
||||||
}>;
|
backgroundColor?: Color | GradientColor;
|
||||||
/**++++++++++transform++++++++++*/
|
corners?: number | {
|
||||||
translationX?: number;
|
leftTop?: number;
|
||||||
translationY?: number;
|
rightTop?: number;
|
||||||
scaleX?: number;
|
leftBottom?: number;
|
||||||
scaleY?: number;
|
rightBottom?: number;
|
||||||
pivotX?: number;
|
};
|
||||||
pivotY?: number;
|
border?: {
|
||||||
rotation?: number;
|
width: number;
|
||||||
/**----------transform----------*/
|
color: Color;
|
||||||
doAnimation(context: BridgeContext, animation: IAnimation): Promise<void>;
|
};
|
||||||
|
shadow?: {
|
||||||
|
color: Color;
|
||||||
|
opacity: number;
|
||||||
|
radius: number;
|
||||||
|
offsetX: number;
|
||||||
|
offsetY: number;
|
||||||
|
};
|
||||||
|
alpha?: number;
|
||||||
|
hidden?: boolean;
|
||||||
|
viewId: string;
|
||||||
|
padding?: {
|
||||||
|
left?: number;
|
||||||
|
right?: number;
|
||||||
|
top?: number;
|
||||||
|
bottom?: number;
|
||||||
|
};
|
||||||
|
layoutConfig?: LayoutConfig;
|
||||||
|
onClick?: Function;
|
||||||
|
superview?: Superview;
|
||||||
|
callbacks: Map<String, Function>;
|
||||||
|
constructor();
|
||||||
|
/** Anchor start*/
|
||||||
|
get left(): number;
|
||||||
|
set left(v: number);
|
||||||
|
get right(): number;
|
||||||
|
set right(v: number);
|
||||||
|
get top(): number;
|
||||||
|
set top(v: number);
|
||||||
|
get bottom(): number;
|
||||||
|
set bottom(v: number);
|
||||||
|
get centerX(): number;
|
||||||
|
get centerY(): number;
|
||||||
|
set centerX(v: number);
|
||||||
|
set centerY(v: number);
|
||||||
|
get dirtyProps(): {
|
||||||
|
[index: string]: Model;
|
||||||
|
};
|
||||||
|
nativeViewModel: NativeViewModel;
|
||||||
|
onPropertyChanged(propKey: string, oldV: Model, newV: Model): void;
|
||||||
|
clean(): void;
|
||||||
|
isDirty(): boolean;
|
||||||
|
responseCallback(id: string, ...args: any): any;
|
||||||
|
toModel(): NativeViewModel;
|
||||||
|
let(block: (it: this) => void): void;
|
||||||
|
also(block: (it: this) => void): this;
|
||||||
|
apply(config: IView): this;
|
||||||
|
in(group: Group): this;
|
||||||
|
nativeChannel(context: any, name: string): (args?: any) => Promise<any>;
|
||||||
|
getWidth(context: BridgeContext): Promise<number>;
|
||||||
|
getHeight(context: BridgeContext): Promise<number>;
|
||||||
|
getLocationOnScreen(context: BridgeContext): Promise<{
|
||||||
|
x: number;
|
||||||
|
y: number;
|
||||||
|
}>;
|
||||||
|
/**++++++++++transform++++++++++*/
|
||||||
|
translationX?: number;
|
||||||
|
translationY?: number;
|
||||||
|
scaleX?: number;
|
||||||
|
scaleY?: number;
|
||||||
|
pivotX?: number;
|
||||||
|
pivotY?: number;
|
||||||
|
rotation?: number;
|
||||||
|
/**----------transform----------*/
|
||||||
|
doAnimation(context: BridgeContext, animation: IAnimation): Promise<void>;
|
||||||
}
|
}
|
||||||
export abstract class Superview extends View {
|
export abstract class Superview extends View {
|
||||||
subviewById(id: string): View | undefined;
|
subviewById(id: string): View | undefined;
|
||||||
abstract allSubviews(): Iterable<View>;
|
abstract allSubviews(): Iterable<View>;
|
||||||
isDirty(): boolean;
|
isDirty(): boolean;
|
||||||
clean(): void;
|
clean(): void;
|
||||||
toModel(): NativeViewModel;
|
toModel(): NativeViewModel;
|
||||||
}
|
}
|
||||||
export abstract class Group extends Superview {
|
export abstract class Group extends Superview {
|
||||||
readonly children: View[];
|
readonly children: View[];
|
||||||
allSubviews(): View[];
|
allSubviews(): View[];
|
||||||
addChild(view: View): void;
|
addChild(view: View): void;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -270,124 +270,124 @@ declare module 'doric/lib/src/ui/animation' {
|
|||||||
import { Modeling, Model } from "doric/lib/src/util/types";
|
import { Modeling, Model } from "doric/lib/src/util/types";
|
||||||
export type AnimatedKey = "translationX" | "translationY" | "scaleX" | "scaleY" | "rotation" | "pivotX" | "pivotY";
|
export type AnimatedKey = "translationX" | "translationY" | "scaleX" | "scaleY" | "rotation" | "pivotX" | "pivotY";
|
||||||
export enum RepeatMode {
|
export enum RepeatMode {
|
||||||
RESTART = 1,
|
RESTART = 1,
|
||||||
REVERSE = 2
|
REVERSE = 2
|
||||||
}
|
}
|
||||||
export interface IAnimation extends Modeling {
|
export interface IAnimation extends Modeling {
|
||||||
duration: number;
|
duration: number;
|
||||||
delay?: number;
|
delay?: number;
|
||||||
}
|
}
|
||||||
export interface Changeable {
|
export interface Changeable {
|
||||||
fromValue: number;
|
fromValue: number;
|
||||||
toValue: number;
|
toValue: number;
|
||||||
key: AnimatedKey;
|
key: AnimatedKey;
|
||||||
repeatCount?: number;
|
repeatCount?: number;
|
||||||
repeatMode?: RepeatMode;
|
repeatMode?: RepeatMode;
|
||||||
}
|
}
|
||||||
export enum FillMode {
|
export enum FillMode {
|
||||||
/**
|
/**
|
||||||
* The receiver is removed from the presentation when the animation is completed.
|
* The receiver is removed from the presentation when the animation is completed.
|
||||||
*/
|
*/
|
||||||
Removed = 0,
|
Removed = 0,
|
||||||
/**
|
/**
|
||||||
* The receiver remains visible in its final state when the animation is completed.
|
* The receiver remains visible in its final state when the animation is completed.
|
||||||
*/
|
*/
|
||||||
Forward = 1,
|
Forward = 1,
|
||||||
/**
|
/**
|
||||||
* The receiver clamps values before zero to zero when the animation is completed.
|
* The receiver clamps values before zero to zero when the animation is completed.
|
||||||
*/
|
*/
|
||||||
Backward = 2,
|
Backward = 2,
|
||||||
/**
|
/**
|
||||||
* The receiver clamps values at both ends of the object’s time space
|
* The receiver clamps values at both ends of the object’s time space
|
||||||
*/
|
*/
|
||||||
Both = 3
|
Both = 3
|
||||||
}
|
}
|
||||||
export enum TimingFunction {
|
export enum TimingFunction {
|
||||||
/**
|
/**
|
||||||
* The system default timing function. Use this function to ensure that the timing of your animations matches that of most system animations.
|
* The system default timing function. Use this function to ensure that the timing of your animations matches that of most system animations.
|
||||||
*/
|
*/
|
||||||
Default = 0,
|
Default = 0,
|
||||||
/**
|
/**
|
||||||
* Linear pacing, which causes an animation to occur evenly over its duration.
|
* Linear pacing, which causes an animation to occur evenly over its duration.
|
||||||
*/
|
*/
|
||||||
Linear = 1,
|
Linear = 1,
|
||||||
/**
|
/**
|
||||||
* Ease-in pacing, which causes an animation to begin slowly and then speed up as it progresses.
|
* Ease-in pacing, which causes an animation to begin slowly and then speed up as it progresses.
|
||||||
*/
|
*/
|
||||||
EaseIn = 2,
|
EaseIn = 2,
|
||||||
/**
|
/**
|
||||||
* Ease-out pacing, which causes an animation to begin quickly and then slow as it progresses.
|
* Ease-out pacing, which causes an animation to begin quickly and then slow as it progresses.
|
||||||
*/
|
*/
|
||||||
EaseOut = 3,
|
EaseOut = 3,
|
||||||
/**
|
/**
|
||||||
* Ease-in-ease-out pacing, which causes an animation to begin slowly, accelerate through the middle of its duration, and then slow again before completing.
|
* Ease-in-ease-out pacing, which causes an animation to begin slowly, accelerate through the middle of its duration, and then slow again before completing.
|
||||||
*/
|
*/
|
||||||
EaseInEaseOut = 4
|
EaseInEaseOut = 4
|
||||||
}
|
}
|
||||||
abstract class Animation implements IAnimation {
|
abstract class Animation implements IAnimation {
|
||||||
changeables: Map<AnimatedKey, Changeable>;
|
changeables: Map<AnimatedKey, Changeable>;
|
||||||
duration: number;
|
|
||||||
repeatCount?: number;
|
|
||||||
repeatMode?: RepeatMode;
|
|
||||||
delay?: number;
|
|
||||||
fillMode: FillMode;
|
|
||||||
timingFunction?: TimingFunction;
|
|
||||||
toModel(): {
|
|
||||||
type: string;
|
|
||||||
delay: number | undefined;
|
|
||||||
duration: number;
|
duration: number;
|
||||||
changeables: {
|
repeatCount?: number;
|
||||||
key: AnimatedKey;
|
repeatMode?: RepeatMode;
|
||||||
fromValue: number;
|
delay?: number;
|
||||||
toValue: number;
|
|
||||||
}[];
|
|
||||||
repeatCount: number | undefined;
|
|
||||||
repeatMode: RepeatMode | undefined;
|
|
||||||
fillMode: FillMode;
|
fillMode: FillMode;
|
||||||
timingFunction: TimingFunction | undefined;
|
timingFunction?: TimingFunction;
|
||||||
};
|
toModel(): {
|
||||||
|
type: string;
|
||||||
|
delay: number | undefined;
|
||||||
|
duration: number;
|
||||||
|
changeables: {
|
||||||
|
key: AnimatedKey;
|
||||||
|
fromValue: number;
|
||||||
|
toValue: number;
|
||||||
|
}[];
|
||||||
|
repeatCount: number | undefined;
|
||||||
|
repeatMode: RepeatMode | undefined;
|
||||||
|
fillMode: FillMode;
|
||||||
|
timingFunction: TimingFunction | undefined;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
export class ScaleAnimation extends Animation {
|
export class ScaleAnimation extends Animation {
|
||||||
constructor();
|
constructor();
|
||||||
set fromScaleX(v: number);
|
set fromScaleX(v: number);
|
||||||
get fromScaleX(): number;
|
get fromScaleX(): number;
|
||||||
set toScaleX(v: number);
|
set toScaleX(v: number);
|
||||||
get toScaleX(): number;
|
get toScaleX(): number;
|
||||||
set fromScaleY(v: number);
|
set fromScaleY(v: number);
|
||||||
get fromScaleY(): number;
|
get fromScaleY(): number;
|
||||||
set toScaleY(v: number);
|
set toScaleY(v: number);
|
||||||
get toScaleY(): number;
|
get toScaleY(): number;
|
||||||
}
|
}
|
||||||
export class TranslationAnimation extends Animation {
|
export class TranslationAnimation extends Animation {
|
||||||
constructor();
|
constructor();
|
||||||
set fromTranslationX(v: number);
|
set fromTranslationX(v: number);
|
||||||
get fromTranslationX(): number;
|
get fromTranslationX(): number;
|
||||||
set toTranslationX(v: number);
|
set toTranslationX(v: number);
|
||||||
get toTranslationX(): number;
|
get toTranslationX(): number;
|
||||||
set fromTranslationY(v: number);
|
set fromTranslationY(v: number);
|
||||||
get fromTranslationY(): number;
|
get fromTranslationY(): number;
|
||||||
set toTranslationY(v: number);
|
set toTranslationY(v: number);
|
||||||
get toTranslationY(): number;
|
get toTranslationY(): number;
|
||||||
}
|
}
|
||||||
export class RotationAnimation extends Animation {
|
export class RotationAnimation extends Animation {
|
||||||
constructor();
|
constructor();
|
||||||
set fromRotation(v: number);
|
set fromRotation(v: number);
|
||||||
get fromRotation(): number;
|
get fromRotation(): number;
|
||||||
set toRotation(v: number);
|
set toRotation(v: number);
|
||||||
get toRotation(): number;
|
get toRotation(): number;
|
||||||
}
|
}
|
||||||
export class AnimationSet implements IAnimation {
|
export class AnimationSet implements IAnimation {
|
||||||
_duration: number;
|
_duration: number;
|
||||||
delay?: number;
|
delay?: number;
|
||||||
addAnimation(anim: IAnimation): void;
|
addAnimation(anim: IAnimation): void;
|
||||||
get duration(): number;
|
get duration(): number;
|
||||||
set duration(v: number);
|
set duration(v: number);
|
||||||
toModel(): {
|
toModel(): {
|
||||||
animations: Model;
|
animations: Model;
|
||||||
delay: number | undefined;
|
delay: number | undefined;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
export { };
|
export {};
|
||||||
}
|
}
|
||||||
|
|
||||||
declare module 'doric/lib/src/widget/layouts' {
|
declare module 'doric/lib/src/widget/layouts' {
|
||||||
@ -418,7 +418,7 @@ declare module 'doric/lib/src/widget/layouts' {
|
|||||||
export function stack(views: View[], config?: IStack): Stack;
|
export function stack(views: View[], config?: IStack): Stack;
|
||||||
export function hlayout(views: View[], config?: IHLayout): HLayout;
|
export function hlayout(views: View[], config?: IHLayout): HLayout;
|
||||||
export function vlayout(views: View[], config?: IVLayout): VLayout;
|
export function vlayout(views: View[], config?: IVLayout): VLayout;
|
||||||
export { };
|
export {};
|
||||||
}
|
}
|
||||||
|
|
||||||
declare module 'doric/lib/src/widget/text' {
|
declare module 'doric/lib/src/widget/text' {
|
||||||
@ -895,67 +895,67 @@ declare module 'doric/lib/src/util/layoutconfig' {
|
|||||||
import { Gravity } from "doric/lib/src/util/gravity";
|
import { Gravity } from "doric/lib/src/util/gravity";
|
||||||
import { Modeling } from "doric/lib/src/util/types";
|
import { Modeling } from "doric/lib/src/util/types";
|
||||||
export enum LayoutSpec {
|
export enum LayoutSpec {
|
||||||
/**
|
/**
|
||||||
* Depends on what's been set on width or height.
|
* Depends on what's been set on width or height.
|
||||||
*/
|
*/
|
||||||
JUST = 0,
|
JUST = 0,
|
||||||
/**
|
/**
|
||||||
* Depends on it's content.
|
* Depends on it's content.
|
||||||
*/
|
*/
|
||||||
FIT = 1,
|
FIT = 1,
|
||||||
/**
|
/**
|
||||||
* Extend as much as parent let it take.
|
* Extend as much as parent let it take.
|
||||||
*/
|
*/
|
||||||
MOST = 2
|
MOST = 2
|
||||||
}
|
}
|
||||||
export interface LayoutConfig {
|
export interface LayoutConfig {
|
||||||
widthSpec?: LayoutSpec;
|
widthSpec?: LayoutSpec;
|
||||||
heightSpec?: LayoutSpec;
|
heightSpec?: LayoutSpec;
|
||||||
margin?: {
|
margin?: {
|
||||||
left?: number;
|
left?: number;
|
||||||
right?: number;
|
right?: number;
|
||||||
top?: number;
|
top?: number;
|
||||||
bottom?: number;
|
bottom?: number;
|
||||||
};
|
};
|
||||||
alignment?: Gravity;
|
alignment?: Gravity;
|
||||||
weight?: number;
|
weight?: number;
|
||||||
}
|
}
|
||||||
export class LayoutConfigImpl implements LayoutConfig, Modeling {
|
export class LayoutConfigImpl implements LayoutConfig, Modeling {
|
||||||
widthSpec?: LayoutSpec;
|
widthSpec?: LayoutSpec;
|
||||||
heightSpec?: LayoutSpec;
|
heightSpec?: LayoutSpec;
|
||||||
margin?: {
|
margin?: {
|
||||||
left?: number;
|
left?: number;
|
||||||
right?: number;
|
right?: number;
|
||||||
top?: number;
|
top?: number;
|
||||||
bottom?: number;
|
bottom?: number;
|
||||||
};
|
};
|
||||||
alignment?: Gravity;
|
alignment?: Gravity;
|
||||||
weight?: number;
|
weight?: number;
|
||||||
fit(): this;
|
fit(): this;
|
||||||
most(): this;
|
most(): this;
|
||||||
just(): this;
|
just(): this;
|
||||||
configWidth(w: LayoutSpec): this;
|
configWidth(w: LayoutSpec): this;
|
||||||
configHeight(h: LayoutSpec): this;
|
configHeight(h: LayoutSpec): this;
|
||||||
configMargin(m: {
|
configMargin(m: {
|
||||||
left?: number;
|
left?: number;
|
||||||
right?: number;
|
right?: number;
|
||||||
top?: number;
|
top?: number;
|
||||||
bottom?: number;
|
bottom?: number;
|
||||||
}): this;
|
}): this;
|
||||||
configAlignment(a: Gravity): this;
|
configAlignment(a: Gravity): this;
|
||||||
configWeight(w: number): this;
|
configWeight(w: number): this;
|
||||||
toModel(): {
|
toModel(): {
|
||||||
widthSpec: LayoutSpec | undefined;
|
widthSpec: LayoutSpec | undefined;
|
||||||
heightSpec: LayoutSpec | undefined;
|
heightSpec: LayoutSpec | undefined;
|
||||||
margin: {
|
margin: {
|
||||||
left?: number | undefined;
|
left?: number | undefined;
|
||||||
right?: number | undefined;
|
right?: number | undefined;
|
||||||
top?: number | undefined;
|
top?: number | undefined;
|
||||||
bottom?: number | undefined;
|
bottom?: number | undefined;
|
||||||
} | undefined;
|
} | undefined;
|
||||||
alignment: number | undefined;
|
alignment: number | undefined;
|
||||||
weight: number | undefined;
|
weight: number | undefined;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
export function layoutConfig(): LayoutConfigImpl;
|
export function layoutConfig(): LayoutConfigImpl;
|
||||||
}
|
}
|
||||||
@ -982,7 +982,7 @@ declare module 'doric/lib/src/util/types' {
|
|||||||
bind(binder: Binder<T>): void;
|
bind(binder: Binder<T>): void;
|
||||||
static of<E>(v: E): Mutable<E>;
|
static of<E>(v: E): Mutable<E>;
|
||||||
}
|
}
|
||||||
export { };
|
export {};
|
||||||
}
|
}
|
||||||
|
|
||||||
declare module 'doric/lib/src/util/uniqueId' {
|
declare module 'doric/lib/src/util/uniqueId' {
|
||||||
@ -1010,7 +1010,7 @@ declare module 'doric/lib/src/pattern/provider' {
|
|||||||
}
|
}
|
||||||
export class Observable<M> implements IObservable<M> {
|
export class Observable<M> implements IObservable<M> {
|
||||||
constructor(provider: IProvider, clz: {
|
constructor(provider: IProvider, clz: {
|
||||||
new(...args: any[]): M;
|
new (...args: any[]): M;
|
||||||
});
|
});
|
||||||
addObserver(observer: Observer<M | undefined>): void;
|
addObserver(observer: Observer<M | undefined>): void;
|
||||||
removeObserver(observer: Observer<M | undefined>): void;
|
removeObserver(observer: Observer<M | undefined>): void;
|
||||||
@ -1019,20 +1019,20 @@ declare module 'doric/lib/src/pattern/provider' {
|
|||||||
export interface IProvider {
|
export interface IProvider {
|
||||||
provide(obj: Object): void;
|
provide(obj: Object): void;
|
||||||
acquire<T>(clz: {
|
acquire<T>(clz: {
|
||||||
new(...args: any[]): T;
|
new (...args: any[]): T;
|
||||||
}): T | undefined;
|
}): T | undefined;
|
||||||
remove<T>(clz: {
|
remove<T>(clz: {
|
||||||
new(...args: any[]): T;
|
new (...args: any[]): T;
|
||||||
}): void;
|
}): void;
|
||||||
clear(): void;
|
clear(): void;
|
||||||
observe<T>(clz: {
|
observe<T>(clz: {
|
||||||
new(...args: any[]): T;
|
new (...args: any[]): T;
|
||||||
}): Observable<T>;
|
}): Observable<T>;
|
||||||
}
|
}
|
||||||
export class Provider implements IProvider {
|
export class Provider implements IProvider {
|
||||||
provide(obj: Object): void;
|
provide(obj: Object): void;
|
||||||
acquire<T>(clz: {
|
acquire<T>(clz: {
|
||||||
new(...args: any[]): T;
|
new (...args: any[]): T;
|
||||||
}): T | undefined;
|
}): T | undefined;
|
||||||
remove<T>(clz: new (...args: any[]) => T): void;
|
remove<T>(clz: new (...args: any[]) => T): void;
|
||||||
clear(): void;
|
clear(): void;
|
||||||
|
@ -137,7 +137,7 @@ export class Panel {
|
|||||||
this.context.shader.render(model);
|
this.context.shader.render(model);
|
||||||
}
|
}
|
||||||
hookBeforeNativeCall() {
|
hookBeforeNativeCall() {
|
||||||
if (Environment.platform !== 'h5') {
|
if (Environment.platform !== 'web') {
|
||||||
this.__root__.clean();
|
this.__root__.clean();
|
||||||
for (let map of this.headviews.values()) {
|
for (let map of this.headviews.values()) {
|
||||||
for (let v of map.values()) {
|
for (let v of map.values()) {
|
||||||
@ -147,7 +147,7 @@ export class Panel {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
hookAfterNativeCall() {
|
hookAfterNativeCall() {
|
||||||
if (Environment.platform !== 'h5') {
|
if (Environment.platform !== 'web') {
|
||||||
//Here insert a native call to ensure the promise is resolved done.
|
//Here insert a native call to ensure the promise is resolved done.
|
||||||
nativeEmpty();
|
nativeEmpty();
|
||||||
if (this.__root__.isDirty()) {
|
if (this.__root__.isDirty()) {
|
||||||
|
@ -22,11 +22,11 @@
|
|||||||
},
|
},
|
||||||
"homepage": "https://github.com/doric-pub/doric#readme",
|
"homepage": "https://github.com/doric-pub/doric#readme",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@rollup/plugin-node-resolve": "^6.1.0",
|
"@rollup/plugin-node-resolve": "^7.0.0",
|
||||||
"@types/ws": "^6.0.4",
|
"@types/ws": "^6.0.4",
|
||||||
"dts-bundle": "^0.7.3",
|
"dts-bundle": "^0.7.3",
|
||||||
"reflect-metadata": "^0.1.13",
|
"reflect-metadata": "^0.1.13",
|
||||||
"rollup": "^1.28.0",
|
"rollup": "^1.29.0",
|
||||||
"tslib": "^1.10.0",
|
"tslib": "^1.10.0",
|
||||||
"typescript": "^3.7.4",
|
"typescript": "^3.7.4",
|
||||||
"ws": "^7.2.1"
|
"ws": "^7.2.1"
|
||||||
@ -34,4 +34,4 @@
|
|||||||
"publishConfig": {
|
"publishConfig": {
|
||||||
"registry": "https://registry.npmjs.org"
|
"registry": "https://registry.npmjs.org"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -156,7 +156,7 @@ export abstract class Panel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private hookBeforeNativeCall() {
|
private hookBeforeNativeCall() {
|
||||||
if (Environment.platform !== 'h5') {
|
if (Environment.platform !== 'web') {
|
||||||
this.__root__.clean()
|
this.__root__.clean()
|
||||||
for (let map of this.headviews.values()) {
|
for (let map of this.headviews.values()) {
|
||||||
for (let v of map.values()) {
|
for (let v of map.values()) {
|
||||||
@ -167,7 +167,7 @@ export abstract class Panel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private hookAfterNativeCall() {
|
private hookAfterNativeCall() {
|
||||||
if (Environment.platform !== 'h5') {
|
if (Environment.platform !== 'web') {
|
||||||
//Here insert a native call to ensure the promise is resolved done.
|
//Here insert a native call to ensure the promise is resolved done.
|
||||||
nativeEmpty()
|
nativeEmpty()
|
||||||
if (this.__root__.isDirty()) {
|
if (this.__root__.isDirty()) {
|
||||||
|
4
doric-web/dist/index.js
vendored
4
doric-web/dist/index.js
vendored
@ -2283,7 +2283,7 @@ class Panel {
|
|||||||
this.context.shader.render(model);
|
this.context.shader.render(model);
|
||||||
}
|
}
|
||||||
hookBeforeNativeCall() {
|
hookBeforeNativeCall() {
|
||||||
if (Environment.platform !== 'h5') {
|
if (Environment.platform !== 'web') {
|
||||||
this.__root__.clean();
|
this.__root__.clean();
|
||||||
for (let map of this.headviews.values()) {
|
for (let map of this.headviews.values()) {
|
||||||
for (let v of map.values()) {
|
for (let v of map.values()) {
|
||||||
@ -2293,7 +2293,7 @@ class Panel {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
hookAfterNativeCall() {
|
hookAfterNativeCall() {
|
||||||
if (Environment.platform !== 'h5') {
|
if (Environment.platform !== 'web') {
|
||||||
//Here insert a native call to ensure the promise is resolved done.
|
//Here insert a native call to ensure the promise is resolved done.
|
||||||
nativeEmpty();
|
nativeEmpty();
|
||||||
if (this.__root__.isDirty()) {
|
if (this.__root__.isDirty()) {
|
||||||
|
@ -21,13 +21,13 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@rollup/plugin-commonjs": "^11.0.1",
|
"@rollup/plugin-commonjs": "^11.0.1",
|
||||||
"@rollup/plugin-json": "^4.0.1",
|
"@rollup/plugin-json": "^4.0.1",
|
||||||
"@rollup/plugin-node-resolve": "^6.1.0",
|
"@rollup/plugin-node-resolve": "^7.0.0",
|
||||||
"axios": "^0.19.0",
|
"axios": "^0.19.1",
|
||||||
"doric": "file:../doric-js",
|
"doric": "file:../doric-js",
|
||||||
"rollup": "^1.28.0",
|
"rollup": "^1.29.0",
|
||||||
"typescript": "^3.7.4"
|
"typescript": "^3.7.4"
|
||||||
},
|
},
|
||||||
"publishConfig": {
|
"publishConfig": {
|
||||||
"registry": "https://registry.npmjs.org"
|
"registry": "https://registry.npmjs.org"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user