vue 3.6.0-beta.4 → 3.6.0-beta.6

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
@@ -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,80 @@
1
1
  /**
2
- * vue v3.6.0-beta.4
3
- * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
- * @license MIT
5
- **/
6
- 'use strict';
2
+ * vue v3.6.0-beta.6
3
+ * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
+ * @license MIT
5
+ **/
6
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
7
+ //#region \0rolldown/runtime.js
8
+ var __create = Object.create;
9
+ var __defProp = Object.defineProperty;
10
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
11
+ var __getOwnPropNames = Object.getOwnPropertyNames;
12
+ var __getProtoOf = Object.getPrototypeOf;
13
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
14
+ var __copyProps = (to, from, except, desc) => {
15
+ if (from && typeof from === "object" || typeof from === "function") {
16
+ for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
17
+ key = keys[i];
18
+ if (!__hasOwnProp.call(to, key) && key !== except) {
19
+ __defProp(to, key, {
20
+ get: ((k) => from[k]).bind(null, key),
21
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
22
+ });
23
+ }
24
+ }
25
+ }
26
+ return to;
27
+ };
28
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
29
+ value: mod,
30
+ enumerable: true
31
+ }) : target, mod));
7
32
 
8
- Object.defineProperty(exports, '__esModule', { value: true });
33
+ //#endregion
34
+ let _vue_runtime_dom = require("@vue/runtime-dom");
35
+ _vue_runtime_dom = __toESM(_vue_runtime_dom);
36
+ let _vue_compiler_dom = require("@vue/compiler-dom");
37
+ let _vue_shared = require("@vue/shared");
9
38
 
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);
39
+ //#region packages/vue/src/index.ts
40
+ const compileCache = Object.create(null);
28
41
  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;
42
+ if (!(0, _vue_shared.isString)(template)) if (template.nodeType) template = template.innerHTML;
43
+ else {
44
+ (0, _vue_runtime_dom.warn)(`invalid template option: `, template);
45
+ return _vue_shared.NOOP;
46
+ }
47
+ const key = (0, _vue_shared.genCacheKey)(template, options);
48
+ const cached = compileCache[key];
49
+ if (cached) return cached;
50
+ if (template[0] === "#") {
51
+ const el = document.querySelector(template);
52
+ if (!el) (0, _vue_runtime_dom.warn)(`Template element not found or is empty: ${template}`);
53
+ template = el ? el.innerHTML : ``;
54
+ }
55
+ const opts = (0, _vue_shared.extend)({
56
+ hoistStatic: true,
57
+ onError,
58
+ onWarn: (e) => onError(e, true)
59
+ }, options);
60
+ if (!opts.isCustomElement && typeof customElements !== "undefined") opts.isCustomElement = (tag) => !!customElements.get(tag);
61
+ const { code } = (0, _vue_compiler_dom.compile)(template, opts);
62
+ function onError(err, asWarning = false) {
63
+ const message = asWarning ? err.message : `Template compilation error: ${err.message}`;
64
+ const codeFrame = err.loc && (0, _vue_shared.generateCodeFrame)(template, err.loc.start.offset, err.loc.end.offset);
65
+ (0, _vue_runtime_dom.warn)(codeFrame ? `${message}\n${codeFrame}` : message);
66
+ }
67
+ const render = new Function("Vue", code)(_vue_runtime_dom);
68
+ render._rc = true;
69
+ return compileCache[key] = render;
74
70
  }
75
- runtimeDom.registerRuntimeCompiler(compileToFunction);
71
+ (0, _vue_runtime_dom.registerRuntimeCompiler)(compileToFunction);
76
72
 
73
+ //#endregion
77
74
  exports.compile = compileToFunction;
78
- Object.keys(runtimeDom).forEach(function (k) {
79
- if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = runtimeDom[k];
75
+ Object.keys(_vue_runtime_dom).forEach(function (k) {
76
+ if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
77
+ enumerable: true,
78
+ get: function () { return _vue_runtime_dom[k]; }
79
+ });
80
80
  });
@@ -1,66 +1,71 @@
1
1
  /**
2
- * vue v3.6.0-beta.4
3
- * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
- * @license MIT
5
- **/
6
- 'use strict';
2
+ * vue v3.6.0-beta.6
3
+ * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
+ * @license MIT
5
+ **/
6
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
7
+ //#region \0rolldown/runtime.js
8
+ var __create = Object.create;
9
+ var __defProp = Object.defineProperty;
10
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
11
+ var __getOwnPropNames = Object.getOwnPropertyNames;
12
+ var __getProtoOf = Object.getPrototypeOf;
13
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
14
+ var __copyProps = (to, from, except, desc) => {
15
+ if (from && typeof from === "object" || typeof from === "function") {
16
+ for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
17
+ key = keys[i];
18
+ if (!__hasOwnProp.call(to, key) && key !== except) {
19
+ __defProp(to, key, {
20
+ get: ((k) => from[k]).bind(null, key),
21
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
22
+ });
23
+ }
24
+ }
25
+ }
26
+ return to;
27
+ };
28
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
29
+ value: mod,
30
+ enumerable: true
31
+ }) : target, mod));
7
32
 
8
- Object.defineProperty(exports, '__esModule', { value: true });
33
+ //#endregion
34
+ let _vue_runtime_dom = require("@vue/runtime-dom");
35
+ _vue_runtime_dom = __toESM(_vue_runtime_dom);
36
+ let _vue_compiler_dom = require("@vue/compiler-dom");
37
+ let _vue_shared = require("@vue/shared");
9
38
 
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);
39
+ //#region packages/vue/src/index.ts
40
+ const compileCache = Object.create(null);
28
41
  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;
42
+ if (!(0, _vue_shared.isString)(template)) if (template.nodeType) template = template.innerHTML;
43
+ else return _vue_shared.NOOP;
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
+ template = el ? el.innerHTML : ``;
50
+ }
51
+ const opts = (0, _vue_shared.extend)({
52
+ hoistStatic: true,
53
+ onError: void 0,
54
+ onWarn: _vue_shared.NOOP
55
+ }, options);
56
+ if (!opts.isCustomElement && typeof customElements !== "undefined") opts.isCustomElement = (tag) => !!customElements.get(tag);
57
+ const { code } = (0, _vue_compiler_dom.compile)(template, opts);
58
+ const render = new Function("Vue", code)(_vue_runtime_dom);
59
+ render._rc = true;
60
+ return compileCache[key] = render;
60
61
  }
61
- runtimeDom.registerRuntimeCompiler(compileToFunction);
62
+ (0, _vue_runtime_dom.registerRuntimeCompiler)(compileToFunction);
62
63
 
64
+ //#endregion
63
65
  exports.compile = compileToFunction;
64
- Object.keys(runtimeDom).forEach(function (k) {
65
- if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = runtimeDom[k];
66
+ Object.keys(_vue_runtime_dom).forEach(function (k) {
67
+ if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
68
+ enumerable: true,
69
+ get: function () { return _vue_runtime_dom[k]; }
70
+ });
66
71
  });
package/dist/vue.d.mts CHANGED
@@ -1,8 +1,11 @@
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
+ export * from "@vue/runtime-dom";
4
+ export * from "@vue/runtime-vapor";
5
5
 
6
+ //#region \0rolldown/runtime.js
7
+ //#endregion
8
+ //#region temp/packages/vue/src/index.d.ts
6
9
  export declare function compileToFunction(template: string | HTMLElement, options?: CompilerOptions): RenderFunction;
7
-
8
- export { compileToFunction as compile };
10
+ //#endregion
11
+ export { compileToFunction as compile };
package/dist/vue.d.ts CHANGED
@@ -1,8 +1,11 @@
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
+ export * from "@vue/runtime-dom";
4
+ export * from "@vue/runtime-vapor";
5
5
 
6
+ //#region \0rolldown/runtime.js
7
+ //#endregion
8
+ //#region temp/packages/vue/src/index.d.ts
6
9
  export declare function compileToFunction(template: string | HTMLElement, options?: CompilerOptions): RenderFunction;
7
-
8
- export { compileToFunction as compile };
10
+ //#endregion
11
+ export { compileToFunction as compile };