pro-editor-schema 0.1.1 → 0.1.12

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 CHANGED
@@ -381,7 +381,7 @@ declare const GROUP_ELEMENT_SCHEMAS: ReadonlyArray<Schema>;
381
381
 
382
382
  declare const FOOTNOTE_LINK_TAG = "FOOTNOTE1";
383
383
  declare const INLINEEQUATION_TAG = "INLINEEQUATION";
384
- declare const LINK_TAG = "LINK";
384
+ declare const LINK_TAG = "LINK1";
385
385
  declare const URI_TAG = "URI";
386
386
  declare const INLINE_ELEMENT_TAGS_ALLOWED_CHILDREN: {
387
387
  tagName: string;
package/dist/index.d.ts CHANGED
@@ -381,7 +381,7 @@ declare const GROUP_ELEMENT_SCHEMAS: ReadonlyArray<Schema>;
381
381
 
382
382
  declare const FOOTNOTE_LINK_TAG = "FOOTNOTE1";
383
383
  declare const INLINEEQUATION_TAG = "INLINEEQUATION";
384
- declare const LINK_TAG = "LINK";
384
+ declare const LINK_TAG = "LINK1";
385
385
  declare const URI_TAG = "URI";
386
386
  declare const INLINE_ELEMENT_TAGS_ALLOWED_CHILDREN: {
387
387
  tagName: string;
package/dist/index.js CHANGED
@@ -338,7 +338,7 @@ var COMMENT_QUERY_SECTION_SCHEMA = createSchema({
338
338
  // src/schema/elementSchemas/inlineElements/inlineElementsTags.ts
339
339
  var FOOTNOTE_LINK_TAG = "FOOTNOTE1";
340
340
  var INLINEEQUATION_TAG = "INLINEEQUATION";
341
- var LINK_TAG = "LINK";
341
+ var LINK_TAG = "LINK1";
342
342
  var URI_TAG = "URI";
343
343
  var INLINE_ELEMENT_TAGS_ALLOWED_CHILDREN = [
344
344
  { tagName: FOOTNOTE_LINK_TAG, required: false },
@@ -930,7 +930,10 @@ var FIGSOURCE_SCHEMA = createSchema({
930
930
  tag: FIGSOURCE_TAG,
931
931
  requiredAttributes: [...ID_ATTRS],
932
932
  optionalAttributes: [],
933
- allowedChildTagNames: [...ATOM_TAGS_ALLOWED_CHILDREN]
933
+ allowedChildTagNames: [
934
+ ...ATOM_TAGS_ALLOWED_CHILDREN,
935
+ ...INLINE_ELEMENT_TAGS_ALLOWED_CHILDREN
936
+ ]
934
937
  });
935
938
 
936
939
  // src/schema/elementSchemas/elements/figure/fignote.ts
@@ -939,7 +942,10 @@ var FIGNOTE_SCHEMA = createSchema({
939
942
  tag: FIGNOTE_TAG,
940
943
  requiredAttributes: [...ID_ATTRS],
941
944
  optionalAttributes: [],
942
- allowedChildTagNames: [...ATOM_TAGS_ALLOWED_CHILDREN]
945
+ allowedChildTagNames: [
946
+ ...ATOM_TAGS_ALLOWED_CHILDREN,
947
+ ...INLINE_ELEMENT_TAGS_ALLOWED_CHILDREN
948
+ ]
943
949
  });
944
950
 
945
951
  // src/schema/elementSchemas/elements/figure/figure.ts
@@ -1259,8 +1265,11 @@ var TP_SCHEMA = createSchema({
1259
1265
  kind: "element",
1260
1266
  tag: TP_TAG,
1261
1267
  requiredAttributes: [],
1262
- optionalAttributes: [ID_ATTRS[0], ID_ATTRS[1]],
1263
- allowedChildTagNames: []
1268
+ optionalAttributes: [...ID_ATTRS],
1269
+ allowedChildTagNames: [
1270
+ ...ATOM_TAGS_ALLOWED_CHILDREN,
1271
+ ...INLINE_ELEMENT_TAGS_ALLOWED_CHILDREN
1272
+ ]
1264
1273
  });
1265
1274
 
1266
1275
  // src/schema/elementSchemas/elements/table/td.ts
@@ -1281,7 +1290,7 @@ var TR_SCHEMA = createSchema({
1281
1290
  kind: "group",
1282
1291
  tag: TR_TAG,
1283
1292
  requiredAttributes: [],
1284
- optionalAttributes: [...LAYOUT_ATTRIBUTES, ID_ATTRS[0], ID_ATTRS[1], "width"],
1293
+ optionalAttributes: [...LAYOUT_ATTRIBUTES, ...ID_ATTRS, "width"],
1285
1294
  allowedChildTagNames: [{ tagName: TD_TAG, required: true }]
1286
1295
  });
1287
1296
 
@@ -1290,7 +1299,7 @@ var THEAD_SCHEMA = createSchema({
1290
1299
  kind: "element",
1291
1300
  tag: THEAD_TAG,
1292
1301
  requiredAttributes: [],
1293
- optionalAttributes: [ID_ATTRS[0], ID_ATTRS[1]],
1302
+ optionalAttributes: [...ID_ATTRS],
1294
1303
  allowedChildTagNames: [{ tagName: TR_TAG, required: true }]
1295
1304
  });
1296
1305
 
@@ -1299,7 +1308,7 @@ var TBODY_SCHEMA = createSchema({
1299
1308
  kind: "group",
1300
1309
  tag: TBODY_TAG,
1301
1310
  requiredAttributes: [],
1302
- optionalAttributes: [ID_ATTRS[0], ID_ATTRS[1]],
1311
+ optionalAttributes: [...ID_ATTRS],
1303
1312
  allowedChildTagNames: [{ tagName: TR_TAG, required: true }]
1304
1313
  });
1305
1314
 
@@ -1308,7 +1317,7 @@ var HTML_TABLE_SCHEMA = createSchema({
1308
1317
  kind: "group",
1309
1318
  tag: HTML_TABLE_TAG,
1310
1319
  requiredAttributes: [],
1311
- optionalAttributes: [ID_ATTRS[0], ID_ATTRS[1]],
1320
+ optionalAttributes: [...ID_ATTRS],
1312
1321
  allowedChildTagNames: [
1313
1322
  { tagName: THEAD_TAG, required: false },
1314
1323
  { tagName: TBODY_TAG, required: true }
@@ -1330,7 +1339,10 @@ var TBLFN_SCHEMA = createSchema({
1330
1339
  tag: TBLFN_TAG,
1331
1340
  requiredAttributes: [...ID_ATTRS],
1332
1341
  optionalAttributes: [],
1333
- allowedChildTagNames: []
1342
+ allowedChildTagNames: [
1343
+ ...ATOM_TAGS_ALLOWED_CHILDREN,
1344
+ ...INLINE_ELEMENT_TAGS_ALLOWED_CHILDREN
1345
+ ]
1334
1346
  });
1335
1347
 
1336
1348
  // src/schema/elementSchemas/elements/table/tblsource.ts
@@ -1339,7 +1351,7 @@ var TBLSOURCE_SCHEMA = createSchema({
1339
1351
  tag: TBLSOURCE_TAG,
1340
1352
  requiredAttributes: [],
1341
1353
  optionalAttributes: [],
1342
- allowedChildTagNames: []
1354
+ allowedChildTagNames: [...ATOM_TAGS_ALLOWED_CHILDREN]
1343
1355
  });
1344
1356
 
1345
1357
  // src/schema/elementSchemas/elements/table/table1.ts
@@ -1756,7 +1768,11 @@ var IGNORED_ELEMENT_SELECTORS = [
1756
1768
  "span.printlabel",
1757
1769
  "span.refIcon",
1758
1770
  "span.missLink",
1759
- "span.ref-drag"
1771
+ "span.ref-drag",
1772
+ "inlineequation",
1773
+ // TODO: remove this once we have a proper inlineequation schema
1774
+ "equation"
1775
+ // TODO: remove this once we have a proper equation schema
1760
1776
  ];
1761
1777
 
1762
1778
  // src/schema/shared/ignoredAttributes.ts
package/dist/index.mjs CHANGED
@@ -122,7 +122,7 @@ var COMMENT_QUERY_SECTION_SCHEMA = createSchema({
122
122
  // src/schema/elementSchemas/inlineElements/inlineElementsTags.ts
123
123
  var FOOTNOTE_LINK_TAG = "FOOTNOTE1";
124
124
  var INLINEEQUATION_TAG = "INLINEEQUATION";
125
- var LINK_TAG = "LINK";
125
+ var LINK_TAG = "LINK1";
126
126
  var URI_TAG = "URI";
127
127
  var INLINE_ELEMENT_TAGS_ALLOWED_CHILDREN = [
128
128
  { tagName: FOOTNOTE_LINK_TAG, required: false },
@@ -714,7 +714,10 @@ var FIGSOURCE_SCHEMA = createSchema({
714
714
  tag: FIGSOURCE_TAG,
715
715
  requiredAttributes: [...ID_ATTRS],
716
716
  optionalAttributes: [],
717
- allowedChildTagNames: [...ATOM_TAGS_ALLOWED_CHILDREN]
717
+ allowedChildTagNames: [
718
+ ...ATOM_TAGS_ALLOWED_CHILDREN,
719
+ ...INLINE_ELEMENT_TAGS_ALLOWED_CHILDREN
720
+ ]
718
721
  });
719
722
 
720
723
  // src/schema/elementSchemas/elements/figure/fignote.ts
@@ -723,7 +726,10 @@ var FIGNOTE_SCHEMA = createSchema({
723
726
  tag: FIGNOTE_TAG,
724
727
  requiredAttributes: [...ID_ATTRS],
725
728
  optionalAttributes: [],
726
- allowedChildTagNames: [...ATOM_TAGS_ALLOWED_CHILDREN]
729
+ allowedChildTagNames: [
730
+ ...ATOM_TAGS_ALLOWED_CHILDREN,
731
+ ...INLINE_ELEMENT_TAGS_ALLOWED_CHILDREN
732
+ ]
727
733
  });
728
734
 
729
735
  // src/schema/elementSchemas/elements/figure/figure.ts
@@ -1043,8 +1049,11 @@ var TP_SCHEMA = createSchema({
1043
1049
  kind: "element",
1044
1050
  tag: TP_TAG,
1045
1051
  requiredAttributes: [],
1046
- optionalAttributes: [ID_ATTRS[0], ID_ATTRS[1]],
1047
- allowedChildTagNames: []
1052
+ optionalAttributes: [...ID_ATTRS],
1053
+ allowedChildTagNames: [
1054
+ ...ATOM_TAGS_ALLOWED_CHILDREN,
1055
+ ...INLINE_ELEMENT_TAGS_ALLOWED_CHILDREN
1056
+ ]
1048
1057
  });
1049
1058
 
1050
1059
  // src/schema/elementSchemas/elements/table/td.ts
@@ -1065,7 +1074,7 @@ var TR_SCHEMA = createSchema({
1065
1074
  kind: "group",
1066
1075
  tag: TR_TAG,
1067
1076
  requiredAttributes: [],
1068
- optionalAttributes: [...LAYOUT_ATTRIBUTES, ID_ATTRS[0], ID_ATTRS[1], "width"],
1077
+ optionalAttributes: [...LAYOUT_ATTRIBUTES, ...ID_ATTRS, "width"],
1069
1078
  allowedChildTagNames: [{ tagName: TD_TAG, required: true }]
1070
1079
  });
1071
1080
 
@@ -1074,7 +1083,7 @@ var THEAD_SCHEMA = createSchema({
1074
1083
  kind: "element",
1075
1084
  tag: THEAD_TAG,
1076
1085
  requiredAttributes: [],
1077
- optionalAttributes: [ID_ATTRS[0], ID_ATTRS[1]],
1086
+ optionalAttributes: [...ID_ATTRS],
1078
1087
  allowedChildTagNames: [{ tagName: TR_TAG, required: true }]
1079
1088
  });
1080
1089
 
@@ -1083,7 +1092,7 @@ var TBODY_SCHEMA = createSchema({
1083
1092
  kind: "group",
1084
1093
  tag: TBODY_TAG,
1085
1094
  requiredAttributes: [],
1086
- optionalAttributes: [ID_ATTRS[0], ID_ATTRS[1]],
1095
+ optionalAttributes: [...ID_ATTRS],
1087
1096
  allowedChildTagNames: [{ tagName: TR_TAG, required: true }]
1088
1097
  });
1089
1098
 
@@ -1092,7 +1101,7 @@ var HTML_TABLE_SCHEMA = createSchema({
1092
1101
  kind: "group",
1093
1102
  tag: HTML_TABLE_TAG,
1094
1103
  requiredAttributes: [],
1095
- optionalAttributes: [ID_ATTRS[0], ID_ATTRS[1]],
1104
+ optionalAttributes: [...ID_ATTRS],
1096
1105
  allowedChildTagNames: [
1097
1106
  { tagName: THEAD_TAG, required: false },
1098
1107
  { tagName: TBODY_TAG, required: true }
@@ -1114,7 +1123,10 @@ var TBLFN_SCHEMA = createSchema({
1114
1123
  tag: TBLFN_TAG,
1115
1124
  requiredAttributes: [...ID_ATTRS],
1116
1125
  optionalAttributes: [],
1117
- allowedChildTagNames: []
1126
+ allowedChildTagNames: [
1127
+ ...ATOM_TAGS_ALLOWED_CHILDREN,
1128
+ ...INLINE_ELEMENT_TAGS_ALLOWED_CHILDREN
1129
+ ]
1118
1130
  });
1119
1131
 
1120
1132
  // src/schema/elementSchemas/elements/table/tblsource.ts
@@ -1123,7 +1135,7 @@ var TBLSOURCE_SCHEMA = createSchema({
1123
1135
  tag: TBLSOURCE_TAG,
1124
1136
  requiredAttributes: [],
1125
1137
  optionalAttributes: [],
1126
- allowedChildTagNames: []
1138
+ allowedChildTagNames: [...ATOM_TAGS_ALLOWED_CHILDREN]
1127
1139
  });
1128
1140
 
1129
1141
  // src/schema/elementSchemas/elements/table/table1.ts
@@ -1540,7 +1552,11 @@ var IGNORED_ELEMENT_SELECTORS = [
1540
1552
  "span.printlabel",
1541
1553
  "span.refIcon",
1542
1554
  "span.missLink",
1543
- "span.ref-drag"
1555
+ "span.ref-drag",
1556
+ "inlineequation",
1557
+ // TODO: remove this once we have a proper inlineequation schema
1558
+ "equation"
1559
+ // TODO: remove this once we have a proper equation schema
1544
1560
  ];
1545
1561
 
1546
1562
  // src/schema/shared/ignoredAttributes.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pro-editor-schema",
3
- "version": "0.1.1",
3
+ "version": "0.1.12",
4
4
  "description": "Pro Editor XML schemas",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",