@tempots/dom 19.3.1 → 20.0.0
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/dom/dom-context.d.ts +0 -1
- package/dom/ssr.d.ts +0 -1
- package/index.cjs +1 -1
- package/index.d.ts +0 -1
- package/index.js +274 -310
- package/package.json +1 -1
- package/renderable/async.d.ts +0 -1
- package/renderable/attribute.d.ts +0 -1
- package/renderable/bind.d.ts +0 -1
- package/renderable/conjunction.d.ts +0 -1
- package/renderable/consumers.d.ts +0 -1
- package/renderable/domnode.d.ts +0 -1
- package/renderable/element.d.ts +0 -1
- package/renderable/empty.d.ts +0 -1
- package/renderable/ensure.d.ts +0 -1
- package/renderable/foreach.d.ts +0 -1
- package/renderable/fragment.d.ts +0 -1
- package/renderable/handler.d.ts +0 -1
- package/renderable/map-signal.d.ts +0 -1
- package/renderable/not-empty.d.ts +0 -1
- package/renderable/onctx.d.ts +0 -1
- package/renderable/oneof.d.ts +0 -1
- package/renderable/onmount.d.ts +0 -1
- package/renderable/onunmount.d.ts +0 -1
- package/renderable/portal.d.ts +0 -1
- package/renderable/providers.d.ts +0 -1
- package/renderable/render.d.ts +0 -1
- package/renderable/repeat.d.ts +0 -1
- package/renderable/style.d.ts +0 -1
- package/renderable/task.d.ts +0 -1
- package/renderable/text.d.ts +0 -1
- package/renderable/when.d.ts +0 -1
- package/std/signal-utils.d.ts +0 -1
- package/std/signal.d.ts +6 -3
- package/types/domain.d.ts +0 -1
- package/dom/animatable.d.ts +0 -79
- package/dom/handle-anchor-click.d.ts +0 -25
package/package.json
CHANGED
package/renderable/async.d.ts
CHANGED
package/renderable/bind.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Prop } from '../std/signal';
|
|
2
2
|
import { Renderable } from '../types/domain';
|
|
3
3
|
import { on } from './handler';
|
|
4
|
-
|
|
5
4
|
/**
|
|
6
5
|
* Binds a `Date` property to an input element. The binding is two-way.
|
|
7
6
|
* Changes to the input element will update the property but will only be
|
package/renderable/domnode.d.ts
CHANGED
package/renderable/element.d.ts
CHANGED
package/renderable/empty.d.ts
CHANGED
package/renderable/ensure.d.ts
CHANGED
package/renderable/foreach.d.ts
CHANGED
package/renderable/fragment.d.ts
CHANGED
package/renderable/handler.d.ts
CHANGED
package/renderable/onctx.d.ts
CHANGED
package/renderable/oneof.d.ts
CHANGED
package/renderable/onmount.d.ts
CHANGED
package/renderable/portal.d.ts
CHANGED
package/renderable/render.d.ts
CHANGED
package/renderable/repeat.d.ts
CHANGED
package/renderable/style.d.ts
CHANGED
package/renderable/task.d.ts
CHANGED
package/renderable/text.d.ts
CHANGED
package/renderable/when.d.ts
CHANGED
package/std/signal-utils.d.ts
CHANGED
package/std/signal.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Value } from '../types/domain';
|
|
2
|
-
|
|
3
2
|
/**
|
|
4
3
|
* Represents any type of signal.
|
|
5
4
|
* It can be a Signal, Prop, or Computed.
|
|
@@ -190,10 +189,14 @@ export declare class Signal<T> {
|
|
|
190
189
|
*/
|
|
191
190
|
readonly at: <K extends keyof T>(key: K) => Signal<T[K]>;
|
|
192
191
|
/**
|
|
193
|
-
*
|
|
192
|
+
* @internal
|
|
193
|
+
*/
|
|
194
|
+
private _$;
|
|
195
|
+
/**
|
|
196
|
+
* Represents a collection of signals mapping to each key/field in the wrapped value.
|
|
194
197
|
* @typeParam T - The type of the signals.
|
|
195
198
|
*/
|
|
196
|
-
|
|
199
|
+
get $(): AtGetter<T>;
|
|
197
200
|
readonly filter: (fn: (value: T) => boolean, startValue?: T) => Computed<T>;
|
|
198
201
|
/**
|
|
199
202
|
* Returns a new Computed object that applies the provided mapping function to the value of this Signal,
|
package/types/domain.d.ts
CHANGED
package/dom/animatable.d.ts
DELETED
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
export type AnimatableProps = {
|
|
2
|
-
width?: number;
|
|
3
|
-
maxWidth?: number;
|
|
4
|
-
minWidth?: number;
|
|
5
|
-
height?: number;
|
|
6
|
-
maxHeight?: number;
|
|
7
|
-
minHeight?: number;
|
|
8
|
-
lineHeight?: number;
|
|
9
|
-
opacity?: number;
|
|
10
|
-
top?: number;
|
|
11
|
-
left?: number;
|
|
12
|
-
right?: number;
|
|
13
|
-
bottom?: number;
|
|
14
|
-
padding?: number;
|
|
15
|
-
paddingTop?: number;
|
|
16
|
-
paddingBottom?: number;
|
|
17
|
-
paddingLeft?: number;
|
|
18
|
-
paddingRight?: number;
|
|
19
|
-
margin?: number;
|
|
20
|
-
marginTop?: number;
|
|
21
|
-
marginBottom?: number;
|
|
22
|
-
marginLeft?: number;
|
|
23
|
-
marginRight?: number;
|
|
24
|
-
fontSize?: number;
|
|
25
|
-
letterSpacing?: number;
|
|
26
|
-
color?: string;
|
|
27
|
-
backgroundColor?: string;
|
|
28
|
-
borderColor?: string;
|
|
29
|
-
borderWidth?: number;
|
|
30
|
-
borderRadius?: number;
|
|
31
|
-
boxShadow?: string;
|
|
32
|
-
textShadow?: string;
|
|
33
|
-
outlineWidth?: number;
|
|
34
|
-
outlineColor?: string;
|
|
35
|
-
translateX?: number;
|
|
36
|
-
translateY?: number;
|
|
37
|
-
translateZ?: number;
|
|
38
|
-
rotateX?: number;
|
|
39
|
-
rotateY?: number;
|
|
40
|
-
rotateZ?: number;
|
|
41
|
-
scaleX?: number;
|
|
42
|
-
scaleY?: number;
|
|
43
|
-
scaleZ?: number;
|
|
44
|
-
skewX?: number;
|
|
45
|
-
skewY?: number;
|
|
46
|
-
grayScale?: number;
|
|
47
|
-
sepia?: number;
|
|
48
|
-
saturate?: number;
|
|
49
|
-
hueRotate?: number;
|
|
50
|
-
invert?: number;
|
|
51
|
-
brightness?: number;
|
|
52
|
-
contrast?: number;
|
|
53
|
-
blur?: number;
|
|
54
|
-
};
|
|
55
|
-
export type ColorChannels = [
|
|
56
|
-
number,
|
|
57
|
-
number,
|
|
58
|
-
number,
|
|
59
|
-
number,
|
|
60
|
-
'rgba' | 'hex' | 'hsla'
|
|
61
|
-
];
|
|
62
|
-
export declare const parseColorChannels: (color: string) => ColorChannels;
|
|
63
|
-
export interface BoxShadow {
|
|
64
|
-
inset: boolean;
|
|
65
|
-
x: number;
|
|
66
|
-
y: number;
|
|
67
|
-
blur: number;
|
|
68
|
-
spread: number;
|
|
69
|
-
color: string;
|
|
70
|
-
}
|
|
71
|
-
export declare const colorChannelsToString: (channels: ColorChannels) => string;
|
|
72
|
-
export declare const interpolateColor: (startColor: string, endColor: string) => ((t: number) => string);
|
|
73
|
-
export declare const interpolateShadow: (startShadow: string, endShadow: string) => ((t: number) => string);
|
|
74
|
-
export declare const getComputedAnimatableProp: (styles: CSSStyleDeclaration, key: keyof AnimatableProps) => AnimatableProps[typeof key];
|
|
75
|
-
export declare const getComputedAnimatable: (el: HTMLElement, styles: AnimatableProps) => AnimatableProps;
|
|
76
|
-
export declare const applyAnimatableProp: (el: HTMLElement, key: keyof AnimatableProps, value: AnimatableProps[typeof key]) => void;
|
|
77
|
-
export declare const applyInterpolatedAnimatableProp: (el: HTMLElement, key: keyof AnimatableProps, from: AnimatableProps[typeof key], to: AnimatableProps[typeof key], progress: number) => void;
|
|
78
|
-
export declare const applyInterpolatedAnimatable: (el: HTMLElement, from: AnimatableProps, to: AnimatableProps, progress: number) => void;
|
|
79
|
-
export declare const applyAnimatable: (el: HTMLElement, styles: AnimatableProps) => void;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Options for handling anchor click events.
|
|
3
|
-
* @public
|
|
4
|
-
*/
|
|
5
|
-
export type HandleAnchorClickOptions = {
|
|
6
|
-
/**
|
|
7
|
-
* A boolean indicating whether to check the anchor's href for a file extension.
|
|
8
|
-
*/
|
|
9
|
-
checkExtension?: boolean | string[];
|
|
10
|
-
/**
|
|
11
|
-
* A boolean indicating whether to check if the anchor's href points to an external URL.
|
|
12
|
-
*/
|
|
13
|
-
checkExternalUrl?: boolean;
|
|
14
|
-
};
|
|
15
|
-
/**
|
|
16
|
-
* Handles anchor click events, optionally checking for external URLs and file extensions.
|
|
17
|
-
*
|
|
18
|
-
* @param callback - A function that is called when the anchor click should be handled. The function should return a boolean indicating whether the default anchor click behavior should be prevented.
|
|
19
|
-
* @param options - An optional object with the following properties:
|
|
20
|
-
* - `checkExtension`: A boolean indicating whether to check the anchor's href for a file extension. Defaults to `true`.
|
|
21
|
-
* - `checkExternalUrl`: A boolean indicating whether to check if the anchor's href points to an external URL. Defaults to `true`.
|
|
22
|
-
* @returns A function that handles the anchor click event, calling the provided callback and preventing the default behavior if the callback returns `true`.
|
|
23
|
-
* @public
|
|
24
|
-
*/
|
|
25
|
-
export declare const handleAnchorClick: (callback: () => boolean, { checkExtension, checkExternalUrl, }?: HandleAnchorClickOptions) => (e: MouseEvent) => void;
|