@kerebron/extension-tables 0.5.2 → 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.
- package/README.md +2 -2
- package/assets/tables.css +85 -0
- package/package.json +4 -3
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
## Playground Demo
|
|
10
10
|
|
|
11
|
-
[playground](https://
|
|
11
|
+
[playground](https://kerebron.com) - be nice.
|
|
12
12
|
|
|
13
13
|
## Overview
|
|
14
14
|
|
|
@@ -49,7 +49,7 @@ deno task -f @kerebron build
|
|
|
49
49
|
To start example server:
|
|
50
50
|
|
|
51
51
|
```sh
|
|
52
|
-
deno task
|
|
52
|
+
deno task dev
|
|
53
53
|
```
|
|
54
54
|
|
|
55
55
|
## Examples
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
.kb-editor .tableWrapper {
|
|
2
|
+
overflow-x: auto;
|
|
3
|
+
}
|
|
4
|
+
.kb-editor table {
|
|
5
|
+
border-collapse: collapse;
|
|
6
|
+
table-layout: fixed;
|
|
7
|
+
width: 100%;
|
|
8
|
+
overflow: hidden;
|
|
9
|
+
}
|
|
10
|
+
.kb-editor td,
|
|
11
|
+
.kb-editor th {
|
|
12
|
+
vertical-align: top;
|
|
13
|
+
box-sizing: border-box;
|
|
14
|
+
position: relative;
|
|
15
|
+
border: 1px solid var(--kb-color-border);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.kb-editor td:not([data-colwidth]):not(.column-resize-dragging),
|
|
19
|
+
.kb-editor th:not([data-colwidth]):not(.column-resize-dragging) {
|
|
20
|
+
/* if there's no explicit width set and the column is not being resized, set a default width */
|
|
21
|
+
min-width: var(--default-cell-min-width);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.kb-editor .column-resize-handle {
|
|
25
|
+
position: absolute;
|
|
26
|
+
right: -2px;
|
|
27
|
+
top: 0;
|
|
28
|
+
bottom: 0;
|
|
29
|
+
width: 4px;
|
|
30
|
+
z-index: 20;
|
|
31
|
+
background-color: #adf;
|
|
32
|
+
pointer-events: none;
|
|
33
|
+
}
|
|
34
|
+
.kb-editor.resize-cursor {
|
|
35
|
+
cursor: ew-resize;
|
|
36
|
+
cursor: col-resize;
|
|
37
|
+
}
|
|
38
|
+
/* Give selected cells a blue overlay */
|
|
39
|
+
.kb-editor .selectedCell:after {
|
|
40
|
+
z-index: 2;
|
|
41
|
+
position: absolute;
|
|
42
|
+
content: '';
|
|
43
|
+
left: 0;
|
|
44
|
+
right: 0;
|
|
45
|
+
top: 0;
|
|
46
|
+
bottom: 0;
|
|
47
|
+
background: rgba(200, 200, 255, 0.4);
|
|
48
|
+
pointer-events: none;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/* Touch-optimized table editing */
|
|
52
|
+
@media (max-width: 767px) {
|
|
53
|
+
.kb-editor table {
|
|
54
|
+
font-size: var(--kb-text-sm);
|
|
55
|
+
border-collapse: collapse;
|
|
56
|
+
width: 100%;
|
|
57
|
+
overflow-x: auto;
|
|
58
|
+
display: block;
|
|
59
|
+
white-space: nowrap;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.kb-editor th,
|
|
63
|
+
.kb-editor td {
|
|
64
|
+
min-width: 120px;
|
|
65
|
+
padding: var(--kb-space-md);
|
|
66
|
+
border: 1px solid var(--kb-color-border);
|
|
67
|
+
vertical-align: top;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/* Hide complex table controls on mobile */
|
|
71
|
+
.tableWrapper .column-resize-handle {
|
|
72
|
+
display: none !important;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.kb-editor .tableWrapper {
|
|
76
|
+
overflow-x: auto;
|
|
77
|
+
-webkit-overflow-scrolling: touch;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/* Table selection visual feedback */
|
|
81
|
+
.kb-editor .selectedCell {
|
|
82
|
+
background: rgba(var(--kb-color-primary-rgb), 0.1);
|
|
83
|
+
border: 2px solid var(--kb-color-primary);
|
|
84
|
+
}
|
|
85
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kerebron/extension-tables",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.3",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"module": "./esm/ExtensionTables.js",
|
|
6
6
|
"exports": {
|
|
@@ -26,10 +26,11 @@
|
|
|
26
26
|
"scripts": {},
|
|
27
27
|
"files": [
|
|
28
28
|
"esm",
|
|
29
|
-
"src"
|
|
29
|
+
"src",
|
|
30
|
+
"assets"
|
|
30
31
|
],
|
|
31
32
|
"dependencies": {
|
|
32
|
-
"@kerebron/editor": "0.5.
|
|
33
|
+
"@kerebron/editor": "0.5.3",
|
|
33
34
|
"prosemirror-model": "1.25.3",
|
|
34
35
|
"prosemirror-state": "1.4.3",
|
|
35
36
|
"prosemirror-transform": "1.10.4",
|