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 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 is only meant for direct use via `<script src="...">`.
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.1
3
- * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
- * @license MIT
5
- **/
6
- 'use strict';
7
-
8
- Object.defineProperty(exports, '__esModule', { value: true });
9
-
10
- var compilerDom = require('@vue/compiler-dom');
11
- var runtimeDom = require('@vue/runtime-dom');
12
- var shared = require('@vue/shared');
13
-
14
- function _interopNamespaceDefault(e) {
15
- var n = Object.create(null);
16
- if (e) {
17
- for (var k in e) {
18
- n[k] = e[k];
19
- }
20
- }
21
- n.default = e;
22
- return Object.freeze(n);
23
- }
24
-
25
- var runtimeDom__namespace = /*#__PURE__*/_interopNamespaceDefault(runtimeDom);
26
-
27
- const compileCache = /* @__PURE__ */ Object.create(null);
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
- if (!shared.isString(template)) {
30
- if (template.nodeType) {
31
- template = template.innerHTML;
32
- } else {
33
- runtimeDom.warn(`invalid template option: `, template);
34
- return shared.NOOP;
35
- }
36
- }
37
- const key = shared.genCacheKey(template, options);
38
- const cached = compileCache[key];
39
- if (cached) {
40
- return cached;
41
- }
42
- if (template[0] === "#") {
43
- const el = document.querySelector(template);
44
- if (!el) {
45
- runtimeDom.warn(`Template element not found or is empty: ${template}`);
46
- }
47
- template = el ? el.innerHTML : ``;
48
- }
49
- const opts = shared.extend(
50
- {
51
- hoistStatic: true,
52
- onError: onError ,
53
- onWarn: (e) => onError(e, true)
54
- },
55
- options
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
- runtimeDom.registerRuntimeCompiler(compileToFunction);
76
-
68
+ (0, _vue_runtime_dom.registerRuntimeCompiler)(compileToFunction);
69
+ //#endregion
77
70
  exports.compile = compileToFunction;
78
- Object.keys(runtimeDom).forEach(function (k) {
79
- if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = runtimeDom[k];
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
  });
@@ -1,66 +1,69 @@
1
1
  /**
2
- * vue v3.6.0-beta.1
3
- * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
- * @license MIT
5
- **/
6
- 'use strict';
7
-
8
- Object.defineProperty(exports, '__esModule', { value: true });
9
-
10
- var compilerDom = require('@vue/compiler-dom');
11
- var runtimeDom = require('@vue/runtime-dom');
12
- var shared = require('@vue/shared');
13
-
14
- function _interopNamespaceDefault(e) {
15
- var n = Object.create(null);
16
- if (e) {
17
- for (var k in e) {
18
- n[k] = e[k];
19
- }
20
- }
21
- n.default = e;
22
- return Object.freeze(n);
23
- }
24
-
25
- var runtimeDom__namespace = /*#__PURE__*/_interopNamespaceDefault(runtimeDom);
26
-
27
- const compileCache = /* @__PURE__ */ Object.create(null);
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
- if (!shared.isString(template)) {
30
- if (template.nodeType) {
31
- template = template.innerHTML;
32
- } else {
33
- return shared.NOOP;
34
- }
35
- }
36
- const key = shared.genCacheKey(template, options);
37
- const cached = compileCache[key];
38
- if (cached) {
39
- return cached;
40
- }
41
- if (template[0] === "#") {
42
- const el = document.querySelector(template);
43
- template = el ? el.innerHTML : ``;
44
- }
45
- const opts = shared.extend(
46
- {
47
- hoistStatic: true,
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
- runtimeDom.registerRuntimeCompiler(compileToFunction);
62
-
59
+ (0, _vue_runtime_dom.registerRuntimeCompiler)(compileToFunction);
60
+ //#endregion
63
61
  exports.compile = compileToFunction;
64
- Object.keys(runtimeDom).forEach(function (k) {
65
- if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = runtimeDom[k];
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 '@vue/compiler-dom';
2
- import { RenderFunction } from '@vue/runtime-dom';
3
- export * from '@vue/runtime-dom';
4
- export * from '@vue/runtime-vapor';
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 '@vue/compiler-dom';
2
- import { RenderFunction } from '@vue/runtime-dom';
3
- export * from '@vue/runtime-dom';
4
- export * from '@vue/runtime-vapor';
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 };