vue 3.6.0-beta.1 → 3.6.0-beta.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/README.md +2 -2
- package/dist/vue.cjs.js +73 -75
- package/dist/vue.cjs.prod.js +64 -61
- package/dist/vue.d.mts +10 -6
- package/dist/vue.d.ts +10 -6
- package/dist/vue.esm-browser.js +12922 -17910
- package/dist/vue.esm-browser.prod.js +10 -12
- package/dist/vue.esm-bundler.js +48 -66
- package/dist/vue.global.js +14256 -19154
- package/dist/vue.global.prod.js +10 -12
- package/dist/vue.runtime-with-vapor.esm-browser.js +13732 -17110
- package/dist/vue.runtime-with-vapor.esm-browser.prod.js +11 -14
- package/dist/vue.runtime.esm-browser.js +8925 -12348
- package/dist/vue.runtime.esm-browser.prod.js +7 -6
- package/dist/vue.runtime.esm-bundler.js +19 -24
- package/dist/vue.runtime.global.js +10108 -13429
- package/dist/vue.runtime.global.prod.js +7 -6
- package/jsx-runtime/index.d.ts +1 -1
- package/jsx.d.ts +0 -2
- package/package.json +8 -8
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
- **`vue(.runtime).global(.prod).js`**:
|
|
8
8
|
- For direct use via `<script src="...">` in the browser. Exposes the `Vue` global.
|
|
9
|
-
- Note that global builds are not [UMD](https://github.com/umdjs/umd) builds. They are built as [IIFEs](https://developer.mozilla.org/en-US/docs/Glossary/IIFE) and
|
|
9
|
+
- Note that global builds are not [UMD](https://github.com/umdjs/umd) builds. They are built as [IIFEs](https://developer.mozilla.org/en-US/docs/Glossary/IIFE) and are only meant for direct use via `<script src="...">`.
|
|
10
10
|
- In-browser template compilation:
|
|
11
11
|
- **`vue.global.js`** is the "full" build that includes both the compiler and the runtime so it supports compiling templates on the fly.
|
|
12
12
|
- **`vue.runtime.global.js`** contains only the runtime and requires templates to be pre-compiled during a build step.
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
### With a Bundler
|
|
21
21
|
|
|
22
22
|
- **`vue(.runtime).esm-bundler.js`**:
|
|
23
|
-
- For use with bundlers like `webpack`, `rollup` and `parcel`.
|
|
23
|
+
- For use with bundlers like `rolldown`, `webpack`, `rollup` and `parcel`.
|
|
24
24
|
- Leaves prod/dev branches with `process.env.NODE_ENV` guards (must be replaced by bundler)
|
|
25
25
|
- Does not ship minified builds (to be done together with the rest of the code after bundling)
|
|
26
26
|
- Imports dependencies (e.g. `@vue/runtime-core`, `@vue/compiler-core`)
|
package/dist/vue.cjs.js
CHANGED
|
@@ -1,80 +1,78 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* vue v3.6.0-beta.
|
|
3
|
-
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
|
-
* @license MIT
|
|
5
|
-
**/
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
var
|
|
12
|
-
var
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
2
|
+
* vue v3.6.0-beta.10
|
|
3
|
+
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
|
+
* @license MIT
|
|
5
|
+
**/
|
|
6
|
+
Object.defineProperties(exports, {
|
|
7
|
+
__esModule: { value: true },
|
|
8
|
+
[Symbol.toStringTag]: { value: "Module" }
|
|
9
|
+
});
|
|
10
|
+
//#region \0rolldown/runtime.js
|
|
11
|
+
var __create = Object.create;
|
|
12
|
+
var __defProp = Object.defineProperty;
|
|
13
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
14
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
15
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
16
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
17
|
+
var __copyProps = (to, from, except, desc) => {
|
|
18
|
+
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
19
|
+
key = keys[i];
|
|
20
|
+
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
21
|
+
get: ((k) => from[k]).bind(null, key),
|
|
22
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
return to;
|
|
26
|
+
};
|
|
27
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
28
|
+
value: mod,
|
|
29
|
+
enumerable: true
|
|
30
|
+
}) : target, mod));
|
|
31
|
+
//#endregion
|
|
32
|
+
let _vue_runtime_dom = require("@vue/runtime-dom");
|
|
33
|
+
_vue_runtime_dom = __toESM(_vue_runtime_dom);
|
|
34
|
+
let _vue_compiler_dom = require("@vue/compiler-dom");
|
|
35
|
+
let _vue_shared = require("@vue/shared");
|
|
36
|
+
//#region packages/vue/src/index.ts
|
|
37
|
+
const compileCache = Object.create(null);
|
|
28
38
|
function compileToFunction(template, options) {
|
|
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
|
-
if (!opts.isCustomElement && typeof customElements !== "undefined") {
|
|
58
|
-
opts.isCustomElement = (tag) => !!customElements.get(tag);
|
|
59
|
-
}
|
|
60
|
-
const { code } = compilerDom.compile(template, opts);
|
|
61
|
-
function onError(err, asWarning = false) {
|
|
62
|
-
const message = asWarning ? err.message : `Template compilation error: ${err.message}`;
|
|
63
|
-
const codeFrame = err.loc && shared.generateCodeFrame(
|
|
64
|
-
template,
|
|
65
|
-
err.loc.start.offset,
|
|
66
|
-
err.loc.end.offset
|
|
67
|
-
);
|
|
68
|
-
runtimeDom.warn(codeFrame ? `${message}
|
|
69
|
-
${codeFrame}` : message);
|
|
70
|
-
}
|
|
71
|
-
const render = new Function("Vue", code)(runtimeDom__namespace);
|
|
72
|
-
render._rc = true;
|
|
73
|
-
return compileCache[key] = render;
|
|
39
|
+
if (!(0, _vue_shared.isString)(template)) if (template.nodeType) template = template.innerHTML;
|
|
40
|
+
else {
|
|
41
|
+
(0, _vue_runtime_dom.warn)(`invalid template option: `, template);
|
|
42
|
+
return _vue_shared.NOOP;
|
|
43
|
+
}
|
|
44
|
+
const key = (0, _vue_shared.genCacheKey)(template, options);
|
|
45
|
+
const cached = compileCache[key];
|
|
46
|
+
if (cached) return cached;
|
|
47
|
+
if (template[0] === "#") {
|
|
48
|
+
const el = document.querySelector(template);
|
|
49
|
+
if (!el) (0, _vue_runtime_dom.warn)(`Template element not found or is empty: ${template}`);
|
|
50
|
+
template = el ? el.innerHTML : ``;
|
|
51
|
+
}
|
|
52
|
+
const opts = (0, _vue_shared.extend)({
|
|
53
|
+
hoistStatic: true,
|
|
54
|
+
onError,
|
|
55
|
+
onWarn: (e) => onError(e, true)
|
|
56
|
+
}, options);
|
|
57
|
+
if (!opts.isCustomElement && typeof customElements !== "undefined") opts.isCustomElement = (tag) => !!customElements.get(tag);
|
|
58
|
+
const { code } = (0, _vue_compiler_dom.compile)(template, opts);
|
|
59
|
+
function onError(err, asWarning = false) {
|
|
60
|
+
const message = asWarning ? err.message : `Template compilation error: ${err.message}`;
|
|
61
|
+
const codeFrame = err.loc && (0, _vue_shared.generateCodeFrame)(template, err.loc.start.offset, err.loc.end.offset);
|
|
62
|
+
(0, _vue_runtime_dom.warn)(codeFrame ? `${message}\n${codeFrame}` : message);
|
|
63
|
+
}
|
|
64
|
+
const render = new Function("Vue", code)(_vue_runtime_dom);
|
|
65
|
+
render._rc = true;
|
|
66
|
+
return compileCache[key] = render;
|
|
74
67
|
}
|
|
75
|
-
|
|
76
|
-
|
|
68
|
+
(0, _vue_runtime_dom.registerRuntimeCompiler)(compileToFunction);
|
|
69
|
+
//#endregion
|
|
77
70
|
exports.compile = compileToFunction;
|
|
78
|
-
Object.keys(
|
|
79
|
-
|
|
71
|
+
Object.keys(_vue_runtime_dom).forEach(function(k) {
|
|
72
|
+
if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
73
|
+
enumerable: true,
|
|
74
|
+
get: function() {
|
|
75
|
+
return _vue_runtime_dom[k];
|
|
76
|
+
}
|
|
77
|
+
});
|
|
80
78
|
});
|
package/dist/vue.cjs.prod.js
CHANGED
|
@@ -1,66 +1,69 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* vue v3.6.0-beta.
|
|
3
|
-
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
|
-
* @license MIT
|
|
5
|
-
**/
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
var
|
|
12
|
-
var
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
2
|
+
* vue v3.6.0-beta.10
|
|
3
|
+
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
|
+
* @license MIT
|
|
5
|
+
**/
|
|
6
|
+
Object.defineProperties(exports, {
|
|
7
|
+
__esModule: { value: true },
|
|
8
|
+
[Symbol.toStringTag]: { value: "Module" }
|
|
9
|
+
});
|
|
10
|
+
//#region \0rolldown/runtime.js
|
|
11
|
+
var __create = Object.create;
|
|
12
|
+
var __defProp = Object.defineProperty;
|
|
13
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
14
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
15
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
16
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
17
|
+
var __copyProps = (to, from, except, desc) => {
|
|
18
|
+
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
19
|
+
key = keys[i];
|
|
20
|
+
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
21
|
+
get: ((k) => from[k]).bind(null, key),
|
|
22
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
return to;
|
|
26
|
+
};
|
|
27
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
28
|
+
value: mod,
|
|
29
|
+
enumerable: true
|
|
30
|
+
}) : target, mod));
|
|
31
|
+
//#endregion
|
|
32
|
+
let _vue_runtime_dom = require("@vue/runtime-dom");
|
|
33
|
+
_vue_runtime_dom = __toESM(_vue_runtime_dom);
|
|
34
|
+
let _vue_compiler_dom = require("@vue/compiler-dom");
|
|
35
|
+
let _vue_shared = require("@vue/shared");
|
|
36
|
+
//#region packages/vue/src/index.ts
|
|
37
|
+
const compileCache = Object.create(null);
|
|
28
38
|
function compileToFunction(template, options) {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
onError: void 0,
|
|
49
|
-
onWarn: shared.NOOP
|
|
50
|
-
},
|
|
51
|
-
options
|
|
52
|
-
);
|
|
53
|
-
if (!opts.isCustomElement && typeof customElements !== "undefined") {
|
|
54
|
-
opts.isCustomElement = (tag) => !!customElements.get(tag);
|
|
55
|
-
}
|
|
56
|
-
const { code } = compilerDom.compile(template, opts);
|
|
57
|
-
const render = new Function("Vue", code)(runtimeDom__namespace);
|
|
58
|
-
render._rc = true;
|
|
59
|
-
return compileCache[key] = render;
|
|
39
|
+
if (!(0, _vue_shared.isString)(template)) if (template.nodeType) template = template.innerHTML;
|
|
40
|
+
else return _vue_shared.NOOP;
|
|
41
|
+
const key = (0, _vue_shared.genCacheKey)(template, options);
|
|
42
|
+
const cached = compileCache[key];
|
|
43
|
+
if (cached) return cached;
|
|
44
|
+
if (template[0] === "#") {
|
|
45
|
+
const el = document.querySelector(template);
|
|
46
|
+
template = el ? el.innerHTML : ``;
|
|
47
|
+
}
|
|
48
|
+
const opts = (0, _vue_shared.extend)({
|
|
49
|
+
hoistStatic: true,
|
|
50
|
+
onError: void 0,
|
|
51
|
+
onWarn: _vue_shared.NOOP
|
|
52
|
+
}, options);
|
|
53
|
+
if (!opts.isCustomElement && typeof customElements !== "undefined") opts.isCustomElement = (tag) => !!customElements.get(tag);
|
|
54
|
+
const { code } = (0, _vue_compiler_dom.compile)(template, opts);
|
|
55
|
+
const render = new Function("Vue", code)(_vue_runtime_dom);
|
|
56
|
+
render._rc = true;
|
|
57
|
+
return compileCache[key] = render;
|
|
60
58
|
}
|
|
61
|
-
|
|
62
|
-
|
|
59
|
+
(0, _vue_runtime_dom.registerRuntimeCompiler)(compileToFunction);
|
|
60
|
+
//#endregion
|
|
63
61
|
exports.compile = compileToFunction;
|
|
64
|
-
Object.keys(
|
|
65
|
-
|
|
62
|
+
Object.keys(_vue_runtime_dom).forEach(function(k) {
|
|
63
|
+
if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
64
|
+
enumerable: true,
|
|
65
|
+
get: function() {
|
|
66
|
+
return _vue_runtime_dom[k];
|
|
67
|
+
}
|
|
68
|
+
});
|
|
66
69
|
});
|
package/dist/vue.d.mts
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
import { CompilerOptions } from
|
|
2
|
-
import { RenderFunction } from
|
|
3
|
-
|
|
4
|
-
export * from
|
|
1
|
+
import { CompilerOptions } from "@vue/compiler-dom";
|
|
2
|
+
import { RenderFunction } from "@vue/runtime-dom";
|
|
3
|
+
import { withAsyncContext } from "@vue/runtime-vapor";
|
|
4
|
+
export * from "@vue/runtime-dom";
|
|
5
|
+
export * from "@vue/runtime-vapor";
|
|
5
6
|
|
|
7
|
+
//#region \0rolldown/runtime.js
|
|
8
|
+
//#endregion
|
|
9
|
+
//#region temp/packages/vue/src/index.d.ts
|
|
6
10
|
export declare function compileToFunction(template: string | HTMLElement, options?: CompilerOptions): RenderFunction;
|
|
7
|
-
|
|
8
|
-
export { compileToFunction as compile };
|
|
11
|
+
//#endregion
|
|
12
|
+
export { compileToFunction as compile, withAsyncContext };
|
package/dist/vue.d.ts
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
import { CompilerOptions } from
|
|
2
|
-
import { RenderFunction } from
|
|
3
|
-
|
|
4
|
-
export * from
|
|
1
|
+
import { CompilerOptions } from "@vue/compiler-dom";
|
|
2
|
+
import { RenderFunction } from "@vue/runtime-dom";
|
|
3
|
+
import { withAsyncContext } from "@vue/runtime-vapor";
|
|
4
|
+
export * from "@vue/runtime-dom";
|
|
5
|
+
export * from "@vue/runtime-vapor";
|
|
5
6
|
|
|
7
|
+
//#region \0rolldown/runtime.js
|
|
8
|
+
//#endregion
|
|
9
|
+
//#region temp/packages/vue/src/index.d.ts
|
|
6
10
|
export declare function compileToFunction(template: string | HTMLElement, options?: CompilerOptions): RenderFunction;
|
|
7
|
-
|
|
8
|
-
export { compileToFunction as compile };
|
|
11
|
+
//#endregion
|
|
12
|
+
export { compileToFunction as compile, withAsyncContext };
|