@rotorjs/jpl 0.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.
@@ -0,0 +1,16 @@
1
+ import { JPLProgram } from '@jplorg/jpl';
2
+ import { DashboardReducer, DashboardEngine, DashboardState } from '@rotorjs/dashboards';
3
+ export type JPLVarInitFunction<Reducer extends JPLDashboardReducer = JPLDashboardReducer> = {
4
+ bivarianceHack(reducer: Reducer): unknown;
5
+ }['bivarianceHack'];
6
+ export type JPLDashboardReducerOptions<Reducer extends JPLDashboardReducer = JPLDashboardReducer> = {
7
+ vars?: Record<string, JPLVarInitFunction<Reducer> | unknown>;
8
+ initialState?: DashboardState;
9
+ compare?: (a: DashboardState, b: DashboardState) => boolean;
10
+ };
11
+ export declare class JPLDashboardReducer<Engine extends DashboardEngine = DashboardEngine> extends DashboardReducer<Engine> {
12
+ #private;
13
+ constructor(engine: Engine, program: JPLProgram | string, callback: (state: DashboardState) => void, options?: JPLDashboardReducerOptions);
14
+ getProgram(): Promise<JPLProgram>;
15
+ reduce(prevState: DashboardState): Promise<DashboardState>;
16
+ }
@@ -0,0 +1,6 @@
1
+ import { DashboardEngine, DashboardReducerInit, DashboardState } from '@rotorjs/dashboards';
2
+ import { JPLDashboardReducer, JPLDashboardReducerOptions } from './JPLDashboardReducer';
3
+ export type JPLDashboardReducerInit = {
4
+ src: string;
5
+ };
6
+ export declare function createJPLDashboardReducer(options?: JPLDashboardReducerOptions): (engine: DashboardEngine, init: DashboardReducerInit, callback: (state: DashboardState) => void) => JPLDashboardReducer<DashboardEngine>;
package/dist/main.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ export * from './createJPLDashboardReducer';
2
+ export * from './JPLDashboardReducer';
3
+ export * from './nodes';