Files
owncast/build/javascript/node_modules/preact/debug/src/internal.d.ts
dependabot[bot] dab7914eab Bump @justinribeiro/lite-youtube from 0.9.0 to 0.9.1 in /build/javascript (#273)
* Commit updated Javascript packages

* Bump preact from 10.5.4 to 10.5.5 in /build/javascript (#265)

* Trying a new github workflow to install javascript packages

* Bump tailwindcss from 1.9.2 to 1.9.4 in /build/javascript (#266)

Bumps [tailwindcss](https://github.com/tailwindlabs/tailwindcss) from 1.9.2 to 1.9.4.
- [Release notes](https://github.com/tailwindlabs/tailwindcss/releases)
- [Changelog](https://github.com/tailwindlabs/tailwindcss/blob/master/CHANGELOG.md)
- [Commits](https://github.com/tailwindlabs/tailwindcss/compare/v1.9.2...v1.9.4)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Commit updated Javascript packages

* Bump preact from 10.5.4 to 10.5.5 in /build/javascript

Bumps [preact](https://github.com/preactjs/preact) from 10.5.4 to 10.5.5.
- [Release notes](https://github.com/preactjs/preact/releases)
- [Commits](https://github.com/preactjs/preact/compare/10.5.4...10.5.5)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: Gabe Kangas <gabek@real-ity.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Owncast <owncast@owncast.online>

* Bump @justinribeiro/lite-youtube in /build/javascript

Bumps [@justinribeiro/lite-youtube](https://github.com/justinribeiro/lite-youtube) from 0.9.0 to 0.9.1.
- [Release notes](https://github.com/justinribeiro/lite-youtube/releases)
- [Commits](https://github.com/justinribeiro/lite-youtube/commits)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: Owncast <owncast@owncast.online>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Gabe Kangas <gabek@real-ity.com>
2020-10-20 15:15:56 -07:00

83 lines
2.2 KiB
TypeScript

import { Component, PreactElement, VNode, Options } from '../../src/internal';
export { Component, PreactElement, VNode, Options };
export interface DevtoolsInjectOptions {
/** 1 = DEV, 0 = production */
bundleType: 1 | 0;
/** The devtools enable different features for different versions of react */
version: string;
/** Informative string, currently unused in the devtools */
rendererPackageName: string;
/** Find the root dom node of a vnode */
findHostInstanceByFiber(vnode: VNode): HTMLElement | null;
/** Find the closest vnode given a dom node */
findFiberByHostInstance(instance: HTMLElement): VNode | null;
}
export interface DevtoolsUpdater {
setState(objOrFn: any): void;
forceUpdate(): void;
setInState(path: Array<string | number>, value: any): void;
setInProps(path: Array<string | number>, value: any): void;
setInContext(): void;
}
export type NodeType = 'Composite' | 'Native' | 'Wrapper' | 'Text';
export interface DevtoolData {
nodeType: NodeType;
// Component type
type: any;
name: string;
ref: any;
key: string | number;
updater: DevtoolsUpdater | null;
text: string | number | null;
state: any;
props: any;
children: VNode[] | string | number | null;
publicInstance: PreactElement | Text | Component;
memoizedInteractions: any[];
actualDuration: number;
actualStartTime: number;
treeBaseDuration: number;
}
export type EventType =
| 'unmount'
| 'rootCommitted'
| 'root'
| 'mount'
| 'update'
| 'updateProfileTimes';
export interface DevtoolsEvent {
data?: DevtoolData;
internalInstance: VNode;
renderer: string;
type: EventType;
}
export interface DevtoolsHook {
_renderers: Record<string, any>;
_roots: Set<VNode>;
on(ev: string, listener: () => void): void;
emit(ev: string, data?: object): void;
helpers: Record<string, any>;
getFiberRoots(rendererId: string): Set<any>;
inject(config: DevtoolsInjectOptions): string;
onCommitFiberRoot(rendererId: string, root: VNode): void;
onCommitFiberUnmount(rendererId: string, vnode: VNode): void;
}
export interface DevtoolsWindow extends Window {
/**
* If the devtools extension is installed it will inject this object into
* the dom. This hook handles all communications between preact and the
* devtools panel.
*/
__REACT_DEVTOOLS_GLOBAL_HOOK__?: DevtoolsHook;
}