@vue/compiler-vapor 3.6.0-beta.5 → 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/dist/compiler-vapor.cjs.js +75 -43
- package/dist/compiler-vapor.d.ts +168 -152
- package/dist/compiler-vapor.esm-browser.js +88 -47
- package/package.json +4 -4
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compiler-vapor v3.6.0-beta.
|
|
2
|
+
* @vue/compiler-vapor v3.6.0-beta.6
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -50,7 +50,7 @@ function wrapTemplate(node, dirs) {
|
|
|
50
50
|
const reserved = [];
|
|
51
51
|
const pass = [];
|
|
52
52
|
node.props.forEach((prop) => {
|
|
53
|
-
if (prop.type === 7 && dirs.includes(prop.name)) reserved.push(prop);
|
|
53
|
+
if (prop.type === 7 && (dirs.includes(prop.name) || prop.name === "bind" && prop.arg && prop.arg.type === 4 && prop.arg.content === "key" && dirs.includes("key"))) reserved.push(prop);
|
|
54
54
|
else pass.push(prop);
|
|
55
55
|
});
|
|
56
56
|
return (0, _vue_shared.extend)({}, node, {
|
|
@@ -108,13 +108,6 @@ function getLiteralExpressionValue(exp, excludeNumber) {
|
|
|
108
108
|
}
|
|
109
109
|
return exp.isStatic ? exp.content : null;
|
|
110
110
|
}
|
|
111
|
-
function isInTransition(context) {
|
|
112
|
-
const parentNode = context.parent && context.parent.node;
|
|
113
|
-
return !!(parentNode && isTransitionNode(parentNode));
|
|
114
|
-
}
|
|
115
|
-
function isTransitionNode(node) {
|
|
116
|
-
return node.type === 1 && isTransitionTag(node.tag);
|
|
117
|
-
}
|
|
118
111
|
function isTransitionTag(tag) {
|
|
119
112
|
tag = tag.toLowerCase();
|
|
120
113
|
return tag === "transition" || tag === "vaportransition";
|
|
@@ -571,8 +564,10 @@ const IRNodeTypes = {
|
|
|
571
564
|
"14": "IF",
|
|
572
565
|
"FOR": 15,
|
|
573
566
|
"15": "FOR",
|
|
574
|
-
"
|
|
575
|
-
"16": "
|
|
567
|
+
"KEY": 16,
|
|
568
|
+
"16": "KEY",
|
|
569
|
+
"GET_TEXT_CHILD": 17,
|
|
570
|
+
"17": "GET_TEXT_CHILD"
|
|
576
571
|
};
|
|
577
572
|
const DynamicFlag = {
|
|
578
573
|
"NONE": 0,
|
|
@@ -586,7 +581,7 @@ const DynamicFlag = {
|
|
|
586
581
|
};
|
|
587
582
|
function isBlockOperation(op) {
|
|
588
583
|
const type = op.type;
|
|
589
|
-
return type === 11 || type === 12 || type === 14 || type === 15;
|
|
584
|
+
return type === 11 || type === 12 || type === 14 || type === 16 || type === 15;
|
|
590
585
|
}
|
|
591
586
|
|
|
592
587
|
//#endregion
|
|
@@ -1406,18 +1401,19 @@ function genPropValue(values, context) {
|
|
|
1406
1401
|
}
|
|
1407
1402
|
function getRuntimeHelper(tag, key, modifier) {
|
|
1408
1403
|
const tagName = tag.toUpperCase();
|
|
1409
|
-
|
|
1410
|
-
if (modifier) if (modifier === ".") return getSpecialHelper(key, tagName) || helpers.setDOMProp;
|
|
1411
|
-
else return helpers.setAttr;
|
|
1412
|
-
const helper = getSpecialHelper(key, tagName);
|
|
1404
|
+
const isSVG = (0, _vue_shared.isSVGTag)(tag);
|
|
1405
|
+
if (modifier) if (modifier === ".") return getSpecialHelper(key, tagName, isSVG) || helpers.setDOMProp;
|
|
1406
|
+
else return isSVG ? (0, _vue_shared.extend)({ isSVG: true }, helpers.setAttr) : helpers.setAttr;
|
|
1407
|
+
const helper = getSpecialHelper(key, tagName, isSVG);
|
|
1413
1408
|
if (helper) return helper;
|
|
1414
1409
|
if (/aria[A-Z]/.test(key)) return helpers.setDOMProp;
|
|
1410
|
+
if (isSVG) return (0, _vue_shared.extend)({ isSVG: true }, helpers.setAttr);
|
|
1415
1411
|
if ((0, _vue_shared.shouldSetAsAttr)(tagName, key) || key.includes("-")) return helpers.setAttr;
|
|
1416
1412
|
return helpers.setProp;
|
|
1417
1413
|
}
|
|
1418
|
-
function getSpecialHelper(keyName, tagName) {
|
|
1414
|
+
function getSpecialHelper(keyName, tagName, isSVG) {
|
|
1419
1415
|
if (keyName === "value" && (0, _vue_shared.canSetValueDirectly)(tagName)) return helpers.setValue;
|
|
1420
|
-
else if (keyName === "class") return helpers.setClass;
|
|
1416
|
+
else if (keyName === "class") return (0, _vue_shared.extend)({ isSVG }, helpers.setClass);
|
|
1421
1417
|
else if (keyName === "style") return helpers.setStyle;
|
|
1422
1418
|
else if (keyName === "innerHTML") return helpers.setHtml;
|
|
1423
1419
|
else if (keyName === "textContent") return helpers.setText;
|
|
@@ -1831,7 +1827,7 @@ function genSlotBlockWithProps(oper, context) {
|
|
|
1831
1827
|
let propsName;
|
|
1832
1828
|
let exitScope;
|
|
1833
1829
|
let depth;
|
|
1834
|
-
const { props,
|
|
1830
|
+
const { props, node } = oper;
|
|
1835
1831
|
const idToPathMap = props ? parseValueDestructure(props, context) : /* @__PURE__ */ new Map();
|
|
1836
1832
|
if (props) if (props.ast) {
|
|
1837
1833
|
[depth, exitScope] = context.enterScope();
|
|
@@ -1841,16 +1837,6 @@ function genSlotBlockWithProps(oper, context) {
|
|
|
1841
1837
|
if (propsName) idMap[propsName] = null;
|
|
1842
1838
|
let blockFn = context.withId(() => genBlock(oper, context, propsName ? [propsName] : []), idMap);
|
|
1843
1839
|
exitScope && exitScope();
|
|
1844
|
-
if (key) blockFn = [
|
|
1845
|
-
`() => {`,
|
|
1846
|
-
INDENT_START,
|
|
1847
|
-
NEWLINE,
|
|
1848
|
-
`return `,
|
|
1849
|
-
...genCall(context.helper("createKeyedFragment"), [`() => `, ...genExpression(key, context)], blockFn),
|
|
1850
|
-
INDENT_END,
|
|
1851
|
-
NEWLINE,
|
|
1852
|
-
`}`
|
|
1853
|
-
];
|
|
1854
1840
|
if (node.type === 1) {
|
|
1855
1841
|
if (needsVaporCtx(oper)) blockFn = [
|
|
1856
1842
|
`${context.helper("withVaporCtx")}(`,
|
|
@@ -1924,6 +1910,20 @@ function genSlotOutlet(oper, context) {
|
|
|
1924
1910
|
return frag;
|
|
1925
1911
|
}
|
|
1926
1912
|
|
|
1913
|
+
//#endregion
|
|
1914
|
+
//#region packages/compiler-vapor/src/generators/key.ts
|
|
1915
|
+
function genKey(oper, context) {
|
|
1916
|
+
const { id, value, block } = oper;
|
|
1917
|
+
const [frag, push] = buildCodeFragment();
|
|
1918
|
+
const blockFn = genBlock(block, context);
|
|
1919
|
+
push(NEWLINE, `const n${id} = `, ...genCall(context.helper("createKeyedFragment"), [
|
|
1920
|
+
`() => (`,
|
|
1921
|
+
...genExpression(value, context),
|
|
1922
|
+
")"
|
|
1923
|
+
], blockFn));
|
|
1924
|
+
return frag;
|
|
1925
|
+
}
|
|
1926
|
+
|
|
1927
1927
|
//#endregion
|
|
1928
1928
|
//#region packages/compiler-vapor/src/generators/operation.ts
|
|
1929
1929
|
function genOperations(opers, context) {
|
|
@@ -1950,10 +1950,11 @@ function genOperation(oper, context) {
|
|
|
1950
1950
|
case 10: return genPrependNode(oper, context);
|
|
1951
1951
|
case 14: return genIf(oper, context);
|
|
1952
1952
|
case 15: return genFor(oper, context);
|
|
1953
|
+
case 16: return genKey(oper, context);
|
|
1953
1954
|
case 11: return genCreateComponent(oper, context);
|
|
1954
1955
|
case 12: return genSlotOutlet(oper, context);
|
|
1955
1956
|
case 13: return genBuiltinDirective(oper, context);
|
|
1956
|
-
case
|
|
1957
|
+
case 17: return genGetTextChild(oper, context);
|
|
1957
1958
|
default:
|
|
1958
1959
|
const exhaustiveCheck = oper;
|
|
1959
1960
|
throw new Error(`Unhandled operation type in genOperation: ${exhaustiveCheck}`);
|
|
@@ -2030,6 +2031,10 @@ function genChildren(dynamic, context, pushBlock, from = `n${dynamic.id}`) {
|
|
|
2030
2031
|
let prev;
|
|
2031
2032
|
for (const [index, child] of children.entries()) {
|
|
2032
2033
|
if (child.flags & 2) offset--;
|
|
2034
|
+
if (child.flags & 4 && child.template != null) {
|
|
2035
|
+
push(...genSelf(child, context));
|
|
2036
|
+
continue;
|
|
2037
|
+
}
|
|
2033
2038
|
const id = child.flags & 1 ? child.flags & 4 ? child.anchor : child.id : void 0;
|
|
2034
2039
|
if (id === void 0 && !child.hasDynamicChild) {
|
|
2035
2040
|
push(...genSelf(child, context));
|
|
@@ -2652,7 +2657,7 @@ const transformVText = (dir, node, context) => {
|
|
|
2652
2657
|
context.childrenTemplate = [" "];
|
|
2653
2658
|
const isComponent = node.tagType === 1;
|
|
2654
2659
|
if (!isComponent) context.registerOperation({
|
|
2655
|
-
type:
|
|
2660
|
+
type: 17,
|
|
2656
2661
|
parent: context.reference()
|
|
2657
2662
|
});
|
|
2658
2663
|
context.registerEffect([exp], {
|
|
@@ -2845,9 +2850,16 @@ function processInterpolation(context) {
|
|
|
2845
2850
|
if (prev && prev.type === 2) nodes.unshift(prev);
|
|
2846
2851
|
const values = processTextLikeChildren(nodes, context);
|
|
2847
2852
|
if (values.length === 0 && parentNode.type !== 0) return;
|
|
2853
|
+
const literalValues = values.map((v) => getLiteralExpressionValue(v));
|
|
2854
|
+
if (literalValues.every((v) => v != null) && parentNode.type !== 0) {
|
|
2855
|
+
const text = literalValues.join("");
|
|
2856
|
+
const isElementChild = parentNode.type === 1 && parentNode.tagType === 0;
|
|
2857
|
+
context.template += isElementChild ? (0, _vue_shared.escapeHtml)(text) : text;
|
|
2858
|
+
return;
|
|
2859
|
+
}
|
|
2848
2860
|
context.template += " ";
|
|
2849
2861
|
const id = context.reference();
|
|
2850
|
-
if (values.length === 0
|
|
2862
|
+
if (values.length === 0) return;
|
|
2851
2863
|
context.registerEffect(values, {
|
|
2852
2864
|
type: 4,
|
|
2853
2865
|
element: id,
|
|
@@ -2861,7 +2873,7 @@ function processTextContainer(children, context) {
|
|
|
2861
2873
|
else {
|
|
2862
2874
|
context.childrenTemplate = [" "];
|
|
2863
2875
|
context.registerOperation({
|
|
2864
|
-
type:
|
|
2876
|
+
type: 17,
|
|
2865
2877
|
parent: context.reference()
|
|
2866
2878
|
});
|
|
2867
2879
|
context.registerEffect(values, {
|
|
@@ -3002,7 +3014,7 @@ function processIf(node, dir, context) {
|
|
|
3002
3014
|
id,
|
|
3003
3015
|
condition: dir.exp,
|
|
3004
3016
|
positive: branch,
|
|
3005
|
-
index:
|
|
3017
|
+
index: context.root.nextIfIndex(),
|
|
3006
3018
|
once: context.inVOnce || isStaticExpression(dir.exp, context.options.bindingMetadata)
|
|
3007
3019
|
};
|
|
3008
3020
|
};
|
|
@@ -3035,7 +3047,7 @@ function processIf(node, dir, context) {
|
|
|
3035
3047
|
id: -1,
|
|
3036
3048
|
condition: dir.exp,
|
|
3037
3049
|
positive: branch,
|
|
3038
|
-
index:
|
|
3050
|
+
index: context.root.nextIfIndex(),
|
|
3039
3051
|
once: context.inVOnce || isStaticExpression(dir.exp, context.options.bindingMetadata)
|
|
3040
3052
|
};
|
|
3041
3053
|
return () => onExit();
|
|
@@ -3070,7 +3082,7 @@ function processFor(node, dir, context) {
|
|
|
3070
3082
|
const keyProp = findProp$1(node, "key");
|
|
3071
3083
|
const keyProperty = keyProp && propToExpression(keyProp);
|
|
3072
3084
|
const isComponent = node.tagType === 1 || isTemplateWithSingleComponent(node);
|
|
3073
|
-
context.node = node = wrapTemplate(node, ["for"]);
|
|
3085
|
+
context.node = node = wrapTemplate(node, ["for", "key"]);
|
|
3074
3086
|
context.dynamic.flags |= 6;
|
|
3075
3087
|
const id = context.reference();
|
|
3076
3088
|
const render = newBlock(node);
|
|
@@ -3184,13 +3196,6 @@ function transformComponentSlot(node, dir, context) {
|
|
|
3184
3196
|
markNonTemplate(n, context);
|
|
3185
3197
|
});
|
|
3186
3198
|
const [block, onExit] = createSlotBlock(node, dir, context);
|
|
3187
|
-
if (isTransitionNode(node) && nonSlotTemplateChildren.length) {
|
|
3188
|
-
const nonCommentChild = nonSlotTemplateChildren.find((n) => !(0, _vue_compiler_dom.isCommentOrWhitespace)(n));
|
|
3189
|
-
if (nonCommentChild) {
|
|
3190
|
-
const keyProp = findProp$1(nonCommentChild, "key");
|
|
3191
|
-
if (keyProp) block.key = keyProp.exp;
|
|
3192
|
-
}
|
|
3193
|
-
}
|
|
3194
3199
|
const { slots } = context;
|
|
3195
3200
|
return () => {
|
|
3196
3201
|
onExit();
|
|
@@ -3309,6 +3314,31 @@ function hasMultipleChildren(node) {
|
|
|
3309
3314
|
return children.length > 1;
|
|
3310
3315
|
}
|
|
3311
3316
|
|
|
3317
|
+
//#endregion
|
|
3318
|
+
//#region packages/compiler-vapor/src/transforms/transformKey.ts
|
|
3319
|
+
const transformKey = (node, context) => {
|
|
3320
|
+
if (node.type !== 1 || context.inVOnce || findDir$2(node, "for")) return;
|
|
3321
|
+
const dir = findProp$1(node, "key", true, true);
|
|
3322
|
+
if (!dir || dir.type === 6) return;
|
|
3323
|
+
let value;
|
|
3324
|
+
value = dir.exp || normalizeBindShorthand(dir.arg, context);
|
|
3325
|
+
if (isStaticExpression(value, context.options.bindingMetadata)) return;
|
|
3326
|
+
let id = context.reference();
|
|
3327
|
+
context.dynamic.flags |= 6;
|
|
3328
|
+
context.node = node = wrapTemplate(node, ["key"]);
|
|
3329
|
+
const block = newBlock(node);
|
|
3330
|
+
const exitBlock = context.enterBlock(block);
|
|
3331
|
+
return () => {
|
|
3332
|
+
exitBlock();
|
|
3333
|
+
context.dynamic.operation = {
|
|
3334
|
+
type: 16,
|
|
3335
|
+
id,
|
|
3336
|
+
value,
|
|
3337
|
+
block
|
|
3338
|
+
};
|
|
3339
|
+
};
|
|
3340
|
+
};
|
|
3341
|
+
|
|
3312
3342
|
//#endregion
|
|
3313
3343
|
//#region packages/compiler-vapor/src/compile.ts
|
|
3314
3344
|
function compile(source, options = {}) {
|
|
@@ -3333,6 +3363,7 @@ function getBaseTransformPreset() {
|
|
|
3333
3363
|
transformVOnce,
|
|
3334
3364
|
transformVIf,
|
|
3335
3365
|
transformVFor,
|
|
3366
|
+
transformKey,
|
|
3336
3367
|
transformSlotOutlet,
|
|
3337
3368
|
transformTemplateRef,
|
|
3338
3369
|
transformElement,
|
|
@@ -3388,6 +3419,7 @@ exports.transform = transform;
|
|
|
3388
3419
|
exports.transformChildren = transformChildren;
|
|
3389
3420
|
exports.transformComment = transformComment;
|
|
3390
3421
|
exports.transformElement = transformElement;
|
|
3422
|
+
exports.transformKey = transformKey;
|
|
3391
3423
|
exports.transformSlotOutlet = transformSlotOutlet;
|
|
3392
3424
|
exports.transformTemplateRef = transformTemplateRef;
|
|
3393
3425
|
exports.transformText = transformText;
|
package/dist/compiler-vapor.d.ts
CHANGED
|
@@ -1573,7 +1573,7 @@ interface KeepAliveProps {
|
|
|
1573
1573
|
exclude?: MatchPattern;
|
|
1574
1574
|
max?: number | string;
|
|
1575
1575
|
}
|
|
1576
|
-
interface KeepAliveContext
|
|
1576
|
+
interface KeepAliveContext extends ComponentRenderContext {
|
|
1577
1577
|
renderer: RendererInternals;
|
|
1578
1578
|
activate: (vnode: VNode, container: RendererElement, anchor: RendererNode | null, namespace: ElementNamespace, optimized: boolean) => void;
|
|
1579
1579
|
deactivate: (vnode: VNode) => void;
|
|
@@ -3047,8 +3047,10 @@ declare function performAsyncHydrate(el: Element, instance: GenericComponentInst
|
|
|
3047
3047
|
declare function useModel<M extends PropertyKey, T extends Record<string, any>, K extends keyof T, G = T[K], S = T[K]>(props: T, name: K, options?: DefineModelOptions<T[K], G, S>): ModelRef<T[K], M, G, S>;
|
|
3048
3048
|
//#endregion
|
|
3049
3049
|
//#region packages/runtime-core/src/helpers/useTemplateRef.d.ts
|
|
3050
|
+
declare const knownTemplateRefs: WeakSet<ShallowRef>;
|
|
3050
3051
|
type TemplateRef<T = unknown> = Readonly<ShallowRef<T | null>>;
|
|
3051
3052
|
declare function useTemplateRef<T = unknown, Keys extends string = string>(key: Keys): Readonly<ShallowRef<T | null>>;
|
|
3053
|
+
declare function isTemplateRefKey(refs: Data, key: string): boolean;
|
|
3052
3054
|
//#endregion
|
|
3053
3055
|
//#region packages/runtime-core/src/helpers/useId.d.ts
|
|
3054
3056
|
declare function useId(): string;
|
|
@@ -3404,7 +3406,7 @@ declare function initFeatureFlags(): void;
|
|
|
3404
3406
|
* Function for handling a template ref
|
|
3405
3407
|
*/
|
|
3406
3408
|
declare function setRef(rawRef: VNodeNormalizedRef, oldRawRef: VNodeNormalizedRef | null, parentSuspense: SuspenseBoundary | null, vnode: VNode, isUnmount?: boolean): void;
|
|
3407
|
-
declare function createCanSetSetupRefChecker(setupState: Data): (key: string) => boolean;
|
|
3409
|
+
declare function createCanSetSetupRefChecker(setupState: Data, refs: Data): (key: string) => boolean;
|
|
3408
3410
|
//#endregion
|
|
3409
3411
|
//#region packages/runtime-core/src/internalObject.d.ts
|
|
3410
3412
|
declare const createInternalObject: () => any;
|
|
@@ -25177,7 +25179,7 @@ declare function patchStyle(el: Element, prev: Style, next: Style): void;
|
|
|
25177
25179
|
//#region packages/runtime-dom/src/modules/attrs.d.ts
|
|
25178
25180
|
declare const xlinkNS = "http://www.w3.org/1999/xlink";
|
|
25179
25181
|
declare namespace index_d_exports$1 {
|
|
25180
|
-
export { AllowedComponentProps, AnchorHTMLAttributes, App, AppConfig, AppContext, AppMountFn, AppUnmountFn, AreaHTMLAttributes, AriaAttributes, AsyncComponentInternalOptions, AsyncComponentLoader, AsyncComponentOptions, AudioHTMLAttributes, BaseHTMLAttributes, BaseTransition, BaseTransitionProps, BaseTransitionPropsValidators, BlockquoteHTMLAttributes, ButtonHTMLAttributes, CSSProperties, CanvasHTMLAttributes, ColHTMLAttributes, ColgroupHTMLAttributes, Comment$2 as Comment, CompatVue, Component, ComponentCustomElementInterface, ComponentCustomOptions, ComponentCustomProperties, ComponentCustomProps, ComponentInjectOptions, ComponentInstance, ComponentInternalInstance, ComponentInternalOptions, ComponentObjectPropsOptions, ComponentOptions, ComponentOptionsBase, ComponentOptionsMixin, ComponentOptionsWithArrayProps, ComponentOptionsWithObjectProps, ComponentOptionsWithoutProps, ComponentPropsOptions, ComponentProvideOptions, ComponentPublicInstance, ComponentTypeEmits, ComputedGetter, ComputedOptions, ComputedRef, ComputedSetter, ConcreteComponent, CreateAppFunction, CreateComponentPublicInstance, CreateComponentPublicInstanceWithMixins, CustomElementOptions, CustomRefFactory, DataHTMLAttributes, DebuggerEvent, DebuggerEventExtraInfo, DebuggerOptions, DeepReadonly, DefineComponent, DefineProps, DefineSetupFnComponent, DelHTMLAttributes, DeprecationTypes, DetailsHTMLAttributes, DialogHTMLAttributes, Directive$1 as Directive, DirectiveArguments$1 as DirectiveArguments, DirectiveBinding, DirectiveHook, DirectiveModifiers, EffectScheduler, EffectScope, ElementNamespace, ElementWithTransition, EmbedHTMLAttributes, EmitFn, EmitsOptions, EmitsToProps, ErrorCodes, ErrorTypeStrings, Events, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, FieldsetHTMLAttributes, FormHTMLAttributes, Fragment, FunctionDirective, FunctionPlugin, FunctionalComponent, GenericAppContext, GenericComponent, GenericComponentInstance, GlobalComponents, GlobalDirectives, HMRRuntime, HTMLAttributes, HtmlHTMLAttributes, HydrationRenderer, HydrationStrategy, HydrationStrategyFactory, IframeHTMLAttributes, ImgHTMLAttributes, InjectionKey, InputAutoCompleteAttribute, InputHTMLAttributes, InputTypeHTMLAttribute, InsHTMLAttributes, IntrinsicElementAttributes, KeepAlive, KeepAliveContext
|
|
25182
|
+
export { AllowedComponentProps, AnchorHTMLAttributes, App, AppConfig, AppContext, AppMountFn, AppUnmountFn, AreaHTMLAttributes, AriaAttributes, AsyncComponentInternalOptions, AsyncComponentLoader, AsyncComponentOptions, AudioHTMLAttributes, BaseHTMLAttributes, BaseTransition, BaseTransitionProps, BaseTransitionPropsValidators, BlockquoteHTMLAttributes, ButtonHTMLAttributes, CSSProperties, CanvasHTMLAttributes, ColHTMLAttributes, ColgroupHTMLAttributes, Comment$2 as Comment, CompatVue, Component, ComponentCustomElementInterface, ComponentCustomOptions, ComponentCustomProperties, ComponentCustomProps, ComponentInjectOptions, ComponentInstance, ComponentInternalInstance, ComponentInternalOptions, ComponentObjectPropsOptions, ComponentOptions, ComponentOptionsBase, ComponentOptionsMixin, ComponentOptionsWithArrayProps, ComponentOptionsWithObjectProps, ComponentOptionsWithoutProps, ComponentPropsOptions, ComponentProvideOptions, ComponentPublicInstance, ComponentTypeEmits, ComputedGetter, ComputedOptions, ComputedRef, ComputedSetter, ConcreteComponent, CreateAppFunction, CreateComponentPublicInstance, CreateComponentPublicInstanceWithMixins, CustomElementOptions, CustomRefFactory, DataHTMLAttributes, DebuggerEvent, DebuggerEventExtraInfo, DebuggerOptions, DeepReadonly, DefineComponent, DefineProps, DefineSetupFnComponent, DelHTMLAttributes, DeprecationTypes, DetailsHTMLAttributes, DialogHTMLAttributes, Directive$1 as Directive, DirectiveArguments$1 as DirectiveArguments, DirectiveBinding, DirectiveHook, DirectiveModifiers, EffectScheduler, EffectScope, ElementNamespace, ElementWithTransition, EmbedHTMLAttributes, EmitFn, EmitsOptions, EmitsToProps, ErrorCodes, ErrorTypeStrings, Events, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, FieldsetHTMLAttributes, FormHTMLAttributes, Fragment, FunctionDirective, FunctionPlugin, FunctionalComponent, GenericAppContext, GenericComponent, GenericComponentInstance, GlobalComponents, GlobalDirectives, HMRRuntime, HTMLAttributes, HtmlHTMLAttributes, HydrationRenderer, HydrationStrategy, HydrationStrategyFactory, IframeHTMLAttributes, ImgHTMLAttributes, InjectionKey, InputAutoCompleteAttribute, InputHTMLAttributes, InputTypeHTMLAttribute, InsHTMLAttributes, IntrinsicElementAttributes, KeepAlive, KeepAliveContext, KeepAliveProps, KeygenHTMLAttributes, LabelHTMLAttributes, LegacyConfig, LiHTMLAttributes, LifecycleHook, LinkHTMLAttributes, MapHTMLAttributes, MaybeRef, MaybeRefOrGetter, MediaHTMLAttributes, MenuHTMLAttributes, MetaHTMLAttributes, MeterHTMLAttributes, MethodOptions, MismatchTypes, ModelRef, MoveType, MultiWatchSources, NULL_DYNAMIC_COMPONENT, NativeElements, NormalizedPropsOptions, ObjectDirective, ObjectEmitsOptions, ObjectHTMLAttributes, ObjectPlugin, OlHTMLAttributes, OptgroupHTMLAttributes, OptionHTMLAttributes, OptionMergeFunction, OutputHTMLAttributes, ParamHTMLAttributes, Plugin, ProgressHTMLAttributes, Prop, PropType, PublicProps, QuoteHTMLAttributes, Raw, Reactive, ReactiveEffect, ReactiveEffectOptions, ReactiveEffectRunner, ReactiveFlags$1 as ReactiveFlags, Ref, RenderFunction, Renderer, RendererElement, RendererInternals, RendererNode, RendererOptions, ReservedProps, RootHydrateFunction, RootRenderFunction, RuntimeCompilerOptions, SVGAttributes, SchedulerJob, ScriptHTMLAttributes, SelectHTMLAttributes, SetupContext, ShallowReactive, ShallowRef, ShallowUnwrapRef, ShortEmitsToObject, Slot, Slots, SlotsType, SourceHTMLAttributes, Static, StyleHTMLAttributes, StyleValue, Suspense, SuspenseBoundary, SuspenseProps, TableHTMLAttributes, TdHTMLAttributes, Teleport, TeleportProps, TeleportTargetElement, TemplateRef, Text$1 as Text, TextareaHTMLAttributes, ThHTMLAttributes, TimeHTMLAttributes, ToRef, ToRefs, TrackHTMLAttributes, TrackOpTypes, Transition, TransitionElement, TransitionGroup, TransitionGroupProps, TransitionHooks, TransitionHooksContext, TransitionProps, TransitionPropsValidators, TransitionState, TriggerOpTypes, TypeEmitsToOptions, UnwrapNestedRefs, UnwrapRef, VNode, VNodeArrayChildren, VNodeChild, VNodeNormalizedChildren, VNodeNormalizedRef, VNodeProps, VNodeRef, VNodeTypes, VShowElement, VaporInteropInterface, VideoHTMLAttributes, VueElement, VueElementBase, VueElementConstructor, WatchCallback, WatchEffect, WatchHandle, WatchOptions, WatchEffectOptions as WatchOptionsBase, WatchSource, WatchStopHandle, WebViewHTMLAttributes, WritableComputedOptions, WritableComputedRef, activate, assertNumber, baseApplyTranslation, baseEmit, baseNormalizePropsOptions, baseResolveTransitionHooks, baseUseCssVars, callPendingCbs, callWithAsyncErrorHandling, callWithErrorHandling, camelize, capitalize, checkTransitionMode, cloneVNode, compatUtils, computed, createApp, createAppAPI, createAsyncComponentContext, createBlock, createCanSetSetupRefChecker, createCommentVNode, createElementBlock, createBaseVNode as createElementVNode, createHydrationRenderer, createInternalObject, createPropsRestProxy, createRenderer, createSSRApp, createSlots, createStaticVNode, createTextVNode, createVNode, currentInstance, customRef, deactivate, defineAsyncComponent, defineComponent, defineCustomElement, defineEmits, defineExpose, defineModel, defineOptions, defineProps, defineSSRCustomElement, defineSlots, devtools, devtoolsComponentAdded, effect, effectScope, endMeasure, ensureHydrationRenderer, ensureRenderer, ensureVaporSlotFallback, expose, flushOnAppMount, forceReflow, getAttributeMismatch, getComponentName, getCurrentInstance, getCurrentScope, getCurrentWatcher, getFunctionalFallthrough, getInheritedScopeIds, getTransitionRawChildren, guardReactiveProps, h, handleError, handleMovedChildren, hasCSSTransform, hasInjectionContext, hydrate, hydrateOnIdle, hydrateOnInteraction, hydrateOnMediaQuery, hydrateOnVisible, initCustomFormatter, initDirectivesForSSR, initFeatureFlags, inject, isAsyncWrapper, isEmitListener, isHydrating, isKeepAlive, isMapEqual, isMemoSame, isMismatchAllowed, isProxy, isReactive, isReadonly, isRef, isRuntimeOnly, isSetEqual, isShallow, isTeleportDeferred, isTeleportDisabled, isTemplateNode, isTemplateRefKey, isVNode, isValidHtmlOrSvgAttribute, knownTemplateRefs, leaveCbKey, markAsyncBoundary, markRaw, matches, mergeDefaults, mergeModels, mergeProps, nextTick, nextUid, nodeOps, normalizeClass, normalizeContainer, normalizeProps, normalizeRef, normalizeStyle, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onRenderTracked, onRenderTriggered, onScopeDispose, onServerPrefetch, onUnmounted, onUpdated, onWatcherCleanup, openBlock, patchProp, patchStyle, performAsyncHydrate, performTransitionEnter, performTransitionLeave, popScopeId, popWarningContext, provide, proxyRefs, pushScopeId, pushWarningContext, queueJob, queuePostFlushCb, reactive, readonly, ref$1 as ref, registerHMR, registerRuntimeCompiler, render, renderList, renderSlot, resetShapeFlag, resolveComponent, resolveDirective, resolveDynamicComponent, resolveFilter, resolvePropValue, resolveTarget as resolveTeleportTarget, resolveTransitionHooks, resolveTransitionProps, setBlockTracking, setCurrentInstance, setDevtoolsHook, setIsHydratingEnabled, setRef, setTransitionHooks, setVarsOnNode, shallowReactive, shallowReadonly, shallowRef, shouldSetAsProp, simpleSetCurrentInstance, ssrContextKey, ssrUtils, startMeasure, stop, svgNS, toClassSet, toDisplayString, toHandlerKey, toHandlers, toRaw, toRef, toRefs, toStyleMap, toValue, transformVNodeArgs, triggerRef, unref, unregisterHMR, unsafeToTrustedHTML, useAsyncComponentState, useAttrs, useCssModule, useCssVars, useHost, useId, useInstanceOption, useModel, useSSRContext, useShadowRoot, useSlots, useTemplateRef, useTransitionState, vModelCheckbox, vModelCheckboxInit, vModelCheckboxUpdate, vModelDynamic, getValue as vModelGetValue, vModelRadio, vModelSelect, vModelSelectInit, vModelSetSelected, vModelText, vModelTextInit, vModelTextUpdate, vShow, vShowHidden, vShowOriginalDisplay, validateComponentName, validateProps, version, warn, warnExtraneousAttributes, warnPropMismatch, watch, watchEffect, watchPostEffect, watchSyncEffect, withAsyncContext, withCtx, withDefaults, withDirectives, withKeys, withMemo, withModifiers, withScopeId, xlinkNS };
|
|
25181
25183
|
}
|
|
25182
25184
|
/**
|
|
25183
25185
|
* This is a stub implementation to prevent the need to use dom types.
|
|
@@ -25227,14 +25229,80 @@ type RefEl = Element | VaporComponentInstance;
|
|
|
25227
25229
|
type setRefFn = (el: RefEl, ref: NodeRef, refFor?: boolean, refKey?: string) => NodeRef | undefined;
|
|
25228
25230
|
declare function createTemplateRefSetter(): setRefFn;
|
|
25229
25231
|
//#endregion
|
|
25232
|
+
//#region packages/runtime-vapor/src/componentSlots.d.ts
|
|
25233
|
+
type RawSlots = Record<string, VaporSlot> & {
|
|
25234
|
+
$?: DynamicSlotSource[];
|
|
25235
|
+
};
|
|
25236
|
+
type StaticSlots = Record<string, VaporSlot>;
|
|
25237
|
+
type VaporSlot = BlockFn;
|
|
25238
|
+
type DynamicSlot = {
|
|
25239
|
+
name: string;
|
|
25240
|
+
fn: VaporSlot;
|
|
25241
|
+
};
|
|
25242
|
+
type DynamicSlotFn = () => DynamicSlot | DynamicSlot[];
|
|
25243
|
+
type DynamicSlotSource = StaticSlots | DynamicSlotFn;
|
|
25244
|
+
/**
|
|
25245
|
+
* Wrap a slot function to track the slot owner.
|
|
25246
|
+
*
|
|
25247
|
+
* This ensures:
|
|
25248
|
+
* 1. createSlot gets rawSlots from the correct component (slot owner)
|
|
25249
|
+
* 2. Elements inherit the slot owner's scopeId
|
|
25250
|
+
*/
|
|
25251
|
+
declare function withVaporCtx(fn: Function): BlockFn;
|
|
25252
|
+
declare function createSlot(name: string | (() => string), rawProps?: LooseRawProps | null, fallback?: VaporSlot, noSlotted?: boolean, once?: boolean): Block$1;
|
|
25253
|
+
//#endregion
|
|
25254
|
+
//#region packages/runtime-vapor/src/apiDefineComponent.d.ts
|
|
25255
|
+
type VaporPublicProps = ReservedProps & AllowedComponentProps & ComponentCustomProps;
|
|
25256
|
+
type VaporRenderResult<T = Block$1> = VNode | T | VaporRenderResult<T>[];
|
|
25257
|
+
type VaporComponentInstanceConstructor<T extends VaporComponentInstance> = {
|
|
25258
|
+
__isFragment?: never;
|
|
25259
|
+
__isTeleport?: never;
|
|
25260
|
+
__isSuspense?: never;
|
|
25261
|
+
new (...args: any[]): T;
|
|
25262
|
+
};
|
|
25263
|
+
type DefineVaporComponent<RuntimePropsOptions = {}, RuntimePropsKeys extends string = string, InferredProps = (string extends RuntimePropsKeys ? ComponentObjectPropsOptions extends RuntimePropsOptions ? {} : ExtractPropTypes<RuntimePropsOptions> : { [key in RuntimePropsKeys]?: any }), Emits extends EmitsOptions = {}, RuntimeEmitsKeys extends string = string, Slots extends StaticSlots = StaticSlots, Exposed extends Record<string, any> = Record<string, any>, TypeBlock extends Block$1 = Block$1, TypeRefs extends Record<string, unknown> = {}, MakeDefaultsOptional extends boolean = true, PublicProps = VaporPublicProps, ResolvedProps = InferredProps & EmitsToProps<Emits>, Defaults = ExtractDefaultPropTypes<RuntimePropsOptions>> = VaporComponentInstanceConstructor<VaporComponentInstance<MakeDefaultsOptional extends true ? keyof Defaults extends never ? Prettify<ResolvedProps> & PublicProps : Partial<Defaults> & Omit<Prettify<ResolvedProps> & PublicProps, keyof Defaults> : Prettify<ResolvedProps> & PublicProps, Emits, Slots, Exposed, TypeBlock, TypeRefs>> & VaporComponentOptions<RuntimePropsOptions | RuntimePropsKeys[], Emits, RuntimeEmitsKeys, Slots, Exposed>;
|
|
25264
|
+
type DefineVaporSetupFnComponent<Props extends Record<string, any> = {}, Emits extends EmitsOptions = {}, Slots extends StaticSlots = StaticSlots, Exposed extends Record<string, any> = Record<string, any>, TypeBlock extends Block$1 = Block$1, ResolvedProps extends Record<string, any> = Props & EmitsToProps<Emits> & VaporPublicProps> = new () => VaporComponentInstance<ResolvedProps, Emits, Slots, Exposed, TypeBlock>;
|
|
25265
|
+
declare function defineVaporComponent<Props extends Record<string, any>, Emits extends EmitsOptions = {}, RuntimeEmitsKeys extends string = string, Slots extends StaticSlots = StaticSlots, Exposed extends Record<string, any> = Record<string, any>, TypeBlock extends Block$1 = Block$1>(setup: (props: Props, ctx: {
|
|
25266
|
+
emit: EmitFn<Emits>;
|
|
25267
|
+
slots: Slots;
|
|
25268
|
+
attrs: Record<string, any>;
|
|
25269
|
+
expose: (exposed: Exposed) => void;
|
|
25270
|
+
}) => VaporRenderResult<TypeBlock> | void, extraOptions?: VaporComponentOptions<(keyof Props)[], Emits, RuntimeEmitsKeys, Slots, Exposed> & ThisType<void>): DefineVaporSetupFnComponent<Props, Emits, Slots, Exposed, TypeBlock>;
|
|
25271
|
+
declare function defineVaporComponent<Props extends Record<string, any>, Emits extends EmitsOptions = {}, RuntimeEmitsKeys extends string = string, Slots extends StaticSlots = StaticSlots, Exposed extends Record<string, any> = Record<string, any>, TypeBlock extends Block$1 = Block$1>(setup: (props: Props, ctx: {
|
|
25272
|
+
emit: EmitFn<Emits>;
|
|
25273
|
+
slots: Slots;
|
|
25274
|
+
attrs: Record<string, any>;
|
|
25275
|
+
expose: (exposed: Exposed) => void;
|
|
25276
|
+
}) => VaporRenderResult<TypeBlock> | void, extraOptions?: VaporComponentOptions<ComponentObjectPropsOptions<Props>, Emits, RuntimeEmitsKeys, Slots, Exposed> & ThisType<void>): DefineVaporSetupFnComponent<Props, Emits, Slots, Exposed, TypeBlock>;
|
|
25277
|
+
declare function defineVaporComponent<TypeProps, RuntimePropsOptions extends ComponentObjectPropsOptions = ComponentObjectPropsOptions, RuntimePropsKeys extends string = string, TypeEmits extends ComponentTypeEmits = {}, RuntimeEmitsOptions extends EmitsOptions = {}, RuntimeEmitsKeys extends string = string, Slots extends StaticSlots = StaticSlots, Exposed extends Record<string, any> = Record<string, any>, ResolvedEmits extends EmitsOptions = ({} extends RuntimeEmitsOptions ? TypeEmitsToOptions<TypeEmits> : RuntimeEmitsOptions), InferredProps = (IsKeyValues<TypeProps> extends true ? TypeProps : string extends RuntimePropsKeys ? ComponentObjectPropsOptions extends RuntimePropsOptions ? {} : ExtractPropTypes<RuntimePropsOptions> : { [key in RuntimePropsKeys]?: any }), TypeRefs extends Record<string, unknown> = {}, TypeBlock extends Block$1 = Block$1>(options: VaporComponentOptions<RuntimePropsOptions | RuntimePropsKeys[], ResolvedEmits, RuntimeEmitsKeys, Slots, Exposed, TypeBlock, InferredProps> & {
|
|
25278
|
+
[key: string]: any;
|
|
25279
|
+
/**
|
|
25280
|
+
* @private for language-tools use only
|
|
25281
|
+
*/
|
|
25282
|
+
__typeProps?: TypeProps;
|
|
25283
|
+
/**
|
|
25284
|
+
* @private for language-tools use only
|
|
25285
|
+
*/
|
|
25286
|
+
__typeEmits?: TypeEmits;
|
|
25287
|
+
/**
|
|
25288
|
+
* @private for language-tools use only
|
|
25289
|
+
*/
|
|
25290
|
+
__typeRefs?: TypeRefs;
|
|
25291
|
+
/**
|
|
25292
|
+
* @private for language-tools use only
|
|
25293
|
+
*/
|
|
25294
|
+
__typeEl?: TypeBlock;
|
|
25295
|
+
} & ThisType<void>): DefineVaporComponent<RuntimePropsOptions, RuntimePropsKeys, InferredProps, ResolvedEmits, RuntimeEmitsKeys, Slots, Exposed extends Block$1 ? Record<string, any> : Exposed, TypeBlock, TypeRefs, unknown extends TypeProps ? true : false>;
|
|
25296
|
+
//#endregion
|
|
25230
25297
|
//#region packages/runtime-vapor/src/components/KeepAlive.d.ts
|
|
25231
|
-
interface
|
|
25298
|
+
interface VaporKeepAliveContext {
|
|
25232
25299
|
processShapeFlag(block: Block$1): boolean;
|
|
25233
25300
|
cacheBlock(): void;
|
|
25234
25301
|
cacheScope(key: any, scope: EffectScope): void;
|
|
25235
25302
|
getScope(key: any): EffectScope | undefined;
|
|
25303
|
+
setCurrentBranchKey(key: any): any;
|
|
25236
25304
|
}
|
|
25237
|
-
declare const
|
|
25305
|
+
declare const VaporKeepAlive: DefineVaporComponent<{}, string, KeepAliveProps>;
|
|
25238
25306
|
//#endregion
|
|
25239
25307
|
//#region packages/runtime-vapor/src/fragment.d.ts
|
|
25240
25308
|
declare class VaporFragment<T extends Block$1 = Block$1> implements TransitionOptions {
|
|
@@ -25263,12 +25331,11 @@ declare class DynamicFragment extends VaporFragment {
|
|
|
25263
25331
|
render?: BlockFn;
|
|
25264
25332
|
key: any;
|
|
25265
25333
|
};
|
|
25266
|
-
fallback?: BlockFn;
|
|
25267
25334
|
anchorLabel?: string;
|
|
25268
25335
|
keyed?: boolean;
|
|
25269
25336
|
attrs?: Record<string, any>;
|
|
25270
25337
|
setAsyncRef?: (instance: VaporComponentInstance) => void;
|
|
25271
|
-
keepAliveCtx:
|
|
25338
|
+
keepAliveCtx: VaporKeepAliveContext | null;
|
|
25272
25339
|
slotOwner: VaporComponentInstance | null;
|
|
25273
25340
|
constructor(anchorLabel?: string, keyed?: boolean);
|
|
25274
25341
|
update(render?: BlockFn, key?: any): void;
|
|
@@ -25320,35 +25387,7 @@ declare class RenderEffect extends ReactiveEffect {
|
|
|
25320
25387
|
}
|
|
25321
25388
|
declare function renderEffect(fn: () => void, noLifecycle?: boolean): void;
|
|
25322
25389
|
//#endregion
|
|
25323
|
-
//#region packages/runtime-vapor/src/componentSlots.d.ts
|
|
25324
|
-
type RawSlots = Record<string, VaporSlot> & {
|
|
25325
|
-
$?: DynamicSlotSource[];
|
|
25326
|
-
};
|
|
25327
|
-
type StaticSlots = Record<string, VaporSlot>;
|
|
25328
|
-
type VaporSlot = BlockFn;
|
|
25329
|
-
type DynamicSlot = {
|
|
25330
|
-
name: string;
|
|
25331
|
-
fn: VaporSlot;
|
|
25332
|
-
};
|
|
25333
|
-
type DynamicSlotFn = () => DynamicSlot | DynamicSlot[];
|
|
25334
|
-
type DynamicSlotSource = StaticSlots | DynamicSlotFn;
|
|
25335
|
-
/**
|
|
25336
|
-
* Wrap a slot function to track the slot owner.
|
|
25337
|
-
*
|
|
25338
|
-
* This ensures:
|
|
25339
|
-
* 1. createSlot gets rawSlots from the correct component (slot owner)
|
|
25340
|
-
* 2. Elements inherit the slot owner's scopeId
|
|
25341
|
-
*/
|
|
25342
|
-
declare function withVaporCtx(fn: Function): BlockFn;
|
|
25343
|
-
declare function createSlot(name: string | (() => string), rawProps?: LooseRawProps | null, fallback?: VaporSlot, noSlotted?: boolean, once?: boolean): Block$1;
|
|
25344
|
-
//#endregion
|
|
25345
25390
|
//#region packages/runtime-vapor/src/components/Teleport.d.ts
|
|
25346
|
-
declare const VaporTeleportImpl: {
|
|
25347
|
-
name: string;
|
|
25348
|
-
__isTeleport: boolean;
|
|
25349
|
-
__vapor: boolean;
|
|
25350
|
-
process(props: LooseRawProps, slots: LooseRawSlots): TeleportFragment;
|
|
25351
|
-
};
|
|
25352
25391
|
declare class TeleportFragment extends VaporFragment {
|
|
25353
25392
|
/**
|
|
25354
25393
|
* @internal marker for duck typing to avoid direct instanceof check
|
|
@@ -25360,6 +25399,7 @@ declare class TeleportFragment extends VaporFragment {
|
|
|
25360
25399
|
private resolvedProps?;
|
|
25361
25400
|
private rawSlots?;
|
|
25362
25401
|
isDisabled?: boolean;
|
|
25402
|
+
private isMounted;
|
|
25363
25403
|
target?: ParentNode | null;
|
|
25364
25404
|
targetAnchor?: Node | null;
|
|
25365
25405
|
targetStart?: Node | null;
|
|
@@ -25380,60 +25420,19 @@ declare class TeleportFragment extends VaporFragment {
|
|
|
25380
25420
|
private mountChildren;
|
|
25381
25421
|
hydrate: () => void;
|
|
25382
25422
|
}
|
|
25383
|
-
|
|
25384
|
-
//#region packages/runtime-vapor/src/apiDefineComponent.d.ts
|
|
25385
|
-
type VaporPublicProps = ReservedProps & AllowedComponentProps & ComponentCustomProps;
|
|
25386
|
-
type VaporRenderResult<T = Block$1> = VNode | T | VaporRenderResult<T>[];
|
|
25387
|
-
type VaporComponentInstanceConstructor<T extends VaporComponentInstance> = {
|
|
25388
|
-
__isFragment?: never;
|
|
25389
|
-
__isTeleport?: never;
|
|
25390
|
-
__isSuspense?: never;
|
|
25391
|
-
new (...args: any[]): T;
|
|
25392
|
-
};
|
|
25393
|
-
type DefineVaporComponent<RuntimePropsOptions = {}, RuntimePropsKeys extends string = string, Emits extends EmitsOptions = {}, RuntimeEmitsKeys extends string = string, Slots extends StaticSlots = StaticSlots, Exposed extends Record<string, any> = Record<string, any>, TypeBlock extends Block$1 = Block$1, TypeRefs extends Record<string, unknown> = {}, MakeDefaultsOptional extends boolean = true, InferredProps = (string extends RuntimePropsKeys ? ComponentObjectPropsOptions extends RuntimePropsOptions ? {} : ExtractPropTypes<RuntimePropsOptions> : { [key in RuntimePropsKeys]?: any }), PublicProps = VaporPublicProps, ResolvedProps = InferredProps & EmitsToProps<Emits>, Defaults = ExtractDefaultPropTypes<RuntimePropsOptions>> = VaporComponentInstanceConstructor<VaporComponentInstance<MakeDefaultsOptional extends true ? keyof Defaults extends never ? Prettify<ResolvedProps> & PublicProps : Partial<Defaults> & Omit<Prettify<ResolvedProps> & PublicProps, keyof Defaults> : Prettify<ResolvedProps> & PublicProps, Emits, Slots, Exposed, TypeBlock, TypeRefs>> & ObjectVaporComponent<RuntimePropsOptions | RuntimePropsKeys[], Emits, RuntimeEmitsKeys, Slots, Exposed>;
|
|
25394
|
-
type DefineVaporSetupFnComponent<Props extends Record<string, any> = {}, Emits extends EmitsOptions = {}, Slots extends StaticSlots = StaticSlots, Exposed extends Record<string, any> = Record<string, any>, TypeBlock extends Block$1 = Block$1, ResolvedProps extends Record<string, any> = Props & EmitsToProps<Emits> & VaporPublicProps> = new (props?: ResolvedProps) => VaporComponentInstance<ResolvedProps, Emits, Slots, Exposed, TypeBlock>;
|
|
25395
|
-
declare function defineVaporComponent<Props extends Record<string, any>, Emits extends EmitsOptions = {}, RuntimeEmitsKeys extends string = string, Slots extends StaticSlots = StaticSlots, Exposed extends Record<string, any> = Record<string, any>, TypeBlock extends Block$1 = Block$1>(setup: (props: Props, ctx: {
|
|
25396
|
-
emit: EmitFn<Emits>;
|
|
25397
|
-
slots: Slots;
|
|
25398
|
-
attrs: Record<string, any>;
|
|
25399
|
-
expose: (exposed: Exposed) => void;
|
|
25400
|
-
}) => VaporRenderResult<TypeBlock> | void, extraOptions?: ObjectVaporComponent<(keyof Props)[], Emits, RuntimeEmitsKeys, Slots, Exposed> & ThisType<void>): DefineVaporSetupFnComponent<Props, Emits, Slots, Exposed, TypeBlock>;
|
|
25401
|
-
declare function defineVaporComponent<Props extends Record<string, any>, Emits extends EmitsOptions = {}, RuntimeEmitsKeys extends string = string, Slots extends StaticSlots = StaticSlots, Exposed extends Record<string, any> = Record<string, any>, TypeBlock extends Block$1 = Block$1>(setup: (props: Props, ctx: {
|
|
25402
|
-
emit: EmitFn<Emits>;
|
|
25403
|
-
slots: Slots;
|
|
25404
|
-
attrs: Record<string, any>;
|
|
25405
|
-
expose: (exposed: Exposed) => void;
|
|
25406
|
-
}) => VaporRenderResult<TypeBlock> | void, extraOptions?: ObjectVaporComponent<ComponentObjectPropsOptions<Props>, Emits, RuntimeEmitsKeys, Slots, Exposed> & ThisType<void>): DefineVaporSetupFnComponent<Props, Emits, Slots, Exposed, TypeBlock>;
|
|
25407
|
-
declare function defineVaporComponent<TypeProps, RuntimePropsOptions extends ComponentObjectPropsOptions = ComponentObjectPropsOptions, RuntimePropsKeys extends string = string, TypeEmits extends ComponentTypeEmits = {}, RuntimeEmitsOptions extends EmitsOptions = {}, RuntimeEmitsKeys extends string = string, Slots extends StaticSlots = StaticSlots, Exposed extends Record<string, any> = Record<string, any>, ResolvedEmits extends EmitsOptions = ({} extends RuntimeEmitsOptions ? TypeEmitsToOptions<TypeEmits> : RuntimeEmitsOptions), InferredProps = (IsKeyValues<TypeProps> extends true ? TypeProps : string extends RuntimePropsKeys ? ComponentObjectPropsOptions extends RuntimePropsOptions ? {} : ExtractPropTypes<RuntimePropsOptions> : { [key in RuntimePropsKeys]?: any }), TypeRefs extends Record<string, unknown> = {}, TypeBlock extends Block$1 = Block$1>(options: ObjectVaporComponent<RuntimePropsOptions | RuntimePropsKeys[], ResolvedEmits, RuntimeEmitsKeys, Slots, Exposed, TypeBlock, InferredProps> & {
|
|
25408
|
-
/**
|
|
25409
|
-
* @private for language-tools use only
|
|
25410
|
-
*/
|
|
25411
|
-
__typeProps?: TypeProps;
|
|
25412
|
-
/**
|
|
25413
|
-
* @private for language-tools use only
|
|
25414
|
-
*/
|
|
25415
|
-
__typeEmits?: TypeEmits;
|
|
25416
|
-
/**
|
|
25417
|
-
* @private for language-tools use only
|
|
25418
|
-
*/
|
|
25419
|
-
__typeRefs?: TypeRefs;
|
|
25420
|
-
/**
|
|
25421
|
-
* @private for language-tools use only
|
|
25422
|
-
*/
|
|
25423
|
-
__typeEl?: TypeBlock;
|
|
25424
|
-
} & ThisType<void>): DefineVaporComponent<RuntimePropsOptions, RuntimePropsKeys, ResolvedEmits, RuntimeEmitsKeys, Slots, Exposed extends Block$1 ? Record<string, any> : Exposed, TypeBlock, TypeRefs, unknown extends TypeProps ? true : false, InferredProps>;
|
|
25423
|
+
declare const VaporTeleport: DefineVaporSetupFnComponent<TeleportProps>;
|
|
25425
25424
|
//#endregion
|
|
25426
25425
|
//#region packages/runtime-vapor/src/component.d.ts
|
|
25427
|
-
type VaporComponent = FunctionalVaporComponent |
|
|
25426
|
+
type VaporComponent = FunctionalVaporComponent | VaporComponentOptions | DefineVaporComponent;
|
|
25428
25427
|
type FunctionalVaporComponent<Props = {}, Emits extends EmitsOptions = {}, Slots extends StaticSlots = StaticSlots, Exposed extends Record<string, any> = Record<string, any>> = ((props: Readonly<Props & EmitsToProps<Emits>>, ctx: {
|
|
25429
25428
|
emit: EmitFn<Emits>;
|
|
25430
25429
|
slots: Slots;
|
|
25431
25430
|
attrs: Record<string, any>;
|
|
25432
25431
|
expose: <T extends Record<string, any> = Exposed>(exposed: T) => void;
|
|
25433
|
-
}) => VaporRenderResult) & Omit<
|
|
25432
|
+
}) => VaporRenderResult) & Omit<VaporComponentOptions<ComponentPropsOptions<Props>, Emits, string, Slots>, "setup"> & {
|
|
25434
25433
|
displayName?: string;
|
|
25435
25434
|
} & SharedInternalOptions;
|
|
25436
|
-
interface
|
|
25435
|
+
interface VaporComponentOptions<Props = {}, Emits extends EmitsOptions = {}, RuntimeEmitsKeys extends string = string, Slots extends StaticSlots = StaticSlots, Exposed extends Record<string, any> = Record<string, any>, TypeBlock extends Block$1 = Block$1, InferredProps = (ComponentObjectPropsOptions extends Props ? {} : ExtractPropTypes<Props>)> extends ComponentInternalOptions, AsyncComponentInternalOptions<VaporComponentOptions, VaporComponentInstance>, SharedInternalOptions {
|
|
25437
25436
|
inheritAttrs?: boolean;
|
|
25438
25437
|
props?: Props;
|
|
25439
25438
|
emits?: Emits | RuntimeEmitsKeys[];
|
|
@@ -25509,6 +25508,7 @@ declare class VaporComponentInstance<Props extends Record<string, any> = {}, Emi
|
|
|
25509
25508
|
renderEffects?: RenderEffect[];
|
|
25510
25509
|
hasFallthrough: boolean;
|
|
25511
25510
|
shapeFlag?: number;
|
|
25511
|
+
key?: any;
|
|
25512
25512
|
oncePropsCache?: Record<string | symbol, any>;
|
|
25513
25513
|
isMounted: boolean;
|
|
25514
25514
|
isUnmounted: boolean;
|
|
@@ -25542,6 +25542,10 @@ declare class VaporComponentInstance<Props extends Record<string, any> = {}, Emi
|
|
|
25542
25542
|
* fallthrough can be suppressed.
|
|
25543
25543
|
*/
|
|
25544
25544
|
accessedAttrs: boolean;
|
|
25545
|
+
/**
|
|
25546
|
+
* @deprecated only used for JSX to detect props types.
|
|
25547
|
+
*/
|
|
25548
|
+
$props: Props;
|
|
25545
25549
|
constructor(comp: VaporComponent, rawProps?: RawProps | null, rawSlots?: RawSlots | null, appContext?: GenericAppContext, once?: boolean);
|
|
25546
25550
|
/**
|
|
25547
25551
|
* Expose `getKeysFromRawProps` on the instance so it can be used in code
|
|
@@ -25579,7 +25583,7 @@ declare function defineVaporCustomElement<Props, RawBindings = object>(setup: (p
|
|
|
25579
25583
|
slots: StaticSlots;
|
|
25580
25584
|
emit: EmitFn;
|
|
25581
25585
|
expose: (exposed: Record<string, any>) => void;
|
|
25582
|
-
}) => RawBindings | VaporRenderResult, options?: Pick<
|
|
25586
|
+
}) => RawBindings | VaporRenderResult, options?: Pick<VaporComponentOptions, "name" | "inheritAttrs" | "emits"> & CustomElementOptions & {
|
|
25583
25587
|
props?: (keyof Props)[];
|
|
25584
25588
|
}): VaporElementConstructor<Props>;
|
|
25585
25589
|
declare function defineVaporCustomElement<Props, RawBindings = object>(setup: (props: Props, ctx: {
|
|
@@ -25587,7 +25591,7 @@ declare function defineVaporCustomElement<Props, RawBindings = object>(setup: (p
|
|
|
25587
25591
|
slots: StaticSlots;
|
|
25588
25592
|
emit: EmitFn;
|
|
25589
25593
|
expose: (exposed: Record<string, any>) => void;
|
|
25590
|
-
}) => RawBindings | VaporRenderResult, options?: Pick<
|
|
25594
|
+
}) => RawBindings | VaporRenderResult, options?: Pick<VaporComponentOptions, "name" | "inheritAttrs" | "emits"> & CustomElementOptions & {
|
|
25591
25595
|
props?: ComponentObjectPropsOptions<Props>;
|
|
25592
25596
|
}): VaporElementConstructor<Props>;
|
|
25593
25597
|
declare function defineVaporCustomElement<RuntimePropsOptions extends ComponentObjectPropsOptions = ComponentObjectPropsOptions, RuntimePropsKeys extends string = string, RuntimeEmitsOptions extends EmitsOptions = {}, RuntimeEmitsKeys extends string = string, Slots extends StaticSlots = StaticSlots, InferredProps = (string extends RuntimePropsKeys ? ComponentObjectPropsOptions extends RuntimePropsOptions ? {} : ExtractPropTypes<RuntimePropsOptions> : { [key in RuntimePropsKeys]?: any }), ResolvedProps = InferredProps & EmitsToProps<RuntimeEmitsOptions>>(options: CustomElementOptions & {
|
|
@@ -25731,31 +25735,31 @@ declare function getDefaultValue(val: any, defaultVal: any): any;
|
|
|
25731
25735
|
declare function useVaporCssVars(getter: () => Record<string, string>): void;
|
|
25732
25736
|
//#endregion
|
|
25733
25737
|
//#region packages/runtime-vapor/src/apiCreateDynamicComponent.d.ts
|
|
25734
|
-
declare function createDynamicComponent(getter: () => any, rawProps?: RawProps | null, rawSlots?: RawSlots |
|
|
25738
|
+
declare function createDynamicComponent(getter: () => any, rawProps?: RawProps | null, rawSlots?: RawSlots | null, isSingleRoot?: boolean, once?: boolean): VaporFexport ragment;
|
|
25735
25739
|
//#endregion
|
|
25736
|
-
//#region packages/runtime-
|
|
25737
|
-
declare function
|
|
25740
|
+
//#region packages/runtime-vapor/src/directives/vShow.d.ts
|
|
25741
|
+
declare function applyexport VShow(target: Block$1, source: () => any): void;
|
|
25738
25742
|
//#endregion
|
|
25739
|
-
//#
|
|
25740
|
-
type VaporModelDirective<T extends HTMLElement =
|
|
25741
|
-
declare const applyTextModel:
|
|
25742
|
-
|
|
25743
|
-
declare const applyRadioModel:
|
|
25744
|
-
declare
|
|
25745
|
-
declare const applyDynamicModel:
|
|
25743
|
+
//#regioexport n packages/runtime-vapor/src/diexport rectives/vModel.d.ts
|
|
25744
|
+
type VaporModelDirective<T extends HTMLElement = HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement, export Modifiers extends string = string> = (el: T, get: () => any, set: (v: any) => void, modifieexport rs?: { [key in Modifiers]?: true }) => void;
|
|
25745
|
+
declare const applyTextModel: VaporModexport elDirective<HTMLInputElement | HTMLTextAreaElement, "trim" | "number" | "lazy">;
|
|
25746
|
+
dexport eclare const applyCheckboxModel: VaporModelDirective<HTMLInputElement>;
|
|
25747
|
+
declare const applyRadioModel: Vaexport porModelDirective<HTMLInputElement>;
|
|
25748
|
+
declare const applySelectModel: VaporModelDirective<HTMLSelectexport Element, "number">;
|
|
25749
|
+
declare const applyDynamicModel: VaporModelDirective;
|
|
25746
25750
|
//#endregion
|
|
25747
|
-
//#region packages/runtime-
|
|
25748
|
-
declare const VaporTransition:
|
|
25751
|
+
//#region packages/runtime-vapoexport r/src/components/Transition.d.ts
|
|
25752
|
+
declare const VaporTransition: FunctionalVaporComponent<TransitionProps>;
|
|
25749
25753
|
//#endregion
|
|
25750
|
-
//#
|
|
25751
|
-
declare const VaporTransitionGroup:
|
|
25752
|
-
declare namespace
|
|
25753
|
-
export {
|
|
25754
|
+
//#regionexport packages/runtime-vapor/src/components/TransitionGroup.d.ts
|
|
25755
|
+
declare const VaporTransitionGroup: DefineVaporComponent<{}, string, TransitionGroupProps>;
|
|
25756
|
+
declare namespace index_d_exports {
|
|
25757
|
+
export { Bloexport ck$1 as Block, DefineVaporComponent, DynamicFragment, FunctionalVaporComponent, VaporComponent, Vaexport porComponentInstance, VaporComponentOptions, VaporDirective, VaporElement, VaporElementCexport onstructor, VaporFragment, VaporKeepAlive, VaporKeepAliveContext, VaporPublicProps, VaporRenderResult, VaporSlot, VaporTeleport, VaporTrexport ansition, VaporTransitionGroup, VaporTransitionHooks, applyCheckboxModel, applyDynamicModel, applyRadioModel, applySelectModel, applyTextModel, applyVShow, child, createComponent, createComponentWithFallback, createDynamicComponent, createFor, createForSlots, createIf, createInvoker, createKeyedFragment, createPlainElement, createSlot, createTemplateRefSetter, cexport reateTextNode, createVaporApp, createVaporSSRAexport pp, defineVaporAsyncComponent, defineVaporComponenexport t, defineVaporCustomElement, defineVaporSSRCustomexport Element, delegate, delegateEvents, getDefaultValue, getRestElement, insert$1 as insert, isFragment, isVaporComponent, next, nthChild, on, prepend, remove, renderEffect, setAttr, setBlockHtml, setBlockText, setClass, setDOMProp,export setDynamicEvents, setDynamicProps, setElementText, setHtml, setInsertionState, setProp, setStyle, setText, setValue, template, txt, useVaporCssVars, vaporInteropPlugin, withVaporCtx, withVaporDirectives };
|
|
25754
25758
|
}
|
|
25755
25759
|
//#endregion
|
|
25756
25760
|
//#region temp/packages/compiler-vapor/src/ir/component.d.ts
|
|
25757
|
-
interface IRProp extends Omit<
|
|
25758
|
-
values:
|
|
25761
|
+
interface IRProp extends Omit<DirectiveTransforexport mResult, "value"> {
|
|
25762
|
+
values: SimpleExpressionNode[];
|
|
25759
25763
|
}
|
|
25760
25764
|
declare enum IRDynamicPropsKind {
|
|
25761
25765
|
EXPRESSION = 0,
|
|
@@ -25767,11 +25771,11 @@ interface IRPropsDynamicExpression {
|
|
|
25767
25771
|
value: SimpleExpressionNode;
|
|
25768
25772
|
handler?: boolean;
|
|
25769
25773
|
}
|
|
25770
|
-
interface
|
|
25771
|
-
|
|
25774
|
+
interface IRPropsDynamicAttexport ribute extends IRProp {
|
|
25775
|
+
kind: IRDynamicPropsKind.ATTRIBUTE;
|
|
25772
25776
|
}
|
|
25773
|
-
type IRProps = IRPropsStatic | IRPropsDynamicAttribute | IRPropsDynamicExpression;
|
|
25774
|
-
interface SlotBlockIRNode
|
|
25777
|
+
type IRProps = IRPropsStatic | IRPropsDynamicAttribute | IRPropsDynamicExpression;export
|
|
25778
|
+
interface SlotBlockIRNode extends BlockIRNode {
|
|
25775
25779
|
props?: SimpleExpressionNode;
|
|
25776
25780
|
}
|
|
25777
25781
|
declare enum IRSlotType {
|
|
@@ -25785,80 +25789,80 @@ type IRSlotsStatic = {
|
|
|
25785
25789
|
slotType: IRSlotType.STATIC;
|
|
25786
25790
|
slots: Record<string, SlotBlockIRNode>;
|
|
25787
25791
|
};
|
|
25788
|
-
interface
|
|
25789
|
-
slotType:
|
|
25792
|
+
interface IRSlotDynamexport icBasic {
|
|
25793
|
+
slotType: IRSlotType.DYNAMIC;
|
|
25790
25794
|
name: SimpleExpressionNode;
|
|
25791
25795
|
fn: SlotBlockIRNode;
|
|
25792
25796
|
}
|
|
25793
25797
|
interface IRSlotDynamicLoop {
|
|
25794
25798
|
slotType: IRSlotType.LOOP;
|
|
25795
|
-
|
|
25799
|
+
name: SimpleExpressionNode;
|
|
25796
25800
|
fn: SlotBlockIRNode;
|
|
25797
25801
|
loop: IRFor;
|
|
25798
25802
|
}
|
|
25799
|
-
interface IRSlotDynamicConditional {
|
|
25803
|
+
interface export IRSlotDynamicConditional {
|
|
25800
25804
|
slotType: IRSlotType.CONDITIONAL;
|
|
25801
|
-
|
|
25802
|
-
positive:
|
|
25805
|
+
condition: SimpleExpressionNode;
|
|
25806
|
+
positive: IRSlotDynamicBasiexport c;
|
|
25803
25807
|
negative?: IRSlotDynamicBasic | IRSlotDynamicConditional;
|
|
25804
25808
|
}
|
|
25805
|
-
interface
|
|
25809
|
+
interface IRSlotsExpression {
|
|
25806
25810
|
slotType: IRSlotType.EXPRESSION;
|
|
25807
|
-
slots:
|
|
25811
|
+
slots: SimpleExpexport ressionNode;
|
|
25808
25812
|
}
|
|
25809
25813
|
type IRSlotDynamic = IRSlotDynamicBasic | IRSlotDynamicLoop | IRSlotDynamicConditional;
|
|
25810
|
-
type IRSlots =
|
|
25811
|
-
//#
|
|
25814
|
+
type IRSlots = IRSlotsStatic | IRSlotDynamiexport c | IRSlotsExpression;
|
|
25815
|
+
//#endregion
|
|
25812
25816
|
//#region temp/packages/compiler-vapor/src/ir/index.d.ts
|
|
25813
25817
|
declare enum IRNodeTypes {
|
|
25814
25818
|
ROOT = 0,
|
|
25815
25819
|
BLOCK = 1,
|
|
25816
25820
|
SET_PROP = 2,
|
|
25817
|
-
|
|
25821
|
+
SET_DYNAMIC_PROexport PS = 3,
|
|
25818
25822
|
SET_TEXT = 4,
|
|
25819
25823
|
SET_EVENT = 5,
|
|
25820
|
-
|
|
25824
|
+
SET_DYNAMIC_Eexport VENTS = 6,
|
|
25821
25825
|
SET_HTML = 7,
|
|
25822
25826
|
SET_TEMPLATE_REF = 8,
|
|
25823
25827
|
INSERT_NODE = 9,
|
|
25824
25828
|
PREPEND_NODE = 10,
|
|
25825
25829
|
CREATE_COMPONENT_NODE = 11,
|
|
25826
|
-
SLOT_OUTLET_NODE
|
|
25830
|
+
SLOT_OUTLET_NODE = 12,
|
|
25827
25831
|
DIRECTIVE = 13,
|
|
25828
25832
|
IF = 14,
|
|
25829
25833
|
FOR = 15,
|
|
25830
|
-
|
|
25834
|
+
KEY = 16,
|
|
25835
|
+
GET_TEXT_CHILD = 17
|
|
25831
25836
|
}
|
|
25832
25837
|
interface BaseIRNode {
|
|
25833
25838
|
type: IRNodeTypes;
|
|
25834
|
-
key?: SimpleExpressionNode | undefiexport ned;
|
|
25835
25839
|
}
|
|
25836
25840
|
type CoreHelper = keyof typeof index_d_exports$1;
|
|
25837
|
-
type VaporHelper = keyof
|
|
25841
|
+
type VaporHelper = keyof tyexport peof index_d_exports;
|
|
25838
25842
|
interface BlockIRNode extends BaseIRNode {
|
|
25839
25843
|
type: IRNodeTypes.BLOCK;
|
|
25840
|
-
|
|
25841
|
-
dynamic:
|
|
25844
|
+
node: RootNode | TemplateChildNode;
|
|
25845
|
+
dynamic: IRDynamicInexport fo;
|
|
25842
25846
|
tempId: number;
|
|
25843
25847
|
effect: IREffect[];
|
|
25844
25848
|
operation: OperationNode[];
|
|
25845
|
-
returns:
|
|
25849
|
+
returns: number[];
|
|
25846
25850
|
}
|
|
25847
25851
|
interface RootIRNode {
|
|
25848
25852
|
type: IRNodeTypes.ROOT;
|
|
25849
25853
|
node: RootNode;
|
|
25850
|
-
source:
|
|
25851
|
-
template: Map<string,
|
|
25854
|
+
source: stringexport ;
|
|
25855
|
+
template: Map<string, Namespace>;
|
|
25852
25856
|
templateIndexMap: Map<string, number>;
|
|
25853
25857
|
rootTemplateIndexes: Set<number>;
|
|
25854
25858
|
component: Set<string>;
|
|
25855
|
-
directive: Set<string>;
|
|
25859
|
+
export directive: Set<string>;
|
|
25856
25860
|
block: BlockIRNode;
|
|
25857
25861
|
hasTemplateRef: boolean;
|
|
25858
25862
|
hasDeferredVShow: boolean;
|
|
25859
25863
|
}
|
|
25860
|
-
interface IfIRNode
|
|
25861
|
-
type:
|
|
25864
|
+
interface IfIRNode eexport xtends BaseIRNode {
|
|
25865
|
+
type: IRNodeTypes.IF;
|
|
25862
25866
|
id: number;
|
|
25863
25867
|
condition: SimpleExpressionNode;
|
|
25864
25868
|
positive: BlockIRNode;
|
|
@@ -25868,14 +25872,14 @@ interface IfIRNode extends BaseIRNode {
|
|
|
25868
25872
|
parent?: number;
|
|
25869
25873
|
anchor?: number;
|
|
25870
25874
|
logicalIndex?: number;
|
|
25871
|
-
append?:
|
|
25875
|
+
append?: booleanexport ;
|
|
25872
25876
|
last?: boolean;
|
|
25873
25877
|
}
|
|
25874
25878
|
interface IRFor {
|
|
25875
25879
|
source: SimpleExpressionNode;
|
|
25876
25880
|
value?: SimpleExpressionNode;
|
|
25877
25881
|
key?: SimpleExpressionNode;
|
|
25878
|
-
index?:
|
|
25882
|
+
index?: SimpleExpressionNode;
|
|
25879
25883
|
}
|
|
25880
25884
|
interface ForIRNode extends BaseIRNode, IRFor {
|
|
25881
25885
|
type: IRNodeTypes.FOR;
|
|
@@ -25885,6 +25889,17 @@ interface ForIRNode extends BaseIRNode, IRFor {
|
|
|
25885
25889
|
once: boolean;
|
|
25886
25890
|
component: boolean;
|
|
25887
25891
|
onlyChild: boolean;
|
|
25892
|
+
parent?export : number;
|
|
25893
|
+
anchor?: number;
|
|
25894
|
+
logicalIndex?: number;
|
|
25895
|
+
append?: boolean;
|
|
25896
|
+
last?: boolean;
|
|
25897
|
+
}
|
|
25898
|
+
interface KeyIRNode extends BaseIRNode {
|
|
25899
|
+
type: IRNodeTypes.KEY;
|
|
25900
|
+
id: number;
|
|
25901
|
+
value: SimpleExpressionNode;
|
|
25902
|
+
block: BlockIRNode;
|
|
25888
25903
|
parent?: number;
|
|
25889
25904
|
anchor?: number;
|
|
25890
25905
|
logicalIndex?: number;
|
|
@@ -25908,7 +25923,7 @@ interface SetDynamicEventsIRNode extends BaseIRNode {
|
|
|
25908
25923
|
element: number;
|
|
25909
25924
|
event: SimpleExpressionNode;
|
|
25910
25925
|
}
|
|
25911
|
-
interface
|
|
25926
|
+
interface SetTextIRNode extendexport s BaseIRNode {
|
|
25912
25927
|
type: IRNodeTypes.SET_TEXT;
|
|
25913
25928
|
element: number;
|
|
25914
25929
|
values: SimpleExpressionNode[];
|
|
@@ -25919,7 +25934,7 @@ type KeyOverride = [find: string, replacement: string];
|
|
|
25919
25934
|
interface SetEventIRNode extends BaseIRNode {
|
|
25920
25935
|
type: IRNodeTypes.SET_EVENT;
|
|
25921
25936
|
element: number;
|
|
25922
|
-
key:
|
|
25937
|
+
key: SimpleExpressionNoexport de;
|
|
25923
25938
|
value?: SimpleExpressionNode;
|
|
25924
25939
|
modifiers: {
|
|
25925
25940
|
options: string[];
|
|
@@ -25929,7 +25944,7 @@ interface SetEventIRNode extends BaseIRNode {
|
|
|
25929
25944
|
keyOverride?: KeyOverride;
|
|
25930
25945
|
delegate: boolean;
|
|
25931
25946
|
/** Whether it's in effect */
|
|
25932
|
-
|
|
25947
|
+
effect: booexport lean;
|
|
25933
25948
|
}
|
|
25934
25949
|
interface SetHtmlIRNode extends BaseIRNode {
|
|
25935
25950
|
type: IRNodeTypes.SET_HTML;
|
|
@@ -25937,25 +25952,25 @@ interface SetHtmlIRNode extends BaseIRNode {
|
|
|
25937
25952
|
value: SimpleExpressionNode;
|
|
25938
25953
|
isComponent?: boolean;
|
|
25939
25954
|
}
|
|
25940
|
-
interface
|
|
25955
|
+
interface SetTemplateRefIRNodexport e extends BaseIRNode {
|
|
25941
25956
|
type: IRNodeTypes.SET_TEMPLATE_REF;
|
|
25942
25957
|
element: number;
|
|
25943
25958
|
value: SimpleExpressionNode;
|
|
25944
25959
|
refFor: boolean;
|
|
25945
|
-
effect:
|
|
25960
|
+
effect: boolean;
|
|
25946
25961
|
}
|
|
25947
|
-
|
|
25962
|
+
interfacexport e InsertNodeIRNode extends BaseIRNode {
|
|
25948
25963
|
type: IRNodeTypes.INSERT_NODE;
|
|
25949
25964
|
elements: number[];
|
|
25950
25965
|
parent: number;
|
|
25951
25966
|
anchor?: number;
|
|
25952
25967
|
}
|
|
25953
|
-
interface PrependNodeIRNode
|
|
25968
|
+
interface PrependNodeIRNode extends BaseIRNode export {
|
|
25954
25969
|
type: IRNodeTypes.PREPEND_NODE;
|
|
25955
25970
|
elements: number[];
|
|
25956
25971
|
parent: number;
|
|
25957
25972
|
}
|
|
25958
|
-
|
|
25973
|
+
interface DirectiveIRNode export extends BaseIRNode {
|
|
25959
25974
|
type: IRNodeTypes.DIRECTIVE;
|
|
25960
25975
|
element: number;
|
|
25961
25976
|
dir: VaporDirectiveNode;
|
|
@@ -26001,7 +26016,7 @@ interface GetTextChildIRNode extends BaseIRNode {
|
|
|
26001
26016
|
parent: number;
|
|
26002
26017
|
}
|
|
26003
26018
|
type IRNode = OperationNode | RootIRNode;
|
|
26004
|
-
type OperationNode = SetPropIRNode | SetDynamicPropsIRNode | SetTextIRNode | SetEventIRNode | SetDynamicEventsIRNode | SetHtmlIRNode | SetTemplateRefIRNode | InsertNodeIRNode | PrependNodeIRNode | DirectiveIRNode | IfIRNode | ForIRNode | CreateComponentIRNode | SlotOutletIRNode | GetTextChildIRNode;
|
|
26019
|
+
type OperationNode = SetPropIRNode | SetDynamicPropsIRNode | SetTextIRNode | SetEventIRNode | SetDynamicEventsIRNode | SetHtmlIRNode | SetTemplateRefIRNode | InsertNodeIRNode | PrependNodeIRNode | DirectiveIRNode | IfIRNode | ForIRNode | KeyIRNode | CreateComponentIRNode | SlotOutletIRNode | GetTextChildIRNode;
|
|
26005
26020
|
declare enum DynamicFlag {
|
|
26006
26021
|
NONE = 0,
|
|
26007
26022
|
/**
|
|
@@ -26040,7 +26055,7 @@ type VaporDirectiveNode = Overwrite<DirectiveNode, {
|
|
|
26040
26055
|
exp: Exclude<DirectiveNode["exp"], CompoundExpressionNode>;
|
|
26041
26056
|
arg: Exclude<DirectiveNode["arg"], CompoundExpressionNode>;
|
|
26042
26057
|
}>;
|
|
26043
|
-
type InsertionStateTypes = IfIRNode | ForIRNode | SlotOutletIRNode | CreateComponentIRNode;
|
|
26058
|
+
type InsertionStateTypes = IfIRNode | ForIRNode | KeyIRNode | SlotOutletIRNode | CreateComponentIRNode;
|
|
26044
26059
|
declare function isBlockOperation(op: OperationNode): op is InsertionStateTypes;
|
|
26045
26060
|
//#endregion
|
|
26046
26061
|
//#region packages/compiler-core/src/runtimeHelpers.d.ts
|
|
@@ -26059,7 +26074,7 @@ interface ImportItem {
|
|
|
26059
26074
|
//#region packages/compiler-core/src/transforms/transformElement.d.ts
|
|
26060
26075
|
type PropsExpression = ObjectExpression | CallExpression | ExpressionNode;
|
|
26061
26076
|
//#endregion
|
|
26062
|
-
//#region node_modules/.pnpm/@babel+types@7.
|
|
26077
|
+
//#region node_modules/.pnpm/@babel+types@7.29.0/node_modules/@babel/types/lib/index-legacy.d.ts
|
|
26063
26078
|
// NOTE: This file is autogenerated. Do not modify.
|
|
26064
26079
|
// See packages/babel-types/scripts/generators/typescript-legacy.ts for script used.
|
|
26065
26080
|
interface BaseComment {
|
|
@@ -26438,8 +26453,8 @@ interface ClassDeclaration extends BaseNode {
|
|
|
26438
26453
|
interface ExportAllDeclaration extends BaseNode {
|
|
26439
26454
|
type: "ExportAllDeclaration";
|
|
26440
26455
|
source: StringLiteral;
|
|
26441
|
-
assertions: ImportAttribute[] | null;
|
|
26442
26456
|
attributes: ImportAttribute[] | null;
|
|
26457
|
+
assertions: ImportAttribute[] | null;
|
|
26443
26458
|
exportKind: "type" | "value" | null;
|
|
26444
26459
|
}
|
|
26445
26460
|
interface ExportDefaultDeclaration extends BaseNode {
|
|
@@ -26452,8 +26467,8 @@ interface ExportNamedDeclaration extends BaseNode {
|
|
|
26452
26467
|
declaration: Declaration | null;
|
|
26453
26468
|
specifiers: (ExportSpecifier | ExportDefaultSpecifier | ExportNamespaceSpecifier)[];
|
|
26454
26469
|
source: StringLiteral | null;
|
|
26455
|
-
assertions: ImportAttribute[] | null;
|
|
26456
26470
|
attributes: ImportAttribute[] | null;
|
|
26471
|
+
assertions: ImportAttribute[] | null;
|
|
26457
26472
|
exportKind: "type" | "value" | null;
|
|
26458
26473
|
}
|
|
26459
26474
|
interface ExportSpecifier extends BaseNode {
|
|
@@ -26473,8 +26488,8 @@ interface ImportDeclaration extends BaseNode {
|
|
|
26473
26488
|
type: "ImportDeclaration";
|
|
26474
26489
|
specifiers: (ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier)[];
|
|
26475
26490
|
source: StringLiteral;
|
|
26476
|
-
assertions: ImportAttribute[] | null;
|
|
26477
26491
|
attributes: ImportAttribute[] | null;
|
|
26492
|
+
assertions: ImportAttribute[] | null;
|
|
26478
26493
|
importKind: "type" | "typeof" | "value" | null;
|
|
26479
26494
|
module: boolean | null;
|
|
26480
26495
|
phase: "source" | "defer" | null;
|
|
@@ -28024,19 +28039,17 @@ declare function buildCodeFragment(...frag: CodeFragment[]): [CodeFragment[], (.
|
|
|
28024
28039
|
type CodeFragmentDelimiters = [left: CodeFragments, right: CodeFragmentexport s, delimiter: CodeFragments, placeholder?: CodeFragments];
|
|
28025
28040
|
declare function genMulti([left, right, seg, placeholder]: CodeFragexport mentDelimiters, ...frags: CodeFragments[]): CodeFragment[];
|
|
28026
28041
|
declare function genCall(name: string | [name: string, placeexport holder?: CodeFragments], ...frags: CodeFragments[]): CodeFragment[];
|
|
28027
|
-
declare function codeFragmentToString(code:
|
|
28042
|
+
declare function codeFragmentToString(code: CodeFragment[], export context: CodegenContext): [code: string, map: CodegenSourceMapGenerator | undefined];
|
|
28028
28043
|
//#endregion
|
|
28029
|
-
//#region temp/
|
|
28044
|
+
//#region temp/packagesexport /compiler-vapor/src/transforms/utils.d.ts
|
|
28030
28045
|
declare function wrapTemplate(node: ElementNode, dirs: string[]): TemplateNode;
|
|
28031
28046
|
//#endregion
|
|
28032
|
-
//#
|
|
28047
|
+
//#reexport gion temp/packages/compiler-vapor/src/compile.d.ts
|
|
28033
28048
|
declare function compile(source: string | RootNode, options?: CompilerOptions): VaporCodexport egenResult;
|
|
28034
28049
|
type CompilerOptions = HackOptions<CompilerOptions$1>;
|
|
28035
|
-
|
|
28036
|
-
declare const transformVOnce: NodeTransform;
|
|
28050
|
+
type TransformPreset = [NodeTransform[], Record<string, Direcexport tiveTransform>];
|
|
28037
28051
|
//#endregion
|
|
28038
|
-
//#region temp/packages/compiler-
|
|
28039
|
-
declare const transformVShow: DirectiveTransform;
|
|
28052
|
+
//#region temp/packages/compiler-vapo/compilShow: DirectiveTransform;
|
|
28040
28053
|
//#endregion
|
|
28041
28054
|
//#region temp/packages/compiler-vapor/src/transforms/vText.d.ts
|
|
28042
28055
|
declare const transformVText: DirectiveTransform;
|
|
@@ -28047,6 +28060,9 @@ declare const transformVIf: NodeTransform;
|
|
|
28047
28060
|
//#region temp/packages/compiler-vapor/src/transforms/vFor.d.ts
|
|
28048
28061
|
declare const transformVFor: NodeTransform;
|
|
28049
28062
|
//#endregion
|
|
28063
|
+
//#region temp/packages/compiler-vapor/src/transforms/transformKey.d.ts
|
|
28064
|
+
declare const transformKey: NodeTransform;
|
|
28065
|
+
//#endregion
|
|
28050
28066
|
//#region temp/packages/compiler-vapor/src/transforms/vModel.d.ts
|
|
28051
28067
|
declare const transformVModel: DirectiveTransform;
|
|
28052
28068
|
//#endregion
|
|
@@ -28059,4 +28075,4 @@ declare const transformSlotOutlet: NodeTransform;
|
|
|
28059
28075
|
//#region temp/packages/compiler-vapor/src/transforms/vSlot.d.ts
|
|
28060
28076
|
declare const transformVSlot: NodeTransform;
|
|
28061
28077
|
//#endregion
|
|
28062
|
-
export { BaseIRNode, BlockIRNode, type CodeFragment, type CodegenContext, type CodegenOptions, type CompilerOptions, CoreHelper, CreateComponentIRNode, DirectiveIRNode, type DirectiveTransform, DynamicFlag, ForIRNode, GetTextChildIRNode, HackOptions, IRDynamicInfo, IRDynamicPropsKind, IREffect, IRFor, IRNode, IRNodeTypes, IRProp, IRProps, IRPropsDynamicAttribute, IRPropsDynamicExpression, IRPropsStatic, IRSlotDynamic, IRSlotDynamicBasic, IRSlotDynamicConditional, IRSlotDynamicLoop, IRSlotType, IRSlots, IRSlotsExpression, IRSlotsStatic, IfIRNode, InsertNodeIRNode, InsertionStateTypes, KeyOverride, type NodeTransform, OperationNode, PrependNodeIRNode, RootIRNode, SetDynamicEventsIRNode, SetDynamicPropsIRNode, SetEventIRNode, SetHtmlIRNode, SetPropIRNode, SetTemplateRefIRNode, SetTextIRNode, SlotBlockIRNode, SlotOutletIRNode, type StructuralDirectiveTransform, type TransformContext, type TransformPreset, type VaporCodegenResult, type VaporCompilerError, VaporDirectiveNode, VaporErrorCodes, VaporErrorMessages, VaporHelper, buildCodeFragment, codeFragmentToString, compile, createStructuralDirectiveTransform, createVaporCompilerError, genCall, genMulti, generate, isBlockOperation, parse, transform, transformChildren, transformComment, transformElement, transformSlotOutlet, transformTemplateRef, transformText, transformVBind, transformVFor, transformVHtml, transformVIf, transformVModel, transformVOn, transformVOnce, transformVShow, transformVSlot, transformVText, wrapTemplate };
|
|
28078
|
+
export { BaseIRNode, BlockIRNode, type CodeFragment, type CodegenContext, type CodegenOptions, type CompilerOptions, CoreHelper, CreateComponentIRNode, DirectiveIRNode, type DirectiveTransform, DynamicFlag, ForIRNode, GetTextChildIRNode, HackOptions, IRDynamicInfo, IRDynamicPropsKind, IREffect, IRFor, IRNode, IRNodeTypes, IRProp, IRProps, IRPropsDynamicAttribute, IRPropsDynamicExpression, IRPropsStatic, IRSlotDynamic, IRSlotDynamicBasic, IRSlotDynamicConditional, IRSlotDynamicLoop, IRSlotType, IRSlots, IRSlotsExpression, IRSlotsStatic, IfIRNode, InsertNodeIRNode, InsertionStateTypes, KeyIRNode, KeyOverride, type NodeTransform, OperationNode, PrependNodeIRNode, RootIRNode, SetDynamicEventsIRNode, SetDynamicPropsIRNode, SetEventIRNode, SetHtmlIRNode, SetPropIRNode, SetTemplateRefIRNode, SetTextIRNode, SlotBlockIRNode, SlotOutletIRNode, type StructuralDirectiveTransform, type TransformContext, type TransformPreset, type VaporCodegenResult, type VaporCompilerError, VaporDirectiveNode, VaporErrorCodes, VaporErrorMessages, VaporHelper, buildCodeFragment, codeFragmentToString, compile, createStructuralDirectiveTransform, createVaporCompilerError, genCall, genMulti, generate, isBlockOperation, parse, transform, transformChildren, transformComment, transformElement, transformKey, transformSlotOutlet, transformTemplateRef, transformText, transformVBind, transformVFor, transformVHtml, transformVIf, transformVModel, transformVOn, transformVOnce, transformVShow, transformVSlot, transformVText, wrapTemplate };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compiler-vapor v3.6.0-beta.
|
|
2
|
+
* @vue/compiler-vapor v3.6.0-beta.6
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -2899,7 +2899,7 @@ const errorMessages = {
|
|
|
2899
2899
|
};
|
|
2900
2900
|
|
|
2901
2901
|
//#endregion
|
|
2902
|
-
//#region node_modules/.pnpm/@babel+parser@7.
|
|
2902
|
+
//#region node_modules/.pnpm/@babel+parser@7.29.0/node_modules/@babel/parser/lib/index.js
|
|
2903
2903
|
var require_lib = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
2904
2904
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2905
2905
|
function _objectWithoutPropertiesLoose(r, e) {
|
|
@@ -11331,7 +11331,7 @@ var require_lib = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
11331
11331
|
return this.finishCallExpression(node, state.optionalChainMember);
|
|
11332
11332
|
}
|
|
11333
11333
|
const tokenType = this.state.type;
|
|
11334
|
-
if (tokenType === 48 || tokenType === 52 || tokenType !== 10 && tokenCanStartExpression(tokenType) && !this.hasPrecedingLineBreak()) return;
|
|
11334
|
+
if (tokenType === 48 || tokenType === 52 || tokenType !== 10 && tokenType !== 93 && tokenType !== 120 && tokenCanStartExpression(tokenType) && !this.hasPrecedingLineBreak()) return;
|
|
11335
11335
|
const node = this.startNodeAt(startLoc);
|
|
11336
11336
|
node.expression = base;
|
|
11337
11337
|
node.typeParameters = typeArguments;
|
|
@@ -11691,7 +11691,17 @@ var require_lib = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
11691
11691
|
}
|
|
11692
11692
|
parseClassSuper(node) {
|
|
11693
11693
|
super.parseClassSuper(node);
|
|
11694
|
-
if (node.superClass
|
|
11694
|
+
if (node.superClass) {
|
|
11695
|
+
if (node.superClass.type === "TSInstantiationExpression") {
|
|
11696
|
+
const tsInstantiationExpression = node.superClass;
|
|
11697
|
+
const superClass = tsInstantiationExpression.expression;
|
|
11698
|
+
this.takeSurroundingComments(superClass, superClass.start, superClass.end);
|
|
11699
|
+
const superTypeArguments = tsInstantiationExpression.typeParameters;
|
|
11700
|
+
this.takeSurroundingComments(superTypeArguments, superTypeArguments.start, superTypeArguments.end);
|
|
11701
|
+
node.superClass = superClass;
|
|
11702
|
+
node.superTypeParameters = superTypeArguments;
|
|
11703
|
+
} else if (this.match(47) || this.match(51)) node.superTypeParameters = this.tsParseTypeArgumentsInExpression();
|
|
11704
|
+
}
|
|
11695
11705
|
if (this.eatContextual(113)) node.implements = this.tsParseHeritageClause("implements");
|
|
11696
11706
|
}
|
|
11697
11707
|
parseObjPropValue(prop, startLoc, isGenerator, isAsync, isPattern, isAccessor, refExpressionErrors) {
|
|
@@ -18972,7 +18982,7 @@ function wrapTemplate(node, dirs) {
|
|
|
18972
18982
|
const reserved = [];
|
|
18973
18983
|
const pass = [];
|
|
18974
18984
|
node.props.forEach((prop) => {
|
|
18975
|
-
if (prop.type === 7 && dirs.includes(prop.name)) reserved.push(prop);
|
|
18985
|
+
if (prop.type === 7 && (dirs.includes(prop.name) || prop.name === "bind" && prop.arg && prop.arg.type === 4 && prop.arg.content === "key" && dirs.includes("key"))) reserved.push(prop);
|
|
18976
18986
|
else pass.push(prop);
|
|
18977
18987
|
});
|
|
18978
18988
|
return extend({}, node, {
|
|
@@ -19030,13 +19040,6 @@ function getLiteralExpressionValue(exp, excludeNumber) {
|
|
|
19030
19040
|
}
|
|
19031
19041
|
return exp.isStatic ? exp.content : null;
|
|
19032
19042
|
}
|
|
19033
|
-
function isInTransition(context) {
|
|
19034
|
-
const parentNode = context.parent && context.parent.node;
|
|
19035
|
-
return !!(parentNode && isTransitionNode(parentNode));
|
|
19036
|
-
}
|
|
19037
|
-
function isTransitionNode(node) {
|
|
19038
|
-
return node.type === 1 && isTransitionTag(node.tag);
|
|
19039
|
-
}
|
|
19040
19043
|
function isTransitionTag(tag) {
|
|
19041
19044
|
tag = tag.toLowerCase();
|
|
19042
19045
|
return tag === "transition" || tag === "vaportransition";
|
|
@@ -19494,8 +19497,10 @@ const IRNodeTypes = {
|
|
|
19494
19497
|
"14": "IF",
|
|
19495
19498
|
"FOR": 15,
|
|
19496
19499
|
"15": "FOR",
|
|
19497
|
-
"
|
|
19498
|
-
"16": "
|
|
19500
|
+
"KEY": 16,
|
|
19501
|
+
"16": "KEY",
|
|
19502
|
+
"GET_TEXT_CHILD": 17,
|
|
19503
|
+
"17": "GET_TEXT_CHILD"
|
|
19499
19504
|
};
|
|
19500
19505
|
const DynamicFlag = {
|
|
19501
19506
|
"NONE": 0,
|
|
@@ -19509,7 +19514,7 @@ const DynamicFlag = {
|
|
|
19509
19514
|
};
|
|
19510
19515
|
function isBlockOperation(op) {
|
|
19511
19516
|
const type = op.type;
|
|
19512
|
-
return type === 11 || type === 12 || type === 14 || type === 15;
|
|
19517
|
+
return type === 11 || type === 12 || type === 14 || type === 16 || type === 15;
|
|
19513
19518
|
}
|
|
19514
19519
|
|
|
19515
19520
|
//#endregion
|
|
@@ -20329,18 +20334,19 @@ function genPropValue(values, context) {
|
|
|
20329
20334
|
}
|
|
20330
20335
|
function getRuntimeHelper(tag, key, modifier) {
|
|
20331
20336
|
const tagName = tag.toUpperCase();
|
|
20332
|
-
|
|
20333
|
-
if (modifier) if (modifier === ".") return getSpecialHelper(key, tagName) || helpers.setDOMProp;
|
|
20334
|
-
else return helpers.setAttr;
|
|
20335
|
-
const helper = getSpecialHelper(key, tagName);
|
|
20337
|
+
const isSVG = isSVGTag(tag);
|
|
20338
|
+
if (modifier) if (modifier === ".") return getSpecialHelper(key, tagName, isSVG) || helpers.setDOMProp;
|
|
20339
|
+
else return isSVG ? extend({ isSVG: true }, helpers.setAttr) : helpers.setAttr;
|
|
20340
|
+
const helper = getSpecialHelper(key, tagName, isSVG);
|
|
20336
20341
|
if (helper) return helper;
|
|
20337
20342
|
if (/aria[A-Z]/.test(key)) return helpers.setDOMProp;
|
|
20343
|
+
if (isSVG) return extend({ isSVG: true }, helpers.setAttr);
|
|
20338
20344
|
if (shouldSetAsAttr(tagName, key) || key.includes("-")) return helpers.setAttr;
|
|
20339
20345
|
return helpers.setProp;
|
|
20340
20346
|
}
|
|
20341
|
-
function getSpecialHelper(keyName, tagName) {
|
|
20347
|
+
function getSpecialHelper(keyName, tagName, isSVG) {
|
|
20342
20348
|
if (keyName === "value" && canSetValueDirectly(tagName)) return helpers.setValue;
|
|
20343
|
-
else if (keyName === "class") return helpers.setClass;
|
|
20349
|
+
else if (keyName === "class") return extend({ isSVG }, helpers.setClass);
|
|
20344
20350
|
else if (keyName === "style") return helpers.setStyle;
|
|
20345
20351
|
else if (keyName === "innerHTML") return helpers.setHtml;
|
|
20346
20352
|
else if (keyName === "textContent") return helpers.setText;
|
|
@@ -20754,7 +20760,7 @@ function genSlotBlockWithProps(oper, context) {
|
|
|
20754
20760
|
let propsName;
|
|
20755
20761
|
let exitScope;
|
|
20756
20762
|
let depth;
|
|
20757
|
-
const { props,
|
|
20763
|
+
const { props, node } = oper;
|
|
20758
20764
|
const idToPathMap = props ? parseValueDestructure(props, context) : /* @__PURE__ */ new Map();
|
|
20759
20765
|
if (props) if (props.ast) {
|
|
20760
20766
|
[depth, exitScope] = context.enterScope();
|
|
@@ -20764,16 +20770,6 @@ function genSlotBlockWithProps(oper, context) {
|
|
|
20764
20770
|
if (propsName) idMap[propsName] = null;
|
|
20765
20771
|
let blockFn = context.withId(() => genBlock(oper, context, propsName ? [propsName] : []), idMap);
|
|
20766
20772
|
exitScope && exitScope();
|
|
20767
|
-
if (key) blockFn = [
|
|
20768
|
-
`() => {`,
|
|
20769
|
-
INDENT_START,
|
|
20770
|
-
NEWLINE,
|
|
20771
|
-
`return `,
|
|
20772
|
-
...genCall(context.helper("createKeyedFragment"), [`() => `, ...genExpression(key, context)], blockFn),
|
|
20773
|
-
INDENT_END,
|
|
20774
|
-
NEWLINE,
|
|
20775
|
-
`}`
|
|
20776
|
-
];
|
|
20777
20773
|
if (node.type === 1) {
|
|
20778
20774
|
if (needsVaporCtx(oper)) blockFn = [
|
|
20779
20775
|
`${context.helper("withVaporCtx")}(`,
|
|
@@ -20847,6 +20843,20 @@ function genSlotOutlet(oper, context) {
|
|
|
20847
20843
|
return frag;
|
|
20848
20844
|
}
|
|
20849
20845
|
|
|
20846
|
+
//#endregion
|
|
20847
|
+
//#region packages/compiler-vapor/src/generators/key.ts
|
|
20848
|
+
function genKey(oper, context) {
|
|
20849
|
+
const { id, value, block } = oper;
|
|
20850
|
+
const [frag, push] = buildCodeFragment();
|
|
20851
|
+
const blockFn = genBlock(block, context);
|
|
20852
|
+
push(NEWLINE, `const n${id} = `, ...genCall(context.helper("createKeyedFragment"), [
|
|
20853
|
+
`() => (`,
|
|
20854
|
+
...genExpression(value, context),
|
|
20855
|
+
")"
|
|
20856
|
+
], blockFn));
|
|
20857
|
+
return frag;
|
|
20858
|
+
}
|
|
20859
|
+
|
|
20850
20860
|
//#endregion
|
|
20851
20861
|
//#region packages/compiler-vapor/src/generators/operation.ts
|
|
20852
20862
|
function genOperations(opers, context) {
|
|
@@ -20873,10 +20883,11 @@ function genOperation(oper, context) {
|
|
|
20873
20883
|
case 10: return genPrependNode(oper, context);
|
|
20874
20884
|
case 14: return genIf(oper, context);
|
|
20875
20885
|
case 15: return genFor(oper, context);
|
|
20886
|
+
case 16: return genKey(oper, context);
|
|
20876
20887
|
case 11: return genCreateComponent(oper, context);
|
|
20877
20888
|
case 12: return genSlotOutlet(oper, context);
|
|
20878
20889
|
case 13: return genBuiltinDirective(oper, context);
|
|
20879
|
-
case
|
|
20890
|
+
case 17: return genGetTextChild(oper, context);
|
|
20880
20891
|
default:
|
|
20881
20892
|
const exhaustiveCheck = oper;
|
|
20882
20893
|
throw new Error(`Unhandled operation type in genOperation: ${exhaustiveCheck}`);
|
|
@@ -20953,6 +20964,10 @@ function genChildren(dynamic, context, pushBlock, from = `n${dynamic.id}`) {
|
|
|
20953
20964
|
let prev;
|
|
20954
20965
|
for (const [index, child] of children.entries()) {
|
|
20955
20966
|
if (child.flags & 2) offset--;
|
|
20967
|
+
if (child.flags & 4 && child.template != null) {
|
|
20968
|
+
push(...genSelf(child, context));
|
|
20969
|
+
continue;
|
|
20970
|
+
}
|
|
20956
20971
|
const id = child.flags & 1 ? child.flags & 4 ? child.anchor : child.id : void 0;
|
|
20957
20972
|
if (id === void 0 && !child.hasDynamicChild) {
|
|
20958
20973
|
push(...genSelf(child, context));
|
|
@@ -21550,7 +21565,7 @@ const transformVText = (dir, node, context) => {
|
|
|
21550
21565
|
context.childrenTemplate = [" "];
|
|
21551
21566
|
const isComponent = node.tagType === 1;
|
|
21552
21567
|
if (!isComponent) context.registerOperation({
|
|
21553
|
-
type:
|
|
21568
|
+
type: 17,
|
|
21554
21569
|
parent: context.reference()
|
|
21555
21570
|
});
|
|
21556
21571
|
context.registerEffect([exp], {
|
|
@@ -21743,9 +21758,16 @@ function processInterpolation(context) {
|
|
|
21743
21758
|
if (prev && prev.type === 2) nodes.unshift(prev);
|
|
21744
21759
|
const values = processTextLikeChildren(nodes, context);
|
|
21745
21760
|
if (values.length === 0 && parentNode.type !== 0) return;
|
|
21761
|
+
const literalValues = values.map((v) => getLiteralExpressionValue(v));
|
|
21762
|
+
if (literalValues.every((v) => v != null) && parentNode.type !== 0) {
|
|
21763
|
+
const text = literalValues.join("");
|
|
21764
|
+
const isElementChild = parentNode.type === 1 && parentNode.tagType === 0;
|
|
21765
|
+
context.template += isElementChild ? escapeHtml(text) : text;
|
|
21766
|
+
return;
|
|
21767
|
+
}
|
|
21746
21768
|
context.template += " ";
|
|
21747
21769
|
const id = context.reference();
|
|
21748
|
-
if (values.length === 0
|
|
21770
|
+
if (values.length === 0) return;
|
|
21749
21771
|
context.registerEffect(values, {
|
|
21750
21772
|
type: 4,
|
|
21751
21773
|
element: id,
|
|
@@ -21759,7 +21781,7 @@ function processTextContainer(children, context) {
|
|
|
21759
21781
|
else {
|
|
21760
21782
|
context.childrenTemplate = [" "];
|
|
21761
21783
|
context.registerOperation({
|
|
21762
|
-
type:
|
|
21784
|
+
type: 17,
|
|
21763
21785
|
parent: context.reference()
|
|
21764
21786
|
});
|
|
21765
21787
|
context.registerEffect(values, {
|
|
@@ -21900,7 +21922,7 @@ function processIf(node, dir, context) {
|
|
|
21900
21922
|
id,
|
|
21901
21923
|
condition: dir.exp,
|
|
21902
21924
|
positive: branch,
|
|
21903
|
-
index:
|
|
21925
|
+
index: context.root.nextIfIndex(),
|
|
21904
21926
|
once: context.inVOnce || isStaticExpression(dir.exp, context.options.bindingMetadata)
|
|
21905
21927
|
};
|
|
21906
21928
|
};
|
|
@@ -21933,7 +21955,7 @@ function processIf(node, dir, context) {
|
|
|
21933
21955
|
id: -1,
|
|
21934
21956
|
condition: dir.exp,
|
|
21935
21957
|
positive: branch,
|
|
21936
|
-
index:
|
|
21958
|
+
index: context.root.nextIfIndex(),
|
|
21937
21959
|
once: context.inVOnce || isStaticExpression(dir.exp, context.options.bindingMetadata)
|
|
21938
21960
|
};
|
|
21939
21961
|
return () => onExit();
|
|
@@ -21968,7 +21990,7 @@ function processFor(node, dir, context) {
|
|
|
21968
21990
|
const keyProp = findProp(node, "key");
|
|
21969
21991
|
const keyProperty = keyProp && propToExpression(keyProp);
|
|
21970
21992
|
const isComponent = node.tagType === 1 || isTemplateWithSingleComponent(node);
|
|
21971
|
-
context.node = node = wrapTemplate(node, ["for"]);
|
|
21993
|
+
context.node = node = wrapTemplate(node, ["for", "key"]);
|
|
21972
21994
|
context.dynamic.flags |= 6;
|
|
21973
21995
|
const id = context.reference();
|
|
21974
21996
|
const render = newBlock(node);
|
|
@@ -22082,13 +22104,6 @@ function transformComponentSlot(node, dir, context) {
|
|
|
22082
22104
|
markNonTemplate(n, context);
|
|
22083
22105
|
});
|
|
22084
22106
|
const [block, onExit] = createSlotBlock(node, dir, context);
|
|
22085
|
-
if (isTransitionNode(node) && nonSlotTemplateChildren.length) {
|
|
22086
|
-
const nonCommentChild = nonSlotTemplateChildren.find((n) => !isCommentOrWhitespace(n));
|
|
22087
|
-
if (nonCommentChild) {
|
|
22088
|
-
const keyProp = findProp(nonCommentChild, "key");
|
|
22089
|
-
if (keyProp) block.key = keyProp.exp;
|
|
22090
|
-
}
|
|
22091
|
-
}
|
|
22092
22107
|
const { slots } = context;
|
|
22093
22108
|
return () => {
|
|
22094
22109
|
onExit();
|
|
@@ -22207,6 +22222,31 @@ function hasMultipleChildren(node) {
|
|
|
22207
22222
|
return children.length > 1;
|
|
22208
22223
|
}
|
|
22209
22224
|
|
|
22225
|
+
//#endregion
|
|
22226
|
+
//#region packages/compiler-vapor/src/transforms/transformKey.ts
|
|
22227
|
+
const transformKey = (node, context) => {
|
|
22228
|
+
if (node.type !== 1 || context.inVOnce || findDir(node, "for")) return;
|
|
22229
|
+
const dir = findProp(node, "key", true, true);
|
|
22230
|
+
if (!dir || dir.type === 6) return;
|
|
22231
|
+
let value;
|
|
22232
|
+
value = dir.exp || normalizeBindShorthand(dir.arg, context);
|
|
22233
|
+
if (isStaticExpression(value, context.options.bindingMetadata)) return;
|
|
22234
|
+
let id = context.reference();
|
|
22235
|
+
context.dynamic.flags |= 6;
|
|
22236
|
+
context.node = node = wrapTemplate(node, ["key"]);
|
|
22237
|
+
const block = newBlock(node);
|
|
22238
|
+
const exitBlock = context.enterBlock(block);
|
|
22239
|
+
return () => {
|
|
22240
|
+
exitBlock();
|
|
22241
|
+
context.dynamic.operation = {
|
|
22242
|
+
type: 16,
|
|
22243
|
+
id,
|
|
22244
|
+
value,
|
|
22245
|
+
block
|
|
22246
|
+
};
|
|
22247
|
+
};
|
|
22248
|
+
};
|
|
22249
|
+
|
|
22210
22250
|
//#endregion
|
|
22211
22251
|
//#region packages/compiler-vapor/src/compile.ts
|
|
22212
22252
|
function compile(source, options = {}) {
|
|
@@ -22231,6 +22271,7 @@ function getBaseTransformPreset() {
|
|
|
22231
22271
|
transformVOnce,
|
|
22232
22272
|
transformVIf,
|
|
22233
22273
|
transformVFor,
|
|
22274
|
+
transformKey,
|
|
22234
22275
|
transformSlotOutlet,
|
|
22235
22276
|
transformTemplateRef,
|
|
22236
22277
|
transformElement,
|
|
@@ -22265,4 +22306,4 @@ const VaporErrorMessages = {
|
|
|
22265
22306
|
};
|
|
22266
22307
|
|
|
22267
22308
|
//#endregion
|
|
22268
|
-
export { CodegenContext, DynamicFlag, IRDynamicPropsKind, IRNodeTypes, IRSlotType, VaporErrorCodes, VaporErrorMessages, buildCodeFragment, codeFragmentToString, compile, createStructuralDirectiveTransform, createVaporCompilerError, genCall, genMulti, generate, isBlockOperation, parse, transform, transformChildren, transformComment, transformElement, transformSlotOutlet, transformTemplateRef, transformText, transformVBind, transformVFor, transformVHtml, transformVIf, transformVModel, transformVOn, transformVOnce, transformVShow, transformVSlot, transformVText, wrapTemplate };
|
|
22309
|
+
export { CodegenContext, DynamicFlag, IRDynamicPropsKind, IRNodeTypes, IRSlotType, VaporErrorCodes, VaporErrorMessages, buildCodeFragment, codeFragmentToString, compile, createStructuralDirectiveTransform, createVaporCompilerError, genCall, genMulti, generate, isBlockOperation, parse, transform, transformChildren, transformComment, transformElement, transformKey, transformSlotOutlet, transformTemplateRef, transformText, transformVBind, transformVFor, transformVHtml, transformVIf, transformVModel, transformVOn, transformVOnce, transformVShow, transformVSlot, transformVText, wrapTemplate };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vue/compiler-vapor",
|
|
3
|
-
"version": "3.6.0-beta.
|
|
3
|
+
"version": "3.6.0-beta.6",
|
|
4
4
|
"description": "@vue/compiler-vapor",
|
|
5
5
|
"main": "dist/compiler-vapor.cjs.js",
|
|
6
6
|
"module": "dist/compiler-vapor.esm-bundler.js",
|
|
@@ -42,10 +42,10 @@
|
|
|
42
42
|
},
|
|
43
43
|
"homepage": "https://github.com/vuejs/core/tree/main/packages/compiler-vapor#readme",
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@babel/parser": "^7.
|
|
45
|
+
"@babel/parser": "^7.29.0",
|
|
46
46
|
"estree-walker": "^2.0.2",
|
|
47
47
|
"source-map-js": "^1.2.1",
|
|
48
|
-
"@vue/shared": "3.6.0-beta.
|
|
49
|
-
"@vue/compiler-dom": "3.6.0-beta.
|
|
48
|
+
"@vue/shared": "3.6.0-beta.6",
|
|
49
|
+
"@vue/compiler-dom": "3.6.0-beta.6"
|
|
50
50
|
}
|
|
51
51
|
}
|