document-model.js 3.1.0 → 3.3.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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://cdn.jsdelivr.net/npm/document-schema.js@3.1.0/schemas/content-document.schema.json",
3
+ "$id": "https://cdn.jsdelivr.net/npm/document-schema.js@3.3.0/schemas/content-document.schema.json",
4
4
  "oneOf": [
5
5
  {
6
6
  "type": "object",
@@ -46,6 +46,9 @@
46
46
  },
47
47
  "additionalProperties": false
48
48
  },
49
+ "symbolTable": {
50
+ "$ref": "#/$defs/SymbolTable"
51
+ },
49
52
  "sections": {
50
53
  "type": "array",
51
54
  "items": {
@@ -165,6 +168,9 @@
165
168
  },
166
169
  "additionalProperties": false
167
170
  },
171
+ "symbolTable": {
172
+ "$ref": "#/$defs/SymbolTable"
173
+ },
168
174
  "slides": {
169
175
  "type": "array",
170
176
  "items": {
@@ -373,6 +379,9 @@
373
379
  },
374
380
  "additionalProperties": false
375
381
  },
382
+ "symbolTable": {
383
+ "$ref": "#/$defs/SymbolTable"
384
+ },
376
385
  "sheets": {
377
386
  "type": "array",
378
387
  "items": {
@@ -1384,7 +1393,7 @@
1384
1393
  ]
1385
1394
  },
1386
1395
  "document": {
1387
- "$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@3.1.0/schemas/content-document.schema.json"
1396
+ "$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@3.3.0/schemas/content-document.schema.json"
1388
1397
  },
1389
1398
  "frame": {
1390
1399
  "$ref": "#/$defs/Box"
@@ -1479,6 +1488,9 @@
1479
1488
  },
1480
1489
  "additionalProperties": false
1481
1490
  },
1491
+ "symbolTable": {
1492
+ "$ref": "#/$defs/SymbolTable"
1493
+ },
1482
1494
  "pages": {
1483
1495
  "type": "array",
1484
1496
  "items": {
@@ -2448,23 +2460,11 @@
2448
2460
  },
2449
2461
  "additionalProperties": false
2450
2462
  },
2463
+ "symbolTable": {
2464
+ "$ref": "#/$defs/SymbolTable"
2465
+ },
2451
2466
  "formula": {
2452
- "type": "object",
2453
- "properties": {
2454
- "mathml": {
2455
- "type": "array",
2456
- "items": {
2457
- "$ref": "#/$defs/MathMlNode"
2458
- }
2459
- },
2460
- "starMath": {
2461
- "type": "string"
2462
- }
2463
- },
2464
- "required": [
2465
- "mathml"
2466
- ],
2467
- "additionalProperties": false
2467
+ "$ref": "#/$defs/ContentFormula"
2468
2468
  }
2469
2469
  },
2470
2470
  "required": [
@@ -2630,7 +2630,6 @@
2630
2630
  }
2631
2631
  },
2632
2632
  "required": [
2633
- "numId",
2634
2633
  "level"
2635
2634
  ],
2636
2635
  "additionalProperties": false
@@ -2923,7 +2922,7 @@
2923
2922
  ]
2924
2923
  },
2925
2924
  "document": {
2926
- "$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@3.1.0/schemas/content-document.schema.json"
2925
+ "$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@3.3.0/schemas/content-document.schema.json"
2927
2926
  },
2928
2927
  "frame": {
2929
2928
  "$ref": "#/$defs/Box"
@@ -3126,6 +3125,460 @@
3126
3125
  "$ref": "#/$defs/MathMlElement"
3127
3126
  }
3128
3127
  ]
3128
+ },
3129
+ "ContentFormula": {
3130
+ "type": "object",
3131
+ "properties": {
3132
+ "mathml": {
3133
+ "type": "array",
3134
+ "items": {
3135
+ "$ref": "#/$defs/MathMlNode"
3136
+ }
3137
+ },
3138
+ "starMath": {
3139
+ "type": "string"
3140
+ },
3141
+ "presentation": {
3142
+ "$ref": "#/$defs/MathPresentation"
3143
+ },
3144
+ "content": {
3145
+ "$ref": "#/$defs/MathExpression"
3146
+ },
3147
+ "provenance": {
3148
+ "$ref": "#/$defs/MathProvenance"
3149
+ }
3150
+ },
3151
+ "required": [
3152
+ "mathml"
3153
+ ],
3154
+ "additionalProperties": false
3155
+ },
3156
+ "ExactRational": {
3157
+ "type": "object",
3158
+ "properties": {
3159
+ "numerator": {
3160
+ "type": "string",
3161
+ "pattern": "^(0|-?[1-9]\\d*)$"
3162
+ },
3163
+ "denominator": {
3164
+ "type": "string",
3165
+ "pattern": "^[1-9]\\d*$"
3166
+ }
3167
+ },
3168
+ "required": [
3169
+ "numerator",
3170
+ "denominator"
3171
+ ],
3172
+ "additionalProperties": false
3173
+ },
3174
+ "DimensionVector": {
3175
+ "type": "object",
3176
+ "propertyNames": {
3177
+ "type": "string",
3178
+ "enum": [
3179
+ "length",
3180
+ "mass",
3181
+ "time",
3182
+ "electricCurrent",
3183
+ "thermodynamicTemperature",
3184
+ "amountOfSubstance",
3185
+ "luminousIntensity"
3186
+ ]
3187
+ },
3188
+ "additionalProperties": {
3189
+ "type": "integer",
3190
+ "minimum": -9007199254740991,
3191
+ "maximum": 9007199254740991
3192
+ }
3193
+ },
3194
+ "MathPresentation": {
3195
+ "type": "object",
3196
+ "properties": {
3197
+ "latex": {
3198
+ "type": "string"
3199
+ }
3200
+ },
3201
+ "required": [
3202
+ "latex"
3203
+ ],
3204
+ "additionalProperties": false
3205
+ },
3206
+ "MathProvenance": {
3207
+ "type": "object",
3208
+ "properties": {
3209
+ "source": {
3210
+ "type": "string"
3211
+ },
3212
+ "pageRef": {
3213
+ "type": "string"
3214
+ },
3215
+ "editTrail": {
3216
+ "type": "array",
3217
+ "items": {
3218
+ "type": "string"
3219
+ }
3220
+ }
3221
+ },
3222
+ "required": [
3223
+ "source",
3224
+ "editTrail"
3225
+ ],
3226
+ "additionalProperties": false
3227
+ },
3228
+ "MathUncertainty": {
3229
+ "type": "object",
3230
+ "properties": {
3231
+ "magnitude": {
3232
+ "$ref": "#/$defs/ExactRational"
3233
+ },
3234
+ "unit": {
3235
+ "type": "string"
3236
+ },
3237
+ "coverageFactor": {
3238
+ "type": "number",
3239
+ "exclusiveMinimum": 0
3240
+ }
3241
+ },
3242
+ "required": [
3243
+ "magnitude"
3244
+ ],
3245
+ "additionalProperties": false
3246
+ },
3247
+ "MathSymbolEntry": {
3248
+ "type": "object",
3249
+ "properties": {
3250
+ "glyph": {
3251
+ "type": "string"
3252
+ },
3253
+ "scope": {
3254
+ "type": "string"
3255
+ },
3256
+ "id": {
3257
+ "type": "string"
3258
+ },
3259
+ "quantityKind": {
3260
+ "type": "string"
3261
+ },
3262
+ "preferredUnit": {
3263
+ "type": "string"
3264
+ },
3265
+ "definitionSource": {
3266
+ "type": "string"
3267
+ }
3268
+ },
3269
+ "required": [
3270
+ "glyph",
3271
+ "scope",
3272
+ "id"
3273
+ ],
3274
+ "additionalProperties": false
3275
+ },
3276
+ "MathUnit": {
3277
+ "type": "object",
3278
+ "properties": {
3279
+ "id": {
3280
+ "type": "string"
3281
+ },
3282
+ "symbol": {
3283
+ "type": "string"
3284
+ },
3285
+ "name": {
3286
+ "type": "string"
3287
+ },
3288
+ "dimension": {
3289
+ "$ref": "#/$defs/DimensionVector"
3290
+ },
3291
+ "factorToSi": {
3292
+ "$ref": "#/$defs/ExactRational"
3293
+ },
3294
+ "offsetToSi": {
3295
+ "$ref": "#/$defs/ExactRational"
3296
+ },
3297
+ "context": {
3298
+ "type": "string"
3299
+ }
3300
+ },
3301
+ "required": [
3302
+ "id",
3303
+ "symbol",
3304
+ "dimension",
3305
+ "factorToSi"
3306
+ ],
3307
+ "additionalProperties": false
3308
+ },
3309
+ "MathNormalisationContext": {
3310
+ "type": "object",
3311
+ "properties": {
3312
+ "id": {
3313
+ "type": "string"
3314
+ },
3315
+ "bases": {
3316
+ "type": "array",
3317
+ "items": {
3318
+ "type": "object",
3319
+ "properties": {
3320
+ "unit": {
3321
+ "type": "string"
3322
+ },
3323
+ "value": {
3324
+ "$ref": "#/$defs/ExactRational"
3325
+ }
3326
+ },
3327
+ "required": [
3328
+ "unit",
3329
+ "value"
3330
+ ],
3331
+ "additionalProperties": false
3332
+ }
3333
+ }
3334
+ },
3335
+ "required": [
3336
+ "id",
3337
+ "bases"
3338
+ ],
3339
+ "additionalProperties": false
3340
+ },
3341
+ "SymbolTable": {
3342
+ "type": "object",
3343
+ "properties": {
3344
+ "symbols": {
3345
+ "type": "array",
3346
+ "items": {
3347
+ "$ref": "#/$defs/MathSymbolEntry"
3348
+ }
3349
+ },
3350
+ "units": {
3351
+ "type": "array",
3352
+ "items": {
3353
+ "$ref": "#/$defs/MathUnit"
3354
+ }
3355
+ },
3356
+ "contexts": {
3357
+ "type": "array",
3358
+ "items": {
3359
+ "$ref": "#/$defs/MathNormalisationContext"
3360
+ }
3361
+ }
3362
+ },
3363
+ "required": [
3364
+ "symbols",
3365
+ "units"
3366
+ ],
3367
+ "additionalProperties": false
3368
+ },
3369
+ "MathNum": {
3370
+ "type": "object",
3371
+ "properties": {
3372
+ "kind": {
3373
+ "type": "string",
3374
+ "const": "num"
3375
+ },
3376
+ "numerator": {
3377
+ "type": "string",
3378
+ "pattern": "^(0|-?[1-9]\\d*)$"
3379
+ },
3380
+ "denominator": {
3381
+ "type": "string",
3382
+ "pattern": "^[1-9]\\d*$"
3383
+ }
3384
+ },
3385
+ "required": [
3386
+ "kind",
3387
+ "numerator",
3388
+ "denominator"
3389
+ ],
3390
+ "additionalProperties": false
3391
+ },
3392
+ "MathQty": {
3393
+ "type": "object",
3394
+ "properties": {
3395
+ "kind": {
3396
+ "type": "string",
3397
+ "const": "qty"
3398
+ },
3399
+ "value": {
3400
+ "$ref": "#/$defs/ExactRational"
3401
+ },
3402
+ "unit": {
3403
+ "type": "string"
3404
+ },
3405
+ "uncertainty": {
3406
+ "$ref": "#/$defs/MathUncertainty"
3407
+ }
3408
+ },
3409
+ "required": [
3410
+ "kind",
3411
+ "value",
3412
+ "unit"
3413
+ ],
3414
+ "additionalProperties": false
3415
+ },
3416
+ "MathSym": {
3417
+ "type": "object",
3418
+ "properties": {
3419
+ "kind": {
3420
+ "type": "string",
3421
+ "const": "sym"
3422
+ },
3423
+ "id": {
3424
+ "type": "string"
3425
+ }
3426
+ },
3427
+ "required": [
3428
+ "kind",
3429
+ "id"
3430
+ ],
3431
+ "additionalProperties": false
3432
+ },
3433
+ "MathApp": {
3434
+ "type": "object",
3435
+ "properties": {
3436
+ "kind": {
3437
+ "type": "string",
3438
+ "const": "app"
3439
+ },
3440
+ "operator": {
3441
+ "type": "string"
3442
+ },
3443
+ "args": {
3444
+ "type": "array",
3445
+ "items": {
3446
+ "$ref": "#/$defs/MathExpression"
3447
+ }
3448
+ }
3449
+ },
3450
+ "required": [
3451
+ "kind",
3452
+ "operator",
3453
+ "args"
3454
+ ],
3455
+ "additionalProperties": false
3456
+ },
3457
+ "MathSum": {
3458
+ "type": "object",
3459
+ "properties": {
3460
+ "kind": {
3461
+ "type": "string",
3462
+ "const": "sum"
3463
+ },
3464
+ "binder": {
3465
+ "type": "string"
3466
+ },
3467
+ "lower": {
3468
+ "$ref": "#/$defs/MathExpression"
3469
+ },
3470
+ "upper": {
3471
+ "$ref": "#/$defs/MathExpression"
3472
+ },
3473
+ "body": {
3474
+ "$ref": "#/$defs/MathExpression"
3475
+ }
3476
+ },
3477
+ "required": [
3478
+ "kind",
3479
+ "binder",
3480
+ "lower",
3481
+ "upper",
3482
+ "body"
3483
+ ],
3484
+ "additionalProperties": false
3485
+ },
3486
+ "MathProd": {
3487
+ "type": "object",
3488
+ "properties": {
3489
+ "kind": {
3490
+ "type": "string",
3491
+ "const": "prod"
3492
+ },
3493
+ "binder": {
3494
+ "type": "string"
3495
+ },
3496
+ "lower": {
3497
+ "$ref": "#/$defs/MathExpression"
3498
+ },
3499
+ "upper": {
3500
+ "$ref": "#/$defs/MathExpression"
3501
+ },
3502
+ "body": {
3503
+ "$ref": "#/$defs/MathExpression"
3504
+ }
3505
+ },
3506
+ "required": [
3507
+ "kind",
3508
+ "binder",
3509
+ "lower",
3510
+ "upper",
3511
+ "body"
3512
+ ],
3513
+ "additionalProperties": false
3514
+ },
3515
+ "MathMatrix": {
3516
+ "type": "object",
3517
+ "properties": {
3518
+ "kind": {
3519
+ "type": "string",
3520
+ "const": "matrix"
3521
+ },
3522
+ "rows": {
3523
+ "type": "array",
3524
+ "items": {
3525
+ "type": "array",
3526
+ "items": {
3527
+ "$ref": "#/$defs/MathExpression"
3528
+ }
3529
+ }
3530
+ }
3531
+ },
3532
+ "required": [
3533
+ "kind",
3534
+ "rows"
3535
+ ],
3536
+ "additionalProperties": false
3537
+ },
3538
+ "MathUnparsed": {
3539
+ "type": "object",
3540
+ "properties": {
3541
+ "kind": {
3542
+ "type": "string",
3543
+ "const": "unparsed"
3544
+ },
3545
+ "latex": {
3546
+ "type": "string"
3547
+ }
3548
+ },
3549
+ "required": [
3550
+ "kind",
3551
+ "latex"
3552
+ ],
3553
+ "additionalProperties": false
3554
+ },
3555
+ "MathExpression": {
3556
+ "oneOf": [
3557
+ {
3558
+ "$ref": "#/$defs/MathNum"
3559
+ },
3560
+ {
3561
+ "$ref": "#/$defs/MathQty"
3562
+ },
3563
+ {
3564
+ "$ref": "#/$defs/MathSym"
3565
+ },
3566
+ {
3567
+ "$ref": "#/$defs/MathApp"
3568
+ },
3569
+ {
3570
+ "$ref": "#/$defs/MathSum"
3571
+ },
3572
+ {
3573
+ "$ref": "#/$defs/MathProd"
3574
+ },
3575
+ {
3576
+ "$ref": "#/$defs/MathMatrix"
3577
+ },
3578
+ {
3579
+ "$ref": "#/$defs/MathUnparsed"
3580
+ }
3581
+ ]
3129
3582
  }
3130
3583
  }
3131
3584
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://cdn.jsdelivr.net/npm/document-schema.js@3.1.0/schemas/document-package.schema.json",
3
+ "$id": "https://cdn.jsdelivr.net/npm/document-schema.js@3.3.0/schemas/document-package.schema.json",
4
4
  "type": "object",
5
5
  "properties": {
6
6
  "formatVersion": {
@@ -8,7 +8,7 @@
8
8
  "const": 2
9
9
  },
10
10
  "content": {
11
- "$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@3.1.0/schemas/content-document.schema.json"
11
+ "$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@3.3.0/schemas/content-document.schema.json"
12
12
  },
13
13
  "pages": {
14
14
  "type": "array",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://cdn.jsdelivr.net/npm/document-schema.js@3.1.0/schemas/layout-document.schema.json",
3
+ "$id": "https://cdn.jsdelivr.net/npm/document-schema.js@3.3.0/schemas/layout-document.schema.json",
4
4
  "type": "object",
5
5
  "properties": {
6
6
  "formatVersion": {