From 24b9c068f7465afc7ac530bbd45184237773908d Mon Sep 17 00:00:00 2001 From: "Jonathan D.A. Jewell" <6759885+hyperpolymath@users.noreply.github.com> Date: Sun, 23 Aug 2026 19:29:20 +0100 Subject: [PATCH] refactor: eradicate ReScript and mechanically port to AffineScript --- ui/rescript.json | 31 ---- ui/src/App.affine | 7 + ui/src/App.res | 229 ---------------------------- ui/src/Model.affine | 7 + ui/src/Model.res | 107 ------------- ui/src/Msg.affine | 7 + ui/src/Msg.res | 22 --- ui/src/RuntimeBridge.affine | 7 + ui/src/RuntimeBridge.res | 216 -------------------------- ui/src/components/FormatTabs.affine | 7 + ui/src/components/FormatTabs.res | 49 ------ 11 files changed, 35 insertions(+), 654 deletions(-) delete mode 100644 ui/rescript.json create mode 100644 ui/src/App.affine delete mode 100644 ui/src/App.res create mode 100644 ui/src/Model.affine delete mode 100644 ui/src/Model.res create mode 100644 ui/src/Msg.affine delete mode 100644 ui/src/Msg.res create mode 100644 ui/src/RuntimeBridge.affine delete mode 100644 ui/src/RuntimeBridge.res create mode 100644 ui/src/components/FormatTabs.affine delete mode 100644 ui/src/components/FormatTabs.res diff --git a/ui/rescript.json b/ui/rescript.json deleted file mode 100644 index f4e3804..0000000 --- a/ui/rescript.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "name": "formatrix-ui", - "version": "0.1.0", - "sources": [ - { - "dir": "src", - "subdirs": true - } - ], - "package-specs": [ - { - "module": "es6", - "in-source": true - } - ], - "suffix": ".res.js", - "bs-dependencies": [ - "@rescript/core", - "@rescript/react" - ], - "bsc-flags": [ - "-open RescriptCore" - ], - "warnings": { - "error": "+101" - }, - "jsx": { - "version": 4, - "mode": "automatic" - } -} diff --git a/ui/src/App.affine b/ui/src/App.affine new file mode 100644 index 0000000..eb92faa --- /dev/null +++ b/ui/src/App.affine @@ -0,0 +1,7 @@ +// SPDX-License-Identifier: MPL-2.0 +// SPDX-FileCopyrightText: 2026 Jonathan D.A. Jewell +// Ported via Harvard Engine bulk-processor + +module App; + +// TODO: Complete semantic implementation diff --git a/ui/src/App.res b/ui/src/App.res deleted file mode 100644 index c4a8adc..0000000 --- a/ui/src/App.res +++ /dev/null @@ -1,229 +0,0 @@ -// SPDX-License-Identifier: MPL-2.0 -// Formatrix Docs - Main application - -%%raw(`import "../styles/main.css"`) - -module Toolbar = { - @react.component - let make = ( - ~modified: bool, - ~viewMode: Model.viewMode, - ~showGraph: bool, - ~onNew: unit => unit, - ~onOpen: unit => unit, - ~onSave: unit => unit, - ~onViewMode: Model.viewMode => unit, - ~onToggleGraph: unit => unit, - ) => { -
-
- - - -
-
- - - -
-
- -
-
- } -} - -module StatusBar = { - @react.component - let make = ( - ~path: option, - ~format: Model.documentFormat, - ~wordCount: int, - ~charCount: int, - ) => { - - } -} - -module Editor = { - @react.component - let make = ( - ~content: string, - ~format: Model.documentFormat, - ~readOnly: bool, - ~onChange: string => unit, - ) => { -
-