-
Notifications
You must be signed in to change notification settings - Fork 1.2k
/
omi.js
92 lines (84 loc) · 1.37 KB
/
omi.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
import { h, h as createElement } from './h'
import options from './options'
import WeElement from './we-element'
import { render } from './render'
import { define } from './define'
import { tag } from './tag'
import { cloneElement } from './clone-element'
import { getHost } from './get-host'
import { rpx } from './rpx'
import { classNames, extractClass } from './class'
import { o } from './o'
import htm from 'htm'
import { extend, get, set, bind, unbind } from './extend'
import JSONProxy from './proxy'
import { Fragment } from './util'
h.f = Fragment
const html = htm.bind(h)
function createRef() {
return {}
}
const $ = {}
const Component = WeElement
const defineElement = define
const elements = options.mapping
const omi = {
tag,
WeElement,
Component,
render,
h,
createElement,
options,
define,
cloneElement,
getHost,
rpx,
defineElement,
classNames,
extractClass,
createRef,
html,
htm,
o,
elements,
$,
extend,
get,
set,
bind,
unbind,
JSONProxy
}
options.root.Omi = omi
options.root.omi = omi
options.root.Omi.version = '6.17.0'
export default omi
export {
tag,
WeElement,
Component,
render,
h,
createElement,
options,
define,
cloneElement,
getHost,
rpx,
defineElement,
classNames,
extractClass,
createRef,
html,
htm,
o,
elements,
$,
extend,
get,
set,
bind,
unbind,
JSONProxy
}