@kerebron/extension-codemirror 0.5.1 → 0.5.3

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.
@@ -0,0 +1,80 @@
1
+ .codeblock-select {
2
+ position: absolute;
3
+ right: 0;
4
+ z-index: 100;
5
+ opacity: 0;
6
+ transition: all 0.3s ease;
7
+ margin: 6px 14px;
8
+ }
9
+
10
+ .codeblock-root {
11
+ position: relative;
12
+ }
13
+
14
+ .codeblock-root:hover .codeblock-select {
15
+ opacity: 1;
16
+ }
17
+
18
+ /* Code block mobile optimization */
19
+ @media (max-width: 767px) {
20
+ .kb-editor pre {
21
+ font-size: var(--kb-text-sm);
22
+ overflow-x: auto;
23
+ -webkit-overflow-scrolling: touch;
24
+ }
25
+
26
+ .codeblock-select {
27
+ opacity: 1;
28
+ position: static;
29
+ margin: var(--kb-space-sm);
30
+ display: flex;
31
+ justify-content: flex-end;
32
+ }
33
+
34
+ .codeblock-select select {
35
+ min-height: var(--kb-touch-target-min);
36
+ padding: var(--kb-space-sm);
37
+ border: 1px solid var(--kb-color-border);
38
+ border-radius: var(--kb-radius-sm);
39
+ background: var(--kb-color-surface);
40
+ color: var(--kb-color-text);
41
+ }
42
+ }
43
+
44
+ .kb-yjs__cursor {
45
+ position: fixed;
46
+ margin-left: -1px;
47
+ margin-right: -1px;
48
+ /*border-left: 1px solid black;*/
49
+ /*border-right: 1px solid black;*/
50
+ /*border-color: orange;*/
51
+ word-break: normal;
52
+ pointer-events: none;
53
+ }
54
+
55
+ /* This renders the username above the caret */
56
+ .kb-yjs__cursor > div {
57
+ position: absolute;
58
+ top: -1.05em;
59
+ left: -1px;
60
+ font-size: 13px;
61
+ background-color: rgb(250, 129, 0);
62
+ font-family: serif;
63
+ font-style: normal;
64
+ font-weight: normal;
65
+ line-height: normal;
66
+ user-select: none;
67
+ color: white;
68
+ padding-left: 2px;
69
+ padding-right: 2px;
70
+ white-space: nowrap;
71
+ }
72
+
73
+ /* Collaborative cursor optimization for mobile */
74
+ @media (max-width: 767px) {
75
+ .kb-yjs__cursor > div {
76
+ font-size: var(--kb-text-xs);
77
+ padding: 1px var(--kb-space-xs);
78
+ border-radius: var(--kb-radius-sm);
79
+ }
80
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kerebron/extension-codemirror",
3
- "version": "0.5.1",
3
+ "version": "0.5.3",
4
4
  "license": "MIT",
5
5
  "module": "./esm/ExtensionCodeMirror.js",
6
6
  "exports": {
@@ -14,7 +14,8 @@
14
14
  "scripts": {},
15
15
  "files": [
16
16
  "esm",
17
- "src"
17
+ "src",
18
+ "assets"
18
19
  ],
19
20
  "dependencies": {
20
21
  "@codemirror/autocomplete": "6.18.6",
@@ -38,10 +39,10 @@
38
39
  "@codemirror/search": "6.5.10",
39
40
  "@codemirror/state": "6.5.2",
40
41
  "@codemirror/view": "6.38.1",
41
- "@kerebron/editor": "0.5.1",
42
- "@kerebron/extension-basic-editor": "0.5.1",
43
- "@kerebron/extension-lsp": "0.5.1",
44
- "@kerebron/extension-markdown": "0.5.1",
42
+ "@kerebron/editor": "0.5.3",
43
+ "@kerebron/extension-basic-editor": "0.5.3",
44
+ "@kerebron/extension-lsp": "0.5.3",
45
+ "@kerebron/extension-markdown": "0.5.3",
45
46
  "lib0": "0.2.109",
46
47
  "prosemirror-model": "1.25.3",
47
48
  "prosemirror-state": "1.4.3",