@petit-kit/scoped 0.0.6-beta.1 → 0.0.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/README.md +154 -151
- package/package.json +11 -11
- package/dist/index.cjs +0 -2
- package/dist/index.cjs.map +0 -1
- package/dist/index.d.ts +0 -643
- package/dist/index.d.ts.map +0 -1
- package/dist/plugins/content/index.d.ts +0 -1
- package/dist/plugins/content/index.d.ts.map +0 -1
- package/dist/plugins/device/index.d.ts +0 -8
- package/dist/plugins/device/index.d.ts.map +0 -1
- package/dist/plugins/index.d.ts +0 -11
- package/dist/plugins/index.d.ts.map +0 -1
- package/dist/plugins/inview/index.d.ts +0 -63
- package/dist/plugins/inview/index.d.ts.map +0 -1
- package/dist/plugins/lenis/index.d.ts +0 -37
- package/dist/plugins/lenis/index.d.ts.map +0 -1
- package/dist/plugins/lerp/index.d.ts +0 -42
- package/dist/plugins/lerp/index.d.ts.map +0 -1
- package/dist/plugins/morph/index.d.ts +0 -92
- package/dist/plugins/morph/index.d.ts.map +0 -1
- package/dist/plugins/mouse/index.d.ts +0 -91
- package/dist/plugins/mouse/index.d.ts.map +0 -1
- package/dist/plugins/pointer/index.d.ts +0 -59
- package/dist/plugins/pointer/index.d.ts.map +0 -1
- package/dist/plugins/spring/index.d.ts +0 -42
- package/dist/plugins/spring/index.d.ts.map +0 -1
- package/dist/plugins/timer/index.d.ts +0 -82
- package/dist/plugins/timer/index.d.ts.map +0 -1
- package/dist/plugins/window/index.d.ts +0 -14
- package/dist/plugins/window/index.d.ts.map +0 -1
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import type { ComponentPlugin } from '../../index';
|
|
2
|
-
/**
|
|
3
|
-
* In-view handler signature.
|
|
4
|
-
*
|
|
5
|
-
* @example
|
|
6
|
-
* ```ts
|
|
7
|
-
* const handler: InViewHandler = (isInView, entry) => {
|
|
8
|
-
* if (isInView) entry.target.classList.add("is-in");
|
|
9
|
-
* };
|
|
10
|
-
* ```
|
|
11
|
-
*/
|
|
12
|
-
export type InViewHandler = (isInView: boolean, entry: IntersectionObserverEntry) => void;
|
|
13
|
-
/**
|
|
14
|
-
* Options for IntersectionObserver plus an immediate callback toggle.
|
|
15
|
-
*
|
|
16
|
-
* `immediate` controls whether the first observer callback is skipped.
|
|
17
|
-
*/
|
|
18
|
-
export type InViewOptions = IntersectionObserverInit & {
|
|
19
|
-
immediate?: boolean;
|
|
20
|
-
};
|
|
21
|
-
/**
|
|
22
|
-
* In-view plugin controls.
|
|
23
|
-
*
|
|
24
|
-
* @example
|
|
25
|
-
* ```ts
|
|
26
|
-
* import { inViewPlugin } from "@/lib/plugins/inview";
|
|
27
|
-
*
|
|
28
|
-
* define(
|
|
29
|
-
* "c-example",
|
|
30
|
-
* { plugins: [inViewPlugin()] },
|
|
31
|
-
* ({ onInView }) => {
|
|
32
|
-
* onInView((isInView) => {
|
|
33
|
-
* console.log("host in view:", isInView);
|
|
34
|
-
* });
|
|
35
|
-
* return () => "<div>...</div>";
|
|
36
|
-
* }
|
|
37
|
-
* );
|
|
38
|
-
* ```
|
|
39
|
-
*/
|
|
40
|
-
export type InViewControls = {
|
|
41
|
-
/**
|
|
42
|
-
* Observe the component host element.
|
|
43
|
-
*/
|
|
44
|
-
onInView: (handler: InViewHandler, options?: InViewOptions) => () => void;
|
|
45
|
-
/**
|
|
46
|
-
* Observe a specific element (ref or any Element).
|
|
47
|
-
*/
|
|
48
|
-
observeInView: (element: Element, handler: InViewHandler, options?: InViewOptions) => () => void;
|
|
49
|
-
};
|
|
50
|
-
/**
|
|
51
|
-
* In-view plugin based on IntersectionObserver.
|
|
52
|
-
*
|
|
53
|
-
* @example
|
|
54
|
-
* ```ts
|
|
55
|
-
* const { observeInView } = inViewPlugin().extend(ctx, host);
|
|
56
|
-
* observeInView(el, (isInView) => {
|
|
57
|
-
* el.toggleAttribute("data-inview", isInView);
|
|
58
|
-
* }, { rootMargin: "0px 0px -20% 0px" });
|
|
59
|
-
* ```
|
|
60
|
-
*/
|
|
61
|
-
declare const inViewPlugin: () => ComponentPlugin<InViewControls>;
|
|
62
|
-
export { inViewPlugin, type InViewControls as InViewPluginControls, type InViewHandler as InViewPluginHandler, type InViewOptions as InViewPluginOptions, };
|
|
63
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/inview/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAwB,MAAM,aAAa,CAAC;AAEzE;;;;;;;;;GASG;AACH,MAAM,MAAM,aAAa,GAAG,CAC1B,QAAQ,EAAE,OAAO,EACjB,KAAK,EAAE,yBAAyB,KAC7B,IAAI,CAAC;AAEV;;;;GAIG;AACH,MAAM,MAAM,aAAa,GAAG,wBAAwB,GAAG;IACrD,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B;;OAEG;IACH,QAAQ,EAAE,CAAC,OAAO,EAAE,aAAa,EAAE,OAAO,CAAC,EAAE,aAAa,KAAK,MAAM,IAAI,CAAC;IAC1E;;OAEG;IACH,aAAa,EAAE,CACb,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,aAAa,EACtB,OAAO,CAAC,EAAE,aAAa,KACpB,MAAM,IAAI,CAAC;CACjB,CAAC;AAEF;;;;;;;;;;GAUG;AACH,QAAA,MAAM,YAAY,QAAO,eAAe,CAAC,cAAc,CA4DrD,CAAC;AAEH,OAAO,EACL,YAAY,EACZ,KAAK,cAAc,IAAI,oBAAoB,EAC3C,KAAK,aAAa,IAAI,mBAAmB,EACzC,KAAK,aAAa,IAAI,mBAAmB,GAC1C,CAAC"}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import type { ComponentPlugin } from '../../index';
|
|
2
|
-
/**
|
|
3
|
-
* Minimal Lenis instance interface used by this plugin.
|
|
4
|
-
* Compatible with the Lenis smooth scroll library (lenis package).
|
|
5
|
-
*/
|
|
6
|
-
export interface LenisInstance {
|
|
7
|
-
on(event: 'scroll', handler: (event: LenisScrollEvent) => void): void;
|
|
8
|
-
off?(event: 'scroll', handler: (event: LenisScrollEvent) => void): void;
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* Lenis scroll event payload.
|
|
12
|
-
* Emitted on each scroll update with current scroll state.
|
|
13
|
-
*/
|
|
14
|
-
export interface LenisScrollEvent {
|
|
15
|
-
scroll: number;
|
|
16
|
-
limit: number;
|
|
17
|
-
velocity: number;
|
|
18
|
-
direction: number;
|
|
19
|
-
progress: number;
|
|
20
|
-
}
|
|
21
|
-
/** Handler called on each Lenis scroll event. */
|
|
22
|
-
export type LenisScrollHandler = (event: LenisScrollEvent) => void;
|
|
23
|
-
/** Controls exposed to components when the lenis plugin is used. */
|
|
24
|
-
export type LenisControls = {
|
|
25
|
-
/** Subscribe to Lenis scroll events. Returns an unsubscribe function. */
|
|
26
|
-
onLenisScroll: (handler: LenisScrollHandler) => () => void;
|
|
27
|
-
};
|
|
28
|
-
/** Factory that returns the current Lenis instance (may be null before init). */
|
|
29
|
-
export type LenisGetter = () => LenisInstance | null | undefined;
|
|
30
|
-
/**
|
|
31
|
-
* Plugin that wires components to Lenis smooth scroll events.
|
|
32
|
-
*
|
|
33
|
-
* @param getLenis - Function that returns the current Lenis instance
|
|
34
|
-
* @returns A component plugin providing onLenisScroll
|
|
35
|
-
*/
|
|
36
|
-
export declare const lenisPlugin: (getLenis: LenisGetter) => ComponentPlugin<LenisControls>;
|
|
37
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/lenis/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAwB,MAAM,aAAa,CAAC;AAEzE;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC5B,EAAE,CAAC,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,KAAK,EAAE,gBAAgB,KAAK,IAAI,GAAG,IAAI,CAAC;IACtE,GAAG,CAAC,CAAC,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,KAAK,EAAE,gBAAgB,KAAK,IAAI,GAAG,IAAI,CAAC;CACzE;AAED;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,iDAAiD;AACjD,MAAM,MAAM,kBAAkB,GAAG,CAAC,KAAK,EAAE,gBAAgB,KAAK,IAAI,CAAC;AAEnE,oEAAoE;AACpE,MAAM,MAAM,aAAa,GAAG;IAC1B,yEAAyE;IACzE,aAAa,EAAE,CAAC,OAAO,EAAE,kBAAkB,KAAK,MAAM,IAAI,CAAC;CAC5D,CAAC;AAEF,iFAAiF;AACjF,MAAM,MAAM,WAAW,GAAG,MAAM,aAAa,GAAG,IAAI,GAAG,SAAS,CAAC;AAEjE;;;;;GAKG;AACH,eAAO,MAAM,WAAW,GACtB,UAAU,WAAW,KACpB,eAAe,CAAC,aAAa,CAyC9B,CAAC"}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import type { ComponentPlugin } from '../../index';
|
|
2
|
-
import { lerp } from '@petit-kit/animate';
|
|
3
|
-
type LerpValue = number | number[] | Record<string, number>;
|
|
4
|
-
type LerpOptions<T extends LerpValue = number> = Parameters<typeof lerp<T>>[0];
|
|
5
|
-
type LerpController<T extends LerpValue = number> = ReturnType<typeof lerp<T>>;
|
|
6
|
-
export type LerpControls = {
|
|
7
|
-
/**
|
|
8
|
-
* Create an independent lerp controller.
|
|
9
|
-
*
|
|
10
|
-
* @example
|
|
11
|
-
* const lerpX = createLerp({ from: 0, to: 1, lerp: 0.2 });
|
|
12
|
-
* lerpX.setTarget(1);
|
|
13
|
-
*/
|
|
14
|
-
createLerp: <T extends LerpValue>(options?: LerpOptions<T>) => LerpController<T>;
|
|
15
|
-
/**
|
|
16
|
-
* Drive a lerp controller on the scoped timer RAF.
|
|
17
|
-
*
|
|
18
|
-
* @example
|
|
19
|
-
* const opacity = createLerp({ from: 0, to: 1 });
|
|
20
|
-
* const stop = runLerp(opacity, (value) => {
|
|
21
|
-
* host.updateState({ opacity: value });
|
|
22
|
-
* });
|
|
23
|
-
*/
|
|
24
|
-
runLerp: <T extends LerpValue>(controller: LerpController<T>, onUpdate: (value: T, controller: LerpController<T>) => void, options?: {
|
|
25
|
-
fps?: number;
|
|
26
|
-
immediate?: boolean;
|
|
27
|
-
stopWhenDone?: boolean;
|
|
28
|
-
}) => () => void;
|
|
29
|
-
};
|
|
30
|
-
/**
|
|
31
|
-
* Scoped lerp plugin built on top of the timer plugin.
|
|
32
|
-
*
|
|
33
|
-
* @example
|
|
34
|
-
* define("my-component", { plugins: [lerpPlugin()] }, ({ createLerp, runLerp, host }) => {
|
|
35
|
-
* const opacity = createLerp({ from: 0, to: 1 });
|
|
36
|
-
* runLerp(opacity, (value) => host.updateState({ opacity: value }));
|
|
37
|
-
* return () => `<div bind:style="opacity: {opacity}"></div>`;
|
|
38
|
-
* });
|
|
39
|
-
*/
|
|
40
|
-
export declare const lerpPlugin: () => ComponentPlugin<LerpControls>;
|
|
41
|
-
export {};
|
|
42
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/lerp/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAwB,MAAM,aAAa,CAAC;AACzE,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAI1C,KAAK,SAAS,GAAG,MAAM,GAAG,MAAM,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC5D,KAAK,WAAW,CAAC,CAAC,SAAS,SAAS,GAAG,MAAM,IAAI,UAAU,CAAC,OAAO,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAC/E,KAAK,cAAc,CAAC,CAAC,SAAS,SAAS,GAAG,MAAM,IAAI,UAAU,CAAC,OAAO,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;AAE/E,MAAM,MAAM,YAAY,GAAG;IACzB;;;;;;OAMG;IACH,UAAU,EAAE,CAAC,CAAC,SAAS,SAAS,EAC9B,OAAO,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC,KACrB,cAAc,CAAC,CAAC,CAAC,CAAC;IACvB;;;;;;;;OAQG;IACH,OAAO,EAAE,CAAC,CAAC,SAAS,SAAS,EAC3B,UAAU,EAAE,cAAc,CAAC,CAAC,CAAC,EAC7B,QAAQ,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,UAAU,EAAE,cAAc,CAAC,CAAC,CAAC,KAAK,IAAI,EAC3D,OAAO,CAAC,EAAE;QAAE,GAAG,CAAC,EAAE,MAAM,CAAC;QAAC,SAAS,CAAC,EAAE,OAAO,CAAC;QAAC,YAAY,CAAC,EAAE,OAAO,CAAA;KAAE,KACpE,MAAM,IAAI,CAAC;CACjB,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,UAAU,QAAO,eAAe,CAAC,YAAY,CAwExD,CAAC"}
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
import type { ComponentPlugin } from '../../index';
|
|
2
|
-
/**
|
|
3
|
-
* Minimal Idiomorph API used by this plugin.
|
|
4
|
-
* Compatible with the idiomorph package.
|
|
5
|
-
*/
|
|
6
|
-
export interface IdiomorphAPI {
|
|
7
|
-
morph(target: Element, html: string, options?: Record<string, unknown>): void;
|
|
8
|
-
}
|
|
9
|
-
/** Factory that returns the Idiomorph instance to use for morphing. */
|
|
10
|
-
export type IdiomorphGetter = () => IdiomorphAPI;
|
|
11
|
-
/**
|
|
12
|
-
* Options for the morph plugin.
|
|
13
|
-
*/
|
|
14
|
-
export type MorphOptions = {
|
|
15
|
-
/**
|
|
16
|
-
* Preserve the value of the focused input element during morph.
|
|
17
|
-
* @default true
|
|
18
|
-
*/
|
|
19
|
-
ignoreActiveValue?: boolean;
|
|
20
|
-
/**
|
|
21
|
-
* Additional callbacks forwarded to Idiomorph.
|
|
22
|
-
*
|
|
23
|
-
* @see https://github.com/bigskysoftware/idiomorph#callbacks
|
|
24
|
-
*/
|
|
25
|
-
callbacks?: Record<string, (...args: any[]) => any>;
|
|
26
|
-
};
|
|
27
|
-
/**
|
|
28
|
-
* Morph plugin controls.
|
|
29
|
-
*
|
|
30
|
-
* @example
|
|
31
|
-
* ```ts
|
|
32
|
-
* import { Idiomorph } from 'idiomorph';
|
|
33
|
-
* import { morphPlugin } from "@/lib/plugins/morph";
|
|
34
|
-
*
|
|
35
|
-
* define(
|
|
36
|
-
* "c-search",
|
|
37
|
-
* { plugins: [morphPlugin(() => Idiomorph)] },
|
|
38
|
-
* ({ morph, state, actions, host }) => {
|
|
39
|
-
* state.query = "";
|
|
40
|
-
* actions.onInput = (e: Event) => {
|
|
41
|
-
* host.setState({ query: (e.target as HTMLInputElement).value });
|
|
42
|
-
* };
|
|
43
|
-
* return () => `
|
|
44
|
-
* <input type="text" on:input="onInput" />
|
|
45
|
-
* <p>Results for: {query}</p>
|
|
46
|
-
* `;
|
|
47
|
-
* }
|
|
48
|
-
* );
|
|
49
|
-
* ```
|
|
50
|
-
*/
|
|
51
|
-
export type MorphControls = {
|
|
52
|
-
/**
|
|
53
|
-
* Morph the component root with the given HTML string.
|
|
54
|
-
*
|
|
55
|
-
* @example
|
|
56
|
-
* ```ts
|
|
57
|
-
* morph('<div class="updated">New content</div>');
|
|
58
|
-
* ```
|
|
59
|
-
*/
|
|
60
|
-
morph: (html: string) => void;
|
|
61
|
-
};
|
|
62
|
-
/**
|
|
63
|
-
* DOM morphing plugin powered by Idiomorph.
|
|
64
|
-
*
|
|
65
|
-
* Intercepts `innerHTML` writes on the component root so that every
|
|
66
|
-
* re-render after the initial mount patches the existing DOM in place
|
|
67
|
-
* instead of replacing it. This preserves focus, selection, scroll
|
|
68
|
-
* position and running CSS animations across re-renders.
|
|
69
|
-
*
|
|
70
|
-
* The first render always uses native `innerHTML` for speed since
|
|
71
|
-
* there is no existing DOM state to preserve.
|
|
72
|
-
*
|
|
73
|
-
* @example Basic usage
|
|
74
|
-
* ```ts
|
|
75
|
-
* import { Idiomorph } from 'idiomorph';
|
|
76
|
-
*
|
|
77
|
-
* define("c-counter", { plugins: [morphPlugin(() => Idiomorph)] }, ({ state, actions, host }) => {
|
|
78
|
-
* state.count = 0;
|
|
79
|
-
* actions.increment = () => host.setState({ count: state.count + 1 });
|
|
80
|
-
* return () => `<button on:click="increment">Count: {count}</button>`;
|
|
81
|
-
* });
|
|
82
|
-
* ```
|
|
83
|
-
*
|
|
84
|
-
* @example With options
|
|
85
|
-
* ```ts
|
|
86
|
-
* define("c-editor", { plugins: [morphPlugin(() => Idiomorph, { ignoreActiveValue: false })] }, ({ host }) => {
|
|
87
|
-
* return () => `<textarea></textarea>`;
|
|
88
|
-
* });
|
|
89
|
-
* ```
|
|
90
|
-
*/
|
|
91
|
-
export declare const morphPlugin: (getIdiomorph: IdiomorphGetter, options?: MorphOptions) => ComponentPlugin<MorphControls>;
|
|
92
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/morph/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAwB,MAAM,aAAa,CAAC;AAEzE;;;GAGG;AACH,MAAM,WAAW,YAAY;IAC3B,KAAK,CAAC,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;CAC/E;AAED,uEAAuE;AACvE,MAAM,MAAM,eAAe,GAAG,MAAM,YAAY,CAAC;AAEjD;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB;;;OAGG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAC,CAAC;CACrD,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B;;;;;;;OAOG;IACH,KAAK,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CAC/B,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,eAAO,MAAM,WAAW,GACtB,cAAc,eAAe,EAC7B,UAAS,YAAiB,KACzB,eAAe,CAAC,aAAa,CAkD9B,CAAC"}
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import type { ComponentPlugin } from '../../index';
|
|
2
|
-
/** Handler for mouse move, down, and up events. Receives client coordinates and the native event. */
|
|
3
|
-
export type MouseEventHandler = (x: number, y: number, event: MouseEvent) => void;
|
|
4
|
-
/** Handler for wheel events. Receives client coordinates, scroll delta, and the native event. */
|
|
5
|
-
export type MouseWheelHandler = (x: number, y: number, deltaY: number, event: WheelEvent) => void;
|
|
6
|
-
/** Unsubscribe function returned by each mouse listener. Call to remove the listener. */
|
|
7
|
-
export type MouseUnsubscribe = () => void;
|
|
8
|
-
/**
|
|
9
|
-
* Mouse plugin controls. All listeners are bound to `window` and cleaned up on component destroy.
|
|
10
|
-
*
|
|
11
|
-
* @example
|
|
12
|
-
* ```ts
|
|
13
|
-
* define("cursor-follower", { plugins: [mousePlugin()] }, ({ onMouseMove, host }) => {
|
|
14
|
-
* const stop = onMouseMove((x, y) => {
|
|
15
|
-
* host.updateState({ cursorX: x, cursorY: y });
|
|
16
|
-
* });
|
|
17
|
-
* return () => `<div style="left: {cursorX}px; top: {cursorY}px">...</div>`;
|
|
18
|
-
* });
|
|
19
|
-
* ```
|
|
20
|
-
*
|
|
21
|
-
* @example
|
|
22
|
-
* ```ts
|
|
23
|
-
* // Parallax on scroll
|
|
24
|
-
* onMouseWheel((x, y, deltaY) => {
|
|
25
|
-
* parallaxOffset += deltaY * 0.1;
|
|
26
|
-
* });
|
|
27
|
-
* ```
|
|
28
|
-
*/
|
|
29
|
-
export type MouseControls = {
|
|
30
|
-
/**
|
|
31
|
-
* Subscribe to global mouse move. Returns an unsubscribe function.
|
|
32
|
-
*
|
|
33
|
-
* @example
|
|
34
|
-
* ```ts
|
|
35
|
-
* const stop = onMouseMove((x, y) => {
|
|
36
|
-
* console.log(`cursor at ${x}, ${y}`);
|
|
37
|
-
* });
|
|
38
|
-
* // later: stop();
|
|
39
|
-
* ```
|
|
40
|
-
*/
|
|
41
|
-
onMouseMove: (handler: MouseEventHandler) => MouseUnsubscribe;
|
|
42
|
-
/**
|
|
43
|
-
* Subscribe to global mouse down. Returns an unsubscribe function.
|
|
44
|
-
*
|
|
45
|
-
* @example
|
|
46
|
-
* ```ts
|
|
47
|
-
* onMouseDown((x, y, e) => {
|
|
48
|
-
* if (e.button === 0) startDrag(x, y);
|
|
49
|
-
* });
|
|
50
|
-
* ```
|
|
51
|
-
*/
|
|
52
|
-
onMouseDown: (handler: MouseEventHandler) => MouseUnsubscribe;
|
|
53
|
-
/**
|
|
54
|
-
* Subscribe to global mouse up. Returns an unsubscribe function.
|
|
55
|
-
*
|
|
56
|
-
* @example
|
|
57
|
-
* ```ts
|
|
58
|
-
* onMouseUp(() => endDrag());
|
|
59
|
-
* ```
|
|
60
|
-
*/
|
|
61
|
-
onMouseUp: (handler: MouseEventHandler) => MouseUnsubscribe;
|
|
62
|
-
/**
|
|
63
|
-
* Subscribe to global wheel events. Returns an unsubscribe function.
|
|
64
|
-
*
|
|
65
|
-
* @example
|
|
66
|
-
* ```ts
|
|
67
|
-
* onMouseWheel((x, y, deltaY) => {
|
|
68
|
-
* zoomLevel += deltaY > 0 ? -0.1 : 0.1;
|
|
69
|
-
* });
|
|
70
|
-
* ```
|
|
71
|
-
*/
|
|
72
|
-
onMouseWheel: (handler: MouseWheelHandler) => MouseUnsubscribe;
|
|
73
|
-
};
|
|
74
|
-
/**
|
|
75
|
-
* Mouse plugin – global mouse and wheel listeners with automatic cleanup.
|
|
76
|
-
*
|
|
77
|
-
* Listeners are attached to `window`. All subscriptions are removed when the
|
|
78
|
-
* component is destroyed. Safe to use in SSR (no-op when `window` is undefined).
|
|
79
|
-
*
|
|
80
|
-
* @example
|
|
81
|
-
* ```ts
|
|
82
|
-
* define("my-component", { plugins: [mousePlugin()] }, ({ onMouseMove, onMouseDown, onMouseUp }) => {
|
|
83
|
-
* onMouseMove((x, y) => updateCursor(x, y));
|
|
84
|
-
* onMouseDown((x, y, e) => e.button === 0 && startDrag(x, y));
|
|
85
|
-
* onMouseUp(() => endDrag());
|
|
86
|
-
* return () => `<div>...</div>`;
|
|
87
|
-
* });
|
|
88
|
-
* ```
|
|
89
|
-
*/
|
|
90
|
-
export declare const mousePlugin: () => ComponentPlugin<MouseControls>;
|
|
91
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/mouse/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAwB,MAAM,aAAa,CAAC;AAEzE,qGAAqG;AACrG,MAAM,MAAM,iBAAiB,GAAG,CAC9B,CAAC,EAAE,MAAM,EACT,CAAC,EAAE,MAAM,EACT,KAAK,EAAE,UAAU,KACd,IAAI,CAAC;AAEV,iGAAiG;AACjG,MAAM,MAAM,iBAAiB,GAAG,CAC9B,CAAC,EAAE,MAAM,EACT,CAAC,EAAE,MAAM,EACT,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,UAAU,KACd,IAAI,CAAC;AAEV,yFAAyF;AACzF,MAAM,MAAM,gBAAgB,GAAG,MAAM,IAAI,CAAC;AAE1C;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B;;;;;;;;;;OAUG;IACH,WAAW,EAAE,CAAC,OAAO,EAAE,iBAAiB,KAAK,gBAAgB,CAAC;IAC9D;;;;;;;;;OASG;IACH,WAAW,EAAE,CAAC,OAAO,EAAE,iBAAiB,KAAK,gBAAgB,CAAC;IAC9D;;;;;;;OAOG;IACH,SAAS,EAAE,CAAC,OAAO,EAAE,iBAAiB,KAAK,gBAAgB,CAAC;IAC5D;;;;;;;;;OASG;IACH,YAAY,EAAE,CAAC,OAAO,EAAE,iBAAiB,KAAK,gBAAgB,CAAC;CAChE,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,WAAW,QAAO,eAAe,CAAC,aAAa,CAyE1D,CAAC"}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import type { ComponentPlugin } from '../../index';
|
|
2
|
-
import { type MouseControls } from '../mouse';
|
|
3
|
-
/** Smoothed pointer position with velocity. */
|
|
4
|
-
export type PointerPosition = {
|
|
5
|
-
x: number;
|
|
6
|
-
y: number;
|
|
7
|
-
v: number;
|
|
8
|
-
};
|
|
9
|
-
/** Handler for smoothed pointer move. Receives position and velocity magnitude. */
|
|
10
|
-
export type PointerMoveHandler = (pos: PointerPosition) => void;
|
|
11
|
-
/**
|
|
12
|
-
* Pointer plugin controls. Combines raw mouse input with spring-smoothed position and velocity.
|
|
13
|
-
*
|
|
14
|
-
* @example
|
|
15
|
-
* ```ts
|
|
16
|
-
* define("cursor-follower", { plugins: [pointerPlugin()] }, ({ onPointerMove }) => {
|
|
17
|
-
* onPointerMove(({ x, y, v }) => {
|
|
18
|
-
* host.updateState({ cursorX: x, cursorY: y, speed: v });
|
|
19
|
-
* });
|
|
20
|
-
* return () => `<div style="left: {cursorX}px; top: {cursorY}px">...</div>`;
|
|
21
|
-
* });
|
|
22
|
-
* ```
|
|
23
|
-
*/
|
|
24
|
-
export type PointerControls = {
|
|
25
|
-
/**
|
|
26
|
-
* Subscribe to spring-smoothed pointer movement. Fires each frame when position changes.
|
|
27
|
-
* Receives position (x, y) and velocity magnitude (v). Uses RAF internally.
|
|
28
|
-
*
|
|
29
|
-
* @example
|
|
30
|
-
* ```ts
|
|
31
|
-
* onPointerMove(({ x, y, v }) => {
|
|
32
|
-
* // Smooth position for cursor-following
|
|
33
|
-
* host.updateState({ posX: x, posY: y });
|
|
34
|
-
* // Use v for hover intensity or transition speed
|
|
35
|
-
* if (v > 5) setActive(true);
|
|
36
|
-
* });
|
|
37
|
-
* ```
|
|
38
|
-
*/
|
|
39
|
-
onPointerMove: (handler: PointerMoveHandler) => void;
|
|
40
|
-
/** Raw mouse move subscription (from mouse plugin). See MouseControls. */
|
|
41
|
-
onMouseMove: MouseControls['onMouseMove'];
|
|
42
|
-
};
|
|
43
|
-
/**
|
|
44
|
-
* Pointer plugin – spring-smoothed cursor position and velocity.
|
|
45
|
-
*
|
|
46
|
-
* Wraps the mouse plugin to provide smoothed pointer coordinates via spring physics.
|
|
47
|
-
* `onPointerMove` fires on RAF when the smoothed position changes, and includes
|
|
48
|
-
* velocity magnitude for effects (e.g., intensity, transitions).
|
|
49
|
-
*
|
|
50
|
-
* @example
|
|
51
|
-
* ```ts
|
|
52
|
-
* define("my-component", { plugins: [pointerPlugin()] }, ({ onPointerMove, onMouseMove }) => {
|
|
53
|
-
* onPointerMove(({ x, y, v }) => host.updateState({ cx: x, cy: y, velocity: v }));
|
|
54
|
-
* return () => `<div style="transform: translate({cx}px, {cy}px)">...</div>`;
|
|
55
|
-
* });
|
|
56
|
-
* ```
|
|
57
|
-
*/
|
|
58
|
-
export declare const pointerPlugin: () => ComponentPlugin<PointerControls>;
|
|
59
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/pointer/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAwB,MAAM,aAAa,CAAC;AACzE,OAAO,EAAe,KAAK,aAAa,EAAE,MAAM,UAAU,CAAC;AAW3D,+CAA+C;AAC/C,MAAM,MAAM,eAAe,GAAG;IAC5B,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAEF,mFAAmF;AACnF,MAAM,MAAM,kBAAkB,GAAG,CAAC,GAAG,EAAE,eAAe,KAAK,IAAI,CAAC;AAEhE;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B;;;;;;;;;;;;;OAaG;IACH,aAAa,EAAE,CAAC,OAAO,EAAE,kBAAkB,KAAK,IAAI,CAAC;IACrD,0EAA0E;IAC1E,WAAW,EAAE,aAAa,CAAC,aAAa,CAAC,CAAC;CAC3C,CAAC;AAoCF;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,aAAa,QAAO,eAAe,CAAC,eAAe,CAsD9D,CAAC"}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import type { ComponentPlugin } from '../../index';
|
|
2
|
-
import { spring } from '@petit-kit/animate';
|
|
3
|
-
type SpringValue = number | number[] | Record<string, number>;
|
|
4
|
-
type SpringOptions<T extends SpringValue = number> = Parameters<typeof spring<T>>[0];
|
|
5
|
-
type SpringController<T extends SpringValue = number> = ReturnType<typeof spring<T>>;
|
|
6
|
-
export type SpringControls = {
|
|
7
|
-
/**
|
|
8
|
-
* Create an independent spring controller.
|
|
9
|
-
*
|
|
10
|
-
* @example
|
|
11
|
-
* const springX = createSpring({ from: 0, to: 1, stiffness: 200 });
|
|
12
|
-
* springX.setTarget(1);
|
|
13
|
-
*/
|
|
14
|
-
createSpring: <T extends SpringValue>(options?: SpringOptions<T>) => SpringController<T>;
|
|
15
|
-
/**
|
|
16
|
-
* Drive a spring controller on the scoped timer RAF.
|
|
17
|
-
*
|
|
18
|
-
* @example
|
|
19
|
-
* const scale = createSpring({ from: 0, to: 1 });
|
|
20
|
-
* const stop = runSpring(scale, (value) => {
|
|
21
|
-
* host.updateState({ scale: value });
|
|
22
|
-
* });
|
|
23
|
-
*/
|
|
24
|
-
runSpring: <T extends SpringValue>(controller: SpringController<T>, onUpdate: (value: T, controller: SpringController<T>) => void, options?: {
|
|
25
|
-
fps?: number;
|
|
26
|
-
immediate?: boolean;
|
|
27
|
-
stopWhenDone?: boolean;
|
|
28
|
-
}) => () => void;
|
|
29
|
-
};
|
|
30
|
-
/**
|
|
31
|
-
* Scoped spring plugin built on top of the timer plugin.
|
|
32
|
-
*
|
|
33
|
-
* @example
|
|
34
|
-
* define("my-component", { plugins: [springPlugin()] }, ({ createSpring, runSpring, host }) => {
|
|
35
|
-
* const scale = createSpring({ from: 0.8, to: 1 });
|
|
36
|
-
* runSpring(scale, (value) => host.updateState({ scale: value }));
|
|
37
|
-
* return () => `<div bind:style="transform: scale({scale})"></div>`;
|
|
38
|
-
* });
|
|
39
|
-
*/
|
|
40
|
-
export declare const springPlugin: () => ComponentPlugin<SpringControls>;
|
|
41
|
-
export {};
|
|
42
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/spring/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAwB,MAAM,aAAa,CAAC;AACzE,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAI5C,KAAK,WAAW,GAAG,MAAM,GAAG,MAAM,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC9D,KAAK,aAAa,CAAC,CAAC,SAAS,WAAW,GAAG,MAAM,IAAI,UAAU,CAC7D,OAAO,MAAM,CAAC,CAAC,CAAC,CACjB,CAAC,CAAC,CAAC,CAAC;AACL,KAAK,gBAAgB,CAAC,CAAC,SAAS,WAAW,GAAG,MAAM,IAAI,UAAU,CAChE,OAAO,MAAM,CAAC,CAAC,CAAC,CACjB,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAC3B;;;;;;OAMG;IACH,YAAY,EAAE,CAAC,CAAC,SAAS,WAAW,EAClC,OAAO,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC,KACvB,gBAAgB,CAAC,CAAC,CAAC,CAAC;IACzB;;;;;;;;OAQG;IACH,SAAS,EAAE,CAAC,CAAC,SAAS,WAAW,EAC/B,UAAU,EAAE,gBAAgB,CAAC,CAAC,CAAC,EAC/B,QAAQ,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,UAAU,EAAE,gBAAgB,CAAC,CAAC,CAAC,KAAK,IAAI,EAC7D,OAAO,CAAC,EAAE;QAAE,GAAG,CAAC,EAAE,MAAM,CAAC;QAAC,SAAS,CAAC,EAAE,OAAO,CAAC;QAAC,YAAY,CAAC,EAAE,OAAO,CAAA;KAAE,KACpE,MAAM,IAAI,CAAC;CACjB,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,YAAY,QAAO,eAAe,CAAC,cAAc,CAyE5D,CAAC"}
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import type { ComponentPlugin } from '../../index';
|
|
2
|
-
/** Handle returned by `timer.setTimeout`. Use with `clearTimeout` if needed before destroy. */
|
|
3
|
-
export type TimerTimeoutHandle = ReturnType<typeof setTimeout>;
|
|
4
|
-
/** Handle returned by `timer.setInterval`. Use with `clearInterval` if needed before destroy. */
|
|
5
|
-
export type TimerIntervalHandle = ReturnType<typeof setInterval>;
|
|
6
|
-
/** Callback for `timer.raf`. Receives high-res timestamp and time since last frame (ms). */
|
|
7
|
-
export type TimerRafCallback = (time: number, deltaTime: number) => void;
|
|
8
|
-
/** Unsubscribe function returned by `timer.raf`. Call to stop the animation loop. */
|
|
9
|
-
export type TimerRafUnsubscribe = () => void;
|
|
10
|
-
/**
|
|
11
|
-
* Timer plugin controls. All timeouts, intervals, and RAF loops are cleared on component destroy.
|
|
12
|
-
*
|
|
13
|
-
* @example
|
|
14
|
-
* ```ts
|
|
15
|
-
* define("delayed-tooltip", { plugins: [timerPlugin()] }, ({ timer }) => {
|
|
16
|
-
* timer.setTimeout(() => showTooltip(), 500);
|
|
17
|
-
* timer.raf((time, dt) => updateAnimation(dt));
|
|
18
|
-
* return () => `<div>...</div>`;
|
|
19
|
-
* });
|
|
20
|
-
* ```
|
|
21
|
-
*/
|
|
22
|
-
export type TimerControls = {
|
|
23
|
-
/**
|
|
24
|
-
* Scoped `setTimeout`. Cleared automatically on component destroy.
|
|
25
|
-
*
|
|
26
|
-
* @example
|
|
27
|
-
* ```ts
|
|
28
|
-
* const id = timer.setTimeout(() => doSomething(), 1000);
|
|
29
|
-
* // or with args: timer.setTimeout((a, b) => log(a, b), 500, "hello", 42);
|
|
30
|
-
* ```
|
|
31
|
-
*/
|
|
32
|
-
setTimeout: (cb: (...args: unknown[]) => void, delay?: number, ...args: unknown[]) => TimerTimeoutHandle;
|
|
33
|
-
/**
|
|
34
|
-
* Scoped `setInterval`. Cleared automatically on component destroy.
|
|
35
|
-
*
|
|
36
|
-
* @example
|
|
37
|
-
* ```ts
|
|
38
|
-
* timer.setInterval(() => tick(), 1000);
|
|
39
|
-
* ```
|
|
40
|
-
*/
|
|
41
|
-
setInterval: (cb: (...args: unknown[]) => void, delay?: number, ...args: unknown[]) => TimerIntervalHandle;
|
|
42
|
-
/**
|
|
43
|
-
* RequestAnimationFrame loop. Optionally throttle to a target FPS.
|
|
44
|
-
* Returns an unsubscribe function to stop the loop early.
|
|
45
|
-
*
|
|
46
|
-
* @example
|
|
47
|
-
* ```ts
|
|
48
|
-
* const stop = timer.raf((time, deltaTime) => {
|
|
49
|
-
* position += velocity * (deltaTime / 1000);
|
|
50
|
-
* });
|
|
51
|
-
* // later: stop();
|
|
52
|
-
* ```
|
|
53
|
-
*
|
|
54
|
-
* @example
|
|
55
|
-
* ```ts
|
|
56
|
-
* // Throttle to 30 FPS
|
|
57
|
-
* timer.raf((time, dt) => update(dt), 30);
|
|
58
|
-
* ```
|
|
59
|
-
*/
|
|
60
|
-
raf: (cb: TimerRafCallback, fps?: number) => TimerRafUnsubscribe;
|
|
61
|
-
};
|
|
62
|
-
/**
|
|
63
|
-
* Timer plugin – scoped setTimeout, setInterval, and RAF with automatic cleanup.
|
|
64
|
-
*
|
|
65
|
-
* All timers are cleared when the component is destroyed. The RAF loop supports
|
|
66
|
-
* optional FPS throttling for performance-sensitive animations.
|
|
67
|
-
*
|
|
68
|
-
* @example
|
|
69
|
-
* ```ts
|
|
70
|
-
* define("my-component", { plugins: [timerPlugin()] }, ({ timer }) => {
|
|
71
|
-
* timer.setTimeout(() => host.updateState({ ready: true }), 2000);
|
|
72
|
-
* const stop = timer.raf((time, dt) => {
|
|
73
|
-
* host.updateState({ elapsed: time });
|
|
74
|
-
* });
|
|
75
|
-
* return () => `<div>{elapsed}</div>`;
|
|
76
|
-
* });
|
|
77
|
-
* ```
|
|
78
|
-
*/
|
|
79
|
-
export declare const timerPlugin: () => ComponentPlugin<{
|
|
80
|
-
timer: TimerControls;
|
|
81
|
-
}>;
|
|
82
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/timer/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAwB,MAAM,aAAa,CAAC;AAEzE,+FAA+F;AAC/F,MAAM,MAAM,kBAAkB,GAAG,UAAU,CAAC,OAAO,UAAU,CAAC,CAAC;AAE/D,iGAAiG;AACjG,MAAM,MAAM,mBAAmB,GAAG,UAAU,CAAC,OAAO,WAAW,CAAC,CAAC;AAEjE,4FAA4F;AAC5F,MAAM,MAAM,gBAAgB,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;AAEzE,qFAAqF;AACrF,MAAM,MAAM,mBAAmB,GAAG,MAAM,IAAI,CAAC;AAE7C;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B;;;;;;;;OAQG;IACH,UAAU,EAAE,CACV,EAAE,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,IAAI,EAChC,KAAK,CAAC,EAAE,MAAM,EACd,GAAG,IAAI,EAAE,OAAO,EAAE,KACf,kBAAkB,CAAC;IACxB;;;;;;;OAOG;IACH,WAAW,EAAE,CACX,EAAE,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,IAAI,EAChC,KAAK,CAAC,EAAE,MAAM,EACd,GAAG,IAAI,EAAE,OAAO,EAAE,KACf,mBAAmB,CAAC;IACzB;;;;;;;;;;;;;;;;;OAiBG;IACH,GAAG,EAAE,CAAC,EAAE,EAAE,gBAAgB,EAAE,GAAG,CAAC,EAAE,MAAM,KAAK,mBAAmB,CAAC;CAClE,CAAC;AAEF;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,WAAW,QAAO,eAAe,CAAC;IAAE,KAAK,EAAE,aAAa,CAAA;CAAE,CAyErE,CAAC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { ComponentPlugin } from '../../index';
|
|
2
|
-
export type WindowControls = {
|
|
3
|
-
onViewportResize: (handler: (width: number, height: number, event: UIEvent) => void, options?: {
|
|
4
|
-
immediate?: boolean;
|
|
5
|
-
}) => () => void;
|
|
6
|
-
onWindowResize: (handler: (width: number, height: number, event: UIEvent | ResizeObserverEntry) => void, options?: {
|
|
7
|
-
immediate?: boolean;
|
|
8
|
-
}) => () => void;
|
|
9
|
-
onWindowScroll: (handler: (scrollX: number, scrollY: number, event: Event) => void, options?: {
|
|
10
|
-
immediate?: boolean;
|
|
11
|
-
}) => () => void;
|
|
12
|
-
};
|
|
13
|
-
export declare const windowPlugin: () => ComponentPlugin<WindowControls>;
|
|
14
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/window/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAwB,MAAM,aAAa,CAAC;AAEzE,MAAM,MAAM,cAAc,GAAG;IAO3B,gBAAgB,EAAE,CAChB,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,KAAK,IAAI,EAChE,OAAO,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,OAAO,CAAA;KAAE,KAC9B,MAAM,IAAI,CAAC;IAShB,cAAc,EAAE,CACd,OAAO,EAAE,CACP,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,OAAO,GAAG,mBAAmB,KACjC,IAAI,EACT,OAAO,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,OAAO,CAAA;KAAE,KAC9B,MAAM,IAAI,CAAC;IAQhB,cAAc,EAAE,CACd,OAAO,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,KAAK,IAAI,EACjE,OAAO,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,OAAO,CAAA;KAAE,KAC9B,MAAM,IAAI,CAAC;CACjB,CAAC;AAEF,eAAO,MAAM,YAAY,QAAO,eAAe,CAAC,cAAc,CAuG5D,CAAC"}
|