Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion src/lib/console.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import "core-js/stable";
import "html-tag-js/dist/polyfill";
import * as esprima from "esprima";
import css from "styles/console.module.scss";
import css from "styles/console.m.scss";
import loadPolyFill from "utils/polyfill";

(function () {
Expand Down
28 changes: 3 additions & 25 deletions src/lib/editorFile.js
Original file line number Diff line number Diff line change
Expand Up @@ -229,42 +229,20 @@ export default class EditorFile {
container.appendChild(content);
this.#content = container;
} else {
container = tag("div", {
className: "tab-page-container",
});
container = <div className="tab-page-container" />;

// shadow dom
shadow = container.attachShadow({ mode: "open" });

// main app styles
const mainStyle = tag("link", {
rel: "stylesheet",
href: "./css/build/main.css",
});
// icon styles
const iconStyle = tag("link", {
rel: "stylesheet",
href: "./res/icons/style.css",
});
// file icon styles
const fileIconStyle = tag("link", {
rel: "stylesheet",
href: "./res/file-icons/style.css",
});

// Add base styles to shadow DOM first
shadow.appendChild(mainStyle);
shadow.appendChild(iconStyle);
shadow.appendChild(fileIconStyle);
shadow.appendChild(<link rel="stylesheet" href="build/main.css" />);

// Handle custom stylesheets if provided
if (options.stylesheets) {
this.#addCustomStyles(options.stylesheets, shadow);
}

const content = tag("div", {
className: "tab-page-content",
});
const content = <div className="tab-page-content" />;

if (typeof options.content === "string") {
content.innerHTML = DOMPurify.sanitize(options.content);
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ module.exports = (env, options) => {
use: ['raw-loader'],
},
{
test: /\.module.(sa|sc|c)ss$/,
test: /\.m.(sa|sc|c)ss$/,
use: [
'raw-loader',
'postcss-loader',
Expand All @@ -24,7 +24,7 @@ module.exports = (env, options) => {
type: "asset/resource",
},
{
test: /(?<!\.module)\.(sa|sc|c)ss$/,
test: /(?<!\.m)\.(sa|sc|c)ss$/,
use: [
{
loader: MiniCssExtractPlugin.loader,
Expand Down