+2
-2
| import { $ } from "./internal/element"; | ||
| import { DomEntity } from "./internal/types"; | ||
| export { DomEntity, ElementClassDescriptor, ElementDescriptor, DOMContent, DomHelper, StyleAccessor, JelEntity, EventEmitterMap } from "./internal/types"; | ||
| export { DomEntity, ElementClassDescriptor, ElementDescriptor, DOMContent, DomHelper, StyleAccessor, JelEntity, EventEmitterMap, EmitterLike, CSSValue } from "./internal/types"; | ||
| export { createEntity } from "./internal/util"; | ||
| export { createEventSource, createEventsSource, interval, timeout, SubjectEmitter, toEventEmitter, type EventEmitter, type EventRecording, type EventRecorder, combineEmitters } from "./internal/emitter"; | ||
| export { createEventSource, createEventsSource, interval, timeout, animationFrames, SubjectEmitter, toEventEmitter, type EventEmitter, type EventRecording, type EventRecorder, combineEmitters } from "./internal/emitter"; | ||
| export { createEventsProxy } from "./internal/proxy"; | ||
@@ -7,0 +7,0 @@ export { $ }; |
+1
-1
| import { $ } from "./internal/element"; | ||
| import { createEventsProxy } from "./internal/proxy"; | ||
| export { createEntity } from "./internal/util"; | ||
| export { createEventSource, createEventsSource, interval, timeout, SubjectEmitter, toEventEmitter, combineEmitters } from "./internal/emitter"; | ||
| export { createEventSource, createEventsSource, interval, timeout, animationFrames, SubjectEmitter, toEventEmitter, combineEmitters } from "./internal/emitter"; | ||
| export { createEventsProxy } from "./internal/proxy"; | ||
@@ -6,0 +6,0 @@ export { $ }; |
@@ -1,4 +0,2 @@ | ||
| import { Dictionary, EmissionSource, EmitterLike, EventHandlerMap, EventSource, Handler, Period } from "./types"; | ||
| export type ListenFunc<T> = (handler: Handler<T>) => UnsubscribeFunc; | ||
| export type UnsubscribeFunc = () => void; | ||
| import { Dictionary, EmissionSource, EmitterLike, EventHandlerMap, EventSource, Handler, ListenFunc, Period, UnsubscribeFunc } from "./types"; | ||
| export declare class EventEmitter<T> { | ||
@@ -211,2 +209,5 @@ protected onListen: ListenFunc<T>; | ||
| export declare function interval(period: Period): EventEmitter<number>; | ||
| /** | ||
| * Emits time deltas from a shared RAF loop | ||
| */ | ||
| export declare const animationFrames: EventEmitter<number>; | ||
@@ -213,0 +214,0 @@ export declare function timeout(ms: number): EventEmitter<void>; |
| import { createEventsProxy } from "./proxy.js"; | ||
| import { isReactiveSource } from "./util"; | ||
| const NOOP = () => { }; | ||
| function periodAsMilliseconds(t) { | ||
@@ -452,2 +451,5 @@ if (typeof t == "number") | ||
| } | ||
| /** | ||
| * Emits time deltas from a shared RAF loop | ||
| */ | ||
| export const animationFrames = (() => { | ||
@@ -458,2 +460,4 @@ const { emit, listen } = createListenable(() => { | ||
| const frame = (time) => { | ||
| if (lastTime === null) | ||
| lastTime = time; | ||
| rafId = requestAnimationFrame(frame); | ||
@@ -463,3 +467,2 @@ const elapsed = time - lastTime; | ||
| }; | ||
| lastTime = performance.now(); | ||
| rafId = requestAnimationFrame(frame); | ||
@@ -466,0 +469,0 @@ return () => cancelAnimationFrame(rafId); |
| import { ClassAccessor } from "./element"; | ||
| import { EventEmitter, ListenFunc, UnsubscribeFunc } from "./emitter"; | ||
| import { EventEmitter } from "./emitter"; | ||
| import { entityDataSymbol } from "./util"; | ||
@@ -8,6 +8,8 @@ export type ElementClassDescriptor = string | Record<string, boolean | EmitterLike<boolean> | undefined> | undefined | ElementClassDescriptor[]; | ||
| export type HTMLTag = keyof HTMLElementTagNameMap; | ||
| export type ListenFunc<T> = (handler: Handler<T>) => UnsubscribeFunc; | ||
| export type UnsubscribeFunc = () => void; | ||
| export type EmitterLike<T> = { | ||
| subscribe: (callback: (value: T) => void) => UnsubscribeFunc; | ||
| subscribe: ListenFunc<T>; | ||
| } | { | ||
| listen: (callback: (value: T) => void) => UnsubscribeFunc; | ||
| listen: ListenFunc<T>; | ||
| }; | ||
@@ -14,0 +16,0 @@ export type EmissionSource<T> = EmitterLike<T> | ListenFunc<T>; |
+1
-1
| { | ||
| "name": "@xtia/jel", | ||
| "version": "0.10.0", | ||
| "version": "0.11.0", | ||
| "repository": { | ||
@@ -5,0 +5,0 @@ "url": "https://github.com/tiadrop/jel-ts", |
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
62202
0.15%1544
0.39%