Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
109 commits
Select commit Hold shift + click to select a range
835d138
add remote control
ThatBatLuna Jul 18, 2023
0ee4d93
mid-rewrite commit
ThatBatLuna Jul 18, 2023
3ec5bfa
fix errors after rework
ThatBatLuna Jul 18, 2023
62ee72d
add input and output adapters
ThatBatLuna Jul 18, 2023
3ecfa6b
Fix some errors
ThatBatLuna Jul 19, 2023
6108f24
Fix signals and Button/Memory node
ThatBatLuna Jul 19, 2023
da9e13c
Add Output Previews
ThatBatLuna Jul 19, 2023
cfe7c1b
Add Graph Node Preview
ThatBatLuna Jul 20, 2023
28bd9a8
Introduce toposort in graph compiler
ThatBatLuna Jul 20, 2023
eeed038
Cycle Detection
ThatBatLuna Jul 20, 2023
7594ec8
independent Outputs for memory node
ThatBatLuna Jul 20, 2023
3c49ef7
Min height for graph display
ThatBatLuna Jul 20, 2023
518c564
draft of interfacebuilder and local data source
ThatBatLuna Jul 23, 2023
64533ec
refactored to seperate iostore and interface store
ThatBatLuna Jul 23, 2023
6c1f1a5
renames and cleanup
ThatBatLuna Jul 23, 2023
c6560a6
publish value changes
ThatBatLuna Jul 23, 2023
73a9feb
draft for remoteSource
ThatBatLuna Jul 24, 2023
bc425fb
Add remote connection manager
ThatBatLuna Jul 27, 2023
4a98830
replaced publish store with state-machine
ThatBatLuna Jul 27, 2023
e9dd95a
add interface editor
ThatBatLuna Jul 27, 2023
eafecda
widgetValueHandle error handling
ThatBatLuna Jul 27, 2023
f309f2e
implement remote value setting
ThatBatLuna Jul 27, 2023
80b30ea
server env variable
ThatBatLuna Jul 27, 2023
cc69f14
remove old remote code
ThatBatLuna Jul 27, 2023
763bf4f
select in inputadapternode
ThatBatLuna Jul 27, 2023
c99b05f
add devtools to stores
ThatBatLuna Jul 27, 2023
3164e0f
style PublishManager
ThatBatLuna Jul 27, 2023
364e895
Style Interface Control
ThatBatLuna Jul 28, 2023
2cf5549
remote connections style
ThatBatLuna Aug 2, 2023
4b46012
Icon Button
ThatBatLuna Aug 2, 2023
39d09bb
Remove InterfaceDisplayStore
ThatBatLuna Aug 2, 2023
007d694
Fixup remote closing error
ThatBatLuna Aug 2, 2023
96ebcea
Fix remote interface sync
ThatBatLuna Aug 2, 2023
9375f97
reduce try-catch to necessary area
ThatBatLuna Aug 2, 2023
d7ea73d
Cleanups
ThatBatLuna Aug 2, 2023
c758697
Edit Interface Names
ThatBatLuna Aug 3, 2023
adda878
RemoteSettings polishing
ThatBatLuna Aug 3, 2023
d702f94
Move tabs and mobile view to router
ThatBatLuna Aug 3, 2023
9d55ec7
use md icons
ThatBatLuna Aug 3, 2023
d2f6354
Fix publish endpoints
ThatBatLuna Aug 3, 2023
7d67a48
Reorder publish
ThatBatLuna Aug 3, 2023
21ca151
Cleanups
ThatBatLuna Aug 3, 2023
014efd4
draft for dynamic type of remote input adapter
ThatBatLuna Aug 3, 2023
8bf09fd
update value types in iovaluestore
ThatBatLuna Aug 3, 2023
4754b54
add names to ioValueStore
ThatBatLuna Aug 3, 2023
3762443
propagate handle type to widgets
ThatBatLuna Aug 4, 2023
dc5568a
Switch widget
ThatBatLuna Aug 4, 2023
2b77a5c
Add signal support for iovalues
ThatBatLuna Aug 4, 2023
2281c75
add signal support for remote control
ThatBatLuna Aug 4, 2023
cc43e49
cude implementation for output adapters
ThatBatLuna Aug 5, 2023
3fff056
basic draft for output adapter
ThatBatLuna Aug 5, 2023
e8a0ae6
Some cleanups to prevent rerenders
ThatBatLuna Aug 6, 2023
641ff69
cleanups and fixes
ThatBatLuna Aug 6, 2023
e641539
remove interfacedisplaystatestore
ThatBatLuna Aug 6, 2023
ae1850f
fix rerender bug in interfacelist
ThatBatLuna Aug 7, 2023
969bd2e
implement useWidgetSignalHandle
ThatBatLuna Aug 7, 2023
0932dd6
Node name editing
ThatBatLuna Aug 7, 2023
8712eb6
cleanups and fixes
ThatBatLuna Aug 7, 2023
da44bdf
Output To Remote Value
ThatBatLuna Aug 7, 2023
f4397bb
RemoteInputFromOutputAdapter
ThatBatLuna Aug 7, 2023
7f09fd6
NumberInput live updates
ThatBatLuna Aug 7, 2023
898eb6d
Blenderlike Math Node
ThatBatLuna Aug 7, 2023
a94abca
Clamp to math node
ThatBatLuna Aug 7, 2023
e9b25ee
ConstantValueNode
ThatBatLuna Aug 7, 2023
285caec
Curve Node
ThatBatLuna Aug 7, 2023
954ba3d
Mix into Math node
ThatBatLuna Aug 7, 2023
276f311
hysteresis node
ThatBatLuna Aug 7, 2023
8a4abbe
reduce viewport rerenders
ThatBatLuna Aug 7, 2023
5642c49
boolean node value preview
ThatBatLuna Aug 7, 2023
d4f02f7
Impulse preview
ThatBatLuna Aug 7, 2023
da5ce22
fix positive wave
ThatBatLuna Aug 7, 2023
cd2716f
Remove Button Node
ThatBatLuna Aug 7, 2023
8b4a842
Comment node
ThatBatLuna Aug 7, 2023
639861b
Edge Detector
ThatBatLuna Aug 7, 2023
2e39417
Fix CommentNode
ThatBatLuna Aug 7, 2023
53089e6
cleanups
ThatBatLuna Aug 12, 2023
5d94851
make pnpm workspace
ThatBatLuna Aug 12, 2023
381883b
extract remotePlugin from app
ThatBatLuna Aug 12, 2023
c840e54
split engine and app
ThatBatLuna Aug 12, 2023
833f0bf
fix reactflow
ThatBatLuna Aug 12, 2023
baae435
introduce beadicontext
ThatBatLuna Aug 12, 2023
0143457
further code splitting and updating remotePlugin
ThatBatLuna Aug 13, 2023
d2af8d5
remove build files
ThatBatLuna Aug 13, 2023
2273212
cleanups
ThatBatLuna Aug 13, 2023
2cc581a
moved stores into storage
ThatBatLuna Aug 13, 2023
b8301a4
Update reactflow
ThatBatLuna Aug 13, 2023
fec7eac
globals for beadicontext
ThatBatLuna Aug 13, 2023
20e86d6
cleanups
ThatBatLuna Aug 13, 2023
6fea701
cleanup
ThatBatLuna Aug 13, 2023
6ae82fe
extract welcome node
ThatBatLuna Aug 13, 2023
51b953b
intiface connectivity
ThatBatLuna Aug 14, 2023
332d555
scalar commands work
ThatBatLuna Aug 14, 2023
ee3d542
fix timer node
ThatBatLuna Aug 14, 2023
531f170
outputadapters have multiple inputs
ThatBatLuna Aug 14, 2023
eecbfdb
send command loop
ThatBatLuna Aug 14, 2023
335e51b
ui for intiface connections
ThatBatLuna Aug 14, 2023
38fea6e
prepare for home-page
ThatBatLuna Aug 14, 2023
b527a29
add home page
ThatBatLuna Aug 14, 2023
36bfc78
move homepageto app
ThatBatLuna Aug 14, 2023
c694e0e
Fix delay node
ThatBatLuna Aug 16, 2023
71d776e
Homepage
ThatBatLuna Aug 16, 2023
ee78eb5
work on privacy
ThatBatLuna Aug 17, 2023
9dacf34
preview value expanded saved within file
ThatBatLuna Aug 18, 2023
811b50a
some simplifications in noderender
ThatBatLuna Aug 18, 2023
52fe708
homepage context
ThatBatLuna Aug 18, 2023
f9eddb7
split beadicontext into beadiinstance
ThatBatLuna Aug 18, 2023
00190ec
separate input/output handles in node data
ThatBatLuna Aug 18, 2023
51dd033
Extract Router to App
ThatBatLuna Aug 18, 2023
2b24427
Implemented draft for files
ThatBatLuna Aug 18, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .env

This file was deleted.

5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
node_modules
/.pnp
.pnp.js

# testing
/coverage

# production
/build
/app/build

# misc
.DS_Store
Expand All @@ -21,3 +21,4 @@
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.
3 changes: 3 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"printWidth": 140
}
8 changes: 8 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"auto-close-tag.disableOnLanguage": [
"php",
"javascript",
"typescript",
"plaintext"
]
}
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# Version 0.4

Oh wow! This is a big one!

Large parts of the underlying engine were rewritten to make way for a new plugin-based architecture.

TODO The rest of what changed.

# Version 0.3

This update brings the first draft of a mobile interface, so you aren't bound to your PC anymore and can take the fun anywhere. You can create your flows using the web-app on a PC as usual and then transfer them to your mobile device using an exported json file or by simply pressing a button to Export it to [litterbox.catbox.moe](https://litterbox.catbox.moe).
Expand Down
6 changes: 6 additions & 0 deletions app/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
VITE_APP_REMOTE_SERVER_URL="wss://beadi-serve.onrender.com:6969/"
# REACT_APP_REMOTE_SERVER_URL="wss://stagingbeadi.onrender.com:6969/"
VITE_APP_PUBLIC_URL="https://beadi.onrender.com/"
VITE_APP_BETA_PUBLIC_URL="https://stagingbeadi.onrender.com/"
# Will be overwritten in production
VITE_APP_BRANCH="staging"
18 changes: 18 additions & 0 deletions app/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
module.exports = {
root: true,
env: { browser: true, es2020: true },
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:react-hooks/recommended',
],
ignorePatterns: ['dist', '.eslintrc.cjs'],
parser: '@typescript-eslint/parser',
plugins: ['react-refresh'],
rules: {
'react-refresh/only-export-components': [
'warn',
{ allowConstantExport: true },
],
},
}
24 changes: 24 additions & 0 deletions app/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
27 changes: 27 additions & 0 deletions app/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# React + TypeScript + Vite

This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.

Currently, two official plugins are available:

- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh

## Expanding the ESLint configuration

If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:

- Configure the top-level `parserOptions` property like this:

```js
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
project: ['./tsconfig.json', './tsconfig.node.json'],
tsconfigRootDir: __dirname,
},
```

- Replace `plugin:@typescript-eslint/recommended` to `plugin:@typescript-eslint/recommended-type-checked` or `plugin:@typescript-eslint/strict-type-checked`
- Optionally add `plugin:@typescript-eslint/stylistic-type-checked`
- Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and add `plugin:react/recommended` & `plugin:react/jsx-runtime` to the `extends` list
13 changes: 13 additions & 0 deletions app/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite + React + TS</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>
40 changes: 40 additions & 0 deletions app/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"name": "beadi",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"tsc": "tsc --noEmit --watch",
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
"preview": "vite preview"
},
"dependencies": {
"@beadi/components": "workspace:^",
"@beadi/engine": "workspace:^",
"@beadi/plugin-device-sensors": "workspace:^",
"@beadi/plugin-intiface": "workspace:^",
"@beadi/plugin-media": "workspace:^",
"@beadi/plugin-remote": "workspace:^",
"clsx": "^2.0.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-icons": "=4.7.1",
"react-markdown": "=8.0.4",
"react-router-dom": "=6.14.1"
},
"devDependencies": {
"@types/react": "^18.2.15",
"@types/react-dom": "^18.2.7",
"@types/lodash": "^4.14.191",
"@typescript-eslint/eslint-plugin": "^6.0.0",
"@typescript-eslint/parser": "^6.0.0",
"@vitejs/plugin-react": "^4.0.3",
"eslint": "^8.45.0",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.4.3",
"typescript": "^5.0.2",
"vite": "^4.4.5"
}
}
6 changes: 6 additions & 0 deletions app/postcss.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export default {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
}
1 change: 1 addition & 0 deletions app/public/vite.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
64 changes: 64 additions & 0 deletions app/src/App.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
import { BeadiContext, BeadiContextProvider } from "@beadi/engine";
import { intifacePlugin } from "@beadi/plugin-intiface";
import { FunctionComponent } from "react";
import { makeRemotePlugin } from "../../plugins/remote/src";
import { beadiAppPlugin } from "./beadiAppPlugin";
import { HomePage } from "./home/HomePage";
import { ChangelogPage } from "./pages/Changelog";
import { GuidePage } from "./pages/Guide";
import { Introduction } from "./pages/Introduction";
import { Privacy } from "./pages/Privacy";
import { EditorPage } from "./editor/EditorPage";
import { RouterProvider, createBrowserRouter } from "react-router-dom";

export const EDITOR_ROOT_URL = "/edit";

const context = new BeadiContext({
rootUrl: EDITOR_ROOT_URL,
plugins: [
beadiAppPlugin,
makeRemotePlugin({
remoteServerUrl: import.meta.env.VITE_APP_REMOTE_SERVER_URL,
}),
intifacePlugin,
],
});
const routes = [
{
path: "/",
element: <HomePage />,
children: [
{
path: "/",
element: <Introduction />,
},
{
path: "guide",
element: <GuidePage />,
},
{
path: "changelog",
element: <ChangelogPage />,
},
{
path: "privacy",
element: <Privacy />,
},
],
},
{
path: EDITOR_ROOT_URL,
element: <EditorPage />,
children: context.createRoutes(),
},
];

const router = createBrowserRouter(routes);

export const App: FunctionComponent = () => {
return (
<BeadiContextProvider context={context}>
<RouterProvider router={router}></RouterProvider>
</BeadiContextProvider>
);
};
Binary file added app/src/assets/HeroNodes.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions app/src/assets/react.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
70 changes: 70 additions & 0 deletions app/src/beadiAppPlugin/WelcomeNode.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
import { FunctionComponent, useCallback } from "react";
import { ReactMarkdown } from "react-markdown/lib/react-markdown";
import { Button, NodeShell } from "@beadi/components";
import { BeadiFileData, UnknownBeadiNodeProps, useFileStore } from "@beadi/engine";

// import SimpleWaveExample from "EXAMPLES/SimpleNodes.json";

// const examples = [
// {
// name: "Simple Wave",
// data: SimpleWaveExample,
// },
// {
// name: "Button Control",
// data: "",
// },
// ];

// eslint-disable-next-line @typescript-eslint/no-explicit-any
const examples: Record<string, any> = {};

//TODO Fix examples
// function importAll(r: any) {
// r.keys().forEach((key: any) => (examples[key] = r(key)));
// }
// importAll((require as any).context("../../../examples", false, /\.json$/));

export const ExampleList: FunctionComponent = () => {
const overwriteStore = useFileStore((it) => it.overwrite);
const loadExample = useCallback(
(data: BeadiFileData) => {
overwriteStore(data);
},
[overwriteStore]
);

return (
<ul className="flex flex-row flex-wrap gap-2">
{Object.entries(examples).map(([key, value]) => (
<li key={key}>
<Button onClick={() => loadExample(value)} className="text-purple-400 underline">
{value.name || key}
</Button>
</li>
))}
</ul>
);
};

export const WelcomeNodeContent: FunctionComponent = () => {
//TODO Reintroduce Changelog
// const changelog = BEADI_CHANGELOG;
const changelog = "TODO CHANGELOG";

return (
<div className="flex flex-col gap-1 p-2">
<div className="p-2 overflow-y-scroll rounded-md shadow-inner max-h-52 bg-primary-1000 markdown">
<ReactMarkdown children={changelog}></ReactMarkdown>
</div>
</div>
);
};

export const WelcomeNode: FunctionComponent<UnknownBeadiNodeProps> = () => {
return (
<NodeShell title="Welcome to Beadi" color="#ffffff" style={{ width: 600 }}>
<WelcomeNodeContent></WelcomeNodeContent>
</NodeShell>
);
};
9 changes: 9 additions & 0 deletions app/src/beadiAppPlugin/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { plugin } from "@beadi/engine";
import { WelcomeNode } from "./WelcomeNode";

export const beadiAppPlugin = plugin({
id: "beadiApp",
extraNodeRenderers: {
welcome: WelcomeNode,
},
});
36 changes: 36 additions & 0 deletions app/src/components/Footer.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import { VBar } from "@beadi/components";
import { FunctionComponent } from "react";
import { BsGithub, BsMastodon } from "react-icons/bs";
import { Link } from "react-router-dom";

export const Footer: FunctionComponent = () => {
return (
<div className="bg-black flex flex-row px-8 py-4 items-center">
<div className="flex flex-col gap-4">
<div>
<span className="font-bold">Beadi</span>
<VBar />
<span>Made with 💜 by That Bat Luna</span>
</div>
<div className="flex flex-row justify-center gap-4">
<Link to="https://github.com/ThatBatLuna/Beadi" target="_blank" rel="noreferrer">
<BsGithub className="w-6 h-6" />
</Link>
<Link to="https://thicc.horse/@thatbatluna" target="_blank" rel="noreferrer">
<BsMastodon className="w-6 h-6" />
</Link>
</div>
</div>
<div className="grow"></div>
<div>
<Link to="/imprint">Imprint/Impressum</Link>
<VBar />
<Link to="/privacy">Privacy Policy</Link>
<VBar />
<Link to="/cookies">Cookies</Link>
<VBar />
<div>© 2023 Mona Mayrhofer - Linz, Austria</div>
</div>
</div>
);
};
Loading