151 | .ace_meta.ace_tag {
152 | color: #f60055;
153 | }
154 |
155 | // let const var also =>
156 | .ace_storage {
157 | font-style: "italic";
158 | color: #f60055;
159 | }
160 |
161 | .ace_storage.ace_type {
162 | color: #00dded;
163 | }
164 |
165 | .ace_invalid {
166 | color: #f8f8f0;
167 | background-color: #ff79c6;
168 | }
169 |
170 | .ace_invalid.ace_deprecated {
171 | color: #f8f8f0;
172 | background-color: #bd93f9;
173 | }
174 |
175 | // string
176 | .ace_string {
177 | color: #c95ae5;
178 | }
179 |
180 | // comment
181 | .ace_comment {
182 | color: #5F5F7F;
183 | }
184 |
185 | // .class name in css
186 | .ace_variable {
187 | color: #efdc35;
188 | }
189 |
190 | // anything without . or # in css
191 | // e.g. body h1
192 |
193 | .ace_constant {
194 | color: #ec89cb;
195 | }
196 |
197 | // function parameters (abc) =>
198 | .hljs-params,
199 | .ace_variable.ace_parameter {
200 | color: #f69154;
201 | }
202 |
203 | // attribute name in html
204 | .ace_entity.ace_other.ace_attribute-name {
205 | color: #00dded;
206 | }
207 |
208 | // <> in html
209 | .ace_xml-pe.ace_xml,
210 | .ace_punctuation.ace_tag {
211 | color: #f69154;
212 | }
213 |
214 | // html tag
215 | .ace_tag-name.ace_tag,
216 | .ace_entity.ace_name.ace_tag {
217 | color: #f60055;
218 | }
219 |
220 | .ace_paren {
221 | color: #ec89cb;
222 | }
223 |
224 | /**
225 | * Don't change indent guide
226 | */
227 |
228 | .ace_indent-guide {
229 | background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWPQ09NrYAgMjP4PAAtGAwchHMyAAAAAAElFTkSuQmCC)
230 | right repeat-y;
231 | }
232 |
233 | .ace_indent-guide-active {
234 | background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQIW2PQ1dX9zzBz5sz/ABCcBFFentLlAAAAAElFTkSuQmCC)
235 | right repeat-y;
236 | }
237 |
238 | /**
239 | * All the highlight rules bellow require extra syntax highlight plugin
240 | **/
241 |
242 | // innerHTML, classList etc
243 | .ace_support.ace_constant.ace_js {
244 | color: #f69154;
245 | }
246 |
247 | // all function call in js
248 | .ace_entity.ace_name.ace_function {
249 | color: #ec89cb;
250 | }
251 | .ace_support.ace_constant.ace_css-in-js {
252 | color: #9700be;
253 | }
254 | }
255 |
--------------------------------------------------------------------------------
/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "es2016",
4 | "module": "commonjs",
5 | "allowJs": true,
6 | "esModuleInterop": true,
7 | "forceConsistentCasingInFileNames": true,
8 | "strict": true,
9 | "skipLibCheck": true,
10 | "outDir": "dist"
11 | },
12 | "exclude": ["./dist/**/*", "./postcss.config.js"]
13 | }
14 |
--------------------------------------------------------------------------------
/typings/acode.d.ts:
--------------------------------------------------------------------------------
1 | type Input = string;
2 | type Strings = string[];
3 |
4 | declare var acode: Acode;
5 |
6 | interface Acode {
7 | /**
8 | * Define a module
9 | * @param {string} name
10 | * @param {Object|function} module
11 | */
12 | define(name: string, module: any): void;
13 |
14 | require(module: string): any;
15 |
16 | exec(key: string, val: any): boolean | undefined;
17 |
18 | get exitAppMessage(): string | undefined;
19 |
20 | setLoadingMessage(message: string): void;
21 |
22 | setPluginInit(
23 | id: string,
24 | initFunction: (baseUrl: string, $page: HTMLElement, options?: any) => Promise
,
25 | settings?: any
26 | ): void;
27 |
28 | getPluginSettings(id: string): any;
29 |
30 | setPluginUnmount(id: string, unmountFunction: () => void): void;
31 |
32 | /**
33 | * @param {string} id plugin id
34 | * @param {string} baseUrl local plugin url
35 | * @param {HTMLElement} $page
36 | */
37 | initPlugin(id: string, baseUrl: string, $page: HTMLElement, options?: any): Promise;
38 |
39 | unmountPlugin(id: string): void;
40 |
41 | registerFormatter(id: string, extensions: string[], format: () => Promise): void;
42 |
43 | unregisterFormatter(id: string): void;
44 |
45 | format(selectIfNull?: boolean): Promise;
46 |
47 | fsOperation(file: string): any;
48 |
49 | newEditorFile(filename: string, options?: any): void;
50 |
51 | // readonly formatters(): { id: string; name: string; exts: string[] }[];
52 |
53 | /**
54 | * @param {string[]} extensions
55 | * @returns {Array<[id: string, name: string]>} options
56 | */
57 | getFormatterFor(extensions: string[]): [id: string, name: string][];
58 |
59 | alert(title: string, message: string, onhide: ()=>void): void;
60 |
61 | loader(title: string, message: string, cancel: { timeout: number,callback: ()=>void }): void;
62 |
63 | joinUrl(...args: string[]): string;
64 |
65 | addIcon(className: string, src: string): void;
66 |
67 | prompt(
68 | message: string,
69 | defaultValue: string,
70 | type: 'textarea' | 'text' | 'number' | 'tel' | 'search' | 'email' | 'url',
71 | options?: {
72 | match: RegExp,
73 | required: boolean,
74 | placeholder: string,
75 | test: (any)=>boolean
76 | }
77 | ): Promise;
78 |
79 | confirm(title: string, message: string): Promise;
80 |
81 | select(
82 | title: string,
83 | options: [string, string, string, boolean][] | string,
84 | opts?: {
85 | onCancel?: () => void;
86 | onHide?: () => void;
87 | hideOnSelect?: boolean;
88 | textTransform?: boolean;
89 | default?: string;
90 | } | boolean
91 | ): Promise;
92 |
93 | multiPrompt(title: string, inputs: Array, help: string): Promise;
94 |
95 | fileBrowser(mode: 'file' | 'folder' | 'both', info: string, doesOpenLast: boolean): Promise<
96 | | {
97 | name: string;
98 | type: 'file';
99 | url: string;
100 | }
101 | | {
102 | list: {
103 | icon: string;
104 | isDirectory: boolean;
105 | isFile: boolean;
106 | mime: string;
107 | name: string;
108 | type: 'file' | 'folder';
109 | uri: string;
110 | url: string;
111 | }[];
112 | scroll: number;
113 | name: string;
114 | type: 'folder';
115 | url: string;
116 | }
117 | >;
118 |
119 | toInternalUrl(url: string): Promise;
120 | }
121 |
--------------------------------------------------------------------------------
/typings/editorFile.d.ts:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bajrangCoder/SweetPlasma/ecf8e0137a70e439c061c3603ed5dbacbb4845b3/typings/editorFile.d.ts
--------------------------------------------------------------------------------
/typings/index.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
--------------------------------------------------------------------------------
/typings/settings.d.ts:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bajrangCoder/SweetPlasma/ecf8e0137a70e439c061c3603ed5dbacbb4845b3/typings/settings.d.ts
--------------------------------------------------------------------------------
/webpack.config.js:
--------------------------------------------------------------------------------
1 | const { exec } = require("child_process");
2 | const path = require("path");
3 |
4 | module.exports = (env, options) => {
5 | const { mode = "development" } = options;
6 | const rules = [
7 | {
8 | test: /\.m?js$/,
9 | use: [
10 | "html-tag-js/jsx/tag-loader.js",
11 | {
12 | loader: "babel-loader",
13 | options: {
14 | presets: ["@babel/preset-env"],
15 | },
16 | },
17 | ],
18 | },
19 | {
20 | test: /\.(sa|sc|c)ss$/,
21 | use: ["raw-loader", "postcss-loader", "sass-loader"],
22 | },
23 | ];
24 |
25 | const main = {
26 | mode,
27 | entry: {
28 | main: "./src/main.js",
29 | },
30 | output: {
31 | path: path.resolve(__dirname, "dist"),
32 | filename: "[name].js",
33 | chunkFilename: "[name].js",
34 | },
35 | module: {
36 | rules,
37 | },
38 | plugins: [
39 | {
40 | apply: (compiler) => {
41 | compiler.hooks.afterDone.tap("pack-zip", () => {
42 | // run pack-zip.js
43 | exec(
44 | "node .vscode/pack-zip.js",
45 | (err, stdout, stderr) => {
46 | if (err) {
47 | console.error(err);
48 | return;
49 | }
50 | console.log(stdout);
51 | }
52 | );
53 | });
54 | },
55 | },
56 | ],
57 | };
58 |
59 | return [main];
60 | };
61 |
--------------------------------------------------------------------------------