diff --git a/crates/org-wasm/index.html b/crates/org-wasm/index.html index f526395..cd68370 100644 --- a/crates/org-wasm/index.html +++ b/crates/org-wasm/index.html @@ -1,52 +1,66 @@ - + - - + - - + + Org-rust - + - -
-
-

Org-Rust Live Editor

-
+ +
+
+
+

Org-Rust Live Editor

+
+
-
-
+
-
- - - - - -
-
+
+ + + + + +
+
-
- - - -
- - -

-            

+          
+ + + +
+ +

+          

         
+
+ -

- Progress is documented at the - Org-Rust repository. -

- - - - + diff --git a/crates/org-wasm/main.css b/crates/org-wasm/main.css index effc303..f55c2e4 100644 --- a/crates/org-wasm/main.css +++ b/crates/org-wasm/main.css @@ -1,153 +1,153 @@ :root { - --gutter-colour: #cce1cf; - --tab-hover: #bfd9c3; - --tab-active: #a5caab; - --line-hover: #f2f7f354; - --line-selection: #f0ebbc64; + --gutter-colour: #cce1cf; + --tab-hover: #bfd9c3; + --tab-active: #a5caab; + --line-hover: #f2f7f354; + --line-selection: #f0ebbc64; } button { - font-family: monospace; + font-family: monospace; } .tab button { - background-color: inherit; - float: left; - border: none; - outline: none; - cursor: pointer; - padding: 6px 6px; - transition: 0.3s; - white-space: nowrap; - flex: 1; + background-color: inherit; + float: left; + border: none; + outline: none; + cursor: pointer; + padding: 6px 6px; + transition: 0.3s; + white-space: nowrap; + flex: 1; } /* Change background color of buttons on hover */ .tab button:hover { - background-color: var(--tab-hover); + background-color: var(--tab-hover); } /* Create an active/current tablink class */ .tab button.active { - background-color: var(--tab-active); + background-color: var(--tab-active); } /* style non-rendered html */ pre.tabcontent { - background-color: #faf1f1; - white-space: pre-wrap; - font-size: 1rem; + background-color: #faf1f1; + white-space: pre-wrap; + font-size: 1rem; } iframe { - padding: 0 !important; + padding: 0 !important; } .tab { - display: flex; - flex-wrap: wrap; - max-height: min-content; - overflow: hidden; - border: 1px solid #ccc; - background-color: var(--gutter-colour); + display: flex; + flex-wrap: wrap; + max-height: min-content; + overflow: hidden; + border: 1px solid #ccc; + background-color: var(--gutter-colour); } .tabcontent { - flex: 1; - display: none; - padding: 6px 12px; - border-top: none; - overflow: scroll; - border: 1px solid #ccc; + flex: 1; + display: none; + padding: 6px 12px; + border-top: none; + overflow: scroll; + border: 1px solid #ccc; } .view { - grid-area: view; - padding: 0; - display: flex; - flex-direction: column; - overflow: scroll; + grid-area: view; + padding: 0; + display: flex; + flex-direction: column; + overflow: scroll; } .view * { - margin: 0; + margin: 0; } .input-area { - grid-area: input; - display: flex; - flex-direction: column; - overflow: scroll; + grid-area: input; + display: flex; + flex-direction: column; + overflow: scroll; } #textbox { - flex: 1; - display: flex; - overflow: auto; + flex: 1; + display: flex; + overflow: auto; } .cm-editor { - flex-grow: 1; - font-size: 1rem; + flex-grow: 1; + font-size: 1rem; } #editor-view { - height: 94svh; - display: grid; - grid-template-columns: 50% 50%; - grid-template-areas: "input view"; - border: solid 1px grey; + height: 100%; + display: grid; + grid-template-columns: 50% 50%; + grid-template-areas: "input view"; + border: solid 1px grey; + overflow: hidden; /* make it so that the view area doesn't expand when content is placed within it */ } body { - margin: 0; - line-height: 1.4; - font-size: 1.25em; - background-color: rgb(250, 250, 250); + margin: 0; + line-height: 1.4; + font-size: 1.25em; + background-color: rgb(250, 250, 250); } header p { - margin: 0; - background-image: none; - font-weight: normal; - color: #7e8170; + margin: 0; + background-image: none; + font-weight: normal; + color: #7e8170; } header { display: flex; - gap: 10px; - justify-content: flex-start; - align-items: baseline; + justify-content: space-between; + align-items: center; flex-direction: row; margin: 0; + padding: 0.15em 0.05em; } h1, h2, h3, header { - font-weight: 600; - background-image: linear-gradient(to bottom right, #13223f, #139323); - color: transparent; - background-clip: text; - -webkit-background-clip: text; - margin: 0; - margin-bottom: 0.25em; + font-weight: 600; + background-image: linear-gradient(to bottom right, #13223f, #139323); + color: transparent; + background-clip: text; + -webkit-background-clip: text; + margin: 0; } @media (max-width: 850px) { - #editor-view { - grid-template-columns: 100%; - grid-template-areas: - "input" - "view"; - grid-template-rows: 50% 50%; - } - - header { - height: auto; - } - body { - font-size: 1.125em; - } + #editor-view { + grid-template-columns: 100%; + grid-template-areas: + "input" + "view"; + grid-template-rows: 50% 50%; + } + + header { + height: auto; + } + body { + font-size: 1.125em; + } } diff --git a/crates/org-wasm/package-lock.json b/crates/org-wasm/package-lock.json index ea3780e..0f671bd 100644 --- a/crates/org-wasm/package-lock.json +++ b/crates/org-wasm/package-lock.json @@ -20,11 +20,9 @@ "org-export": "file:./pkg" }, "devDependencies": { - "@minify-html/node": "^0.11.1", "css-loader": "^6.8.1", "css-minimizer-webpack-plugin": "^5.0.1", "html-bundler-webpack-plugin": "^1.18.0", - "html-minimizer-webpack-plugin": "^4.4.0", "html-webpack-plugin": "^5.5.3", "style-loader": "^3.3.3", "terser-webpack-plugin": "^5.3.9", @@ -197,21 +195,6 @@ "@lezer/common": "^1.0.0" } }, - "node_modules/@minify-html/node": { - "version": "0.11.1", - "dev": true, - "hasInstallScript": true, - "license": "MIT", - "dependencies": { - "cargo-cp-artifact": "^0.1" - }, - "bin": { - "minify-html": "cli.js" - }, - "engines": { - "node": ">= 8.6.0" - } - }, "node_modules/@replit/codemirror-vim": { "version": "6.0.14", "license": "MIT", @@ -962,14 +945,6 @@ ], "license": "CC-BY-4.0" }, - "node_modules/cargo-cp-artifact": { - "version": "0.1.8", - "dev": true, - "license": "MIT", - "bin": { - "cargo-cp-artifact": "bin/cargo-cp-artifact.js" - } - }, "node_modules/chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", @@ -2260,115 +2235,6 @@ "node": "^14.13.1 || >=16.0.0" } }, - "node_modules/html-minimizer-webpack-plugin": { - "version": "4.4.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/html-minifier-terser": "^7.0.0", - "html-minifier-terser": "^7.2.0", - "jest-worker": "^29.5.0", - "schema-utils": "^4.0.1", - "serialize-javascript": "^6.0.1" - }, - "engines": { - "node": ">= 14.15.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - }, - "peerDependencies": { - "webpack": "^5.1.0" - }, - "peerDependenciesMeta": { - "@swc/html": { - "optional": true - } - } - }, - "node_modules/html-minimizer-webpack-plugin/node_modules/@types/html-minifier-terser": { - "version": "7.0.0", - "dev": true, - "license": "MIT" - }, - "node_modules/html-minimizer-webpack-plugin/node_modules/ajv": { - "version": "8.12.0", - "dev": true, - "license": "MIT", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/html-minimizer-webpack-plugin/node_modules/ajv-keywords": { - "version": "5.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "fast-deep-equal": "^3.1.3" - }, - "peerDependencies": { - "ajv": "^8.8.2" - } - }, - "node_modules/html-minimizer-webpack-plugin/node_modules/jest-worker": { - "version": "29.5.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "*", - "jest-util": "^29.5.0", - "merge-stream": "^2.0.0", - "supports-color": "^8.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/html-minimizer-webpack-plugin/node_modules/json-schema-traverse": { - "version": "1.0.0", - "dev": true, - "license": "MIT" - }, - "node_modules/html-minimizer-webpack-plugin/node_modules/schema-utils": { - "version": "4.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/json-schema": "^7.0.9", - "ajv": "^8.9.0", - "ajv-formats": "^2.1.1", - "ajv-keywords": "^5.1.0" - }, - "engines": { - "node": ">= 12.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - } - }, - "node_modules/html-minimizer-webpack-plugin/node_modules/supports-color": { - "version": "8.1.1", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" - } - }, "node_modules/html-webpack-plugin": { "version": "5.5.3", "dev": true, diff --git a/crates/org-wasm/package.json b/crates/org-wasm/package.json index 2220b64..f39dd8e 100644 --- a/crates/org-wasm/package.json +++ b/crates/org-wasm/package.json @@ -22,11 +22,9 @@ "org-export": "file:./pkg" }, "devDependencies": { - "@minify-html/node": "^0.11.1", "css-loader": "^6.8.1", "css-minimizer-webpack-plugin": "^5.0.1", "html-bundler-webpack-plugin": "^1.18.0", - "html-minimizer-webpack-plugin": "^4.4.0", "html-webpack-plugin": "^5.5.3", "style-loader": "^3.3.3", "terser-webpack-plugin": "^5.3.9", diff --git a/crates/org-wasm/webpack.config.js b/crates/org-wasm/webpack.config.js index 6303b77..76bfe98 100644 --- a/crates/org-wasm/webpack.config.js +++ b/crates/org-wasm/webpack.config.js @@ -8,7 +8,6 @@ const __dirname = url.fileURLToPath(new URL('.', import.meta.url)); import HtmlBundlerPlugin from "html-bundler-webpack-plugin"; import TerserPlugin from 'terser-webpack-plugin'; import CssMinimizerPlugin from 'css-minimizer-webpack-plugin'; -import HtmlMinimizerPlugin from 'html-minimizer-webpack-plugin'; @@ -60,11 +59,6 @@ export default { }, optimization: { minimizer: [ - new HtmlMinimizerPlugin( - { - minify: HtmlMinimizerPlugin.minifyHtmlNode - } - ), // mirroring the default webpack config // adding the other minimizers causes this one to not activate, // so be explicit about using it