├── .gitignore
├── LICENSE
├── README.md
├── index.html
├── package-lock.json
├── package.json
├── public
└── vite.svg
├── releases
├── 1
│ ├── README.md
│ ├── assets
│ │ ├── add (1).svg
│ │ ├── audio.mp3
│ │ ├── audio.svg
│ │ ├── bracket .svg
│ │ ├── container.svg
│ │ ├── cross.svg
│ │ ├── div.svg
│ │ ├── favicon.svg
│ │ ├── header.svg
│ │ ├── image.svg
│ │ ├── link-break.svg
│ │ ├── link.svg
│ │ ├── loading.svg
│ │ ├── meta-img.jpeg
│ │ ├── paragraph.svg
│ │ ├── picture.svg
│ │ ├── section.svg
│ │ ├── star.svg
│ │ ├── style.svg
│ │ ├── video.mp4
│ │ └── video.svg
│ ├── css
│ │ └── style.css
│ ├── index.html
│ ├── js
│ │ ├── bundle.js
│ │ ├── codemirror.js
│ │ ├── formatting.js
│ │ └── htmlmixed.js
│ └── mode
│ │ ├── css
│ │ ├── css.js
│ │ ├── gss.html
│ │ ├── gss_test.js
│ │ ├── index.html
│ │ ├── less.html
│ │ ├── less_test.js
│ │ ├── scss.html
│ │ ├── scss_test.js
│ │ └── test.js
│ │ ├── htmlmixed
│ │ ├── htmlmixed.js
│ │ └── index.html
│ │ ├── javascript
│ │ ├── index.html
│ │ ├── javascript.js
│ │ ├── json-ld.html
│ │ ├── test.js
│ │ └── typescript.html
│ │ ├── vbscript
│ │ ├── index.html
│ │ └── vbscript.js
│ │ └── xml
│ │ ├── index.html
│ │ ├── test.js
│ │ └── xml.js
└── 2
│ ├── README.md
│ ├── babel.config.json
│ ├── dist
│ ├── addon
│ │ ├── comment
│ │ │ ├── comment.js
│ │ │ └── continuecomment.js
│ │ ├── dialog
│ │ │ ├── dialog.css
│ │ │ └── dialog.js
│ │ ├── display
│ │ │ ├── autorefresh.js
│ │ │ ├── fullscreen.css
│ │ │ ├── fullscreen.js
│ │ │ ├── panel.js
│ │ │ ├── placeholder.js
│ │ │ └── rulers.js
│ │ ├── edit
│ │ │ ├── closebrackets.js
│ │ │ ├── closetag.js
│ │ │ ├── continuelist.js
│ │ │ ├── matchbrackets.js
│ │ │ ├── matchtags.js
│ │ │ └── trailingspace.js
│ │ ├── fold
│ │ │ ├── brace-fold.js
│ │ │ ├── comment-fold.js
│ │ │ ├── foldcode.js
│ │ │ ├── foldgutter.css
│ │ │ ├── foldgutter.js
│ │ │ ├── indent-fold.js
│ │ │ ├── markdown-fold.js
│ │ │ └── xml-fold.js
│ │ ├── hint
│ │ │ ├── anyword-hint.js
│ │ │ ├── css-hint.js
│ │ │ ├── html-hint.js
│ │ │ ├── javascript-hint.js
│ │ │ ├── show-hint.css
│ │ │ ├── show-hint.js
│ │ │ ├── sql-hint.js
│ │ │ └── xml-hint.js
│ │ ├── lint
│ │ │ ├── coffeescript-lint.js
│ │ │ ├── css-lint.js
│ │ │ ├── html-lint.js
│ │ │ ├── javascript-lint.js
│ │ │ ├── json-lint.js
│ │ │ ├── lint.css
│ │ │ ├── lint.js
│ │ │ └── yaml-lint.js
│ │ ├── merge
│ │ │ ├── merge.css
│ │ │ └── merge.js
│ │ ├── mode
│ │ │ ├── loadmode.js
│ │ │ ├── multiplex.js
│ │ │ ├── multiplex_test.js
│ │ │ ├── overlay.js
│ │ │ └── simple.js
│ │ ├── runmode
│ │ │ ├── colorize.js
│ │ │ ├── runmode-standalone.js
│ │ │ ├── runmode.js
│ │ │ └── runmode.node.js
│ │ ├── scroll
│ │ │ ├── annotatescrollbar.js
│ │ │ ├── scrollpastend.js
│ │ │ ├── simplescrollbars.css
│ │ │ └── simplescrollbars.js
│ │ ├── search
│ │ │ ├── jump-to-line.js
│ │ │ ├── match-highlighter.js
│ │ │ ├── matchesonscrollbar.css
│ │ │ ├── matchesonscrollbar.js
│ │ │ ├── search.js
│ │ │ └── searchcursor.js
│ │ ├── selection
│ │ │ ├── active-line.js
│ │ │ ├── mark-selection.js
│ │ │ └── selection-pointer.js
│ │ ├── tern
│ │ │ ├── tern.css
│ │ │ ├── tern.js
│ │ │ └── worker.js
│ │ └── wrap
│ │ │ └── hardwrap.js
│ ├── assets
│ │ ├── fonts
│ │ │ ├── sb-Bold.ttf
│ │ │ ├── sb-Medium.ttf
│ │ │ └── sb-thin.ttf
│ │ ├── gitshot
│ │ │ ├── basic.gif
│ │ │ ├── basic2.gif
│ │ │ ├── basic3.gif
│ │ │ ├── code-css.png
│ │ │ ├── code-html.png
│ │ │ ├── code-js.png
│ │ │ ├── elements.png
│ │ │ └── style.png
│ │ ├── images
│ │ │ ├── add (1).svg
│ │ │ ├── add-img.svg
│ │ │ ├── audio.svg
│ │ │ ├── bracket .svg
│ │ │ ├── cross.svg
│ │ │ ├── div.svg
│ │ │ ├── drop.svg
│ │ │ ├── favicon.svg
│ │ │ ├── frame.svg
│ │ │ ├── grid.svg
│ │ │ ├── heading.svg
│ │ │ ├── image.svg
│ │ │ ├── layers.svg
│ │ │ ├── link-break.svg
│ │ │ ├── link.svg
│ │ │ ├── loading.svg
│ │ │ ├── logo-b.svg
│ │ │ ├── logo-bl.svg
│ │ │ ├── logo-db.svg
│ │ │ ├── logo-g.svg
│ │ │ ├── logo-gr.svg
│ │ │ ├── logo-p.svg
│ │ │ ├── logo-r.svg
│ │ │ ├── logo-wf.svg
│ │ │ ├── logo.svg
│ │ │ ├── meta-img.jpeg
│ │ │ ├── paragraph.svg
│ │ │ ├── picture.svg
│ │ │ ├── right-arrow.svg
│ │ │ ├── sample
│ │ │ │ ├── 1.jpg
│ │ │ │ ├── 10.jpg
│ │ │ │ ├── 11.jpg
│ │ │ │ ├── 12.jpg
│ │ │ │ ├── 13.jpg
│ │ │ │ ├── 14.jpg
│ │ │ │ ├── 15.jpg
│ │ │ │ ├── 2.jpg
│ │ │ │ ├── 3.jpg
│ │ │ │ ├── 4.jpg
│ │ │ │ ├── 5.jpg
│ │ │ │ ├── 6.jpg
│ │ │ │ ├── 7.jpg
│ │ │ │ ├── 8.jpg
│ │ │ │ ├── 9.jpg
│ │ │ │ └── resized
│ │ │ │ │ ├── 1.jpg
│ │ │ │ │ ├── 10.jpg
│ │ │ │ │ ├── 2.jpg
│ │ │ │ │ ├── 3.jpg
│ │ │ │ │ ├── 4.jpg
│ │ │ │ │ ├── 5.jpg
│ │ │ │ │ ├── 6.jpg
│ │ │ │ │ ├── 7.jpg
│ │ │ │ │ ├── 8.jpg
│ │ │ │ │ └── 9.jpg
│ │ │ ├── section.svg
│ │ │ ├── star.svg
│ │ │ ├── style.svg
│ │ │ ├── user.svg
│ │ │ └── video.svg
│ │ └── media
│ │ │ ├── audio.mp3
│ │ │ └── video.mp4
│ ├── css
│ │ └── style.css
│ ├── index.html
│ ├── js
│ │ ├── bundle.js
│ │ ├── codemirror.js
│ │ ├── formatting.js
│ │ ├── htmlmixed.js
│ │ └── reuse.js
│ └── mode
│ │ ├── css
│ │ ├── css.js
│ │ ├── gss.html
│ │ ├── gss_test.js
│ │ ├── index.html
│ │ ├── less.html
│ │ ├── less_test.js
│ │ ├── scss.html
│ │ ├── scss_test.js
│ │ └── test.js
│ │ ├── htmlmixed
│ │ ├── htmlmixed.js
│ │ └── index.html
│ │ ├── javascript
│ │ ├── index.html
│ │ ├── javascript.js
│ │ ├── json-ld.html
│ │ ├── test.js
│ │ └── typescript.html
│ │ ├── vbscript
│ │ ├── index.html
│ │ └── vbscript.js
│ │ └── xml
│ │ ├── index.html
│ │ ├── test.js
│ │ └── xml.js
│ ├── package-lock.json
│ ├── package.json
│ ├── src
│ ├── index.html
│ ├── js
│ │ ├── controller
│ │ │ ├── click.js
│ │ │ ├── controller.js
│ │ │ ├── data.js
│ │ │ ├── drag.js
│ │ │ ├── formLoading.js
│ │ │ ├── mouse.js
│ │ │ ├── navCon.js
│ │ │ ├── resize.js
│ │ │ ├── signin.js
│ │ │ ├── signup.js
│ │ │ └── userdata.js
│ │ ├── index.js
│ │ ├── models
│ │ │ ├── Action.js
│ │ │ ├── dragDrop.js
│ │ │ ├── drop.js
│ │ │ ├── iframe.js
│ │ │ ├── navigator.js
│ │ │ ├── position.js
│ │ │ ├── sign.js
│ │ │ ├── sizing.js
│ │ │ └── style.js
│ │ ├── reuse.js
│ │ ├── utils
│ │ │ └── cookie.js
│ │ └── views
│ │ │ ├── Box.js
│ │ │ ├── View.js
│ │ │ ├── codeView.js
│ │ │ ├── delete.js
│ │ │ ├── editor.js
│ │ │ ├── formMessageView.js
│ │ │ ├── help.js
│ │ │ ├── iframeView.js
│ │ │ ├── loadingView.js
│ │ │ ├── mockup.js
│ │ │ ├── navigation.js
│ │ │ ├── popbox.js
│ │ │ ├── popups.js
│ │ │ └── signView.js
│ └── scss
│ │ ├── abstracts
│ │ ├── _abs.scss
│ │ └── _variables.scss
│ │ ├── components
│ │ ├── _btn.scss
│ │ ├── _com.scss
│ │ ├── _pop-box.scss
│ │ └── _resizer.scss
│ │ ├── core
│ │ └── _reset.scss
│ │ ├── layout
│ │ ├── _elements.scss
│ │ ├── _header.scss
│ │ ├── _image.scss
│ │ ├── _layout.scss
│ │ ├── _main.scss
│ │ ├── _nav.scss
│ │ └── _site_nav.scss
│ │ ├── style.scss
│ │ └── utils
│ │ ├── _border.scss
│ │ ├── _color.scss
│ │ ├── _cursor.scss
│ │ ├── _display.scss
│ │ ├── _flex.scss
│ │ └── _utils.scss
│ ├── webpack.config.js
│ └── webpack.dev.js
├── src
├── App.tsx
├── assets
│ ├── box (1).svg
│ ├── box.svg
│ ├── mb.svg
│ └── react.svg
├── components
│ ├── LeftBar.tsx
│ ├── Site.tsx
│ ├── left_options
│ │ ├── AddElement.tsx
│ │ └── Element.tsx
│ └── styles
│ │ └── Inputs.tsx
├── main.tsx
├── styles
│ ├── _left.scss
│ ├── _mid.scss
│ ├── _right.scss
│ ├── _style.scss
│ └── app.scss
└── vite-env.d.ts
├── tsconfig.json
├── tsconfig.node.json
├── vite.config.ts
└── zzzzz.html
/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | ---*
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2021 Shahadat Sadhin
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # [web-builder](https://sadhinvr.github.io/web-builder/dist/index.html)
2 |
3 | App versions try:-
4 |
5 | - [1.0.0](https://sadhinvr.github.io/web-builder/releases/1/index.html)
6 | - [3.0.0](https://sadhinvr.github.io/web-builder/releases/2/dist/index.html) (latest)
7 |
8 |
9 |
10 | ## Add HTML Elements ( version 1.0.0)
11 |
12 | Drag any element to add to your Website.
13 |
14 | ![Add element & See code][gif-basic]
15 |
16 | ## Styling ( version 1.0.0)
17 |
18 | select element & add style to them.
19 |
20 | ![Add element & See code][style]
21 |
22 | ## ❗ It's not ready yet.please don't use it now.
23 |
24 |
25 | [gif-basic]: https://sadhinvr.github.io/web-builder/dist/assets/gitshot/basic3.gif "add element & see code"
26 |
27 | [style]: https://sadhinvr.github.io/web-builder/dist/assets/gitshot/style.png "style panel"
--------------------------------------------------------------------------------
/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | X edify
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "new",
3 | "private": true,
4 | "version": "0.0.0",
5 | "type": "module",
6 | "scripts": {
7 | "dev": "vite",
8 | "build": "tsc && vite build",
9 | "lint": "eslint src --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
10 | "preview": "vite preview"
11 | },
12 | "dependencies": {
13 | "react": "^18.2.0",
14 | "react-dom": "^18.2.0"
15 | },
16 | "devDependencies": {
17 | "@types/react": "^18.0.37",
18 | "@types/react-dom": "^18.0.11",
19 | "@typescript-eslint/eslint-plugin": "^5.59.0",
20 | "@typescript-eslint/parser": "^5.59.0",
21 | "@vitejs/plugin-react-swc": "^3.0.0",
22 | "autoprefixer": "^10.4.17",
23 | "eslint": "^8.38.0",
24 | "eslint-plugin-react-hooks": "^4.6.0",
25 | "eslint-plugin-react-refresh": "^0.3.4",
26 | "postcss": "^8.4.35",
27 | "sass": "^1.69.5",
28 | "typescript": "^5.0.2",
29 | "vite": "^4.3.9"
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/public/vite.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/releases/1/README.md:
--------------------------------------------------------------------------------
1 | Version - 1
2 | Commit - aae4028
3 | Committed on - Jun 28
4 |
5 | Sadhinvr 😊
6 |
--------------------------------------------------------------------------------
/releases/1/assets/add (1).svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
7 |
10 |
11 |
12 |
14 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/releases/1/assets/audio.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadhinvr/web-builder/2b12ea88c558a4960530c99d45c69d0e71bb7ecc/releases/1/assets/audio.mp3
--------------------------------------------------------------------------------
/releases/1/assets/audio.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
6 |
7 |
8 |
10 |
12 |
14 |
16 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/releases/1/assets/bracket .svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/releases/1/assets/container.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
8 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/releases/1/assets/cross.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/releases/1/assets/div.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/releases/1/assets/favicon.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/releases/1/assets/header.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
8 |
9 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
--------------------------------------------------------------------------------
/releases/1/assets/image.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/releases/1/assets/link.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
7 |
8 |
12 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/releases/1/assets/loading.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/releases/1/assets/meta-img.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadhinvr/web-builder/2b12ea88c558a4960530c99d45c69d0e71bb7ecc/releases/1/assets/meta-img.jpeg
--------------------------------------------------------------------------------
/releases/1/assets/paragraph.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
8 |
9 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/releases/1/assets/picture.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/releases/1/assets/section.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
--------------------------------------------------------------------------------
/releases/1/assets/star.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/releases/1/assets/style.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/releases/1/assets/video.mp4:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadhinvr/web-builder/2b12ea88c558a4960530c99d45c69d0e71bb7ecc/releases/1/assets/video.mp4
--------------------------------------------------------------------------------
/releases/1/assets/video.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
7 |
9 |
10 |
11 |
12 |
13 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
--------------------------------------------------------------------------------
/releases/1/mode/css/gss_test.js:
--------------------------------------------------------------------------------
1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others
2 | // Distributed under an MIT license: https://codemirror.net/LICENSE
3 |
4 | (function() {
5 | "use strict";
6 |
7 | var mode = CodeMirror.getMode({indentUnit: 2}, "text/x-gss");
8 | function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1), "gss"); }
9 |
10 | MT("atComponent",
11 | "[def @component] {",
12 | "[tag foo] {",
13 | " [property color]: [keyword black];",
14 | "}",
15 | "}");
16 |
17 | })();
18 |
--------------------------------------------------------------------------------
/releases/1/mode/css/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | CodeMirror: CSS mode
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
27 |
28 |
29 | CSS mode
30 |
65 |
70 |
71 | CSS mode supports this option:
72 |
73 | highlightNonStandardPropertyKeywords : boolean
74 | Whether to highlight non-standard CSS property keywords such as margin-inline
or zoom
(default: true
).
75 |
76 |
77 | MIME types defined: text/css
, text/x-scss
(demo ), text/x-less
(demo ).
78 |
79 | Parsing/Highlighting Tests: normal , verbose .
80 |
81 |
82 |
--------------------------------------------------------------------------------
/releases/1/mode/css/less_test.js:
--------------------------------------------------------------------------------
1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others
2 | // Distributed under an MIT license: https://codemirror.net/LICENSE
3 |
4 | (function() {
5 | "use strict";
6 |
7 | var mode = CodeMirror.getMode({indentUnit: 2}, "text/x-less");
8 | function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1), "less"); }
9 |
10 | MT("variable",
11 | "[variable-2 @base]: [atom #f04615];",
12 | "[qualifier .class] {",
13 | " [property width]: [variable&callee percentage]([number 0.5]); [comment // returns `50%`]",
14 | " [property color]: [variable&callee saturate]([variable-2 @base], [number 5%]);",
15 | "}");
16 |
17 | MT("amp",
18 | "[qualifier .child], [qualifier .sibling] {",
19 | " [qualifier .parent] [atom &] {",
20 | " [property color]: [keyword black];",
21 | " }",
22 | " [atom &] + [atom &] {",
23 | " [property color]: [keyword red];",
24 | " }",
25 | "}");
26 |
27 | MT("mixin",
28 | "[qualifier .mixin] ([variable dark]; [variable-2 @color]) {",
29 | " [property color]: [variable&callee darken]([variable-2 @color], [number 10%]);",
30 | "}",
31 | "[qualifier .mixin] ([variable light]; [variable-2 @color]) {",
32 | " [property color]: [variable&callee lighten]([variable-2 @color], [number 10%]);",
33 | "}",
34 | "[qualifier .mixin] ([variable-2 @_]; [variable-2 @color]) {",
35 | " [property display]: [atom block];",
36 | "}",
37 | "[variable-2 @switch]: [variable light];",
38 | "[qualifier .class] {",
39 | " [qualifier .mixin]([variable-2 @switch]; [atom #888]);",
40 | "}");
41 |
42 | MT("nest",
43 | "[qualifier .one] {",
44 | " [def @media] ([property width]: [number 400px]) {",
45 | " [property font-size]: [number 1.2em];",
46 | " [def @media] [attribute print] [keyword and] [property color] {",
47 | " [property color]: [keyword blue];",
48 | " }",
49 | " }",
50 | "}");
51 |
52 |
53 | MT("interpolation", ".@{[variable foo]} { [property font-weight]: [atom bold]; }");
54 | })();
55 |
--------------------------------------------------------------------------------
/releases/1/mode/javascript/json-ld.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | CodeMirror: JSON-LD mode
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
27 |
28 |
29 | JSON-LD mode
30 |
31 |
32 |
33 | {
34 | "@context": {
35 | "name": "http://schema.org/name",
36 | "description": "http://schema.org/description",
37 | "image": {
38 | "@id": "http://schema.org/image",
39 | "@type": "@id"
40 | },
41 | "geo": "http://schema.org/geo",
42 | "latitude": {
43 | "@id": "http://schema.org/latitude",
44 | "@type": "xsd:float"
45 | },
46 | "longitude": {
47 | "@id": "http://schema.org/longitude",
48 | "@type": "xsd:float"
49 | },
50 | "xsd": "http://www.w3.org/2001/XMLSchema#"
51 | },
52 | "name": "The Empire State Building",
53 | "description": "The Empire State Building is a 102-story landmark in New York City.",
54 | "image": "http://www.civil.usherbrooke.ca/cours/gci215a/empire-state-building.jpg",
55 | "geo": {
56 | "latitude": "40.75",
57 | "longitude": "73.98"
58 | }
59 | }
60 |
61 |
62 |
70 |
71 | This is a specialization of the JavaScript mode .
72 |
73 |
--------------------------------------------------------------------------------
/releases/1/mode/javascript/typescript.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | CodeMirror: TypeScript mode
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
25 |
26 |
27 | TypeScript mode
28 |
29 |
30 |
31 | class Greeter {
32 | greeting: string;
33 | constructor (message: string) {
34 | this.greeting = message;
35 | }
36 | greet() {
37 | return "Hello, " + this.greeting;
38 | }
39 | }
40 |
41 | var greeter = new Greeter("world");
42 |
43 | var button = document.createElement('button')
44 | button.innerText = "Say Hello"
45 | button.onclick = function() {
46 | alert(greeter.greet())
47 | }
48 |
49 | document.body.appendChild(button)
50 |
51 |
52 |
53 |
60 |
61 | This is a specialization of the JavaScript mode .
62 |
63 |
--------------------------------------------------------------------------------
/releases/1/mode/vbscript/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | CodeMirror: VBScript mode
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
24 |
25 |
26 | VBScript mode
27 |
28 |
29 |
30 | ' Pete Guhl
31 | ' 03-04-2012
32 | '
33 | ' Basic VBScript support for codemirror2
34 |
35 | Const ForReading = 1, ForWriting = 2, ForAppending = 8
36 |
37 | Call Sub020_PostBroadcastToUrbanAirship(strUserName, strPassword, intTransmitID, strResponse)
38 |
39 | If Not IsNull(strResponse) AND Len(strResponse) = 0 Then
40 | boolTransmitOkYN = False
41 | Else
42 | ' WScript.Echo "Oh Happy Day! Oh Happy DAY!"
43 | boolTransmitOkYN = True
44 | End If
45 |
46 |
47 |
53 |
54 | MIME types defined: text/vbscript
.
55 |
56 |
--------------------------------------------------------------------------------
/releases/1/mode/xml/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | CodeMirror: XML mode
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
24 |
25 |
26 | XML mode
27 |
28 | <html style="color: green">
29 | <!-- this is a comment -->
30 | <head>
31 | <title>HTML Example</title>
32 | </head>
33 | <body>
34 | The indentation tries to be <em>somewhat "do what
35 | I mean"</em>... but might not match your style.
36 | </body>
37 | </html>
38 |
39 |
45 | The XML mode supports these configuration parameters:
46 |
47 | htmlMode (boolean)
48 | This switches the mode to parse HTML instead of XML. This
49 | means attributes do not have to be quoted, and some elements
50 | (such as br
) do not require a closing tag.
51 | matchClosing (boolean)
52 | Controls whether the mode checks that close tags match the
53 | corresponding opening tag, and highlights mismatches as errors.
54 | Defaults to true.
55 | alignCDATA (boolean)
56 | Setting this to true will force the opening tag of CDATA
57 | blocks to not be indented.
58 |
59 |
60 | MIME types defined: application/xml
, text/html
.
61 |
62 |
--------------------------------------------------------------------------------
/releases/1/mode/xml/test.js:
--------------------------------------------------------------------------------
1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others
2 | // Distributed under an MIT license: https://codemirror.net/LICENSE
3 |
4 | (function() {
5 | var mode = CodeMirror.getMode({indentUnit: 2}, "xml"), mname = "xml";
6 | function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1), mname); }
7 |
8 | MT("matching",
9 | "[tag&bracket <][tag top][tag&bracket >]",
10 | " text",
11 | " [tag&bracket <][tag inner][tag&bracket />]",
12 | "[tag&bracket ][tag top][tag&bracket >]");
13 |
14 | MT("nonmatching",
15 | "[tag&bracket <][tag top][tag&bracket >]",
16 | " [tag&bracket <][tag inner][tag&bracket />]",
17 | " [tag&bracket ][tag&error tip][tag&bracket&error >]");
18 |
19 | MT("doctype",
20 | "[meta ]",
21 | "[tag&bracket <][tag top][tag&bracket />]");
22 |
23 | MT("cdata",
24 | "[tag&bracket <][tag top][tag&bracket >]",
25 | " [atom ]",
27 | "[tag&bracket ][tag top][tag&bracket >]");
28 |
29 | // HTML tests
30 | mode = CodeMirror.getMode({indentUnit: 2}, "text/html");
31 |
32 | MT("selfclose",
33 | "[tag&bracket <][tag html][tag&bracket >]",
34 | " [tag&bracket <][tag link] [attribute rel]=[string stylesheet] [attribute href]=[string \"/foobar\"][tag&bracket >]",
35 | "[tag&bracket ][tag html][tag&bracket >]");
36 |
37 | MT("list",
38 | "[tag&bracket <][tag ol][tag&bracket >]",
39 | " [tag&bracket <][tag li][tag&bracket >]one",
40 | " [tag&bracket <][tag li][tag&bracket >]two",
41 | "[tag&bracket ][tag ol][tag&bracket >]");
42 |
43 | MT("valueless",
44 | "[tag&bracket <][tag input] [attribute type]=[string checkbox] [attribute checked][tag&bracket />]");
45 |
46 | MT("pThenArticle",
47 | "[tag&bracket <][tag p][tag&bracket >]",
48 | " foo",
49 | "[tag&bracket <][tag article][tag&bracket >]bar");
50 |
51 | })();
52 |
--------------------------------------------------------------------------------
/releases/2/README.md:
--------------------------------------------------------------------------------
1 | # [web-builder](https://sadhinvr.github.io/web-builder/dist/index.html)
2 |
3 | App versions try:-
4 |
5 | - [1.0.0](https://sadhinvr.github.io/web-builder/releases/1/index.html)
6 | - [3.0.0](https://sadhinvr.github.io/web-builder/dist/index.html) (latest)
7 |
8 |
9 |
10 | ## Add HTML Elements ( version 1.0.0)
11 |
12 | Drag any element to add to your Website.
13 |
14 | ![Add element & See code][gif-basic]
15 |
16 | ## Styling ( version 1.0.0)
17 |
18 | select element & add style to them.
19 |
20 | ![Add element & See code][style]
21 |
22 | ## ❗ It's not ready yet.please don't use it now.
23 |
24 |
25 | [gif-basic]: https://sadhinvr.github.io/web-builder/dist/assets/gitshot/basic3.gif "add element & see code"
26 |
27 | [style]: https://sadhinvr.github.io/web-builder/dist/assets/gitshot/style.png "style panel"
--------------------------------------------------------------------------------
/releases/2/babel.config.json:
--------------------------------------------------------------------------------
1 | {
2 | "presets": [
3 | ["@babel/preset-env", {
4 | "useBuiltIns": "usage",
5 | "corejs": "3",
6 | "targets": {
7 | "browsers": [
8 | "last 5 versions",
9 | "ie >= 8"
10 | ]
11 | }
12 | }]
13 | ]
14 | }
--------------------------------------------------------------------------------
/releases/2/dist/addon/dialog/dialog.css:
--------------------------------------------------------------------------------
1 | .CodeMirror-dialog {
2 | position: absolute;
3 | left: 0; right: 0;
4 | background: inherit;
5 | z-index: 15;
6 | padding: .1em .8em;
7 | overflow: hidden;
8 | color: inherit;
9 | }
10 |
11 | .CodeMirror-dialog-top {
12 | border-bottom: 1px solid #eee;
13 | top: 0;
14 | }
15 |
16 | .CodeMirror-dialog-bottom {
17 | border-top: 1px solid #eee;
18 | bottom: 0;
19 | }
20 |
21 | .CodeMirror-dialog input {
22 | border: none;
23 | outline: none;
24 | background: transparent;
25 | width: 20em;
26 | color: inherit;
27 | font-family: monospace;
28 | }
29 |
30 | .CodeMirror-dialog button {
31 | font-size: 70%;
32 | }
33 |
--------------------------------------------------------------------------------
/releases/2/dist/addon/display/autorefresh.js:
--------------------------------------------------------------------------------
1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others
2 | // Distributed under an MIT license: https://codemirror.net/LICENSE
3 |
4 | (function(mod) {
5 | if (typeof exports == "object" && typeof module == "object") // CommonJS
6 | mod(require("../../lib/codemirror"))
7 | else if (typeof define == "function" && define.amd) // AMD
8 | define(["../../lib/codemirror"], mod)
9 | else // Plain browser env
10 | mod(CodeMirror)
11 | })(function(CodeMirror) {
12 | "use strict"
13 |
14 | CodeMirror.defineOption("autoRefresh", false, function(cm, val) {
15 | if (cm.state.autoRefresh) {
16 | stopListening(cm, cm.state.autoRefresh)
17 | cm.state.autoRefresh = null
18 | }
19 | if (val && cm.display.wrapper.offsetHeight == 0)
20 | startListening(cm, cm.state.autoRefresh = {delay: val.delay || 250})
21 | })
22 |
23 | function startListening(cm, state) {
24 | function check() {
25 | if (cm.display.wrapper.offsetHeight) {
26 | stopListening(cm, state)
27 | if (cm.display.lastWrapHeight != cm.display.wrapper.clientHeight)
28 | cm.refresh()
29 | } else {
30 | state.timeout = setTimeout(check, state.delay)
31 | }
32 | }
33 | state.timeout = setTimeout(check, state.delay)
34 | state.hurry = function() {
35 | clearTimeout(state.timeout)
36 | state.timeout = setTimeout(check, 50)
37 | }
38 | CodeMirror.on(window, "mouseup", state.hurry)
39 | CodeMirror.on(window, "keyup", state.hurry)
40 | }
41 |
42 | function stopListening(_cm, state) {
43 | clearTimeout(state.timeout)
44 | CodeMirror.off(window, "mouseup", state.hurry)
45 | CodeMirror.off(window, "keyup", state.hurry)
46 | }
47 | });
48 |
--------------------------------------------------------------------------------
/releases/2/dist/addon/display/fullscreen.css:
--------------------------------------------------------------------------------
1 | .CodeMirror-fullscreen {
2 | position: fixed;
3 | top: 0; left: 0; right: 0; bottom: 0;
4 | height: auto;
5 | z-index: 9;
6 | }
7 |
--------------------------------------------------------------------------------
/releases/2/dist/addon/display/fullscreen.js:
--------------------------------------------------------------------------------
1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others
2 | // Distributed under an MIT license: https://codemirror.net/LICENSE
3 |
4 | (function(mod) {
5 | if (typeof exports == "object" && typeof module == "object") // CommonJS
6 | mod(require("../../lib/codemirror"));
7 | else if (typeof define == "function" && define.amd) // AMD
8 | define(["../../lib/codemirror"], mod);
9 | else // Plain browser env
10 | mod(CodeMirror);
11 | })(function(CodeMirror) {
12 | "use strict";
13 |
14 | CodeMirror.defineOption("fullScreen", false, function(cm, val, old) {
15 | if (old == CodeMirror.Init) old = false;
16 | if (!old == !val) return;
17 | if (val) setFullscreen(cm);
18 | else setNormal(cm);
19 | });
20 |
21 | function setFullscreen(cm) {
22 | var wrap = cm.getWrapperElement();
23 | cm.state.fullScreenRestore = {scrollTop: window.pageYOffset, scrollLeft: window.pageXOffset,
24 | width: wrap.style.width, height: wrap.style.height};
25 | wrap.style.width = "";
26 | wrap.style.height = "auto";
27 | wrap.className += " CodeMirror-fullscreen";
28 | document.documentElement.style.overflow = "hidden";
29 | cm.refresh();
30 | }
31 |
32 | function setNormal(cm) {
33 | var wrap = cm.getWrapperElement();
34 | wrap.className = wrap.className.replace(/\s*CodeMirror-fullscreen\b/, "");
35 | document.documentElement.style.overflow = "";
36 | var info = cm.state.fullScreenRestore;
37 | wrap.style.width = info.width; wrap.style.height = info.height;
38 | window.scrollTo(info.scrollLeft, info.scrollTop);
39 | cm.refresh();
40 | }
41 | });
42 |
--------------------------------------------------------------------------------
/releases/2/dist/addon/display/rulers.js:
--------------------------------------------------------------------------------
1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others
2 | // Distributed under an MIT license: https://codemirror.net/LICENSE
3 |
4 | (function(mod) {
5 | if (typeof exports == "object" && typeof module == "object") // CommonJS
6 | mod(require("../../lib/codemirror"));
7 | else if (typeof define == "function" && define.amd) // AMD
8 | define(["../../lib/codemirror"], mod);
9 | else // Plain browser env
10 | mod(CodeMirror);
11 | })(function(CodeMirror) {
12 | "use strict";
13 |
14 | CodeMirror.defineOption("rulers", false, function(cm, val) {
15 | if (cm.state.rulerDiv) {
16 | cm.state.rulerDiv.parentElement.removeChild(cm.state.rulerDiv)
17 | cm.state.rulerDiv = null
18 | cm.off("refresh", drawRulers)
19 | }
20 | if (val && val.length) {
21 | cm.state.rulerDiv = cm.display.lineSpace.parentElement.insertBefore(document.createElement("div"), cm.display.lineSpace)
22 | cm.state.rulerDiv.className = "CodeMirror-rulers"
23 | drawRulers(cm)
24 | cm.on("refresh", drawRulers)
25 | }
26 | });
27 |
28 | function drawRulers(cm) {
29 | cm.state.rulerDiv.textContent = ""
30 | var val = cm.getOption("rulers");
31 | var cw = cm.defaultCharWidth();
32 | var left = cm.charCoords(CodeMirror.Pos(cm.firstLine(), 0), "div").left;
33 | cm.state.rulerDiv.style.minHeight = (cm.display.scroller.offsetHeight + 30) + "px";
34 | for (var i = 0; i < val.length; i++) {
35 | var elt = document.createElement("div");
36 | elt.className = "CodeMirror-ruler";
37 | var col, conf = val[i];
38 | if (typeof conf == "number") {
39 | col = conf;
40 | } else {
41 | col = conf.column;
42 | if (conf.className) elt.className += " " + conf.className;
43 | if (conf.color) elt.style.borderColor = conf.color;
44 | if (conf.lineStyle) elt.style.borderLeftStyle = conf.lineStyle;
45 | if (conf.width) elt.style.borderLeftWidth = conf.width;
46 | }
47 | elt.style.left = (left + col * cw) + "px";
48 | cm.state.rulerDiv.appendChild(elt)
49 | }
50 | }
51 | });
52 |
--------------------------------------------------------------------------------
/releases/2/dist/addon/edit/matchtags.js:
--------------------------------------------------------------------------------
1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others
2 | // Distributed under an MIT license: https://codemirror.net/LICENSE
3 |
4 | (function(mod) {
5 | if (typeof exports == "object" && typeof module == "object") // CommonJS
6 | mod(require("../../lib/codemirror"), require("../fold/xml-fold"));
7 | else if (typeof define == "function" && define.amd) // AMD
8 | define(["../../lib/codemirror", "../fold/xml-fold"], mod);
9 | else // Plain browser env
10 | mod(CodeMirror);
11 | })(function(CodeMirror) {
12 | "use strict";
13 |
14 | CodeMirror.defineOption("matchTags", false, function(cm, val, old) {
15 | if (old && old != CodeMirror.Init) {
16 | cm.off("cursorActivity", doMatchTags);
17 | cm.off("viewportChange", maybeUpdateMatch);
18 | clear(cm);
19 | }
20 | if (val) {
21 | cm.state.matchBothTags = typeof val == "object" && val.bothTags;
22 | cm.on("cursorActivity", doMatchTags);
23 | cm.on("viewportChange", maybeUpdateMatch);
24 | doMatchTags(cm);
25 | }
26 | });
27 |
28 | function clear(cm) {
29 | if (cm.state.tagHit) cm.state.tagHit.clear();
30 | if (cm.state.tagOther) cm.state.tagOther.clear();
31 | cm.state.tagHit = cm.state.tagOther = null;
32 | }
33 |
34 | function doMatchTags(cm) {
35 | cm.state.failedTagMatch = false;
36 | cm.operation(function() {
37 | clear(cm);
38 | if (cm.somethingSelected()) return;
39 | var cur = cm.getCursor(), range = cm.getViewport();
40 | range.from = Math.min(range.from, cur.line); range.to = Math.max(cur.line + 1, range.to);
41 | var match = CodeMirror.findMatchingTag(cm, cur, range);
42 | if (!match) return;
43 | if (cm.state.matchBothTags) {
44 | var hit = match.at == "open" ? match.open : match.close;
45 | if (hit) cm.state.tagHit = cm.markText(hit.from, hit.to, {className: "CodeMirror-matchingtag"});
46 | }
47 | var other = match.at == "close" ? match.open : match.close;
48 | if (other)
49 | cm.state.tagOther = cm.markText(other.from, other.to, {className: "CodeMirror-matchingtag"});
50 | else
51 | cm.state.failedTagMatch = true;
52 | });
53 | }
54 |
55 | function maybeUpdateMatch(cm) {
56 | if (cm.state.failedTagMatch) doMatchTags(cm);
57 | }
58 |
59 | CodeMirror.commands.toMatchingTag = function(cm) {
60 | var found = CodeMirror.findMatchingTag(cm, cm.getCursor());
61 | if (found) {
62 | var other = found.at == "close" ? found.open : found.close;
63 | if (other) cm.extendSelection(other.to, other.from);
64 | }
65 | };
66 | });
67 |
--------------------------------------------------------------------------------
/releases/2/dist/addon/edit/trailingspace.js:
--------------------------------------------------------------------------------
1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others
2 | // Distributed under an MIT license: https://codemirror.net/LICENSE
3 |
4 | (function(mod) {
5 | if (typeof exports == "object" && typeof module == "object") // CommonJS
6 | mod(require("../../lib/codemirror"));
7 | else if (typeof define == "function" && define.amd) // AMD
8 | define(["../../lib/codemirror"], mod);
9 | else // Plain browser env
10 | mod(CodeMirror);
11 | })(function(CodeMirror) {
12 | CodeMirror.defineOption("showTrailingSpace", false, function(cm, val, prev) {
13 | if (prev == CodeMirror.Init) prev = false;
14 | if (prev && !val)
15 | cm.removeOverlay("trailingspace");
16 | else if (!prev && val)
17 | cm.addOverlay({
18 | token: function(stream) {
19 | for (var l = stream.string.length, i = l; i && /\s/.test(stream.string.charAt(i - 1)); --i) {}
20 | if (i > stream.pos) { stream.pos = i; return null; }
21 | stream.pos = l;
22 | return "trailingspace";
23 | },
24 | name: "trailingspace"
25 | });
26 | });
27 | });
28 |
--------------------------------------------------------------------------------
/releases/2/dist/addon/fold/comment-fold.js:
--------------------------------------------------------------------------------
1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others
2 | // Distributed under an MIT license: https://codemirror.net/LICENSE
3 |
4 | (function(mod) {
5 | if (typeof exports == "object" && typeof module == "object") // CommonJS
6 | mod(require("../../lib/codemirror"));
7 | else if (typeof define == "function" && define.amd) // AMD
8 | define(["../../lib/codemirror"], mod);
9 | else // Plain browser env
10 | mod(CodeMirror);
11 | })(function(CodeMirror) {
12 | "use strict";
13 |
14 | CodeMirror.registerGlobalHelper("fold", "comment", function(mode) {
15 | return mode.blockCommentStart && mode.blockCommentEnd;
16 | }, function(cm, start) {
17 | var mode = cm.getModeAt(start), startToken = mode.blockCommentStart, endToken = mode.blockCommentEnd;
18 | if (!startToken || !endToken) return;
19 | var line = start.line, lineText = cm.getLine(line);
20 |
21 | var startCh;
22 | for (var at = start.ch, pass = 0;;) {
23 | var found = at <= 0 ? -1 : lineText.lastIndexOf(startToken, at - 1);
24 | if (found == -1) {
25 | if (pass == 1) return;
26 | pass = 1;
27 | at = lineText.length;
28 | continue;
29 | }
30 | if (pass == 1 && found < start.ch) return;
31 | if (/comment/.test(cm.getTokenTypeAt(CodeMirror.Pos(line, found + 1))) &&
32 | (found == 0 || lineText.slice(found - endToken.length, found) == endToken ||
33 | !/comment/.test(cm.getTokenTypeAt(CodeMirror.Pos(line, found))))) {
34 | startCh = found + startToken.length;
35 | break;
36 | }
37 | at = found - 1;
38 | }
39 |
40 | var depth = 1, lastLine = cm.lastLine(), end, endCh;
41 | outer: for (var i = line; i <= lastLine; ++i) {
42 | var text = cm.getLine(i), pos = i == line ? startCh : 0;
43 | for (;;) {
44 | var nextOpen = text.indexOf(startToken, pos), nextClose = text.indexOf(endToken, pos);
45 | if (nextOpen < 0) nextOpen = text.length;
46 | if (nextClose < 0) nextClose = text.length;
47 | pos = Math.min(nextOpen, nextClose);
48 | if (pos == text.length) break;
49 | if (pos == nextOpen) ++depth;
50 | else if (!--depth) { end = i; endCh = pos; break outer; }
51 | ++pos;
52 | }
53 | }
54 | if (end == null || line == end && endCh == startCh) return;
55 | return {from: CodeMirror.Pos(line, startCh),
56 | to: CodeMirror.Pos(end, endCh)};
57 | });
58 |
59 | });
60 |
--------------------------------------------------------------------------------
/releases/2/dist/addon/fold/foldgutter.css:
--------------------------------------------------------------------------------
1 | .CodeMirror-foldmarker {
2 | color: blue;
3 | text-shadow: #b9f 1px 1px 2px, #b9f -1px -1px 2px, #b9f 1px -1px 2px, #b9f -1px 1px 2px;
4 | font-family: arial;
5 | line-height: .3;
6 | cursor: pointer;
7 | }
8 | .CodeMirror-foldgutter {
9 | width: .7em;
10 | }
11 | .CodeMirror-foldgutter-open,
12 | .CodeMirror-foldgutter-folded {
13 | cursor: pointer;
14 | }
15 | .CodeMirror-foldgutter-open:after {
16 | content: "\25BE";
17 | }
18 | .CodeMirror-foldgutter-folded:after {
19 | content: "\25B8";
20 | }
21 |
--------------------------------------------------------------------------------
/releases/2/dist/addon/fold/indent-fold.js:
--------------------------------------------------------------------------------
1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others
2 | // Distributed under an MIT license: https://codemirror.net/LICENSE
3 |
4 | (function(mod) {
5 | if (typeof exports == "object" && typeof module == "object") // CommonJS
6 | mod(require("../../lib/codemirror"));
7 | else if (typeof define == "function" && define.amd) // AMD
8 | define(["../../lib/codemirror"], mod);
9 | else // Plain browser env
10 | mod(CodeMirror);
11 | })(function(CodeMirror) {
12 | "use strict";
13 |
14 | function lineIndent(cm, lineNo) {
15 | var text = cm.getLine(lineNo)
16 | var spaceTo = text.search(/\S/)
17 | if (spaceTo == -1 || /\bcomment\b/.test(cm.getTokenTypeAt(CodeMirror.Pos(lineNo, spaceTo + 1))))
18 | return -1
19 | return CodeMirror.countColumn(text, null, cm.getOption("tabSize"))
20 | }
21 |
22 | CodeMirror.registerHelper("fold", "indent", function(cm, start) {
23 | var myIndent = lineIndent(cm, start.line)
24 | if (myIndent < 0) return
25 | var lastLineInFold = null
26 |
27 | // Go through lines until we find a line that definitely doesn't belong in
28 | // the block we're folding, or to the end.
29 | for (var i = start.line + 1, end = cm.lastLine(); i <= end; ++i) {
30 | var indent = lineIndent(cm, i)
31 | if (indent == -1) {
32 | } else if (indent > myIndent) {
33 | // Lines with a greater indent are considered part of the block.
34 | lastLineInFold = i;
35 | } else {
36 | // If this line has non-space, non-comment content, and is
37 | // indented less or equal to the start line, it is the start of
38 | // another block.
39 | break;
40 | }
41 | }
42 | if (lastLineInFold) return {
43 | from: CodeMirror.Pos(start.line, cm.getLine(start.line).length),
44 | to: CodeMirror.Pos(lastLineInFold, cm.getLine(lastLineInFold).length)
45 | };
46 | });
47 |
48 | });
49 |
--------------------------------------------------------------------------------
/releases/2/dist/addon/fold/markdown-fold.js:
--------------------------------------------------------------------------------
1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others
2 | // Distributed under an MIT license: https://codemirror.net/LICENSE
3 |
4 | (function(mod) {
5 | if (typeof exports == "object" && typeof module == "object") // CommonJS
6 | mod(require("../../lib/codemirror"));
7 | else if (typeof define == "function" && define.amd) // AMD
8 | define(["../../lib/codemirror"], mod);
9 | else // Plain browser env
10 | mod(CodeMirror);
11 | })(function(CodeMirror) {
12 | "use strict";
13 |
14 | CodeMirror.registerHelper("fold", "markdown", function(cm, start) {
15 | var maxDepth = 100;
16 |
17 | function isHeader(lineNo) {
18 | var tokentype = cm.getTokenTypeAt(CodeMirror.Pos(lineNo, 0));
19 | return tokentype && /\bheader\b/.test(tokentype);
20 | }
21 |
22 | function headerLevel(lineNo, line, nextLine) {
23 | var match = line && line.match(/^#+/);
24 | if (match && isHeader(lineNo)) return match[0].length;
25 | match = nextLine && nextLine.match(/^[=\-]+\s*$/);
26 | if (match && isHeader(lineNo + 1)) return nextLine[0] == "=" ? 1 : 2;
27 | return maxDepth;
28 | }
29 |
30 | var firstLine = cm.getLine(start.line), nextLine = cm.getLine(start.line + 1);
31 | var level = headerLevel(start.line, firstLine, nextLine);
32 | if (level === maxDepth) return undefined;
33 |
34 | var lastLineNo = cm.lastLine();
35 | var end = start.line, nextNextLine = cm.getLine(end + 2);
36 | while (end < lastLineNo) {
37 | if (headerLevel(end + 1, nextLine, nextNextLine) <= level) break;
38 | ++end;
39 | nextLine = nextNextLine;
40 | nextNextLine = cm.getLine(end + 2);
41 | }
42 |
43 | return {
44 | from: CodeMirror.Pos(start.line, firstLine.length),
45 | to: CodeMirror.Pos(end, cm.getLine(end).length)
46 | };
47 | });
48 |
49 | });
50 |
--------------------------------------------------------------------------------
/releases/2/dist/addon/hint/anyword-hint.js:
--------------------------------------------------------------------------------
1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others
2 | // Distributed under an MIT license: https://codemirror.net/LICENSE
3 |
4 | (function(mod) {
5 | if (typeof exports == "object" && typeof module == "object") // CommonJS
6 | mod(require("../../lib/codemirror"));
7 | else if (typeof define == "function" && define.amd) // AMD
8 | define(["../../lib/codemirror"], mod);
9 | else // Plain browser env
10 | mod(CodeMirror);
11 | })(function(CodeMirror) {
12 | "use strict";
13 |
14 | var WORD = /[\w$]+/, RANGE = 500;
15 |
16 | CodeMirror.registerHelper("hint", "anyword", function(editor, options) {
17 | var word = options && options.word || WORD;
18 | var range = options && options.range || RANGE;
19 | var cur = editor.getCursor(), curLine = editor.getLine(cur.line);
20 | var end = cur.ch, start = end;
21 | while (start && word.test(curLine.charAt(start - 1))) --start;
22 | var curWord = start != end && curLine.slice(start, end);
23 |
24 | var list = options && options.list || [], seen = {};
25 | var re = new RegExp(word.source, "g");
26 | for (var dir = -1; dir <= 1; dir += 2) {
27 | var line = cur.line, endLine = Math.min(Math.max(line + dir * range, editor.firstLine()), editor.lastLine()) + dir;
28 | for (; line != endLine; line += dir) {
29 | var text = editor.getLine(line), m;
30 | while (m = re.exec(text)) {
31 | if (line == cur.line && m[0] === curWord) continue;
32 | if ((!curWord || m[0].lastIndexOf(curWord, 0) == 0) && !Object.prototype.hasOwnProperty.call(seen, m[0])) {
33 | seen[m[0]] = true;
34 | list.push(m[0]);
35 | }
36 | }
37 | }
38 | }
39 | return {list: list, from: CodeMirror.Pos(cur.line, start), to: CodeMirror.Pos(cur.line, end)};
40 | });
41 | });
42 |
--------------------------------------------------------------------------------
/releases/2/dist/addon/hint/show-hint.css:
--------------------------------------------------------------------------------
1 | .CodeMirror-hints {
2 | position: absolute;
3 | z-index: 10;
4 | overflow: hidden;
5 | list-style: none;
6 |
7 | margin: 0;
8 | padding: 2px;
9 |
10 | -webkit-box-shadow: 2px 3px 5px rgba(0,0,0,.2);
11 | -moz-box-shadow: 2px 3px 5px rgba(0,0,0,.2);
12 | box-shadow: 2px 3px 5px rgba(0,0,0,.2);
13 | border-radius: 3px;
14 | border: 1px solid silver;
15 |
16 | background: white;
17 | font-size: 90%;
18 | font-family: monospace;
19 |
20 | max-height: 20em;
21 | overflow-y: auto;
22 | }
23 |
24 | .CodeMirror-hint {
25 | margin: 0;
26 | padding: 0 4px;
27 | border-radius: 2px;
28 | white-space: pre;
29 | color: black;
30 | cursor: pointer;
31 | }
32 |
33 | li.CodeMirror-hint-active {
34 | background: #08f;
35 | color: white;
36 | }
37 |
--------------------------------------------------------------------------------
/releases/2/dist/addon/lint/coffeescript-lint.js:
--------------------------------------------------------------------------------
1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others
2 | // Distributed under an MIT license: https://codemirror.net/LICENSE
3 |
4 | // Depends on coffeelint.js from http://www.coffeelint.org/js/coffeelint.js
5 |
6 | // declare global: coffeelint
7 |
8 | (function(mod) {
9 | if (typeof exports == "object" && typeof module == "object") // CommonJS
10 | mod(require("../../lib/codemirror"));
11 | else if (typeof define == "function" && define.amd) // AMD
12 | define(["../../lib/codemirror"], mod);
13 | else // Plain browser env
14 | mod(CodeMirror);
15 | })(function(CodeMirror) {
16 | "use strict";
17 |
18 | CodeMirror.registerHelper("lint", "coffeescript", function(text) {
19 | var found = [];
20 | if (!window.coffeelint) {
21 | if (window.console) {
22 | window.console.error("Error: window.coffeelint not defined, CodeMirror CoffeeScript linting cannot run.");
23 | }
24 | return found;
25 | }
26 | var parseError = function(err) {
27 | var loc = err.lineNumber;
28 | found.push({from: CodeMirror.Pos(loc-1, 0),
29 | to: CodeMirror.Pos(loc, 0),
30 | severity: err.level,
31 | message: err.message});
32 | };
33 | try {
34 | var res = coffeelint.lint(text);
35 | for(var i = 0; i < res.length; i++) {
36 | parseError(res[i]);
37 | }
38 | } catch(e) {
39 | found.push({from: CodeMirror.Pos(e.location.first_line, 0),
40 | to: CodeMirror.Pos(e.location.last_line, e.location.last_column),
41 | severity: 'error',
42 | message: e.message});
43 | }
44 | return found;
45 | });
46 |
47 | });
48 |
--------------------------------------------------------------------------------
/releases/2/dist/addon/lint/css-lint.js:
--------------------------------------------------------------------------------
1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others
2 | // Distributed under an MIT license: https://codemirror.net/LICENSE
3 |
4 | // Depends on csslint.js from https://github.com/stubbornella/csslint
5 |
6 | // declare global: CSSLint
7 |
8 | (function(mod) {
9 | if (typeof exports == "object" && typeof module == "object") // CommonJS
10 | mod(require("../../lib/codemirror"));
11 | else if (typeof define == "function" && define.amd) // AMD
12 | define(["../../lib/codemirror"], mod);
13 | else // Plain browser env
14 | mod(CodeMirror);
15 | })(function(CodeMirror) {
16 | "use strict";
17 |
18 | CodeMirror.registerHelper("lint", "css", function(text, options) {
19 | var found = [];
20 | if (!window.CSSLint) {
21 | if (window.console) {
22 | window.console.error("Error: window.CSSLint not defined, CodeMirror CSS linting cannot run.");
23 | }
24 | return found;
25 | }
26 | var results = CSSLint.verify(text, options), messages = results.messages, message = null;
27 | for ( var i = 0; i < messages.length; i++) {
28 | message = messages[i];
29 | var startLine = message.line -1, endLine = message.line -1, startCol = message.col -1, endCol = message.col;
30 | found.push({
31 | from: CodeMirror.Pos(startLine, startCol),
32 | to: CodeMirror.Pos(endLine, endCol),
33 | message: message.message,
34 | severity : message.type
35 | });
36 | }
37 | return found;
38 | });
39 |
40 | });
41 |
--------------------------------------------------------------------------------
/releases/2/dist/addon/lint/html-lint.js:
--------------------------------------------------------------------------------
1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others
2 | // Distributed under an MIT license: https://codemirror.net/LICENSE
3 |
4 | // Depends on htmlhint.js from http://htmlhint.com/js/htmlhint.js
5 |
6 | // declare global: HTMLHint
7 |
8 | (function(mod) {
9 | if (typeof exports == "object" && typeof module == "object") // CommonJS
10 | mod(require("../../lib/codemirror"), require("htmlhint"));
11 | else if (typeof define == "function" && define.amd) // AMD
12 | define(["../../lib/codemirror", "htmlhint"], mod);
13 | else // Plain browser env
14 | mod(CodeMirror, window.HTMLHint);
15 | })(function(CodeMirror, HTMLHint) {
16 | "use strict";
17 |
18 | var defaultRules = {
19 | "tagname-lowercase": true,
20 | "attr-lowercase": true,
21 | "attr-value-double-quotes": true,
22 | "doctype-first": false,
23 | "tag-pair": true,
24 | "spec-char-escape": true,
25 | "id-unique": true,
26 | "src-not-empty": true,
27 | "attr-no-duplication": true
28 | };
29 |
30 | CodeMirror.registerHelper("lint", "html", function(text, options) {
31 | var found = [];
32 | if (HTMLHint && !HTMLHint.verify) {
33 | if(typeof HTMLHint.default !== 'undefined') {
34 | HTMLHint = HTMLHint.default;
35 | } else {
36 | HTMLHint = HTMLHint.HTMLHint;
37 | }
38 | }
39 | if (!HTMLHint) HTMLHint = window.HTMLHint;
40 | if (!HTMLHint) {
41 | if (window.console) {
42 | window.console.error("Error: HTMLHint not found, not defined on window, or not available through define/require, CodeMirror HTML linting cannot run.");
43 | }
44 | return found;
45 | }
46 | var messages = HTMLHint.verify(text, options && options.rules || defaultRules);
47 | for (var i = 0; i < messages.length; i++) {
48 | var message = messages[i];
49 | var startLine = message.line - 1, endLine = message.line - 1, startCol = message.col - 1, endCol = message.col;
50 | found.push({
51 | from: CodeMirror.Pos(startLine, startCol),
52 | to: CodeMirror.Pos(endLine, endCol),
53 | message: message.message,
54 | severity : message.type
55 | });
56 | }
57 | return found;
58 | });
59 | });
60 |
--------------------------------------------------------------------------------
/releases/2/dist/addon/lint/javascript-lint.js:
--------------------------------------------------------------------------------
1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others
2 | // Distributed under an MIT license: https://codemirror.net/LICENSE
3 |
4 | // Depends on jshint.js from https://github.com/jshint/jshint
5 |
6 | (function(mod) {
7 | if (typeof exports == "object" && typeof module == "object") // CommonJS
8 | mod(require("../../lib/codemirror"));
9 | else if (typeof define == "function" && define.amd) // AMD
10 | define(["../../lib/codemirror"], mod);
11 | else // Plain browser env
12 | mod(CodeMirror);
13 | })(function(CodeMirror) {
14 | "use strict";
15 | // declare global: JSHINT
16 |
17 | function validator(text, options) {
18 | if (!window.JSHINT) {
19 | if (window.console) {
20 | window.console.error("Error: window.JSHINT not defined, CodeMirror JavaScript linting cannot run.");
21 | }
22 | return [];
23 | }
24 | if (!options.indent) // JSHint error.character actually is a column index, this fixes underlining on lines using tabs for indentation
25 | options.indent = 1; // JSHint default value is 4
26 | JSHINT(text, options, options.globals);
27 | var errors = JSHINT.data().errors, result = [];
28 | if (errors) parseErrors(errors, result);
29 | return result;
30 | }
31 |
32 | CodeMirror.registerHelper("lint", "javascript", validator);
33 |
34 | function parseErrors(errors, output) {
35 | for ( var i = 0; i < errors.length; i++) {
36 | var error = errors[i];
37 | if (error) {
38 | if (error.line <= 0) {
39 | if (window.console) {
40 | window.console.warn("Cannot display JSHint error (invalid line " + error.line + ")", error);
41 | }
42 | continue;
43 | }
44 |
45 | var start = error.character - 1, end = start + 1;
46 | if (error.evidence) {
47 | var index = error.evidence.substring(start).search(/.\b/);
48 | if (index > -1) {
49 | end += index;
50 | }
51 | }
52 |
53 | // Convert to format expected by validation service
54 | var hint = {
55 | message: error.reason,
56 | severity: error.code ? (error.code.startsWith('W') ? "warning" : "error") : "error",
57 | from: CodeMirror.Pos(error.line - 1, start),
58 | to: CodeMirror.Pos(error.line - 1, end)
59 | };
60 |
61 | output.push(hint);
62 | }
63 | }
64 | }
65 | });
66 |
--------------------------------------------------------------------------------
/releases/2/dist/addon/lint/json-lint.js:
--------------------------------------------------------------------------------
1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others
2 | // Distributed under an MIT license: https://codemirror.net/LICENSE
3 |
4 | // Depends on jsonlint.js from https://github.com/zaach/jsonlint
5 |
6 | // declare global: jsonlint
7 |
8 | (function(mod) {
9 | if (typeof exports == "object" && typeof module == "object") // CommonJS
10 | mod(require("../../lib/codemirror"));
11 | else if (typeof define == "function" && define.amd) // AMD
12 | define(["../../lib/codemirror"], mod);
13 | else // Plain browser env
14 | mod(CodeMirror);
15 | })(function(CodeMirror) {
16 | "use strict";
17 |
18 | CodeMirror.registerHelper("lint", "json", function(text) {
19 | var found = [];
20 | if (!window.jsonlint) {
21 | if (window.console) {
22 | window.console.error("Error: window.jsonlint not defined, CodeMirror JSON linting cannot run.");
23 | }
24 | return found;
25 | }
26 | // for jsonlint's web dist jsonlint is exported as an object with a single property parser, of which parseError
27 | // is a subproperty
28 | var jsonlint = window.jsonlint.parser || window.jsonlint
29 | jsonlint.parseError = function(str, hash) {
30 | var loc = hash.loc;
31 | found.push({from: CodeMirror.Pos(loc.first_line - 1, loc.first_column),
32 | to: CodeMirror.Pos(loc.last_line - 1, loc.last_column),
33 | message: str});
34 | };
35 | try { jsonlint.parse(text); }
36 | catch(e) {}
37 | return found;
38 | });
39 |
40 | });
41 |
--------------------------------------------------------------------------------
/releases/2/dist/addon/lint/yaml-lint.js:
--------------------------------------------------------------------------------
1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others
2 | // Distributed under an MIT license: https://codemirror.net/LICENSE
3 |
4 | (function(mod) {
5 | if (typeof exports == "object" && typeof module == "object") // CommonJS
6 | mod(require("../../lib/codemirror"));
7 | else if (typeof define == "function" && define.amd) // AMD
8 | define(["../../lib/codemirror"], mod);
9 | else // Plain browser env
10 | mod(CodeMirror);
11 | })(function(CodeMirror) {
12 | "use strict";
13 |
14 | // Depends on js-yaml.js from https://github.com/nodeca/js-yaml
15 |
16 | // declare global: jsyaml
17 |
18 | CodeMirror.registerHelper("lint", "yaml", function(text) {
19 | var found = [];
20 | if (!window.jsyaml) {
21 | if (window.console) {
22 | window.console.error("Error: window.jsyaml not defined, CodeMirror YAML linting cannot run.");
23 | }
24 | return found;
25 | }
26 | try { jsyaml.loadAll(text); }
27 | catch(e) {
28 | var loc = e.mark,
29 | // js-yaml YAMLException doesn't always provide an accurate lineno
30 | // e.g., when there are multiple yaml docs
31 | // ---
32 | // ---
33 | // foo:bar
34 | from = loc ? CodeMirror.Pos(loc.line, loc.column) : CodeMirror.Pos(0, 0),
35 | to = from;
36 | found.push({ from: from, to: to, message: e.message });
37 | }
38 | return found;
39 | });
40 |
41 | });
42 |
--------------------------------------------------------------------------------
/releases/2/dist/addon/mode/multiplex_test.js:
--------------------------------------------------------------------------------
1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others
2 | // Distributed under an MIT license: https://codemirror.net/LICENSE
3 |
4 | (function() {
5 | CodeMirror.defineMode("markdown_with_stex", function(){
6 | var inner = CodeMirror.getMode({}, "stex");
7 | var outer = CodeMirror.getMode({}, "markdown");
8 |
9 | var innerOptions = {
10 | open: '$',
11 | close: '$',
12 | mode: inner,
13 | delimStyle: 'delim',
14 | innerStyle: 'inner'
15 | };
16 |
17 | return CodeMirror.multiplexingMode(outer, innerOptions);
18 | });
19 |
20 | var mode = CodeMirror.getMode({}, "markdown_with_stex");
21 |
22 | function MT(name) {
23 | test.mode(
24 | name,
25 | mode,
26 | Array.prototype.slice.call(arguments, 1),
27 | 'multiplexing');
28 | }
29 |
30 | MT(
31 | "stexInsideMarkdown",
32 | "[strong **Equation:**] [delim&delim-open $][inner&tag \\pi][delim&delim-close $]");
33 |
34 | CodeMirror.defineMode("identical_delim_multiplex", function() {
35 | return CodeMirror.multiplexingMode(CodeMirror.getMode({indentUnit: 2}, "javascript"), {
36 | open: "#",
37 | close: "#",
38 | mode: CodeMirror.getMode({}, "markdown"),
39 | parseDelimiters: true,
40 | innerStyle: "q"
41 | });
42 | });
43 |
44 | var mode2 = CodeMirror.getMode({}, "identical_delim_multiplex");
45 |
46 | test.mode("identical_delimiters_with_parseDelimiters", mode2, [
47 | "[keyword let] [def x] [operator =] [q #foo][q&em *bar*][q #];"
48 | ], "multiplexing")
49 | })();
50 |
--------------------------------------------------------------------------------
/releases/2/dist/addon/runmode/colorize.js:
--------------------------------------------------------------------------------
1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others
2 | // Distributed under an MIT license: https://codemirror.net/LICENSE
3 |
4 | (function(mod) {
5 | if (typeof exports == "object" && typeof module == "object") // CommonJS
6 | mod(require("../../lib/codemirror"), require("./runmode"));
7 | else if (typeof define == "function" && define.amd) // AMD
8 | define(["../../lib/codemirror", "./runmode"], mod);
9 | else // Plain browser env
10 | mod(CodeMirror);
11 | })(function(CodeMirror) {
12 | "use strict";
13 |
14 | var isBlock = /^(p|li|div|h\\d|pre|blockquote|td)$/;
15 |
16 | function textContent(node, out) {
17 | if (node.nodeType == 3) return out.push(node.nodeValue);
18 | for (var ch = node.firstChild; ch; ch = ch.nextSibling) {
19 | textContent(ch, out);
20 | if (isBlock.test(node.nodeType)) out.push("\n");
21 | }
22 | }
23 |
24 | CodeMirror.colorize = function(collection, defaultMode) {
25 | if (!collection) collection = document.body.getElementsByTagName("pre");
26 |
27 | for (var i = 0; i < collection.length; ++i) {
28 | var node = collection[i];
29 | var mode = node.getAttribute("data-lang") || defaultMode;
30 | if (!mode) continue;
31 |
32 | var text = [];
33 | textContent(node, text);
34 | node.innerHTML = "";
35 | CodeMirror.runMode(text.join(""), mode, node);
36 |
37 | node.className += " cm-s-default";
38 | }
39 | };
40 | });
41 |
--------------------------------------------------------------------------------
/releases/2/dist/addon/scroll/scrollpastend.js:
--------------------------------------------------------------------------------
1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others
2 | // Distributed under an MIT license: https://codemirror.net/LICENSE
3 |
4 | (function(mod) {
5 | if (typeof exports == "object" && typeof module == "object") // CommonJS
6 | mod(require("../../lib/codemirror"));
7 | else if (typeof define == "function" && define.amd) // AMD
8 | define(["../../lib/codemirror"], mod);
9 | else // Plain browser env
10 | mod(CodeMirror);
11 | })(function(CodeMirror) {
12 | "use strict";
13 |
14 | CodeMirror.defineOption("scrollPastEnd", false, function(cm, val, old) {
15 | if (old && old != CodeMirror.Init) {
16 | cm.off("change", onChange);
17 | cm.off("refresh", updateBottomMargin);
18 | cm.display.lineSpace.parentNode.style.paddingBottom = "";
19 | cm.state.scrollPastEndPadding = null;
20 | }
21 | if (val) {
22 | cm.on("change", onChange);
23 | cm.on("refresh", updateBottomMargin);
24 | updateBottomMargin(cm);
25 | }
26 | });
27 |
28 | function onChange(cm, change) {
29 | if (CodeMirror.changeEnd(change).line == cm.lastLine())
30 | updateBottomMargin(cm);
31 | }
32 |
33 | function updateBottomMargin(cm) {
34 | var padding = "";
35 | if (cm.lineCount() > 1) {
36 | var totalH = cm.display.scroller.clientHeight - 30,
37 | lastLineH = cm.getLineHandle(cm.lastLine()).height;
38 | padding = (totalH - lastLineH) + "px";
39 | }
40 | if (cm.state.scrollPastEndPadding != padding) {
41 | cm.state.scrollPastEndPadding = padding;
42 | cm.display.lineSpace.parentNode.style.paddingBottom = padding;
43 | cm.off("refresh", updateBottomMargin);
44 | cm.setSize();
45 | cm.on("refresh", updateBottomMargin);
46 | }
47 | }
48 | });
49 |
--------------------------------------------------------------------------------
/releases/2/dist/addon/scroll/simplescrollbars.css:
--------------------------------------------------------------------------------
1 | .CodeMirror-simplescroll-horizontal div, .CodeMirror-simplescroll-vertical div {
2 | position: absolute;
3 | background: #ccc;
4 | -moz-box-sizing: border-box;
5 | box-sizing: border-box;
6 | border: 1px solid #bbb;
7 | border-radius: 2px;
8 | }
9 |
10 | .CodeMirror-simplescroll-horizontal, .CodeMirror-simplescroll-vertical {
11 | position: absolute;
12 | z-index: 6;
13 | background: #eee;
14 | }
15 |
16 | .CodeMirror-simplescroll-horizontal {
17 | bottom: 0; left: 0;
18 | height: 8px;
19 | }
20 | .CodeMirror-simplescroll-horizontal div {
21 | bottom: 0;
22 | height: 100%;
23 | }
24 |
25 | .CodeMirror-simplescroll-vertical {
26 | right: 0; top: 0;
27 | width: 8px;
28 | }
29 | .CodeMirror-simplescroll-vertical div {
30 | right: 0;
31 | width: 100%;
32 | }
33 |
34 |
35 | .CodeMirror-overlayscroll .CodeMirror-scrollbar-filler, .CodeMirror-overlayscroll .CodeMirror-gutter-filler {
36 | display: none;
37 | }
38 |
39 | .CodeMirror-overlayscroll-horizontal div, .CodeMirror-overlayscroll-vertical div {
40 | position: absolute;
41 | background: #bcd;
42 | border-radius: 3px;
43 | }
44 |
45 | .CodeMirror-overlayscroll-horizontal, .CodeMirror-overlayscroll-vertical {
46 | position: absolute;
47 | z-index: 6;
48 | }
49 |
50 | .CodeMirror-overlayscroll-horizontal {
51 | bottom: 0; left: 0;
52 | height: 6px;
53 | }
54 | .CodeMirror-overlayscroll-horizontal div {
55 | bottom: 0;
56 | height: 100%;
57 | }
58 |
59 | .CodeMirror-overlayscroll-vertical {
60 | right: 0; top: 0;
61 | width: 6px;
62 | }
63 | .CodeMirror-overlayscroll-vertical div {
64 | right: 0;
65 | width: 100%;
66 | }
67 |
--------------------------------------------------------------------------------
/releases/2/dist/addon/search/jump-to-line.js:
--------------------------------------------------------------------------------
1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others
2 | // Distributed under an MIT license: https://codemirror.net/LICENSE
3 |
4 | // Defines jumpToLine command. Uses dialog.js if present.
5 |
6 | (function(mod) {
7 | if (typeof exports == "object" && typeof module == "object") // CommonJS
8 | mod(require("../../lib/codemirror"), require("../dialog/dialog"));
9 | else if (typeof define == "function" && define.amd) // AMD
10 | define(["../../lib/codemirror", "../dialog/dialog"], mod);
11 | else // Plain browser env
12 | mod(CodeMirror);
13 | })(function(CodeMirror) {
14 | "use strict";
15 |
16 | // default search panel location
17 | CodeMirror.defineOption("search", {bottom: false});
18 |
19 | function dialog(cm, text, shortText, deflt, f) {
20 | if (cm.openDialog) cm.openDialog(text, f, {value: deflt, selectValueOnOpen: true, bottom: cm.options.search.bottom});
21 | else f(prompt(shortText, deflt));
22 | }
23 |
24 | function getJumpDialog(cm) {
25 | return cm.phrase("Jump to line:") + ' ' + cm.phrase("(Use line:column or scroll% syntax)") + ' ';
26 | }
27 |
28 | function interpretLine(cm, string) {
29 | var num = Number(string)
30 | if (/^[-+]/.test(string)) return cm.getCursor().line + num
31 | else return num - 1
32 | }
33 |
34 | CodeMirror.commands.jumpToLine = function(cm) {
35 | var cur = cm.getCursor();
36 | dialog(cm, getJumpDialog(cm), cm.phrase("Jump to line:"), (cur.line + 1) + ":" + cur.ch, function(posStr) {
37 | if (!posStr) return;
38 |
39 | var match;
40 | if (match = /^\s*([\+\-]?\d+)\s*\:\s*(\d+)\s*$/.exec(posStr)) {
41 | cm.setCursor(interpretLine(cm, match[1]), Number(match[2]))
42 | } else if (match = /^\s*([\+\-]?\d+(\.\d+)?)\%\s*/.exec(posStr)) {
43 | var line = Math.round(cm.lineCount() * Number(match[1]) / 100);
44 | if (/^[-+]/.test(match[1])) line = cur.line + line + 1;
45 | cm.setCursor(line - 1, cur.ch);
46 | } else if (match = /^\s*\:?\s*([\+\-]?\d+)\s*/.exec(posStr)) {
47 | cm.setCursor(interpretLine(cm, match[1]), cur.ch);
48 | }
49 | });
50 | };
51 |
52 | CodeMirror.keyMap["default"]["Alt-G"] = "jumpToLine";
53 | });
54 |
--------------------------------------------------------------------------------
/releases/2/dist/addon/search/matchesonscrollbar.css:
--------------------------------------------------------------------------------
1 | .CodeMirror-search-match {
2 | background: gold;
3 | border-top: 1px solid orange;
4 | border-bottom: 1px solid orange;
5 | -moz-box-sizing: border-box;
6 | box-sizing: border-box;
7 | opacity: .5;
8 | }
9 |
--------------------------------------------------------------------------------
/releases/2/dist/addon/tern/tern.css:
--------------------------------------------------------------------------------
1 | .CodeMirror-Tern-completion {
2 | padding-left: 22px;
3 | position: relative;
4 | line-height: 1.5;
5 | }
6 | .CodeMirror-Tern-completion:before {
7 | position: absolute;
8 | left: 2px;
9 | bottom: 2px;
10 | border-radius: 50%;
11 | font-size: 12px;
12 | font-weight: bold;
13 | height: 15px;
14 | width: 15px;
15 | line-height: 16px;
16 | text-align: center;
17 | color: white;
18 | -moz-box-sizing: border-box;
19 | box-sizing: border-box;
20 | }
21 | .CodeMirror-Tern-completion-unknown:before {
22 | content: "?";
23 | background: #4bb;
24 | }
25 | .CodeMirror-Tern-completion-object:before {
26 | content: "O";
27 | background: #77c;
28 | }
29 | .CodeMirror-Tern-completion-fn:before {
30 | content: "F";
31 | background: #7c7;
32 | }
33 | .CodeMirror-Tern-completion-array:before {
34 | content: "A";
35 | background: #c66;
36 | }
37 | .CodeMirror-Tern-completion-number:before {
38 | content: "1";
39 | background: #999;
40 | }
41 | .CodeMirror-Tern-completion-string:before {
42 | content: "S";
43 | background: #999;
44 | }
45 | .CodeMirror-Tern-completion-bool:before {
46 | content: "B";
47 | background: #999;
48 | }
49 |
50 | .CodeMirror-Tern-completion-guess {
51 | color: #999;
52 | }
53 |
54 | .CodeMirror-Tern-tooltip {
55 | border: 1px solid silver;
56 | border-radius: 3px;
57 | color: #444;
58 | padding: 2px 5px;
59 | font-size: 90%;
60 | font-family: monospace;
61 | background-color: white;
62 | white-space: pre-wrap;
63 |
64 | max-width: 40em;
65 | position: absolute;
66 | z-index: 10;
67 | -webkit-box-shadow: 2px 3px 5px rgba(0,0,0,.2);
68 | -moz-box-shadow: 2px 3px 5px rgba(0,0,0,.2);
69 | box-shadow: 2px 3px 5px rgba(0,0,0,.2);
70 |
71 | transition: opacity 1s;
72 | -moz-transition: opacity 1s;
73 | -webkit-transition: opacity 1s;
74 | -o-transition: opacity 1s;
75 | -ms-transition: opacity 1s;
76 | }
77 |
78 | .CodeMirror-Tern-hint-doc {
79 | max-width: 25em;
80 | margin-top: -3px;
81 | }
82 |
83 | .CodeMirror-Tern-fname { color: black; }
84 | .CodeMirror-Tern-farg { color: #70a; }
85 | .CodeMirror-Tern-farg-current { text-decoration: underline; }
86 | .CodeMirror-Tern-type { color: #07c; }
87 | .CodeMirror-Tern-fhint-guess { opacity: .7; }
88 |
--------------------------------------------------------------------------------
/releases/2/dist/addon/tern/worker.js:
--------------------------------------------------------------------------------
1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others
2 | // Distributed under an MIT license: https://codemirror.net/LICENSE
3 |
4 | // declare global: tern, server
5 |
6 | var server;
7 |
8 | this.onmessage = function(e) {
9 | var data = e.data;
10 | switch (data.type) {
11 | case "init": return startServer(data.defs, data.plugins, data.scripts);
12 | case "add": return server.addFile(data.name, data.text);
13 | case "del": return server.delFile(data.name);
14 | case "req": return server.request(data.body, function(err, reqData) {
15 | postMessage({id: data.id, body: reqData, err: err && String(err)});
16 | });
17 | case "getFile":
18 | var c = pending[data.id];
19 | delete pending[data.id];
20 | return c(data.err, data.text);
21 | default: throw new Error("Unknown message type: " + data.type);
22 | }
23 | };
24 |
25 | var nextId = 0, pending = {};
26 | function getFile(file, c) {
27 | postMessage({type: "getFile", name: file, id: ++nextId});
28 | pending[nextId] = c;
29 | }
30 |
31 | function startServer(defs, plugins, scripts) {
32 | if (scripts) importScripts.apply(null, scripts);
33 |
34 | server = new tern.Server({
35 | getFile: getFile,
36 | async: true,
37 | defs: defs,
38 | plugins: plugins
39 | });
40 | }
41 |
42 | this.console = {
43 | log: function(v) { postMessage({type: "debug", message: v}); }
44 | };
45 |
--------------------------------------------------------------------------------
/releases/2/dist/assets/fonts/sb-Bold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadhinvr/web-builder/2b12ea88c558a4960530c99d45c69d0e71bb7ecc/releases/2/dist/assets/fonts/sb-Bold.ttf
--------------------------------------------------------------------------------
/releases/2/dist/assets/fonts/sb-Medium.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadhinvr/web-builder/2b12ea88c558a4960530c99d45c69d0e71bb7ecc/releases/2/dist/assets/fonts/sb-Medium.ttf
--------------------------------------------------------------------------------
/releases/2/dist/assets/fonts/sb-thin.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadhinvr/web-builder/2b12ea88c558a4960530c99d45c69d0e71bb7ecc/releases/2/dist/assets/fonts/sb-thin.ttf
--------------------------------------------------------------------------------
/releases/2/dist/assets/gitshot/basic.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadhinvr/web-builder/2b12ea88c558a4960530c99d45c69d0e71bb7ecc/releases/2/dist/assets/gitshot/basic.gif
--------------------------------------------------------------------------------
/releases/2/dist/assets/gitshot/basic2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadhinvr/web-builder/2b12ea88c558a4960530c99d45c69d0e71bb7ecc/releases/2/dist/assets/gitshot/basic2.gif
--------------------------------------------------------------------------------
/releases/2/dist/assets/gitshot/basic3.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadhinvr/web-builder/2b12ea88c558a4960530c99d45c69d0e71bb7ecc/releases/2/dist/assets/gitshot/basic3.gif
--------------------------------------------------------------------------------
/releases/2/dist/assets/gitshot/code-css.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadhinvr/web-builder/2b12ea88c558a4960530c99d45c69d0e71bb7ecc/releases/2/dist/assets/gitshot/code-css.png
--------------------------------------------------------------------------------
/releases/2/dist/assets/gitshot/code-html.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadhinvr/web-builder/2b12ea88c558a4960530c99d45c69d0e71bb7ecc/releases/2/dist/assets/gitshot/code-html.png
--------------------------------------------------------------------------------
/releases/2/dist/assets/gitshot/code-js.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadhinvr/web-builder/2b12ea88c558a4960530c99d45c69d0e71bb7ecc/releases/2/dist/assets/gitshot/code-js.png
--------------------------------------------------------------------------------
/releases/2/dist/assets/gitshot/elements.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadhinvr/web-builder/2b12ea88c558a4960530c99d45c69d0e71bb7ecc/releases/2/dist/assets/gitshot/elements.png
--------------------------------------------------------------------------------
/releases/2/dist/assets/gitshot/style.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadhinvr/web-builder/2b12ea88c558a4960530c99d45c69d0e71bb7ecc/releases/2/dist/assets/gitshot/style.png
--------------------------------------------------------------------------------
/releases/2/dist/assets/images/add (1).svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
7 |
10 |
11 |
12 |
14 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/releases/2/dist/assets/images/add-img.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/releases/2/dist/assets/images/audio.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
6 |
7 |
8 |
10 |
12 |
14 |
16 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/releases/2/dist/assets/images/bracket .svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/releases/2/dist/assets/images/cross.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/releases/2/dist/assets/images/div.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
8 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/releases/2/dist/assets/images/drop.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/releases/2/dist/assets/images/favicon.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/releases/2/dist/assets/images/frame.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
7 |
9 |
10 |
11 |
12 |
13 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
--------------------------------------------------------------------------------
/releases/2/dist/assets/images/grid.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/releases/2/dist/assets/images/heading.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
8 |
9 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
--------------------------------------------------------------------------------
/releases/2/dist/assets/images/image.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/releases/2/dist/assets/images/layers.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/releases/2/dist/assets/images/link.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
7 |
8 |
12 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/releases/2/dist/assets/images/loading.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/releases/2/dist/assets/images/logo-b.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/releases/2/dist/assets/images/logo-bl.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/releases/2/dist/assets/images/logo-db.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/releases/2/dist/assets/images/logo-g.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/releases/2/dist/assets/images/logo-gr.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/releases/2/dist/assets/images/logo-p.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/releases/2/dist/assets/images/logo-r.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/releases/2/dist/assets/images/logo-wf.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/releases/2/dist/assets/images/logo.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/releases/2/dist/assets/images/meta-img.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadhinvr/web-builder/2b12ea88c558a4960530c99d45c69d0e71bb7ecc/releases/2/dist/assets/images/meta-img.jpeg
--------------------------------------------------------------------------------
/releases/2/dist/assets/images/paragraph.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
8 |
9 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/releases/2/dist/assets/images/picture.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/releases/2/dist/assets/images/right-arrow.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
7 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/releases/2/dist/assets/images/sample/1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadhinvr/web-builder/2b12ea88c558a4960530c99d45c69d0e71bb7ecc/releases/2/dist/assets/images/sample/1.jpg
--------------------------------------------------------------------------------
/releases/2/dist/assets/images/sample/10.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadhinvr/web-builder/2b12ea88c558a4960530c99d45c69d0e71bb7ecc/releases/2/dist/assets/images/sample/10.jpg
--------------------------------------------------------------------------------
/releases/2/dist/assets/images/sample/11.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadhinvr/web-builder/2b12ea88c558a4960530c99d45c69d0e71bb7ecc/releases/2/dist/assets/images/sample/11.jpg
--------------------------------------------------------------------------------
/releases/2/dist/assets/images/sample/12.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadhinvr/web-builder/2b12ea88c558a4960530c99d45c69d0e71bb7ecc/releases/2/dist/assets/images/sample/12.jpg
--------------------------------------------------------------------------------
/releases/2/dist/assets/images/sample/13.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadhinvr/web-builder/2b12ea88c558a4960530c99d45c69d0e71bb7ecc/releases/2/dist/assets/images/sample/13.jpg
--------------------------------------------------------------------------------
/releases/2/dist/assets/images/sample/14.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadhinvr/web-builder/2b12ea88c558a4960530c99d45c69d0e71bb7ecc/releases/2/dist/assets/images/sample/14.jpg
--------------------------------------------------------------------------------
/releases/2/dist/assets/images/sample/15.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadhinvr/web-builder/2b12ea88c558a4960530c99d45c69d0e71bb7ecc/releases/2/dist/assets/images/sample/15.jpg
--------------------------------------------------------------------------------
/releases/2/dist/assets/images/sample/2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadhinvr/web-builder/2b12ea88c558a4960530c99d45c69d0e71bb7ecc/releases/2/dist/assets/images/sample/2.jpg
--------------------------------------------------------------------------------
/releases/2/dist/assets/images/sample/3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadhinvr/web-builder/2b12ea88c558a4960530c99d45c69d0e71bb7ecc/releases/2/dist/assets/images/sample/3.jpg
--------------------------------------------------------------------------------
/releases/2/dist/assets/images/sample/4.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadhinvr/web-builder/2b12ea88c558a4960530c99d45c69d0e71bb7ecc/releases/2/dist/assets/images/sample/4.jpg
--------------------------------------------------------------------------------
/releases/2/dist/assets/images/sample/5.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadhinvr/web-builder/2b12ea88c558a4960530c99d45c69d0e71bb7ecc/releases/2/dist/assets/images/sample/5.jpg
--------------------------------------------------------------------------------
/releases/2/dist/assets/images/sample/6.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadhinvr/web-builder/2b12ea88c558a4960530c99d45c69d0e71bb7ecc/releases/2/dist/assets/images/sample/6.jpg
--------------------------------------------------------------------------------
/releases/2/dist/assets/images/sample/7.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadhinvr/web-builder/2b12ea88c558a4960530c99d45c69d0e71bb7ecc/releases/2/dist/assets/images/sample/7.jpg
--------------------------------------------------------------------------------
/releases/2/dist/assets/images/sample/8.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadhinvr/web-builder/2b12ea88c558a4960530c99d45c69d0e71bb7ecc/releases/2/dist/assets/images/sample/8.jpg
--------------------------------------------------------------------------------
/releases/2/dist/assets/images/sample/9.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadhinvr/web-builder/2b12ea88c558a4960530c99d45c69d0e71bb7ecc/releases/2/dist/assets/images/sample/9.jpg
--------------------------------------------------------------------------------
/releases/2/dist/assets/images/sample/resized/1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadhinvr/web-builder/2b12ea88c558a4960530c99d45c69d0e71bb7ecc/releases/2/dist/assets/images/sample/resized/1.jpg
--------------------------------------------------------------------------------
/releases/2/dist/assets/images/sample/resized/10.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadhinvr/web-builder/2b12ea88c558a4960530c99d45c69d0e71bb7ecc/releases/2/dist/assets/images/sample/resized/10.jpg
--------------------------------------------------------------------------------
/releases/2/dist/assets/images/sample/resized/2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadhinvr/web-builder/2b12ea88c558a4960530c99d45c69d0e71bb7ecc/releases/2/dist/assets/images/sample/resized/2.jpg
--------------------------------------------------------------------------------
/releases/2/dist/assets/images/sample/resized/3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadhinvr/web-builder/2b12ea88c558a4960530c99d45c69d0e71bb7ecc/releases/2/dist/assets/images/sample/resized/3.jpg
--------------------------------------------------------------------------------
/releases/2/dist/assets/images/sample/resized/4.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadhinvr/web-builder/2b12ea88c558a4960530c99d45c69d0e71bb7ecc/releases/2/dist/assets/images/sample/resized/4.jpg
--------------------------------------------------------------------------------
/releases/2/dist/assets/images/sample/resized/5.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadhinvr/web-builder/2b12ea88c558a4960530c99d45c69d0e71bb7ecc/releases/2/dist/assets/images/sample/resized/5.jpg
--------------------------------------------------------------------------------
/releases/2/dist/assets/images/sample/resized/6.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadhinvr/web-builder/2b12ea88c558a4960530c99d45c69d0e71bb7ecc/releases/2/dist/assets/images/sample/resized/6.jpg
--------------------------------------------------------------------------------
/releases/2/dist/assets/images/sample/resized/7.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadhinvr/web-builder/2b12ea88c558a4960530c99d45c69d0e71bb7ecc/releases/2/dist/assets/images/sample/resized/7.jpg
--------------------------------------------------------------------------------
/releases/2/dist/assets/images/sample/resized/8.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadhinvr/web-builder/2b12ea88c558a4960530c99d45c69d0e71bb7ecc/releases/2/dist/assets/images/sample/resized/8.jpg
--------------------------------------------------------------------------------
/releases/2/dist/assets/images/sample/resized/9.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadhinvr/web-builder/2b12ea88c558a4960530c99d45c69d0e71bb7ecc/releases/2/dist/assets/images/sample/resized/9.jpg
--------------------------------------------------------------------------------
/releases/2/dist/assets/images/section.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
--------------------------------------------------------------------------------
/releases/2/dist/assets/images/star.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/releases/2/dist/assets/images/style.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/releases/2/dist/assets/images/video.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
7 |
9 |
10 |
11 |
12 |
13 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
--------------------------------------------------------------------------------
/releases/2/dist/assets/media/audio.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadhinvr/web-builder/2b12ea88c558a4960530c99d45c69d0e71bb7ecc/releases/2/dist/assets/media/audio.mp3
--------------------------------------------------------------------------------
/releases/2/dist/assets/media/video.mp4:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sadhinvr/web-builder/2b12ea88c558a4960530c99d45c69d0e71bb7ecc/releases/2/dist/assets/media/video.mp4
--------------------------------------------------------------------------------
/releases/2/dist/mode/css/gss_test.js:
--------------------------------------------------------------------------------
1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others
2 | // Distributed under an MIT license: https://codemirror.net/LICENSE
3 |
4 | (function() {
5 | "use strict";
6 |
7 | var mode = CodeMirror.getMode({indentUnit: 2}, "text/x-gss");
8 | function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1), "gss"); }
9 |
10 | MT("atComponent",
11 | "[def @component] {",
12 | "[tag foo] {",
13 | " [property color]: [keyword black];",
14 | "}",
15 | "}");
16 |
17 | })();
18 |
--------------------------------------------------------------------------------
/releases/2/dist/mode/css/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | CodeMirror: CSS mode
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
27 |
28 |
29 | CSS mode
30 |
31 | /* Some example CSS */
32 |
33 | @import url("something.css");
34 |
35 | body {
36 | margin: 0;
37 | padding: 3em 6em;
38 | font-family: tahoma, arial, sans-serif;
39 | color: #000;
40 | }
41 |
42 | #navigation a {
43 | font-weight: bold;
44 | text-decoration: none !important;
45 | }
46 |
47 | h1 {
48 | font-size: 2.5em;
49 | }
50 |
51 | h2 {
52 | font-size: 1.7em;
53 | }
54 |
55 | h1:before, h2:before {
56 | content: "::";
57 | }
58 |
59 | code {
60 | font-family: courier, monospace;
61 | font-size: 80%;
62 | color: #418A8A;
63 | }
64 |
65 |
70 |
71 | CSS mode supports this option:
72 |
73 | highlightNonStandardPropertyKeywords : boolean
74 | Whether to highlight non-standard CSS property keywords such as margin-inline
or zoom
(default: true
).
75 |
76 |
77 | MIME types defined: text/css
, text/x-scss
(demo ), text/x-less
(demo ).
78 |
79 | Parsing/Highlighting Tests: normal , verbose .
80 |
81 |
82 |
--------------------------------------------------------------------------------
/releases/2/dist/mode/css/less_test.js:
--------------------------------------------------------------------------------
1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others
2 | // Distributed under an MIT license: https://codemirror.net/LICENSE
3 |
4 | (function() {
5 | "use strict";
6 |
7 | var mode = CodeMirror.getMode({indentUnit: 2}, "text/x-less");
8 | function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1), "less"); }
9 |
10 | MT("variable",
11 | "[variable-2 @base]: [atom #f04615];",
12 | "[qualifier .class] {",
13 | " [property width]: [variable&callee percentage]([number 0.5]); [comment // returns `50%`]",
14 | " [property color]: [variable&callee saturate]([variable-2 @base], [number 5%]);",
15 | "}");
16 |
17 | MT("amp",
18 | "[qualifier .child], [qualifier .sibling] {",
19 | " [qualifier .parent] [atom &] {",
20 | " [property color]: [keyword black];",
21 | " }",
22 | " [atom &] + [atom &] {",
23 | " [property color]: [keyword red];",
24 | " }",
25 | "}");
26 |
27 | MT("mixin",
28 | "[qualifier .mixin] ([variable dark]; [variable-2 @color]) {",
29 | " [property color]: [variable&callee darken]([variable-2 @color], [number 10%]);",
30 | "}",
31 | "[qualifier .mixin] ([variable light]; [variable-2 @color]) {",
32 | " [property color]: [variable&callee lighten]([variable-2 @color], [number 10%]);",
33 | "}",
34 | "[qualifier .mixin] ([variable-2 @_]; [variable-2 @color]) {",
35 | " [property display]: [atom block];",
36 | "}",
37 | "[variable-2 @switch]: [variable light];",
38 | "[qualifier .class] {",
39 | " [qualifier .mixin]([variable-2 @switch]; [atom #888]);",
40 | "}");
41 |
42 | MT("nest",
43 | "[qualifier .one] {",
44 | " [def @media] ([property width]: [number 400px]) {",
45 | " [property font-size]: [number 1.2em];",
46 | " [def @media] [attribute print] [keyword and] [property color] {",
47 | " [property color]: [keyword blue];",
48 | " }",
49 | " }",
50 | "}");
51 |
52 |
53 | MT("interpolation", ".@{[variable foo]} { [property font-weight]: [atom bold]; }");
54 | })();
55 |
--------------------------------------------------------------------------------
/releases/2/dist/mode/javascript/json-ld.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | CodeMirror: JSON-LD mode
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
27 |
28 |
29 | JSON-LD mode
30 |
31 |
32 |
33 | {
34 | "@context": {
35 | "name": "http://schema.org/name",
36 | "description": "http://schema.org/description",
37 | "image": {
38 | "@id": "http://schema.org/image",
39 | "@type": "@id"
40 | },
41 | "geo": "http://schema.org/geo",
42 | "latitude": {
43 | "@id": "http://schema.org/latitude",
44 | "@type": "xsd:float"
45 | },
46 | "longitude": {
47 | "@id": "http://schema.org/longitude",
48 | "@type": "xsd:float"
49 | },
50 | "xsd": "http://www.w3.org/2001/XMLSchema#"
51 | },
52 | "name": "The Empire State Building",
53 | "description": "The Empire State Building is a 102-story landmark in New York City.",
54 | "image": "http://www.civil.usherbrooke.ca/cours/gci215a/empire-state-building.jpg",
55 | "geo": {
56 | "latitude": "40.75",
57 | "longitude": "73.98"
58 | }
59 | }
60 |
61 |
62 |
70 |
71 | This is a specialization of the JavaScript mode .
72 |
73 |
--------------------------------------------------------------------------------
/releases/2/dist/mode/javascript/typescript.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | CodeMirror: TypeScript mode
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
25 |
26 |
27 | TypeScript mode
28 |
29 |
30 |
31 | class Greeter {
32 | greeting: string;
33 | constructor (message: string) {
34 | this.greeting = message;
35 | }
36 | greet() {
37 | return "Hello, " + this.greeting;
38 | }
39 | }
40 |
41 | var greeter = new Greeter("world");
42 |
43 | var button = document.createElement('button')
44 | button.innerText = "Say Hello"
45 | button.onclick = function() {
46 | alert(greeter.greet())
47 | }
48 |
49 | document.body.appendChild(button)
50 |
51 |
52 |
53 |
60 |
61 | This is a specialization of the JavaScript mode .
62 |
63 |
--------------------------------------------------------------------------------
/releases/2/dist/mode/vbscript/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | CodeMirror: VBScript mode
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
24 |
25 |
26 | VBScript mode
27 |
28 |
29 |
30 | ' Pete Guhl
31 | ' 03-04-2012
32 | '
33 | ' Basic VBScript support for codemirror2
34 |
35 | Const ForReading = 1, ForWriting = 2, ForAppending = 8
36 |
37 | Call Sub020_PostBroadcastToUrbanAirship(strUserName, strPassword, intTransmitID, strResponse)
38 |
39 | If Not IsNull(strResponse) AND Len(strResponse) = 0 Then
40 | boolTransmitOkYN = False
41 | Else
42 | ' WScript.Echo "Oh Happy Day! Oh Happy DAY!"
43 | boolTransmitOkYN = True
44 | End If
45 |
46 |
47 |
53 |
54 | MIME types defined: text/vbscript
.
55 |
56 |
--------------------------------------------------------------------------------
/releases/2/dist/mode/xml/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | CodeMirror: XML mode
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
24 |
25 |
26 | XML mode
27 |
28 | <html style="color: green">
29 | <!-- this is a comment -->
30 | <head>
31 | <title>HTML Example</title>
32 | </head>
33 | <body>
34 | The indentation tries to be <em>somewhat "do what
35 | I mean"</em>... but might not match your style.
36 | </body>
37 | </html>
38 |
39 |
45 | The XML mode supports these configuration parameters:
46 |
47 | htmlMode (boolean)
48 | This switches the mode to parse HTML instead of XML. This
49 | means attributes do not have to be quoted, and some elements
50 | (such as br
) do not require a closing tag.
51 | matchClosing (boolean)
52 | Controls whether the mode checks that close tags match the
53 | corresponding opening tag, and highlights mismatches as errors.
54 | Defaults to true.
55 | alignCDATA (boolean)
56 | Setting this to true will force the opening tag of CDATA
57 | blocks to not be indented.
58 |
59 |
60 | MIME types defined: application/xml
, text/html
.
61 |
62 |
--------------------------------------------------------------------------------
/releases/2/dist/mode/xml/test.js:
--------------------------------------------------------------------------------
1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others
2 | // Distributed under an MIT license: https://codemirror.net/LICENSE
3 |
4 | (function() {
5 | var mode = CodeMirror.getMode({indentUnit: 2}, "xml"), mname = "xml";
6 | function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1), mname); }
7 |
8 | MT("matching",
9 | "[tag&bracket <][tag top][tag&bracket >]",
10 | " text",
11 | " [tag&bracket <][tag inner][tag&bracket />]",
12 | "[tag&bracket ][tag top][tag&bracket >]");
13 |
14 | MT("nonmatching",
15 | "[tag&bracket <][tag top][tag&bracket >]",
16 | " [tag&bracket <][tag inner][tag&bracket />]",
17 | " [tag&bracket ][tag&error tip][tag&bracket&error >]");
18 |
19 | MT("doctype",
20 | "[meta ]",
21 | "[tag&bracket <][tag top][tag&bracket />]");
22 |
23 | MT("cdata",
24 | "[tag&bracket <][tag top][tag&bracket >]",
25 | " [atom ]",
27 | "[tag&bracket ][tag top][tag&bracket >]");
28 |
29 | // HTML tests
30 | mode = CodeMirror.getMode({indentUnit: 2}, "text/html");
31 |
32 | MT("selfclose",
33 | "[tag&bracket <][tag html][tag&bracket >]",
34 | " [tag&bracket <][tag link] [attribute rel]=[string stylesheet] [attribute href]=[string \"/foobar\"][tag&bracket >]",
35 | "[tag&bracket ][tag html][tag&bracket >]");
36 |
37 | MT("list",
38 | "[tag&bracket <][tag ol][tag&bracket >]",
39 | " [tag&bracket <][tag li][tag&bracket >]one",
40 | " [tag&bracket <][tag li][tag&bracket >]two",
41 | "[tag&bracket ][tag ol][tag&bracket >]");
42 |
43 | MT("valueless",
44 | "[tag&bracket <][tag input] [attribute type]=[string checkbox] [attribute checked][tag&bracket />]");
45 |
46 | MT("pThenArticle",
47 | "[tag&bracket <][tag p][tag&bracket >]",
48 | " foo",
49 | "[tag&bracket <][tag article][tag&bracket >]bar");
50 |
51 | })();
52 |
--------------------------------------------------------------------------------
/releases/2/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "web-builder",
3 | "version": "3.0.0",
4 | "description": "drag and drop web-builder",
5 | "main": "index.js",
6 | "scripts": {
7 | "start": "webpack serve --config webpack.dev.js --open",
8 | "build": "webpack",
9 | "dev": "webpack --config webpack.dev.js"
10 | },
11 | "author": "Shahadat Sadhin",
12 | "license": "ISC",
13 | "devDependencies": {
14 | "@babel/core": "^7.14.3",
15 | "@babel/preset-env": "^7.14.4",
16 | "babel-loader": "^8.2.2",
17 | "html-webpack-plugin": "^5.3.1",
18 | "mini-css-extract-plugin": "^1.6.0",
19 | "css-loader": "^5.2.6",
20 | "sass": "^1.35.2",
21 | "sass-loader": "^12.1.0",
22 | "style-loader": "^2.0.0",
23 | "webpack": "^5.38.1",
24 | "webpack-cli": "^4.7.2",
25 | "webpack-dev-server": "^3.11.2"
26 | },
27 | "dependencies": {
28 | "@babel/polyfill": "^7.12.1",
29 | "axios": "^0.21.1"
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/releases/2/src/js/controller/click.js:
--------------------------------------------------------------------------------
1 | import Action from "../models/Action";
2 | import {
3 | breakPoints
4 | } from "../models/sizing";
5 | import {img,eleBar} from '../views/popups';
6 | import {viewSiteNav} from '../views/popbox';
7 |
8 | const clickAction = new Action(domEle.body);
9 |
10 | clickAction.on('click', e => {
11 | // console.log('click');
12 |
13 | // console.log(e.target);
14 | if ([...domEle.btns].includes(e.target)) {
15 | e.target.classList.contains('js-elebar') && eleBar(e);
16 | e.target.classList.contains('js-img') && img(e);
17 | e.target.classList.contains('js-siteNav') && viewSiteNav(e);
18 | e.target.dataset.sb_br && breakPoints(e, e.target.dataset.sb_br);
19 | }
20 |
21 | });
22 |
23 | // $('.js-elebar').click();
--------------------------------------------------------------------------------
/releases/2/src/js/controller/controller.js:
--------------------------------------------------------------------------------
1 | import './drag';
2 | import './click';
3 | import './mouse';
4 |
5 |
6 | import './resize';
7 | //init
8 |
9 | //iresize
10 | // console.log(Action)
11 |
--------------------------------------------------------------------------------
/releases/2/src/js/controller/data.js:
--------------------------------------------------------------------------------
1 | class Data {
2 | constructor(userName){
3 | this.userName = userName;
4 | }
5 | }
6 |
7 | export default Data;
--------------------------------------------------------------------------------
/releases/2/src/js/controller/drag.js:
--------------------------------------------------------------------------------
1 | import Action from "../models/Action";
2 | import { drag, idrag } from "../models/dragDrop";
3 | import {
4 | iResize
5 | } from '../models/sizing';
6 |
7 |
8 | const dragAction = new Action(domEle.body);
9 | const mm = e => iResize(e, dragAction);
10 |
11 | const rmm = e => {
12 | iframe.style.pointerEvents = '';
13 | dragAction.removeEvent('mousemove', mm);
14 | console.log('up');
15 | }
16 |
17 |
18 | dragAction.pX = 0;
19 |
20 | dragAction.on('mousedown', e => {
21 | // console.log('mousedown');
22 | dragAction.removeEvent('mouseup', rmm);
23 |
24 | if (e.button == 0) {
25 | if ([...domEle.iresize].includes(e.target)) {
26 | dragAction.eventSettings(e, {
27 | pd: true,
28 | stpro: true,
29 | point: true
30 | }, [])
31 | dragAction.vrLeft = false;
32 | e.target.classList.contains('js-iresize_left') && (dragAction.vrLeft = true);
33 | dragAction.on('mousemove', mm);
34 | dragAction.on('mouseup', rmm)
35 | }
36 |
37 | if (e.target.classList.contains('element')) {
38 | drag(e,dragAction);
39 | }
40 | }
41 |
42 | });
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 | dragAction.on('mousedown', e => {
52 | if (e.target.dataset.sb_ele && e.button == 0) {
53 | idrag(e,dragAction);
54 | }
55 | }, domEle.idoc.body);
56 |
57 |
--------------------------------------------------------------------------------
/releases/2/src/js/controller/formLoading.js:
--------------------------------------------------------------------------------
1 | import {
2 | loading
3 | } from "../views/signView";
4 |
5 | const formLoading = (l=true) => {
6 | l ? loading.style.display = "" : loading.style.display = "none";
7 | }
8 |
9 | export default formLoading;
--------------------------------------------------------------------------------
/releases/2/src/js/controller/mouse.js:
--------------------------------------------------------------------------------
1 | import Action from "../models/Action";
2 | import Box from "../views/Box";
3 |
4 | const imouseover= new Action(domEle.idoc.body);
5 |
6 | //hover box
7 | const hBox= new Box('1px solid dodgerblue');
8 |
9 | //selected box
10 |
11 | imouseover.on('mouseenter',e=>{
12 | hBox.crud({append:true,dis:'block'});
13 | },domEle.idoc);
14 | imouseover.on('mouseleave',e=>{
15 | hBox.crud({dis:'none'});
16 | },domEle.idoc);
17 |
18 | imouseover.on('mouseover',e=>{
19 | //hover box
20 | hBox.boxStyle(e.target);
21 |
22 | //selected box
23 | })
24 |
--------------------------------------------------------------------------------
/releases/2/src/js/controller/navCon.js:
--------------------------------------------------------------------------------
1 | import {
2 | navOn
3 | } from "../models/navigator";
4 |
5 | function navDrag(e) {
6 | if(navOn){
7 | //navpos
8 | navPos();
9 | }
10 |
11 | }
12 |
13 | function navPos(){
14 | //get vartual position
15 |
16 | // call position model
17 |
18 | }
--------------------------------------------------------------------------------
/releases/2/src/js/controller/resize.js:
--------------------------------------------------------------------------------
1 | import Action from "../models/Action";
2 |
3 | const resizeFuns= {r:[],ir:[]}
4 | const resize = new Action(window);
5 |
6 | resize.on('resize',e=>{
7 | resizeFuns.r.forEach(cur=>cur());
8 | })
9 |
10 | resize.on('resize',e=>{
11 | resizeFuns.ir.forEach(cur=>cur());
12 | },domEle.iwin);
13 |
14 | export default resizeFuns;
15 |
--------------------------------------------------------------------------------
/releases/2/src/js/controller/signin.js:
--------------------------------------------------------------------------------
1 | import axios from "axios";
2 | import {
3 | setCookie
4 | } from "../utils/cookie";
5 | import { formMessage } from "../views/formMessageView";
6 | import formLoading from "./formLoading";
7 |
8 | const signin = async (e) => {
9 | e.preventDefault()
10 | const formData = new FormData(e.target);
11 |
12 | formLoading()
13 |
14 | const jsonData = {};
15 | formData.forEach((value, key) => jsonData[key] = value);
16 |
17 | let url = '',
18 | add = '/user/signin',
19 | id;
20 |
21 | try {
22 | url = 'https://webflow-back-end.herokuapp.com'
23 | const cors = `https://cors-anywhere.herokuapp.com/`
24 |
25 | id = await axios.post(url + add, jsonData).then().catch((err) => {
26 | if (err.response) {
27 | console.log(err.response.status);
28 | } else if (err.request) {
29 | console.log(err.request);
30 | } else {
31 | console.log(err);
32 | }
33 | })
34 | console.log(id)
35 | setCookie('sb_session', id.data, 365);
36 | formMessage('success',200);
37 | // console.log(formData)
38 | } catch (err){
39 | formMessage('error',err.status)
40 | console.log('error signing up')
41 | }
42 | formLoading(false)
43 |
44 | }
45 |
46 | export {
47 | signin
48 | }
--------------------------------------------------------------------------------
/releases/2/src/js/controller/signup.js:
--------------------------------------------------------------------------------
1 | import axios from "axios";
2 | import {
3 | setCookie
4 | } from "../utils/cookie";
5 | import { formMessage } from "../views/formMessageView";
6 | import formLoading from "./formLoading";
7 | import {
8 | getUserData
9 | } from "./userdata";
10 |
11 | const signup = async (e) => {
12 | e.preventDefault()
13 | const formData = new FormData(e.target);
14 |
15 | formLoading()
16 |
17 | const jsonData = {};
18 | formData.forEach((value, key) => jsonData[key] = value);
19 |
20 | let url = '',
21 | add = '/user/signup';
22 |
23 | try {
24 | url = 'https://webflow-back-end.herokuapp.com'
25 | const cors = `https://cors-anywhere.herokuapp.com/`
26 |
27 | const id = await axios.post(url + add, jsonData).then().catch((err) => {
28 | if (err.response) {
29 | console.log(err.response.status);
30 | } else if (err.request) {
31 | console.log('request',err.request);
32 | } else {
33 | console.log(err);
34 | }
35 | })
36 |
37 | console.log(id)
38 | // console.log(formData)
39 | setCookie('sb_session', id.data, 365)
40 | formMessage('success',200)
41 | getUserData(id.data);
42 | } catch (err){
43 | formMessage('error',err.status)
44 | console.log('error signing up')
45 | }
46 | formLoading(false)
47 |
48 | }
49 |
50 | export {
51 | signup
52 | }
--------------------------------------------------------------------------------
/releases/2/src/js/controller/userdata.js:
--------------------------------------------------------------------------------
1 | import axios from "axios";
2 | import {
3 | getCookie
4 | } from "../utils/cookie";
5 | import {
6 | b_URL
7 | } from "../reuse";
8 | import {
9 | createSign
10 | } from "../views/signView";
11 | import formLoading from "./formLoading";
12 |
13 | const getUserData = async (sid) => {
14 | const add = `/user/data/${getCookie('sb_session')}`
15 | formLoading();
16 |
17 | try {
18 | const data = await axios.get(b_URL + add).then().catch((err) => {
19 | if (err.response) {
20 | errResponse(err.response)
21 | } else if (err.request) {
22 | console.log(err.request);
23 | } else {
24 | console.log(err);
25 | }
26 | })
27 | console.log(data)
28 |
29 | } catch {
30 | console.log('error getting somedata')
31 | }
32 |
33 | formLoading(false)
34 | }
35 |
36 | const errResponse = (r) => {
37 | if (r.status == 401) {
38 | createSign('in')
39 | }
40 | }
41 |
42 | export {
43 | getUserData
44 | }
--------------------------------------------------------------------------------
/releases/2/src/js/index.js:
--------------------------------------------------------------------------------
1 | //load scss
2 | import '../scss/style.scss';
3 |
4 | import './controller/controller';
--------------------------------------------------------------------------------
/releases/2/src/js/models/Action.js:
--------------------------------------------------------------------------------
1 | export default class Action {
2 | constructor(ele = document.body) {
3 | this.ele = ele;
4 | }
5 |
6 | on(eName, f, ele = this.ele, uc = false) {
7 | ele.addEventListener(eName, f, uc);
8 | return this;
9 | }
10 |
11 | removeEvent(eName, f, ele = this.ele, uc = false) {
12 | ele.removeEventListener(eName, f, uc);
13 | return this;
14 | }
15 |
16 | eventSettings = (e, set = {
17 | pd: false,
18 | stpro: false,
19 | point: false
20 | }, exFun = [{
21 | f: () => {},
22 | ar: []
23 | },]) => {
24 | set.pd && e.preventDefault();
25 | set.stpro && e.stopPropagation();
26 | set.point && (iframe.style.pointerEvents = 'none');
27 | exFun.forEach(o => o.f(...o.ar));
28 | }
29 |
30 | mousePos(e) {
31 | if (!this.x) {
32 | this.x = e.clientX;
33 | this.y = e.clientY;
34 | }
35 |
36 | const obj = {
37 | x: e.clientX,
38 | y: e.clientY,
39 | rX: this.x - e.clientX,
40 | rY: this.y - e.clientY,
41 | bX: false,
42 | bY: false,
43 | }
44 |
45 | if (this.rX != obj.rX) {
46 | this.rX = obj.rX;
47 | obj.bX = true;
48 | }
49 |
50 | if (this.rY != obj.rY) {
51 | this.rY = obj.rY;
52 | obj.bY = true;
53 | // console.log(obj);
54 | }
55 |
56 |
57 | this.rY = obj.rY;
58 |
59 | return obj;
60 | }
61 |
62 |
63 |
64 | resetPos(ele = this.ele) {
65 | this.on('mouseleave', e => {
66 | this.x = undefined;
67 | this.y = undefined;
68 | console.log("reset");
69 | }, (ele == window ? document : ele))
70 | }
71 |
72 | }
--------------------------------------------------------------------------------
/releases/2/src/js/models/iframe.js:
--------------------------------------------------------------------------------
1 | import {
2 | elements
3 | } from '../reuse';
4 | // create the iframe and attach it to the document
5 | const iframe = document.createElement("iframe");
6 | elements.middle.appendChild(iframe);
7 | const idocument=iframe.contentDocument;
8 | const iwindow=iframe.contentWindow;
9 |
10 | // iframe.setAttribute("scrolling", "no");
11 | iframe.setAttribute("frameborder", "0");
12 | iwindow.scrollTo(0,0);
13 | iframe.id = "iframe";
14 |
15 | setInterval(() => {
16 | // let getDom="";
17 | // idocument.body.querySelectorAll('* :not(#dev)').forEach(cur=>{
18 | // getDom+=cur.outerHTML+'\n';
19 | // })
20 | if(window.localStorage.getItem('DOM') !== idocument.body.innerHTML.replace(/(.|\n)*?/g,'')){
21 | window.localStorage.setItem('DOM',idocument.body.innerHTML.replace(/(.|\n)*?/g,''));
22 | console.log('saved');
23 | }
24 | }, 2000);
25 |
26 | export {iframe,idocument,iwindow};
--------------------------------------------------------------------------------
/releases/2/src/js/models/sign.js:
--------------------------------------------------------------------------------
1 | import {
2 | getUserData
3 | } from "../controller/userdata";
4 | import {
5 | getCookie
6 | } from "../utils/cookie";
7 | import {
8 | createSign
9 | } from "../views/signView";
10 |
11 | const signModel = () => {
12 | //check cookie
13 | const cookie = getCookie('sb_session');
14 |
15 | if (!cookie) {
16 | createSign('up');
17 | } else {
18 | getUserData(cookie);
19 | }
20 | }
21 |
22 |
23 |
24 |
25 |
26 |
27 | //sign in / up
28 |
29 |
30 | // signModel()
31 |
32 |
33 |
34 |
35 |
36 |
37 | export default signModel;
--------------------------------------------------------------------------------
/releases/2/src/js/reuse.js:
--------------------------------------------------------------------------------
1 | const b_URL = 'https://webflow-back-end.herokuapp.com';
2 |
3 |
4 |
5 |
6 | export {
7 | $,
8 | b_URL
9 | };
--------------------------------------------------------------------------------
/releases/2/src/js/utils/cookie.js:
--------------------------------------------------------------------------------
1 | function setCookie(cname, cvalue, exdays) {
2 | var d = new Date();
3 | d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000));
4 | var expires = "expires="+d.toUTCString();
5 | document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/";
6 | }
7 |
8 | function getCookie(cname) {
9 | var name = cname + "=";
10 | var ca = document.cookie.split(';');
11 | for(var i = 0; i < ca.length; i++) {
12 | var c = ca[i];
13 | while (c.charAt(0) == ' ') {
14 | c = c.substring(1);
15 | }
16 | if (c.indexOf(name) == 0) {
17 | return c.substring(name.length, c.length);
18 | }
19 | }
20 | return false;
21 | }
22 |
23 |
24 | export {setCookie,getCookie}
--------------------------------------------------------------------------------
/releases/2/src/js/views/Box.js:
--------------------------------------------------------------------------------
1 | import resizeFuns from "../controller/resize";
2 |
3 | export default class Box {
4 | constructor(bor = '', bg = '') {
5 | this.bor = bor;
6 | this.bg = bg;
7 | this.initBox();
8 | }
9 |
10 | initBox() {
11 | this.box = document.createElement('div');
12 | this.box.setAttribute('focusable', "false");
13 | this.box.style = `position:absolute;pointer-events: none;`;
14 | this.bor && (this.box.style.border = this.bor);
15 | this.bg && (this.box.style.background = this.bg);
16 |
17 | resizeFuns.ir.push(()=>this.boxStyle());
18 | }
19 |
20 | boxStyle(et) {
21 | et && (this.ele = et);
22 | if (!this.ele)
23 | return;
24 | const style = this.ele.currentStyle || window.getComputedStyle(this.ele);
25 | const ds = {
26 | width: this.ele.offsetWidth,
27 | height: this.ele.offsetHeight,
28 | margin1: parseFloat(style.marginLeft) + parseFloat(style.marginRight),
29 | margin2: parseFloat(style.marginTop) + parseFloat(style.marginBottom),
30 | padding: parseFloat(style.paddingLeft) + parseFloat(style.paddingRight),
31 | border: parseFloat(style.borderLeftWidth) + parseFloat(style.borderRightWidth)
32 | };
33 |
34 | this.box.style.top = this.ele.offsetTop - parseFloat(style.marginTop) + 'px';
35 | this.box.style.left = this.ele.offsetLeft - parseFloat(style.marginLeft) + 'px';
36 |
37 | this.box.style.width = ds.width + ds.margin1 + 'px';
38 | this.box.style.height = ds.height + ds.margin2 + 'px';
39 |
40 | if (this.ele == domEle.idoc.body) {
41 | this.box.style.top = this.ele.offsetTop + 'px';
42 | this.box.style.left = this.ele.offsetLeft + 'px';
43 | }
44 |
45 | // const style = window.getComputedStyle(domEle.idoc.body);
46 | // const rect = this.ele.getBoundingClientRect();
47 | // const bs = this.box.style;
48 | // console.log(rect);
49 |
50 | // // bs.width = rect.width + 'px';
51 | // // bs.height = rect.height + 'px';
52 | // this.ele== domEle.idoc.body ?bs.inset='0px 0px 0px 0px':bs.inset = `${rect.top}px ${rect.bottom}px ${rect.right}px ${rect.left}px`;
53 |
54 | }
55 |
56 | crud(obj = {
57 | del: false,
58 | append: false,
59 | dis: ''
60 | }) {
61 | obj.del && this.box.remove();
62 | obj.append && domEle.idev.appendChild(this.box);
63 | obj.dis && (this.box.style.display = obj.dis);
64 | }
65 |
66 | }
--------------------------------------------------------------------------------
/releases/2/src/js/views/View.js:
--------------------------------------------------------------------------------
1 | export default class View{
2 |
3 | }
--------------------------------------------------------------------------------
/releases/2/src/js/views/delete.js:
--------------------------------------------------------------------------------
1 | import{active} from '../models/drag';
2 | import { idocument, iwindow } from '../models/iframe';
3 | import { displayNav } from '../models/navigator';
4 | import { $ } from '../reuse';
5 |
6 | window.addEventListener('keyup',deleteEle)
7 |
8 | iwindow.addEventListener('keyup',deleteEle)
9 |
10 | function deleteEle(e){
11 | if(e.key === 'Delete' && active && active.tagName != 'BODY'){
12 | active.remove();
13 | const box=idocument.querySelector('#dev #activeBox');
14 | const mover=idocument.querySelector('#dev #mover');
15 | box?box.remove():0;
16 | mover?mover.remove():0;
17 | if (idocument.body.children.length < 2) {
18 | idocument.body.style.height = "100vh";
19 | }
20 | idocument.querySelectorAll('div,section').forEach(cur => {
21 | if (cur.dataset.drag) {
22 | if (cur.children.length > 0) {
23 | cur.removeAttribute("style")
24 | } else if (cur.style !== "padding:30px;box-shadow:0px 0px 3px inset #848484") {
25 | cur.style = "padding:30px;box-shadow:0px 0px 3px inset #848484";
26 | }
27 | }
28 | })
29 |
30 | $('.reveal_tab',true).forEach((cur)=>{
31 | cur.style.display='none'
32 | })
33 |
34 | $('#tagName').innerText = 'Tagname';
35 | $('#className').innerText = 'classname';
36 | $('#countEle').parentElement.style.display = 'none';
37 |
38 | displayNav()
39 | }
40 | }
--------------------------------------------------------------------------------
/releases/2/src/js/views/editor.js:
--------------------------------------------------------------------------------
1 | import {
2 | $
3 | } from '../reuse';
4 |
5 | import './codeView';
6 |
7 | // left menu
8 | const right_menu = $('.left .right_menu');
9 | $('.left_menu div[data-open]', true).forEach(cur => {
10 | cur.addEventListener('click', rightMenu);
11 | });
12 |
13 | function rightMenu(e) {
14 | right_menu.style.display != '' ? right_menu.style.display = '' : right_menu.style.display = 'none';
15 | const o = $('.' + e.currentTarget.dataset.open).style;
16 | o.display != '' ? o.display = '' : o.display = 'none';
17 | }
18 |
19 | // right menu
20 | $('.reveal_tab',true).forEach((cur)=>{
21 | cur.style.display='none';
22 | })
--------------------------------------------------------------------------------
/releases/2/src/js/views/formMessageView.js:
--------------------------------------------------------------------------------
1 | const formMessageMock = document.createElement('p');
2 | formMessageMock.style.display = "none";
3 |
4 |
5 |
6 | const formMessage = (state, status) => {
7 | formMessageMock.style.display = '';
8 | if (state == 'success') {
9 | formMessageMock.className = "form_message--success";
10 | formMessageMock.innerText = `${status}: Success message`
11 | } else if (state == 'error') {
12 | formMessageMock.className = "form_message--error";
13 | formMessageMock.innerText = `${status}: error message`
14 | } else {
15 | formMessageMock.className = "form_message";
16 | formMessageMock.innerText = ` other message`
17 | }
18 | }
19 |
20 | export {
21 | formMessageMock,
22 | formMessage
23 | };
--------------------------------------------------------------------------------
/releases/2/src/js/views/help.js:
--------------------------------------------------------------------------------
1 | import { $ } from "../reuse";
2 |
3 | let help_text='something went wrong reload the page!';
4 | const help=`${help_text}
`;
5 |
6 |
7 |
--------------------------------------------------------------------------------
/releases/2/src/js/views/loadingView.js:
--------------------------------------------------------------------------------
1 | const fullLoader = document.querySelector('.full_loader');
2 | window.addEventListener('load',(e)=>{
3 | fullLoader.style.display = 'none';
4 | })
--------------------------------------------------------------------------------
/releases/2/src/js/views/mockup.js:
--------------------------------------------------------------------------------
1 | const make={};
2 |
3 | /**
4 | * ************
5 | *
6 | * 1.make the element in make object (add mockup)
7 | * 2.add to final htmlMockup
8 | *
9 | * ************
10 | */
11 |
12 |
13 | //box
14 | // let nstyle="padding:30px;box-shadow:inset 0 0 5px"
15 | make.div=document.createElement('div');
16 | // make.div.style=nstyle;
17 | make.section=document.createElement('section');
18 | // make.section.style=nstyle;
19 |
20 | make.container=document.createElement('div');
21 | make.container.className="container";
22 |
23 | //text
24 | make.heading=document.createElement('h1');
25 | make.heading.innerText="this is a heading";
26 |
27 | make.paragraph=document.createElement('p');
28 | make.paragraph.innerText="Lorem ipsum dolor sit amet consectetur adipisicing elit. Quo minima rerum delectus qui natus blanditiis fugiat quibusdam aliquid quos autem, assumenda accusantium asperiores animi, rem itaque. Quidem sint cumque ipsum!";
29 |
30 | make.link=document.createElement('a');
31 | make.link.href='javascript: void(0)';
32 | make.link.innerText="click me";
33 |
34 | //midia
35 | make.img=document.createElement('img');
36 | make.img.src="assets/images/sample/11.jpg";
37 | make.img.setAttribute('draggable','false');
38 |
39 | make.video=document.createElement('video');
40 | make.video.src="assets/media/video.mp4";
41 | make.video.controls='controls';
42 |
43 | make.audio=document.createElement('audio');
44 | make.audio.src='assets/media/audio.mp3';
45 | make.audio.controls='controls';
46 |
47 |
48 | for(const i in make){
49 | // make[i].setAttribute('data-drag','10');
50 | make[i].setAttribute('data-sb_ele',i)
51 | }
52 |
53 | const htmlMockup = {
54 | div: make.div,
55 | section: make.section,
56 | container: make.container,
57 | heading: make.heading,
58 | paragraph: make.paragraph,
59 | img:make.img,
60 | video:make.video,
61 | audio:make.audio,
62 | link:make.link,
63 |
64 | }
65 |
66 |
67 | export {htmlMockup};
--------------------------------------------------------------------------------
/releases/2/src/js/views/navigation.js:
--------------------------------------------------------------------------------
1 | export const branch = ele => {
2 | // domEle.nodes.innerHTML = 'body
';
3 | const arr = [];
4 |
5 | while (ele != domEle.idoc.firstElementChild) {
6 | const node = document.createElement('div');
7 | node.classList.add('node');
8 | // node.dataset.node = ele;
9 | node.innerHTML = `
10 |
11 | ${ele.tagName.toLowerCase()}
12 |
13 | `;
14 | arr.push(node);
15 | ele = ele.parentElement;
16 | }
17 |
18 | setTimeout(()=>{
19 | domEle.nodes.innerHTML='';
20 | domEle.nodes.append(...arr.reverse());
21 | })
22 |
23 | }
24 |
25 | const bb= domEle.bottom_bar;
26 | let pre = -1;
27 | let moveto = bb.scrollLeft;
28 | bb.addEventListener("wheel", (evt) => {
29 | evt.preventDefault();
30 | let limit = bb.scrollWidth - bb.clientWidth;
31 | const sign =Math.sign(evt.deltaY);
32 |
33 | if ((sign < 0 || limit!= pre) && (0!= pre || sign > 0)) {
34 | moveto += evt.deltaY;
35 | moveto <0 && (moveto = 0)
36 | bb.scroll({
37 | left: moveto,
38 | behavior: "smooth"
39 | });
40 |
41 | // console.log(bb.scrollLeft,moveto);
42 | }
43 |
44 | pre= bb.scrollLeft;
45 |
46 | });
47 |
48 | // console.log(domEle.bottom_bar.scroll)
49 |
--------------------------------------------------------------------------------
/releases/2/src/js/views/popbox.js:
--------------------------------------------------------------------------------
1 | //not stable
2 | const nav = document.createElement('nav');
3 | nav.innerHTML=`
4 |
5 |
6 | About me
7 |
8 |
9 |
10 | Showcase
11 |
12 |
13 | Help??
14 |
15 | `
16 |
17 |
18 | function viewSiteNav(e) {
19 | const popCls = domEle.pop_box.classList;
20 | const popstyle = domEle.pop_box.style;
21 | const eRect = e.target.getBoundingClientRect();
22 | popstyle.top= eRect.bottom+'px';
23 | popstyle.left= eRect.right+'px';
24 |
25 | btnActive(e, 'activePopBox', {
26 | containsFun: () => {
27 | popCls.add('d-none');
28 |
29 | },
30 | elsefun: () => {
31 | popCls.remove('d-none');
32 | }
33 | })
34 |
35 | domEle.pop_box_body.innerHTML ='';
36 |
37 | `
38 |
39 | About me
40 |
41 |
42 |
43 | Showcase
44 |
45 |
46 | Help??
47 | `;
48 | domEle.pop_box.append(nav);
49 |
50 | }
51 |
52 | export {viewSiteNav}
--------------------------------------------------------------------------------
/releases/2/src/js/views/signView.js:
--------------------------------------------------------------------------------
1 | import {
2 | signin
3 | } from "../controller/signin";
4 | import {
5 | signup
6 | } from "../controller/signup";
7 | import {
8 | $
9 | } from "../reuse";
10 | import {
11 | getCookie
12 | } from "../utils/cookie";
13 | import {formMessageMock} from "./formMessageView";
14 |
15 | const loading = document.createElement('img');
16 |
17 | function createSign(state) {
18 | const sign = $('.sign');
19 |
20 | sign.style.display = "flex";
21 | //mockup
22 | const m = `
23 | Sign ${state}
24 |
31 |
32 |
Password
33 |
34 |
35 | Sign ${state}
36 |
37 |
38 | `
39 | //set other option
40 | const p = document.createElement('p');
41 | p.className = 'sign_other';
42 | p.innerText = `sign ${state === 'up'?'in':'up'}`;
43 | p.addEventListener('click', () => state === 'up' ? createSign('in') : createSign('up'))
44 |
45 | const cross = document.createElement('img');
46 | cross.src = "assets/cross.svg";
47 | cross.className ="cross";
48 | cross.title ='close';
49 | cross.addEventListener('click',()=>sign.style.display="none");
50 |
51 | loading.src = "assets/loading.svg";
52 | loading.className ="sign_loading";
53 | loading.title ='loading';
54 | loading.style.display = 'none';
55 |
56 | // set form
57 | const form = document.createElement('form');
58 | form.dataset.sign = state;
59 | form.innerHTML = m;
60 | form.appendChild(p);
61 | form.appendChild(cross);
62 | form.appendChild(loading);
63 | form.appendChild(formMessageMock)
64 | form.addEventListener('submit', state === 'up' ? signup : signin)
65 | sign.innerHTML = '';
66 | sign.appendChild(form);
67 | }
68 |
69 | export {
70 | createSign,
71 | loading
72 | };
--------------------------------------------------------------------------------
/releases/2/src/scss/abstracts/_abs.scss:
--------------------------------------------------------------------------------
1 | @import './variables';
--------------------------------------------------------------------------------
/releases/2/src/scss/abstracts/_variables.scss:
--------------------------------------------------------------------------------
1 | //colors
2 |
3 | $color-dark:#000;
4 | $color-dark-1:#060606;
5 | $color-dark-2:#1D1E22;
6 | $color-dark-3:#34363E;
7 | $color-dark-4:#444857;
8 | $color-dark-5:#5A5F73;
9 | $color-dark-6:#666B7A;
10 |
11 | $color-red:red;
12 | $color-red-1:#FF3C41;
13 |
14 |
15 | $color-yellow:yellow;
16 | $color-yellow-1:#FCD000;
17 |
18 | $color-blue:blue;
19 | $color-blue-1:#4353FF;//waveflow
20 | $color-blue-2:dodgerblue;
21 | $color-blue-3:#0EBEFF;
22 |
23 | /*
24 | .colors {
25 | h2{
26 | color:#000
27 | }
28 | padding: 20px;
29 |
30 | .color {
31 | padding: 16px;
32 | max-width: 240px;
33 |
34 | &:nth-child(1) {
35 | background-color: $color-dark-1;
36 | }
37 |
38 | &:nth-child(2) {
39 | background-color: $color-dark-2;
40 | }
41 |
42 | &:nth-child(3) {
43 | background-color: $color-dark-3;
44 | }
45 |
46 | &:nth-child(4) {
47 | background-color: $color-dark-4;
48 | }
49 |
50 | &:nth-child(5) {
51 | background-color: $color-dark-5;
52 | }
53 |
54 | &:nth-child(6) {
55 | background-color: $color-dark-6;
56 | }
57 |
58 | &:nth-child(7) {
59 | background-color: $color-7;
60 | }
61 |
62 | &:nth-child(8) {
63 | background-color: $color-8;
64 | }
65 |
66 | &:nth-child(9) {
67 | background-color: $color-9;
68 | }
69 |
70 | &:nth-child(10) {
71 | background-color: $color-10;
72 | }
73 | }
74 | }
75 |
76 | */
--------------------------------------------------------------------------------
/releases/2/src/scss/components/_btn.scss:
--------------------------------------------------------------------------------
1 | .btn{
2 | padding: 10px;
3 | display: flex;
4 | justify-content: center;
5 | align-items: center;
6 | position: relative;
7 | @extend .cursor-pointer;
8 |
9 | &:hover{
10 | background: lighten($color-dark-3,5%);
11 | }
12 |
13 | svg,img{
14 | width: 20px;
15 | height: 20px;
16 | position: relative;
17 | z-index: 5;
18 | }
19 |
20 | &--rounded{
21 | border-radius: 5px;
22 | }
23 |
24 | &--pill{
25 | border-radius: 100px;
26 | }
27 |
28 | *{
29 | pointer-events: none;
30 | }
31 |
32 | &.js-lbarActive{
33 | // background: $color-dark-4 ;
34 | background: $color-dark-4 url('https://sadhinvr.github.io/web-builder/dist/assets/images/drop.svg') no-repeat right center;
35 | position: relative;
36 | }
37 | &.js-lbarActive::after{
38 | content: '';
39 | width: 1px;
40 | position: absolute;
41 | bottom: 0;
42 | top: 0;
43 | left: 100%;
44 | background: $color-dark-4;
45 | }
46 | &.js-activePopBox{
47 | background: $color-blue-2;
48 | }
49 | }
50 |
51 |
--------------------------------------------------------------------------------
/releases/2/src/scss/components/_com.scss:
--------------------------------------------------------------------------------
1 | @import './btn';
2 | @import './resizer';
3 | @import './pop-box';
4 |
5 |
6 |
--------------------------------------------------------------------------------
/releases/2/src/scss/components/_pop-box.scss:
--------------------------------------------------------------------------------
1 | .pop-box{
2 | padding: .5rem;
3 | position: absolute;
4 | top:42px;
5 | left: 42px;
6 | // transform-origin: top left;
7 | background: $color-dark-4;
8 | z-index: 9999;
9 | color:#fff;
10 | box-shadow: 0 0 2rem rgba($color: #000000, $alpha: .8);
11 | border-radius: 10px;
12 | }
--------------------------------------------------------------------------------
/releases/2/src/scss/components/_resizer.scss:
--------------------------------------------------------------------------------
1 | .vr{
2 | min-width: 3px;
3 | background: $color-dark-5;
4 | &:hover{
5 | background: $color-blue-3;
6 | }
7 | @extend .cursor-eresize;
8 | }
--------------------------------------------------------------------------------
/releases/2/src/scss/layout/_elements.scss:
--------------------------------------------------------------------------------
1 | .elements {
2 | overflow: auto;
3 |
4 | .heading {
5 | text-align: center;
6 | column-gap: 1px;
7 | border: 1px solid $color-dark-2;
8 |
9 | .col {
10 | background: $color-dark-2;
11 | @extend .cursor-pointer;
12 | padding: 8px;
13 |
14 | &.active {
15 | background: $color-dark-4;
16 | }
17 |
18 | &:hover:not(.active) {
19 | background: $color-dark-1;
20 | }
21 | }
22 | }
23 |
24 | .wraper {
25 |
26 | .row {
27 | margin-top: 10px;
28 |
29 | }
30 | }
31 | }
32 |
33 | .element {
34 | border: 1px solid $color-dark-2;
35 | border-right: none;
36 | padding: 10px;
37 | flex-grow: 1;
38 | width: 33.33%;
39 | text-align: center;
40 |
41 | @extend .cursor-grab;
42 | @extend .bg-dark-5;
43 |
44 | &:last-child {
45 | border-right: 1px solid $color-dark-2;
46 | }
47 |
48 | &:hover {
49 | @extend .bg-dark-6;
50 | }
51 |
52 | & * {
53 | pointer-events: none;
54 | }
55 |
56 | img {
57 | height: 50px;
58 | margin-bottom: 5px;
59 | }
60 | }
--------------------------------------------------------------------------------
/releases/2/src/scss/layout/_header.scss:
--------------------------------------------------------------------------------
1 | header {
2 | background: $color-dark-3;
3 | color: #fff;
4 | height: 41px;
5 | // box-shadow: 0px 1px 0px $color-dark-2;
6 | // border: 1px solid $color-dark-2;
7 | border-bottom: 1px solid $color-dark-2;
8 | overflow: hidden;
9 |
10 | .container{
11 | &>.row{
12 | justify-content: space-between;
13 | }
14 | }
15 |
16 | .btn {
17 | border-right: 1px solid $color-dark-2;
18 | background: $color-dark-3;
19 |
20 | &.js-isize{
21 | min-width: 140px;
22 | }
23 |
24 | &.js-activeBreakPoint{
25 | background: $color-blue-1;
26 | }
27 |
28 | &--rbar{
29 | width: calc(210px / 3);
30 | }
31 | }
32 | }
--------------------------------------------------------------------------------
/releases/2/src/scss/layout/_image.scss:
--------------------------------------------------------------------------------
1 | .pops {
2 | .image {
3 | .search {
4 | input {
5 | background: #fff;
6 | flex: 1;
7 | }
8 |
9 | button {
10 | background: $color-blue-1;
11 | color: #fff
12 | }
13 | }
14 |
15 | .images {
16 | margin-top: 1rem;
17 | display: flex;
18 | row-gap: 1rem;
19 | column-gap: 1rem;
20 | flex-wrap: wrap;
21 |
22 | .img_wraper {
23 | min-width: 100px;
24 | width: calc(50% - .5rem);
25 | height: 140px;
26 | overflow: hidden;
27 | position: relative;
28 | @extend .cursor-grab;
29 | border: solid $color-dark-1 1px;
30 |
31 | img {
32 | height: 100%;
33 | width: 100%;
34 | object-fit: cover;
35 | }
36 |
37 | .img_details {
38 | position: absolute;
39 | bottom: 0;
40 | right: 0;
41 | left: 0;
42 | background: #000000a9;
43 | color: #fff;
44 | padding: .5rem;
45 | opacity: 0;
46 | transition: opacity .3s;
47 |
48 | }
49 |
50 | &:hover .img_details {
51 | opacity: 1;
52 | }
53 | }
54 | }
55 | }
56 | }
--------------------------------------------------------------------------------
/releases/2/src/scss/layout/_layout.scss:
--------------------------------------------------------------------------------
1 | @import './header';
2 | @import './main';
3 | @import './elements';
4 | @import './nav';
5 | @import './image';
6 | @import './site_nav';
7 |
8 | // .container{
9 |
10 | // }
11 |
12 | .row{
13 | display: flex;
14 | align-items: stretch;
15 | max-height: 100%;
16 | }
17 |
18 | .col{
19 | flex-grow: 1;
20 | }
21 |
22 |
--------------------------------------------------------------------------------
/releases/2/src/scss/layout/_nav.scss:
--------------------------------------------------------------------------------
1 | .navigator {
2 | @extend .bg-dark-3;
3 | max-width: 420px;
4 | min-width: 200px;
5 | width: 240px;
6 | border-right: 2px solid $color-dark-1;
7 |
8 | &_heading {
9 | @extend .bg-dark-2;
10 | }
11 |
12 | &_body {
13 | @extend .bg-dark-4;
14 | }
15 |
16 | &>div {
17 | padding: 8px;
18 | }
19 |
20 |
21 | }
--------------------------------------------------------------------------------
/releases/2/src/scss/layout/_site_nav.scss:
--------------------------------------------------------------------------------
1 | nav{
2 | .row{
3 | padding: 3px 10px;
4 | // row-gap: .5rem;
5 | column-gap: .5rem;
6 | // align-items: center;
7 | border-bottom: 1px solid $color-dark-2;
8 | margin-bottom: .3rem;
9 | transition: color .4s;
10 |
11 | &:hover{
12 | color: $color-yellow-1;
13 | }
14 |
15 | img{
16 | height: 16px;
17 | margin-top: 2px;
18 | }
19 |
20 | &:last-child{
21 | border-bottom: none;
22 | margin-bottom: 0;
23 | }
24 | }
25 | }
--------------------------------------------------------------------------------
/releases/2/src/scss/style.scss:
--------------------------------------------------------------------------------
1 | @import './abstracts/abs';
2 | @import './core/reset';
3 | @import './layout/layout';
4 | @import './utils/utils';
5 |
6 |
7 | @import './components/com';
8 |
--------------------------------------------------------------------------------
/releases/2/src/scss/utils/_border.scss:
--------------------------------------------------------------------------------
1 | .border{
2 | &-none{
3 | border: none !important;
4 | border-left: none;
5 | border-right: none;
6 | border-top: none;
7 | border-bottom: none;
8 | }
9 |
10 | &-left{
11 | border-left: 1px solid $color-dark-2;
12 | }
13 | }
--------------------------------------------------------------------------------
/releases/2/src/scss/utils/_color.scss:
--------------------------------------------------------------------------------
1 | //bg
2 | .bg{
3 | background-color: #fff;
4 |
5 | &-dark{
6 | background-color: #000;
7 |
8 | &-1{
9 | background-color: $color-dark-1;
10 | }
11 | &-2{
12 | background-color: $color-dark-2;
13 | }
14 | &-3{
15 | background-color: $color-dark-3;
16 | }
17 | &-4{
18 | background-color: $color-dark-4;
19 | }
20 | &-5{
21 | background-color: $color-dark-5;
22 | }
23 | &-6{
24 | background-color: $color-dark-6;
25 | }
26 | }
27 |
28 | &-white{
29 | background-color: #fff;
30 |
31 | &-1{
32 | background-color: darken(#fff,5%);
33 | }
34 | &-2{
35 | background-color: darken(#fff,10%);
36 | }
37 | &-3{
38 | background-color: darken(#fff,15%);
39 | }
40 | &-4{
41 | background-color: darken(#fff,25%);
42 | }
43 | &-5{
44 | background-color: darken(#fff,35%);
45 | }
46 | &-6{
47 | background-color: darken(#fff,50%);
48 | }
49 | }
50 |
51 |
52 | }
53 |
54 | //color
55 | .color{
56 | color: #000;
57 |
58 | &-white{
59 | color: #fff;
60 |
61 | &-1{
62 | color: darken(#fff,5%);
63 | }
64 | &-2{
65 | color: darken(#fff,10%);
66 | }
67 | &-3{
68 | color: darken(#fff,15%);
69 | }
70 | &-4{
71 | color: darken(#fff,25%);
72 | }
73 | &-5{
74 | color: darken(#fff,35%);
75 | }
76 | &-6{
77 | color: darken(#fff,50%);
78 | }
79 | }
80 |
81 | &-dark{
82 | color: #fff;
83 |
84 | &-1{
85 | color: $color-dark-1;
86 | }
87 | &-2{
88 | color: $color-dark-2;
89 | }
90 | &-3{
91 | color: $color-dark-3;
92 | }
93 | &-4{
94 | color: $color-dark-4;
95 | }
96 | &-5{
97 | color: $color-dark-5;
98 | }
99 | &-6{
100 | color: $color-dark-6;
101 | }
102 | }
103 |
104 | }
--------------------------------------------------------------------------------
/releases/2/src/scss/utils/_cursor.scss:
--------------------------------------------------------------------------------
1 | .cursor{
2 | &-pointer{
3 | cursor: pointer;
4 | }
5 | &-grab{
6 | cursor: grab;
7 | }
8 |
9 | &-na{
10 | cursor: not-allowed;
11 | }
12 |
13 | &-eresize{
14 | cursor: e-resize;
15 | }
16 | }
--------------------------------------------------------------------------------
/releases/2/src/scss/utils/_display.scss:
--------------------------------------------------------------------------------
1 | .d{
2 | &-flex {
3 | display: flex;
4 | }
5 |
6 | &-block {
7 | display: block;
8 | }
9 |
10 | &-none {
11 | display: none;
12 | }
13 | }
14 |
15 |
16 |
17 |
18 | .hidden {
19 | visibility: hidden;
20 | }
21 |
22 | .show {
23 | visibility: visible;
24 | }
--------------------------------------------------------------------------------
/releases/2/src/scss/utils/_flex.scss:
--------------------------------------------------------------------------------
1 | .flex-column{
2 | flex-direction: column;
3 | }
4 |
5 | .flex-row{
6 | flex-direction: row;
7 | }
--------------------------------------------------------------------------------
/releases/2/src/scss/utils/_utils.scss:
--------------------------------------------------------------------------------
1 | @import './display';
2 | @import './flex';
3 | @import './cursor';
4 | @import './border';
5 | @import './color';
6 |
--------------------------------------------------------------------------------
/releases/2/webpack.config.js:
--------------------------------------------------------------------------------
1 | const path = require('path');
2 | const HtmlWebpackPlugin = require('html-webpack-plugin');
3 | const MiniCssExtractPlugin = require('mini-css-extract-plugin');
4 |
5 | module.exports = {
6 | mode: 'production',
7 | entry: ['@babel/polyfill', './src/js/index.js'],
8 | output: {
9 | path: path.resolve(__dirname, 'dist'),
10 | filename: 'js/bundle.js'
11 | },
12 | devServer: {
13 | contentBase: './dist',
14 | },
15 | module: {
16 | rules: [{
17 | test: /\.m?js$/,
18 | exclude: /node_modules/,
19 | use: {
20 | loader: "babel-loader",
21 | options: {
22 | presets: ['@babel/preset-env']
23 | }
24 | }
25 | }, {
26 | test: /\.s[ac]ss$/i,
27 | use: [
28 | "style-loader",
29 | {
30 | loader: "css-loader",
31 | options: {
32 | sourceMap: true,
33 | },
34 | },
35 | {
36 | loader: "sass-loader",
37 | options: {
38 | sourceMap: true,
39 | },
40 | },
41 | ],
42 | }, ]
43 | },
44 | plugins: [
45 | new HtmlWebpackPlugin({
46 | filename: 'index.html',
47 | template: './src/index.html',
48 | minify: {
49 | removeComments: true,
50 | collapseWhitespace: true,
51 | useShortDoctype: true,
52 | removeStyleLinkTypeAttributes: true,
53 | keepClosingSlash: true,
54 | minifyJS: true,
55 | minifyCSS: true,
56 | minifyURLs: true
57 | }
58 | }),
59 | new MiniCssExtractPlugin({
60 | filename: "css/style.css",
61 | })
62 | ],
63 | }
--------------------------------------------------------------------------------
/releases/2/webpack.dev.js:
--------------------------------------------------------------------------------
1 | const path = require('path');
2 | const HtmlWebpackPlugin = require('html-webpack-plugin');
3 |
4 | module.exports = {
5 | mode: 'development',
6 | entry: ['./src/js/index.js'],
7 | output: {
8 | path: path.resolve(__dirname, 'dist'),
9 | filename: 'js/bundle.js'
10 | },
11 | devServer: {
12 | contentBase: './dist',
13 | },
14 | module: {
15 | rules: [{
16 | test: /\.m?js$/,
17 | exclude: /node_modules/,
18 | use: {
19 | loader: "babel-loader",
20 | options: {
21 | presets: ['@babel/preset-env']
22 | }
23 | }
24 | }, {
25 | test: /\.s[ac]ss$/i,
26 | use: [
27 | "style-loader",
28 | {
29 | loader: "css-loader",
30 | options: {
31 | sourceMap: true,
32 | },
33 | },
34 | {
35 | loader: "sass-loader",
36 | options: {
37 | sourceMap: true,
38 | },
39 | },
40 | ],
41 | }, ]
42 | },
43 | plugins: [
44 | new HtmlWebpackPlugin({
45 | filename: 'index.html',
46 | template: './src/index.html'
47 | })
48 | ],
49 | }
--------------------------------------------------------------------------------
/src/assets/mb.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/src/components/Site.tsx:
--------------------------------------------------------------------------------
1 | import { useEffect, useRef } from "react";
2 |
3 | function Site() {
4 | const iframe = useRef(null);
5 | useEffect(() => {
6 | window.addEventListener('mousedown',e=>{
7 | console.log('hello kdjfdjk')
8 | })
9 | const idoc = iframe.current?.contentDocument;
10 | const iwin = iframe.current?.contentWindow;
11 |
12 | const btn = document.createElement('button');
13 |
14 | idoc?.body.append(btn);
15 | }, []);
16 |
17 | return ;
18 | }
19 |
20 | export default Site;
21 |
--------------------------------------------------------------------------------
/src/components/left_options/Element.tsx:
--------------------------------------------------------------------------------
1 |
2 | function Element(props: { id?:Number,icon: JSX.Element; name: string; click?: any }) {
3 |
4 | return (
5 |
6 |
{props.icon}
7 |
{props.name}
8 |
9 | );
10 | }
11 |
12 | export default Element;
13 |
--------------------------------------------------------------------------------
/src/components/styles/Inputs.tsx:
--------------------------------------------------------------------------------
1 | function Inputs(props: { name1: String; name2: String }) {
2 | return (
3 |
4 |
5 | {props.name1}
6 |
7 |
8 |
12 |
13 | {props.name2}
14 |
15 |
19 |
20 | );
21 | }
22 |
23 | export default Inputs;
24 |
--------------------------------------------------------------------------------
/src/main.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import ReactDOM from 'react-dom/client'
3 | import App from './App.tsx'
4 |
5 |
6 | ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render(
7 | //
8 |
9 | //
10 | )
11 |
--------------------------------------------------------------------------------
/src/styles/_mid.scss:
--------------------------------------------------------------------------------
1 |
2 | .mid_col {
3 | flex-grow: 1;
4 | background: #353535;
5 | }
6 |
7 |
8 | .mid_col {
9 | &_top {
10 | border-bottom: $border solid $borderWidth;
11 | height: $size;
12 | background: $dark;
13 | }
14 |
15 | display: grid;
16 | grid-template-rows: auto 1fr auto;
17 |
18 | }
19 |
20 | .site{
21 | width: 100%;
22 | height: 100%;
23 | background: #d3d3d3;
24 | display: flex;
25 | iframe{
26 | height: 100%;
27 | width: 100%;
28 | border: none;
29 | outline: none;
30 | }
31 | }
--------------------------------------------------------------------------------
/src/styles/_right.scss:
--------------------------------------------------------------------------------
1 |
2 | .right_col {
3 | width: 300px;
4 | background: $dark;
5 | &_top {
6 | border-bottom: $border solid $borderWidth;
7 | height: $size;
8 | display: flex;
9 |
10 | .option {
11 | display: flex;
12 | justify-content: center;
13 | align-items: center;
14 | flex: 1;
15 | border-left: $borderWidth $border solid;
16 | cursor: pointer;
17 |
18 | &:hover {
19 | color: #fff;
20 | }
21 | }
22 |
23 | color: $fadeColor;
24 | }
25 |
26 | &_bottom {
27 | border-left: $borderWidth $border solid;
28 | flex: 1;
29 | font-size: .9em;
30 | color: #999;
31 |
32 | overflow: scroll;
33 | }
34 |
35 |
36 |
37 | display: flex;
38 | flex-direction: column;
39 |
40 | }
--------------------------------------------------------------------------------
/src/styles/app.scss:
--------------------------------------------------------------------------------
1 | @import url('https://fonts.googleapis.com/css2?family=Playfair+Display&family=Source+Code+Pro:wght@300;400;500;600;700&display=swap');
2 |
3 | * {
4 | margin: 0;
5 | padding: 0;
6 | box-sizing: border-box;
7 | }
8 |
9 |
10 | $size: 42px;
11 | $dark: #1E1E1E;
12 | $dark2: #181818;
13 | $dark3:#1f1f1f;
14 | $fadeColor: #c4c4c4;
15 | $border:#3f3f3f;
16 | $borderWidth: 0.5px;
17 | html {
18 | scroll-behavior: smooth;
19 | }
20 | body {
21 | font-family: 'Source Code Pro', monospace, 'Courier New', Courier;
22 | font-size: 14px;
23 | }
24 |
25 | ::-webkit-scrollbar {
26 | border-radius: 5px;
27 | -webkit-box-shadow: inset 0 0 6px transparent;
28 | box-shadow: inset 0 0 6px transparent;
29 | height: 5px;
30 | width: 5px
31 | }
32 |
33 | ::-webkit-scrollbar-track {
34 | border-radius: 5px;
35 | -webkit-box-shadow: inset 0 0 0 transparent;
36 | box-shadow: inset 0 0 0 transparent
37 | }
38 |
39 | ::-webkit-scrollbar-thumb {
40 | background: hsla(0,0%,100%,.502);
41 | border-radius: 5px;
42 | height: 3px
43 | }
44 |
45 | ::-webkit-scrollbar-corner {
46 | display: none;
47 | height: 0;
48 | width: 0
49 | }
50 |
51 | @import './left';
52 | @import './right';
53 | @import './style';
54 |
55 | @import './mid';
56 |
57 | .app {
58 | display: flex;
59 | width: 100%;
60 | height: 100vh;
61 | color: #fff;
62 | }
63 |
64 |
65 |
66 |
67 |
68 |
69 | .inp_wrapper {
70 | border-radius: 3px;
71 | background-color: #181818;
72 | border: $border .5px solid;
73 | display: flex;
74 | align-items: center;
75 | width: 100%;
76 |
77 | .inp {
78 | border: none;
79 | padding: 5px;
80 | width: 100%;
81 | display: block;
82 | background-color: transparent;
83 | color: inherit;
84 |
85 | border-right: $border .5px solid;
86 |
87 | &:focus {
88 | outline: none;
89 | }
90 | }
91 |
92 | .unit {
93 | padding: 5px;
94 | cursor: pointer;
95 | color: #aaa;
96 | }
97 |
98 | &:has(.inp:focus) {
99 |
100 | border: #8cc2ff .5px solid;
101 | }
102 | }
103 |
104 | .selection {
105 | background: $border;
106 | border-radius: 3px;
107 | color: #ccc;
108 | display: flex;
109 | align-items: center;
110 | justify-content: space-between;
111 | flex:1;
112 |
113 | .opts {
114 | width: 100%;
115 | .opt {
116 | padding: 6px;
117 | }
118 | }
119 |
120 | svg {
121 | width: 10px;
122 | margin-right: 7px;
123 | }
124 | }
125 |
126 |
--------------------------------------------------------------------------------
/src/vite-env.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
--------------------------------------------------------------------------------
/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "ES2020",
4 | "useDefineForClassFields": true,
5 | "lib": ["ES2020", "DOM", "DOM.Iterable"],
6 | "module": "ESNext",
7 | "skipLibCheck": true,
8 |
9 | /* Bundler mode */
10 | "moduleResolution": "bundler",
11 | "allowImportingTsExtensions": true,
12 | "resolveJsonModule": true,
13 | "isolatedModules": true,
14 | "noEmit": true,
15 | "jsx": "react-jsx",
16 |
17 | /* Linting */
18 | "strict": true,
19 | "noUnusedLocals": true,
20 | "noUnusedParameters": true,
21 | "noFallthroughCasesInSwitch": true
22 | },
23 | "include": ["src"],
24 | "references": [{ "path": "./tsconfig.node.json" }]
25 | }
26 |
--------------------------------------------------------------------------------
/tsconfig.node.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "composite": true,
4 | "skipLibCheck": true,
5 | "module": "ESNext",
6 | "moduleResolution": "bundler",
7 | "allowSyntheticDefaultImports": true
8 | },
9 | "include": ["vite.config.ts"]
10 | }
11 |
--------------------------------------------------------------------------------
/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import react from '@vitejs/plugin-react-swc'
3 | import autoprefixer from 'autoprefixer';
4 |
5 | // https://vitejs.dev/config/
6 | export default defineConfig({
7 | plugins: [react()],
8 | css: {
9 | postcss: {
10 | plugins: [
11 | autoprefixer({}) // add options if needed
12 | ],
13 | }
14 | }
15 | })
16 |
--------------------------------------------------------------------------------
/zzzzz.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Document
7 |
8 |
9 |
23 |
24 |
--------------------------------------------------------------------------------