@eventuras/scribo 0.8.2 → 0.10.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (164) hide show
  1. package/dist/App.d.ts +11 -0
  2. package/dist/App.d.ts.map +1 -0
  3. package/dist/MarkdownEditor.d.ts +18 -0
  4. package/dist/MarkdownEditor.d.ts.map +1 -0
  5. package/dist/MarkdownEditor2.js +111 -0
  6. package/dist/MarkdownEditor2.js.map +1 -0
  7. package/dist/MarkdownInput.d.ts +27 -0
  8. package/dist/MarkdownInput.d.ts.map +1 -0
  9. package/dist/MarkdownInput.js +57 -0
  10. package/dist/MarkdownInput.js.map +1 -0
  11. package/dist/callout.js +5 -0
  12. package/dist/context/SharedHistoryContext.d.ts +11 -0
  13. package/dist/context/SharedHistoryContext.d.ts.map +1 -0
  14. package/dist/context/SharedHistoryContext.js +12 -0
  15. package/dist/context/SharedHistoryContext.js.map +1 -0
  16. package/dist/index.d.ts +1 -0
  17. package/dist/index.d.ts.map +1 -0
  18. package/dist/main.d.ts +5 -0
  19. package/dist/main.d.ts.map +1 -0
  20. package/dist/main.js +4 -0
  21. package/dist/nodes/EditorNodes.d.ts +4 -0
  22. package/dist/nodes/EditorNodes.d.ts.map +1 -0
  23. package/dist/nodes/EditorNodes.js +39 -0
  24. package/dist/nodes/EditorNodes.js.map +1 -0
  25. package/dist/nodes/callout/CalloutComponent.d.ts +6 -0
  26. package/dist/nodes/callout/CalloutComponent.d.ts.map +1 -0
  27. package/dist/nodes/callout/CalloutComponent.js +53 -0
  28. package/dist/nodes/callout/CalloutComponent.js.map +1 -0
  29. package/dist/nodes/callout/CalloutNode.d.ts +27 -0
  30. package/dist/nodes/callout/CalloutNode.d.ts.map +1 -0
  31. package/dist/nodes/callout/CalloutNode.js +153 -0
  32. package/dist/nodes/callout/CalloutNode.js.map +1 -0
  33. package/dist/nodes/callout/CalloutTransformer.d.ts +3 -0
  34. package/dist/nodes/callout/CalloutTransformer.d.ts.map +1 -0
  35. package/dist/nodes/callout/CalloutTransformer.js +48 -0
  36. package/dist/nodes/callout/CalloutTransformer.js.map +1 -0
  37. package/dist/nodes/callout/calloutPlugin.d.ts +3 -0
  38. package/dist/nodes/callout/calloutPlugin.d.ts.map +1 -0
  39. package/dist/nodes/callout/calloutPlugin.js +34 -0
  40. package/dist/nodes/callout/calloutPlugin.js.map +1 -0
  41. package/dist/nodes/callout/index.d.ts +6 -0
  42. package/dist/nodes/callout/index.d.ts.map +1 -0
  43. package/dist/nodes/schedule/ScheduleItemComponent.d.ts +9 -0
  44. package/dist/nodes/schedule/ScheduleItemComponent.d.ts.map +1 -0
  45. package/dist/nodes/schedule/ScheduleItemComponent.js +167 -0
  46. package/dist/nodes/schedule/ScheduleItemComponent.js.map +1 -0
  47. package/dist/nodes/schedule/ScheduleItemNode.d.ts +31 -0
  48. package/dist/nodes/schedule/ScheduleItemNode.d.ts.map +1 -0
  49. package/dist/nodes/schedule/ScheduleItemNode.js +94 -0
  50. package/dist/nodes/schedule/ScheduleItemNode.js.map +1 -0
  51. package/dist/nodes/schedule/ScheduleTransformer.d.ts +22 -0
  52. package/dist/nodes/schedule/ScheduleTransformer.d.ts.map +1 -0
  53. package/dist/nodes/schedule/ScheduleTransformer.js +60 -0
  54. package/dist/nodes/schedule/ScheduleTransformer.js.map +1 -0
  55. package/dist/nodes/schedule/index.d.ts +5 -0
  56. package/dist/nodes/schedule/index.d.ts.map +1 -0
  57. package/dist/nodes/schedule/schedulePlugin.d.ts +3 -0
  58. package/dist/nodes/schedule/schedulePlugin.d.ts.map +1 -0
  59. package/dist/nodes/schedule/schedulePlugin.js +33 -0
  60. package/dist/nodes/schedule/schedulePlugin.js.map +1 -0
  61. package/dist/plugins/AutoLinkPlugin.d.ts +3 -0
  62. package/dist/plugins/AutoLinkPlugin.d.ts.map +1 -0
  63. package/dist/plugins/AutoLinkPlugin.js +22 -0
  64. package/dist/plugins/AutoLinkPlugin.js.map +1 -0
  65. package/dist/plugins/FloatingLinkEditorPlugin.d.ts +7 -0
  66. package/dist/plugins/FloatingLinkEditorPlugin.d.ts.map +1 -0
  67. package/dist/plugins/FloatingLinkEditorPlugin2.js +302 -0
  68. package/dist/plugins/FloatingLinkEditorPlugin2.js.map +1 -0
  69. package/dist/plugins/HistoryPlugin.d.ts +26 -0
  70. package/dist/plugins/HistoryPlugin.d.ts.map +1 -0
  71. package/dist/plugins/LinkPlugin.d.ts +3 -0
  72. package/dist/plugins/LinkPlugin.d.ts.map +1 -0
  73. package/dist/plugins/LinkPlugin.js +18 -0
  74. package/dist/plugins/LinkPlugin.js.map +1 -0
  75. package/dist/plugins/ToolbarPlugin.d.ts +7 -0
  76. package/dist/plugins/ToolbarPlugin.d.ts.map +1 -0
  77. package/dist/plugins/ToolbarPlugin.js +372 -0
  78. package/dist/plugins/ToolbarPlugin.js.map +1 -0
  79. package/dist/schedule.js +4 -0
  80. package/dist/scribo.css +1977 -0
  81. package/dist/themes/EditorTheme.d.ts +4 -0
  82. package/dist/themes/EditorTheme.d.ts.map +1 -0
  83. package/dist/themes/EditorTheme2.js +107 -0
  84. package/dist/themes/EditorTheme2.js.map +1 -0
  85. package/dist/types.d.ts +26 -0
  86. package/dist/types.d.ts.map +1 -0
  87. package/dist/ui/ContentEditable.d.ts +6 -0
  88. package/dist/ui/ContentEditable.d.ts.map +1 -0
  89. package/dist/ui/ContentEditable2.js +14 -0
  90. package/dist/ui/ContentEditable2.js.map +1 -0
  91. package/dist/ui/DropDown.d.ts +18 -0
  92. package/dist/ui/DropDown.d.ts.map +1 -0
  93. package/dist/ui/DropDown.js +162 -0
  94. package/dist/ui/DropDown.js.map +1 -0
  95. package/dist/ui/Placeholder.d.ts +6 -0
  96. package/dist/ui/Placeholder.d.ts.map +1 -0
  97. package/dist/ui/Placeholder2.js +13 -0
  98. package/dist/ui/Placeholder2.js.map +1 -0
  99. package/dist/utils/environment.d.ts +24 -0
  100. package/dist/utils/environment.d.ts.map +1 -0
  101. package/dist/utils/environment.js +20 -0
  102. package/dist/utils/environment.js.map +1 -0
  103. package/dist/utils/getSelectedNode.d.ts +3 -0
  104. package/dist/utils/getSelectedNode.d.ts.map +1 -0
  105. package/dist/utils/getSelectedNode.js +23 -0
  106. package/dist/utils/getSelectedNode.js.map +1 -0
  107. package/dist/utils/setFloatingElemPosition.d.ts +2 -0
  108. package/dist/utils/setFloatingElemPosition.d.ts.map +1 -0
  109. package/dist/utils/setFloatingElemPositionForLinkEditor.d.ts +2 -0
  110. package/dist/utils/setFloatingElemPositionForLinkEditor.d.ts.map +1 -0
  111. package/dist/utils/setFloatingElemPositionForLinkEditor.js +33 -0
  112. package/dist/utils/setFloatingElemPositionForLinkEditor.js.map +1 -0
  113. package/dist/utils/url.d.ts +11 -0
  114. package/dist/utils/url.d.ts.map +1 -0
  115. package/dist/utils/url.js +33 -0
  116. package/dist/utils/url.js.map +1 -0
  117. package/dist/vite.svg +1 -0
  118. package/package.json +57 -39
  119. package/src/MarkdownEditor.css +130 -27
  120. package/src/MarkdownEditor.tsx +82 -31
  121. package/src/MarkdownInput.tsx +9 -10
  122. package/src/context/SharedHistoryContext.tsx +8 -16
  123. package/src/main.tsx +3 -3
  124. package/src/nodes/EditorNodes.ts +10 -10
  125. package/src/nodes/callout/Callout.css +94 -0
  126. package/src/nodes/callout/CalloutComponent.tsx +61 -0
  127. package/src/nodes/callout/CalloutNode.ts +197 -0
  128. package/src/nodes/callout/CalloutTransformer.ts +87 -0
  129. package/src/nodes/callout/calloutPlugin.ts +37 -0
  130. package/src/nodes/callout/index.ts +5 -0
  131. package/src/nodes/schedule/ScheduleItem.css +140 -0
  132. package/src/nodes/schedule/ScheduleItemComponent.tsx +195 -0
  133. package/src/nodes/schedule/ScheduleItemNode.ts +135 -0
  134. package/src/nodes/schedule/ScheduleTransformer.ts +80 -0
  135. package/src/nodes/schedule/index.ts +4 -0
  136. package/src/nodes/schedule/schedulePlugin.ts +33 -0
  137. package/src/plugins/AutoLinkPlugin.tsx +5 -10
  138. package/src/plugins/FloatingLinkEditorPlugin.tsx +42 -66
  139. package/src/plugins/HistoryPlugin.tsx +20 -30
  140. package/src/plugins/LinkPlugin.tsx +2 -3
  141. package/src/plugins/ToolbarPlugin.tsx +129 -141
  142. package/src/themes/EditorTheme.css +82 -62
  143. package/src/themes/EditorTheme.ts +89 -90
  144. package/src/types.ts +27 -0
  145. package/src/ui/ContentEditable.tsx +5 -5
  146. package/src/ui/DropDown.tsx +23 -41
  147. package/src/ui/Placeholder.tsx +21 -21
  148. package/src/utils/environment.ts +6 -12
  149. package/src/utils/getSelectedNode.ts +3 -5
  150. package/src/utils/setFloatingElemPosition.ts +2 -5
  151. package/src/utils/setFloatingElemPositionForLinkEditor.ts +1 -1
  152. package/src/utils/url.ts +4 -10
  153. package/tsconfig.json +8 -0
  154. package/CHANGELOG.md +0 -59
  155. package/README.md +0 -126
  156. package/RELEASE.md +0 -102
  157. package/eslint.config.js +0 -4
  158. package/src/App.css +0 -35
  159. package/src/App.tsx +0 -42
  160. package/src/index.tsx +0 -13
  161. package/tsconfig.node.json +0 -11
  162. package/vite.config.site.ts +0 -19
  163. package/vite.config.ts +0 -33
  164. /package/{src → dist}/vite-env.d.ts +0 -0
@@ -0,0 +1,33 @@
1
+ //#region src/utils/url.ts
2
+ /**
3
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
4
+ *
5
+ * This source code is licensed under the MIT license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ *
8
+ * Source: https://github.com/facebook/lexical/blob/main/packages/lexical-playground/src/utils/url.ts
9
+ */
10
+ var SUPPORTED_URL_PROTOCOLS = /* @__PURE__ */ new Set([
11
+ "http:",
12
+ "https:",
13
+ "mailto:",
14
+ "sms:",
15
+ "tel:"
16
+ ]);
17
+ function sanitizeUrl(url) {
18
+ try {
19
+ const parsedUrl = new URL(url);
20
+ if (!SUPPORTED_URL_PROTOCOLS.has(parsedUrl.protocol)) return "about:blank";
21
+ } catch {
22
+ return url;
23
+ }
24
+ return url;
25
+ }
26
+ var urlRegExp = /* @__PURE__ */ new RegExp(/((([A-Za-z]{3,9}:(?:\/\/)?)(?:[-;:&=+$,\w]+@)?[A-Za-z0-9.-]+|(?:www.|[-;:&=+$,\w]+@)[A-Za-z0-9.-]+)((?:\/[+~%/.\w-]*)?\??(?:[-+=&;%@.\w]*)#?(?:\w*))?)/);
27
+ function validateUrl(url) {
28
+ return url === "https://" || urlRegExp.test(url);
29
+ }
30
+ //#endregion
31
+ export { sanitizeUrl, validateUrl };
32
+
33
+ //# sourceMappingURL=url.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"url.js","names":[],"sources":["../../src/utils/url.ts"],"sourcesContent":["/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * Source: https://github.com/facebook/lexical/blob/main/packages/lexical-playground/src/utils/url.ts\n */\n\nconst SUPPORTED_URL_PROTOCOLS = new Set(['http:', 'https:', 'mailto:', 'sms:', 'tel:']);\n\nexport function sanitizeUrl(url: string): string {\n try {\n const parsedUrl = new URL(url);\n // eslint-disable-next-line no-script-url\n if (!SUPPORTED_URL_PROTOCOLS.has(parsedUrl.protocol)) {\n return 'about:blank';\n }\n } catch {\n return url;\n }\n return url;\n}\n\n// Source: https://stackoverflow.com/a/8234912/2013580\nconst urlRegExp = new RegExp(\n /((([A-Za-z]{3,9}:(?:\\/\\/)?)(?:[-;:&=+$,\\w]+@)?[A-Za-z0-9.-]+|(?:www.|[-;:&=+$,\\w]+@)[A-Za-z0-9.-]+)((?:\\/[+~%/.\\w-]*)?\\??(?:[-+=&;%@.\\w]*)#?(?:\\w*))?)/\n);\nexport function validateUrl(url: string): boolean {\n // TODO Fix UI for link insertion; it should never default to an invalid URL such as https://.\n // Maybe show a dialog where they user can type the URL before inserting it.\n return url === 'https://' || urlRegExp.test(url);\n}\n"],"mappings":";;;;;;;;;AASA,IAAM,0CAA0B,IAAI,IAAI;CAAC;CAAS;CAAU;CAAW;CAAQ;AAAM,CAAC;AAEtF,SAAgB,YAAY,KAAqB;CAC/C,IAAI;EACF,MAAM,YAAY,IAAI,IAAI,GAAG;EAE7B,IAAI,CAAC,wBAAwB,IAAI,UAAU,QAAQ,GACjD,OAAO;CAEX,QAAQ;EACN,OAAO;CACT;CACA,OAAO;AACT;AAGA,IAAM,4BAAY,IAAI,OACpB,wJACF;AACA,SAAgB,YAAY,KAAsB;CAGhD,OAAO,QAAQ,cAAc,UAAU,KAAK,GAAG;AACjD"}
package/dist/vite.svg ADDED
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>
package/package.json CHANGED
@@ -1,65 +1,83 @@
1
1
  {
2
2
  "name": "@eventuras/scribo",
3
- "version": "0.8.2",
3
+ "version": "0.10.7",
4
+ "description": "Markdown editor built on Lexical — WYSIWYG editing with markdown export",
5
+ "license": "MIT",
6
+ "homepage": "https://scribo.losol.no/",
4
7
  "repository": {
5
8
  "type": "git",
6
- "url": "https://github.com/losol/eventuras.git",
7
- "directory": "libs/scribo"
9
+ "url": "https://github.com/losol/scribo.git"
10
+ },
11
+ "bugs": {
12
+ "url": "https://github.com/losol/scribo/issues"
8
13
  },
9
14
  "type": "module",
10
15
  "exports": {
11
16
  ".": {
12
17
  "types": "./dist/main.d.ts",
13
- "import": "./dist/main.js"
18
+ "default": "./src/main.tsx"
19
+ },
20
+ "./plugins/schedule": {
21
+ "types": "./dist/nodes/schedule/index.d.ts",
22
+ "default": "./src/nodes/schedule/index.ts"
23
+ },
24
+ "./plugins/callout": {
25
+ "types": "./dist/nodes/callout/index.d.ts",
26
+ "default": "./src/nodes/callout/index.ts"
14
27
  },
15
28
  "./style.css": "./dist/scribo.css"
16
29
  },
17
30
  "main": "src/main.tsx",
18
- "scripts": {
19
- "build": "vite build",
20
- "build:site": "vite build --config vite.config.site.ts",
21
- "dev": "vite"
22
- },
23
31
  "overrides": {
24
32
  "vite": {
25
33
  "rollup": "npm:@rollup/wasm-node"
26
34
  }
27
35
  },
28
36
  "dependencies": {
29
- "@lexical/code": "0.35.0",
30
- "@lexical/hashtag": "0.35.0",
31
- "@lexical/link": "0.35.0",
32
- "@lexical/list": "0.35.0",
33
- "@lexical/mark": "0.35.0",
34
- "@lexical/markdown": "0.35.0",
35
- "@lexical/overflow": "0.35.0",
36
- "@lexical/react": "^0.35.0",
37
- "@lexical/rich-text": "0.35.0",
38
- "@lexical/selection": "0.35.0",
39
- "@lexical/table": "0.35.0",
40
- "@lexical/utils": "0.35.0",
41
- "lexical": "0.35.0",
42
- "prismjs": "^1.30.0"
37
+ "@lexical/code": "0.50.0",
38
+ "@lexical/hashtag": "0.50.0",
39
+ "@lexical/link": "0.50.0",
40
+ "@lexical/list": "0.50.0",
41
+ "@lexical/mark": "0.50.0",
42
+ "@lexical/markdown": "0.50.0",
43
+ "@lexical/overflow": "0.50.0",
44
+ "@lexical/react": "^0.50.0",
45
+ "@lexical/rich-text": "0.50.0",
46
+ "@lexical/selection": "0.50.0",
47
+ "@lexical/table": "0.50.0",
48
+ "@lexical/utils": "0.50.0",
49
+ "lexical": "0.50.0",
50
+ "prismjs": "^1.30.0",
51
+ "yjs": "^13.6.32"
43
52
  },
44
53
  "devDependencies": {
45
- "@eventuras/eslint-config": "workspace:*",
46
- "@eventuras/typescript-config": "workspace:*",
47
- "@eventuras/vite-config": "workspace:*",
48
- "@testing-library/react": "^16.3.1",
49
- "@types/react": "^19.2.7",
50
- "@types/react-dom": "^19.2.3",
51
- "@vitejs/plugin-react": "^5.1.2",
52
- "lightningcss": "^1.30.2",
53
- "typescript": "^5.9.3",
54
- "vite": "^7.3.0",
55
- "vitest": "^4.0.16"
54
+ "@biomejs/biome": "^2.5.14",
55
+ "@eventuras/typescript-config": "^1.0.0",
56
+ "@eventuras/vite-config": "^0.3.1",
57
+ "@testing-library/react": "^16.3.2",
58
+ "@types/react": "^19.3.0",
59
+ "@types/react-dom": "^19.3.0",
60
+ "@typescript/typescript6": "^6.0.2",
61
+ "@vitejs/plugin-react": "^6.0.5",
62
+ "lightningcss": "^1.33.0",
63
+ "typescript": "^7.0.2",
64
+ "vite": "^8.3.0",
65
+ "vitest": "^5.0.1"
56
66
  },
57
67
  "peerDependencies": {
58
- "react": "^19.2.3",
59
- "react-dom": "^19.2.3"
68
+ "react": "^19.0.0",
69
+ "react-dom": "^19.0.0"
60
70
  },
61
- "packageManager": "pnpm@10.27.0",
62
71
  "engines": {
63
- "node": ">=22.0.0 <25.0.0"
72
+ "node": ">=24.0.0 <25.0.0"
73
+ },
74
+ "scripts": {
75
+ "build": "vite build",
76
+ "build:site": "vite build --config vite.config.site.ts",
77
+ "dev": "vite",
78
+ "lint": "biome check .",
79
+ "test": "vitest run",
80
+ "format": "biome format --write .",
81
+ "format:check": "biome format --check ."
64
82
  }
65
- }
83
+ }
@@ -1,4 +1,7 @@
1
1
  /**
2
+ *
3
+ * Modified from the work of Meta Platforms, Inc. and affiliates
4
+ *
2
5
  * Copyright (c) Meta Platforms, Inc. and affiliates.
3
6
  *
4
7
  * This source code is licensed under the MIT license found in the
@@ -10,13 +13,17 @@
10
13
  .editor-shell {
11
14
  margin: 10px auto;
12
15
  border-radius: 2px;
13
- /*max-width: 1100px;*/
14
16
  color: #000;
15
17
  position: relative;
16
18
  line-height: 1.7;
17
19
  font-weight: 400;
18
20
  }
19
21
 
22
+ [data-theme="dark"] .editor-shell,
23
+ [data-color-scheme="dark"] .editor-shell {
24
+ color: #e5e5e5;
25
+ }
26
+
20
27
  .editor-shell .editor-container {
21
28
  background: #fff;
22
29
  position: relative;
@@ -25,6 +32,11 @@
25
32
  border-bottom-right-radius: 10px;
26
33
  }
27
34
 
35
+ [data-theme="dark"] .editor-shell .editor-container,
36
+ [data-color-scheme="dark"] .editor-shell .editor-container {
37
+ background: rgba(255, 255, 255, 0.05);
38
+ }
39
+
28
40
  .editor-shell .editor-container.tree-view {
29
41
  border-radius: 0;
30
42
  }
@@ -101,13 +113,18 @@
101
113
  border-left: 3px solid #ddd;
102
114
  }
103
115
 
104
- ul {
116
+ [data-theme="dark"] .editor blockquote,
117
+ [data-color-scheme="dark"] .editor blockquote {
118
+ border-left-color: #555;
119
+ }
120
+
121
+ .editor ul {
105
122
  list-style-type: disc;
106
123
  padding: 10px 0 !important;
107
124
  padding-left: 20px !important;
108
125
  }
109
126
 
110
- pre {
127
+ .editor-shell pre {
111
128
  line-height: 1.1;
112
129
  background: #222;
113
130
  color: #fff;
@@ -118,12 +135,12 @@ pre {
118
135
  max-height: 400px;
119
136
  }
120
137
 
121
- pre::-webkit-scrollbar {
138
+ .editor-shell pre::-webkit-scrollbar {
122
139
  background: transparent;
123
140
  width: 10px;
124
141
  }
125
142
 
126
- pre::-webkit-scrollbar-thumb {
143
+ .editor-shell pre::-webkit-scrollbar-thumb {
127
144
  background: #999;
128
145
  }
129
146
 
@@ -188,6 +205,13 @@ i.redo {
188
205
  background-color: rgb(223, 232, 250);
189
206
  }
190
207
 
208
+ [data-theme="dark"] .link-editor .button.active,
209
+ [data-color-scheme="dark"] .link-editor .button.active,
210
+ [data-theme="dark"] .toolbar .button.active,
211
+ [data-color-scheme="dark"] .toolbar .button.active {
212
+ background-color: rgba(100, 150, 255, 0.3);
213
+ }
214
+
191
215
  .link-editor .link-input {
192
216
  display: block;
193
217
  width: calc(100% - 75px);
@@ -204,6 +228,12 @@ i.redo {
204
228
  font-family: inherit;
205
229
  }
206
230
 
231
+ [data-theme="dark"] .link-editor .link-input,
232
+ [data-color-scheme="dark"] .link-editor .link-input {
233
+ background-color: #303030;
234
+ color: #e5e5e5;
235
+ }
236
+
207
237
  .link-editor .link-view {
208
238
  display: block;
209
239
  width: calc(100% - 24px);
@@ -340,6 +370,15 @@ i.redo {
340
370
  background-color: #fff;
341
371
  }
342
372
 
373
+ [data-theme="dark"] .dropdown,
374
+ [data-color-scheme="dark"] .dropdown {
375
+ background-color: rgba(30, 30, 30, 0.95);
376
+ box-shadow:
377
+ 0 12px 28px 0 rgba(0, 0, 0, 0.6),
378
+ 0 2px 4px 0 rgba(0, 0, 0, 0.3),
379
+ inset 0 0 0 1px rgba(255, 255, 255, 0.1);
380
+ }
381
+
343
382
  .dropdown .item {
344
383
  margin: 0 8px 0 8px;
345
384
  padding: 8px;
@@ -359,6 +398,12 @@ i.redo {
359
398
  min-width: 100px;
360
399
  }
361
400
 
401
+ [data-theme="dark"] .dropdown .item,
402
+ [data-color-scheme="dark"] .dropdown .item {
403
+ color: #e5e5e5;
404
+ background-color: transparent;
405
+ }
406
+
362
407
  .dropdown .item.fontsize-item,
363
408
  .dropdown .item.fontsize-item .text {
364
409
  min-width: unset;
@@ -383,6 +428,11 @@ i.redo {
383
428
  background-color: #eee;
384
429
  }
385
430
 
431
+ [data-theme="dark"] .dropdown .item:hover,
432
+ [data-color-scheme="dark"] .dropdown .item:hover {
433
+ background-color: rgba(255, 255, 255, 0.1);
434
+ }
435
+
386
436
  .dropdown .item .text {
387
437
  display: flex;
388
438
  line-height: 20px;
@@ -402,6 +452,11 @@ i.redo {
402
452
  background-repeat: no-repeat;
403
453
  }
404
454
 
455
+ [data-theme="dark"] .dropdown .item .icon,
456
+ [data-color-scheme="dark"] .dropdown .item .icon {
457
+ filter: invert(1);
458
+ }
459
+
405
460
  .dropdown .divider {
406
461
  width: auto;
407
462
  background-color: #eee;
@@ -409,6 +464,11 @@ i.redo {
409
464
  height: 1px;
410
465
  }
411
466
 
467
+ [data-theme="dark"] .dropdown .divider,
468
+ [data-color-scheme="dark"] .dropdown .divider {
469
+ background-color: rgba(255, 255, 255, 0.2);
470
+ }
471
+
412
472
  @media screen and (max-width: 1100px) {
413
473
  .dropdown-button-text {
414
474
  display: none !important;
@@ -461,6 +521,14 @@ i.redo {
461
521
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='currentColor' class='bi bi-code'%3E%3Cpath d='M5.854 4.854a.5.5 0 1 0-.708-.708l-3.5 3.5a.5.5 0 0 0 0 .708l3.5 3.5a.5.5 0 0 0 .708-.708L2.707 8l3.147-3.146zm4.292 0a.5.5 0 0 1 .708-.708l3.5 3.5a.5.5 0 0 1 0 .708l-3.5 3.5a.5.5 0 0 1-.708-.708L13.293 8l-3.147-3.146z'/%3E%3C/svg%3E");
462
522
  }
463
523
 
524
+ .icon.schedule {
525
+ background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='currentColor'%3E%3Cpath d='M8 3.5a.5.5 0 0 0-1 0V8a.5.5 0 0 0 .252.434l3.5 2a.5.5 0 0 0 .496-.868L8 7.71V3.5z'/%3E%3Cpath d='M8 16A8 8 0 1 0 8 0a8 8 0 0 0 0 16zm7-8A7 7 0 1 1 1 8a7 7 0 0 1 14 0z'/%3E%3C/svg%3E");
526
+ }
527
+
528
+ .icon.alert {
529
+ background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='currentColor'%3E%3Cpath d='M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z'/%3E%3Cpath d='m8.93 6.588-2.29.287-.082.38.45.083c.294.07.352.176.288.469l-.738 3.468c-.194.897.105 1.319.808 1.319.545 0 1.178-.252 1.465-.598l.088-.416c-.2.176-.492.246-.686.246-.275 0-.375-.193-.304-.533L8.93 6.588zM9 4.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0z'/%3E%3C/svg%3E");
530
+ }
531
+
464
532
  .switches {
465
533
  z-index: 6;
466
534
  position: fixed;
@@ -802,15 +870,14 @@ i.redo {
802
870
  }
803
871
 
804
872
  .table-cell-action-button {
805
- background-color: none;
806
- display: flex;
873
+ background-color: transparent;
874
+ display: inline-flex;
807
875
  justify-content: center;
808
876
  align-items: center;
809
877
  border: 0;
810
878
  position: relative;
811
879
  border-radius: 15px;
812
880
  color: #222;
813
- display: inline-block;
814
881
  cursor: pointer;
815
882
  }
816
883
 
@@ -835,17 +902,34 @@ i.chevron-down {
835
902
  cursor: pointer;
836
903
  }
837
904
 
905
+ [data-theme="dark"] .action-button,
906
+ [data-color-scheme="dark"] .action-button {
907
+ background-color: #303030;
908
+ color: #e5e5e5;
909
+ }
910
+
838
911
  .action-button:hover {
839
912
  background-color: #ddd;
840
913
  color: #000;
841
914
  }
842
915
 
916
+ [data-theme="dark"] .action-button:hover,
917
+ [data-color-scheme="dark"] .action-button:hover {
918
+ background-color: #474747;
919
+ color: #fff;
920
+ }
921
+
843
922
  button.action-button:disabled {
844
923
  opacity: 0.6;
845
924
  background: #eee;
846
925
  cursor: not-allowed;
847
926
  }
848
927
 
928
+ [data-theme="dark"] button.action-button:disabled,
929
+ [data-color-scheme="dark"] button.action-button:disabled {
930
+ background: rgba(255, 255, 255, 0.05);
931
+ }
932
+
849
933
  .ltr {
850
934
  text-align: left;
851
935
  }
@@ -869,6 +953,11 @@ button.action-button:disabled {
869
953
  z-index: 2;
870
954
  }
871
955
 
956
+ [data-theme="dark"] .toolbar,
957
+ [data-color-scheme="dark"] .toolbar {
958
+ background: rgba(255, 255, 255, 0.1);
959
+ }
960
+
872
961
  button.toolbar-item {
873
962
  border: 0;
874
963
  display: flex;
@@ -892,14 +981,18 @@ button.toolbar-item.spaced {
892
981
 
893
982
  button.toolbar-item i.format {
894
983
  background-size: contain;
895
- display: inline-block;
984
+ display: flex;
896
985
  height: 18px;
897
986
  width: 18px;
898
987
  vertical-align: -0.25em;
899
- display: flex;
900
988
  opacity: 0.6;
901
989
  }
902
990
 
991
+ [data-theme="dark"] button.toolbar-item i.format,
992
+ [data-color-scheme="dark"] button.toolbar-item i.format {
993
+ filter: invert(1);
994
+ }
995
+
903
996
  button.toolbar-item:disabled .icon,
904
997
  button.toolbar-item:disabled .text,
905
998
  button.toolbar-item:disabled i.format,
@@ -919,6 +1012,11 @@ button.toolbar-item.active i {
919
1012
  background-color: #eee;
920
1013
  }
921
1014
 
1015
+ [data-theme="dark"] .toolbar-item:hover:not([disabled]),
1016
+ [data-color-scheme="dark"] .toolbar-item:hover:not([disabled]) {
1017
+ background-color: rgba(255, 255, 255, 0.1);
1018
+ }
1019
+
922
1020
  .toolbar-item.font-family .text {
923
1021
  display: block;
924
1022
  max-width: 40px;
@@ -941,6 +1039,11 @@ button.toolbar-item.active i {
941
1039
  padding-right: 10px;
942
1040
  }
943
1041
 
1042
+ [data-theme="dark"] .toolbar .toolbar-item .text,
1043
+ [data-color-scheme="dark"] .toolbar .toolbar-item .text {
1044
+ color: #bbb;
1045
+ }
1046
+
944
1047
  .toolbar .toolbar-item .icon {
945
1048
  display: flex;
946
1049
  width: 20px;
@@ -951,6 +1054,11 @@ button.toolbar-item.active i {
951
1054
  background-size: contain;
952
1055
  }
953
1056
 
1057
+ [data-theme="dark"] .toolbar .toolbar-item .icon,
1058
+ [data-color-scheme="dark"] .toolbar .toolbar-item .icon {
1059
+ filter: invert(1);
1060
+ }
1061
+
954
1062
  .toolbar i.chevron-down,
955
1063
  .toolbar-item i.chevron-down {
956
1064
  margin-top: 3px;
@@ -960,6 +1068,13 @@ button.toolbar-item.active i {
960
1068
  user-select: none;
961
1069
  }
962
1070
 
1071
+ [data-theme="dark"] .toolbar i.chevron-down,
1072
+ [data-color-scheme="dark"] .toolbar i.chevron-down,
1073
+ [data-theme="dark"] .toolbar-item i.chevron-down,
1074
+ [data-color-scheme="dark"] .toolbar-item i.chevron-down {
1075
+ filter: invert(1);
1076
+ }
1077
+
963
1078
  .toolbar i.chevron-down.inside {
964
1079
  width: 16px;
965
1080
  height: 16px;
@@ -991,7 +1106,7 @@ button.toolbar-item.active i {
991
1106
  padding: 20px 10px;
992
1107
  position: relative;
993
1108
  border: 1px solid #e8e8e8;
994
- font-family: "Reenie Beanie";
1109
+ font-family: "Reenie Beanie", cursive;
995
1110
  font-size: 24px;
996
1111
  border-bottom-right-radius: 60px 5px;
997
1112
  display: block;
@@ -1013,24 +1128,12 @@ button.toolbar-item.active i {
1013
1128
 
1014
1129
  .sticky-note.yellow {
1015
1130
  border-top: 1px solid #fdfd86;
1016
- background: linear-gradient(
1017
- 135deg,
1018
- #ffff88 81%,
1019
- #ffff88 82%,
1020
- #ffff88 82%,
1021
- #ffffc6 100%
1022
- );
1131
+ background: linear-gradient(135deg, #ffff88 81%, #ffff88 82%, #ffff88 82%, #ffffc6 100%);
1023
1132
  }
1024
1133
 
1025
1134
  .sticky-note.pink {
1026
1135
  border-top: 1px solid #e7d1e4;
1027
- background: linear-gradient(
1028
- 135deg,
1029
- #f7cbe8 81%,
1030
- #f7cbe8 82%,
1031
- #f7cbe8 82%,
1032
- #e7bfe1 100%
1033
- );
1136
+ background: linear-gradient(135deg, #f7cbe8 81%, #f7cbe8 82%, #f7cbe8 82%, #e7bfe1 100%);
1034
1137
  }
1035
1138
 
1036
1139
  .sticky-note-container.dragging {
@@ -1146,13 +1249,13 @@ hr.selected {
1146
1249
  z-index: 3;
1147
1250
  }
1148
1251
 
1149
- .PlaygroundEditorTheme__blockCursor {
1252
+ .EditorTheme__blockCursor {
1150
1253
  display: block;
1151
1254
  pointer-events: none;
1152
1255
  position: absolute;
1153
1256
  }
1154
1257
 
1155
- .PlaygroundEditorTheme__blockCursor:after {
1258
+ .EditorTheme__blockCursor:after {
1156
1259
  content: "";
1157
1260
  display: block;
1158
1261
  position: absolute;