remove SquiggleEditorWithImportedBindings
This commit is contained in:
parent
48fb634140
commit
4a3c982c57
|
@ -1,53 +0,0 @@
|
||||||
import React from "react";
|
|
||||||
// import { SquiggleEditor } from "./SquiggleEditor";
|
|
||||||
import type { SquiggleEditorProps } from "./SquiggleEditor";
|
|
||||||
// import { runPartial, defaultBindings } from "@quri/squiggle-lang";
|
|
||||||
// import type {
|
|
||||||
// result,
|
|
||||||
// errorValue,
|
|
||||||
// bindings as bindingsType,
|
|
||||||
// } from "@quri/squiggle-lang";
|
|
||||||
|
|
||||||
// function resultDefault(x: result<bindingsType, errorValue>): bindingsType {
|
|
||||||
// switch (x.tag) {
|
|
||||||
// case "Ok":
|
|
||||||
// return x.value;
|
|
||||||
// case "Error":
|
|
||||||
// return defaultBindings;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
export type SquiggleEditorWithImportedBindingsProps = SquiggleEditorProps & {
|
|
||||||
bindingsImportUrl: string;
|
|
||||||
};
|
|
||||||
|
|
||||||
export const SquiggleEditorWithImportedBindings: React.FC<
|
|
||||||
SquiggleEditorWithImportedBindingsProps
|
|
||||||
> = (props) => {
|
|
||||||
return <div>NOT IMPLEMENTED IN 0.4 YET</div>;
|
|
||||||
// const { bindingsImportUrl, ...editorProps } = props;
|
|
||||||
// const [bindingsResult, setBindingsResult] = React.useState({
|
|
||||||
// tag: "Ok",
|
|
||||||
// value: defaultBindings,
|
|
||||||
// } as result<bindingsType, errorValue>);
|
|
||||||
// React.useEffect(() => {
|
|
||||||
// async function retrieveBindings(fileName: string) {
|
|
||||||
// let contents = await fetch(fileName).then((response) => {
|
|
||||||
// return response.text();
|
|
||||||
// });
|
|
||||||
// setBindingsResult(
|
|
||||||
// runPartial(
|
|
||||||
// contents,
|
|
||||||
// editorProps.bindings,
|
|
||||||
// editorProps.environment,
|
|
||||||
// editorProps.jsImports
|
|
||||||
// )
|
|
||||||
// );
|
|
||||||
// }
|
|
||||||
// retrieveBindings(bindingsImportUrl);
|
|
||||||
// }, [bindingsImportUrl]);
|
|
||||||
// const deliveredBindings = resultDefault(bindingsResult);
|
|
||||||
// return (
|
|
||||||
// <SquiggleEditor {...{ ...editorProps, bindings: deliveredBindings }} />
|
|
||||||
// );
|
|
||||||
};
|
|
|
@ -2,4 +2,3 @@ export { SquiggleChart } from "./components/SquiggleChart";
|
||||||
export { SquiggleEditor } from "./components/SquiggleEditor";
|
export { SquiggleEditor } from "./components/SquiggleEditor";
|
||||||
export { SquigglePlayground } from "./components/SquigglePlayground";
|
export { SquigglePlayground } from "./components/SquigglePlayground";
|
||||||
export { SquiggleContainer } from "./components/SquiggleContainer";
|
export { SquiggleContainer } from "./components/SquiggleContainer";
|
||||||
export { SquiggleEditorWithImportedBindings } from "./components/SquiggleEditorWithImportedBindings";
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user