Skip to content

Commit 57f4d36

Browse files
committed
Add options for display
1 parent 50aa6c1 commit 57f4d36

15 files changed

Lines changed: 246 additions & 59 deletions

dist/hyperapp-devtools.es.js

Lines changed: 37 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/hyperapp-devtools.es.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/hyperapp-devtools.js

Lines changed: 60 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/hyperapp-devtools.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/hyperapp-devtools.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/hyperapp-devtools.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/src/api.d.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,15 @@ export interface RuntimeEvent {
3434
level: "info" | "warn" | "error";
3535
}
3636
export declare type PaneDisplay = "fullscreen" | "right" | "bottom";
37+
export declare type ValueDisplay = "state" | "result" | "data";
3738
export interface State {
3839
runs: Runs;
3940
logs: RuntimeEvent[];
4041
paneShown: boolean;
4142
paneDisplay: PaneDisplay;
4243
selectedAction: AppAction | null;
4344
collapseRepeatingActions: boolean;
44-
showFullState: boolean;
45+
valueDisplay: ValueDisplay;
4546
}
4647
export interface ToggleActionPayload {
4748
run: string;
@@ -54,9 +55,9 @@ export interface Actions {
5455
select(state: AppAction | null): any;
5556
showPane(shown: boolean): any;
5657
setPaneDisplay(paneDisplay: PaneDisplay): any;
58+
setValueDisplay(valueDisplay: ValueDisplay): any;
5759
toggleRun(run: string): any;
5860
toggleAction(payload: ToggleActionPayload): any;
5961
toggleCollapseRepeatingActions(): any;
60-
toggleShowFullState(): any;
6162
deleteRun(id: string): any;
6263
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import "./DebuggerOptions.scss";
2+
import { State, Actions } from "../api";
3+
export interface DebuggerOptionsProps {
4+
state: State;
5+
actions: Actions;
6+
}
7+
export declare function DebuggerOptions(props: DebuggerOptionsProps): JSX.Element;

examples/hyperapp-devtools.js

Lines changed: 60 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/actions.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,12 +152,12 @@ export const actions: ActionsType<api.State, api.Actions> = {
152152
setPaneDisplay: (paneDisplay: api.PaneDisplay) => {
153153
return { paneDisplay }
154154
},
155+
setValueDisplay: (valueDisplay: api.ValueDisplay) => {
156+
return { valueDisplay }
157+
},
155158
toggleCollapseRepeatingActions: () => state => {
156159
return { collapseRepeatingActions: !state.collapseRepeatingActions }
157160
},
158-
toggleShowFullState: () => state => {
159-
return { showFullState: !state.showFullState }
160-
},
161161
deleteRun: (id: string) => state => {
162162
const runs = { ...state.runs }
163163
delete runs[id]

0 commit comments

Comments
 (0)