@kdujs/runtime-dom-canary
Advanced tools
Comparing version 3.20240603.0-minor.0 to 3.20240603.0
@@ -405,2 +405,7 @@ 'use strict'; | ||
const CSS_VAR_TEXT = Symbol("CSS_VAR_TEXT" ); | ||
function useCssVars(getter) { | ||
return; | ||
} | ||
function patchStyle(el, prev, next) { | ||
@@ -424,2 +429,6 @@ const style = el.style; | ||
if (prev !== next) { | ||
const cssVarText = style[CSS_VAR_TEXT]; | ||
if (cssVarText) { | ||
next += ";" + cssVarText; | ||
} | ||
style.cssText = next; | ||
@@ -624,3 +633,4 @@ } | ||
const nativeOnRE = /^on[a-z]/; | ||
const isNativeOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // lowercase letter | ||
key.charCodeAt(2) > 96 && key.charCodeAt(2) < 123; | ||
const patchProp = (el, key, prevValue, nextValue, isSVG = false, prevChildren, parentComponent, parentSuspense, unmountChildren) => { | ||
@@ -659,3 +669,3 @@ if (key === "class") { | ||
} | ||
if (key in el && nativeOnRE.test(key) && shared.isFunction(value)) { | ||
if (key in el && isNativeOn(key) && shared.isFunction(value)) { | ||
return true; | ||
@@ -677,3 +687,9 @@ } | ||
} | ||
if (nativeOnRE.test(key) && shared.isString(value)) { | ||
if (key === "width" || key === "height") { | ||
const tag = el.tagName; | ||
if (tag === "IMG" || tag === "VIDEO" || tag === "CANVAS" || tag === "SOURCE") { | ||
return false; | ||
} | ||
} | ||
if (isNativeOn(key) && shared.isString(value)) { | ||
return false; | ||
@@ -927,6 +943,2 @@ } | ||
function useCssVars(getter) { | ||
return; | ||
} | ||
const positionMap = /* @__PURE__ */ new WeakMap(); | ||
@@ -1106,2 +1118,7 @@ const newPositionMap = /* @__PURE__ */ new WeakMap(); | ||
return; | ||
const elValue = number || el.type === "number" ? shared.looseToNumber(el.value) : el.value; | ||
const newValue = value == null ? "" : value; | ||
if (elValue === newValue) { | ||
return; | ||
} | ||
if (document.activeElement === el && el.type !== "range") { | ||
@@ -1111,13 +1128,7 @@ if (lazy) { | ||
} | ||
if (trim && el.value.trim() === value) { | ||
if (trim && el.value.trim() === newValue) { | ||
return; | ||
} | ||
if ((number || el.type === "number") && shared.looseToNumber(el.value) === value) { | ||
return; | ||
} | ||
} | ||
const newValue = value == null ? "" : value; | ||
if (el.value !== newValue) { | ||
el.value = newValue; | ||
} | ||
el.value = newValue; | ||
} | ||
@@ -1342,3 +1353,5 @@ }; | ||
const withModifiers = (fn, modifiers) => { | ||
return (event, ...args) => { | ||
const cache = fn._withMods || (fn._withMods = {}); | ||
const cacheKey = modifiers.join("."); | ||
return cache[cacheKey] || (cache[cacheKey] = (event, ...args) => { | ||
for (let i = 0; i < modifiers.length; i++) { | ||
@@ -1350,3 +1363,3 @@ const guard = modifierGuards[modifiers[i]]; | ||
return fn(event, ...args); | ||
}; | ||
}); | ||
}; | ||
@@ -1363,3 +1376,5 @@ const keyNames = { | ||
const withKeys = (fn, modifiers) => { | ||
return (event) => { | ||
const cache = fn._withKeys || (fn._withKeys = {}); | ||
const cacheKey = modifiers.join("."); | ||
return cache[cacheKey] || (cache[cacheKey] = (event) => { | ||
if (!("key" in event)) { | ||
@@ -1372,3 +1387,3 @@ return; | ||
} | ||
}; | ||
}); | ||
}; | ||
@@ -1456,3 +1471,3 @@ | ||
- For kdu-cli: see https://kdujs-cli.web.app/guide/webpack.html#modifying-options-of-a-loader | ||
- For wite: pass it via @witejs/plugin-kdu options.`; | ||
- For lahm: pass it via @lahmjs/plugin-kdu options.`; | ||
Object.defineProperty(app.config, "compilerOptions", { | ||
@@ -1459,0 +1474,0 @@ get() { |
@@ -402,2 +402,7 @@ 'use strict'; | ||
const CSS_VAR_TEXT = Symbol(""); | ||
function useCssVars(getter) { | ||
return; | ||
} | ||
function patchStyle(el, prev, next) { | ||
@@ -421,2 +426,6 @@ const style = el.style; | ||
if (prev !== next) { | ||
const cssVarText = style[CSS_VAR_TEXT]; | ||
if (cssVarText) { | ||
next += ";" + cssVarText; | ||
} | ||
style.cssText = next; | ||
@@ -607,3 +616,4 @@ } | ||
const nativeOnRE = /^on[a-z]/; | ||
const isNativeOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // lowercase letter | ||
key.charCodeAt(2) > 96 && key.charCodeAt(2) < 123; | ||
const patchProp = (el, key, prevValue, nextValue, isSVG = false, prevChildren, parentComponent, parentSuspense, unmountChildren) => { | ||
@@ -642,3 +652,3 @@ if (key === "class") { | ||
} | ||
if (key in el && nativeOnRE.test(key) && shared.isFunction(value)) { | ||
if (key in el && isNativeOn(key) && shared.isFunction(value)) { | ||
return true; | ||
@@ -660,3 +670,9 @@ } | ||
} | ||
if (nativeOnRE.test(key) && shared.isString(value)) { | ||
if (key === "width" || key === "height") { | ||
const tag = el.tagName; | ||
if (tag === "IMG" || tag === "VIDEO" || tag === "CANVAS" || tag === "SOURCE") { | ||
return false; | ||
} | ||
} | ||
if (isNativeOn(key) && shared.isString(value)) { | ||
return false; | ||
@@ -888,6 +904,2 @@ } | ||
function useCssVars(getter) { | ||
return; | ||
} | ||
const positionMap = /* @__PURE__ */ new WeakMap(); | ||
@@ -1065,2 +1077,7 @@ const newPositionMap = /* @__PURE__ */ new WeakMap(); | ||
return; | ||
const elValue = number || el.type === "number" ? shared.looseToNumber(el.value) : el.value; | ||
const newValue = value == null ? "" : value; | ||
if (elValue === newValue) { | ||
return; | ||
} | ||
if (document.activeElement === el && el.type !== "range") { | ||
@@ -1070,13 +1087,7 @@ if (lazy) { | ||
} | ||
if (trim && el.value.trim() === value) { | ||
if (trim && el.value.trim() === newValue) { | ||
return; | ||
} | ||
if ((number || el.type === "number") && shared.looseToNumber(el.value) === value) { | ||
return; | ||
} | ||
} | ||
const newValue = value == null ? "" : value; | ||
if (el.value !== newValue) { | ||
el.value = newValue; | ||
} | ||
el.value = newValue; | ||
} | ||
@@ -1298,3 +1309,5 @@ }; | ||
const withModifiers = (fn, modifiers) => { | ||
return (event, ...args) => { | ||
const cache = fn._withMods || (fn._withMods = {}); | ||
const cacheKey = modifiers.join("."); | ||
return cache[cacheKey] || (cache[cacheKey] = (event, ...args) => { | ||
for (let i = 0; i < modifiers.length; i++) { | ||
@@ -1306,3 +1319,3 @@ const guard = modifierGuards[modifiers[i]]; | ||
return fn(event, ...args); | ||
}; | ||
}); | ||
}; | ||
@@ -1319,3 +1332,5 @@ const keyNames = { | ||
const withKeys = (fn, modifiers) => { | ||
return (event) => { | ||
const cache = fn._withKeys || (fn._withKeys = {}); | ||
const cacheKey = modifiers.join("."); | ||
return cache[cacheKey] || (cache[cacheKey] = (event) => { | ||
if (!("key" in event)) { | ||
@@ -1328,3 +1343,3 @@ return; | ||
} | ||
}; | ||
}); | ||
}; | ||
@@ -1331,0 +1346,0 @@ |
@@ -1,2 +0,2 @@ | ||
import { SetupContext, RenderFunction, ComputedOptions, MethodOptions, ComponentOptionsMixin, EmitsOptions, ComponentInjectOptions, SlotsType, ComponentOptionsWithoutProps, ComponentOptionsWithArrayProps, ComponentPropsOptions, ComponentOptionsWithObjectProps, ExtractPropTypes, ComponentPublicInstance, RootHydrateFunction, ConcreteComponent, BaseTransitionProps, FunctionalComponent, ObjectDirective, KNodeRef, RootRenderFunction, CreateAppFunction } from '@kdujs/runtime-core'; | ||
import { SetupContext, RenderFunction, ComputedOptions, MethodOptions, ComponentOptionsMixin, EmitsOptions, ComponentInjectOptions, SlotsType, ComponentOptionsWithoutProps, ComponentOptionsWithArrayProps, ComponentPropsOptions, ComponentOptionsWithObjectProps, ExtractPropTypes, DefineComponent, RootHydrateFunction, ConcreteComponent, BaseTransitionProps, FunctionalComponent, ObjectDirective, KNodeRef, RootRenderFunction, CreateAppFunction } from '@kdujs/runtime-core'; | ||
export * from '@kdujs/runtime-core'; | ||
@@ -20,5 +20,3 @@ import * as CSS from 'csstype'; | ||
}): KduElementConstructor<ExtractPropTypes<PropsOptions>>; | ||
export declare function defineCustomElement(options: { | ||
new (...args: any[]): ComponentPublicInstance; | ||
}): KduElementConstructor; | ||
export declare function defineCustomElement<P>(options: DefineComponent<P, any, any, any>): KduElementConstructor<ExtractPropTypes<P>>; | ||
/*! #__NO_SIDE_EFFECTS__ */ | ||
@@ -108,7 +106,15 @@ export declare const defineSSRCustomElement: typeof defineCustomElement; | ||
*/ | ||
export declare const withModifiers: (fn: Function, modifiers: string[]) => (event: Event, ...args: unknown[]) => any; | ||
export declare const withModifiers: <T extends (event: Event, ...args: unknown[]) => any>(fn: T & { | ||
_withMods?: { | ||
[key: string]: T; | ||
} | undefined; | ||
}, modifiers: string[]) => T; | ||
/** | ||
* @private | ||
*/ | ||
export declare const withKeys: (fn: Function, modifiers: string[]) => (event: KeyboardEvent) => any; | ||
export declare const withKeys: <T extends (event: KeyboardEvent) => any>(fn: T & { | ||
_withKeys?: { | ||
[k: string]: T; | ||
} | undefined; | ||
}, modifiers: string[]) => T; | ||
@@ -276,3 +282,3 @@ declare const kShowOldKey: unique symbol; | ||
*/ | ||
'aria-relevant'?: 'additions' | 'additions text' | 'all' | 'removals' | 'text'; | ||
'aria-relevant'?: 'additions' | 'additions removals' | 'additions text' | 'all' | 'removals' | 'removals additions' | 'removals text' | 'text' | 'text additions' | 'text removals'; | ||
/** Indicates that user input is required on the element before a form may be submitted. */ | ||
@@ -321,3 +327,3 @@ 'aria-required'?: Booleanish; | ||
} | ||
export type StyleValue = string | CSSProperties | Array<StyleValue>; | ||
export type StyleValue = false | null | undefined | string | CSSProperties | Array<StyleValue>; | ||
export interface HTMLAttributes extends AriaAttributes, EventHandlers<Events> { | ||
@@ -328,3 +334,3 @@ innerHTML?: string; | ||
accesskey?: string; | ||
contenteditable?: Booleanish | 'inherit'; | ||
contenteditable?: Booleanish | 'inherit' | 'plaintext-only'; | ||
contextmenu?: string; | ||
@@ -419,3 +425,3 @@ dir?: string; | ||
type?: 'submit' | 'reset' | 'button'; | ||
value?: string | string[] | number; | ||
value?: string | ReadonlyArray<string> | number; | ||
} | ||
@@ -434,6 +440,7 @@ export interface CanvasHTMLAttributes extends HTMLAttributes { | ||
export interface DataHTMLAttributes extends HTMLAttributes { | ||
value?: string | string[] | number; | ||
value?: string | ReadonlyArray<string> | number; | ||
} | ||
export interface DetailsHTMLAttributes extends HTMLAttributes { | ||
open?: Booleanish; | ||
onToggle?: Event; | ||
} | ||
@@ -475,5 +482,8 @@ export interface DelHTMLAttributes extends HTMLAttributes { | ||
allowtransparency?: Booleanish; | ||
/** @deprecated */ | ||
frameborder?: Numberish; | ||
height?: Numberish; | ||
/** @deprecated */ | ||
marginheight?: Numberish; | ||
/** @deprecated */ | ||
marginwidth?: Numberish; | ||
@@ -483,2 +493,3 @@ name?: string; | ||
sandbox?: string; | ||
/** @deprecated */ | ||
scrolling?: string; | ||
@@ -495,2 +506,3 @@ seamless?: Booleanish; | ||
height?: Numberish; | ||
loading?: 'eager' | 'lazy'; | ||
referrerpolicy?: HTMLAttributeReferrerPolicy; | ||
@@ -502,3 +514,2 @@ sizes?: string; | ||
width?: Numberish; | ||
loading?: 'lazy' | 'eager'; | ||
} | ||
@@ -519,2 +530,3 @@ export interface InsHTMLAttributes extends HTMLAttributes { | ||
disabled?: Booleanish; | ||
enterKeyHint?: 'enter' | 'done' | 'go' | 'next' | 'previous' | 'search' | 'send'; | ||
form?: string; | ||
@@ -560,3 +572,3 @@ formaction?: string; | ||
export interface LiHTMLAttributes extends HTMLAttributes { | ||
value?: string | string[] | number; | ||
value?: string | ReadonlyArray<string> | number; | ||
} | ||
@@ -574,2 +586,3 @@ export interface LinkHTMLAttributes extends HTMLAttributes { | ||
type?: string; | ||
charset?: string; | ||
} | ||
@@ -607,3 +620,3 @@ export interface MapHTMLAttributes extends HTMLAttributes { | ||
optimum?: Numberish; | ||
value?: string | string[] | number; | ||
value?: string | ReadonlyArray<string> | number; | ||
} | ||
@@ -646,10 +659,11 @@ export interface QuoteHTMLAttributes extends HTMLAttributes { | ||
name?: string; | ||
value?: string | string[] | number; | ||
value?: string | ReadonlyArray<string> | number; | ||
} | ||
export interface ProgressHTMLAttributes extends HTMLAttributes { | ||
max?: Numberish; | ||
value?: string | string[] | number; | ||
value?: string | ReadonlyArray<string> | number; | ||
} | ||
export interface ScriptHTMLAttributes extends HTMLAttributes { | ||
async?: Booleanish; | ||
/** @deprecated */ | ||
charset?: string; | ||
@@ -693,2 +707,3 @@ crossorigin?: string; | ||
summary?: string; | ||
width?: Numberish; | ||
} | ||
@@ -709,3 +724,3 @@ export interface TextareaHTMLAttributes extends HTMLAttributes { | ||
rows?: Numberish; | ||
value?: string | string[] | number; | ||
value?: string | ReadonlyArray<string> | number; | ||
wrap?: string; | ||
@@ -719,2 +734,5 @@ } | ||
scope?: string; | ||
abbr?: string; | ||
height?: Numberish; | ||
width?: Numberish; | ||
valign?: 'top' | 'middle' | 'bottom' | 'baseline'; | ||
@@ -728,2 +746,3 @@ } | ||
scope?: string; | ||
abbr?: string; | ||
} | ||
@@ -746,2 +765,3 @@ export interface TimeHTMLAttributes extends HTMLAttributes { | ||
disablePictureInPicture?: Booleanish; | ||
disableRemotePlayback?: Booleanish; | ||
} | ||
@@ -789,2 +809,3 @@ export interface WebViewHTMLAttributes extends HTMLAttributes { | ||
tabindex?: Numberish; | ||
crossOrigin?: 'anonymous' | 'use-credentials' | ''; | ||
'accent-height'?: Numberish; | ||
@@ -1020,2 +1041,3 @@ accumulate?: 'none' | 'sum'; | ||
xmlns?: string; | ||
xmlnsXlink?: string; | ||
y1?: Numberish; | ||
@@ -1022,0 +1044,0 @@ y2?: Numberish; |
@@ -1,2 +0,2 @@ | ||
import { h, BaseTransition, BaseTransitionPropsValidators, assertNumber, warn, camelize, callWithAsyncErrorHandling, defineComponent, nextTick, createKNode, getCurrentInstance, watchPostEffect, onMounted, onUnmounted, Fragment, Static, useTransitionState, onUpdated, toRaw, getTransitionRawChildren, setTransitionHooks, resolveTransitionHooks, isRuntimeOnly, createRenderer, createHydrationRenderer } from '@kdujs/runtime-core'; | ||
import { h, BaseTransition, BaseTransitionPropsValidators, assertNumber, getCurrentInstance, warn, watchPostEffect, onMounted, onUnmounted, Fragment, Static, camelize, callWithAsyncErrorHandling, defineComponent, nextTick, createKNode, useTransitionState, onUpdated, toRaw, getTransitionRawChildren, setTransitionHooks, resolveTransitionHooks, isRuntimeOnly, createRenderer, createHydrationRenderer } from '@kdujs/runtime-core'; | ||
export * from '@kdujs/runtime-core'; | ||
@@ -402,2 +402,65 @@ import { extend, isObject, toNumber, isArray, isString, hyphenate, capitalize, isSpecialBooleanAttr, includeBooleanAttr, isOn, isModelListener, isFunction, camelize as camelize$1, EMPTY_OBJ, looseToNumber, looseIndexOf, isSet, looseEqual, invokeArrayFns, isHTMLTag, isSVGTag } from '@kdujs/shared'; | ||
const CSS_VAR_TEXT = Symbol(!!(process.env.NODE_ENV !== "production") ? "CSS_VAR_TEXT" : ""); | ||
function useCssVars(getter) { | ||
const instance = getCurrentInstance(); | ||
if (!instance) { | ||
!!(process.env.NODE_ENV !== "production") && warn(`useCssVars is called without current active component instance.`); | ||
return; | ||
} | ||
const updateTeleports = instance.ut = (vars = getter(instance.proxy)) => { | ||
Array.from( | ||
document.querySelectorAll(`[data-k-owner="${instance.uid}"]`) | ||
).forEach((node) => setVarsOnNode(node, vars)); | ||
}; | ||
const setVars = () => { | ||
const vars = getter(instance.proxy); | ||
setVarsOnKNode(instance.subTree, vars); | ||
updateTeleports(vars); | ||
}; | ||
watchPostEffect(setVars); | ||
onMounted(() => { | ||
const ob = new MutationObserver(setVars); | ||
ob.observe(instance.subTree.el.parentNode, { childList: true }); | ||
onUnmounted(() => ob.disconnect()); | ||
}); | ||
} | ||
function setVarsOnKNode(knode, vars) { | ||
if (knode.shapeFlag & 128) { | ||
const suspense = knode.suspense; | ||
knode = suspense.activeBranch; | ||
if (suspense.pendingBranch && !suspense.isHydrating) { | ||
suspense.effects.push(() => { | ||
setVarsOnKNode(suspense.activeBranch, vars); | ||
}); | ||
} | ||
} | ||
while (knode.component) { | ||
knode = knode.component.subTree; | ||
} | ||
if (knode.shapeFlag & 1 && knode.el) { | ||
setVarsOnNode(knode.el, vars); | ||
} else if (knode.type === Fragment) { | ||
knode.children.forEach((c) => setVarsOnKNode(c, vars)); | ||
} else if (knode.type === Static) { | ||
let { el, anchor } = knode; | ||
while (el) { | ||
setVarsOnNode(el, vars); | ||
if (el === anchor) | ||
break; | ||
el = el.nextSibling; | ||
} | ||
} | ||
} | ||
function setVarsOnNode(el, vars) { | ||
if (el.nodeType === 1) { | ||
const style = el.style; | ||
let cssText = ""; | ||
for (const key in vars) { | ||
style.setProperty(`--${key}`, vars[key]); | ||
cssText += `--${key}: ${vars[key]};`; | ||
} | ||
style[CSS_VAR_TEXT] = cssText; | ||
} | ||
} | ||
function patchStyle(el, prev, next) { | ||
@@ -421,2 +484,6 @@ const style = el.style; | ||
if (prev !== next) { | ||
const cssVarText = style[CSS_VAR_TEXT]; | ||
if (cssVarText) { | ||
next += ";" + cssVarText; | ||
} | ||
style.cssText = next; | ||
@@ -621,3 +688,4 @@ } | ||
const nativeOnRE = /^on[a-z]/; | ||
const isNativeOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // lowercase letter | ||
key.charCodeAt(2) > 96 && key.charCodeAt(2) < 123; | ||
const patchProp = (el, key, prevValue, nextValue, isSVG = false, prevChildren, parentComponent, parentSuspense, unmountChildren) => { | ||
@@ -656,3 +724,3 @@ if (key === "class") { | ||
} | ||
if (key in el && nativeOnRE.test(key) && isFunction(value)) { | ||
if (key in el && isNativeOn(key) && isFunction(value)) { | ||
return true; | ||
@@ -674,3 +742,9 @@ } | ||
} | ||
if (nativeOnRE.test(key) && isString(value)) { | ||
if (key === "width" || key === "height") { | ||
const tag = el.tagName; | ||
if (tag === "IMG" || tag === "VIDEO" || tag === "CANVAS" || tag === "SOURCE") { | ||
return false; | ||
} | ||
} | ||
if (isNativeOn(key) && isString(value)) { | ||
return false; | ||
@@ -924,61 +998,2 @@ } | ||
function useCssVars(getter) { | ||
const instance = getCurrentInstance(); | ||
if (!instance) { | ||
!!(process.env.NODE_ENV !== "production") && warn(`useCssVars is called without current active component instance.`); | ||
return; | ||
} | ||
const updateTeleports = instance.ut = (vars = getter(instance.proxy)) => { | ||
Array.from( | ||
document.querySelectorAll(`[data-k-owner="${instance.uid}"]`) | ||
).forEach((node) => setVarsOnNode(node, vars)); | ||
}; | ||
const setVars = () => { | ||
const vars = getter(instance.proxy); | ||
setVarsOnKNode(instance.subTree, vars); | ||
updateTeleports(vars); | ||
}; | ||
watchPostEffect(setVars); | ||
onMounted(() => { | ||
const ob = new MutationObserver(setVars); | ||
ob.observe(instance.subTree.el.parentNode, { childList: true }); | ||
onUnmounted(() => ob.disconnect()); | ||
}); | ||
} | ||
function setVarsOnKNode(knode, vars) { | ||
if (knode.shapeFlag & 128) { | ||
const suspense = knode.suspense; | ||
knode = suspense.activeBranch; | ||
if (suspense.pendingBranch && !suspense.isHydrating) { | ||
suspense.effects.push(() => { | ||
setVarsOnKNode(suspense.activeBranch, vars); | ||
}); | ||
} | ||
} | ||
while (knode.component) { | ||
knode = knode.component.subTree; | ||
} | ||
if (knode.shapeFlag & 1 && knode.el) { | ||
setVarsOnNode(knode.el, vars); | ||
} else if (knode.type === Fragment) { | ||
knode.children.forEach((c) => setVarsOnKNode(c, vars)); | ||
} else if (knode.type === Static) { | ||
let { el, anchor } = knode; | ||
while (el) { | ||
setVarsOnNode(el, vars); | ||
if (el === anchor) | ||
break; | ||
el = el.nextSibling; | ||
} | ||
} | ||
} | ||
function setVarsOnNode(el, vars) { | ||
if (el.nodeType === 1) { | ||
const style = el.style; | ||
for (const key in vars) { | ||
style.setProperty(`--${key}`, vars[key]); | ||
} | ||
} | ||
} | ||
const positionMap = /* @__PURE__ */ new WeakMap(); | ||
@@ -1158,2 +1173,7 @@ const newPositionMap = /* @__PURE__ */ new WeakMap(); | ||
return; | ||
const elValue = number || el.type === "number" ? looseToNumber(el.value) : el.value; | ||
const newValue = value == null ? "" : value; | ||
if (elValue === newValue) { | ||
return; | ||
} | ||
if (document.activeElement === el && el.type !== "range") { | ||
@@ -1163,13 +1183,7 @@ if (lazy) { | ||
} | ||
if (trim && el.value.trim() === value) { | ||
if (trim && el.value.trim() === newValue) { | ||
return; | ||
} | ||
if ((number || el.type === "number") && looseToNumber(el.value) === value) { | ||
return; | ||
} | ||
} | ||
const newValue = value == null ? "" : value; | ||
if (el.value !== newValue) { | ||
el.value = newValue; | ||
} | ||
el.value = newValue; | ||
} | ||
@@ -1394,3 +1408,5 @@ }; | ||
const withModifiers = (fn, modifiers) => { | ||
return (event, ...args) => { | ||
const cache = fn._withMods || (fn._withMods = {}); | ||
const cacheKey = modifiers.join("."); | ||
return cache[cacheKey] || (cache[cacheKey] = (event, ...args) => { | ||
for (let i = 0; i < modifiers.length; i++) { | ||
@@ -1402,3 +1418,3 @@ const guard = modifierGuards[modifiers[i]]; | ||
return fn(event, ...args); | ||
}; | ||
}); | ||
}; | ||
@@ -1415,3 +1431,5 @@ const keyNames = { | ||
const withKeys = (fn, modifiers) => { | ||
return (event) => { | ||
const cache = fn._withKeys || (fn._withKeys = {}); | ||
const cacheKey = modifiers.join("."); | ||
return cache[cacheKey] || (cache[cacheKey] = (event) => { | ||
if (!("key" in event)) { | ||
@@ -1424,3 +1442,3 @@ return; | ||
} | ||
}; | ||
}); | ||
}; | ||
@@ -1508,3 +1526,3 @@ | ||
- For kdu-cli: see https://kdujs-cli.web.app/guide/webpack.html#modifying-options-of-a-loader | ||
- For wite: pass it via @witejs/plugin-kdu options.`; | ||
- For lahm: pass it via @lahmjs/plugin-kdu options.`; | ||
Object.defineProperty(app.config, "compilerOptions", { | ||
@@ -1511,0 +1529,0 @@ get() { |
{ | ||
"name": "@kdujs/runtime-dom-canary", | ||
"version": "3.20240603.0-minor.0", | ||
"version": "3.20240603.0", | ||
"description": "@kdujs/runtime-dom", | ||
@@ -38,6 +38,6 @@ "main": "index.js", | ||
"dependencies": { | ||
"@kdujs/shared": "npm:@kdujs/shared-canary@3.20240603.0-minor.0", | ||
"@kdujs/runtime-core": "npm:@kdujs/runtime-core-canary@3.20240603.0-minor.0", | ||
"csstype": "^3.1.2" | ||
"@kdujs/shared": "npm:@kdujs/shared-canary@3.20240603.0", | ||
"@kdujs/runtime-core": "npm:@kdujs/runtime-core-canary@3.20240603.0", | ||
"csstype": "^3.1.3" | ||
} | ||
} |
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
999639
27701
1
18
+ Added@kdujs/reactivity-canary@3.20240603.0(transitive)
+ Added@kdujs/runtime-core-canary@3.20240603.0(transitive)
+ Added@kdujs/shared-canary@3.20240603.0(transitive)
- Removed@kdujs/reactivity-canary@3.20240603.0-minor.0(transitive)
- Removed@kdujs/runtime-core-canary@3.20240603.0-minor.0(transitive)
- Removed@kdujs/shared-canary@3.20240603.0-minor.0(transitive)
Updated@kdujs/runtime-core@npm:@kdujs/runtime-core-canary@3.20240603.0
Updatedcsstype@^3.1.3