@tarojs/runtime 4.0.0-alpha.0 → 4.0.0-alpha.10
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/LICENSE +11 -4
- package/dist/bom/URL.d.ts +51 -0
- package/dist/bom/URL.js +221 -0
- package/dist/bom/URL.js.map +1 -0
- package/dist/bom/URLSearchParams.d.ts +1 -0
- package/dist/bom/URLSearchParams.js +123 -0
- package/dist/bom/URLSearchParams.js.map +1 -0
- package/dist/bom/document.d.ts +2 -0
- package/dist/bom/document.js +39 -0
- package/dist/bom/document.js.map +1 -0
- package/dist/bom/getComputedStyle.d.ts +4 -0
- package/dist/bom/getComputedStyle.js +8 -0
- package/dist/bom/getComputedStyle.js.map +1 -0
- package/dist/bom/history.d.ts +30 -0
- package/dist/bom/history.js +121 -0
- package/dist/bom/history.js.map +1 -0
- package/dist/bom/location.d.ts +37 -0
- package/dist/bom/location.js +240 -0
- package/dist/bom/location.js.map +1 -0
- package/dist/bom/navigator.d.ts +1 -0
- package/dist/bom/navigator.js +24 -0
- package/dist/bom/navigator.js.map +1 -0
- package/dist/bom/raf.d.ts +5 -0
- package/dist/bom/raf.js +33 -0
- package/dist/bom/raf.js.map +1 -0
- package/dist/bom/window.d.ts +25 -0
- package/dist/bom/window.js +92 -0
- package/dist/bom/window.js.map +1 -0
- package/dist/constants/index.d.ts +59 -0
- package/dist/constants/index.js +63 -0
- package/dist/constants/index.js.map +1 -0
- package/dist/current.d.ts +19 -0
- package/dist/current.js +9 -0
- package/dist/current.js.map +1 -0
- package/dist/dom/anchor-element.d.ts +13 -0
- package/dist/dom/anchor-element.js +54 -0
- package/dist/dom/anchor-element.js.map +1 -0
- package/dist/dom/class-list.d.ts +16 -0
- package/dist/dom/class-list.js +92 -0
- package/dist/dom/class-list.js.map +1 -0
- package/dist/dom/document.d.ts +21 -0
- package/dist/dom/document.js +80 -0
- package/dist/dom/document.js.map +1 -0
- package/dist/dom/element.d.ts +39 -0
- package/dist/dom/element.js +315 -0
- package/dist/dom/element.js.map +1 -0
- package/dist/dom/event-source.d.ts +7 -0
- package/dist/dom/event-source.js +17 -0
- package/dist/dom/event-source.js.map +1 -0
- package/dist/dom/event-target.d.ts +7 -0
- package/dist/dom/event-target.js +78 -0
- package/dist/dom/event-target.js.map +1 -0
- package/dist/dom/event.d.ts +23 -0
- package/dist/dom/event.js +151 -0
- package/dist/dom/event.js.map +1 -0
- package/dist/dom/form.d.ts +9 -0
- package/dist/dom/form.js +38 -0
- package/dist/dom/form.js.map +1 -0
- package/dist/dom/node.d.ts +76 -0
- package/dist/dom/node.js +292 -0
- package/dist/dom/node.js.map +1 -0
- package/dist/dom/node_types.d.ts +10 -0
- package/dist/dom/root.d.ts +15 -0
- package/dist/dom/root.js +169 -0
- package/dist/dom/root.js.map +1 -0
- package/dist/dom/style.d.ts +14 -0
- package/dist/dom/style.js +168 -0
- package/dist/dom/style.js.map +1 -0
- package/dist/dom/style_properties.d.ts +3 -0
- package/dist/dom/style_properties.js +186 -0
- package/dist/dom/style_properties.js.map +1 -0
- package/dist/dom/svg.d.ts +3 -0
- package/dist/dom/svg.js +8 -0
- package/dist/dom/svg.js.map +1 -0
- package/dist/dom/text.d.ts +14 -0
- package/dist/dom/text.js +41 -0
- package/dist/dom/text.js.map +1 -0
- package/dist/dom/transfer.d.ts +7 -0
- package/dist/dom/transfer.js +15 -0
- package/dist/dom/transfer.js.map +1 -0
- package/dist/dom/tree.d.ts +4 -0
- package/dist/dom/tree.js +38 -0
- package/dist/dom/tree.js.map +1 -0
- package/dist/dom-external/element.d.ts +3 -0
- package/dist/dom-external/element.js +29 -0
- package/dist/dom-external/element.js.map +1 -0
- package/dist/dom-external/index.d.ts +1 -0
- package/dist/dom-external/index.js +40 -0
- package/dist/dom-external/index.js.map +1 -0
- package/dist/dom-external/inner-html/html.d.ts +2 -0
- package/dist/dom-external/inner-html/html.js +28 -0
- package/dist/dom-external/inner-html/html.js.map +1 -0
- package/dist/dom-external/inner-html/parser.d.ts +25 -0
- package/dist/dom-external/inner-html/parser.js +216 -0
- package/dist/dom-external/inner-html/parser.js.map +1 -0
- package/dist/dom-external/inner-html/scaner.d.ts +30 -0
- package/dist/dom-external/inner-html/scaner.js +304 -0
- package/dist/dom-external/inner-html/scaner.js.map +1 -0
- package/dist/dom-external/inner-html/style.d.ts +27 -0
- package/dist/dom-external/inner-html/style.js +235 -0
- package/dist/dom-external/inner-html/style.js.map +1 -0
- package/dist/dom-external/inner-html/tags.d.ts +8 -0
- package/dist/dom-external/inner-html/tags.js +26 -0
- package/dist/dom-external/inner-html/tags.js.map +1 -0
- package/dist/dom-external/inner-html/utils.d.ts +1 -0
- package/dist/dom-external/inner-html/utils.js +12 -0
- package/dist/dom-external/inner-html/utils.js.map +1 -0
- package/dist/dom-external/mutation-observer/implements.d.ts +52 -0
- package/dist/dom-external/mutation-observer/implements.js +108 -0
- package/dist/dom-external/mutation-observer/implements.js.map +1 -0
- package/dist/dom-external/mutation-observer/index.d.ts +13 -0
- package/dist/dom-external/mutation-observer/index.js +35 -0
- package/dist/dom-external/mutation-observer/index.js.map +1 -0
- package/dist/dom-external/mutation-observer/record.d.ts +24 -0
- package/dist/dom-external/node.d.ts +11 -0
- package/dist/dom-external/node.js +75 -0
- package/dist/dom-external/node.js.map +1 -0
- package/dist/dsl/common.d.ts +15 -0
- package/dist/dsl/common.js +337 -0
- package/dist/dsl/common.js.map +1 -0
- package/dist/dsl/instance.d.ts +84 -0
- package/dist/emitter/emitter.d.ts +4 -0
- package/dist/emitter/emitter.js +7 -0
- package/dist/emitter/emitter.js.map +1 -0
- package/dist/env.d.ts +7 -0
- package/dist/env.js +9 -0
- package/dist/env.js.map +1 -0
- package/dist/hydrate.d.ts +10 -0
- package/dist/hydrate.js +91 -0
- package/dist/hydrate.js.map +1 -0
- package/dist/{runtime.h5.js → index.cjs.js} +4286 -2482
- package/dist/index.cjs.js.map +1 -0
- package/dist/index.d.ts +35 -0
- package/dist/index.js +35 -0
- package/dist/index.js.map +1 -0
- package/dist/interface/element.d.ts +4 -0
- package/dist/interface/event-target.d.ts +11 -0
- package/dist/interface/event.d.ts +15 -0
- package/dist/interface/hydrate.d.ts +29 -0
- package/dist/interface/index.d.ts +7 -0
- package/dist/interface/node.d.ts +7 -0
- package/dist/interface/options.d.ts +16 -0
- package/dist/interface/utils.d.ts +2 -0
- package/dist/next-tick.d.ts +2 -0
- package/dist/next-tick.js +47 -0
- package/dist/next-tick.js.map +1 -0
- package/dist/options.d.ts +2 -0
- package/dist/options.js +7 -0
- package/dist/options.js.map +1 -0
- package/dist/perf.d.ts +9 -0
- package/dist/perf.js +49 -0
- package/dist/perf.js.map +1 -0
- package/dist/polyfill/array.d.ts +2 -0
- package/dist/polyfill/array.js +56 -0
- package/dist/polyfill/array.js.map +1 -0
- package/dist/polyfill/index.d.ts +2 -0
- package/dist/polyfill/index.js +34 -0
- package/dist/polyfill/index.js.map +1 -0
- package/dist/polyfill/intersection-observer.d.ts +1 -0
- package/dist/polyfill/intersection-observer.js +600 -0
- package/dist/polyfill/intersection-observer.js.map +1 -0
- package/dist/polyfill/object.d.ts +3 -0
- package/dist/polyfill/object.js +102 -0
- package/dist/polyfill/object.js.map +1 -0
- package/dist/runtime.esm.js +4119 -3315
- package/dist/runtime.esm.js.map +1 -1
- package/dist/utils/cache.d.ts +12 -0
- package/dist/utils/cache.js +27 -0
- package/dist/utils/cache.js.map +1 -0
- package/dist/utils/index.d.ts +25 -0
- package/dist/utils/index.js +99 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/lodash.d.ts +2 -0
- package/dist/utils/lodash.js +32 -0
- package/dist/utils/lodash.js.map +1 -0
- package/dist/utils/router.d.ts +7 -0
- package/dist/utils/router.js +24 -0
- package/dist/utils/router.js.map +1 -0
- package/package.json +22 -26
- package/dist/runtime.cjs.d.ts +0 -799
- package/dist/runtime.cjs.js +0 -4623
- package/dist/runtime.esm.d.ts +0 -799
- package/dist/runtime.h5.d.ts +0 -799
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { TaroElement } from './element';
|
|
2
|
+
import type { MpInstance, TFunc, UpdatePayload } from '../interface';
|
|
3
|
+
export declare class TaroRootElement extends TaroElement {
|
|
4
|
+
private updatePayloads;
|
|
5
|
+
private updateCallbacks;
|
|
6
|
+
pendingUpdate: boolean;
|
|
7
|
+
ctx: null | MpInstance;
|
|
8
|
+
constructor();
|
|
9
|
+
get _path(): string;
|
|
10
|
+
get _root(): TaroRootElement;
|
|
11
|
+
enqueueUpdate(payload: UpdatePayload): void;
|
|
12
|
+
performUpdate(initRender?: boolean, prerender?: TFunc): void;
|
|
13
|
+
enqueueUpdateCallback(cb: TFunc, ctx?: Record<string, any>): void;
|
|
14
|
+
flushUpdateCallback(): void;
|
|
15
|
+
}
|
package/dist/dom/root.js
ADDED
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
import { hooks, isFunction, isArray, isUndefined } from '@tarojs/shared';
|
|
2
|
+
import { ROOT_STR, CUSTOM_WRAPPER, SET_DATA, PAGE_INIT } from '../constants/index.js';
|
|
3
|
+
import { options } from '../options.js';
|
|
4
|
+
import { perf } from '../perf.js';
|
|
5
|
+
import { isComment, customWrapperCache } from '../utils/index.js';
|
|
6
|
+
import { TaroElement } from './element.js';
|
|
7
|
+
|
|
8
|
+
function findCustomWrapper(root, dataPathArr) {
|
|
9
|
+
// ['root', 'cn', '[0]'] remove 'root' => ['cn', '[0]']
|
|
10
|
+
const list = dataPathArr.slice(1);
|
|
11
|
+
let currentData = root;
|
|
12
|
+
let customWrapper;
|
|
13
|
+
let splitedPath = '';
|
|
14
|
+
list.some((item, i) => {
|
|
15
|
+
const key = item
|
|
16
|
+
// '[0]' => '0'
|
|
17
|
+
.replace(/^\[(.+)\]$/, '$1')
|
|
18
|
+
// 'cn' => 'childNodes'
|
|
19
|
+
.replace(/\bcn\b/g, 'childNodes');
|
|
20
|
+
currentData = currentData[key];
|
|
21
|
+
if (isArray(currentData)) {
|
|
22
|
+
currentData = currentData.filter(el => !isComment(el));
|
|
23
|
+
}
|
|
24
|
+
if (isUndefined(currentData))
|
|
25
|
+
return true;
|
|
26
|
+
if (currentData.nodeName === CUSTOM_WRAPPER) {
|
|
27
|
+
const res = customWrapperCache.get(currentData.sid);
|
|
28
|
+
if (res) {
|
|
29
|
+
customWrapper = res;
|
|
30
|
+
splitedPath = dataPathArr.slice(i + 2).join('.');
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
if (customWrapper) {
|
|
35
|
+
return {
|
|
36
|
+
customWrapper,
|
|
37
|
+
splitedPath
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
class TaroRootElement extends TaroElement {
|
|
42
|
+
constructor() {
|
|
43
|
+
super();
|
|
44
|
+
this.updatePayloads = [];
|
|
45
|
+
this.updateCallbacks = [];
|
|
46
|
+
this.pendingUpdate = false;
|
|
47
|
+
this.ctx = null;
|
|
48
|
+
this.nodeName = ROOT_STR;
|
|
49
|
+
this.tagName = ROOT_STR.toUpperCase();
|
|
50
|
+
}
|
|
51
|
+
get _path() {
|
|
52
|
+
return ROOT_STR;
|
|
53
|
+
}
|
|
54
|
+
get _root() {
|
|
55
|
+
return this;
|
|
56
|
+
}
|
|
57
|
+
enqueueUpdate(payload) {
|
|
58
|
+
this.updatePayloads.push(payload);
|
|
59
|
+
if (!this.pendingUpdate && this.ctx) {
|
|
60
|
+
this.performUpdate();
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
performUpdate(initRender = false, prerender) {
|
|
64
|
+
this.pendingUpdate = true;
|
|
65
|
+
const ctx = hooks.call('proxyToRaw', this.ctx);
|
|
66
|
+
setTimeout(() => {
|
|
67
|
+
const setDataMark = `${SET_DATA} 开始时间戳 ${Date.now()}`;
|
|
68
|
+
perf.start(setDataMark);
|
|
69
|
+
const data = Object.create(null);
|
|
70
|
+
const resetPaths = new Set(initRender
|
|
71
|
+
? ['root.cn.[0]', 'root.cn[0]']
|
|
72
|
+
: []);
|
|
73
|
+
while (this.updatePayloads.length > 0) {
|
|
74
|
+
const { path, value } = this.updatePayloads.shift();
|
|
75
|
+
if (path.endsWith("cn" /* Shortcuts.Childnodes */)) {
|
|
76
|
+
resetPaths.add(path);
|
|
77
|
+
}
|
|
78
|
+
data[path] = value;
|
|
79
|
+
}
|
|
80
|
+
for (const path in data) {
|
|
81
|
+
resetPaths.forEach(p => {
|
|
82
|
+
// 已经重置了数组,就不需要分别再设置了
|
|
83
|
+
if (path.includes(p) && path !== p) {
|
|
84
|
+
delete data[path];
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
const value = data[path];
|
|
88
|
+
if (isFunction(value)) {
|
|
89
|
+
data[path] = value();
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
// 预渲染
|
|
93
|
+
if (isFunction(prerender))
|
|
94
|
+
return prerender(data);
|
|
95
|
+
// 正常渲染
|
|
96
|
+
this.pendingUpdate = false;
|
|
97
|
+
let normalUpdate = {};
|
|
98
|
+
const customWrapperMap = new Map();
|
|
99
|
+
if (initRender) {
|
|
100
|
+
// 初次渲染,使用页面级别的 setData
|
|
101
|
+
normalUpdate = data;
|
|
102
|
+
}
|
|
103
|
+
else {
|
|
104
|
+
// 更新渲染,区分 CustomWrapper 与页面级别的 setData
|
|
105
|
+
for (const p in data) {
|
|
106
|
+
const dataPathArr = p.split('.');
|
|
107
|
+
const found = findCustomWrapper(this, dataPathArr);
|
|
108
|
+
if (found) {
|
|
109
|
+
// 此项数据使用 CustomWrapper 去更新
|
|
110
|
+
const { customWrapper, splitedPath } = found;
|
|
111
|
+
// 合并同一个 customWrapper 的相关更新到一次 setData 中
|
|
112
|
+
customWrapperMap.set(customWrapper, Object.assign(Object.assign({}, (customWrapperMap.get(customWrapper) || {})), { [`i.${splitedPath}`]: data[p] }));
|
|
113
|
+
}
|
|
114
|
+
else {
|
|
115
|
+
// 此项数据使用页面去更新
|
|
116
|
+
normalUpdate[p] = data[p];
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
const customWrapperCount = customWrapperMap.size;
|
|
121
|
+
const isNeedNormalUpdate = Object.keys(normalUpdate).length > 0;
|
|
122
|
+
const updateArrLen = customWrapperCount + (isNeedNormalUpdate ? 1 : 0);
|
|
123
|
+
let executeTime = 0;
|
|
124
|
+
const cb = () => {
|
|
125
|
+
if (++executeTime === updateArrLen) {
|
|
126
|
+
perf.stop(setDataMark);
|
|
127
|
+
this.flushUpdateCallback();
|
|
128
|
+
initRender && perf.stop(PAGE_INIT);
|
|
129
|
+
}
|
|
130
|
+
};
|
|
131
|
+
// custom-wrapper setData
|
|
132
|
+
if (customWrapperCount) {
|
|
133
|
+
customWrapperMap.forEach((data, ctx) => {
|
|
134
|
+
if (process.env.NODE_ENV !== 'production' && options.debug) {
|
|
135
|
+
// eslint-disable-next-line no-console
|
|
136
|
+
console.log('custom wrapper setData: ', data);
|
|
137
|
+
}
|
|
138
|
+
ctx.setData(data, cb);
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
// page setData
|
|
142
|
+
if (isNeedNormalUpdate) {
|
|
143
|
+
if (process.env.NODE_ENV !== 'production' && options.debug) {
|
|
144
|
+
// eslint-disable-next-line no-console
|
|
145
|
+
console.log('page setData:', normalUpdate);
|
|
146
|
+
}
|
|
147
|
+
ctx.setData(normalUpdate, cb);
|
|
148
|
+
}
|
|
149
|
+
}, 0);
|
|
150
|
+
}
|
|
151
|
+
enqueueUpdateCallback(cb, ctx) {
|
|
152
|
+
this.updateCallbacks.push(() => {
|
|
153
|
+
ctx ? cb.call(ctx) : cb();
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
flushUpdateCallback() {
|
|
157
|
+
const updateCallbacks = this.updateCallbacks;
|
|
158
|
+
if (!updateCallbacks.length)
|
|
159
|
+
return;
|
|
160
|
+
const copies = updateCallbacks.slice(0);
|
|
161
|
+
this.updateCallbacks.length = 0;
|
|
162
|
+
for (let i = 0; i < copies.length; i++) {
|
|
163
|
+
copies[i]();
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
export { TaroRootElement };
|
|
169
|
+
//# sourceMappingURL=root.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"root.js","sources":["../../src/dom/root.ts"],"sourcesContent":["import { hooks, isArray, isFunction, isUndefined, Shortcuts } from '@tarojs/shared'\n\nimport {\n CUSTOM_WRAPPER,\n PAGE_INIT,\n ROOT_STR,\n SET_DATA\n} from '../constants'\nimport { options } from '../options'\nimport { perf } from '../perf'\nimport { customWrapperCache, isComment } from '../utils'\nimport { TaroElement } from './element'\n\nimport type { HydratedData, MpInstance, TFunc, UpdatePayload, UpdatePayloadValue } from '../interface'\n\nfunction findCustomWrapper (root: TaroRootElement, dataPathArr: string[]) {\n // ['root', 'cn', '[0]'] remove 'root' => ['cn', '[0]']\n const list = dataPathArr.slice(1)\n let currentData: any = root\n let customWrapper: Record<string, any> | undefined\n let splitedPath = ''\n\n list.some((item, i) => {\n const key = item\n // '[0]' => '0'\n .replace(/^\\[(.+)\\]$/, '$1')\n // 'cn' => 'childNodes'\n .replace(/\\bcn\\b/g, 'childNodes')\n\n currentData = currentData[key]\n\n if (isArray(currentData)) {\n currentData = currentData.filter(el => !isComment(el))\n }\n\n if (isUndefined(currentData)) return true\n\n if (currentData.nodeName === CUSTOM_WRAPPER) {\n const res = customWrapperCache.get(currentData.sid)\n if (res) {\n customWrapper = res\n splitedPath = dataPathArr.slice(i + 2).join('.')\n }\n }\n })\n\n if (customWrapper) {\n return {\n customWrapper,\n splitedPath\n }\n }\n}\n\nexport class TaroRootElement extends TaroElement {\n private updatePayloads: UpdatePayload[] = []\n\n private updateCallbacks: TFunc[] = []\n\n public pendingUpdate = false\n\n public ctx: null | MpInstance = null\n\n public constructor () {\n super()\n this.nodeName = ROOT_STR\n this.tagName = ROOT_STR.toUpperCase()\n }\n\n public get _path (): string {\n return ROOT_STR\n }\n\n public get _root (): TaroRootElement {\n return this\n }\n\n public enqueueUpdate (payload: UpdatePayload): void {\n this.updatePayloads.push(payload)\n\n if (!this.pendingUpdate && this.ctx) {\n this.performUpdate()\n }\n }\n\n public performUpdate (initRender = false, prerender?: TFunc) {\n this.pendingUpdate = true\n\n const ctx = hooks.call('proxyToRaw', this.ctx)!\n\n setTimeout(() => {\n const setDataMark = `${SET_DATA} 开始时间戳 ${Date.now()}`\n perf.start(setDataMark)\n const data: Record<string, UpdatePayloadValue | ReturnType<HydratedData>> = Object.create(null)\n const resetPaths = new Set<string>(\n initRender\n ? ['root.cn.[0]', 'root.cn[0]']\n : []\n )\n\n while (this.updatePayloads.length > 0) {\n const { path, value } = this.updatePayloads.shift()!\n if (path.endsWith(Shortcuts.Childnodes)) {\n resetPaths.add(path)\n }\n data[path] = value\n }\n\n for (const path in data) {\n resetPaths.forEach(p => {\n // 已经重置了数组,就不需要分别再设置了\n if (path.includes(p) && path !== p) {\n delete data[path]\n }\n })\n\n const value = data[path]\n if (isFunction(value)) {\n data[path] = value()\n }\n }\n\n // 预渲染\n if (isFunction(prerender)) return prerender(data)\n\n // 正常渲染\n this.pendingUpdate = false\n let normalUpdate = {}\n const customWrapperMap: Map<Record<any, any>, Record<string, any>> = new Map()\n\n if (initRender) {\n // 初次渲染,使用页面级别的 setData\n normalUpdate = data\n } else {\n // 更新渲染,区分 CustomWrapper 与页面级别的 setData\n for (const p in data) {\n const dataPathArr = p.split('.')\n const found = findCustomWrapper(this, dataPathArr)\n if (found) {\n // 此项数据使用 CustomWrapper 去更新\n const { customWrapper, splitedPath } = found\n // 合并同一个 customWrapper 的相关更新到一次 setData 中\n customWrapperMap.set(customWrapper, {\n ...(customWrapperMap.get(customWrapper) || {}),\n [`i.${splitedPath}`]: data[p]\n })\n } else {\n // 此项数据使用页面去更新\n normalUpdate[p] = data[p]\n }\n }\n }\n\n const customWrapperCount = customWrapperMap.size\n const isNeedNormalUpdate = Object.keys(normalUpdate).length > 0\n const updateArrLen = customWrapperCount + (isNeedNormalUpdate ? 1 : 0)\n let executeTime = 0\n\n const cb = () => {\n if (++executeTime === updateArrLen) {\n perf.stop(setDataMark)\n this.flushUpdateCallback()\n initRender && perf.stop(PAGE_INIT)\n }\n }\n\n // custom-wrapper setData\n if (customWrapperCount) {\n customWrapperMap.forEach((data, ctx) => {\n if (process.env.NODE_ENV !== 'production' && options.debug) {\n // eslint-disable-next-line no-console\n console.log('custom wrapper setData: ', data)\n }\n ctx.setData(data, cb)\n })\n }\n\n // page setData\n if (isNeedNormalUpdate) {\n if (process.env.NODE_ENV !== 'production' && options.debug) {\n // eslint-disable-next-line no-console\n console.log('page setData:', normalUpdate)\n }\n ctx.setData(normalUpdate, cb)\n }\n }, 0)\n }\n\n public enqueueUpdateCallback (cb: TFunc, ctx?: Record<string, any>) {\n this.updateCallbacks.push(() => {\n ctx ? cb.call(ctx) : cb()\n })\n }\n\n public flushUpdateCallback () {\n const updateCallbacks = this.updateCallbacks\n if (!updateCallbacks.length) return\n\n const copies = updateCallbacks.slice(0)\n this.updateCallbacks.length = 0\n for (let i = 0; i < copies.length; i++) {\n copies[i]()\n }\n }\n}\n"],"names":[],"mappings":";;;;;;;AAeA,SAAS,iBAAiB,CAAE,IAAqB,EAAE,WAAqB,EAAA;;IAEtE,MAAM,IAAI,GAAG,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;IACjC,IAAI,WAAW,GAAQ,IAAI,CAAA;AAC3B,IAAA,IAAI,aAA8C,CAAA;IAClD,IAAI,WAAW,GAAG,EAAE,CAAA;IAEpB,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,CAAC,KAAI;QACpB,MAAM,GAAG,GAAG,IAAI;;AAEb,aAAA,OAAO,CAAC,YAAY,EAAE,IAAI,CAAC;;AAE3B,aAAA,OAAO,CAAC,SAAS,EAAE,YAAY,CAAC,CAAA;AAEnC,QAAA,WAAW,GAAG,WAAW,CAAC,GAAG,CAAC,CAAA;AAE9B,QAAA,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AE,EAAS,EAAE,GAAyB,EAAA;AAChE,QAAA,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,MAAK;AAC7B,YAAA,GAAG,GAAG,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,EAAE,CAAA;AAC3B,SAAC,CAAC,CAAA;KACH;IAEM,mBAAmB,GAAA;AACxB,QAAA,MAAM,eAAe,GAAG,IAAI,CAAC,eAAe,CAAA;QAC5C,IAAI,CAAC,eAAe,CAAC,MAAM;YAAE,OAAM;QAEnC,MAAM,MAAM,GAAG,eAAe,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;AACvC,QAAA,IAAI,CAAC,eAAe,CAAC,MAAM,GAAG,CAAC,CAAA;AAC/B,QAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;AACtC,YAAA,MAAM,CAAC,CAAC,CAAC,EAAE,CAAA;SACZ;KACF;AACF;;;;"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { TaroElement } from './element';
|
|
2
|
+
export declare class Style {
|
|
3
|
+
_pending: boolean;
|
|
4
|
+
_usedStyleProp: Set<string>;
|
|
5
|
+
_value: Partial<CSSStyleDeclaration>;
|
|
6
|
+
_element: TaroElement;
|
|
7
|
+
constructor(element: TaroElement);
|
|
8
|
+
private setCssVariables;
|
|
9
|
+
get cssText(): string;
|
|
10
|
+
set cssText(str: string);
|
|
11
|
+
setProperty(propertyName: string, value?: string | null): void;
|
|
12
|
+
removeProperty(propertyName: string): string;
|
|
13
|
+
getPropertyValue(propertyName: string): any;
|
|
14
|
+
}
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
import { hooks, isArray, isNull, isUndefined, toDashed, toCamelCase, warn, isString } from '@tarojs/shared';
|
|
2
|
+
import { PROPERTY_THRESHOLD } from '../constants/index.js';
|
|
3
|
+
import { MutationObserver } from '../dom-external/mutation-observer/index.js';
|
|
4
|
+
import { styleProperties } from './style_properties.js';
|
|
5
|
+
|
|
6
|
+
function recordCss(obj) {
|
|
7
|
+
MutationObserver.record({
|
|
8
|
+
type: "attributes" /* MutationRecordType.ATTRIBUTES */,
|
|
9
|
+
target: obj._element,
|
|
10
|
+
attributeName: 'style',
|
|
11
|
+
oldValue: obj.cssText
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
function enqueueUpdate(obj) {
|
|
15
|
+
const element = obj._element;
|
|
16
|
+
if (element._root) {
|
|
17
|
+
element.enqueueUpdate({
|
|
18
|
+
path: `${element._path}.${"st" /* Shortcuts.Style */}`,
|
|
19
|
+
value: obj.cssText
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
function setStyle(newVal, styleKey) {
|
|
24
|
+
process.env.NODE_ENV !== 'production' && warn(isString(newVal) && newVal.length > PROPERTY_THRESHOLD, `Style 属性 ${styleKey} 的值数据量过大,可能会影响渲染性能,考虑使用 CSS 类或其它方案替代。`);
|
|
25
|
+
const old = this[styleKey];
|
|
26
|
+
if (old === newVal)
|
|
27
|
+
return;
|
|
28
|
+
!this._pending && recordCss(this);
|
|
29
|
+
if (isNull(newVal) || isUndefined(newVal) || newVal === '') {
|
|
30
|
+
this._usedStyleProp.delete(styleKey);
|
|
31
|
+
delete this._value[styleKey];
|
|
32
|
+
}
|
|
33
|
+
else {
|
|
34
|
+
this._usedStyleProp.add(styleKey);
|
|
35
|
+
this._value[styleKey] = newVal;
|
|
36
|
+
}
|
|
37
|
+
!this._pending && enqueueUpdate(this);
|
|
38
|
+
}
|
|
39
|
+
function initStyle(ctor, styleProperties) {
|
|
40
|
+
const properties = {};
|
|
41
|
+
for (let i = 0; i < styleProperties.length; i++) {
|
|
42
|
+
const styleKey = styleProperties[i];
|
|
43
|
+
if (ctor[styleKey])
|
|
44
|
+
return;
|
|
45
|
+
properties[styleKey] = {
|
|
46
|
+
get() {
|
|
47
|
+
const val = this._value[styleKey];
|
|
48
|
+
return isNull(val) || isUndefined(val) ? '' : val;
|
|
49
|
+
},
|
|
50
|
+
set(newVal) {
|
|
51
|
+
setStyle.call(this, newVal, styleKey);
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
Object.defineProperties(ctor.prototype, properties);
|
|
56
|
+
}
|
|
57
|
+
function isCssVariable(propertyName) {
|
|
58
|
+
return /^--/.test(propertyName);
|
|
59
|
+
}
|
|
60
|
+
class Style {
|
|
61
|
+
constructor(element) {
|
|
62
|
+
this._element = element;
|
|
63
|
+
this._usedStyleProp = new Set();
|
|
64
|
+
this._value = {};
|
|
65
|
+
}
|
|
66
|
+
setCssVariables(styleKey) {
|
|
67
|
+
this.hasOwnProperty(styleKey) || Object.defineProperty(this, styleKey, {
|
|
68
|
+
enumerable: true,
|
|
69
|
+
configurable: true,
|
|
70
|
+
get: () => {
|
|
71
|
+
return this._value[styleKey] || '';
|
|
72
|
+
},
|
|
73
|
+
set: (newVal) => {
|
|
74
|
+
setStyle.call(this, newVal, styleKey);
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
get cssText() {
|
|
79
|
+
if (!this._usedStyleProp.size)
|
|
80
|
+
return '';
|
|
81
|
+
const texts = [];
|
|
82
|
+
this._usedStyleProp.forEach(key => {
|
|
83
|
+
const val = this[key];
|
|
84
|
+
if (isNull(val) || isUndefined(val))
|
|
85
|
+
return;
|
|
86
|
+
let styleName = isCssVariable(key) ? key : toDashed(key);
|
|
87
|
+
if (styleName.indexOf('webkit') === 0 || styleName.indexOf('Webkit') === 0) {
|
|
88
|
+
styleName = `-${styleName}`;
|
|
89
|
+
}
|
|
90
|
+
texts.push(`${styleName}: ${val};`);
|
|
91
|
+
});
|
|
92
|
+
return texts.join(' ');
|
|
93
|
+
}
|
|
94
|
+
set cssText(str) {
|
|
95
|
+
this._pending = true;
|
|
96
|
+
recordCss(this);
|
|
97
|
+
this._usedStyleProp.forEach(prop => {
|
|
98
|
+
this.removeProperty(prop);
|
|
99
|
+
});
|
|
100
|
+
if (str === '' || isUndefined(str) || isNull(str)) {
|
|
101
|
+
this._pending = false;
|
|
102
|
+
enqueueUpdate(this);
|
|
103
|
+
return;
|
|
104
|
+
}
|
|
105
|
+
const rules = str.split(';');
|
|
106
|
+
for (let i = 0; i < rules.length; i++) {
|
|
107
|
+
const rule = rules[i].trim();
|
|
108
|
+
if (rule === '') {
|
|
109
|
+
continue;
|
|
110
|
+
}
|
|
111
|
+
// 可能存在 'background: url(http:x/y/z)' 的情况
|
|
112
|
+
const [propName, ...valList] = rule.split(':');
|
|
113
|
+
const val = valList.join(':');
|
|
114
|
+
if (isUndefined(val)) {
|
|
115
|
+
continue;
|
|
116
|
+
}
|
|
117
|
+
this.setProperty(propName.trim(), val.trim());
|
|
118
|
+
}
|
|
119
|
+
this._pending = false;
|
|
120
|
+
enqueueUpdate(this);
|
|
121
|
+
}
|
|
122
|
+
setProperty(propertyName, value) {
|
|
123
|
+
if (propertyName[0] === '-') {
|
|
124
|
+
// 支持 webkit 属性或 css 变量
|
|
125
|
+
this.setCssVariables(propertyName);
|
|
126
|
+
}
|
|
127
|
+
else {
|
|
128
|
+
propertyName = toCamelCase(propertyName);
|
|
129
|
+
}
|
|
130
|
+
if (isNull(value) || isUndefined(value)) {
|
|
131
|
+
this.removeProperty(propertyName);
|
|
132
|
+
}
|
|
133
|
+
else {
|
|
134
|
+
this[propertyName] = value;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
removeProperty(propertyName) {
|
|
138
|
+
propertyName = toCamelCase(propertyName);
|
|
139
|
+
if (!this._usedStyleProp.has(propertyName)) {
|
|
140
|
+
return '';
|
|
141
|
+
}
|
|
142
|
+
const value = this[propertyName];
|
|
143
|
+
this[propertyName] = undefined;
|
|
144
|
+
return value;
|
|
145
|
+
}
|
|
146
|
+
getPropertyValue(propertyName) {
|
|
147
|
+
propertyName = toCamelCase(propertyName);
|
|
148
|
+
const value = this[propertyName];
|
|
149
|
+
if (!value) {
|
|
150
|
+
return '';
|
|
151
|
+
}
|
|
152
|
+
return value;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
initStyle(Style, styleProperties);
|
|
156
|
+
hooks.tap('injectNewStyleProperties', (newStyleProperties) => {
|
|
157
|
+
if (isArray(newStyleProperties)) {
|
|
158
|
+
initStyle(Style, newStyleProperties);
|
|
159
|
+
}
|
|
160
|
+
else {
|
|
161
|
+
if (typeof newStyleProperties !== 'string')
|
|
162
|
+
return;
|
|
163
|
+
initStyle(Style, [newStyleProperties]);
|
|
164
|
+
}
|
|
165
|
+
});
|
|
166
|
+
|
|
167
|
+
export { Style };
|
|
168
|
+
//# sourceMappingURL=style.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"style.js","sources":["../../src/dom/style.ts"],"sourcesContent":["import { hooks, isArray, isNull, isString, isUndefined, Shortcuts, toCamelCase, toDashed, warn } from '@tarojs/shared'\n\nimport { PROPERTY_THRESHOLD } from '../constants'\nimport { MutationObserver, MutationRecordType } from '../dom-external/mutation-observer'\nimport { TaroElement } from './element'\nimport { styleProperties } from './style_properties'\n\nfunction recordCss (obj: Style) {\n MutationObserver.record({\n type: MutationRecordType.ATTRIBUTES,\n target: obj._element,\n attributeName: 'style',\n oldValue: obj.cssText\n })\n}\n\nfunction enqueueUpdate (obj: Style) {\n const element = obj._element\n if (element._root) {\n element.enqueueUpdate({\n path: `${element._path}.${Shortcuts.Style}`,\n value: obj.cssText\n })\n }\n}\n\nfunction setStyle (this: Style, newVal: string, styleKey: string) {\n process.env.NODE_ENV !== 'production' && warn(\n isString(newVal) && newVal.length > PROPERTY_THRESHOLD,\n `Style 属性 ${styleKey} 的值数据量过大,可能会影响渲染性能,考虑使用 CSS 类或其它方案替代。`\n )\n\n const old = this[styleKey]\n\n if (old === newVal) return\n\n !this._pending && recordCss(this)\n\n if (isNull(newVal) || isUndefined(newVal) || newVal === '') {\n this._usedStyleProp.delete(styleKey)\n delete this._value[styleKey]\n } else {\n this._usedStyleProp.add(styleKey)\n this._value[styleKey] = newVal\n }\n\n !this._pending && enqueueUpdate(this)\n}\n\nfunction initStyle (ctor: typeof Style, styleProperties: string[]) {\n const properties = {}\n\n for (let i = 0; i < styleProperties.length; i++) {\n const styleKey = styleProperties[i]\n\n if (ctor[styleKey]) return\n\n properties[styleKey] = {\n get (this: Style) {\n const val = this._value[styleKey]\n return isNull(val) || isUndefined(val) ? '' : val\n },\n set (this: Style, newVal: string) {\n setStyle.call(this, newVal, styleKey)\n }\n }\n }\n\n Object.defineProperties(ctor.prototype, properties)\n}\n\nfunction isCssVariable (propertyName) {\n return /^--/.test(propertyName)\n}\n\nexport class Style {\n public _pending: boolean\n\n public _usedStyleProp: Set<string>\n\n public _value: Partial<CSSStyleDeclaration>\n\n public _element: TaroElement\n\n public constructor (element: TaroElement) {\n this._element = element\n this._usedStyleProp = new Set()\n this._value = {}\n }\n\n private setCssVariables (styleKey: string) {\n this.hasOwnProperty(styleKey) || Object.defineProperty(this, styleKey, {\n enumerable: true,\n configurable: true,\n get: () => {\n return this._value[styleKey] || ''\n },\n set: (newVal: string) => {\n setStyle.call(this, newVal, styleKey)\n }\n })\n }\n\n public get cssText () {\n if (!this._usedStyleProp.size) return ''\n\n const texts: string[] = []\n this._usedStyleProp.forEach(key => {\n const val = this[key]\n if (isNull(val) || isUndefined(val)) return\n let styleName = isCssVariable(key) ? key : toDashed(key)\n if (styleName.indexOf('webkit') === 0 || styleName.indexOf('Webkit') === 0) {\n styleName = `-${styleName}`\n }\n texts.push(`${styleName}: ${val};`)\n })\n return texts.join(' ')\n }\n\n public set cssText (str: string) {\n this._pending = true\n recordCss(this)\n\n this._usedStyleProp.forEach(prop => {\n this.removeProperty(prop)\n })\n\n if (str === '' || isUndefined(str) || isNull(str)) {\n this._pending = false\n enqueueUpdate(this)\n return\n }\n\n const rules = str.split(';')\n\n for (let i = 0; i < rules.length; i++) {\n const rule = rules[i].trim()\n if (rule === '') {\n continue\n }\n\n // 可能存在 'background: url(http:x/y/z)' 的情况\n const [propName, ...valList] = rule.split(':')\n const val = valList.join(':')\n\n if (isUndefined(val)) {\n continue\n }\n this.setProperty(propName.trim(), val.trim())\n }\n\n this._pending = false\n enqueueUpdate(this)\n }\n\n public setProperty (propertyName: string, value?: string | null) {\n if (propertyName[0] === '-') {\n // 支持 webkit 属性或 css 变量\n this.setCssVariables(propertyName)\n } else {\n propertyName = toCamelCase(propertyName)\n }\n\n if (isNull(value) || isUndefined(value)) {\n this.removeProperty(propertyName)\n } else {\n this[propertyName] = value\n }\n }\n\n public removeProperty (propertyName: string): string {\n propertyName = toCamelCase(propertyName)\n if (!this._usedStyleProp.has(propertyName)) {\n return ''\n }\n\n const value = this[propertyName]\n this[propertyName] = undefined\n return value\n }\n\n public getPropertyValue (propertyName: string) {\n propertyName = toCamelCase(propertyName)\n const value = this[propertyName]\n if (!value) {\n return ''\n }\n\n return value\n }\n}\n\ninitStyle(Style, styleProperties)\n\nhooks.tap('injectNewStyleProperties', (newStyleProperties: string[]) => {\n if (isArray(newStyleProperties)) {\n initStyle(Style, newStyleProperties)\n } else {\n if (typeof newStyleProperties !== 'string') return\n\n initStyle(Style, [newStyleProperties])\n }\n})\n"],"names":[],"mappings":";;;;;AAOA,SAAS,SAAS,CAAE,GAAU,EAAA;IAC5B,gBAAgB,CAAC,MAAM,CAAC;AACtB,QAAA,IAAI,EAA+B,YAAA;QACnC,MAAM,EAAE,GAAG,CAAC,QAAQ;AACpB,QAAA,aAAa,EAAE,OAAO;QACtB,QAAQ,EAAE,GAAG,CAAC,OAAO;AACtB,KAAA,CAAC,CAAA;AACJ,CAAC;AAED,SAAS,aAAa,CAAE,GAAU,EAAA;AAChC,IAAA,MAAM,OAAO,GAAG,GAAG,CAAC,QAAQ,CAAA;AAC5B,IAAA,IAAI,OAAO,CAAC,KAAK,EAAE;QACjB,OAAO,CAAC,aAAa,CAAC;AACpB,YAAA,IAAI,EAAE,CAAG,EAAA,OAAO,CAAC,KAAK,CAAA,CAA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
+
const styleProperties = [
|
|
7
|
+
'all',
|
|
8
|
+
'appearance',
|
|
9
|
+
'blockOverflow',
|
|
10
|
+
'blockSize',
|
|
11
|
+
'bottom',
|
|
12
|
+
'clear',
|
|
13
|
+
'contain',
|
|
14
|
+
'content',
|
|
15
|
+
'continue',
|
|
16
|
+
'cursor',
|
|
17
|
+
'direction',
|
|
18
|
+
'display',
|
|
19
|
+
'filter',
|
|
20
|
+
'float',
|
|
21
|
+
'gap',
|
|
22
|
+
'height',
|
|
23
|
+
'inset',
|
|
24
|
+
'isolation',
|
|
25
|
+
'left',
|
|
26
|
+
'letterSpacing',
|
|
27
|
+
'lightingColor',
|
|
28
|
+
'markerSide',
|
|
29
|
+
'mixBlendMode',
|
|
30
|
+
'opacity',
|
|
31
|
+
'order',
|
|
32
|
+
'position',
|
|
33
|
+
'quotes',
|
|
34
|
+
'resize',
|
|
35
|
+
'right',
|
|
36
|
+
'rowGap',
|
|
37
|
+
'tabSize',
|
|
38
|
+
'tableLayout',
|
|
39
|
+
'top',
|
|
40
|
+
'userSelect',
|
|
41
|
+
'verticalAlign',
|
|
42
|
+
'visibility',
|
|
43
|
+
'voiceFamily',
|
|
44
|
+
'volume',
|
|
45
|
+
'whiteSpace',
|
|
46
|
+
'widows',
|
|
47
|
+
'width',
|
|
48
|
+
'zIndex',
|
|
49
|
+
'pointerEvents',
|
|
50
|
+
'aspectRatio'
|
|
51
|
+
/** 非常用 style */
|
|
52
|
+
// 'azimuth',
|
|
53
|
+
// 'backfaceVisibility',
|
|
54
|
+
// 'baselineShift',
|
|
55
|
+
// 'captionSide',
|
|
56
|
+
// 'chains',
|
|
57
|
+
// 'dominantBaseline',
|
|
58
|
+
// 'elevation',
|
|
59
|
+
// 'emptyCells',
|
|
60
|
+
// 'forcedColorAdjust',
|
|
61
|
+
// 'glyphOrientationVertical',
|
|
62
|
+
// 'hangingPunctuation',
|
|
63
|
+
// 'hyphenateCharacter',
|
|
64
|
+
// 'hyphens',
|
|
65
|
+
// 'imageOrientation',
|
|
66
|
+
// 'imageResolution',
|
|
67
|
+
// 'orphans',
|
|
68
|
+
// 'playDuring',
|
|
69
|
+
// 'pointerEvents',
|
|
70
|
+
// 'regionFragment',
|
|
71
|
+
// 'richness',
|
|
72
|
+
// 'running',
|
|
73
|
+
// 'scrollBehavior',
|
|
74
|
+
// 'speechRate',
|
|
75
|
+
// 'stress',
|
|
76
|
+
// 'stringSet',
|
|
77
|
+
// 'unicodeBidi',
|
|
78
|
+
// 'willChange',
|
|
79
|
+
// 'writingMode',
|
|
80
|
+
];
|
|
81
|
+
// 减少文件体积
|
|
82
|
+
function combine(prefix, list, excludeSelf) {
|
|
83
|
+
!excludeSelf && styleProperties.push(prefix);
|
|
84
|
+
list.forEach(item => {
|
|
85
|
+
styleProperties.push(prefix + item);
|
|
86
|
+
if (prefix === WEBKIT) {
|
|
87
|
+
styleProperties.push('Webkit' + item);
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
const color = 'Color';
|
|
92
|
+
const style = 'Style';
|
|
93
|
+
const width = 'Width';
|
|
94
|
+
const image = 'Image';
|
|
95
|
+
const size = 'Size';
|
|
96
|
+
const color_style_width = [color, style, width];
|
|
97
|
+
const fitlength_fitwidth_image = ['FitLength', 'FitWidth', image];
|
|
98
|
+
const fitlength_fitwidth_image_radius = [...fitlength_fitwidth_image, 'Radius'];
|
|
99
|
+
const color_style_width_fitlength_fitwidth_image = [...color_style_width, ...fitlength_fitwidth_image];
|
|
100
|
+
const endRadius_startRadius = ['EndRadius', 'StartRadius'];
|
|
101
|
+
const bottom_left_right_top = ['Bottom', 'Left', 'Right', 'Top'];
|
|
102
|
+
const end_start = ['End', 'Start'];
|
|
103
|
+
const content_items_self = ['Content', 'Items', 'Self'];
|
|
104
|
+
const blockSize_height_inlineSize_width = ['BlockSize', 'Height', 'InlineSize', width];
|
|
105
|
+
const after_before = ['After', 'Before'];
|
|
106
|
+
combine('borderBlock', color_style_width);
|
|
107
|
+
combine('borderBlockEnd', color_style_width);
|
|
108
|
+
combine('borderBlockStart', color_style_width);
|
|
109
|
+
combine('outline', [...color_style_width, 'Offset']);
|
|
110
|
+
combine('border', [...color_style_width, 'Boundary', 'Break', 'Collapse', 'Radius', 'Spacing']);
|
|
111
|
+
combine('borderFit', ['Length', width]);
|
|
112
|
+
combine('borderInline', color_style_width);
|
|
113
|
+
combine('borderInlineEnd', color_style_width);
|
|
114
|
+
combine('borderInlineStart', color_style_width);
|
|
115
|
+
combine('borderLeft', color_style_width_fitlength_fitwidth_image);
|
|
116
|
+
combine('borderRight', color_style_width_fitlength_fitwidth_image);
|
|
117
|
+
combine('borderTop', color_style_width_fitlength_fitwidth_image);
|
|
118
|
+
combine('borderBottom', color_style_width_fitlength_fitwidth_image);
|
|
119
|
+
combine('textDecoration', [color, style, 'Line']);
|
|
120
|
+
combine('textEmphasis', [color, style, 'Position']);
|
|
121
|
+
combine('scrollMargin', bottom_left_right_top);
|
|
122
|
+
combine('scrollPadding', bottom_left_right_top);
|
|
123
|
+
combine('padding', bottom_left_right_top);
|
|
124
|
+
combine('margin', [...bottom_left_right_top, 'Trim']);
|
|
125
|
+
combine('scrollMarginBlock', end_start);
|
|
126
|
+
combine('scrollMarginInline', end_start);
|
|
127
|
+
combine('scrollPaddingBlock', end_start);
|
|
128
|
+
combine('scrollPaddingInline', end_start);
|
|
129
|
+
combine('gridColumn', end_start);
|
|
130
|
+
combine('gridRow', end_start);
|
|
131
|
+
combine('insetBlock', end_start);
|
|
132
|
+
combine('insetInline', end_start);
|
|
133
|
+
combine('marginBlock', end_start);
|
|
134
|
+
combine('marginInline', end_start);
|
|
135
|
+
combine('paddingBlock', end_start);
|
|
136
|
+
combine('paddingInline', end_start);
|
|
137
|
+
combine('pause', after_before);
|
|
138
|
+
combine('cue', after_before);
|
|
139
|
+
combine('mask', ['Clip', 'Composite', image, 'Mode', 'Origin', 'Position', 'Repeat', size, 'Type']);
|
|
140
|
+
combine('borderImage', ['Outset', 'Repeat', 'Slice', 'Source', 'Transform', width]);
|
|
141
|
+
combine('maskBorder', ['Mode', 'Outset', 'Repeat', 'Slice', 'Source', width]);
|
|
142
|
+
combine('font', ['Family', 'FeatureSettings', 'Kerning', 'LanguageOverride', 'MaxSize', 'MinSize', 'OpticalSizing', 'Palette', size, 'SizeAdjust', 'Stretch', style, 'Weight', 'VariationSettings']);
|
|
143
|
+
combine('transform', ['Box', 'Origin', style]);
|
|
144
|
+
combine('background', [color, image, 'Attachment', 'BlendMode', 'Clip', 'Origin', 'Position', 'Repeat', size]);
|
|
145
|
+
combine('listStyle', [image, 'Position', 'Type']);
|
|
146
|
+
combine('scrollSnap', ['Align', 'Stop', 'Type']);
|
|
147
|
+
combine('grid', ['Area', 'AutoColumns', 'AutoFlow', 'AutoRows']);
|
|
148
|
+
combine('gridTemplate', ['Areas', 'Columns', 'Rows']);
|
|
149
|
+
combine('overflow', ['Block', 'Inline', 'Wrap', 'X', 'Y']);
|
|
150
|
+
combine('transition', ['Delay', 'Duration', 'Property', 'TimingFunction']);
|
|
151
|
+
combine('color', ['Adjust', 'InterpolationFilters', 'Scheme']);
|
|
152
|
+
combine('textAlign', ['All', 'Last']);
|
|
153
|
+
combine('page', ['BreakAfter', 'BreakBefore', 'BreakInside']);
|
|
154
|
+
combine('animation', ['Delay', 'Direction', 'Duration', 'FillMode', 'IterationCount', 'Name', 'PlayState', 'TimingFunction']);
|
|
155
|
+
combine('flex', ['Basis', 'Direction', 'Flow', 'Grow', 'Shrink', 'Wrap']);
|
|
156
|
+
combine('offset', [...after_before, ...end_start, 'Anchor', 'Distance', 'Path', 'Position', 'Rotate']);
|
|
157
|
+
combine('perspective', ['Origin']);
|
|
158
|
+
combine('clip', ['Path', 'Rule']);
|
|
159
|
+
combine('flow', ['From', 'Into']);
|
|
160
|
+
combine('align', ['Content', 'Items', 'Self'], true);
|
|
161
|
+
combine('alignment', ['Adjust', 'Baseline'], true);
|
|
162
|
+
combine('borderStart', endRadius_startRadius, true);
|
|
163
|
+
combine('borderEnd', endRadius_startRadius, true);
|
|
164
|
+
combine('borderCorner', ['Fit', image, 'ImageTransform'], true);
|
|
165
|
+
combine('borderTopLeft', fitlength_fitwidth_image_radius, true);
|
|
166
|
+
combine('borderTopRight', fitlength_fitwidth_image_radius, true);
|
|
167
|
+
combine('borderBottomLeft', fitlength_fitwidth_image_radius, true);
|
|
168
|
+
combine('borderBottomRight', fitlength_fitwidth_image_radius, true);
|
|
169
|
+
combine('column', ['s', 'Count', 'Fill', 'Gap', 'Rule', 'RuleColor', 'RuleStyle', 'RuleWidth', 'Span', width], true);
|
|
170
|
+
combine('break', [...after_before, 'Inside'], true);
|
|
171
|
+
combine('wrap', [...after_before, 'Flow', 'Inside', 'Through'], true);
|
|
172
|
+
combine('justify', content_items_self, true);
|
|
173
|
+
combine('place', content_items_self, true);
|
|
174
|
+
combine('max', [...blockSize_height_inlineSize_width, 'Lines'], true);
|
|
175
|
+
combine('min', blockSize_height_inlineSize_width, true);
|
|
176
|
+
combine('line', ['Break', 'Clamp', 'Grid', 'Height', 'Padding', 'Snap'], true);
|
|
177
|
+
combine('inline', ['BoxAlign', size, 'Sizing'], true);
|
|
178
|
+
combine('text', ['CombineUpright', 'GroupAlign', 'Height', 'Indent', 'Justify', 'Orientation', 'Overflow', 'Shadow', 'SpaceCollapse', 'SpaceTrim', 'Spacing', 'Transform', 'UnderlinePosition', 'Wrap'], true);
|
|
179
|
+
combine('shape', ['ImageThreshold', 'Inside', 'Margin', 'Outside'], true);
|
|
180
|
+
combine('word', ['Break', 'Spacing', 'Wrap'], true);
|
|
181
|
+
combine('object', ['Fit', 'Position'], true);
|
|
182
|
+
combine('box', ['DecorationBreak', 'Shadow', 'Sizing', 'Snap'], true);
|
|
183
|
+
combine(WEBKIT, ['LineClamp', 'BoxOrient', 'TextFillColor', 'TextStroke', 'TextStrokeColor', 'TextStrokeWidth'], true);
|
|
184
|
+
|
|
185
|
+
export { styleProperties };
|
|
186
|
+
//# sourceMappingURL=style_properties.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"style_properties.js","sources":["../../src/dom/style_properties.ts"],"sourcesContent":["/*\n *\n * https://www.w3.org/Style/CSS/all-properties.en.html\n */\n\nconst WEBKIT = 'webkit'\n\nconst styleProperties = [\n 'all',\n 'appearance',\n 'blockOverflow',\n 'blockSize',\n 'bottom',\n 'clear',\n 'contain',\n 'content',\n 'continue',\n 'cursor',\n 'direction',\n 'display',\n 'filter',\n 'float',\n 'gap',\n 'height',\n 'inset',\n 'isolation',\n 'left',\n 'letterSpacing',\n 'lightingColor',\n 'markerSide',\n 'mixBlendMode',\n 'opacity',\n 'order',\n 'position',\n 'quotes',\n 'resize',\n 'right',\n 'rowGap',\n 'tabSize',\n 'tableLayout',\n 'top',\n 'userSelect',\n 'verticalAlign',\n 'visibility',\n 'voiceFamily',\n 'volume',\n 'whiteSpace',\n 'widows',\n 'width',\n 'zIndex',\n 'pointerEvents',\n 'aspectRatio'\n\n /** 非常用 style */\n // 'azimuth',\n // 'backfaceVisibility',\n // 'baselineShift',\n // 'captionSide',\n // 'chains',\n // 'dominantBaseline',\n // 'elevation',\n // 'emptyCells',\n // 'forcedColorAdjust',\n // 'glyphOrientationVertical',\n // 'hangingPunctuation',\n // 'hyphenateCharacter',\n // 'hyphens',\n // 'imageOrientation',\n // 'imageResolution',\n // 'orphans',\n // 'playDuring',\n // 'pointerEvents',\n // 'regionFragment',\n // 'richness',\n // 'running',\n // 'scrollBehavior',\n // 'speechRate',\n // 'stress',\n // 'stringSet',\n // 'unicodeBidi',\n // 'willChange',\n // 'writingMode',\n]\n\n// 减少文件体积\nfunction combine (prefix: string, list: string[], excludeSelf?: boolean) {\n !excludeSelf && styleProperties.push(prefix)\n list.forEach(item => {\n styleProperties.push(prefix + item)\n if (prefix === WEBKIT) {\n styleProperties.push('Webkit' + item)\n }\n })\n}\n\nconst color = 'Color'\nconst style = 'Style'\nconst width = 'Width'\nconst image = 'Image'\nconst size = 'Size'\nconst color_style_width = [color, style, width]\nconst fitlength_fitwidth_image = ['FitLength', 'FitWidth', image]\nconst fitlength_fitwidth_image_radius = [...fitlength_fitwidth_image, 'Radius']\nconst color_style_width_fitlength_fitwidth_image = [...color_style_width, ...fitlength_fitwidth_image]\nconst endRadius_startRadius = ['EndRadius', 'StartRadius']\nconst bottom_left_right_top = ['Bottom', 'Left', 'Right', 'Top']\nconst end_start = ['End', 'Start']\nconst content_items_self = ['Content', 'Items', 'Self']\nconst blockSize_height_inlineSize_width = ['BlockSize', 'Height', 'InlineSize', width]\nconst after_before = ['After', 'Before']\n\ncombine('borderBlock', color_style_width)\ncombine('borderBlockEnd', color_style_width)\ncombine('borderBlockStart', color_style_width)\ncombine('outline', [...color_style_width, 'Offset'])\ncombine('border', [...color_style_width, 'Boundary', 'Break', 'Collapse', 'Radius', 'Spacing'])\ncombine('borderFit', ['Length', width])\ncombine('borderInline', color_style_width)\ncombine('borderInlineEnd', color_style_width)\ncombine('borderInlineStart', color_style_width)\ncombine('borderLeft', color_style_width_fitlength_fitwidth_image)\ncombine('borderRight', color_style_width_fitlength_fitwidth_image)\ncombine('borderTop', color_style_width_fitlength_fitwidth_image)\ncombine('borderBottom', color_style_width_fitlength_fitwidth_image)\ncombine('textDecoration', [color, style, 'Line'])\ncombine('textEmphasis', [color, style, 'Position'])\ncombine('scrollMargin', bottom_left_right_top)\ncombine('scrollPadding', bottom_left_right_top)\ncombine('padding', bottom_left_right_top)\ncombine('margin', [...bottom_left_right_top, 'Trim'])\ncombine('scrollMarginBlock', end_start)\ncombine('scrollMarginInline', end_start)\ncombine('scrollPaddingBlock', end_start)\ncombine('scrollPaddingInline', end_start)\ncombine('gridColumn', end_start)\ncombine('gridRow', end_start)\ncombine('insetBlock', end_start)\ncombine('insetInline', end_start)\ncombine('marginBlock', end_start)\ncombine('marginInline', end_start)\ncombine('paddingBlock', end_start)\ncombine('paddingInline', end_start)\ncombine('pause', after_before)\ncombine('cue', after_before)\ncombine('mask', ['Clip', 'Composite', image, 'Mode', 'Origin', 'Position', 'Repeat', size, 'Type'])\ncombine('borderImage', ['Outset', 'Repeat', 'Slice', 'Source', 'Transform', width])\ncombine('maskBorder', ['Mode', 'Outset', 'Repeat', 'Slice', 'Source', width])\ncombine('font', ['Family', 'FeatureSettings', 'Kerning', 'LanguageOverride', 'MaxSize', 'MinSize', 'OpticalSizing', 'Palette', size, 'SizeAdjust', 'Stretch', style, 'Weight', 'VariationSettings'])\ncombine('transform', ['Box', 'Origin', style])\ncombine('background', [color, image, 'Attachment', 'BlendMode', 'Clip', 'Origin', 'Position', 'Repeat', size])\ncombine('listStyle', [image, 'Position', 'Type'])\ncombine('scrollSnap', ['Align', 'Stop', 'Type'])\ncombine('grid', ['Area', 'AutoColumns', 'AutoFlow', 'AutoRows'])\ncombine('gridTemplate', ['Areas', 'Columns', 'Rows'])\ncombine('overflow', ['Block', 'Inline', 'Wrap', 'X', 'Y'])\ncombine('transition', ['Delay', 'Duration', 'Property', 'TimingFunction'])\ncombine('color', ['Adjust', 'InterpolationFilters', 'Scheme'])\ncombine('textAlign', ['All', 'Last'])\ncombine('page', ['BreakAfter', 'BreakBefore', 'BreakInside'])\ncombine('animation', ['Delay', 'Direction', 'Duration', 'FillMode', 'IterationCount', 'Name', 'PlayState', 'TimingFunction'])\ncombine('flex', ['Basis', 'Direction', 'Flow', 'Grow', 'Shrink', 'Wrap'])\ncombine('offset', [...after_before, ...end_start, 'Anchor', 'Distance', 'Path', 'Position', 'Rotate'])\ncombine('perspective', ['Origin'])\ncombine('clip', ['Path', 'Rule'])\ncombine('flow', ['From', 'Into'])\n\ncombine('align', ['Content', 'Items', 'Self'], true)\ncombine('alignment', ['Adjust', 'Baseline'], true)\ncombine('borderStart', endRadius_startRadius, true)\ncombine('borderEnd', endRadius_startRadius, true)\ncombine('borderCorner', ['Fit', image, 'ImageTransform'], true)\ncombine('borderTopLeft', fitlength_fitwidth_image_radius, true)\ncombine('borderTopRight', fitlength_fitwidth_image_radius, true)\ncombine('borderBottomLeft', fitlength_fitwidth_image_radius, true)\ncombine('borderBottomRight', fitlength_fitwidth_image_radius, true)\ncombine('column', ['s', 'Count', 'Fill', 'Gap', 'Rule', 'RuleColor', 'RuleStyle', 'RuleWidth', 'Span', width], true)\ncombine('break', [...after_before, 'Inside'], true)\ncombine('wrap', [...after_before, 'Flow', 'Inside', 'Through'], true)\ncombine('justify', content_items_self, true)\ncombine('place', content_items_self, true)\ncombine('max', [...blockSize_height_inlineSize_width, 'Lines'], true)\ncombine('min', blockSize_height_inlineSize_width, true)\ncombine('line', ['Break', 'Clamp', 'Grid', 'Height', 'Padding', 'Snap'], true)\ncombine('inline', ['BoxAlign', size, 'Sizing'], true)\ncombine('text', ['CombineUpright', 'GroupAlign', 'Height', 'Indent', 'Justify', 'Orientation', 'Overflow', 'Shadow', 'SpaceCollapse', 'SpaceTrim', 'Spacing', 'Transform', 'UnderlinePosition', 'Wrap'], true)\ncombine('shape', ['ImageThreshold', 'Inside', 'Margin', 'Outside'], true)\ncombine('word', ['Break', 'Spacing', 'Wrap'], true)\ncombine('object', ['Fit', 'Position'], true)\ncombine('box', ['DecorationBreak', 'Shadow', 'Sizing', 'Snap'], true)\n\ncombine(WEBKIT, ['LineClamp', 'BoxOrient', 'TextFillColor', 'TextStroke', 'TextStrokeColor', 'TextStrokeWidth'], true)\n\n/** 非常用 style */\n// combine('caret', [color, 'Shape'])\n// combine('counter', ['Increment', 'Reset', 'Set'], true)\n// combine('dropInitial', ['AfterAdjust', 'AfterAlign', 'BeforeAdjust', 'BeforeAlign', size, 'Value'], true)\n// combine('flood', [color, 'Opacity'], true)\n// combine('footnote', ['Display', 'Policy'], true)\n// combine('hyphenateLimit', ['Chars', 'Last', 'Lines', 'Zone'], true)\n// combine('initialLetters', ['Align', 'Wrap'])\n// combine('ruby', ['Align', 'Merge', 'Position'], true)\n// combine('lineStacking', ['Ruby', 'Shift', 'Strategy'])\n// combine('bookmark', ['Label', 'Level', 'State'], true)\n// combine('speak', ['Header', 'Numeral', 'Punctuation'])\n// combine('pitch', ['Range'])\n// combine('nav', ['Down', 'Left', 'Right', 'Up'], true)\n// combine('fontSynthesis', ['SmallCaps', style, 'Weight'])\n// combine('fontVariant', ['Alternates', 'Caps', 'EastAsian', 'Emoji', 'Ligatures', 'Numeric', 'Position'])\n\nexport { styleProperties }\n"],"names":[],"mappings":"AAAA;;;AAGG;AAEH,MAAM,MAAM,GAAG,QAAQ,CAAA;AAEvB,MAAM,eAAe,GAAG;IACtB,KAAK;IACL,YAAY;IACZ,eAAe;IACf,WAAW;IACX,QAAQ;IACR,OAAO;IACP,SAAS;IACT,SAAS;IACT,UAAU;IACV,QAAQ;IACR,WAAW;IACX,SAAS;IACT,QAAQ;IACR,OAAO;IACP,KAAK;IACL,QAAQ;IACR,OAAO;IACP,WAAW;IACX,MAAM;IACN,eAAe;IACf,eAAe;IACf,YAAY;IACZ,cAAc;IACd,SAAS;IACT,OAAO;IACP,UAAU;IACV,QAAQ;IACR,QAAQ;IACR,OAAO;IACP,QAAQ;IACR,SAAS;IACT,aAAa;IACb,KAAK;IACL,YAAY;IACZ,eAAe;IACf,YAAY;IACZ,aAAa;IACb,QAAQ;IACR,YAAY;IACZ,QAAQ;IACR,OAAO;IACP,QAAQ;IACR,eAAe;IACf,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+Bd;AAED;AACA,SAAS,OAAO,CAAE,MAAc,EAAE,IAAc,EAAE,WAAqB,EAAA;IACrE,CAAC,WAAW,IAAI,eAAe,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;AAC5C,IAAA,IAAI,CAAC,OAAO,CAAC,IAAI,IAAG;AAClB,QAAA,eAAe,CAAC,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,CAAA;AACnC,QAAA,IAAI,MAAM,KAAK,MAAM,EAAE;AACrB,YAAA,eAAe,CAAC,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,CAAA;SACtC;AACH,KAAC,CAAC,CAAA;AACJ,CAAC;AAED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