@openleaf-editor/plugins-table 0.1.0-beta.0 → 0.1.0-beta.2
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/dist/commands.d.ts +101 -0
- package/dist/commands.d.ts.map +1 -0
- package/dist/commands.js +445 -0
- package/dist/commands.js.map +1 -0
- package/dist/dialogs.d.ts +14 -0
- package/dist/dialogs.d.ts.map +1 -0
- package/dist/dialogs.js +159 -0
- package/dist/dialogs.js.map +1 -0
- package/dist/grid.d.ts +15 -0
- package/dist/grid.d.ts.map +1 -0
- package/dist/grid.js +225 -0
- package/dist/grid.js.map +1 -0
- package/dist/icons.d.ts.map +1 -1
- package/dist/icons.js +4 -0
- package/dist/icons.js.map +1 -1
- package/dist/index.d.ts +7 -20
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +112 -105
- package/dist/index.js.map +1 -1
- package/dist/menu.d.ts +15 -0
- package/dist/menu.d.ts.map +1 -0
- package/dist/menu.js +195 -0
- package/dist/menu.js.map +1 -0
- package/dist/styles.d.ts +9 -0
- package/dist/styles.d.ts.map +1 -0
- package/dist/styles.js +93 -0
- package/dist/styles.js.map +1 -0
- package/package.json +4 -4
package/dist/styles.js
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Styles for the insert grid and the table context menu.
|
|
3
|
+
*
|
|
4
|
+
* Registered through `registerStyles` so they ride the same constructable
|
|
5
|
+
* stylesheet path as the toolbar -- no `<style>` injection, which a strict CSP
|
|
6
|
+
* would block silently.
|
|
7
|
+
*/
|
|
8
|
+
export const TABLE_UI_CSS = `
|
|
9
|
+
.ol-table-grid { display: inline-flex; }
|
|
10
|
+
.ol-table-pop, .ol-table-menu {
|
|
11
|
+
box-sizing: border-box;
|
|
12
|
+
margin: 0;
|
|
13
|
+
padding: 8px;
|
|
14
|
+
border: 1px solid var(--openleaf-color-border, #d1d9e0);
|
|
15
|
+
border-radius: var(--openleaf-radius, 6px);
|
|
16
|
+
background: var(--openleaf-color-surface, #fff);
|
|
17
|
+
color: var(--openleaf-color-text, #1f2328);
|
|
18
|
+
box-shadow: 0 8px 24px rgb(0 0 0 / 18%);
|
|
19
|
+
font-family: var(--openleaf-font, system-ui, -apple-system, sans-serif);
|
|
20
|
+
font-size: var(--openleaf-font-size, 14px);
|
|
21
|
+
z-index: var(--openleaf-z-index, 1);
|
|
22
|
+
}
|
|
23
|
+
.ol-table-pop[hidden], .ol-table-menu[hidden] { display: none; }
|
|
24
|
+
.ol-table-pop-status {
|
|
25
|
+
margin: 0 0 6px;
|
|
26
|
+
font-size: .9em;
|
|
27
|
+
opacity: .8;
|
|
28
|
+
text-align: center;
|
|
29
|
+
}
|
|
30
|
+
.ol-table-size { display: grid; gap: 2px; }
|
|
31
|
+
.ol-table-size-row { display: flex; gap: 2px; }
|
|
32
|
+
.ol-table-size-cell {
|
|
33
|
+
box-sizing: border-box;
|
|
34
|
+
width: 16px;
|
|
35
|
+
height: 16px;
|
|
36
|
+
padding: 0;
|
|
37
|
+
border: 1px solid var(--openleaf-color-border, #d1d9e0);
|
|
38
|
+
border-radius: 2px;
|
|
39
|
+
background: var(--openleaf-color-surface, #fff);
|
|
40
|
+
cursor: pointer;
|
|
41
|
+
appearance: none;
|
|
42
|
+
-webkit-appearance: none;
|
|
43
|
+
}
|
|
44
|
+
.ol-table-size-cell[aria-pressed="true"] {
|
|
45
|
+
background: var(--openleaf-color-surface-active, #dbe9ff);
|
|
46
|
+
border-color: var(--openleaf-color-accent, #0550ae);
|
|
47
|
+
}
|
|
48
|
+
.ol-table-size-cell:focus-visible {
|
|
49
|
+
outline: 2px solid var(--openleaf-color-focus, #0969da);
|
|
50
|
+
outline-offset: 1px;
|
|
51
|
+
}
|
|
52
|
+
.ol-table-menu {
|
|
53
|
+
min-width: 12rem;
|
|
54
|
+
padding: 4px;
|
|
55
|
+
}
|
|
56
|
+
.ol-table-menu-group + .ol-table-menu-group {
|
|
57
|
+
margin-top: 4px;
|
|
58
|
+
padding-top: 4px;
|
|
59
|
+
border-top: 1px solid var(--openleaf-color-border, #d1d9e0);
|
|
60
|
+
}
|
|
61
|
+
.ol-table-menu-item {
|
|
62
|
+
display: block;
|
|
63
|
+
box-sizing: border-box;
|
|
64
|
+
width: 100%;
|
|
65
|
+
margin: 0;
|
|
66
|
+
padding: 6px 10px;
|
|
67
|
+
border: 0;
|
|
68
|
+
border-radius: var(--openleaf-radius, 4px);
|
|
69
|
+
background: transparent;
|
|
70
|
+
color: inherit;
|
|
71
|
+
font: inherit;
|
|
72
|
+
text-align: start;
|
|
73
|
+
cursor: pointer;
|
|
74
|
+
appearance: none;
|
|
75
|
+
-webkit-appearance: none;
|
|
76
|
+
}
|
|
77
|
+
.ol-table-menu-item:hover, .ol-table-menu-item:focus-visible {
|
|
78
|
+
background: var(--openleaf-color-surface-hover, #f0f1f3);
|
|
79
|
+
}
|
|
80
|
+
.ol-table-menu-item:focus-visible {
|
|
81
|
+
outline: 2px solid var(--openleaf-color-focus, #0969da);
|
|
82
|
+
outline-offset: -2px;
|
|
83
|
+
}
|
|
84
|
+
.ol-table-menu-item[aria-disabled="true"] {
|
|
85
|
+
opacity: .55;
|
|
86
|
+
cursor: default;
|
|
87
|
+
}
|
|
88
|
+
@media (forced-colors: active) {
|
|
89
|
+
.ol-table-size-cell { border: 1px solid ButtonBorder; }
|
|
90
|
+
.ol-table-size-cell[aria-pressed="true"] { outline: 2px solid Highlight; }
|
|
91
|
+
}
|
|
92
|
+
`;
|
|
93
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../src/styles.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,CAAC,MAAM,YAAY,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoF3B,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openleaf-editor/plugins-table",
|
|
3
|
-
"version": "0.1.0-beta.
|
|
4
|
-
"description": "Opt-in table editing for OpenLeaf: cell selection, column resizing,
|
|
3
|
+
"version": "0.1.0-beta.2",
|
|
4
|
+
"description": "Opt-in table editing for OpenLeaf: cell selection, column resizing, property dialogs, captions, insert grid, context menu, and row/column commands. The table schema itself lives in @openleaf-editor/core so every deployment reads tables faithfully.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
"prosemirror-tables": "^1.6.4",
|
|
35
35
|
"prosemirror-transform": "^1.10.2",
|
|
36
36
|
"prosemirror-view": "^1.37.0",
|
|
37
|
-
"@openleaf-editor/core": "0.1.0-beta.
|
|
38
|
-
"@openleaf-editor/ui": "0.1.0-beta.
|
|
37
|
+
"@openleaf-editor/core": "0.1.0-beta.2",
|
|
38
|
+
"@openleaf-editor/ui": "0.1.0-beta.2"
|
|
39
39
|
},
|
|
40
40
|
"scripts": {
|
|
41
41
|
"build": "tsc -p tsconfig.json"
|