@openeditor/extensions 0.0.4

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 ADDED
@@ -0,0 +1,30 @@
1
+ # `@openeditor/extensions`
2
+
3
+ OpenEditor's built-in content model.
4
+
5
+ ## Public surface
6
+
7
+ - built-in block specs and mark specs
8
+ - insert presets and seed content
9
+ - platform support metadata and support matrix helpers
10
+
11
+ ## Support matrix
12
+
13
+ | Block | Web | Native | Viewer | HTML export | Plain text |
14
+ | --- | --- | --- | --- | --- | --- |
15
+ | Paragraph | supported | supported | supported | supported | supported |
16
+ | Heading | supported | supported | supported | supported | supported |
17
+ | Bullet List | supported | supported | supported | supported | supported |
18
+ | Ordered List | supported | supported | supported | supported | supported |
19
+ | Task List | supported | supported | supported | supported | supported |
20
+ | Quote | supported | supported | supported | supported | supported |
21
+ | Code | supported | supported | supported | supported | supported |
22
+ | Divider | supported | supported | supported | supported | supported |
23
+ | Image | supported | supported | supported | supported | degraded |
24
+ | Columns | supported | supported | supported | supported | degraded |
25
+ | Table | supported | supported | supported | supported | degraded |
26
+
27
+ ## Internal notes
28
+
29
+ - `@openeditor/extensions` defines valid OpenEditor content, not renderer internals.
30
+ - Web and native packages consume these definitions instead of hard-coding divergent block catalogs.
@@ -0,0 +1,149 @@
1
+ import * as _openeditor_core from '@openeditor/core';
2
+ import { BlockSpec, OpenEditorBlock, OpenEditorFeatureSet, createBlockRegistry, OpenEditorDocument, ProseMirrorNode, EditorPlatform } from '@openeditor/core';
3
+
4
+ declare const defaultMarkSpecs: readonly [{
5
+ readonly name: "bold";
6
+ readonly label: "Bold";
7
+ }, {
8
+ readonly name: "italic";
9
+ readonly label: "Italic";
10
+ }, {
11
+ readonly name: "underline";
12
+ readonly label: "Underline";
13
+ }, {
14
+ readonly name: "strike";
15
+ readonly label: "Strikethrough";
16
+ }, {
17
+ readonly name: "code";
18
+ readonly label: "Inline Code";
19
+ }, {
20
+ readonly name: "link";
21
+ readonly label: "Link";
22
+ }];
23
+ declare const openEditorFeatureSet: OpenEditorFeatureSet;
24
+ type OpenEditorSupportTarget = "web" | "native" | "viewer" | "html" | "plainText";
25
+ type OpenEditorSupportStatus = "supported" | "degraded" | "unsupported";
26
+ type OpenEditorBlockSupportRow = {
27
+ block: OpenEditorDefaultBlockName;
28
+ label: string;
29
+ web: OpenEditorSupportStatus;
30
+ native: OpenEditorSupportStatus;
31
+ viewer: OpenEditorSupportStatus;
32
+ html: OpenEditorSupportStatus;
33
+ plainText: OpenEditorSupportStatus;
34
+ };
35
+ declare const openEditorHeadingLevels: readonly [1, 2, 3, 4, 5, 6];
36
+ type OpenEditorHeadingLevel = (typeof openEditorHeadingLevels)[number];
37
+ type OpenEditorDefaultBlockName = "paragraph" | "heading" | "bulletList" | "orderedList" | "taskList" | "blockquote" | "codeBlock" | "divider" | "image" | "columns" | "table";
38
+ type OpenEditorInsertPresetKey = "paragraph" | `heading${OpenEditorHeadingLevel}` | "bulletList" | "orderedList" | "taskList" | "blockquote" | "codeBlock" | "divider" | "image" | "columns" | "table";
39
+ type OpenEditorInsertPreset = {
40
+ key: OpenEditorInsertPresetKey;
41
+ label: string;
42
+ group: BlockSpec["group"];
43
+ createBlock: () => OpenEditorBlock;
44
+ };
45
+ type OpenEditorMarkSpec = {
46
+ name: string;
47
+ label: string;
48
+ };
49
+ type OpenEditorExtensionSet = {
50
+ blockSpecs: readonly BlockSpec[];
51
+ markSpecs: readonly OpenEditorMarkSpec[];
52
+ insertPresets: readonly OpenEditorInsertPreset[];
53
+ featureSet: OpenEditorFeatureSet;
54
+ blockRegistry: ReturnType<typeof createBlockRegistry>;
55
+ };
56
+ declare const defaultBlockSpecs: BlockSpec[];
57
+ declare const defaultBlockRegistry: _openeditor_core.BlockRegistry;
58
+ declare const openEditorInsertPresets: readonly OpenEditorInsertPreset[];
59
+ declare const getOpenEditorInsertPreset: (key: OpenEditorInsertPresetKey) => OpenEditorInsertPreset | undefined;
60
+ declare const createOpenEditorInsertBlock: (key: OpenEditorInsertPresetKey) => OpenEditorBlock;
61
+ declare const createOpenEditorInsertDocument: (key: OpenEditorInsertPresetKey) => OpenEditorDocument;
62
+ declare const getOpenEditorPlatformDocument: (document: OpenEditorDocument, platform: EditorPlatform) => OpenEditorDocument;
63
+ declare const getBlockLabel: (node: ProseMirrorNode) => string;
64
+ declare const blockSupport: {
65
+ block: string;
66
+ label: string;
67
+ group: "text" | "media" | "layout" | "structure";
68
+ web: _openeditor_core.PlatformSupportLevel;
69
+ native: _openeditor_core.PlatformSupportLevel;
70
+ }[];
71
+ declare const markSupport: {
72
+ mark: "bold" | "italic" | "underline" | "strike" | "code" | "link";
73
+ label: "Bold" | "Italic" | "Underline" | "Strikethrough" | "Inline Code" | "Link";
74
+ web: string;
75
+ native: string;
76
+ }[];
77
+ declare const blockSupportTable: readonly OpenEditorBlockSupportRow[];
78
+ declare const openEditorCapabilityFlags: {
79
+ readonly web: {
80
+ readonly headings: true;
81
+ readonly lists: true;
82
+ readonly taskLists: true;
83
+ readonly quotes: true;
84
+ readonly codeBlocks: true;
85
+ readonly dividers: true;
86
+ readonly links: true;
87
+ readonly images: true;
88
+ readonly columns: true;
89
+ readonly tables: true;
90
+ };
91
+ readonly native: {
92
+ readonly headings: true;
93
+ readonly lists: true;
94
+ readonly taskLists: true;
95
+ readonly quotes: true;
96
+ readonly codeBlocks: true;
97
+ readonly dividers: true;
98
+ readonly links: true;
99
+ readonly images: true;
100
+ readonly columns: true;
101
+ readonly tables: false;
102
+ };
103
+ readonly viewer: {
104
+ readonly headings: true;
105
+ readonly lists: true;
106
+ readonly taskLists: true;
107
+ readonly quotes: true;
108
+ readonly codeBlocks: true;
109
+ readonly dividers: true;
110
+ readonly links: true;
111
+ readonly images: true;
112
+ readonly columns: true;
113
+ readonly tables: true;
114
+ };
115
+ readonly html: {
116
+ readonly headings: true;
117
+ readonly lists: true;
118
+ readonly taskLists: true;
119
+ readonly quotes: true;
120
+ readonly codeBlocks: true;
121
+ readonly dividers: true;
122
+ readonly links: true;
123
+ readonly images: true;
124
+ readonly columns: true;
125
+ readonly tables: true;
126
+ };
127
+ readonly plainText: {
128
+ readonly headings: true;
129
+ readonly lists: true;
130
+ readonly taskLists: true;
131
+ readonly quotes: true;
132
+ readonly codeBlocks: true;
133
+ readonly dividers: true;
134
+ readonly links: false;
135
+ readonly images: false;
136
+ readonly columns: false;
137
+ readonly tables: false;
138
+ };
139
+ };
140
+ declare const createOpenEditorExtensionSet: ({ blockSpecs, markSpecs, insertPresets, features, }?: {
141
+ blockSpecs?: readonly BlockSpec[];
142
+ markSpecs?: readonly OpenEditorMarkSpec[];
143
+ insertPresets?: readonly OpenEditorInsertPreset[];
144
+ features?: Partial<OpenEditorFeatureSet>;
145
+ }) => OpenEditorExtensionSet;
146
+ declare const getOpenEditorPlatformSupport: (document: OpenEditorDocument, platform: EditorPlatform) => _openeditor_core.PlatformSupportResult;
147
+ declare const seedDocument: OpenEditorDocument;
148
+
149
+ export { type OpenEditorBlockSupportRow, type OpenEditorDefaultBlockName, type OpenEditorExtensionSet, type OpenEditorHeadingLevel, type OpenEditorInsertPreset, type OpenEditorInsertPresetKey, type OpenEditorMarkSpec, type OpenEditorSupportStatus, type OpenEditorSupportTarget, blockSupport, blockSupportTable, createOpenEditorExtensionSet, createOpenEditorInsertBlock, createOpenEditorInsertDocument, defaultBlockRegistry, defaultBlockSpecs, defaultMarkSpecs, getBlockLabel, getOpenEditorInsertPreset, getOpenEditorPlatformDocument, getOpenEditorPlatformSupport, markSupport, openEditorCapabilityFlags, openEditorFeatureSet, openEditorHeadingLevels, openEditorInsertPresets, seedDocument };
package/dist/index.js ADDED
@@ -0,0 +1,384 @@
1
+ import { createBlockRegistry, createDocument, textBlock, createTextNode, getPlatformDocument, findBlockSpecForNode, getPlatformSupport } from '@openeditor/core';
2
+
3
+ // src/index.ts
4
+ var listNode = (type, text = "") => ({
5
+ type,
6
+ content: [{ type: "listItem", content: [textBlock("paragraph", text)] }]
7
+ });
8
+ var defaultMarkSpecs = [
9
+ { name: "bold", label: "Bold" },
10
+ { name: "italic", label: "Italic" },
11
+ { name: "underline", label: "Underline" },
12
+ { name: "strike", label: "Strikethrough" },
13
+ { name: "code", label: "Inline Code" },
14
+ { name: "link", label: "Link" }
15
+ ];
16
+ var openEditorFeatureSet = {
17
+ headings: true,
18
+ lists: true,
19
+ taskLists: true,
20
+ quotes: true,
21
+ codeBlocks: true,
22
+ dividers: true,
23
+ links: true,
24
+ images: true,
25
+ columns: true,
26
+ tables: true
27
+ };
28
+ var openEditorHeadingLevels = [1, 2, 3, 4, 5, 6];
29
+ var defaultBlockSpecs = [
30
+ {
31
+ name: "paragraph",
32
+ label: "Paragraph",
33
+ group: "text",
34
+ defaultNode: () => textBlock("paragraph", ""),
35
+ support: { web: "supported", native: "supported" }
36
+ },
37
+ {
38
+ name: "heading",
39
+ label: "Heading",
40
+ group: "text",
41
+ defaultNode: () => textBlock("heading", "", { level: 2 }),
42
+ support: { web: "supported", native: "supported" }
43
+ },
44
+ {
45
+ name: "bulletList",
46
+ label: "Bullet List",
47
+ group: "text",
48
+ defaultNode: () => listNode("bulletList"),
49
+ support: { web: "supported", native: "supported" }
50
+ },
51
+ {
52
+ name: "orderedList",
53
+ label: "Numbered List",
54
+ group: "text",
55
+ defaultNode: () => listNode("orderedList"),
56
+ support: { web: "supported", native: "supported" }
57
+ },
58
+ {
59
+ name: "taskList",
60
+ label: "Task List",
61
+ group: "text",
62
+ defaultNode: () => ({
63
+ type: "taskList",
64
+ content: [
65
+ {
66
+ type: "taskItem",
67
+ attrs: { checked: false },
68
+ content: [textBlock("paragraph", "")]
69
+ }
70
+ ]
71
+ }),
72
+ support: { web: "supported", native: "supported" }
73
+ },
74
+ {
75
+ name: "blockquote",
76
+ label: "Quote",
77
+ group: "text",
78
+ defaultNode: () => ({ type: "blockquote", content: [textBlock("paragraph", "")] }),
79
+ support: { web: "supported", native: "supported" }
80
+ },
81
+ {
82
+ name: "codeBlock",
83
+ label: "Code",
84
+ group: "text",
85
+ defaultNode: () => ({ type: "codeBlock", content: [] }),
86
+ support: { web: "supported", native: "supported" }
87
+ },
88
+ {
89
+ name: "divider",
90
+ label: "Divider",
91
+ group: "structure",
92
+ defaultNode: () => ({ type: "horizontalRule" }),
93
+ matchNode: (node) => node.type === "horizontalRule" || node.type === "divider",
94
+ support: { web: "supported", native: "supported" }
95
+ },
96
+ {
97
+ name: "image",
98
+ label: "Image",
99
+ group: "media",
100
+ defaultNode: () => ({
101
+ type: "image",
102
+ attrs: {
103
+ src: "https://placehold.co/960x420/png",
104
+ alt: "Placeholder"
105
+ }
106
+ }),
107
+ support: { web: "supported", native: "supported" }
108
+ },
109
+ {
110
+ name: "columns",
111
+ label: "Columns",
112
+ group: "layout",
113
+ defaultNode: () => ({
114
+ type: "columns",
115
+ attrs: { count: 2 },
116
+ content: [
117
+ { type: "column", content: [textBlock("paragraph", "Column 1")] },
118
+ { type: "column", content: [textBlock("paragraph", "Column 2")] }
119
+ ]
120
+ }),
121
+ support: { web: "supported", native: "supported" }
122
+ },
123
+ {
124
+ name: "table",
125
+ label: "Table",
126
+ group: "layout",
127
+ defaultNode: () => ({
128
+ type: "table",
129
+ content: [
130
+ {
131
+ type: "tableRow",
132
+ content: [
133
+ { type: "tableHeader", content: [textBlock("paragraph", "Header 1")] },
134
+ { type: "tableHeader", content: [textBlock("paragraph", "Header 2")] },
135
+ { type: "tableHeader", content: [textBlock("paragraph", "Header 3")] }
136
+ ]
137
+ },
138
+ {
139
+ type: "tableRow",
140
+ content: [
141
+ { type: "tableCell", content: [textBlock("paragraph", "")] },
142
+ { type: "tableCell", content: [textBlock("paragraph", "")] },
143
+ { type: "tableCell", content: [textBlock("paragraph", "")] }
144
+ ]
145
+ },
146
+ {
147
+ type: "tableRow",
148
+ content: [
149
+ { type: "tableCell", content: [textBlock("paragraph", "")] },
150
+ { type: "tableCell", content: [textBlock("paragraph", "")] },
151
+ { type: "tableCell", content: [textBlock("paragraph", "")] }
152
+ ]
153
+ }
154
+ ]
155
+ }),
156
+ support: { web: "supported", native: "unsupported" }
157
+ }
158
+ ];
159
+ var defaultBlockRegistry = createBlockRegistry(defaultBlockSpecs);
160
+ var getDefaultBlockSpec = (name) => defaultBlockSpecs.find((spec) => spec.name === name);
161
+ var createBlockFromDefaultSpec = (name) => {
162
+ const spec = getDefaultBlockSpec(name);
163
+ if (!spec) {
164
+ throw new Error(`Unknown OpenEditor block "${name}".`);
165
+ }
166
+ return spec.defaultNode();
167
+ };
168
+ var createInsertPreset = (key, label, group, createBlock) => ({
169
+ key,
170
+ label,
171
+ group,
172
+ createBlock
173
+ });
174
+ var openEditorInsertPresets = [
175
+ createInsertPreset("paragraph", "Paragraph", "text", () => createBlockFromDefaultSpec("paragraph")),
176
+ ...openEditorHeadingLevels.map(
177
+ (level) => createInsertPreset(`heading${level}`, `Heading ${level}`, "text", () => textBlock("heading", "", { level }))
178
+ ),
179
+ createInsertPreset("bulletList", "Bullet List", "text", () => createBlockFromDefaultSpec("bulletList")),
180
+ createInsertPreset("orderedList", "Numbered List", "text", () => createBlockFromDefaultSpec("orderedList")),
181
+ createInsertPreset("taskList", "Task List", "text", () => createBlockFromDefaultSpec("taskList")),
182
+ createInsertPreset("blockquote", "Quote", "text", () => createBlockFromDefaultSpec("blockquote")),
183
+ createInsertPreset("codeBlock", "Code", "text", () => createBlockFromDefaultSpec("codeBlock")),
184
+ createInsertPreset("divider", "Divider", "structure", () => createBlockFromDefaultSpec("divider")),
185
+ createInsertPreset("image", "Image", "media", () => createBlockFromDefaultSpec("image")),
186
+ createInsertPreset("columns", "Columns", "layout", () => createBlockFromDefaultSpec("columns")),
187
+ createInsertPreset("table", "Table", "layout", () => createBlockFromDefaultSpec("table"))
188
+ ];
189
+ var getOpenEditorInsertPreset = (key) => openEditorInsertPresets.find((preset) => preset.key === key);
190
+ var createOpenEditorInsertBlock = (key) => {
191
+ const preset = getOpenEditorInsertPreset(key);
192
+ if (!preset) {
193
+ throw new Error(`Unknown OpenEditor insertion preset "${key}".`);
194
+ }
195
+ return preset.createBlock();
196
+ };
197
+ var createOpenEditorInsertDocument = (key) => createDocument([createOpenEditorInsertBlock(key)]);
198
+ var getOpenEditorPlatformDocument = (document, platform) => getPlatformDocument(document, defaultBlockRegistry, platform);
199
+ var getBlockLabel = (node) => findBlockSpecForNode(defaultBlockRegistry, node)?.label ?? node.type;
200
+ var blockSupport = defaultBlockSpecs.map((spec) => ({
201
+ block: spec.name,
202
+ label: spec.label,
203
+ group: spec.group,
204
+ web: spec.support?.web ?? "supported",
205
+ native: spec.support?.native ?? "supported"
206
+ }));
207
+ var markSupport = defaultMarkSpecs.map((spec) => ({
208
+ mark: spec.name,
209
+ label: spec.label,
210
+ web: "supported",
211
+ native: "supported"
212
+ }));
213
+ var blockSupportTable = [
214
+ { block: "paragraph", label: "Paragraph", web: "supported", native: "supported", viewer: "supported", html: "supported", plainText: "supported" },
215
+ { block: "heading", label: "Heading", web: "supported", native: "supported", viewer: "supported", html: "supported", plainText: "supported" },
216
+ { block: "bulletList", label: "Bullet List", web: "supported", native: "supported", viewer: "supported", html: "supported", plainText: "supported" },
217
+ { block: "orderedList", label: "Numbered List", web: "supported", native: "supported", viewer: "supported", html: "supported", plainText: "supported" },
218
+ { block: "taskList", label: "Task List", web: "supported", native: "supported", viewer: "supported", html: "supported", plainText: "supported" },
219
+ { block: "blockquote", label: "Quote", web: "supported", native: "supported", viewer: "supported", html: "supported", plainText: "supported" },
220
+ { block: "codeBlock", label: "Code", web: "supported", native: "supported", viewer: "supported", html: "supported", plainText: "supported" },
221
+ { block: "divider", label: "Divider", web: "supported", native: "supported", viewer: "supported", html: "supported", plainText: "supported" },
222
+ { block: "image", label: "Image", web: "supported", native: "supported", viewer: "supported", html: "supported", plainText: "degraded" },
223
+ { block: "columns", label: "Columns", web: "supported", native: "supported", viewer: "supported", html: "supported", plainText: "degraded" },
224
+ { block: "table", label: "Table", web: "supported", native: "unsupported", viewer: "supported", html: "supported", plainText: "degraded" }
225
+ ];
226
+ var openEditorCapabilityFlags = {
227
+ web: {
228
+ headings: true,
229
+ lists: true,
230
+ taskLists: true,
231
+ quotes: true,
232
+ codeBlocks: true,
233
+ dividers: true,
234
+ links: true,
235
+ images: true,
236
+ columns: true,
237
+ tables: true
238
+ },
239
+ native: {
240
+ headings: true,
241
+ lists: true,
242
+ taskLists: true,
243
+ quotes: true,
244
+ codeBlocks: true,
245
+ dividers: true,
246
+ links: true,
247
+ images: true,
248
+ columns: true,
249
+ tables: false
250
+ },
251
+ viewer: {
252
+ headings: true,
253
+ lists: true,
254
+ taskLists: true,
255
+ quotes: true,
256
+ codeBlocks: true,
257
+ dividers: true,
258
+ links: true,
259
+ images: true,
260
+ columns: true,
261
+ tables: true
262
+ },
263
+ html: {
264
+ headings: true,
265
+ lists: true,
266
+ taskLists: true,
267
+ quotes: true,
268
+ codeBlocks: true,
269
+ dividers: true,
270
+ links: true,
271
+ images: true,
272
+ columns: true,
273
+ tables: true
274
+ },
275
+ plainText: {
276
+ headings: true,
277
+ lists: true,
278
+ taskLists: true,
279
+ quotes: true,
280
+ codeBlocks: true,
281
+ dividers: true,
282
+ links: false,
283
+ images: false,
284
+ columns: false,
285
+ tables: false
286
+ }
287
+ };
288
+ var createOpenEditorExtensionSet = ({
289
+ blockSpecs = defaultBlockSpecs,
290
+ markSpecs = defaultMarkSpecs,
291
+ insertPresets = openEditorInsertPresets,
292
+ features = {}
293
+ } = {}) => ({
294
+ blockSpecs,
295
+ markSpecs,
296
+ insertPresets,
297
+ featureSet: { ...openEditorFeatureSet, ...features },
298
+ blockRegistry: createBlockRegistry([...blockSpecs])
299
+ });
300
+ var getOpenEditorPlatformSupport = (document, platform) => getPlatformSupport(document, defaultBlockRegistry, platform);
301
+ var seedDocument = createDocument(
302
+ [
303
+ textBlock("heading", "OpenEditor", { level: 1 }),
304
+ {
305
+ type: "paragraph",
306
+ content: [
307
+ createTextNode("A shared "),
308
+ createTextNode("ProseMirror-compatible", [{ type: "bold" }]),
309
+ createTextNode(" document loaded by web and native, with inline marks and layout metadata preserved.")
310
+ ]
311
+ },
312
+ textBlock("heading", "Full parity document", { level: 2 }),
313
+ {
314
+ type: "bulletList",
315
+ content: [
316
+ { type: "listItem", content: [textBlock("paragraph", "Paragraphs and headings")] },
317
+ { type: "listItem", content: [textBlock("paragraph", "Lists, quotes, and code blocks")] },
318
+ { type: "listItem", content: [textBlock("paragraph", "Dividers, media, and layout placeholders")] }
319
+ ]
320
+ },
321
+ {
322
+ type: "orderedList",
323
+ attrs: { start: 1 },
324
+ content: [
325
+ { type: "listItem", content: [textBlock("paragraph", "Edit on web")] },
326
+ { type: "listItem", content: [textBlock("paragraph", "Inspect on native")] },
327
+ { type: "listItem", content: [textBlock("paragraph", "Round-trip the same JSON")] }
328
+ ]
329
+ },
330
+ {
331
+ type: "taskList",
332
+ content: [
333
+ { type: "taskItem", attrs: { checked: true }, content: [textBlock("paragraph", "Use the same JSON on web and native")] },
334
+ { type: "taskItem", attrs: { checked: false }, content: [textBlock("paragraph", "Use the same block behavior on web and native")] }
335
+ ]
336
+ },
337
+ {
338
+ type: "blockquote",
339
+ content: [textBlock("paragraph", "One canonical document shape, platform-specific renderers.")]
340
+ },
341
+ {
342
+ type: "codeBlock",
343
+ attrs: { language: "ts" },
344
+ content: [createTextNode("const editor = createOpenEditor();")]
345
+ },
346
+ { type: "horizontalRule" },
347
+ {
348
+ type: "columns",
349
+ attrs: { count: 2 },
350
+ content: [
351
+ { type: "column", content: [textBlock("paragraph", "Web columns land here first.")] },
352
+ { type: "column", content: [textBlock("paragraph", "Native renders the same column structure as web.")] }
353
+ ]
354
+ },
355
+ {
356
+ type: "table",
357
+ content: [
358
+ {
359
+ type: "tableRow",
360
+ content: [
361
+ { type: "tableHeader", content: [textBlock("paragraph", "Block")] },
362
+ { type: "tableHeader", content: [textBlock("paragraph", "Parity status")] }
363
+ ]
364
+ },
365
+ {
366
+ type: "tableRow",
367
+ content: [
368
+ { type: "tableCell", content: [textBlock("paragraph", "Slash commands")] },
369
+ { type: "tableCell", content: [textBlock("paragraph", "Web")] }
370
+ ]
371
+ }
372
+ ]
373
+ }
374
+ ],
375
+ {
376
+ title: "OpenEditor seed document",
377
+ source: "openeditor-full-parity",
378
+ schemaVersion: 1
379
+ }
380
+ );
381
+
382
+ export { blockSupport, blockSupportTable, createOpenEditorExtensionSet, createOpenEditorInsertBlock, createOpenEditorInsertDocument, defaultBlockRegistry, defaultBlockSpecs, defaultMarkSpecs, getBlockLabel, getOpenEditorInsertPreset, getOpenEditorPlatformDocument, getOpenEditorPlatformSupport, markSupport, openEditorCapabilityFlags, openEditorFeatureSet, openEditorHeadingLevels, openEditorInsertPresets, seedDocument };
383
+ //# sourceMappingURL=index.js.map
384
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;AAgBA,IAAM,QAAA,GAAW,CAAC,IAAA,EAAoC,IAAA,GAAO,EAAA,MAAyB;AAAA,EACpF,IAAA;AAAA,EACA,OAAA,EAAS,CAAC,EAAE,IAAA,EAAM,UAAA,EAAY,OAAA,EAAS,CAAC,SAAA,CAAU,WAAA,EAAa,IAAI,CAAC,CAAA,EAAG;AACzE,CAAA,CAAA;AAEO,IAAM,gBAAA,GAAmB;AAAA,EAC9B,EAAE,IAAA,EAAM,MAAA,EAAQ,KAAA,EAAO,MAAA,EAAO;AAAA,EAC9B,EAAE,IAAA,EAAM,QAAA,EAAU,KAAA,EAAO,QAAA,EAAS;AAAA,EAClC,EAAE,IAAA,EAAM,WAAA,EAAa,KAAA,EAAO,WAAA,EAAY;AAAA,EACxC,EAAE,IAAA,EAAM,QAAA,EAAU,KAAA,EAAO,eAAA,EAAgB;AAAA,EACzC,EAAE,IAAA,EAAM,MAAA,EAAQ,KAAA,EAAO,aAAA,EAAc;AAAA,EACrC,EAAE,IAAA,EAAM,MAAA,EAAQ,KAAA,EAAO,MAAA;AACzB;AAEO,IAAM,oBAAA,GAA6C;AAAA,EACxD,QAAA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,gBAAgB,CAAC,CAAA,EAAE;AAAA,YACzE,EAAE,MAAM,WAAA,EAAa,OAAA,EAAS,CAAC,SAAA,CAAU,WAAA,EAAa,KAAK,CAAC,CAAA;AAAE;AAChE;AACF;AACF;AACF,GACF;AAAA,EACA;AAAA,IACE,KAAA,EAAO,0BAAA;AAAA,IACP,MAAA,EAAQ,wBAAA;AAAA,IACR,aAAA,EAAe;AAAA;AAEnB","file":"index.js","sourcesContent":["import {\n createBlockRegistry,\n createDocument,\n createTextNode,\n getPlatformSupport,\n findBlockSpecForNode,\n getPlatformDocument,\n textBlock,\n type BlockSpec,\n type EditorPlatform,\n type OpenEditorFeatureSet,\n type OpenEditorBlock,\n type OpenEditorDocument,\n type ProseMirrorNode,\n} from \"@openeditor/core\";\n\nconst listNode = (type: \"bulletList\" | \"orderedList\", text = \"\"): ProseMirrorNode => ({\n type,\n content: [{ type: \"listItem\", content: [textBlock(\"paragraph\", text)] }],\n});\n\nexport const defaultMarkSpecs = [\n { name: \"bold\", label: \"Bold\" },\n { name: \"italic\", label: \"Italic\" },\n { name: \"underline\", label: \"Underline\" },\n { name: \"strike\", label: \"Strikethrough\" },\n { name: \"code\", label: \"Inline Code\" },\n { name: \"link\", label: \"Link\" },\n] as const;\n\nexport const openEditorFeatureSet: OpenEditorFeatureSet = {\n headings: true,\n lists: true,\n taskLists: true,\n quotes: true,\n codeBlocks: true,\n dividers: true,\n links: true,\n images: true,\n columns: true,\n tables: true,\n};\n\nexport type OpenEditorSupportTarget =\n | \"web\"\n | \"native\"\n | \"viewer\"\n | \"html\"\n | \"plainText\";\n\nexport type OpenEditorSupportStatus =\n | \"supported\"\n | \"degraded\"\n | \"unsupported\";\n\nexport type OpenEditorBlockSupportRow = {\n block: OpenEditorDefaultBlockName;\n label: string;\n web: OpenEditorSupportStatus;\n native: OpenEditorSupportStatus;\n viewer: OpenEditorSupportStatus;\n html: OpenEditorSupportStatus;\n plainText: OpenEditorSupportStatus;\n};\n\nexport const openEditorHeadingLevels = [1, 2, 3, 4, 5, 6] as const;\nexport type OpenEditorHeadingLevel = (typeof openEditorHeadingLevels)[number];\nexport type OpenEditorDefaultBlockName =\n | \"paragraph\"\n | \"heading\"\n | \"bulletList\"\n | \"orderedList\"\n | \"taskList\"\n | \"blockquote\"\n | \"codeBlock\"\n | \"divider\"\n | \"image\"\n | \"columns\"\n | \"table\";\nexport type OpenEditorInsertPresetKey =\n | \"paragraph\"\n | `heading${OpenEditorHeadingLevel}`\n | \"bulletList\"\n | \"orderedList\"\n | \"taskList\"\n | \"blockquote\"\n | \"codeBlock\"\n | \"divider\"\n | \"image\"\n | \"columns\"\n | \"table\";\nexport type OpenEditorInsertPreset = {\n key: OpenEditorInsertPresetKey;\n label: string;\n group: BlockSpec[\"group\"];\n createBlock: () => OpenEditorBlock;\n};\n\nexport type OpenEditorMarkSpec = {\n name: string;\n label: string;\n};\n\nexport type OpenEditorExtensionSet = {\n blockSpecs: readonly BlockSpec[];\n markSpecs: readonly OpenEditorMarkSpec[];\n insertPresets: readonly OpenEditorInsertPreset[];\n featureSet: OpenEditorFeatureSet;\n blockRegistry: ReturnType<typeof createBlockRegistry>;\n};\n\nexport const defaultBlockSpecs: BlockSpec[] = [\n {\n name: \"paragraph\",\n label: \"Paragraph\",\n group: \"text\",\n defaultNode: () => textBlock(\"paragraph\", \"\"),\n support: { web: \"supported\", native: \"supported\" },\n },\n {\n name: \"heading\",\n label: \"Heading\",\n group: \"text\",\n defaultNode: () => textBlock(\"heading\", \"\", { level: 2 }),\n support: { web: \"supported\", native: \"supported\" },\n },\n {\n name: \"bulletList\",\n label: \"Bullet List\",\n group: \"text\",\n defaultNode: () => listNode(\"bulletList\"),\n support: { web: \"supported\", native: \"supported\" },\n },\n {\n name: \"orderedList\",\n label: \"Numbered List\",\n group: \"text\",\n defaultNode: () => listNode(\"orderedList\"),\n support: { web: \"supported\", native: \"supported\" },\n },\n {\n name: \"taskList\",\n label: \"Task List\",\n group: \"text\",\n defaultNode: () => ({\n type: \"taskList\",\n content: [\n {\n type: \"taskItem\",\n attrs: { checked: false },\n content: [textBlock(\"paragraph\", \"\")],\n },\n ],\n }),\n support: { web: \"supported\", native: \"supported\" },\n },\n {\n name: \"blockquote\",\n label: \"Quote\",\n group: \"text\",\n defaultNode: () => ({ type: \"blockquote\", content: [textBlock(\"paragraph\", \"\")] }),\n support: { web: \"supported\", native: \"supported\" },\n },\n {\n name: \"codeBlock\",\n label: \"Code\",\n group: \"text\",\n defaultNode: () => ({ type: \"codeBlock\", content: [] }),\n support: { web: \"supported\", native: \"supported\" },\n },\n {\n name: \"divider\",\n label: \"Divider\",\n group: \"structure\",\n defaultNode: () => ({ type: \"horizontalRule\" }),\n matchNode: (node) => node.type === \"horizontalRule\" || node.type === \"divider\",\n support: { web: \"supported\", native: \"supported\" },\n },\n {\n name: \"image\",\n label: \"Image\",\n group: \"media\",\n defaultNode: () => ({\n type: \"image\",\n attrs: {\n src: \"https://placehold.co/960x420/png\",\n alt: \"Placeholder\",\n },\n }),\n support: { web: \"supported\", native: \"supported\" },\n },\n {\n name: \"columns\",\n label: \"Columns\",\n group: \"layout\",\n defaultNode: () => ({\n type: \"columns\",\n attrs: { count: 2 },\n content: [\n { type: \"column\", content: [textBlock(\"paragraph\", \"Column 1\")] },\n { type: \"column\", content: [textBlock(\"paragraph\", \"Column 2\")] },\n ],\n }),\n support: { web: \"supported\", native: \"supported\" },\n },\n {\n name: \"table\",\n label: \"Table\",\n group: \"layout\",\n defaultNode: () => ({\n type: \"table\",\n content: [\n {\n type: \"tableRow\",\n content: [\n { type: \"tableHeader\", content: [textBlock(\"paragraph\", \"Header 1\")] },\n { type: \"tableHeader\", content: [textBlock(\"paragraph\", \"Header 2\")] },\n { type: \"tableHeader\", content: [textBlock(\"paragraph\", \"Header 3\")] },\n ],\n },\n {\n type: \"tableRow\",\n content: [\n { type: \"tableCell\", content: [textBlock(\"paragraph\", \"\")] },\n { type: \"tableCell\", content: [textBlock(\"paragraph\", \"\")] },\n { type: \"tableCell\", content: [textBlock(\"paragraph\", \"\")] },\n ],\n },\n {\n type: \"tableRow\",\n content: [\n { type: \"tableCell\", content: [textBlock(\"paragraph\", \"\")] },\n { type: \"tableCell\", content: [textBlock(\"paragraph\", \"\")] },\n { type: \"tableCell\", content: [textBlock(\"paragraph\", \"\")] },\n ],\n },\n ],\n }),\n support: { web: \"supported\", native: \"unsupported\" },\n },\n];\n\nexport const defaultBlockRegistry = createBlockRegistry(defaultBlockSpecs);\n\nconst getDefaultBlockSpec = (name: OpenEditorDefaultBlockName) =>\n defaultBlockSpecs.find((spec) => spec.name === name);\n\nconst createBlockFromDefaultSpec = (name: OpenEditorDefaultBlockName): OpenEditorBlock => {\n const spec = getDefaultBlockSpec(name);\n if (!spec) {\n throw new Error(`Unknown OpenEditor block \"${name}\".`);\n }\n\n return spec.defaultNode();\n};\n\nconst createInsertPreset = (\n key: OpenEditorInsertPresetKey,\n label: string,\n group: BlockSpec[\"group\"],\n createBlock: () => OpenEditorBlock,\n): OpenEditorInsertPreset => ({\n key,\n label,\n group,\n createBlock,\n});\n\nexport const openEditorInsertPresets: readonly OpenEditorInsertPreset[] = [\n createInsertPreset(\"paragraph\", \"Paragraph\", \"text\", () => createBlockFromDefaultSpec(\"paragraph\")),\n ...openEditorHeadingLevels.map((level) =>\n createInsertPreset(`heading${level}`, `Heading ${level}`, \"text\", () => textBlock(\"heading\", \"\", { level })),\n ),\n createInsertPreset(\"bulletList\", \"Bullet List\", \"text\", () => createBlockFromDefaultSpec(\"bulletList\")),\n createInsertPreset(\"orderedList\", \"Numbered List\", \"text\", () => createBlockFromDefaultSpec(\"orderedList\")),\n createInsertPreset(\"taskList\", \"Task List\", \"text\", () => createBlockFromDefaultSpec(\"taskList\")),\n createInsertPreset(\"blockquote\", \"Quote\", \"text\", () => createBlockFromDefaultSpec(\"blockquote\")),\n createInsertPreset(\"codeBlock\", \"Code\", \"text\", () => createBlockFromDefaultSpec(\"codeBlock\")),\n createInsertPreset(\"divider\", \"Divider\", \"structure\", () => createBlockFromDefaultSpec(\"divider\")),\n createInsertPreset(\"image\", \"Image\", \"media\", () => createBlockFromDefaultSpec(\"image\")),\n createInsertPreset(\"columns\", \"Columns\", \"layout\", () => createBlockFromDefaultSpec(\"columns\")),\n createInsertPreset(\"table\", \"Table\", \"layout\", () => createBlockFromDefaultSpec(\"table\")),\n];\n\nexport const getOpenEditorInsertPreset = (key: OpenEditorInsertPresetKey) =>\n openEditorInsertPresets.find((preset) => preset.key === key);\n\nexport const createOpenEditorInsertBlock = (key: OpenEditorInsertPresetKey): OpenEditorBlock => {\n const preset = getOpenEditorInsertPreset(key);\n if (!preset) {\n throw new Error(`Unknown OpenEditor insertion preset \"${key}\".`);\n }\n\n return preset.createBlock();\n};\n\nexport const createOpenEditorInsertDocument = (key: OpenEditorInsertPresetKey): OpenEditorDocument =>\n createDocument([createOpenEditorInsertBlock(key)]);\n\nexport const getOpenEditorPlatformDocument = (\n document: OpenEditorDocument,\n platform: EditorPlatform,\n) => getPlatformDocument(document, defaultBlockRegistry, platform);\n\nexport const getBlockLabel = (node: ProseMirrorNode) =>\n findBlockSpecForNode(defaultBlockRegistry, node)?.label ?? node.type;\n\nexport const blockSupport = defaultBlockSpecs.map((spec) => ({\n block: spec.name,\n label: spec.label,\n group: spec.group,\n web: spec.support?.web ?? \"supported\",\n native: spec.support?.native ?? \"supported\",\n}));\n\nexport const markSupport = defaultMarkSpecs.map((spec) => ({\n mark: spec.name,\n label: spec.label,\n web: \"supported\",\n native: \"supported\",\n}));\n\nexport const blockSupportTable: readonly OpenEditorBlockSupportRow[] = [\n { block: \"paragraph\", label: \"Paragraph\", web: \"supported\", native: \"supported\", viewer: \"supported\", html: \"supported\", plainText: \"supported\" },\n { block: \"heading\", label: \"Heading\", web: \"supported\", native: \"supported\", viewer: \"supported\", html: \"supported\", plainText: \"supported\" },\n { block: \"bulletList\", label: \"Bullet List\", web: \"supported\", native: \"supported\", viewer: \"supported\", html: \"supported\", plainText: \"supported\" },\n { block: \"orderedList\", label: \"Numbered List\", web: \"supported\", native: \"supported\", viewer: \"supported\", html: \"supported\", plainText: \"supported\" },\n { block: \"taskList\", label: \"Task List\", web: \"supported\", native: \"supported\", viewer: \"supported\", html: \"supported\", plainText: \"supported\" },\n { block: \"blockquote\", label: \"Quote\", web: \"supported\", native: \"supported\", viewer: \"supported\", html: \"supported\", plainText: \"supported\" },\n { block: \"codeBlock\", label: \"Code\", web: \"supported\", native: \"supported\", viewer: \"supported\", html: \"supported\", plainText: \"supported\" },\n { block: \"divider\", label: \"Divider\", web: \"supported\", native: \"supported\", viewer: \"supported\", html: \"supported\", plainText: \"supported\" },\n { block: \"image\", label: \"Image\", web: \"supported\", native: \"supported\", viewer: \"supported\", html: \"supported\", plainText: \"degraded\" },\n { block: \"columns\", label: \"Columns\", web: \"supported\", native: \"supported\", viewer: \"supported\", html: \"supported\", plainText: \"degraded\" },\n { block: \"table\", label: \"Table\", web: \"supported\", native: \"unsupported\", viewer: \"supported\", html: \"supported\", plainText: \"degraded\" },\n];\n\nexport const openEditorCapabilityFlags = {\n web: {\n headings: true,\n lists: true,\n taskLists: true,\n quotes: true,\n codeBlocks: true,\n dividers: true,\n links: true,\n images: true,\n columns: true,\n tables: true,\n },\n native: {\n headings: true,\n lists: true,\n taskLists: true,\n quotes: true,\n codeBlocks: true,\n dividers: true,\n links: true,\n images: true,\n columns: true,\n tables: false,\n },\n viewer: {\n headings: true,\n lists: true,\n taskLists: true,\n quotes: true,\n codeBlocks: true,\n dividers: true,\n links: true,\n images: true,\n columns: true,\n tables: true,\n },\n html: {\n headings: true,\n lists: true,\n taskLists: true,\n quotes: true,\n codeBlocks: true,\n dividers: true,\n links: true,\n images: true,\n columns: true,\n tables: true,\n },\n plainText: {\n headings: true,\n lists: true,\n taskLists: true,\n quotes: true,\n codeBlocks: true,\n dividers: true,\n links: false,\n images: false,\n columns: false,\n tables: false,\n },\n} as const;\n\nexport const createOpenEditorExtensionSet = ({\n blockSpecs = defaultBlockSpecs,\n markSpecs = defaultMarkSpecs,\n insertPresets = openEditorInsertPresets,\n features = {},\n}: {\n blockSpecs?: readonly BlockSpec[];\n markSpecs?: readonly OpenEditorMarkSpec[];\n insertPresets?: readonly OpenEditorInsertPreset[];\n features?: Partial<OpenEditorFeatureSet>;\n} = {}): OpenEditorExtensionSet => ({\n blockSpecs,\n markSpecs,\n insertPresets,\n featureSet: { ...openEditorFeatureSet, ...features },\n blockRegistry: createBlockRegistry([...blockSpecs]),\n});\n\nexport const getOpenEditorPlatformSupport = (\n document: OpenEditorDocument,\n platform: EditorPlatform,\n) => getPlatformSupport(document, defaultBlockRegistry, platform);\n\nexport const seedDocument: OpenEditorDocument = createDocument(\n [\n textBlock(\"heading\", \"OpenEditor\", { level: 1 }),\n {\n type: \"paragraph\",\n content: [\n createTextNode(\"A shared \"),\n createTextNode(\"ProseMirror-compatible\", [{ type: \"bold\" }]),\n createTextNode(\" document loaded by web and native, with inline marks and layout metadata preserved.\"),\n ],\n },\n textBlock(\"heading\", \"Full parity document\", { level: 2 }),\n {\n type: \"bulletList\",\n content: [\n { type: \"listItem\", content: [textBlock(\"paragraph\", \"Paragraphs and headings\")] },\n { type: \"listItem\", content: [textBlock(\"paragraph\", \"Lists, quotes, and code blocks\")] },\n { type: \"listItem\", content: [textBlock(\"paragraph\", \"Dividers, media, and layout placeholders\")] },\n ],\n },\n {\n type: \"orderedList\",\n attrs: { start: 1 },\n content: [\n { type: \"listItem\", content: [textBlock(\"paragraph\", \"Edit on web\")] },\n { type: \"listItem\", content: [textBlock(\"paragraph\", \"Inspect on native\")] },\n { type: \"listItem\", content: [textBlock(\"paragraph\", \"Round-trip the same JSON\")] },\n ],\n },\n {\n type: \"taskList\",\n content: [\n { type: \"taskItem\", attrs: { checked: true }, content: [textBlock(\"paragraph\", \"Use the same JSON on web and native\")] },\n { type: \"taskItem\", attrs: { checked: false }, content: [textBlock(\"paragraph\", \"Use the same block behavior on web and native\")] },\n ],\n },\n {\n type: \"blockquote\",\n content: [textBlock(\"paragraph\", \"One canonical document shape, platform-specific renderers.\")],\n },\n {\n type: \"codeBlock\",\n attrs: { language: \"ts\" },\n content: [createTextNode(\"const editor = createOpenEditor();\")],\n },\n { type: \"horizontalRule\" },\n {\n type: \"columns\",\n attrs: { count: 2 },\n content: [\n { type: \"column\", content: [textBlock(\"paragraph\", \"Web columns land here first.\")] },\n { type: \"column\", content: [textBlock(\"paragraph\", \"Native renders the same column structure as web.\")] },\n ],\n },\n {\n type: \"table\",\n content: [\n {\n type: \"tableRow\",\n content: [\n { type: \"tableHeader\", content: [textBlock(\"paragraph\", \"Block\")] },\n { type: \"tableHeader\", content: [textBlock(\"paragraph\", \"Parity status\")] },\n ],\n },\n {\n type: \"tableRow\",\n content: [\n { type: \"tableCell\", content: [textBlock(\"paragraph\", \"Slash commands\")] },\n { type: \"tableCell\", content: [textBlock(\"paragraph\", \"Web\")] },\n ],\n },\n ],\n },\n ],\n {\n title: \"OpenEditor seed document\",\n source: \"openeditor-full-parity\",\n schemaVersion: 1,\n },\n);\n"]}
package/package.json ADDED
@@ -0,0 +1,29 @@
1
+ {
2
+ "name": "@openeditor/extensions",
3
+ "version": "0.0.4",
4
+ "type": "module",
5
+ "sideEffects": false,
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/EasyLink-HQ/openeditor.git",
9
+ "directory": "packages/extensions"
10
+ },
11
+ "main": "./dist/index.js",
12
+ "types": "./dist/index.d.ts",
13
+ "publishConfig": {
14
+ "access": "public"
15
+ },
16
+ "files": [
17
+ "dist"
18
+ ],
19
+ "exports": {
20
+ ".": {
21
+ "types": "./dist/index.d.ts",
22
+ "import": "./dist/index.js"
23
+ },
24
+ "./package.json": "./package.json"
25
+ },
26
+ "dependencies": {
27
+ "@openeditor/core": "0.0.4"
28
+ }
29
+ }