@destyler/shared
Advanced tools
Comparing version 0.0.1-beta.9 to 0.0.1-beta.10
@@ -1,5 +0,50 @@ | ||
import { Ref, ComponentPublicInstance, VNode, WatchOptionsBase, ComputedRef, WritableComputedRef, WatchSource, ComputedGetter, WritableComputedOptions } from 'vue'; | ||
import { ExtractPropTypes, Ref, ComponentPublicInstance, VNode, WatchOptionsBase, ComputedRef, WritableComputedRef, WatchSource, ComputedGetter, WritableComputedOptions, ToRef } from 'vue'; | ||
declare const isNumber: (v: any) => v is number; | ||
declare function noop(): void; | ||
type RemoveReadonly<T> = { | ||
-readonly [key in keyof T]: T[key]; | ||
}; | ||
type ExtractPublicPropTypes<T> = Omit<Partial<RemoveReadonly<ExtractPropTypes<T>>>, Extract<keyof T, `internal${string}`>>; | ||
type ExtractInternalPropTypes<T> = Partial<ExtractPropTypes<T>>; | ||
declare const clamp: (n: number, min: number, max: number) => number; | ||
type DataOrientation = 'vertical' | 'horizontal'; | ||
type Direction = 'ltr' | 'rtl'; | ||
type Type = 'single' | 'multiple'; | ||
type ArrowKeyOptions = 'horizontal' | 'vertical' | 'both'; | ||
interface Measurable { | ||
getBoundingClientRect(): DOMRect; | ||
} | ||
type CheckedState = boolean | 'indeterminate'; | ||
declare const ITEM_NAME = "MenuItem"; | ||
declare const ITEM_SELECT = "menu.itemSelect"; | ||
declare const SELECTION_KEYS: string[]; | ||
declare const FIRST_KEYS: string[]; | ||
declare const LAST_KEYS: string[]; | ||
declare const FIRST_LAST_KEYS: string[]; | ||
declare const SUB_OPEN_KEYS: Record<Direction, string[]>; | ||
declare const SUB_CLOSE_KEYS: Record<Direction, string[]>; | ||
declare function getOpenState(open: boolean): "open" | "closed"; | ||
declare function isIndeterminate(checked?: CheckedState): checked is 'indeterminate'; | ||
declare function getCheckedState(checked: CheckedState): "indeterminate" | "checked" | "unchecked"; | ||
declare function focusFirst(candidates: HTMLElement[]): void; | ||
interface Point { | ||
x: number; | ||
y: number; | ||
} | ||
type Polygon = Point[]; | ||
type Side = 'left' | 'right'; | ||
interface GraceIntent { | ||
area: Polygon; | ||
side: Side; | ||
} | ||
declare function isPointInPolygon(point: Point, polygon: Polygon): boolean; | ||
declare function isPointerInGraceArea(event: PointerEvent, area?: Polygon): boolean; | ||
declare function isMouseEvent(event: PointerEvent): boolean; | ||
/** | ||
@@ -127,7 +172,16 @@ * Checks whether a given VNode is a render-vialble element. | ||
type DataOrientation = 'vertical' | 'horizontal'; | ||
type Direction = 'ltr' | 'rtl'; | ||
type Type = 'single' | 'multiple'; | ||
type ArrowKeyOptions = 'horizontal' | 'vertical' | 'both'; | ||
/** | ||
* Normalize value/ref/getter to `ref` or `computed`. | ||
*/ | ||
declare function toRef<T>(r: () => T): Readonly<Ref<T>>; | ||
declare function toRef<T>(r: ComputedRef<T>): ComputedRef<T>; | ||
declare function toRef<T>(r: MaybeRefOrGetter<T>): Ref<T>; | ||
declare function toRef<T>(r: T): Ref<T>; | ||
declare function toRef<T extends object, K extends keyof T>(object: T, key: K): ToRef<T[K]>; | ||
declare function toRef<T extends object, K extends keyof T>(object: T, key: K, defaultValue: T[K]): ToRef<Exclude<T[K], undefined>>; | ||
/** | ||
* @deprecated use `toRef` instead | ||
*/ | ||
declare const resolveRef: typeof toRef; | ||
export { type AnyFn, type ArrowKeyOptions, type ComputedRefWithControl, type ComputedWithControlRefExtra, type DataOrientation, type Direction, type Fn, type MaybeComputedElementRef, type MaybeElement, type MaybeElementRef, type MaybeRef, type MaybeRefOrGetter, type Stoppable, type Type, type UnRefElementReturn, type VueInstance, type WritableComputedRefWithControl, computedEager, computedWithControl, computedWithControl as controlledComputed, createContext, createGlobalState, computedEager as eagerComputed, getScrollParent, handleAndDispatchCustomEvent, isClient, isDef, isDocument, isNumber, isValidVNodeElement, refAutoReset, renderSlotFragments, resolveUnref, toValue, tryOnScopeDispose, unrefElement, unwrapElement }; | ||
export { type AnyFn, type ArrowKeyOptions, type CheckedState, type ComputedRefWithControl, type ComputedWithControlRefExtra, type DataOrientation, type Direction, type ExtractInternalPropTypes, type ExtractPublicPropTypes, FIRST_KEYS, FIRST_LAST_KEYS, type Fn, type GraceIntent, ITEM_NAME, ITEM_SELECT, LAST_KEYS, type MaybeComputedElementRef, type MaybeElement, type MaybeElementRef, type MaybeRef, type MaybeRefOrGetter, type Measurable, type Point, type Polygon, SELECTION_KEYS, SUB_CLOSE_KEYS, SUB_OPEN_KEYS, type Side, type Stoppable, type Type, type UnRefElementReturn, type VueInstance, type WritableComputedRefWithControl, clamp, computedEager, computedWithControl, computedWithControl as controlledComputed, createContext, createGlobalState, computedEager as eagerComputed, focusFirst, getCheckedState, getOpenState, getScrollParent, handleAndDispatchCustomEvent, isClient, isDef, isDocument, isIndeterminate, isMouseEvent, isNumber, isPointInPolygon, isPointerInGraceArea, isValidVNodeElement, noop, refAutoReset, renderSlotFragments, resolveRef, resolveUnref, toRef, toValue, tryOnScopeDispose, unrefElement, unwrapElement }; |
{ | ||
"name": "@destyler/shared", | ||
"version": "0.0.1-beta.9", | ||
"version": "0.0.1-beta.10", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "author": "Elone Hoo <elonehoo@gmail.com>", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
40755
691