@vue/runtime-dom
Advanced tools
Comparing version 3.0.0-rc.5 to 3.0.0-rc.6
@@ -112,14 +112,19 @@ 'use strict'; | ||
function setStyle(style, name, val) { | ||
if (name.startsWith('--')) { | ||
// custom property definition | ||
style.setProperty(name, val); | ||
if (shared.isArray(val)) { | ||
val.forEach(v => setStyle(style, name, v)); | ||
} | ||
else { | ||
const prefixed = autoPrefix(style, name); | ||
if (importantRE.test(val)) { | ||
// !important | ||
style.setProperty(shared.hyphenate(prefixed), val.replace(importantRE, ''), 'important'); | ||
if (name.startsWith('--')) { | ||
// custom property definition | ||
style.setProperty(name, val); | ||
} | ||
else { | ||
style[prefixed] = val; | ||
const prefixed = autoPrefix(style, name); | ||
if (importantRE.test(val)) { | ||
// !important | ||
style.setProperty(shared.hyphenate(prefixed), val.replace(importantRE, ''), 'important'); | ||
} | ||
else { | ||
style[prefixed] = val; | ||
} | ||
} | ||
@@ -244,7 +249,8 @@ } | ||
function patchEvent(el, rawName, prevValue, nextValue, instance = null) { | ||
const invoker = prevValue && prevValue.invoker; | ||
if (nextValue && invoker) { | ||
prevValue.invoker = null; | ||
invoker.value = nextValue; | ||
nextValue.invoker = invoker; | ||
// vei = vue event invokers | ||
const invokers = el._vei || (el._vei = {}); | ||
const existingInvoker = invokers[rawName]; | ||
if (nextValue && existingInvoker) { | ||
// patch | ||
existingInvoker.value = nextValue; | ||
} | ||
@@ -254,7 +260,10 @@ else { | ||
if (nextValue) { | ||
addEventListener(el, name, createInvoker(nextValue, instance), options); | ||
// add | ||
const invoker = (invokers[rawName] = createInvoker(nextValue, instance)); | ||
addEventListener(el, name, invoker, options); | ||
} | ||
else if (invoker) { | ||
else if (existingInvoker) { | ||
// remove | ||
removeEventListener(el, name, invoker, options); | ||
removeEventListener(el, name, existingInvoker, options); | ||
invokers[rawName] = undefined; | ||
} | ||
@@ -290,3 +299,2 @@ } | ||
invoker.value = initialValue; | ||
initialValue.invoker = invoker; | ||
invoker.attached = getNow(); | ||
@@ -368,2 +376,7 @@ return invoker; | ||
} | ||
// #1787 form as an attribute must be a string, while it accepts an Element as | ||
// a prop | ||
if (key === 'form' && typeof value === 'string') { | ||
return false; | ||
} | ||
// #1526 <input list> must be set as attribute | ||
@@ -370,0 +383,0 @@ if (key === 'list' && el.tagName === 'INPUT') { |
@@ -112,14 +112,19 @@ 'use strict'; | ||
function setStyle(style, name, val) { | ||
if (name.startsWith('--')) { | ||
// custom property definition | ||
style.setProperty(name, val); | ||
if (shared.isArray(val)) { | ||
val.forEach(v => setStyle(style, name, v)); | ||
} | ||
else { | ||
const prefixed = autoPrefix(style, name); | ||
if (importantRE.test(val)) { | ||
// !important | ||
style.setProperty(shared.hyphenate(prefixed), val.replace(importantRE, ''), 'important'); | ||
if (name.startsWith('--')) { | ||
// custom property definition | ||
style.setProperty(name, val); | ||
} | ||
else { | ||
style[prefixed] = val; | ||
const prefixed = autoPrefix(style, name); | ||
if (importantRE.test(val)) { | ||
// !important | ||
style.setProperty(shared.hyphenate(prefixed), val.replace(importantRE, ''), 'important'); | ||
} | ||
else { | ||
style[prefixed] = val; | ||
} | ||
} | ||
@@ -240,7 +245,8 @@ } | ||
function patchEvent(el, rawName, prevValue, nextValue, instance = null) { | ||
const invoker = prevValue && prevValue.invoker; | ||
if (nextValue && invoker) { | ||
prevValue.invoker = null; | ||
invoker.value = nextValue; | ||
nextValue.invoker = invoker; | ||
// vei = vue event invokers | ||
const invokers = el._vei || (el._vei = {}); | ||
const existingInvoker = invokers[rawName]; | ||
if (nextValue && existingInvoker) { | ||
// patch | ||
existingInvoker.value = nextValue; | ||
} | ||
@@ -250,7 +256,10 @@ else { | ||
if (nextValue) { | ||
addEventListener(el, name, createInvoker(nextValue, instance), options); | ||
// add | ||
const invoker = (invokers[rawName] = createInvoker(nextValue, instance)); | ||
addEventListener(el, name, invoker, options); | ||
} | ||
else if (invoker) { | ||
else if (existingInvoker) { | ||
// remove | ||
removeEventListener(el, name, invoker, options); | ||
removeEventListener(el, name, existingInvoker, options); | ||
invokers[rawName] = undefined; | ||
} | ||
@@ -286,3 +295,2 @@ } | ||
invoker.value = initialValue; | ||
initialValue.invoker = invoker; | ||
invoker.attached = getNow(); | ||
@@ -364,2 +372,7 @@ return invoker; | ||
} | ||
// #1787 form as an attribute must be a string, while it accepts an Element as | ||
// a prop | ||
if (key === 'form' && typeof value === 'string') { | ||
return false; | ||
} | ||
// #1526 <input list> must be set as attribute | ||
@@ -366,0 +379,0 @@ if (key === 'list' && el.tagName === 'INPUT') { |
@@ -339,3 +339,3 @@ import { BaseTransitionProps } from '@vue/runtime-core'; | ||
export interface HTMLAttributes extends AriaAttributes { | ||
domPropsInnerHTML?: string | ||
innerHTML?: string | ||
@@ -829,4 +829,11 @@ class?: any | ||
export interface SVGAttributes extends AriaAttributes { | ||
domPropsInnerHTML?: string | ||
innerHTML?: string | ||
/** | ||
* SVG Styling Attributes | ||
* @see https://www.w3.org/TR/SVG/styling.html#ElementSpecificStyling | ||
*/ | ||
class?: any | ||
style?: string | CSSProperties | ||
color?: string | ||
@@ -1112,3 +1119,2 @@ height?: number | string | ||
bdo: HTMLAttributes | ||
big: HTMLAttributes | ||
blockquote: BlockquoteHTMLAttributes | ||
@@ -1167,3 +1173,2 @@ body: HTMLAttributes | ||
menu: MenuHTMLAttributes | ||
menuitem: HTMLAttributes | ||
meta: MetaHTMLAttributes | ||
@@ -1433,3 +1438,3 @@ meter: MeterHTMLAttributes | ||
// allow arbitrary elements | ||
// @ts-ignore supress ts:2374 = Duplicate string index signature. | ||
// @ts-ignore suppress ts:2374 = Duplicate string index signature. | ||
[name: string]: any | ||
@@ -1436,0 +1441,0 @@ } |
import { camelize, warn, callWithAsyncErrorHandling, getCurrentInstance, onMounted, watchEffect, unref, Fragment, h, BaseTransition, useTransitionState, onUpdated, getTransitionRawChildren, setTransitionHooks, resolveTransitionHooks, createVNode, createRenderer, createHydrationRenderer } from '@vue/runtime-core'; | ||
export * from '@vue/runtime-core'; | ||
import { isString, hyphenate, capitalize, isSpecialBooleanAttr, isArray, isOn, isModelListener, isFunction, EMPTY_OBJ, extend, isObject, toNumber, invokeArrayFns, looseIndexOf, looseEqual, isHTMLTag, isSVGTag } from '@vue/shared'; | ||
import { isString, isArray, hyphenate, capitalize, isSpecialBooleanAttr, isOn, isModelListener, isFunction, EMPTY_OBJ, extend, isObject, toNumber, invokeArrayFns, looseIndexOf, looseEqual, isHTMLTag, isSVGTag } from '@vue/shared'; | ||
@@ -109,14 +109,19 @@ const svgNS = 'http://www.w3.org/2000/svg'; | ||
function setStyle(style, name, val) { | ||
if (name.startsWith('--')) { | ||
// custom property definition | ||
style.setProperty(name, val); | ||
if (isArray(val)) { | ||
val.forEach(v => setStyle(style, name, v)); | ||
} | ||
else { | ||
const prefixed = autoPrefix(style, name); | ||
if (importantRE.test(val)) { | ||
// !important | ||
style.setProperty(hyphenate(prefixed), val.replace(importantRE, ''), 'important'); | ||
if (name.startsWith('--')) { | ||
// custom property definition | ||
style.setProperty(name, val); | ||
} | ||
else { | ||
style[prefixed] = val; | ||
const prefixed = autoPrefix(style, name); | ||
if (importantRE.test(val)) { | ||
// !important | ||
style.setProperty(hyphenate(prefixed), val.replace(importantRE, ''), 'important'); | ||
} | ||
else { | ||
style[prefixed] = val; | ||
} | ||
} | ||
@@ -241,7 +246,8 @@ } | ||
function patchEvent(el, rawName, prevValue, nextValue, instance = null) { | ||
const invoker = prevValue && prevValue.invoker; | ||
if (nextValue && invoker) { | ||
prevValue.invoker = null; | ||
invoker.value = nextValue; | ||
nextValue.invoker = invoker; | ||
// vei = vue event invokers | ||
const invokers = el._vei || (el._vei = {}); | ||
const existingInvoker = invokers[rawName]; | ||
if (nextValue && existingInvoker) { | ||
// patch | ||
existingInvoker.value = nextValue; | ||
} | ||
@@ -251,7 +257,10 @@ else { | ||
if (nextValue) { | ||
addEventListener(el, name, createInvoker(nextValue, instance), options); | ||
// add | ||
const invoker = (invokers[rawName] = createInvoker(nextValue, instance)); | ||
addEventListener(el, name, invoker, options); | ||
} | ||
else if (invoker) { | ||
else if (existingInvoker) { | ||
// remove | ||
removeEventListener(el, name, invoker, options); | ||
removeEventListener(el, name, existingInvoker, options); | ||
invokers[rawName] = undefined; | ||
} | ||
@@ -287,3 +296,2 @@ } | ||
invoker.value = initialValue; | ||
initialValue.invoker = invoker; | ||
invoker.attached = getNow(); | ||
@@ -365,2 +373,7 @@ return invoker; | ||
} | ||
// #1787 form as an attribute must be a string, while it accepts an Element as | ||
// a prop | ||
if (key === 'form' && typeof value === 'string') { | ||
return false; | ||
} | ||
// #1526 <input list> must be set as attribute | ||
@@ -367,0 +380,0 @@ if (key === 'list' && el.tagName === 'INPUT') { |
{ | ||
"name": "@vue/runtime-dom", | ||
"version": "3.0.0-rc.5", | ||
"version": "3.0.0-rc.6", | ||
"description": "@vue/runtime-dom", | ||
@@ -37,6 +37,6 @@ "main": "index.js", | ||
"dependencies": { | ||
"@vue/shared": "3.0.0-rc.5", | ||
"@vue/runtime-core": "3.0.0-rc.5", | ||
"@vue/shared": "3.0.0-rc.6", | ||
"@vue/runtime-core": "3.0.0-rc.6", | ||
"csstype": "^2.6.8" | ||
} | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
961736
22444
+ Added@vue/reactivity@3.0.0-rc.6(transitive)
+ Added@vue/runtime-core@3.0.0-rc.6(transitive)
+ Added@vue/shared@3.0.0-rc.6(transitive)
- Removed@vue/reactivity@3.0.0-rc.5(transitive)
- Removed@vue/runtime-core@3.0.0-rc.5(transitive)
- Removed@vue/shared@3.0.0-rc.5(transitive)
Updated@vue/runtime-core@3.0.0-rc.6
Updated@vue/shared@3.0.0-rc.6