mirror of
https://github.com/agdamsbo/prioritized.grouping.git
synced 2026-06-19 13:57:29 +02:00
first commit
This commit is contained in:
commit
6333bcee61
208 changed files with 413695 additions and 0 deletions
15
docs/shinylive/webr/repl/App.d.ts
vendored
Normal file
15
docs/shinylive/webr/repl/App.d.ts
vendored
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
import { Readline } from 'xterm-readline';
|
||||
import './App.css';
|
||||
export interface TerminalInterface {
|
||||
println: Readline['println'];
|
||||
read: Readline['read'];
|
||||
write: Readline['write'];
|
||||
}
|
||||
export interface FilesInterface {
|
||||
refreshFilesystem: () => Promise<void>;
|
||||
openFileInEditor: (name: string, path: string, readOnly: boolean) => Promise<void>;
|
||||
}
|
||||
export interface PlotInterface {
|
||||
newPlot: () => void;
|
||||
drawImage: (img: ImageBitmap) => void;
|
||||
}
|
||||
26
docs/shinylive/webr/repl/components/Editor.d.ts
vendored
Normal file
26
docs/shinylive/webr/repl/components/Editor.d.ts
vendored
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
import React from 'react';
|
||||
import { WebR } from '../../webR/webr-main';
|
||||
import { EditorState } from '@codemirror/state';
|
||||
import { FilesInterface, TerminalInterface } from '../App';
|
||||
import './Editor.css';
|
||||
export type EditorFile = {
|
||||
name: string;
|
||||
path: string;
|
||||
ref: {
|
||||
editorState: EditorState;
|
||||
scrollTop?: number;
|
||||
scrollLeft?: number;
|
||||
};
|
||||
};
|
||||
export declare function FileTabs({ files, activeFileIdx, setActiveFileIdx, closeFile }: {
|
||||
files: EditorFile[];
|
||||
activeFileIdx: number;
|
||||
setActiveFileIdx: React.Dispatch<React.SetStateAction<number>>;
|
||||
closeFile: (e: React.SyntheticEvent, index: number) => void;
|
||||
}): React.JSX.Element;
|
||||
export declare function Editor({ webR, terminalInterface, filesInterface, }: {
|
||||
webR: WebR;
|
||||
terminalInterface: TerminalInterface;
|
||||
filesInterface: FilesInterface;
|
||||
}): React.JSX.Element;
|
||||
export default Editor;
|
||||
19
docs/shinylive/webr/repl/components/Files.d.ts
vendored
Normal file
19
docs/shinylive/webr/repl/components/Files.d.ts
vendored
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
import React from 'react';
|
||||
import { WebR } from '../../webR/webr-main';
|
||||
import type { FSNode } from '../../webR/webr-main';
|
||||
import { FilesInterface } from '../App';
|
||||
import './Files.css';
|
||||
interface ITreeNode {
|
||||
id: number;
|
||||
name: string;
|
||||
children?: ITreeNode[];
|
||||
metadata?: {
|
||||
[x: string]: string | number | null | undefined;
|
||||
};
|
||||
}
|
||||
export declare function createTreeFromFSNode(fsNode: FSNode): ITreeNode;
|
||||
export declare function Files({ webR, filesInterface, }: {
|
||||
webR: WebR;
|
||||
filesInterface: FilesInterface;
|
||||
}): React.JSX.Element;
|
||||
export default Files;
|
||||
7
docs/shinylive/webr/repl/components/Plot.d.ts
vendored
Normal file
7
docs/shinylive/webr/repl/components/Plot.d.ts
vendored
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
import React from 'react';
|
||||
import './Plot.css';
|
||||
import { PlotInterface } from '../App';
|
||||
export declare function Plot({ plotInterface, }: {
|
||||
plotInterface: PlotInterface;
|
||||
}): React.JSX.Element;
|
||||
export default Plot;
|
||||
9
docs/shinylive/webr/repl/components/Terminal.d.ts
vendored
Normal file
9
docs/shinylive/webr/repl/components/Terminal.d.ts
vendored
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
import React from 'react';
|
||||
import { TerminalInterface } from '../App';
|
||||
import { WebR } from '../../webR/webr-main';
|
||||
import 'xterm/css/xterm.css';
|
||||
export declare function Terminal({ webR, terminalInterface, }: {
|
||||
webR: WebR;
|
||||
terminalInterface: TerminalInterface;
|
||||
}): React.JSX.Element;
|
||||
export default Terminal;
|
||||
11
docs/shinylive/webr/repl/components/utils.d.ts
vendored
Normal file
11
docs/shinylive/webr/repl/components/utils.d.ts
vendored
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
import { Text } from '@codemirror/state';
|
||||
import { EditorView } from '@codemirror/view';
|
||||
export type CursorPosition = {
|
||||
line: number;
|
||||
col: number;
|
||||
};
|
||||
export declare function offsetToPosition(cmDoc: Text, offset: number): CursorPosition;
|
||||
export declare function positionToOffset(cmDoc: Text, pos: CursorPosition): number;
|
||||
export declare function getSelectedText(cmView: EditorView): string;
|
||||
export declare function getCurrentLineText(cmView: EditorView): string;
|
||||
export declare function moveCursorToNextLine(cmView: EditorView): void;
|
||||
Loading…
Add table
Add a link
Reference in a new issue