@dcloudio/uni-app-x 0.1.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/index.d.ts +1 -0
- package/native/Event.d.ts +15 -0
- package/native/IApp.d.ts +26 -0
- package/native/IDocument.d.ts +24 -0
- package/native/INode.d.ts +46 -0
- package/native/IPage.d.ts +52 -0
- package/native/IPageManager.d.ts +11 -0
- package/native/ITabsNode.d.ts +35 -0
- package/native/MouseEvent.d.ts +9 -0
- package/native/NodeData.d.ts +9 -0
- package/native/PageEvent.d.ts +7 -0
- package/native/PageScrollEvent.d.ts +8 -0
- package/native/ResizeEvent.d.ts +10 -0
- package/native/TabTapEvent.d.ts +6 -0
- package/native/TouchEvent.d.ts +22 -0
- package/native/UniAppManager.d.ts +14 -0
- package/native/index.d.ts +16 -0
- package/package.json +8 -0
package/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/// <reference path='./native/index.d.ts' />
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/// <reference path='./INode.d.ts' />
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @package io.dcloud.uniapp.runtime
|
|
5
|
+
*/
|
|
6
|
+
declare class Event {
|
|
7
|
+
type: string
|
|
8
|
+
target: INode
|
|
9
|
+
currentTarget: INode
|
|
10
|
+
timeStamp: number
|
|
11
|
+
|
|
12
|
+
stopPropagation(): void
|
|
13
|
+
|
|
14
|
+
preventDefault(): void
|
|
15
|
+
}
|
package/native/IApp.d.ts
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/// <reference path='./IPageManager.d.ts' />
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @package io.dcloud.uniapp.runtime
|
|
5
|
+
*/
|
|
6
|
+
declare class IApp {
|
|
7
|
+
appid: string
|
|
8
|
+
pageManager: IPageManager
|
|
9
|
+
|
|
10
|
+
onEvent(event: string)
|
|
11
|
+
|
|
12
|
+
addEventListener(event: 'onShow' | 'onHide', callback: (event?: any) => void)
|
|
13
|
+
|
|
14
|
+
addKeyEventListener(
|
|
15
|
+
event: 'onBackButton',
|
|
16
|
+
callback: (event?: KeyEvent) => boolean
|
|
17
|
+
)
|
|
18
|
+
|
|
19
|
+
quit(): void
|
|
20
|
+
|
|
21
|
+
getAppStartDuration(): number
|
|
22
|
+
|
|
23
|
+
loadFontFace(options: LoadFontFaceOptions): void
|
|
24
|
+
|
|
25
|
+
getRedirectInfo(): Map<string, any | null>
|
|
26
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/// <reference path='./INode.d.ts' />
|
|
2
|
+
/// <reference path='./ITabsNode.d.ts' />
|
|
3
|
+
/// <reference path='./NodeData.d.ts' />
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @package io.dcloud.uniapp.runtime
|
|
7
|
+
*/
|
|
8
|
+
interface IDocument extends INode {
|
|
9
|
+
body: INode
|
|
10
|
+
|
|
11
|
+
getRealDomNodeById<T>(tag: string): ITabsNode | null
|
|
12
|
+
|
|
13
|
+
startRender(): unknown
|
|
14
|
+
|
|
15
|
+
createElement(tagName: string): INode
|
|
16
|
+
|
|
17
|
+
createElement(data: NodeData): INode
|
|
18
|
+
|
|
19
|
+
createComment(data: string): INode
|
|
20
|
+
|
|
21
|
+
notifyLayout(): void
|
|
22
|
+
|
|
23
|
+
runAsyncDomTask(fn: () => any | null, callback: (value: any | null) => void)
|
|
24
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @package io.dcloud.uniapp.runtime
|
|
3
|
+
*/
|
|
4
|
+
interface INode {
|
|
5
|
+
firstChild: INode | null
|
|
6
|
+
lastChild: INode | null
|
|
7
|
+
parentNode: INode | null
|
|
8
|
+
previousSibling: INode | null
|
|
9
|
+
nextSibling: INode | null
|
|
10
|
+
nextElementSibling: INode | null
|
|
11
|
+
childNodes: INode[]
|
|
12
|
+
tagName: string
|
|
13
|
+
nodeName: string
|
|
14
|
+
ext: Map<string, any>
|
|
15
|
+
dataset: Map<string, any | null>
|
|
16
|
+
attributes: Map<string, any | null>
|
|
17
|
+
style: CSSStyleDeclaration
|
|
18
|
+
|
|
19
|
+
getNodeId(): string
|
|
20
|
+
|
|
21
|
+
appendChild(aChild: INode): void
|
|
22
|
+
|
|
23
|
+
insertBefore(newChild: INode): void
|
|
24
|
+
|
|
25
|
+
insertBefore(newChild: INode, refChild: INode): void
|
|
26
|
+
|
|
27
|
+
setAttribute(key: string, value: unknown): void
|
|
28
|
+
|
|
29
|
+
getAttribute(key: string): unknown
|
|
30
|
+
|
|
31
|
+
hasAttribute(key: string): boolean
|
|
32
|
+
|
|
33
|
+
removeAttribute(key: string): void
|
|
34
|
+
|
|
35
|
+
updateStyle(map: Map<string, any>): void
|
|
36
|
+
|
|
37
|
+
getBoundingClientRect(): DOMRect
|
|
38
|
+
|
|
39
|
+
addEventListener(type: string, callback: (event: Event) => void): void
|
|
40
|
+
|
|
41
|
+
removeEventListener(type: string): void
|
|
42
|
+
|
|
43
|
+
removeChild(aChild: INode): INode
|
|
44
|
+
|
|
45
|
+
remove(): void
|
|
46
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/// <reference path='./INode.d.ts' />
|
|
2
|
+
/// <reference path='./IDocument.d.ts' />
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @package io.dcloud.uniapp.runtime
|
|
6
|
+
*/
|
|
7
|
+
interface IPage extends INode {
|
|
8
|
+
pageId: string
|
|
9
|
+
document: IDocument
|
|
10
|
+
|
|
11
|
+
createDocument(data: unknown): IDocument
|
|
12
|
+
|
|
13
|
+
show(options: any, callback?: () => void): void
|
|
14
|
+
|
|
15
|
+
close(options: any, callback: () => void): void
|
|
16
|
+
|
|
17
|
+
startRender(callback?: () => void): void
|
|
18
|
+
|
|
19
|
+
stopRender(): void
|
|
20
|
+
|
|
21
|
+
addPageEventListener(
|
|
22
|
+
type:
|
|
23
|
+
| 'onReady'
|
|
24
|
+
| 'onShow'
|
|
25
|
+
| 'onHide'
|
|
26
|
+
| 'onTabItemTap'
|
|
27
|
+
| 'onUnload'
|
|
28
|
+
| 'onReachBottom'
|
|
29
|
+
| 'onPullDownRefresh'
|
|
30
|
+
| 'onPageScroll'
|
|
31
|
+
| 'onResize',
|
|
32
|
+
callback: (event: PageEvent) => void
|
|
33
|
+
): void
|
|
34
|
+
|
|
35
|
+
addPageScrollEventListener(callback: (event: PageScrollEvent) => void): void
|
|
36
|
+
|
|
37
|
+
viewToTempFilePath(options: ViewToTempFilePathOptions): void
|
|
38
|
+
|
|
39
|
+
getPageRenderDuration(): number
|
|
40
|
+
|
|
41
|
+
getPageLayoutDuration(): number
|
|
42
|
+
|
|
43
|
+
getFirstPageRenderDuration(): number
|
|
44
|
+
|
|
45
|
+
getFirstPageLayoutDuration(): number
|
|
46
|
+
|
|
47
|
+
startPullDownRefresh(): void
|
|
48
|
+
|
|
49
|
+
stopPullDownRefresh(): void
|
|
50
|
+
|
|
51
|
+
loadFontFace(options: LoadFontFaceOptions): void
|
|
52
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/// <reference path='./INode.d.ts' />
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @package io.dcloud.uniapp.runtime
|
|
5
|
+
*/
|
|
6
|
+
interface ITabsNode extends INode {
|
|
7
|
+
appendItem(pageId: string): void
|
|
8
|
+
|
|
9
|
+
appendItem(itemNode: INode): void
|
|
10
|
+
|
|
11
|
+
initTabBar(style: Map<string, any | null>): void
|
|
12
|
+
|
|
13
|
+
appendCustomTabBar(tabBar: INode, direction: string): void
|
|
14
|
+
|
|
15
|
+
switchSelect(pageId: string, index: Int): void
|
|
16
|
+
|
|
17
|
+
hideTabBar(op: Map<string, any | null>): void
|
|
18
|
+
|
|
19
|
+
showTabBar(op: Map<string, any | null>): void
|
|
20
|
+
|
|
21
|
+
setTabBarBadge(op: Map<string, any | null>): void
|
|
22
|
+
|
|
23
|
+
removeTabBarBadge(op: Map<string, any | null>): void
|
|
24
|
+
|
|
25
|
+
showTabBarRedDot(op: Map<string, any | null>): void
|
|
26
|
+
|
|
27
|
+
hideTabBarRedDot(op: Map<string, any | null>): void
|
|
28
|
+
|
|
29
|
+
setTabBarStyle(op: Map<string, any | null>): void
|
|
30
|
+
|
|
31
|
+
setTabBarItem(op: Map<string, any | null>): void
|
|
32
|
+
|
|
33
|
+
isTabBarVisible: boolean
|
|
34
|
+
currentItemId: string | null
|
|
35
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/// <reference path='./Event.d.ts' />
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @package io.dcloud.uniapp.runtime
|
|
5
|
+
*/
|
|
6
|
+
declare class Touch {
|
|
7
|
+
clientX: number
|
|
8
|
+
clientY: number
|
|
9
|
+
identifier: number
|
|
10
|
+
pageX: number
|
|
11
|
+
pageY: number
|
|
12
|
+
screenX: number
|
|
13
|
+
screenY: number
|
|
14
|
+
force: number
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* @package io.dcloud.uniapp.runtime
|
|
19
|
+
*/
|
|
20
|
+
declare class TouchEvent extends Event {
|
|
21
|
+
touches: Touch[]
|
|
22
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/// <reference path='./IPage.d.ts' />
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @package io.dcloud.uniapp.appframe
|
|
5
|
+
*/
|
|
6
|
+
declare const UniAppManager: {
|
|
7
|
+
getCurrentApp(): CurrentApp
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
interface CurrentApp {
|
|
11
|
+
pageManager: {
|
|
12
|
+
createPage(url: string, id: unknown, styles: unknown): IPage
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/// <reference path='./Event.d.ts' />
|
|
2
|
+
/// <reference path='./Event.d.ts' />
|
|
3
|
+
/// <reference path='./IApp.d.ts' />
|
|
4
|
+
/// <reference path='./IDocument.d.ts' />
|
|
5
|
+
/// <reference path='./INode.d.ts' />
|
|
6
|
+
/// <reference path='./IPage.d.ts' />
|
|
7
|
+
/// <reference path='./IPageManager.d.ts' />
|
|
8
|
+
/// <reference path='./ITabsNode.d.ts' />
|
|
9
|
+
/// <reference path='./MouseEvent.d.ts' />
|
|
10
|
+
/// <reference path='./NodeData.d.ts' />
|
|
11
|
+
/// <reference path='./PageEvent.d.ts' />
|
|
12
|
+
/// <reference path='./PageScrollEvent.d.ts' />
|
|
13
|
+
/// <reference path='./ResizeEvent.d.ts' />
|
|
14
|
+
/// <reference path='./TabTapEvent.d.ts' />
|
|
15
|
+
/// <reference path='./TouchEvent.d.ts' />
|
|
16
|
+
/// <reference path='./UniAppManager.d.ts' />
|