@supernova-studio/client 0.48.6 → 1.0.1
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.d.mts +1166 -44199
- package/dist/index.mjs +4583 -9902
- package/dist/index.mjs.map +1 -1
- package/package.json +11 -30
- package/dist/index.d.ts +0 -44442
- package/dist/index.js +0 -11007
- package/dist/index.js.map +0 -1
- package/src/api/conversion/documentation/documentation-group-v1-to-dto.ts +0 -114
- package/src/api/conversion/documentation/documentation-group-v2-to-dto.ts +0 -92
- package/src/api/conversion/documentation/documentation-item-configuration-v1-to-dto.ts +0 -52
- package/src/api/conversion/documentation/documentation-item-configuration-v2-to-dto.ts +0 -34
- package/src/api/conversion/documentation/documentation-page-to-dto-utils.ts +0 -132
- package/src/api/conversion/documentation/documentation-page-v1-to-dto.ts +0 -69
- package/src/api/conversion/documentation/documentation-page-v2-to-dto.ts +0 -72
- package/src/api/conversion/documentation/index.ts +0 -7
- package/src/api/conversion/export/index.ts +0 -1
- package/src/api/conversion/export/pipeline.ts +0 -24
- package/src/api/conversion/index.ts +0 -3
- package/src/api/conversion/integrations/git.ts +0 -37
- package/src/api/conversion/integrations/index.ts +0 -2
- package/src/api/conversion/integrations/integration.ts +0 -37
- package/src/api/dto/design-systems/brand.ts +0 -22
- package/src/api/dto/design-systems/data-source.ts +0 -122
- package/src/api/dto/design-systems/design-system.ts +0 -18
- package/src/api/dto/design-systems/elements-diff.ts +0 -14
- package/src/api/dto/design-systems/exporter-property.ts +0 -8
- package/src/api/dto/design-systems/index.ts +0 -7
- package/src/api/dto/design-systems/version.ts +0 -57
- package/src/api/dto/design-systems/view.ts +0 -45
- package/src/api/dto/documentation/anchor.ts +0 -15
- package/src/api/dto/documentation/block-definition.ts +0 -28
- package/src/api/dto/documentation/block.ts +0 -6
- package/src/api/dto/documentation/documentation-page-snapshot.ts +0 -18
- package/src/api/dto/documentation/index.ts +0 -6
- package/src/api/dto/documentation/link-preview.ts +0 -23
- package/src/api/dto/documentation/publish.ts +0 -25
- package/src/api/dto/elements/documentation/draft-state.ts +0 -35
- package/src/api/dto/elements/documentation/group-action.ts +0 -108
- package/src/api/dto/elements/documentation/group-v1.ts +0 -35
- package/src/api/dto/elements/documentation/group-v2.ts +0 -109
- package/src/api/dto/elements/documentation/hierarchy.ts +0 -36
- package/src/api/dto/elements/documentation/index.ts +0 -11
- package/src/api/dto/elements/documentation/item-configuration-v1.ts +0 -24
- package/src/api/dto/elements/documentation/item-configuration-v2.ts +0 -14
- package/src/api/dto/elements/documentation/page-actions-v2.ts +0 -108
- package/src/api/dto/elements/documentation/page-content.ts +0 -15
- package/src/api/dto/elements/documentation/page-v1.ts +0 -21
- package/src/api/dto/elements/documentation/page-v2.ts +0 -105
- package/src/api/dto/elements/elements-action-v2.ts +0 -114
- package/src/api/dto/elements/figma-nodes/figma-node.ts +0 -55
- package/src/api/dto/elements/figma-nodes/index.ts +0 -2
- package/src/api/dto/elements/figma-nodes/node-actions-v2.ts +0 -24
- package/src/api/dto/elements/get-elements-v2.ts +0 -21
- package/src/api/dto/elements/index.ts +0 -5
- package/src/api/dto/elements/properties/index.ts +0 -3
- package/src/api/dto/elements/properties/property-definitions-actions-v2.ts +0 -53
- package/src/api/dto/elements/properties/property-definitions.ts +0 -62
- package/src/api/dto/elements/properties/property-values.ts +0 -17
- package/src/api/dto/export/exporter.ts +0 -73
- package/src/api/dto/export/index.ts +0 -3
- package/src/api/dto/export/job.ts +0 -75
- package/src/api/dto/export/pipeline.ts +0 -20
- package/src/api/dto/figma-components/assets/download.ts +0 -30
- package/src/api/dto/figma-components/assets/index.ts +0 -1
- package/src/api/dto/figma-components/index.ts +0 -1
- package/src/api/dto/index.ts +0 -8
- package/src/api/dto/liveblocks/auth-response.ts +0 -7
- package/src/api/dto/liveblocks/index.ts +0 -1
- package/src/api/dto/users/index.ts +0 -1
- package/src/api/dto/users/profile/index.ts +0 -1
- package/src/api/dto/users/profile/update.ts +0 -7
- package/src/api/dto/workspaces/git.ts +0 -32
- package/src/api/dto/workspaces/index.ts +0 -5
- package/src/api/dto/workspaces/integrations.ts +0 -34
- package/src/api/dto/workspaces/membership.ts +0 -29
- package/src/api/dto/workspaces/npm-registry.ts +0 -35
- package/src/api/dto/workspaces/workspace.ts +0 -16
- package/src/api/index.ts +0 -3
- package/src/api/payloads/design-systems/brand.ts +0 -11
- package/src/api/payloads/design-systems/index.ts +0 -2
- package/src/api/payloads/design-systems/version.ts +0 -29
- package/src/api/payloads/documentation/block-definitions.ts +0 -12
- package/src/api/payloads/documentation/design-data-doc-diff.ts +0 -7
- package/src/api/payloads/documentation/index.ts +0 -2
- package/src/api/payloads/export/index.ts +0 -1
- package/src/api/payloads/export/pipeline.ts +0 -46
- package/src/api/payloads/index.ts +0 -6
- package/src/api/payloads/liveblocks/auth.ts +0 -7
- package/src/api/payloads/liveblocks/index.ts +0 -1
- package/src/api/payloads/users/index.ts +0 -2
- package/src/api/payloads/users/notifications/index.ts +0 -1
- package/src/api/payloads/users/notifications/notification-settings.ts +0 -17
- package/src/api/payloads/users/profile/index.ts +0 -1
- package/src/api/payloads/users/profile/update.ts +0 -4
- package/src/api/payloads/workspaces/index.ts +0 -2
- package/src/api/payloads/workspaces/workspace-configuration.ts +0 -50
- package/src/api/payloads/workspaces/workspace-integrations.ts +0 -26
- package/src/index.ts +0 -3
- package/src/utils/hash.ts +0 -62
- package/src/utils/index.ts +0 -1
- package/src/yjs/design-system-content/documentation-hierarchy.ts +0 -33
- package/src/yjs/design-system-content/index.ts +0 -2
- package/src/yjs/design-system-content/item-configuration.ts +0 -93
- package/src/yjs/docs-editor/blocks-to-prosemirror.ts +0 -697
- package/src/yjs/docs-editor/index.ts +0 -7
- package/src/yjs/docs-editor/list-tree-builder.ts +0 -135
- package/src/yjs/docs-editor/mock.ts +0 -2447
- package/src/yjs/docs-editor/model/block.ts +0 -8
- package/src/yjs/docs-editor/model/index.ts +0 -2
- package/src/yjs/docs-editor/model/page.ts +0 -8
- package/src/yjs/docs-editor/prosemirror/index.ts +0 -2
- package/src/yjs/docs-editor/prosemirror/schema.ts +0 -657
- package/src/yjs/docs-editor/prosemirror/types.ts +0 -19
- package/src/yjs/docs-editor/prosemirror-to-blocks.ts +0 -900
- package/src/yjs/docs-editor/utils.ts +0 -115
- package/src/yjs/index.ts +0 -3
- package/src/yjs/version-room/backend.ts +0 -60
- package/src/yjs/version-room/base.ts +0 -185
- package/src/yjs/version-room/frontend.ts +0 -298
- package/src/yjs/version-room/index.ts +0 -4
- package/src/yjs/version-room/utils.ts +0 -6
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { PageBlockEditorModelV2, PageSectionEditorModelV2 } from "@supernova-studio/model";
|
|
2
|
-
import { z } from "zod";
|
|
3
|
-
|
|
4
|
-
export const PageBlockEditorModel = PageBlockEditorModelV2;
|
|
5
|
-
export type PageBlockEditorModel = z.infer<typeof PageBlockEditorModel>;
|
|
6
|
-
|
|
7
|
-
export const PageSectionEditorModel = PageSectionEditorModelV2;
|
|
8
|
-
export type PageSectionEditorModel = z.infer<typeof PageSectionEditorModel>;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { DocumentationPageContentItem } from "@supernova-studio/model";
|
|
2
|
-
import { z } from "zod";
|
|
3
|
-
|
|
4
|
-
export const DocumentationPageEditorModel = z.object({
|
|
5
|
-
blocks: z.array(DocumentationPageContentItem),
|
|
6
|
-
});
|
|
7
|
-
|
|
8
|
-
export type DocumentationPageEditorModel = z.infer<typeof DocumentationPageEditorModel>;
|
|
@@ -1,657 +0,0 @@
|
|
|
1
|
-
import { Schema } from "prosemirror-model";
|
|
2
|
-
|
|
3
|
-
const newSchema = {
|
|
4
|
-
nodes: {
|
|
5
|
-
paragraph: {
|
|
6
|
-
content: "inline*",
|
|
7
|
-
group: "block",
|
|
8
|
-
attrs: {
|
|
9
|
-
id: {
|
|
10
|
-
default: null,
|
|
11
|
-
},
|
|
12
|
-
definitionId: {
|
|
13
|
-
default: "io.supernova.block.rich-text",
|
|
14
|
-
},
|
|
15
|
-
variantId: {
|
|
16
|
-
default: "default",
|
|
17
|
-
},
|
|
18
|
-
},
|
|
19
|
-
parseDOM: [
|
|
20
|
-
{
|
|
21
|
-
tag: "p",
|
|
22
|
-
},
|
|
23
|
-
],
|
|
24
|
-
},
|
|
25
|
-
reactComponent: {
|
|
26
|
-
group: "block",
|
|
27
|
-
atom: true,
|
|
28
|
-
draggable: true,
|
|
29
|
-
attrs: {
|
|
30
|
-
count: {
|
|
31
|
-
default: 0,
|
|
32
|
-
},
|
|
33
|
-
},
|
|
34
|
-
parseDOM: [
|
|
35
|
-
{
|
|
36
|
-
tag: "react-component",
|
|
37
|
-
},
|
|
38
|
-
],
|
|
39
|
-
},
|
|
40
|
-
tableRow: {
|
|
41
|
-
tableRole: "row",
|
|
42
|
-
content: "(tableCell | tableHeader)*",
|
|
43
|
-
parseDOM: [
|
|
44
|
-
{
|
|
45
|
-
tag: "tr",
|
|
46
|
-
},
|
|
47
|
-
],
|
|
48
|
-
},
|
|
49
|
-
table: {
|
|
50
|
-
tableRole: "table",
|
|
51
|
-
content: "tableRow+",
|
|
52
|
-
group: "defaultTable",
|
|
53
|
-
isolating: true,
|
|
54
|
-
parseDOM: [
|
|
55
|
-
{
|
|
56
|
-
tag: "table",
|
|
57
|
-
},
|
|
58
|
-
],
|
|
59
|
-
},
|
|
60
|
-
tableCell: {
|
|
61
|
-
tableRole: "cell",
|
|
62
|
-
content: "block+",
|
|
63
|
-
isolating: true,
|
|
64
|
-
attrs: {
|
|
65
|
-
id: {
|
|
66
|
-
default: null,
|
|
67
|
-
},
|
|
68
|
-
textAlign: {
|
|
69
|
-
default: "left",
|
|
70
|
-
},
|
|
71
|
-
colspan: {
|
|
72
|
-
default: 1,
|
|
73
|
-
},
|
|
74
|
-
rowspan: {
|
|
75
|
-
default: 1,
|
|
76
|
-
},
|
|
77
|
-
colwidth: {
|
|
78
|
-
default: null,
|
|
79
|
-
},
|
|
80
|
-
},
|
|
81
|
-
parseDOM: [
|
|
82
|
-
{
|
|
83
|
-
tag: "td",
|
|
84
|
-
},
|
|
85
|
-
],
|
|
86
|
-
},
|
|
87
|
-
tableHeader: {
|
|
88
|
-
tableRole: "header_cell",
|
|
89
|
-
content: "block+",
|
|
90
|
-
isolating: true,
|
|
91
|
-
attrs: {
|
|
92
|
-
id: {
|
|
93
|
-
default: null,
|
|
94
|
-
},
|
|
95
|
-
textAlign: {
|
|
96
|
-
default: "left",
|
|
97
|
-
},
|
|
98
|
-
colspan: {
|
|
99
|
-
default: 1,
|
|
100
|
-
},
|
|
101
|
-
rowspan: {
|
|
102
|
-
default: 1,
|
|
103
|
-
},
|
|
104
|
-
colwidth: {
|
|
105
|
-
default: null,
|
|
106
|
-
},
|
|
107
|
-
},
|
|
108
|
-
parseDOM: [
|
|
109
|
-
{
|
|
110
|
-
tag: "th",
|
|
111
|
-
},
|
|
112
|
-
],
|
|
113
|
-
},
|
|
114
|
-
tableContainer: {
|
|
115
|
-
content: "table",
|
|
116
|
-
group: "block",
|
|
117
|
-
atom: true,
|
|
118
|
-
draggable: false,
|
|
119
|
-
defining: true,
|
|
120
|
-
attrs: {
|
|
121
|
-
id: {
|
|
122
|
-
default: null,
|
|
123
|
-
},
|
|
124
|
-
definitionId: {
|
|
125
|
-
default: "io.supernova.block.table",
|
|
126
|
-
},
|
|
127
|
-
variantId: {
|
|
128
|
-
default: "default",
|
|
129
|
-
},
|
|
130
|
-
hasBorder: {
|
|
131
|
-
default: true,
|
|
132
|
-
},
|
|
133
|
-
},
|
|
134
|
-
parseDOM: [
|
|
135
|
-
{
|
|
136
|
-
tag: "tableContainer",
|
|
137
|
-
},
|
|
138
|
-
],
|
|
139
|
-
},
|
|
140
|
-
hardBreak: {
|
|
141
|
-
group: "inline",
|
|
142
|
-
inline: true,
|
|
143
|
-
selectable: false,
|
|
144
|
-
parseDOM: [
|
|
145
|
-
{
|
|
146
|
-
tag: "br",
|
|
147
|
-
},
|
|
148
|
-
],
|
|
149
|
-
},
|
|
150
|
-
text: {
|
|
151
|
-
group: "inline",
|
|
152
|
-
},
|
|
153
|
-
heading: {
|
|
154
|
-
content: "inline*",
|
|
155
|
-
group: "block",
|
|
156
|
-
defining: true,
|
|
157
|
-
attrs: {
|
|
158
|
-
id: {
|
|
159
|
-
default: null,
|
|
160
|
-
},
|
|
161
|
-
level: {
|
|
162
|
-
default: 1,
|
|
163
|
-
},
|
|
164
|
-
definitionId: {
|
|
165
|
-
default: null,
|
|
166
|
-
},
|
|
167
|
-
variantId: {
|
|
168
|
-
default: null,
|
|
169
|
-
},
|
|
170
|
-
},
|
|
171
|
-
parseDOM: [
|
|
172
|
-
{
|
|
173
|
-
tag: "h1",
|
|
174
|
-
attrs: {
|
|
175
|
-
level: 1,
|
|
176
|
-
definitionId: "io.supernova.block.title1",
|
|
177
|
-
variantId: "default",
|
|
178
|
-
},
|
|
179
|
-
},
|
|
180
|
-
{
|
|
181
|
-
tag: "h2",
|
|
182
|
-
attrs: {
|
|
183
|
-
level: 2,
|
|
184
|
-
definitionId: "io.supernova.block.title2",
|
|
185
|
-
variantId: "default",
|
|
186
|
-
},
|
|
187
|
-
},
|
|
188
|
-
{
|
|
189
|
-
tag: "h3",
|
|
190
|
-
attrs: {
|
|
191
|
-
level: 3,
|
|
192
|
-
definitionId: "io.supernova.block.title3",
|
|
193
|
-
variantId: "default",
|
|
194
|
-
},
|
|
195
|
-
},
|
|
196
|
-
{
|
|
197
|
-
tag: "h4",
|
|
198
|
-
attrs: {
|
|
199
|
-
level: 4,
|
|
200
|
-
definitionId: "io.supernova.block.title4",
|
|
201
|
-
variantId: "default",
|
|
202
|
-
},
|
|
203
|
-
},
|
|
204
|
-
{
|
|
205
|
-
tag: "h5",
|
|
206
|
-
attrs: {
|
|
207
|
-
level: 5,
|
|
208
|
-
definitionId: "io.supernova.block.title5",
|
|
209
|
-
variantId: "default",
|
|
210
|
-
},
|
|
211
|
-
},
|
|
212
|
-
],
|
|
213
|
-
},
|
|
214
|
-
listItem: {
|
|
215
|
-
content: "paragraph list{0,1}",
|
|
216
|
-
defining: true,
|
|
217
|
-
attrs: {
|
|
218
|
-
id: {
|
|
219
|
-
default: null,
|
|
220
|
-
},
|
|
221
|
-
},
|
|
222
|
-
parseDOM: [
|
|
223
|
-
{
|
|
224
|
-
tag: "li",
|
|
225
|
-
},
|
|
226
|
-
],
|
|
227
|
-
},
|
|
228
|
-
orderedList: {
|
|
229
|
-
content: "listItem+",
|
|
230
|
-
group: "block list",
|
|
231
|
-
attrs: {
|
|
232
|
-
id: {
|
|
233
|
-
default: null,
|
|
234
|
-
},
|
|
235
|
-
definitionId: {
|
|
236
|
-
default: "io.supernova.block.ordered-list",
|
|
237
|
-
},
|
|
238
|
-
variantId: {
|
|
239
|
-
default: "default",
|
|
240
|
-
},
|
|
241
|
-
start: {
|
|
242
|
-
default: 1,
|
|
243
|
-
},
|
|
244
|
-
},
|
|
245
|
-
parseDOM: [
|
|
246
|
-
{
|
|
247
|
-
tag: "ol",
|
|
248
|
-
},
|
|
249
|
-
],
|
|
250
|
-
},
|
|
251
|
-
bulletList: {
|
|
252
|
-
content: "listItem+",
|
|
253
|
-
group: "block list",
|
|
254
|
-
attrs: {
|
|
255
|
-
id: {
|
|
256
|
-
default: null,
|
|
257
|
-
},
|
|
258
|
-
definitionId: {
|
|
259
|
-
default: "io.supernova.block.unordered-list",
|
|
260
|
-
},
|
|
261
|
-
variantId: {
|
|
262
|
-
default: "default",
|
|
263
|
-
},
|
|
264
|
-
},
|
|
265
|
-
parseDOM: [
|
|
266
|
-
{
|
|
267
|
-
tag: "ul",
|
|
268
|
-
},
|
|
269
|
-
],
|
|
270
|
-
},
|
|
271
|
-
horizontalRule: {
|
|
272
|
-
group: "block",
|
|
273
|
-
attrs: {
|
|
274
|
-
id: {
|
|
275
|
-
default: null,
|
|
276
|
-
},
|
|
277
|
-
definitionId: {
|
|
278
|
-
default: "io.supernova.block.divider",
|
|
279
|
-
},
|
|
280
|
-
variantId: {
|
|
281
|
-
default: "default",
|
|
282
|
-
},
|
|
283
|
-
},
|
|
284
|
-
parseDOM: [
|
|
285
|
-
{
|
|
286
|
-
tag: "div.node-horizontalRule",
|
|
287
|
-
},
|
|
288
|
-
{
|
|
289
|
-
tag: "hr",
|
|
290
|
-
},
|
|
291
|
-
],
|
|
292
|
-
},
|
|
293
|
-
blockquote: {
|
|
294
|
-
content: "inline*",
|
|
295
|
-
group: "block",
|
|
296
|
-
draggable: true,
|
|
297
|
-
defining: true,
|
|
298
|
-
attrs: {
|
|
299
|
-
id: {
|
|
300
|
-
default: null,
|
|
301
|
-
},
|
|
302
|
-
definitionId: {
|
|
303
|
-
default: "io.supernova.block.blockquote",
|
|
304
|
-
},
|
|
305
|
-
variantId: {
|
|
306
|
-
default: "default",
|
|
307
|
-
},
|
|
308
|
-
},
|
|
309
|
-
parseDOM: [
|
|
310
|
-
{
|
|
311
|
-
tag: "blockquote",
|
|
312
|
-
},
|
|
313
|
-
],
|
|
314
|
-
},
|
|
315
|
-
plainSection: {
|
|
316
|
-
content: "sectionItem",
|
|
317
|
-
group: "section",
|
|
318
|
-
atom: true,
|
|
319
|
-
draggable: false,
|
|
320
|
-
isolating: true,
|
|
321
|
-
attrs: {
|
|
322
|
-
id: {
|
|
323
|
-
default: null,
|
|
324
|
-
},
|
|
325
|
-
},
|
|
326
|
-
parseDOM: [
|
|
327
|
-
{
|
|
328
|
-
tag: "section",
|
|
329
|
-
attrs: {
|
|
330
|
-
"data-section-type": "plain",
|
|
331
|
-
},
|
|
332
|
-
},
|
|
333
|
-
],
|
|
334
|
-
},
|
|
335
|
-
tabsSection: {
|
|
336
|
-
content: "sectionItem+",
|
|
337
|
-
group: "section",
|
|
338
|
-
atom: true,
|
|
339
|
-
draggable: false,
|
|
340
|
-
isolating: true,
|
|
341
|
-
attrs: {
|
|
342
|
-
id: {
|
|
343
|
-
default: null,
|
|
344
|
-
},
|
|
345
|
-
variantId: {
|
|
346
|
-
default: null,
|
|
347
|
-
},
|
|
348
|
-
},
|
|
349
|
-
parseDOM: [
|
|
350
|
-
{
|
|
351
|
-
tag: "div",
|
|
352
|
-
},
|
|
353
|
-
],
|
|
354
|
-
},
|
|
355
|
-
sectionItem: {
|
|
356
|
-
content: "sectionItemColumn{1, 3}",
|
|
357
|
-
group: "sectionItem",
|
|
358
|
-
atom: true,
|
|
359
|
-
selectable: false,
|
|
360
|
-
draggable: false,
|
|
361
|
-
isolating: true,
|
|
362
|
-
attrs: {
|
|
363
|
-
id: {
|
|
364
|
-
default: null,
|
|
365
|
-
},
|
|
366
|
-
title: {
|
|
367
|
-
default: "",
|
|
368
|
-
},
|
|
369
|
-
},
|
|
370
|
-
parseDOM: [
|
|
371
|
-
{
|
|
372
|
-
tag: "section-item",
|
|
373
|
-
},
|
|
374
|
-
],
|
|
375
|
-
},
|
|
376
|
-
sectionItemColumn: {
|
|
377
|
-
content: "block+",
|
|
378
|
-
group: "sectionItemColumn",
|
|
379
|
-
atom: true,
|
|
380
|
-
selectable: false,
|
|
381
|
-
draggable: false,
|
|
382
|
-
isolating: true,
|
|
383
|
-
attrs: {
|
|
384
|
-
id: {
|
|
385
|
-
default: null,
|
|
386
|
-
},
|
|
387
|
-
},
|
|
388
|
-
parseDOM: [
|
|
389
|
-
{
|
|
390
|
-
tag: "section-item-column",
|
|
391
|
-
},
|
|
392
|
-
],
|
|
393
|
-
},
|
|
394
|
-
doc: {
|
|
395
|
-
content: "(block|section)+",
|
|
396
|
-
},
|
|
397
|
-
callout: {
|
|
398
|
-
content: "inline*",
|
|
399
|
-
group: "block",
|
|
400
|
-
draggable: true,
|
|
401
|
-
defining: true,
|
|
402
|
-
attrs: {
|
|
403
|
-
id: {
|
|
404
|
-
default: null,
|
|
405
|
-
},
|
|
406
|
-
definitionId: {
|
|
407
|
-
default: "io.supernova.block.callout",
|
|
408
|
-
},
|
|
409
|
-
variantId: {
|
|
410
|
-
default: "default",
|
|
411
|
-
},
|
|
412
|
-
type: {
|
|
413
|
-
default: "neutral",
|
|
414
|
-
},
|
|
415
|
-
},
|
|
416
|
-
parseDOM: [
|
|
417
|
-
{
|
|
418
|
-
tag: "callout",
|
|
419
|
-
},
|
|
420
|
-
],
|
|
421
|
-
},
|
|
422
|
-
blockNode: {
|
|
423
|
-
group: "block",
|
|
424
|
-
atom: true,
|
|
425
|
-
draggable: true,
|
|
426
|
-
attrs: {
|
|
427
|
-
id: {
|
|
428
|
-
default: null,
|
|
429
|
-
},
|
|
430
|
-
definitionId: {
|
|
431
|
-
default: null,
|
|
432
|
-
},
|
|
433
|
-
variantId: {
|
|
434
|
-
default: null,
|
|
435
|
-
},
|
|
436
|
-
appearance: {
|
|
437
|
-
default: "{}",
|
|
438
|
-
},
|
|
439
|
-
columns: {
|
|
440
|
-
default: 1,
|
|
441
|
-
},
|
|
442
|
-
items: {
|
|
443
|
-
default: "[]",
|
|
444
|
-
},
|
|
445
|
-
},
|
|
446
|
-
parseDOM: [
|
|
447
|
-
{
|
|
448
|
-
tag: "block-node",
|
|
449
|
-
},
|
|
450
|
-
],
|
|
451
|
-
},
|
|
452
|
-
embed: {
|
|
453
|
-
group: "block",
|
|
454
|
-
draggable: true,
|
|
455
|
-
defining: true,
|
|
456
|
-
attrs: {
|
|
457
|
-
id: {
|
|
458
|
-
default: null,
|
|
459
|
-
},
|
|
460
|
-
definitionId: {
|
|
461
|
-
default: null,
|
|
462
|
-
},
|
|
463
|
-
variantId: {
|
|
464
|
-
default: null,
|
|
465
|
-
},
|
|
466
|
-
type: {
|
|
467
|
-
default: "youtube",
|
|
468
|
-
},
|
|
469
|
-
url: {
|
|
470
|
-
default: null,
|
|
471
|
-
},
|
|
472
|
-
height: {
|
|
473
|
-
default: null,
|
|
474
|
-
},
|
|
475
|
-
},
|
|
476
|
-
},
|
|
477
|
-
image: {
|
|
478
|
-
group: "block",
|
|
479
|
-
atom: true,
|
|
480
|
-
draggable: true,
|
|
481
|
-
attrs: {
|
|
482
|
-
id: {
|
|
483
|
-
default: null,
|
|
484
|
-
},
|
|
485
|
-
definitionId: {
|
|
486
|
-
default: null,
|
|
487
|
-
},
|
|
488
|
-
variantId: {
|
|
489
|
-
default: null,
|
|
490
|
-
},
|
|
491
|
-
appearance: {
|
|
492
|
-
default: "{}",
|
|
493
|
-
},
|
|
494
|
-
columns: {
|
|
495
|
-
default: 1,
|
|
496
|
-
},
|
|
497
|
-
items: {
|
|
498
|
-
default: "[]",
|
|
499
|
-
},
|
|
500
|
-
},
|
|
501
|
-
parseDOM: [
|
|
502
|
-
{
|
|
503
|
-
tag: "block-node",
|
|
504
|
-
},
|
|
505
|
-
],
|
|
506
|
-
},
|
|
507
|
-
},
|
|
508
|
-
marks: {
|
|
509
|
-
link: {
|
|
510
|
-
name: "link",
|
|
511
|
-
rank: 0,
|
|
512
|
-
spec: {
|
|
513
|
-
inclusive: true,
|
|
514
|
-
attrs: {
|
|
515
|
-
href: {
|
|
516
|
-
default: null,
|
|
517
|
-
},
|
|
518
|
-
target: {
|
|
519
|
-
default: "_blank",
|
|
520
|
-
},
|
|
521
|
-
rel: {
|
|
522
|
-
default: "noopener noreferrer nofollow",
|
|
523
|
-
},
|
|
524
|
-
class: {
|
|
525
|
-
default: null,
|
|
526
|
-
},
|
|
527
|
-
itemId: {
|
|
528
|
-
default: null,
|
|
529
|
-
},
|
|
530
|
-
},
|
|
531
|
-
parseDOM: [
|
|
532
|
-
{
|
|
533
|
-
tag: 'a[href]:not([href *= "javascript:" i])',
|
|
534
|
-
},
|
|
535
|
-
],
|
|
536
|
-
},
|
|
537
|
-
attrs: {
|
|
538
|
-
href: {
|
|
539
|
-
hasDefault: true,
|
|
540
|
-
default: null,
|
|
541
|
-
},
|
|
542
|
-
target: {
|
|
543
|
-
hasDefault: true,
|
|
544
|
-
default: "_blank",
|
|
545
|
-
},
|
|
546
|
-
rel: {
|
|
547
|
-
hasDefault: true,
|
|
548
|
-
default: "noopener noreferrer nofollow",
|
|
549
|
-
},
|
|
550
|
-
class: {
|
|
551
|
-
hasDefault: true,
|
|
552
|
-
default: null,
|
|
553
|
-
},
|
|
554
|
-
itemId: {
|
|
555
|
-
hasDefault: true,
|
|
556
|
-
default: null,
|
|
557
|
-
},
|
|
558
|
-
},
|
|
559
|
-
instance: {
|
|
560
|
-
type: "link",
|
|
561
|
-
attrs: {
|
|
562
|
-
href: null,
|
|
563
|
-
target: "_blank",
|
|
564
|
-
rel: "noopener noreferrer nofollow",
|
|
565
|
-
class: null,
|
|
566
|
-
itemId: null,
|
|
567
|
-
},
|
|
568
|
-
},
|
|
569
|
-
},
|
|
570
|
-
bold: {
|
|
571
|
-
name: "bold",
|
|
572
|
-
rank: 1,
|
|
573
|
-
spec: {
|
|
574
|
-
parseDOM: [
|
|
575
|
-
{
|
|
576
|
-
tag: "strong",
|
|
577
|
-
},
|
|
578
|
-
{
|
|
579
|
-
tag: "b",
|
|
580
|
-
},
|
|
581
|
-
{
|
|
582
|
-
style: "font-weight",
|
|
583
|
-
},
|
|
584
|
-
],
|
|
585
|
-
},
|
|
586
|
-
attrs: {},
|
|
587
|
-
instance: {
|
|
588
|
-
type: "bold",
|
|
589
|
-
},
|
|
590
|
-
},
|
|
591
|
-
code: {
|
|
592
|
-
name: "code",
|
|
593
|
-
rank: 2,
|
|
594
|
-
spec: {
|
|
595
|
-
excludes: "_",
|
|
596
|
-
code: true,
|
|
597
|
-
parseDOM: [
|
|
598
|
-
{
|
|
599
|
-
tag: "code",
|
|
600
|
-
},
|
|
601
|
-
],
|
|
602
|
-
},
|
|
603
|
-
attrs: {},
|
|
604
|
-
instance: {
|
|
605
|
-
type: "code",
|
|
606
|
-
},
|
|
607
|
-
},
|
|
608
|
-
italic: {
|
|
609
|
-
name: "italic",
|
|
610
|
-
rank: 3,
|
|
611
|
-
spec: {
|
|
612
|
-
parseDOM: [
|
|
613
|
-
{
|
|
614
|
-
tag: "em",
|
|
615
|
-
},
|
|
616
|
-
{
|
|
617
|
-
tag: "i",
|
|
618
|
-
},
|
|
619
|
-
{
|
|
620
|
-
style: "font-style=italic",
|
|
621
|
-
},
|
|
622
|
-
],
|
|
623
|
-
},
|
|
624
|
-
attrs: {},
|
|
625
|
-
instance: {
|
|
626
|
-
type: "italic",
|
|
627
|
-
},
|
|
628
|
-
},
|
|
629
|
-
strike: {
|
|
630
|
-
name: "strike",
|
|
631
|
-
rank: 4,
|
|
632
|
-
spec: {
|
|
633
|
-
parseDOM: [
|
|
634
|
-
{
|
|
635
|
-
tag: "s",
|
|
636
|
-
},
|
|
637
|
-
{
|
|
638
|
-
tag: "del",
|
|
639
|
-
},
|
|
640
|
-
{
|
|
641
|
-
tag: "strike",
|
|
642
|
-
},
|
|
643
|
-
{
|
|
644
|
-
style: "text-decoration",
|
|
645
|
-
consuming: false,
|
|
646
|
-
},
|
|
647
|
-
],
|
|
648
|
-
},
|
|
649
|
-
attrs: {},
|
|
650
|
-
instance: {
|
|
651
|
-
type: "strike",
|
|
652
|
-
},
|
|
653
|
-
},
|
|
654
|
-
},
|
|
655
|
-
} as const;
|
|
656
|
-
|
|
657
|
-
export const pmSchema = new Schema(newSchema);
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { PageBlockItemUntypedValue } from "@supernova-studio/model";
|
|
2
|
-
|
|
3
|
-
export type ProsemirrorNode = {
|
|
4
|
-
type: string;
|
|
5
|
-
text?: string;
|
|
6
|
-
attrs?: Record<string, any>;
|
|
7
|
-
marks?: ProsemirrorMark[];
|
|
8
|
-
content?: ProsemirrorNode[];
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
export type ProsemirrorMark = {
|
|
12
|
-
type: string;
|
|
13
|
-
attrs: Record<string, any>;
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
export type ProsemirrorBlockItem = {
|
|
17
|
-
id: string;
|
|
18
|
-
props: Record<string, PageBlockItemUntypedValue>;
|
|
19
|
-
};
|