@podlite/schema 0.0.19 → 0.0.21

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/CHANGELOG.md CHANGED
@@ -2,6 +2,14 @@
2
2
 
3
3
  ## Upcoming
4
4
 
5
+ ## 0.0.21
6
+
7
+ - improve caption element
8
+
9
+ ## 0.0.20
10
+
11
+ - fix schema for `L<>`
12
+
5
13
  ## 0.0.19
6
14
 
7
15
  - add `=formula`, `F<>` support
package/esm/types.d.ts CHANGED
@@ -115,13 +115,13 @@ export interface BlockImage extends Omit<Block, 'content'> {
115
115
  name: 'image';
116
116
  caption?: string;
117
117
  link?: string;
118
- content: [Image, BlockCaption];
118
+ content: [Image, BlockCaption?];
119
119
  }
120
120
  export interface BlockPicture extends Omit<Block, 'content'> {
121
121
  name: 'picture';
122
122
  caption?: string;
123
123
  link?: string;
124
- content: [Image, BlockCaption];
124
+ content: [Image, BlockCaption?];
125
125
  }
126
126
  export interface BlockCaption extends Omit<Block, 'content' | 'location' | 'margin' | 'config' | 'id'> {
127
127
  name: 'caption';
@@ -204,7 +204,7 @@ export interface FormattingCodeL {
204
204
  type: 'fcode';
205
205
  name: 'L';
206
206
  meta: string | null;
207
- content: string | Text;
207
+ content: string | Text | [Text];
208
208
  }
209
209
  export interface FormattingCodeI {
210
210
  type: 'fcode';
package/lib/types.d.ts CHANGED
@@ -115,13 +115,13 @@ export interface BlockImage extends Omit<Block, 'content'> {
115
115
  name: 'image';
116
116
  caption?: string;
117
117
  link?: string;
118
- content: [Image, BlockCaption];
118
+ content: [Image, BlockCaption?];
119
119
  }
120
120
  export interface BlockPicture extends Omit<Block, 'content'> {
121
121
  name: 'picture';
122
122
  caption?: string;
123
123
  link?: string;
124
- content: [Image, BlockCaption];
124
+ content: [Image, BlockCaption?];
125
125
  }
126
126
  export interface BlockCaption extends Omit<Block, 'content' | 'location' | 'margin' | 'config' | 'id'> {
127
127
  name: 'caption';
@@ -204,7 +204,7 @@ export interface FormattingCodeL {
204
204
  type: 'fcode';
205
205
  name: 'L';
206
206
  meta: string | null;
207
- content: string | Text;
207
+ content: string | Text | [Text];
208
208
  }
209
209
  export interface FormattingCodeI {
210
210
  type: 'fcode';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@podlite/schema",
3
- "version": "0.0.19",
3
+ "version": "0.0.21",
4
4
  "description": "AST tools for Podlite markup language",
5
5
  "main": "lib/index.js",
6
6
  "license": "MIT",
@@ -1780,7 +1780,7 @@
1780
1780
  "$ref": "#/definitions/BlockCaption"
1781
1781
  }
1782
1782
  ],
1783
- "minItems": 2,
1783
+ "minItems": 1,
1784
1784
  "maxItems": 2
1785
1785
  },
1786
1786
  "margin": {
@@ -1845,7 +1845,7 @@
1845
1845
  "$ref": "#/definitions/BlockCaption"
1846
1846
  }
1847
1847
  ],
1848
- "minItems": 2,
1848
+ "minItems": 1,
1849
1849
  "maxItems": 2
1850
1850
  },
1851
1851
  "margin": {
@@ -2255,6 +2255,16 @@
2255
2255
  {
2256
2256
  "$ref": "#/definitions/Text"
2257
2257
  },
2258
+ {
2259
+ "type": "array",
2260
+ "items": [
2261
+ {
2262
+ "$ref": "#/definitions/Text"
2263
+ }
2264
+ ],
2265
+ "minItems": 1,
2266
+ "maxItems": 1
2267
+ },
2258
2268
  {
2259
2269
  "type": "string"
2260
2270
  }
@@ -1780,7 +1780,7 @@
1780
1780
  "$ref": "#/definitions/BlockCaption"
1781
1781
  }
1782
1782
  ],
1783
- "minItems": 2,
1783
+ "minItems": 1,
1784
1784
  "maxItems": 2
1785
1785
  },
1786
1786
  "margin": {
@@ -1845,7 +1845,7 @@
1845
1845
  "$ref": "#/definitions/BlockCaption"
1846
1846
  }
1847
1847
  ],
1848
- "minItems": 2,
1848
+ "minItems": 1,
1849
1849
  "maxItems": 2
1850
1850
  },
1851
1851
  "margin": {
@@ -2255,6 +2255,16 @@
2255
2255
  {
2256
2256
  "$ref": "#/definitions/Text"
2257
2257
  },
2258
+ {
2259
+ "type": "array",
2260
+ "items": [
2261
+ {
2262
+ "$ref": "#/definitions/Text"
2263
+ }
2264
+ ],
2265
+ "minItems": 1,
2266
+ "maxItems": 1
2267
+ },
2258
2268
  {
2259
2269
  "type": "string"
2260
2270
  }