@supernova-studio/client 0.10.2 → 0.11.0

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 CHANGED
@@ -2731,11 +2731,11 @@ var DocumentationHierarchyV2DTO = _zod.z.object({
2731
2731
  // src/api/requests/post-bulk-doc-page-elements.ts
2732
2732
 
2733
2733
  var CreateBulkElementsInput = _zod.z.object({
2734
+ parentPersistentId: _zod.z.string().uuid(),
2734
2735
  persistentId: _zod.z.string().uuid(),
2735
2736
  title: _zod.z.string(),
2736
- configuration: DocumentationItemConfiguration,
2737
- parentPersistentId: _zod.z.string().nullish(),
2738
- afterPersistentId: _zod.z.string().nullish()
2737
+ configuration: DocumentationItemConfiguration.optional(),
2738
+ afterPersistentId: _zod.z.string().uuid().optional()
2739
2739
  });
2740
2740
  var UpdateBulkElementsInput = _zod.z.object({
2741
2741
  id: _zod.z.string(),
@@ -2749,7 +2749,7 @@ var DuplicateBulkElementsInput = _zod.z.object({
2749
2749
  id: _zod.z.string(),
2750
2750
  persistentId: _zod.z.string().uuid(),
2751
2751
  parentPersistentId: _zod.z.string().uuid(),
2752
- afterPersistentId: _zod.z.string().uuid().nullish()
2752
+ afterPersistentId: _zod.z.string().uuid().optional()
2753
2753
  });
2754
2754
  var BulkEditDocPageElementsInput = _zod.z.object({
2755
2755
  documentationPages: _zod.z.object({
@@ -2864,1116 +2864,517 @@ var _prosemirrormodel = require('prosemirror-model');
2864
2864
  var newSchema = {
2865
2865
  nodes: {
2866
2866
  paragraph: {
2867
- name: "paragraph",
2868
- spec: {
2869
- content: "inline*",
2870
- group: "block",
2871
- attrs: {
2872
- id: {
2873
- default: null
2874
- },
2875
- definitionId: {
2876
- default: "io.supernova.block.rich-text"
2877
- },
2878
- variantId: {
2879
- default: "default"
2880
- }
2881
- },
2882
- parseDOM: [
2883
- {
2884
- tag: "p"
2885
- }
2886
- ]
2887
- },
2888
- markSet: null,
2889
- groups: ["block"],
2867
+ content: "inline*",
2868
+ group: "block",
2890
2869
  attrs: {
2891
2870
  id: {
2892
- hasDefault: true,
2893
2871
  default: null
2894
2872
  },
2895
2873
  definitionId: {
2896
- hasDefault: true,
2897
2874
  default: "io.supernova.block.rich-text"
2898
2875
  },
2899
2876
  variantId: {
2900
- hasDefault: true,
2901
2877
  default: "default"
2902
2878
  }
2903
2879
  },
2904
- defaultAttrs: {
2905
- id: null,
2906
- definitionId: "io.supernova.block.rich-text",
2907
- variantId: "default"
2908
- },
2909
- contentMatch: {
2910
- validEnd: true,
2911
- wrapCache: []
2912
- },
2913
- inlineContent: true,
2914
- isBlock: true,
2915
- isText: false
2880
+ parseDOM: [
2881
+ {
2882
+ tag: "p"
2883
+ }
2884
+ ]
2916
2885
  },
2917
2886
  reactComponent: {
2918
- name: "reactComponent",
2919
- spec: {
2920
- group: "block",
2921
- atom: true,
2922
- draggable: true,
2923
- attrs: {
2924
- count: {
2925
- default: 0
2926
- }
2927
- },
2928
- parseDOM: [
2929
- {
2930
- tag: "react-component"
2931
- }
2932
- ]
2933
- },
2934
- markSet: [],
2935
- groups: ["block"],
2887
+ group: "block",
2888
+ atom: true,
2889
+ draggable: true,
2936
2890
  attrs: {
2937
2891
  count: {
2938
- hasDefault: true,
2939
2892
  default: 0
2940
2893
  }
2941
2894
  },
2942
- defaultAttrs: {
2943
- count: 0
2944
- },
2945
- contentMatch: {
2946
- validEnd: true,
2947
- wrapCache: []
2948
- },
2949
- inlineContent: false,
2950
- isBlock: true,
2951
- isText: false
2895
+ parseDOM: [
2896
+ {
2897
+ tag: "react-component"
2898
+ }
2899
+ ]
2952
2900
  },
2953
2901
  tableRow: {
2954
- name: "tableRow",
2955
- spec: {
2956
- tableRole: "row",
2957
- content: "(tableCell | tableHeader)*",
2958
- parseDOM: [
2959
- {
2960
- tag: "tr"
2961
- }
2962
- ]
2963
- },
2964
- markSet: [],
2965
- groups: [],
2966
- attrs: {},
2967
- defaultAttrs: {},
2968
- contentMatch: {
2969
- validEnd: true,
2970
- wrapCache: []
2971
- },
2972
- inlineContent: false,
2973
- isBlock: true,
2974
- isText: false
2902
+ tableRole: "row",
2903
+ content: "(tableCell | tableHeader)*",
2904
+ parseDOM: [
2905
+ {
2906
+ tag: "tr"
2907
+ }
2908
+ ]
2975
2909
  },
2976
2910
  table: {
2977
- name: "table",
2978
- spec: {
2979
- tableRole: "table",
2980
- content: "tableRow+",
2981
- group: "defaultTable",
2982
- isolating: true,
2983
- parseDOM: [
2984
- {
2985
- tag: "table"
2986
- }
2987
- ]
2988
- },
2989
- markSet: [],
2990
- groups: ["defaultTable"],
2991
- attrs: {},
2992
- defaultAttrs: {},
2993
- contentMatch: {
2994
- validEnd: false,
2995
- wrapCache: []
2996
- },
2997
- inlineContent: false,
2998
- isBlock: true,
2999
- isText: false
2911
+ tableRole: "table",
2912
+ content: "tableRow+",
2913
+ group: "defaultTable",
2914
+ isolating: true,
2915
+ parseDOM: [
2916
+ {
2917
+ tag: "table"
2918
+ }
2919
+ ]
3000
2920
  },
3001
2921
  tableCell: {
3002
- name: "tableCell",
3003
- spec: {
3004
- tableRole: "cell",
3005
- content: "(paragraph|image)+",
3006
- isolating: true,
3007
- attrs: {
3008
- id: {
3009
- default: null
3010
- },
3011
- textAlign: {
3012
- default: "left"
3013
- },
3014
- colspan: {
3015
- default: 1
3016
- },
3017
- rowspan: {
3018
- default: 1
3019
- },
3020
- colwidth: {
3021
- default: null
3022
- }
3023
- },
3024
- parseDOM: [
3025
- {
3026
- tag: "td"
3027
- }
3028
- ]
3029
- },
3030
- markSet: [],
3031
- groups: [],
2922
+ tableRole: "cell",
2923
+ content: "block+",
2924
+ isolating: true,
3032
2925
  attrs: {
3033
2926
  id: {
3034
2927
  default: null
3035
2928
  },
3036
2929
  textAlign: {
3037
- hasDefault: true,
3038
2930
  default: "left"
3039
2931
  },
3040
2932
  colspan: {
3041
- hasDefault: true,
3042
2933
  default: 1
3043
2934
  },
3044
2935
  rowspan: {
3045
- hasDefault: true,
3046
2936
  default: 1
3047
2937
  },
3048
2938
  colwidth: {
3049
- hasDefault: true,
3050
2939
  default: null
3051
2940
  }
3052
2941
  },
3053
- defaultAttrs: {
3054
- id: null,
3055
- textAlign: "left",
3056
- colspan: 1,
3057
- rowspan: 1,
3058
- colwidth: null
3059
- },
3060
- contentMatch: {
3061
- validEnd: false,
3062
- wrapCache: []
3063
- },
3064
- inlineContent: false,
3065
- isBlock: true,
3066
- isText: false
2942
+ parseDOM: [
2943
+ {
2944
+ tag: "td"
2945
+ }
2946
+ ]
3067
2947
  },
3068
2948
  tableHeader: {
3069
- name: "tableHeader",
3070
- spec: {
3071
- tableRole: "header_cell",
3072
- content: "(paragraph|image)+",
3073
- isolating: true,
3074
- attrs: {
3075
- id: {
3076
- default: null
3077
- },
3078
- textAlign: {
3079
- default: "left"
3080
- },
3081
- colspan: {
3082
- default: 1
3083
- },
3084
- rowspan: {
3085
- default: 1
3086
- },
3087
- colwidth: {
3088
- default: null
3089
- }
3090
- },
3091
- parseDOM: [
3092
- {
3093
- tag: "th"
3094
- }
3095
- ]
3096
- },
3097
- markSet: [],
3098
- groups: [],
2949
+ tableRole: "header_cell",
2950
+ content: "block+",
2951
+ isolating: true,
3099
2952
  attrs: {
3100
2953
  id: {
3101
2954
  default: null
3102
2955
  },
3103
2956
  textAlign: {
3104
- hasDefault: true,
3105
2957
  default: "left"
3106
2958
  },
3107
2959
  colspan: {
3108
- hasDefault: true,
3109
2960
  default: 1
3110
2961
  },
3111
2962
  rowspan: {
3112
- hasDefault: true,
3113
2963
  default: 1
3114
2964
  },
3115
2965
  colwidth: {
3116
- hasDefault: true,
3117
2966
  default: null
3118
2967
  }
3119
2968
  },
3120
- defaultAttrs: {
3121
- id: null,
3122
- textAlign: "left",
3123
- colspan: 1,
3124
- rowspan: 1,
3125
- colwidth: null
3126
- },
3127
- contentMatch: {
3128
- validEnd: false,
3129
- wrapCache: []
3130
- },
3131
- inlineContent: false,
3132
- isBlock: true,
3133
- isText: false
2969
+ parseDOM: [
2970
+ {
2971
+ tag: "th"
2972
+ }
2973
+ ]
3134
2974
  },
3135
2975
  tableContainer: {
3136
- name: "tableContainer",
3137
- spec: {
3138
- content: "table",
3139
- group: "block",
3140
- atom: true,
3141
- draggable: false,
3142
- defining: true,
3143
- attrs: {
3144
- id: {
3145
- default: null
3146
- },
3147
- definitionId: {
3148
- default: "io.supernova.block.table"
3149
- },
3150
- variantId: {
3151
- default: "default"
3152
- },
3153
- hasBorder: {
3154
- default: true
3155
- }
3156
- },
3157
- parseDOM: [
3158
- {
3159
- tag: "tableContainer"
3160
- }
3161
- ]
3162
- },
3163
- markSet: [],
3164
- groups: ["block"],
2976
+ content: "table",
2977
+ group: "block",
2978
+ atom: true,
2979
+ draggable: false,
2980
+ defining: true,
3165
2981
  attrs: {
3166
2982
  id: {
3167
- hasDefault: true,
3168
2983
  default: null
3169
2984
  },
3170
2985
  definitionId: {
3171
- hasDefault: true,
3172
2986
  default: "io.supernova.block.table"
3173
2987
  },
3174
2988
  variantId: {
3175
- hasDefault: true,
3176
2989
  default: "default"
3177
2990
  },
3178
2991
  hasBorder: {
3179
- hasDefault: true,
3180
2992
  default: true
3181
2993
  }
3182
2994
  },
3183
- defaultAttrs: {
3184
- id: null,
3185
- definitionId: "io.supernova.block.table",
3186
- variantId: "default",
3187
- hasBorder: true
3188
- },
3189
- contentMatch: {
3190
- validEnd: false,
3191
- wrapCache: []
3192
- },
3193
- inlineContent: false,
3194
- isBlock: true,
3195
- isText: false
3196
- },
3197
- image: {
3198
- name: "image",
3199
- spec: {
3200
- group: "block",
3201
- inline: false,
3202
- draggable: true,
3203
- attrs: {
3204
- src: {
3205
- default: null
3206
- },
3207
- alt: {
3208
- default: null
3209
- },
3210
- title: {
3211
- default: null
3212
- }
3213
- },
3214
- parseDOM: [
3215
- {
3216
- tag: 'img[src]:not([src^="data:"])'
3217
- }
3218
- ]
3219
- },
3220
- markSet: [],
3221
- groups: ["block"],
3222
- attrs: {
3223
- src: {
3224
- hasDefault: true,
3225
- default: null
3226
- },
3227
- alt: {
3228
- hasDefault: true,
3229
- default: null
3230
- },
3231
- title: {
3232
- hasDefault: true,
3233
- default: null
3234
- }
3235
- },
3236
- defaultAttrs: {
3237
- src: null,
3238
- alt: null,
3239
- title: null
3240
- },
3241
- contentMatch: {
3242
- validEnd: true,
3243
- wrapCache: []
3244
- },
3245
- inlineContent: false,
3246
- isBlock: true,
3247
- isText: false
3248
- },
3249
- codeBlock: {
3250
- name: "codeBlock",
3251
- spec: {
3252
- content: "text*",
3253
- marks: "",
3254
- group: "block",
3255
- code: true,
3256
- defining: true,
3257
- attrs: {
3258
- language: {
3259
- default: null
3260
- }
3261
- },
3262
- parseDOM: [
3263
- {
3264
- tag: "pre",
3265
- preserveWhitespace: "full"
3266
- }
3267
- ]
3268
- },
3269
- markSet: [],
3270
- groups: ["block"],
3271
- attrs: {
3272
- language: {
3273
- hasDefault: true,
3274
- default: null
2995
+ parseDOM: [
2996
+ {
2997
+ tag: "tableContainer"
3275
2998
  }
3276
- },
3277
- defaultAttrs: {
3278
- language: null
3279
- },
3280
- contentMatch: {
3281
- validEnd: true,
3282
- wrapCache: []
3283
- },
3284
- inlineContent: true,
3285
- isBlock: true,
3286
- isText: false
2999
+ ]
3287
3000
  },
3288
3001
  hardBreak: {
3289
- name: "hardBreak",
3290
- spec: {
3291
- group: "inline",
3292
- inline: true,
3293
- selectable: false,
3294
- parseDOM: [
3295
- {
3296
- tag: "br"
3297
- }
3298
- ]
3299
- },
3300
- markSet: [],
3301
- groups: ["inline"],
3302
- attrs: {},
3303
- defaultAttrs: {},
3304
- contentMatch: {
3305
- validEnd: true,
3306
- wrapCache: []
3307
- },
3308
- inlineContent: false,
3309
- isBlock: false,
3310
- isText: false
3002
+ group: "inline",
3003
+ inline: true,
3004
+ selectable: false,
3005
+ parseDOM: [
3006
+ {
3007
+ tag: "br"
3008
+ }
3009
+ ]
3311
3010
  },
3312
3011
  text: {
3313
- name: "text",
3314
- spec: {
3315
- group: "inline"
3316
- },
3317
- markSet: [],
3318
- groups: ["inline"],
3319
- attrs: {},
3320
- defaultAttrs: {},
3321
- contentMatch: {
3322
- validEnd: true,
3323
- wrapCache: []
3324
- },
3325
- inlineContent: false,
3326
- isBlock: false,
3327
- isText: true
3012
+ group: "inline"
3328
3013
  },
3329
3014
  heading: {
3330
- name: "heading",
3331
- spec: {
3332
- content: "inline*",
3333
- group: "block",
3334
- defining: true,
3335
- attrs: {
3336
- id: {
3337
- default: null
3338
- },
3339
- level: {
3340
- default: 1
3341
- },
3342
- definitionId: {
3343
- default: null
3344
- },
3345
- variantId: {
3346
- default: null
3347
- }
3348
- },
3349
- parseDOM: [
3350
- {
3351
- tag: "h1",
3352
- attrs: {
3353
- level: 1,
3354
- definitionId: "io.supernova.block.title1",
3355
- variantId: "default"
3356
- }
3357
- },
3358
- {
3359
- tag: "h2",
3360
- attrs: {
3361
- level: 2,
3362
- definitionId: "io.supernova.block.title2",
3363
- variantId: "default"
3364
- }
3365
- },
3366
- {
3367
- tag: "h3",
3368
- attrs: {
3369
- level: 3,
3370
- definitionId: "io.supernova.block.title3",
3371
- variantId: "default"
3372
- }
3373
- },
3374
- {
3375
- tag: "h4",
3376
- attrs: {
3377
- level: 4,
3378
- definitionId: "io.supernova.block.title4",
3379
- variantId: "default"
3380
- }
3381
- },
3382
- {
3383
- tag: "h5",
3384
- attrs: {
3385
- level: 5,
3386
- definitionId: "io.supernova.block.title5",
3387
- variantId: "default"
3388
- }
3389
- }
3390
- ]
3391
- },
3392
- markSet: null,
3393
- groups: ["block"],
3015
+ content: "inline*",
3016
+ group: "block",
3017
+ defining: true,
3394
3018
  attrs: {
3395
3019
  id: {
3396
- hasDefault: true,
3397
3020
  default: null
3398
3021
  },
3399
3022
  level: {
3400
- hasDefault: true,
3401
3023
  default: 1
3402
3024
  },
3403
3025
  definitionId: {
3404
- hasDefault: true,
3405
3026
  default: null
3406
3027
  },
3407
3028
  variantId: {
3408
- hasDefault: true,
3409
3029
  default: null
3410
3030
  }
3411
3031
  },
3412
- defaultAttrs: {
3413
- id: null,
3414
- level: 1,
3415
- definitionId: null,
3416
- variantId: null
3417
- },
3418
- contentMatch: {
3419
- validEnd: true,
3420
- wrapCache: []
3421
- },
3422
- inlineContent: true,
3423
- isBlock: true,
3424
- isText: false
3425
- },
3426
- listItem: {
3427
- name: "listItem",
3428
- spec: {
3429
- content: "paragraph (paragraph | list)*",
3430
- defining: true,
3431
- attrs: {
3432
- id: {
3433
- default: null
3032
+ parseDOM: [
3033
+ {
3034
+ tag: "h1",
3035
+ attrs: {
3036
+ level: 1,
3037
+ definitionId: "io.supernova.block.title1",
3038
+ variantId: "default"
3434
3039
  }
3435
3040
  },
3436
- parseDOM: [
3437
- {
3438
- tag: "li"
3041
+ {
3042
+ tag: "h2",
3043
+ attrs: {
3044
+ level: 2,
3045
+ definitionId: "io.supernova.block.title2",
3046
+ variantId: "default"
3439
3047
  }
3440
- ]
3441
- },
3442
- markSet: [],
3443
- groups: [],
3048
+ },
3049
+ {
3050
+ tag: "h3",
3051
+ attrs: {
3052
+ level: 3,
3053
+ definitionId: "io.supernova.block.title3",
3054
+ variantId: "default"
3055
+ }
3056
+ },
3057
+ {
3058
+ tag: "h4",
3059
+ attrs: {
3060
+ level: 4,
3061
+ definitionId: "io.supernova.block.title4",
3062
+ variantId: "default"
3063
+ }
3064
+ },
3065
+ {
3066
+ tag: "h5",
3067
+ attrs: {
3068
+ level: 5,
3069
+ definitionId: "io.supernova.block.title5",
3070
+ variantId: "default"
3071
+ }
3072
+ }
3073
+ ]
3074
+ },
3075
+ listItem: {
3076
+ content: "paragraph list{0,1}",
3077
+ defining: true,
3444
3078
  attrs: {
3445
3079
  id: {
3446
- hasDefault: true,
3447
3080
  default: null
3448
3081
  }
3449
3082
  },
3450
- defaultAttrs: {
3451
- id: null
3452
- },
3453
- contentMatch: {
3454
- validEnd: false,
3455
- wrapCache: []
3456
- },
3457
- inlineContent: false,
3458
- isBlock: true,
3459
- isText: false
3083
+ parseDOM: [
3084
+ {
3085
+ tag: "li"
3086
+ }
3087
+ ]
3460
3088
  },
3461
3089
  orderedList: {
3462
- name: "orderedList",
3463
- spec: {
3464
- content: "listItem+",
3465
- group: "block list topLevel",
3466
- attrs: {
3467
- id: {
3468
- default: null
3469
- },
3470
- definitionId: {
3471
- default: "io.supernova.block.ordered-list"
3472
- },
3473
- variantId: {
3474
- default: "default"
3475
- },
3476
- start: {
3477
- default: 1
3478
- }
3479
- },
3480
- parseDOM: [
3481
- {
3482
- tag: "ol"
3483
- }
3484
- ]
3485
- },
3486
- markSet: [],
3487
- groups: ["block", "list", "topLevel"],
3090
+ content: "listItem+",
3091
+ group: "block list",
3488
3092
  attrs: {
3489
3093
  id: {
3490
- hasDefault: true,
3491
3094
  default: null
3492
3095
  },
3493
3096
  definitionId: {
3494
- hasDefault: true,
3495
3097
  default: "io.supernova.block.ordered-list"
3496
3098
  },
3497
3099
  variantId: {
3498
- hasDefault: true,
3499
3100
  default: "default"
3500
3101
  },
3501
3102
  start: {
3502
- hasDefault: true,
3503
3103
  default: 1
3504
3104
  }
3505
3105
  },
3506
- defaultAttrs: {
3507
- id: null,
3508
- definitionId: "io.supernova.block.ordered-list",
3509
- variantId: "default",
3510
- start: 1
3511
- },
3512
- contentMatch: {
3513
- validEnd: false,
3514
- wrapCache: []
3515
- },
3516
- inlineContent: false,
3517
- isBlock: true,
3518
- isText: false
3106
+ parseDOM: [
3107
+ {
3108
+ tag: "ol"
3109
+ }
3110
+ ]
3519
3111
  },
3520
3112
  bulletList: {
3521
- name: "bulletList",
3522
- spec: {
3523
- content: "listItem+",
3524
- group: "block list topLevel",
3525
- attrs: {
3526
- id: {
3527
- default: null
3528
- },
3529
- definitionId: {
3530
- default: "io.supernova.block.unordered-list"
3531
- },
3532
- variantId: {
3533
- default: "default"
3534
- }
3535
- },
3536
- parseDOM: [
3537
- {
3538
- tag: "ul"
3539
- }
3540
- ]
3541
- },
3542
- markSet: [],
3543
- groups: ["block", "list", "topLevel"],
3113
+ content: "listItem+",
3114
+ group: "block list",
3544
3115
  attrs: {
3545
3116
  id: {
3546
- hasDefault: true,
3547
3117
  default: null
3548
3118
  },
3549
3119
  definitionId: {
3550
- hasDefault: true,
3551
3120
  default: "io.supernova.block.unordered-list"
3552
3121
  },
3553
3122
  variantId: {
3554
- hasDefault: true,
3555
3123
  default: "default"
3556
3124
  }
3557
3125
  },
3558
- defaultAttrs: {
3559
- id: null,
3560
- definitionId: "io.supernova.block.unordered-list",
3561
- variantId: "default"
3562
- },
3563
- contentMatch: {
3564
- validEnd: false,
3565
- wrapCache: []
3566
- },
3567
- inlineContent: false,
3568
- isBlock: true,
3569
- isText: false
3126
+ parseDOM: [
3127
+ {
3128
+ tag: "ul"
3129
+ }
3130
+ ]
3570
3131
  },
3571
3132
  horizontalRule: {
3572
- name: "horizontalRule",
3573
- spec: {
3574
- group: "block",
3575
- attrs: {
3576
- id: {
3577
- default: null
3578
- },
3579
- definitionId: {
3580
- default: "io.supernova.block.divider"
3581
- },
3582
- variantId: {
3583
- default: "default"
3584
- }
3585
- },
3586
- parseDOM: [
3587
- {
3588
- tag: "div.node-horizontalRule"
3589
- },
3590
- {
3591
- tag: "hr"
3592
- }
3593
- ]
3594
- },
3595
- markSet: [],
3596
- groups: ["block"],
3133
+ group: "block",
3597
3134
  attrs: {
3598
3135
  id: {
3599
- hasDefault: true,
3600
3136
  default: null
3601
3137
  },
3602
3138
  definitionId: {
3603
- hasDefault: true,
3604
3139
  default: "io.supernova.block.divider"
3605
3140
  },
3606
3141
  variantId: {
3607
- hasDefault: true,
3608
3142
  default: "default"
3609
3143
  }
3610
3144
  },
3611
- defaultAttrs: {
3612
- id: null,
3613
- definitionId: "io.supernova.block.divider",
3614
- variantId: "default"
3615
- },
3616
- contentMatch: {
3617
- validEnd: true,
3618
- wrapCache: []
3619
- },
3620
- inlineContent: false,
3621
- isBlock: true,
3622
- isText: false
3623
- },
3624
- blockquote: {
3625
- name: "blockquote",
3626
- spec: {
3627
- content: "paragraph+",
3628
- group: "block",
3629
- defining: true,
3630
- attrs: {
3631
- id: {
3632
- hasDefault: true,
3633
- default: null
3634
- },
3635
- definitionId: {
3636
- default: "io.supernova.block.blockquote"
3637
- },
3638
- variantId: {
3639
- default: "default"
3640
- }
3145
+ parseDOM: [
3146
+ {
3147
+ tag: "div.node-horizontalRule"
3641
3148
  },
3642
- parseDOM: [
3643
- {
3644
- tag: "blockquote"
3645
- }
3646
- ]
3647
- },
3648
- markSet: [],
3649
- groups: ["block"],
3149
+ {
3150
+ tag: "hr"
3151
+ }
3152
+ ]
3153
+ },
3154
+ blockquote: {
3155
+ content: "inline*",
3156
+ group: "block",
3157
+ draggable: true,
3158
+ defining: true,
3650
3159
  attrs: {
3651
3160
  id: {
3652
3161
  default: null
3653
3162
  },
3654
3163
  definitionId: {
3655
- hasDefault: true,
3656
3164
  default: "io.supernova.block.blockquote"
3657
3165
  },
3658
3166
  variantId: {
3659
- hasDefault: true,
3660
3167
  default: "default"
3661
3168
  }
3662
3169
  },
3663
- defaultAttrs: {
3664
- id: null,
3665
- definitionId: "io.supernova.block.blockquote",
3666
- variantId: "default"
3667
- },
3668
- contentMatch: {
3669
- validEnd: false,
3670
- wrapCache: []
3671
- },
3672
- inlineContent: false,
3673
- isBlock: true,
3674
- isText: false
3170
+ parseDOM: [
3171
+ {
3172
+ tag: "blockquote"
3173
+ }
3174
+ ]
3675
3175
  },
3676
3176
  plainSection: {
3677
- name: "plainSection",
3678
- spec: {
3679
- content: "sectionItem",
3680
- group: "section topLevel",
3681
- atom: true,
3682
- draggable: false,
3683
- isolating: true,
3684
- attrs: {
3685
- id: {
3686
- default: null
3687
- }
3688
- },
3689
- parseDOM: [
3690
- {
3691
- tag: "section",
3692
- attrs: {
3693
- "data-section-type": "plain"
3694
- }
3695
- }
3696
- ]
3697
- },
3698
- markSet: [],
3699
- groups: ["section", "topLevel"],
3177
+ content: "sectionItem",
3178
+ group: "section",
3179
+ atom: true,
3180
+ draggable: false,
3181
+ isolating: true,
3700
3182
  attrs: {
3701
3183
  id: {
3702
- hasDefault: true,
3703
3184
  default: null
3704
3185
  }
3705
3186
  },
3706
- defaultAttrs: {
3707
- id: null
3708
- },
3709
- contentMatch: {
3710
- validEnd: false,
3711
- wrapCache: []
3712
- },
3713
- inlineContent: false,
3714
- isBlock: true,
3715
- isText: false
3187
+ parseDOM: [
3188
+ {
3189
+ tag: "section",
3190
+ attrs: {
3191
+ "data-section-type": "plain"
3192
+ }
3193
+ }
3194
+ ]
3716
3195
  },
3717
3196
  tabsSection: {
3718
- name: "tabsSection",
3719
- spec: {
3720
- content: "sectionItem+",
3721
- group: "section topLevel",
3722
- atom: true,
3723
- draggable: false,
3724
- isolating: true,
3725
- attrs: {
3726
- id: {
3727
- default: null
3728
- }
3729
- },
3730
- parseDOM: [
3731
- {
3732
- tag: "div"
3733
- }
3734
- ]
3735
- },
3736
- markSet: [],
3737
- groups: ["section", "topLevel"],
3197
+ content: "sectionItem+",
3198
+ group: "section",
3199
+ atom: true,
3200
+ draggable: false,
3201
+ isolating: true,
3738
3202
  attrs: {
3739
3203
  id: {
3740
- hasDefault: true,
3741
3204
  default: null
3742
3205
  }
3743
3206
  },
3744
- defaultAttrs: {
3745
- id: null
3746
- },
3747
- contentMatch: {
3748
- validEnd: false,
3749
- wrapCache: []
3750
- },
3751
- inlineContent: false,
3752
- isBlock: true,
3753
- isText: false
3207
+ parseDOM: [
3208
+ {
3209
+ tag: "div"
3210
+ }
3211
+ ]
3754
3212
  },
3755
3213
  sectionItem: {
3756
- name: "sectionItem",
3757
- spec: {
3758
- content: "sectionItemColumn{1, 3}",
3759
- group: "sectionItem",
3760
- atom: true,
3761
- selectable: false,
3762
- draggable: false,
3763
- isolating: true,
3764
- attrs: {
3765
- id: {
3766
- default: null
3767
- },
3768
- title: {
3769
- default: ""
3770
- }
3771
- },
3772
- parseDOM: [
3773
- {
3774
- tag: "section-item"
3775
- }
3776
- ]
3777
- },
3778
- markSet: [],
3779
- groups: ["sectionItem"],
3214
+ content: "sectionItemColumn{1, 3}",
3215
+ group: "sectionItem",
3216
+ atom: true,
3217
+ selectable: false,
3218
+ draggable: false,
3219
+ isolating: true,
3780
3220
  attrs: {
3781
3221
  id: {
3782
- hasDefault: true,
3783
3222
  default: null
3784
3223
  },
3785
3224
  title: {
3786
- hasDefault: true,
3787
3225
  default: ""
3788
3226
  }
3789
3227
  },
3790
- defaultAttrs: {
3791
- id: null,
3792
- title: ""
3793
- },
3794
- contentMatch: {
3795
- validEnd: false,
3796
- wrapCache: []
3797
- },
3798
- inlineContent: false,
3799
- isBlock: true,
3800
- isText: false
3228
+ parseDOM: [
3229
+ {
3230
+ tag: "section-item"
3231
+ }
3232
+ ]
3801
3233
  },
3802
3234
  sectionItemColumn: {
3803
- name: "sectionItemColumn",
3804
- spec: {
3805
- content: "block+",
3806
- group: "sectionItemColumn",
3807
- atom: true,
3808
- selectable: false,
3809
- draggable: false,
3810
- isolating: true,
3811
- attrs: {
3812
- id: {
3813
- default: null
3814
- }
3815
- },
3816
- parseDOM: [
3817
- {
3818
- tag: "section-item-column"
3819
- }
3820
- ]
3821
- },
3822
- markSet: [],
3823
- groups: ["sectionItemColumn"],
3235
+ content: "block+",
3236
+ group: "sectionItemColumn",
3237
+ atom: true,
3238
+ selectable: false,
3239
+ draggable: false,
3240
+ isolating: true,
3824
3241
  attrs: {
3825
3242
  id: {
3826
- hasDefault: true,
3827
3243
  default: null
3828
3244
  }
3829
3245
  },
3830
- defaultAttrs: {
3831
- id: null
3832
- },
3833
- contentMatch: {
3834
- validEnd: false,
3835
- wrapCache: []
3836
- },
3837
- inlineContent: false,
3838
- isBlock: true,
3839
- isText: false
3246
+ parseDOM: [
3247
+ {
3248
+ tag: "section-item-column"
3249
+ }
3250
+ ]
3840
3251
  },
3841
3252
  doc: {
3842
- name: "doc",
3843
- spec: {
3844
- content: "(block|section)+"
3845
- },
3846
- markSet: [],
3847
- groups: [],
3848
- attrs: {},
3849
- defaultAttrs: {},
3850
- contentMatch: {
3851
- validEnd: false,
3852
- wrapCache: []
3853
- },
3854
- inlineContent: false,
3855
- isBlock: true,
3856
- isText: false
3253
+ content: "(block|section)+"
3857
3254
  },
3858
3255
  callout: {
3859
- name: "callout",
3860
- spec: {
3861
- content: "inline*",
3862
- group: "block topLevel",
3863
- draggable: true,
3864
- defining: true,
3865
- attrs: {
3866
- id: {
3867
- default: null
3868
- },
3869
- definitionId: {
3870
- default: "io.supernova.block.callout"
3871
- },
3872
- variantId: {
3873
- default: "default"
3874
- },
3875
- type: {
3876
- default: "neutral"
3877
- }
3878
- },
3879
- parseDOM: [
3880
- {
3881
- tag: "callout"
3882
- }
3883
- ]
3884
- },
3885
- markSet: null,
3886
- groups: ["block", "topLevel"],
3256
+ content: "inline*",
3257
+ group: "block",
3258
+ draggable: true,
3259
+ defining: true,
3887
3260
  attrs: {
3888
3261
  id: {
3889
- hasDefault: true,
3890
3262
  default: null
3891
3263
  },
3892
3264
  definitionId: {
3893
- hasDefault: true,
3894
3265
  default: "io.supernova.block.callout"
3895
3266
  },
3896
3267
  variantId: {
3897
- hasDefault: true,
3898
3268
  default: "default"
3899
3269
  },
3900
3270
  type: {
3901
- hasDefault: true,
3902
3271
  default: "neutral"
3903
3272
  }
3904
3273
  },
3905
- defaultAttrs: {
3906
- id: null,
3907
- definitionId: "io.supernova.block.callout",
3908
- variantId: "default",
3909
- type: "neutral"
3910
- },
3911
- contentMatch: {
3912
- validEnd: true,
3913
- wrapCache: []
3914
- },
3915
- inlineContent: true,
3916
- isBlock: true,
3917
- isText: false
3274
+ parseDOM: [
3275
+ {
3276
+ tag: "callout"
3277
+ }
3278
+ ]
3918
3279
  },
3919
3280
  blockNode: {
3920
- name: "blockNode",
3281
+ group: "block",
3282
+ atom: true,
3283
+ draggable: true,
3284
+ attrs: {
3285
+ id: {
3286
+ default: null
3287
+ },
3288
+ definitionId: {
3289
+ default: null
3290
+ },
3291
+ variantId: {
3292
+ default: null
3293
+ },
3294
+ appearance: {
3295
+ default: "{}"
3296
+ },
3297
+ columns: {
3298
+ default: 1
3299
+ },
3300
+ items: {
3301
+ default: "[]"
3302
+ }
3303
+ },
3304
+ parseDOM: [
3305
+ {
3306
+ tag: "block-node"
3307
+ }
3308
+ ]
3309
+ },
3310
+ embed: {
3311
+ group: "block",
3312
+ draggable: true,
3313
+ defining: true,
3314
+ attrs: {
3315
+ id: {
3316
+ default: null
3317
+ },
3318
+ definitionId: {
3319
+ default: null
3320
+ },
3321
+ variantId: {
3322
+ default: null
3323
+ },
3324
+ type: {
3325
+ default: "youtube"
3326
+ },
3327
+ url: {
3328
+ default: null
3329
+ },
3330
+ height: {
3331
+ default: null
3332
+ }
3333
+ }
3334
+ },
3335
+ image: {
3336
+ name: "image",
3921
3337
  spec: {
3922
3338
  group: "block",
3923
- atom: true,
3339
+ inline: false,
3340
+ draggable: true,
3924
3341
  attrs: {
3925
- id: {
3342
+ src: {
3926
3343
  default: null
3927
3344
  },
3928
- definitionId: {
3345
+ alt: {
3929
3346
  default: null
3930
3347
  },
3931
- variantId: {
3348
+ title: {
3932
3349
  default: null
3933
- },
3934
- columns: {
3935
- default: 1
3936
- },
3937
- items: {
3938
- default: "[]"
3939
3350
  }
3940
3351
  },
3941
3352
  parseDOM: [
3942
3353
  {
3943
- tag: "block-node"
3354
+ tag: 'img[src]:not([src^="data:"])'
3944
3355
  }
3945
3356
  ]
3946
3357
  },
3947
3358
  markSet: [],
3948
3359
  groups: ["block"],
3949
3360
  attrs: {
3950
- id: {
3361
+ src: {
3951
3362
  hasDefault: true,
3952
3363
  default: null
3953
3364
  },
3954
- definitionId: {
3365
+ alt: {
3955
3366
  hasDefault: true,
3956
3367
  default: null
3957
3368
  },
3958
- variantId: {
3369
+ title: {
3959
3370
  hasDefault: true,
3960
3371
  default: null
3961
- },
3962
- columns: {
3963
- hasDefault: true,
3964
- default: 1
3965
- },
3966
- items: {
3967
- hasDefault: true,
3968
- default: "[]"
3969
3372
  }
3970
3373
  },
3971
3374
  defaultAttrs: {
3972
- id: null,
3973
- definitionId: null,
3974
- variantId: null,
3975
- columns: 1,
3976
- items: "[]"
3375
+ src: null,
3376
+ alt: null,
3377
+ title: null
3977
3378
  },
3978
3379
  contentMatch: {
3979
3380
  validEnd: true,
@@ -4266,18 +3667,6 @@ function blockToProsemirrorNode(block, definition) {
4266
3667
  property: tableProperty
4267
3668
  });
4268
3669
  }
4269
- const embedProperty = BlockDefinitionUtils.firstEmbedProperty(definition);
4270
- const embedType = serializeEmbedType(block.data.packageId);
4271
- if (embedProperty && embedType) {
4272
- return serializeAsEmbed(
4273
- {
4274
- block,
4275
- definition,
4276
- property: embedProperty
4277
- },
4278
- embedType
4279
- );
4280
- }
4281
3670
  if (block.data.packageId === "io.supernova.block.divider") {
4282
3671
  return serializeAsDivider({
4283
3672
  block,
@@ -4361,7 +3750,7 @@ function serializeAsMultiRichTextBlock(input) {
4361
3750
  }
4362
3751
  function serializeAsMultiParagraph(input) {
4363
3752
  return {
4364
- type: "bulletlist",
3753
+ type: "bulletList",
4365
3754
  attrs: {
4366
3755
  ...serializeBlockNodeAttributes(input)
4367
3756
  },
@@ -4370,7 +3759,7 @@ function serializeAsMultiParagraph(input) {
4370
3759
  }
4371
3760
  function serializeAsOrderedList(input) {
4372
3761
  return {
4373
- type: "orderedlist",
3762
+ type: "orderedList",
4374
3763
  attrs: {
4375
3764
  ...serializeBlockNodeAttributes(input),
4376
3765
  start: "1"
@@ -4380,7 +3769,7 @@ function serializeAsOrderedList(input) {
4380
3769
  }
4381
3770
  function serializeAsUnorderedList(input) {
4382
3771
  return {
4383
- type: "bulletlist",
3772
+ type: "bulletList",
4384
3773
  attrs: {
4385
3774
  ...serializeBlockNodeAttributes(input)
4386
3775
  },
@@ -4389,7 +3778,7 @@ function serializeAsUnorderedList(input) {
4389
3778
  }
4390
3779
  function serializeAsListItem(text) {
4391
3780
  return {
4392
- type: "listitem",
3781
+ type: "listItem",
4393
3782
  content: [
4394
3783
  {
4395
3784
  type: "paragraph",
@@ -4476,32 +3865,6 @@ function serializeTableNode(node) {
4476
3865
  };
4477
3866
  }
4478
3867
  }
4479
- function serializeAsEmbed(input, embedType) {
4480
- const { block, definition, property: embedProperty } = input;
4481
- const blockItem = BlockParsingUtils.singleBlockItem(block);
4482
- const embedValue = BlockParsingUtils.embedPropertyValue(blockItem, embedProperty.id);
4483
- return {
4484
- type: "embed",
4485
- attrs: {
4486
- ...serializeBlockNodeAttributes(input),
4487
- type: embedType,
4488
- url: embedValue.value,
4489
- height: embedValue.height,
4490
- caption: embedValue.caption
4491
- }
4492
- };
4493
- }
4494
- function serializeEmbedType(blockDefinitionId) {
4495
- switch (blockDefinitionId) {
4496
- case "io.supernova.block.embed":
4497
- return "generic";
4498
- case "io.supernova.block.embed-youtube":
4499
- return "youtube";
4500
- case "io.supernova.block.embed-figma":
4501
- return "figma";
4502
- }
4503
- return void 0;
4504
- }
4505
3868
  function serializeAsDivider(input) {
4506
3869
  return {
4507
3870
  type: "horizontalRule",
@@ -4621,7 +3984,7 @@ function serializeAsCustomBlock(block, definition) {
4621
3984
  attrs: {
4622
3985
  id: block.id,
4623
3986
  definitionId: block.data.packageId,
4624
- variantId: block.data.variantId,
3987
+ ...block.data.variantId && { variantId: block.data.variantId },
4625
3988
  items: JSON.stringify(items),
4626
3989
  ...columns && { columns }
4627
3990
  }
@@ -7166,10 +6529,6 @@ function prosemirrorNodeToBlock(prosemirrorNode, definition) {
7166
6529
  if (multiRichTextProperty) {
7167
6530
  return parseAsMultiRichText(prosemirrorNode, definition, multiRichTextProperty);
7168
6531
  }
7169
- const embedProperty = BlockDefinitionUtils.firstEmbedProperty(definition);
7170
- if (prosemirrorNode.type === "embed" && embedProperty) {
7171
- return parseAsEmbed(prosemirrorNode, definition, embedProperty);
7172
- }
7173
6532
  const tableProperty = BlockDefinitionUtils.firstTableProperty(definition);
7174
6533
  if (tableProperty) {
7175
6534
  return parseAsTable(prosemirrorNode, definition, tableProperty);
@@ -7243,7 +6602,7 @@ function parseAsMultiRichText(prosemirrorNode, definition, property) {
7243
6602
  [property.id]: {
7244
6603
  // Required
7245
6604
  value: (_nullishCoalesce(prosemirrorNode.content, () => ( []))).map((listItem) => {
7246
- if (listItem.type !== "listitem")
6605
+ if (listItem.type !== "listItem")
7247
6606
  return null;
7248
6607
  if (!_optionalChain([listItem, 'access', _11 => _11.content, 'optionalAccess', _12 => _12.length]))
7249
6608
  return parseRichText([]);
@@ -7329,6 +6688,7 @@ function parseAsTable(prosemirrorNode, definition, property) {
7329
6688
  data: {
7330
6689
  packageId: "io.supernova.block.table",
7331
6690
  indentLevel: 0,
6691
+ variantId: "default",
7332
6692
  ...variantId && { variantId },
7333
6693
  items: [
7334
6694
  {
@@ -7439,35 +6799,6 @@ function emptyTableCellContent() {
7439
6799
  }
7440
6800
  ];
7441
6801
  }
7442
- function parseAsEmbed(prosemirrorNode, definition, property) {
7443
- const id = getProsemirrorBlockId(prosemirrorNode);
7444
- if (!id)
7445
- return null;
7446
- const variantId = getProsemirrorBlockVariantId(prosemirrorNode);
7447
- const url = getProsemirrorAttribute(prosemirrorNode, "url", _zod.z.string().optional());
7448
- const caption = getProsemirrorAttribute(prosemirrorNode, "caption", _zod.z.string().optional());
7449
- const height = getProsemirrorAttribute(prosemirrorNode, "height", _zod.z.number().optional());
7450
- return {
7451
- id,
7452
- data: {
7453
- packageId: definition.id,
7454
- indentLevel: 0,
7455
- ...variantId && { variantId },
7456
- items: [
7457
- {
7458
- id,
7459
- props: {
7460
- [property.id]: {
7461
- value: url,
7462
- caption,
7463
- height: _nullishCoalesce(height, () => ( 200))
7464
- }
7465
- }
7466
- }
7467
- ]
7468
- }
7469
- };
7470
- }
7471
6802
  function parseAsDivider(prosemirrorNode, definition) {
7472
6803
  const id = getProsemirrorBlockId(prosemirrorNode);
7473
6804
  if (!id)
@@ -7552,7 +6883,7 @@ function parseItem(rawItem, definition) {
7552
6883
  }
7553
6884
  return {
7554
6885
  id: parsedItem.data.id,
7555
- linksTo: parsedItem.data.linksTo,
6886
+ ...parsedItem.data.linksTo && { linksTo: parsedItem.data.linksTo },
7556
6887
  props: sanitizedProps
7557
6888
  };
7558
6889
  }