first commit
This commit is contained in:
+81
@@ -0,0 +1,81 @@
|
||||
/**
|
||||
* vue v3.6.0-rc.10
|
||||
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
||||
* @license MIT
|
||||
**/
|
||||
Object.defineProperties(exports, {
|
||||
__esModule: { value: true },
|
||||
[Symbol.toStringTag]: { value: "Module" }
|
||||
});
|
||||
//#region \0rolldown/runtime.js
|
||||
var __create = Object.create;
|
||||
var __defProp = Object.defineProperty;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
var __getProtoOf = Object.getPrototypeOf;
|
||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
var __copyProps = (to, from, except, desc) => {
|
||||
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
||||
key = keys[i];
|
||||
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
||||
get: ((k) => from[k]).bind(null, key),
|
||||
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
||||
});
|
||||
}
|
||||
return to;
|
||||
};
|
||||
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", {
|
||||
value: mod,
|
||||
enumerable: true
|
||||
}) : target, mod));
|
||||
//#endregion
|
||||
let _vue_runtime_dom = require("@vue/runtime-dom");
|
||||
_vue_runtime_dom = __toESM(_vue_runtime_dom);
|
||||
let _vue_compiler_dom = require("@vue/compiler-dom");
|
||||
let _vue_shared = require("@vue/shared");
|
||||
//#region packages/vue/src/index.ts
|
||||
const compileCache = Object.create(null);
|
||||
function compileToFunction(template, options) {
|
||||
if (!(0, _vue_shared.isString)(template)) {
|
||||
if (template.nodeType) template = template.innerHTML;
|
||||
else {
|
||||
(0, _vue_runtime_dom.warn)(`invalid template option: `, template);
|
||||
return _vue_shared.NOOP;
|
||||
}
|
||||
}
|
||||
const key = (0, _vue_shared.genCacheKey)(template, options);
|
||||
const cached = compileCache[key];
|
||||
if (cached) return cached;
|
||||
if (template[0] === "#") {
|
||||
const el = document.querySelector(template);
|
||||
if (!el) (0, _vue_runtime_dom.warn)(`Template element not found or is empty: ${template}`);
|
||||
template = el ? el.innerHTML : ``;
|
||||
}
|
||||
const opts = (0, _vue_shared.extend)({
|
||||
hoistStatic: true,
|
||||
onError,
|
||||
onWarn: (e) => onError(e, true)
|
||||
}, options);
|
||||
if (!opts.isCustomElement && typeof customElements !== "undefined") opts.isCustomElement = (tag) => !!customElements.get(tag);
|
||||
const { code } = (0, _vue_compiler_dom.compile)(template, opts);
|
||||
function onError(err, asWarning = false) {
|
||||
const message = asWarning ? err.message : `Template compilation error: ${err.message}`;
|
||||
const codeFrame = err.loc && (0, _vue_shared.generateCodeFrame)(template, err.loc.start.offset, err.loc.end.offset);
|
||||
(0, _vue_runtime_dom.warn)(codeFrame ? `${message}\n${codeFrame}` : message);
|
||||
}
|
||||
const render = new Function("Vue", code)(_vue_runtime_dom);
|
||||
render._rc = true;
|
||||
return compileCache[key] = render;
|
||||
}
|
||||
(0, _vue_runtime_dom.registerRuntimeCompiler)(compileToFunction);
|
||||
//#endregion
|
||||
exports.compile = compileToFunction;
|
||||
exports.defineVaporAsyncComponent = _vue_runtime_dom.defineAsyncComponent;
|
||||
Object.keys(_vue_runtime_dom).forEach(function(k) {
|
||||
if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
||||
enumerable: true,
|
||||
get: function() {
|
||||
return _vue_runtime_dom[k];
|
||||
}
|
||||
});
|
||||
});
|
||||
+72
@@ -0,0 +1,72 @@
|
||||
/**
|
||||
* vue v3.6.0-rc.10
|
||||
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
||||
* @license MIT
|
||||
**/
|
||||
Object.defineProperties(exports, {
|
||||
__esModule: { value: true },
|
||||
[Symbol.toStringTag]: { value: "Module" }
|
||||
});
|
||||
//#region \0rolldown/runtime.js
|
||||
var __create = Object.create;
|
||||
var __defProp = Object.defineProperty;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
var __getProtoOf = Object.getPrototypeOf;
|
||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
var __copyProps = (to, from, except, desc) => {
|
||||
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
||||
key = keys[i];
|
||||
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
||||
get: ((k) => from[k]).bind(null, key),
|
||||
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
||||
});
|
||||
}
|
||||
return to;
|
||||
};
|
||||
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", {
|
||||
value: mod,
|
||||
enumerable: true
|
||||
}) : target, mod));
|
||||
//#endregion
|
||||
let _vue_runtime_dom = require("@vue/runtime-dom");
|
||||
_vue_runtime_dom = __toESM(_vue_runtime_dom);
|
||||
let _vue_compiler_dom = require("@vue/compiler-dom");
|
||||
let _vue_shared = require("@vue/shared");
|
||||
//#region packages/vue/src/index.ts
|
||||
const compileCache = Object.create(null);
|
||||
function compileToFunction(template, options) {
|
||||
if (!(0, _vue_shared.isString)(template)) {
|
||||
if (template.nodeType) template = template.innerHTML;
|
||||
else return _vue_shared.NOOP;
|
||||
}
|
||||
const key = (0, _vue_shared.genCacheKey)(template, options);
|
||||
const cached = compileCache[key];
|
||||
if (cached) return cached;
|
||||
if (template[0] === "#") {
|
||||
const el = document.querySelector(template);
|
||||
template = el ? el.innerHTML : ``;
|
||||
}
|
||||
const opts = (0, _vue_shared.extend)({
|
||||
hoistStatic: true,
|
||||
onError: void 0,
|
||||
onWarn: _vue_shared.NOOP
|
||||
}, options);
|
||||
if (!opts.isCustomElement && typeof customElements !== "undefined") opts.isCustomElement = (tag) => !!customElements.get(tag);
|
||||
const { code } = (0, _vue_compiler_dom.compile)(template, opts);
|
||||
const render = new Function("Vue", code)(_vue_runtime_dom);
|
||||
render._rc = true;
|
||||
return compileCache[key] = render;
|
||||
}
|
||||
(0, _vue_runtime_dom.registerRuntimeCompiler)(compileToFunction);
|
||||
//#endregion
|
||||
exports.compile = compileToFunction;
|
||||
exports.defineVaporAsyncComponent = _vue_runtime_dom.defineAsyncComponent;
|
||||
Object.keys(_vue_runtime_dom).forEach(function(k) {
|
||||
if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
||||
enumerable: true,
|
||||
get: function() {
|
||||
return _vue_runtime_dom[k];
|
||||
}
|
||||
});
|
||||
});
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
import { CompilerOptions } from "@vue/compiler-dom";
|
||||
import { RenderFunction, defineAsyncComponent as defineVaporAsyncComponent$1 } from "@vue/runtime-dom";
|
||||
import { VaporSlot, defineVaporAsyncComponent } from "@vue/runtime-vapor";
|
||||
export * from "@vue/runtime-dom";
|
||||
export * from "@vue/runtime-vapor";
|
||||
//#region temp/packages/vue/src/index.d.ts
|
||||
export declare function compileToFunction(template: string | HTMLElement, options?: CompilerOptions): RenderFunction;
|
||||
//#endregion
|
||||
export { type VaporSlot, compileToFunction as compile, defineVaporAsyncComponent };
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
import { CompilerOptions } from "@vue/compiler-dom";
|
||||
import { RenderFunction, defineAsyncComponent as defineVaporAsyncComponent$1 } from "@vue/runtime-dom";
|
||||
import { VaporSlot, defineVaporAsyncComponent } from "@vue/runtime-vapor";
|
||||
export * from "@vue/runtime-dom";
|
||||
export * from "@vue/runtime-vapor";
|
||||
//#region temp/packages/vue/src/index.d.ts
|
||||
export declare function compileToFunction(template: string | HTMLElement, options?: CompilerOptions): RenderFunction;
|
||||
//#endregion
|
||||
export { type VaporSlot, compileToFunction as compile, defineVaporAsyncComponent };
|
||||
+14782
File diff suppressed because it is too large
Load Diff
+12
File diff suppressed because one or more lines are too long
+55
@@ -0,0 +1,55 @@
|
||||
/**
|
||||
* vue v3.6.0-rc.10
|
||||
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
||||
* @license MIT
|
||||
**/
|
||||
import * as runtimeDom from "@vue/runtime-dom";
|
||||
import { initCustomFormatter, registerRuntimeCompiler, warn } from "@vue/runtime-dom";
|
||||
import { compile } from "@vue/compiler-dom";
|
||||
import { NOOP, extend, genCacheKey, generateCodeFrame, isString } from "@vue/shared";
|
||||
import { defineVaporAsyncComponent } from "@vue/runtime-vapor";
|
||||
export * from "@vue/runtime-dom";
|
||||
export * from "@vue/runtime-vapor";
|
||||
//#region packages/vue/src/dev.ts
|
||||
function initDev() {
|
||||
initCustomFormatter();
|
||||
}
|
||||
//#endregion
|
||||
//#region packages/vue/src/index.ts
|
||||
if (!!(process.env.NODE_ENV !== "production")) initDev();
|
||||
const compileCache = Object.create(null);
|
||||
function compileToFunction(template, options) {
|
||||
if (!isString(template)) {
|
||||
if (template.nodeType) template = template.innerHTML;
|
||||
else {
|
||||
process.env.NODE_ENV !== "production" && warn(`invalid template option: `, template);
|
||||
return NOOP;
|
||||
}
|
||||
}
|
||||
const key = genCacheKey(template, options);
|
||||
const cached = compileCache[key];
|
||||
if (cached) return cached;
|
||||
if (template[0] === "#") {
|
||||
const el = document.querySelector(template);
|
||||
if (!!(process.env.NODE_ENV !== "production") && !el) warn(`Template element not found or is empty: ${template}`);
|
||||
template = el ? el.innerHTML : ``;
|
||||
}
|
||||
const opts = extend({
|
||||
hoistStatic: true,
|
||||
onError: !!(process.env.NODE_ENV !== "production") ? onError : void 0,
|
||||
onWarn: !!(process.env.NODE_ENV !== "production") ? (e) => onError(e, true) : NOOP
|
||||
}, options);
|
||||
if (!opts.isCustomElement && typeof customElements !== "undefined") opts.isCustomElement = (tag) => !!customElements.get(tag);
|
||||
const { code } = compile(template, opts);
|
||||
function onError(err, asWarning = false) {
|
||||
const message = asWarning ? err.message : `Template compilation error: ${err.message}`;
|
||||
const codeFrame = err.loc && generateCodeFrame(template, err.loc.start.offset, err.loc.end.offset);
|
||||
warn(codeFrame ? `${message}\n${codeFrame}` : message);
|
||||
}
|
||||
const render = new Function("Vue", code)(runtimeDom);
|
||||
render._rc = true;
|
||||
return compileCache[key] = render;
|
||||
}
|
||||
registerRuntimeCompiler(compileToFunction);
|
||||
//#endregion
|
||||
export { compileToFunction as compile, defineVaporAsyncComponent };
|
||||
+14753
File diff suppressed because it is too large
Load Diff
+12
File diff suppressed because one or more lines are too long
+19850
File diff suppressed because one or more lines are too long
+13
File diff suppressed because one or more lines are too long
+10377
File diff suppressed because it is too large
Load Diff
+9
File diff suppressed because one or more lines are too long
+23
@@ -0,0 +1,23 @@
|
||||
/**
|
||||
* vue v3.6.0-rc.10
|
||||
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
||||
* @license MIT
|
||||
**/
|
||||
import { NOOP } from "@vue/shared";
|
||||
import { initCustomFormatter, warn } from "@vue/runtime-dom";
|
||||
import { defineVaporAsyncComponent } from "@vue/runtime-vapor";
|
||||
export * from "@vue/runtime-dom";
|
||||
export * from "@vue/runtime-vapor";
|
||||
//#region packages/vue/src/dev.ts
|
||||
function initDev() {
|
||||
initCustomFormatter();
|
||||
}
|
||||
//#endregion
|
||||
//#region packages/vue/src/runtime.ts
|
||||
if (!!(process.env.NODE_ENV !== "production")) initDev();
|
||||
const compile = (_template) => {
|
||||
if (!!(process.env.NODE_ENV !== "production")) warn("Runtime compilation is not supported in this build of Vue. Configure your bundler to alias \"vue\" to \"vue/dist/vue.esm-bundler.js\".");
|
||||
return NOOP;
|
||||
};
|
||||
//#endregion
|
||||
export { compile, defineVaporAsyncComponent };
|
||||
+10537
File diff suppressed because it is too large
Load Diff
+9
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user