@flozy/editor 1.0.6 → 1.0.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (96) hide show
  1. package/dist/Editor/CollaborativeEditor.js +116 -0
  2. package/dist/Editor/CommonEditor.js +132 -0
  3. package/dist/Editor/Editor.css +115 -0
  4. package/dist/Editor/Elements/CodeToText/CodeToText.css +57 -0
  5. package/dist/Editor/Elements/CodeToText/CodeToText.js +112 -0
  6. package/dist/Editor/Elements/CodeToText/CodeToTextButton.js +18 -0
  7. package/dist/Editor/Elements/CodeToText/HtmlCode.js +54 -0
  8. package/dist/Editor/Elements/CodeToText/HtmlContextMenu.js +39 -0
  9. package/dist/Editor/Elements/Color Picker/ColorPicker.css +38 -0
  10. package/dist/Editor/Elements/Color Picker/ColorPicker.js +116 -0
  11. package/dist/Editor/Elements/Color Picker/defaultColors.js +1 -0
  12. package/dist/Editor/Elements/Embed/Embed.css +14 -0
  13. package/dist/Editor/Elements/Embed/Embed.js +94 -0
  14. package/dist/Editor/Elements/Embed/Image.js +70 -0
  15. package/dist/Editor/Elements/Embed/Video.js +60 -0
  16. package/dist/Editor/Elements/Equation/Equation.js +24 -0
  17. package/dist/Editor/Elements/Equation/EquationButton.js +66 -0
  18. package/dist/Editor/Elements/Equation/styles.css +4 -0
  19. package/dist/Editor/Elements/Grid/Grid.js +53 -0
  20. package/dist/Editor/Elements/Grid/GridButton.js +19 -0
  21. package/dist/Editor/Elements/Grid/GridItem.js +53 -0
  22. package/dist/Editor/Elements/ID/Id.js +56 -0
  23. package/dist/Editor/Elements/Link/Link.js +34 -0
  24. package/dist/Editor/Elements/Link/LinkButton.js +77 -0
  25. package/dist/Editor/Elements/Link/styles.css +20 -0
  26. package/dist/Editor/Elements/Mentions/Mentions.js +34 -0
  27. package/dist/Editor/Elements/NewLine/NewLineButton.js +22 -0
  28. package/dist/Editor/Elements/Table/Table.js +15 -0
  29. package/dist/Editor/Elements/Table/TableSelector.css +18 -0
  30. package/dist/Editor/Elements/Table/TableSelector.js +93 -0
  31. package/dist/Editor/Elements/TableContextMenu/TableContextMenu.js +91 -0
  32. package/dist/Editor/Elements/TableContextMenu/styles.css +18 -0
  33. package/dist/Editor/RemoteCursorOverlay/Overlay.js +75 -0
  34. package/dist/Editor/Toolbar/Toolbar.js +166 -0
  35. package/dist/Editor/Toolbar/styles.css +28 -0
  36. package/dist/Editor/Toolbar/toolbarGroups.js +131 -0
  37. package/dist/Editor/Toolbar/toolbarIcons/align-center.svg +1 -0
  38. package/dist/Editor/Toolbar/toolbarIcons/align-left.svg +1 -0
  39. package/dist/Editor/Toolbar/toolbarIcons/align-right.svg +1 -0
  40. package/dist/Editor/Toolbar/toolbarIcons/blockquote.svg +1 -0
  41. package/dist/Editor/Toolbar/toolbarIcons/bold.png +0 -0
  42. package/dist/Editor/Toolbar/toolbarIcons/fontColor.svg +4 -0
  43. package/dist/Editor/Toolbar/toolbarIcons/headingOne.svg +3 -0
  44. package/dist/Editor/Toolbar/toolbarIcons/headingTwo.svg +3 -0
  45. package/dist/Editor/Toolbar/toolbarIcons/italic.png +0 -0
  46. package/dist/Editor/Toolbar/toolbarIcons/link.svg +1 -0
  47. package/dist/Editor/Toolbar/toolbarIcons/orderedList.svg +1 -0
  48. package/dist/Editor/Toolbar/toolbarIcons/strikethrough.png +0 -0
  49. package/dist/Editor/Toolbar/toolbarIcons/subscript.svg +1 -0
  50. package/dist/Editor/Toolbar/toolbarIcons/superscript.svg +1 -0
  51. package/dist/Editor/Toolbar/toolbarIcons/textColor.png +0 -0
  52. package/dist/Editor/Toolbar/toolbarIcons/underline.png +0 -0
  53. package/dist/Editor/Toolbar/toolbarIcons/unorderedList.svg +1 -0
  54. package/dist/Editor/YjsProvider.js +9 -0
  55. package/dist/Editor/common/Button.js +21 -0
  56. package/dist/Editor/common/Icon.js +114 -0
  57. package/dist/Editor/common/MentionsPopup.js +54 -0
  58. package/dist/Editor/hooks/useMentions.js +44 -0
  59. package/dist/Editor/hooks/withCollaborative.js +15 -0
  60. package/dist/Editor/hooks/withCommon.js +11 -0
  61. package/dist/Editor/plugins/withEmbeds.js +29 -0
  62. package/dist/Editor/plugins/withEquation.js +8 -0
  63. package/dist/Editor/plugins/withLinks.js +8 -0
  64. package/dist/Editor/plugins/withMentions.js +18 -0
  65. package/dist/Editor/plugins/withTable.js +61 -0
  66. package/dist/Editor/utils/SlateUtilityFunctions.js +224 -0
  67. package/dist/Editor/utils/customHooks/useContextMenu.js +37 -0
  68. package/dist/Editor/utils/customHooks/useFormat.js +21 -0
  69. package/dist/Editor/utils/customHooks/usePopup.js +21 -0
  70. package/dist/Editor/utils/customHooks/useResize.js +47 -0
  71. package/dist/Editor/utils/draftToSlate.js +111 -0
  72. package/dist/Editor/utils/embed.js +24 -0
  73. package/dist/Editor/utils/equation.js +23 -0
  74. package/dist/Editor/utils/events.js +76 -0
  75. package/dist/Editor/utils/grid.js +13 -0
  76. package/dist/Editor/utils/gridItem.js +19 -0
  77. package/dist/Editor/utils/link.js +52 -0
  78. package/dist/Editor/utils/mentions.js +12 -0
  79. package/dist/Editor/utils/paragraph.js +6 -0
  80. package/dist/Editor/utils/serializer.js +28 -0
  81. package/dist/Editor/utils/table.js +129 -0
  82. package/dist/index.js +4 -0
  83. package/package.json +18 -8
  84. package/build/asset-manifest.json +0 -14
  85. package/build/favicon.ico +0 -0
  86. package/build/index.html +0 -1
  87. package/build/logo192.png +0 -0
  88. package/build/logo512.png +0 -0
  89. package/build/manifest.json +0 -25
  90. package/build/robots.txt +0 -3
  91. package/build/static/css/main.71100b24.css +0 -2
  92. package/build/static/css/main.71100b24.css.map +0 -1
  93. package/build/static/js/main.dd36b23b.js +0 -3
  94. package/build/static/js/main.dd36b23b.js.LICENSE.txt +0 -19
  95. package/build/static/js/main.dd36b23b.js.map +0 -1
  96. /package/{build/static/media/unlink.b8761030d4a17499149d2d61adc064b3.svg → dist/Editor/Toolbar/toolbarIcons/unlink.svg} +0 -0
@@ -0,0 +1,28 @@
1
+ import { Text } from 'slate';
2
+ import { getBlock, getMarked } from './SlateUtilityFunctions.js';
3
+ import ReactDOMServer from 'react-dom/server';
4
+ const {
5
+ renderToStaticMarkup
6
+ } = ReactDOMServer;
7
+ export const serialize = node => {
8
+ if (Text.isText(node)) {
9
+ let string = getMarked(node, node.text);
10
+ string = renderToStaticMarkup(string);
11
+ return string;
12
+ }
13
+ const children = node.children.map(n => serialize(n)).join('');
14
+ let block = getBlock({
15
+ children,
16
+ element: node
17
+ });
18
+ block = renderToStaticMarkup(block);
19
+ return block;
20
+ };
21
+ export const serializer = editorValue => {
22
+ if (editorValue.length > 0) {
23
+ return editorValue.map(n => serialize(n)).join('');
24
+ }
25
+ };
26
+ export const deserializer = body => {
27
+ console.log(body);
28
+ };
@@ -0,0 +1,129 @@
1
+ import { Transforms, Editor, Range, Element, Path } from "slate";
2
+ export class TableUtil {
3
+ constructor(editor) {
4
+ this.editor = editor;
5
+ }
6
+ insertTable = (rows, columns) => {
7
+ const [tableNode] = Editor.nodes(this.editor, {
8
+ match: n => !Editor.isEditor(n) && Element.isElement(n) && n.type === "table",
9
+ mode: "highest"
10
+ });
11
+ if (tableNode) return;
12
+ if (!rows || !columns) {
13
+ return;
14
+ }
15
+ //Creating a 2-d array of blank string as default text for the table
16
+ const cellText = Array.from({
17
+ length: rows
18
+ }, () => Array.from({
19
+ length: columns
20
+ }, () => ""));
21
+ const newTable = createTableNode(cellText, rows, columns);
22
+ Transforms.insertNodes(this.editor, newTable, {
23
+ // mode: "highest",
24
+ });
25
+ Transforms.insertNodes(this.editor, {
26
+ type: "paragraph",
27
+ children: [{
28
+ text: ""
29
+ }]
30
+ }
31
+ // { mode: "highest" }
32
+ );
33
+ };
34
+
35
+ removeTable = () => {
36
+ Transforms.removeNodes(this.editor, {
37
+ match: n => !Editor.isEditor(n) && Element.isElement(n) && n.type === "table"
38
+ // mode:'highest'
39
+ });
40
+ };
41
+
42
+ insertRow = action => {
43
+ const {
44
+ selection
45
+ } = this.editor;
46
+ if (!!selection && Range.isCollapsed(selection)) {
47
+ const [tableNode] = Editor.nodes(this.editor, {
48
+ match: n => !Editor.isEditor(n) && Element.isElement(n) && n.type === "table-row"
49
+ });
50
+ if (tableNode) {
51
+ const [[table, tablePath]] = Editor.nodes(this.editor, {
52
+ match: n => !Editor.isEditor(n) && Element.isElement(n) && n.type === "table"
53
+ });
54
+ const [, currentRow] = tableNode;
55
+ const path = action === "after" ? Path.next(currentRow) : currentRow;
56
+ Transforms.insertNodes(this.editor, createRow(Array(table.columns).fill("")), {
57
+ at: path
58
+ });
59
+ Transforms.setNodes(this.editor, {
60
+ rows: table.rows + 1
61
+ }, {
62
+ at: tablePath
63
+ });
64
+ }
65
+ }
66
+ };
67
+ insertColumn = action => {
68
+ const {
69
+ selection
70
+ } = this.editor;
71
+ if (!!selection && Range.isCollapsed(selection)) {
72
+ const [tableNode] = Editor.nodes(this.editor, {
73
+ match: n => !Editor.isEditor(n) && Element.isElement(n) && n.type === "table-cell"
74
+ });
75
+ if (tableNode) {
76
+ const [[table, tablePath]] = Editor.nodes(this.editor, {
77
+ match: n => !Editor.isEditor(n) && Element.isElement(n) && n.type === "table"
78
+ });
79
+ const [, currentCell] = tableNode;
80
+ const startPath = action === "after" ? Path.next(currentCell) : currentCell;
81
+
82
+ // The last two indices of the path represents the row and column. We need to add one cell to each row starting from the first row
83
+ startPath[startPath.length - 2] = 0;
84
+ for (let row = 0; row < table.rows; row++) {
85
+ Transforms.insertNodes(this.editor, createTableCell(""), {
86
+ at: startPath
87
+ });
88
+ startPath[startPath.length - 2]++;
89
+ }
90
+ Transforms.setNodes(this.editor, {
91
+ columns: table.columns + 1
92
+ }, {
93
+ at: tablePath
94
+ });
95
+ }
96
+ }
97
+ };
98
+ }
99
+ const createRow = cellText => {
100
+ const newRow = Array.from(cellText, value => createTableCell(value));
101
+ return {
102
+ type: "table-row",
103
+ children: newRow
104
+ };
105
+ };
106
+ export const createTableCell = text => {
107
+ return {
108
+ type: "table-cell",
109
+ children: [{
110
+ type: "paragraph",
111
+ children: [{
112
+ text
113
+ }]
114
+ }]
115
+ };
116
+ };
117
+ const createTableNode = (cellText, rows, columns) => {
118
+ const tableChildren = Array.from(cellText, value => createRow(value));
119
+ let tableNode = {
120
+ type: "paragraph",
121
+ children: [{
122
+ type: "table",
123
+ children: tableChildren,
124
+ rows,
125
+ columns
126
+ }]
127
+ };
128
+ return tableNode;
129
+ };
package/dist/index.js ADDED
@@ -0,0 +1,4 @@
1
+ import Collaborative from "./Editor/CollaborativeEditor";
2
+ import CommonEditor from "./Editor/CommonEditor";
3
+ export const Editor = CommonEditor;
4
+ export const CollaborativeEditor = Collaborative;
package/package.json CHANGED
@@ -1,7 +1,11 @@
1
1
  {
2
2
  "name": "@flozy/editor",
3
- "version": "1.0.6",
3
+ "version": "1.0.8",
4
4
  "description": "An Editor for flozy app brain",
5
+ "files": [
6
+ "dist"
7
+ ],
8
+ "main": "dist/index.js",
5
9
  "dependencies": {
6
10
  "@emotion/react": "^11.11.1",
7
11
  "@emotion/styled": "^11.11.0",
@@ -18,8 +22,6 @@
18
22
  "interweave": "^13.1.0",
19
23
  "lint-staged": "^13.2.3",
20
24
  "prettier": "^3.0.1",
21
- "react": "^18.2.0",
22
- "react-dom": "^18.2.0",
23
25
  "react-icons": "^4.10.1",
24
26
  "react-katex": "^3.0.1",
25
27
  "react-scripts": "5.0.1",
@@ -31,6 +33,10 @@
31
33
  "y-websocket": "^1.5.0",
32
34
  "yjs": "^13.6.8"
33
35
  },
36
+ "peerDependencies": {
37
+ "react": "^18.2.0",
38
+ "react-dom": "^18.2.0"
39
+ },
34
40
  "scripts": {
35
41
  "prepare": "husky install .husky",
36
42
  "lint": "./node_modules/.bin/eslint --ignore-path .gitignore . --fix",
@@ -39,7 +45,8 @@
39
45
  "test": "craco test --passWithNoTests",
40
46
  "eject": "react-scripts eject",
41
47
  "storybook": "storybook dev -p 6006",
42
- "build-storybook": "storybook build"
48
+ "build-storybook": "storybook build",
49
+ "publish:npm": "rm -rf dist && mkdir dist && babel src/components -d dist --copy-files"
43
50
  },
44
51
  "eslintConfig": {
45
52
  "extends": [
@@ -71,7 +78,9 @@
71
78
  ]
72
79
  },
73
80
  "devDependencies": {
81
+ "@babel/cli": "^7.23.0",
74
82
  "@babel/plugin-proposal-private-property-in-object": "^7.21.11",
83
+ "@babel/preset-react": "^7.22.15",
75
84
  "@craco/craco": "^7.1.0",
76
85
  "@storybook/addon-essentials": "^7.4.0",
77
86
  "@storybook/addon-interactions": "^7.4.0",
@@ -104,8 +113,9 @@
104
113
  "bugs": {
105
114
  "url": "https://github.com/Flozy-App/editor/issues"
106
115
  },
107
- "files": [
108
- "build"
109
- ],
110
- "main": "build/index.js"
116
+ "babel": {
117
+ "presets": [
118
+ "@babel/preset-react"
119
+ ]
120
+ }
111
121
  }
@@ -1,14 +0,0 @@
1
- {
2
- "files": {
3
- "main.css": "/static/css/main.71100b24.css",
4
- "main.js": "/static/js/main.dd36b23b.js",
5
- "static/media/unlink.svg": "/static/media/unlink.b8761030d4a17499149d2d61adc064b3.svg",
6
- "index.html": "/index.html",
7
- "main.71100b24.css.map": "/static/css/main.71100b24.css.map",
8
- "main.dd36b23b.js.map": "/static/js/main.dd36b23b.js.map"
9
- },
10
- "entrypoints": [
11
- "static/css/main.71100b24.css",
12
- "static/js/main.dd36b23b.js"
13
- ]
14
- }
package/build/favicon.ico DELETED
Binary file
package/build/index.html DELETED
@@ -1 +0,0 @@
1
- <!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><link rel="apple-touch-icon" href="/logo192.png"/><link rel="manifest" href="/manifest.json"/><title>FLOZY APP - Editor</title><script defer="defer" src="/static/js/main.dd36b23b.js"></script><link href="/static/css/main.71100b24.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
package/build/logo192.png DELETED
Binary file
package/build/logo512.png DELETED
Binary file
@@ -1,25 +0,0 @@
1
- {
2
- "short_name": "React App",
3
- "name": "Create React App Sample",
4
- "icons": [
5
- {
6
- "src": "favicon.ico",
7
- "sizes": "64x64 32x32 24x24 16x16",
8
- "type": "image/x-icon"
9
- },
10
- {
11
- "src": "logo192.png",
12
- "type": "image/png",
13
- "sizes": "192x192"
14
- },
15
- {
16
- "src": "logo512.png",
17
- "type": "image/png",
18
- "sizes": "512x512"
19
- }
20
- ],
21
- "start_url": ".",
22
- "display": "standalone",
23
- "theme_color": "#000000",
24
- "background_color": "#ffffff"
25
- }
package/build/robots.txt DELETED
@@ -1,3 +0,0 @@
1
- # https://www.robotstxt.org/robotstxt.html
2
- User-agent: *
3
- Disallow:
@@ -1,2 +0,0 @@
1
- blockquote{border-left:2px solid #ddd;color:#aaa;font-style:italic;margin-left:0;margin-right:0;padding-left:10px}table,td,th{border:1px solid #000}table{border-collapse:collapse}button{background-color:#fff;border:none;opacity:.5}.btnActive{opacity:1}.editor-wrapper{background:#fff;border-radius:10px;box-shadow:-8px 8px 13px #ededed,8px -8px 13px #fff;font-family:Helvetica,Arial,sans-serif;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;max-width:100%;min-height:400px;min-width:100%;padding:12px 10px;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}table{width:100%}td{height:50px;padding:0 5px}.popup-wrapper{display:inline;position:relative}.popup{background-color:#fff;border:1px solid #d3d3d3;bottom:0;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;left:0;margin:auto;padding:6px 10px;position:fixed;right:0;top:0;width:300px;z-index:1}button{cursor:pointer}code{font-family:source-code-pro,Menlo,Monaco,Consolas,Courier New,monospace}[data-slate-node=element]{margin:10px 0}html{scroll-behavior:smooth}.editor-wrapper :focus-visible{outline:none}.grid-container{background-color:#f3f6f9;border:1px solid #e5eaf2;border-radius:12px;display:flex;flex-wrap:wrap;padding:16px;position:relative}.grid-container-toolbar,.grid-item-toolbar{position:absolute;right:0;top:0}.grid-item{background-color:#fff;padding:16px;position:relative}@media (max-width:480px){.toolbar{flex-wrap:nowrap;overflow-x:scroll}.toolbar,.toolbar-grp,.toolbar-grp>div{display:flex}.grid-item{width:100%!important}}.link{display:inline;position:relative}.link-popup{align-items:center;background-color:#fff;border:1px solid #d3d3d3;border-radius:6px;display:flex;gap:10px;left:0;padding:6px 10px;position:absolute;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;z-index:1}img{height:15px}.equation-inline{display:inline;position:relative}.toolbar{align-items:center;background:#fff;border-radius:10px;box-shadow:-8px 8px 13px #ededed,8px -8px 13px #fff;display:flex;flex-wrap:wrap;margin:4px 0;padding:15px 10px;position:-webkit-sticky;position:sticky;row-gap:15px;top:0;z-index:2}.toolbar-grp>*{cursor:pointer;margin-right:10px}.toolbar-grp{margin:0 10px}select{border:none;height:30px;width:6.9rem}.color-options{grid-gap:5px;align-items:center;display:grid;gap:5px;grid-template-columns:auto auto auto auto auto auto auto}.clicked{border:1px solid #d3d3d3;border-bottom:none}.hexPreview,.option{background-color:#000;height:16px;width:16px}.color-picker form{align-items:center;-webkit-column-gap:5px;column-gap:5px;display:flex;width:100%}.color-picker input{border:1px solid #d3d3d3;border-radius:5px;height:1.3em;padding-left:5px;width:65%}.color-picker button{cursor:pointer;margin:0;padding:0}.color-picker input:focus{outline:none}.embed{margin-right:20px;position:relative;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}.embed iframe,.embed img{height:100%;width:100%}.embed button{bottom:-6px;position:absolute;right:0}.table-option{display:flex;gap:5px;margin:5px 2px;white-space:nowrap}.table-input{grid-gap:3px;display:grid;gap:3px;grid-template-columns:auto auto auto auto auto auto}.table-unit{border:1px solid #d3d3d3;height:15px;width:15px}.contextMenu{background:#fff;border:1px solid #d3d3d3;border-radius:10px;cursor:pointer;flex-direction:column;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;padding:.5%;position:fixed;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}.contextMenu,.menuOption{display:flex;gap:15px}.code-wrapper{align-items:center;background:rgba(0,0,0,.9);display:flex;height:100vh;justify-content:center;left:0;position:fixed;top:0;width:100vw;z-index:2}.codeToTextWrapper{height:80%;width:80%}.codeToText,.codeToTextWrapper{grid-template-columns:45% 10% 45%}.codeToText{display:grid;height:90%;width:100%}.codeToText textarea,.textOutput{border-radius:15px;padding:10px}.codeToText textarea{resize:none}.codeToText textarea:focus{outline:none}.textOutput{background:#fff;overflow:scroll}.codeToTextWrapper button{border-radius:5px;cursor:pointer;font-weight:bolder;margin:3% 1%;opacity:1;padding:10px 37px}.done{background:#44c767;color:#fff}.clear{background:#fff;border:1px solid #d3d3d3;color:#a9a4a4}
2
- /*# sourceMappingURL=main.71100b24.css.map*/
@@ -1 +0,0 @@
1
- {"version":3,"file":"static/css/main.71100b24.css","mappings":"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","sources":["components/Editor/Editor.css","components/Editor/Elements/Link/styles.css","components/Editor/Elements/Equation/styles.css","components/Editor/Toolbar/styles.css","components/Editor/Elements/Color Picker/ColorPicker.css","components/Editor/Elements/Embed/Embed.css","components/Editor/Elements/Table/TableSelector.css","components/Editor/Elements/TableContextMenu/styles.css","components/Editor/Elements/CodeToText/CodeToText.css"],"sourcesContent":["blockquote{\r\n border-left: 2px solid #ddd;\r\n margin-left: 0;\r\n margin-right: 0;\r\n padding-left: 10px;\r\n color: #aaa;\r\n font-style: italic;\r\n}\r\ntable, th, td {\r\n border: 1px solid black;\r\n}\r\ntable{\r\n border-collapse: collapse;\r\n}\r\nbutton{\r\n background-color: white;\r\n border:none;\r\n opacity: 0.5;\r\n}\r\n.btnActive{\r\n opacity: 1;\r\n}\r\n.editor-wrapper{\r\n font-family:'Helvetica','Arial', sans-serif;\r\n border-radius: 10px;\r\nbackground: #ffffff;\r\nbox-shadow: -8px 8px 13px #ededed,\r\n 8px -8px 13px #ffffff;\r\n min-height: 400px;\r\n min-width: 100%;\r\n width: fit-content;\r\n height: fit-content;\r\n padding: 12px 10px;\r\n max-width: 100%;\r\n}\r\ntable{\r\n width:100%;\r\n}\r\ntd{\r\n height: 50px;\r\n padding:0 5px;\r\n}\r\n.popup-wrapper{\r\n display: inline;\r\n position: relative;\r\n}\r\n.popup{\r\n position: fixed;\r\n left: 0;\r\n right: 0;\r\n top: 0;\r\n bottom: 0;\r\n margin: auto;\r\n background-color: white;\r\n padding: 6px 10px;\r\n border: 1px solid lightgray;\r\n height: fit-content;\r\n z-index: 1;\r\n width: 300px;\r\n\r\n}\r\nbutton{\r\n cursor: pointer;\r\n}\r\ncode {\r\n font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',\r\n monospace;\r\n}\r\n[data-slate-node=\"element\"] {\r\n margin: 10px 0;\r\n}\r\nhtml{\r\n scroll-behavior: smooth;\r\n}\r\n.editor-wrapper *:focus-visible {\r\n outline: none;\r\n}\r\n\r\n.grid-container {\r\n display: flex;\r\n border-radius: 12px;\r\n background-color: #F3F6F9;\r\n border: 1px solid #E5EAF2;\r\n padding: 16px;\r\n position: relative;\r\n flex-wrap: wrap;\r\n}\r\n\r\n.grid-container-toolbar,\r\n.grid-item-toolbar {\r\n position: absolute;\r\n right: 0;\r\n top: 0;\r\n}\r\n\r\n.grid-item {\r\n padding: 16px;\r\n background-color: #fff;\r\n position: relative;\r\n}\r\n\r\n@media (max-width: 480px) {\r\n .toolbar {\r\n display: flex;\r\n flex-wrap: nowrap;\r\n overflow-x: scroll;\r\n }\r\n .toolbar-grp,\r\n .toolbar-grp > div {\r\n display: flex;\r\n }\r\n .grid-item {\r\n width: 100% !important;\r\n }\r\n}\r\n",".link{\r\n display: inline;\r\n position: relative;\r\n}\r\n.link-popup{\r\n position: absolute;\r\n left: 0;\r\n display: flex;\r\n align-items: center;\r\n background-color: white;\r\n padding: 6px 10px;\r\n gap: 10px;\r\n border-radius: 6px;\r\n border: 1px solid lightgray;\r\n width: fit-content;\r\n z-index: 1;\r\n}\r\nimg{\r\n height: 15px;\r\n}",".equation-inline{\n display: inline;\n position: relative;\n}",".toolbar{\r\n border-radius: 10px;\r\nbackground: #ffffff;\r\nbox-shadow: -8px 8px 13px #ededed,\r\n 8px -8px 13px #ffffff;\r\n margin:4px 0;\r\n display:flex;\r\n flex-wrap:wrap;\r\n align-items:center;\r\n padding: 15px 10px;\r\n row-gap: 15px;\r\n position: -webkit-sticky;\r\n position: sticky;\r\n top: 0;\r\n z-index: 2;\r\n}\r\n.toolbar-grp>*{\r\n margin-right: 10px;\r\n cursor: pointer;\r\n}\r\n.toolbar-grp{\r\n margin:0 10px;\r\n}\r\nselect{\r\n height: 30px;\r\n border: none;\r\n width: 6.9rem;\r\n}\r\n","\r\n.color-options{\r\n display: grid;\r\n grid-template-columns: auto auto auto auto auto auto auto;\r\n align-items: center;\r\n gap: 5px;\r\n}\r\n.clicked{\r\n border: 1px solid lightgray;\r\n border-bottom: none;\r\n}\r\n.option,.hexPreview{\r\n width: 16px;\r\n height: 16px;\r\n background-color: #000000;\r\n\r\n}\r\n.color-picker form{\r\n display: flex;\r\n align-items: center;\r\n column-gap: 5px;\r\n width: 100%;\r\n}\r\n.color-picker input{\r\n width: 65%;\r\n height:1.3em;\r\n border:1px solid lightgray;\r\n border-radius: 5px;\r\n padding-left:5px\r\n}\r\n.color-picker button{\r\n margin:0;\r\n padding:0;\r\n cursor: pointer;\r\n}\r\n.color-picker input:focus{\r\n outline: none;\r\n}\r\n",".embed{\n width: fit-content;\n position: relative;\n margin-right: 20px;\n}\n.embed img,.embed iframe{\n width: 100%;\n height:100%;\n}\n.embed button{\n position: absolute;\n bottom: -6px;\n right: 0;\n}",".table-option{\n display: flex;\n margin: 5px 2px;\n gap: 5px;\n}\n.table-option{\n white-space: nowrap;\n}\n.table-input{\n display: grid;\n grid-template-columns: auto auto auto auto auto auto;\n gap: 3px;\n}\n.table-unit{\n width:15px;\n height:15px;\n border: 1px solid lightgray;\n}",".contextMenu{\n width: fit-content;\n height: fit-content;\n position: fixed;\n background: white;\n border: 1px solid lightgray;\n border-radius: 10px;\n padding: 0.5%;\n display: flex;\n gap: 15px;\n flex-direction: column;\n cursor: pointer;\n}\n\n.menuOption {\n display: flex;\n gap:15px;\n}","\n.code-wrapper{\n position: fixed;\n top: 0;\n left: 0;\n width: 100vw;\n height: 100vh;\n background:rgba(0,0, 0,0.9);\n z-index:2;\n display: flex;\n justify-content: center;\n align-items: center;\n\n}\n.codeToTextWrapper{\n width: 80%;\n height: 80%;\n grid-template-columns: 45% 10% 45%;\n}\n.codeToText{\n width: 100%;\n height: 90%;\n display: grid;\n grid-template-columns: 45% 10% 45%;\n}\n.codeToText textarea,.textOutput{\n border-radius: 15px;\n padding: 10px;\n}\n\n.codeToText textarea{\n resize: none;\n}\n.codeToText textarea:focus{\n outline: none;\n}\n.textOutput{\n background: #fff;\n overflow: scroll;\n}\n.codeToTextWrapper button{\n margin: 3% 1%;\n padding: 10px 37px;\n cursor: pointer;\n border-radius: 5px;\n opacity: 1;\n font-weight: bolder;\n}\n.done{\n background: #44c767;\n color:#fff;\n}\n.clear{\n background: #fff;\n color:#a9a4a4;\n border:1px solid lightgray;\n}"],"names":[],"sourceRoot":""}