@openeditor/native 0.0.9 → 0.0.11
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/index.js +23 -0
- package/dist/toolbar.d.ts +2 -0
- package/dist/toolbar.js +6 -0
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -58,6 +58,22 @@ const openEditorNativeSchema = {
|
|
|
58
58
|
htmlTag: "li",
|
|
59
59
|
attrs: { checked: { default: false } },
|
|
60
60
|
},
|
|
61
|
+
{ name: "toggleList", content: "toggleListItem+", group: "block", role: "list", htmlTag: "ul" },
|
|
62
|
+
{
|
|
63
|
+
name: "toggleListItem",
|
|
64
|
+
content: "paragraph block*",
|
|
65
|
+
role: "listItem",
|
|
66
|
+
htmlTag: "li",
|
|
67
|
+
attrs: { open: { default: true } },
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
name: "callout",
|
|
71
|
+
content: "block+",
|
|
72
|
+
group: "block",
|
|
73
|
+
role: "block",
|
|
74
|
+
htmlTag: "aside",
|
|
75
|
+
attrs: { tone: { default: "info" } },
|
|
76
|
+
},
|
|
61
77
|
{ name: "codeBlock", content: "text*", group: "block", role: "textBlock", htmlTag: "pre" },
|
|
62
78
|
{ name: "horizontalRule", content: "", group: "block", role: "block", htmlTag: "hr", isVoid: true },
|
|
63
79
|
{
|
|
@@ -198,6 +214,13 @@ const toNativeEditorTheme = (theme) => ({
|
|
|
198
214
|
lineHeight: 22,
|
|
199
215
|
},
|
|
200
216
|
},
|
|
217
|
+
table: {
|
|
218
|
+
cellBackgroundColor: normalizeNativeThemeColor(theme.surface),
|
|
219
|
+
headerBackgroundColor: normalizeNativeThemeColor(theme.surfaceMuted),
|
|
220
|
+
borderColor: normalizeNativeThemeColor(theme.border),
|
|
221
|
+
selectionBackgroundColor: normalizeNativeThemeColor(theme.accent),
|
|
222
|
+
selectionBorderColor: normalizeNativeThemeColor(theme.accentStrong),
|
|
223
|
+
},
|
|
201
224
|
horizontalRule: {
|
|
202
225
|
color: normalizeNativeThemeColor(theme.border),
|
|
203
226
|
thickness: 1,
|
package/dist/toolbar.d.ts
CHANGED
|
@@ -6,6 +6,8 @@ export declare const openEditorNativeToolbarActionKeys: {
|
|
|
6
6
|
readonly orderedList: "orderedList";
|
|
7
7
|
readonly columns: "columns";
|
|
8
8
|
readonly table: "table";
|
|
9
|
+
readonly toggleList: "toggleList";
|
|
10
|
+
readonly callout: "callout";
|
|
9
11
|
readonly moveBlockUp: "openeditor:block:moveUp";
|
|
10
12
|
readonly moveBlockDown: "openeditor:block:moveDown";
|
|
11
13
|
readonly undo: "openeditor:history:undo";
|
package/dist/toolbar.js
CHANGED
|
@@ -14,6 +14,8 @@ export const openEditorNativeToolbarActionKeys = {
|
|
|
14
14
|
orderedList: "orderedList",
|
|
15
15
|
columns: "columns",
|
|
16
16
|
table: "table",
|
|
17
|
+
toggleList: "toggleList",
|
|
18
|
+
callout: "callout",
|
|
17
19
|
moveBlockUp: "openeditor:block:moveUp",
|
|
18
20
|
moveBlockDown: "openeditor:block:moveDown",
|
|
19
21
|
undo: "openeditor:history:undo",
|
|
@@ -77,6 +79,8 @@ export const createOpenEditorNativeToolbarItems = ({ canUndo = true, canRedo = t
|
|
|
77
79
|
{ type: "node", nodeType: "horizontalRule", label: "Divider", icon: defaultIcon("horizontalRule") },
|
|
78
80
|
{ type: "action", key: openEditorNativeToolbarActionKeys.columns, label: "Columns", icon: glyphIcon("Cols") },
|
|
79
81
|
{ type: "action", key: openEditorNativeToolbarActionKeys.table, label: "Table", icon: glyphIcon("Tbl") },
|
|
82
|
+
{ type: "action", key: openEditorNativeToolbarActionKeys.toggleList, label: "Toggle List", icon: glyphIcon("Tgl") },
|
|
83
|
+
{ type: "action", key: openEditorNativeToolbarActionKeys.callout, label: "Callout", icon: glyphIcon("!") },
|
|
80
84
|
{ type: "command", command: "insertTableRowAfter", label: "Add Row", icon: glyphIcon("+R") },
|
|
81
85
|
{ type: "command", command: "insertTableColumnAfter", label: "Add Column", icon: glyphIcon("+C") },
|
|
82
86
|
{ type: "command", command: "deleteTableRow", label: "Delete Row", icon: glyphIcon("-R") },
|
|
@@ -162,6 +166,8 @@ export const nativeToolbarParityCoverage = () => {
|
|
|
162
166
|
["divider", "horizontalRule"],
|
|
163
167
|
["image", "image"],
|
|
164
168
|
["table", openEditorNativeToolbarActionKeys.table],
|
|
169
|
+
["toggleList", openEditorNativeToolbarActionKeys.toggleList],
|
|
170
|
+
["callout", openEditorNativeToolbarActionKeys.callout],
|
|
165
171
|
]);
|
|
166
172
|
const markControls = new Map([
|
|
167
173
|
["bold", "bold"],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openeditor/native",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.11",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"repository": {
|
|
@@ -27,14 +27,14 @@
|
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@expo/vector-icons": "15.0.3",
|
|
30
|
-
"@openeditor/core": "0.0.
|
|
31
|
-
"@openeditor/exporters": "0.0.
|
|
32
|
-
"@openeditor/extensions": "0.0.
|
|
30
|
+
"@openeditor/core": "0.0.11",
|
|
31
|
+
"@openeditor/exporters": "0.0.11",
|
|
32
|
+
"@openeditor/extensions": "0.0.11",
|
|
33
33
|
"react": "19.2.3",
|
|
34
34
|
"react-native": "0.85.3"
|
|
35
35
|
},
|
|
36
36
|
"peerDependencies": {
|
|
37
|
-
"@openeditor/react-native-prose-editor": "0.0.
|
|
37
|
+
"@openeditor/react-native-prose-editor": "0.0.11",
|
|
38
38
|
"react-native-keyboard-controller": ">=1.21",
|
|
39
39
|
"react": ">=19",
|
|
40
40
|
"react-native": ">=0.85"
|