@portabletext/markdown 1.0.4 → 1.0.5
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.ts +112 -107
- package/dist/index.d.ts.map +1 -1
- package/package.json +5 -5
package/dist/index.d.ts
CHANGED
|
@@ -1,146 +1,150 @@
|
|
|
1
1
|
import { PortableTextBlock, PortableTextObject, Schema } from "@portabletext/schema";
|
|
2
2
|
/**
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
* Any object with an `_type` property (which is required in portable text arrays),
|
|
4
|
+
* as well as a _potential_ `_key` (highly encouraged)
|
|
5
|
+
* @public
|
|
6
|
+
*/
|
|
7
|
+
interface TypedObject {
|
|
8
|
+
/**
|
|
9
|
+
* Identifies the type of object/span this is, and is used to pick the correct React components
|
|
10
|
+
* to use when rendering a span or inline object with this type.
|
|
11
|
+
*/
|
|
12
|
+
_type: string;
|
|
13
|
+
/**
|
|
14
|
+
* Uniquely identifies this object within its parent block.
|
|
15
|
+
* Not _required_, but highly encouraged.
|
|
16
|
+
*/
|
|
17
|
+
_key?: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Any object with an `_type` that is a string. Can hold any other properties.
|
|
21
|
+
* @public
|
|
22
|
+
*/
|
|
23
|
+
type ArbitraryTypedObject = TypedObject & {
|
|
7
24
|
[key: string]: any;
|
|
8
25
|
};
|
|
9
26
|
/**
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
_type: "block" | string;
|
|
28
|
-
/**
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
27
|
+
* A Portable Text Block can be thought of as one paragraph, quote or list item.
|
|
28
|
+
* In other words, it is a container for text, that can have a visual style associated with it.
|
|
29
|
+
* The actual text value is stored in portable text spans inside of the `childen` array.
|
|
30
|
+
*
|
|
31
|
+
* @typeParam M - Mark types that be used for text spans
|
|
32
|
+
* @typeParam C - Types allowed as children of this block
|
|
33
|
+
* @typeParam S - Allowed block styles (eg `normal`, `blockquote`, `h3` etc)
|
|
34
|
+
* @typeParam L - Allowed list item types (eg `number`, `bullet` etc)
|
|
35
|
+
* @public
|
|
36
|
+
*/
|
|
37
|
+
interface PortableTextBlock$1<M extends PortableTextMarkDefinition = PortableTextMarkDefinition, C extends TypedObject = ArbitraryTypedObject | PortableTextSpan, S extends string = PortableTextBlockStyle, L extends string = PortableTextListItemType> extends TypedObject {
|
|
38
|
+
/**
|
|
39
|
+
* Type name identifying this as a portable text block.
|
|
40
|
+
* All items within a portable text array should have a `_type` property.
|
|
41
|
+
*
|
|
42
|
+
* Usually 'block', but can be customized to other values
|
|
43
|
+
*/
|
|
44
|
+
_type: "block" | (string & {});
|
|
45
|
+
/**
|
|
46
|
+
* A key that identifies this block uniquely within the parent array. Used to more easily address
|
|
47
|
+
* the block when editing collaboratively, but is also very useful for keys inside of React and
|
|
48
|
+
* other rendering frameworks that can use keys to optimize operations.
|
|
49
|
+
*/
|
|
33
50
|
_key?: string;
|
|
34
51
|
/**
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
52
|
+
* Array of inline items for this block. Usually contain text spans, but can be
|
|
53
|
+
* configured to include inline objects of other types as well.
|
|
54
|
+
*/
|
|
38
55
|
children: C[];
|
|
39
56
|
/**
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
57
|
+
* Array of mark definitions used in child text spans. By having them be on the block level,
|
|
58
|
+
* the same mark definition can be reused for multiple text spans, which is often the case
|
|
59
|
+
* with nested marks.
|
|
60
|
+
*/
|
|
44
61
|
markDefs?: M[];
|
|
45
62
|
/**
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
63
|
+
* Visual style of the block
|
|
64
|
+
* Common values: 'normal', 'blockquote', 'h1'...'h6'
|
|
65
|
+
*/
|
|
49
66
|
style?: S;
|
|
50
67
|
/**
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
68
|
+
* If this block is a list item, identifies which style of list item this is
|
|
69
|
+
* Common values: 'bullet', 'number', but can be configured
|
|
70
|
+
*/
|
|
54
71
|
listItem?: L;
|
|
55
72
|
/**
|
|
56
|
-
|
|
57
|
-
|
|
73
|
+
* If this block is a list item, identifies which level of nesting it belongs within
|
|
74
|
+
*/
|
|
58
75
|
level?: number;
|
|
59
76
|
}
|
|
60
77
|
/**
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
* @typeParam S - Allowed block styles (eg `normal`, `blockquote`, `h3` etc)
|
|
71
|
-
* @typeParam L - Allowed list item types (eg `number`, `bullet` etc)
|
|
72
|
-
* @public
|
|
73
|
-
*/
|
|
74
|
-
declare interface PortableTextListItemBlock<M extends PortableTextMarkDefinition = PortableTextMarkDefinition, C extends TypedObject = PortableTextSpan, S extends string = PortableTextBlockStyle, L extends string = PortableTextListItemType> extends Omit<PortableTextBlock$1<M, C, S, L>, "listItem"> {
|
|
78
|
+
* Strictly speaking the same as a portable text block, but `listItem` is required
|
|
79
|
+
*
|
|
80
|
+
* @typeParam M - Mark types that be used for text spans
|
|
81
|
+
* @typeParam C - Types allowed as children of this block
|
|
82
|
+
* @typeParam S - Allowed block styles (eg `normal`, `blockquote`, `h3` etc)
|
|
83
|
+
* @typeParam L - Allowed list item types (eg `number`, `bullet` etc)
|
|
84
|
+
* @public
|
|
85
|
+
*/
|
|
86
|
+
interface PortableTextListItemBlock<M extends PortableTextMarkDefinition = PortableTextMarkDefinition, C extends TypedObject = PortableTextSpan, S extends string = PortableTextBlockStyle, L extends string = PortableTextListItemType> extends Omit<PortableTextBlock$1<M, C, S, L>, "listItem"> {
|
|
75
87
|
listItem: L;
|
|
76
88
|
}
|
|
77
89
|
/**
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
/**
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
90
|
+
* A set of _common_ (but not required/standarized) block styles
|
|
91
|
+
* @public
|
|
92
|
+
*/
|
|
93
|
+
type PortableTextBlockStyle = "normal" | "blockquote" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | (string & {});
|
|
94
|
+
/**
|
|
95
|
+
* A set of _common_ (but not required/standardized) list item types
|
|
96
|
+
* @public
|
|
97
|
+
*/
|
|
98
|
+
type PortableTextListItemType = "bullet" | "number" | (string & {});
|
|
99
|
+
/**
|
|
100
|
+
* A mark definition holds information for marked text. For instance, a text span could reference
|
|
101
|
+
* a mark definition for a hyperlink, a geoposition, a reference to a document or anything that is
|
|
102
|
+
* representable as a JSON object.
|
|
103
|
+
* @public
|
|
104
|
+
*/
|
|
105
|
+
interface PortableTextMarkDefinition {
|
|
106
|
+
/**
|
|
107
|
+
* Unknown properties
|
|
108
|
+
*/
|
|
92
109
|
[key: string]: unknown;
|
|
93
110
|
/**
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
111
|
+
* Identifies the type of mark this is, and is used to pick the correct React components to use
|
|
112
|
+
* when rendering a text span marked with this mark type.
|
|
113
|
+
*/
|
|
97
114
|
_type: string;
|
|
98
115
|
/**
|
|
99
|
-
|
|
100
|
-
|
|
116
|
+
* Uniquely identifies this mark definition within the block
|
|
117
|
+
*/
|
|
101
118
|
_key: string;
|
|
102
119
|
}
|
|
103
120
|
/**
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
121
|
+
* A Portable Text Span holds a chunk of the actual text value of a Portable Text Block
|
|
122
|
+
* @public
|
|
123
|
+
*/
|
|
124
|
+
interface PortableTextSpan {
|
|
108
125
|
/**
|
|
109
|
-
|
|
110
|
-
|
|
126
|
+
* Type is always `span` for portable text spans, as these don't vary in shape
|
|
127
|
+
*/
|
|
111
128
|
_type: "span";
|
|
112
129
|
/**
|
|
113
|
-
|
|
114
|
-
|
|
130
|
+
* Unique (within parent block) key for this portable text span
|
|
131
|
+
*/
|
|
115
132
|
_key?: string;
|
|
116
133
|
/**
|
|
117
|
-
|
|
118
|
-
|
|
134
|
+
* The actual text value of this text span
|
|
135
|
+
*/
|
|
119
136
|
text: string;
|
|
120
137
|
/**
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
138
|
+
* An array of marks this text span is annotated with, identified by its `_key`.
|
|
139
|
+
* If the key cannot be found in the parent blocks mark definition, the mark is assumed to be a
|
|
140
|
+
* decorator (a simpler mark without any properties - for instance `strong` or `em`)
|
|
141
|
+
*/
|
|
125
142
|
marks?: string[];
|
|
126
143
|
}
|
|
127
144
|
/**
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
*/
|
|
132
|
-
declare interface TypedObject {
|
|
133
|
-
/**
|
|
134
|
-
* Identifies the type of object/span this is, and is used to pick the correct React components
|
|
135
|
-
* to use when rendering a span or inline object with this type.
|
|
136
|
-
*/
|
|
137
|
-
_type: string;
|
|
138
|
-
/**
|
|
139
|
-
* Uniquely identifies this object within its parent block.
|
|
140
|
-
* Not _required_, but highly encouraged.
|
|
141
|
-
*/
|
|
142
|
-
_key?: string;
|
|
143
|
-
}
|
|
145
|
+
* The simplest representation of a link
|
|
146
|
+
* @public
|
|
147
|
+
*/
|
|
144
148
|
/**
|
|
145
149
|
* @public
|
|
146
150
|
*/
|
|
@@ -152,6 +156,7 @@ type BlockSpacingRenderer = (options: {
|
|
|
152
156
|
* @public
|
|
153
157
|
*/
|
|
154
158
|
declare const DefaultBlockSpacingRenderer: BlockSpacingRenderer;
|
|
159
|
+
type LooseRecord<K extends string, V> = Record<string, V> & { [P in K]?: V };
|
|
155
160
|
/**
|
|
156
161
|
* Generic type for portable text renderers that takes blocks/inline blocks
|
|
157
162
|
*
|
|
@@ -213,7 +218,7 @@ interface PortableTextRenderers {
|
|
|
213
218
|
*
|
|
214
219
|
* Can also be set to a single renderer function, which would handle block styles of _any_ type.
|
|
215
220
|
*/
|
|
216
|
-
block:
|
|
221
|
+
block: LooseRecord<PortableTextBlockStyle, PortableTextBlockRenderer | undefined> | PortableTextBlockRenderer;
|
|
217
222
|
/**
|
|
218
223
|
* Object of renderer functions used to render different list item styles.
|
|
219
224
|
*
|
|
@@ -222,7 +227,7 @@ interface PortableTextRenderers {
|
|
|
222
227
|
*
|
|
223
228
|
* Can also be set to a single renderer function, which would handle list items of _any_ type.
|
|
224
229
|
*/
|
|
225
|
-
listItem:
|
|
230
|
+
listItem: LooseRecord<PortableTextListItemType, PortableTextListItemRenderer | undefined> | PortableTextListItemRenderer;
|
|
226
231
|
/**
|
|
227
232
|
* Renderer for "hard breaks", eg `\n` inside of text spans.
|
|
228
233
|
* By default renders as Markdown hard break (` \n` - two trailing spaces).
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":["ArbitraryTypedObject","TypedObject","PortableTextBlock","M","C","S","L","PortableTextMarkDefinition","PortableTextSpan","PortableTextBlockStyle","PortableTextListItemType","PortableTextLink","PortableTextListItemBlock","Omit"],"sources":["../../../node_modules/.pnpm/@portabletext+types@3.0.0/node_modules/@portabletext/types/dist/index.d.ts","../src/from-portable-text/renderers/block-spacing.ts","../src/from-portable-text/types.ts","../src/from-portable-text/portable-text-to-markdown.ts","../src/from-portable-text/renderers/hard-break.ts","../src/from-portable-text/renderers/list-item.ts","../src/from-portable-text/renderers/style.ts","../src/from-portable-text/renderers/marks.ts","../src/from-portable-text/renderers/type.ts","../src/to-portable-text/matchers.ts","../src/to-portable-text/markdown-to-portable-text.ts"],"sourcesContent":["/**\n * Any object with an `_type` that is a string. Can hold any other properties.\n * @public\n */\nexport declare type ArbitraryTypedObject = TypedObject & {\n [key: string]: any;\n};\n\n/**\n * A Portable Text Block can be thought of as one paragraph, quote or list item.\n * In other words, it is a container for text, that can have a visual style associated with it.\n * The actual text value is stored in portable text spans inside of the `childen` array.\n *\n * @typeParam M - Mark types that be used for text spans\n * @typeParam C - Types allowed as children of this block\n * @typeParam S - Allowed block styles (eg `normal`, `blockquote`, `h3` etc)\n * @typeParam L - Allowed list item types (eg `number`, `bullet` etc)\n * @public\n */\nexport declare interface PortableTextBlock<\n M extends PortableTextMarkDefinition = PortableTextMarkDefinition,\n C extends TypedObject = ArbitraryTypedObject | PortableTextSpan,\n S extends string = PortableTextBlockStyle,\n L extends string = PortableTextListItemType,\n> extends TypedObject {\n /**\n * Type name identifying this as a portable text block.\n * All items within a portable text array should have a `_type` property.\n *\n * Usually 'block', but can be customized to other values\n */\n _type: \"block\" | string;\n /**\n * A key that identifies this block uniquely within the parent array. Used to more easily address\n * the block when editing collaboratively, but is also very useful for keys inside of React and\n * other rendering frameworks that can use keys to optimize operations.\n */\n _key?: string;\n /**\n * Array of inline items for this block. Usually contain text spans, but can be\n * configured to include inline objects of other types as well.\n */\n children: C[];\n /**\n * Array of mark definitions used in child text spans. By having them be on the block level,\n * the same mark definition can be reused for multiple text spans, which is often the case\n * with nested marks.\n */\n markDefs?: M[];\n /**\n * Visual style of the block\n * Common values: 'normal', 'blockquote', 'h1'...'h6'\n */\n style?: S;\n /**\n * If this block is a list item, identifies which style of list item this is\n * Common values: 'bullet', 'number', but can be configured\n */\n listItem?: L;\n /**\n * If this block is a list item, identifies which level of nesting it belongs within\n */\n level?: number;\n}\n\n/**\n * A set of _common_ (but not required/standarized) block styles\n * @public\n */\nexport declare type PortableTextBlockStyle =\n | \"normal\"\n | \"blockquote\"\n | \"h1\"\n | \"h2\"\n | \"h3\"\n | \"h4\"\n | \"h5\"\n | \"h6\"\n | string;\n\n/**\n * The simplest representation of a link\n * @public\n */\nexport declare interface PortableTextLink {\n _type: \"link\";\n href: string;\n}\n\n/**\n * Strictly speaking the same as a portable text block, but `listItem` is required\n *\n * @typeParam M - Mark types that be used for text spans\n * @typeParam C - Types allowed as children of this block\n * @typeParam S - Allowed block styles (eg `normal`, `blockquote`, `h3` etc)\n * @typeParam L - Allowed list item types (eg `number`, `bullet` etc)\n * @public\n */\nexport declare interface PortableTextListItemBlock<\n M extends PortableTextMarkDefinition = PortableTextMarkDefinition,\n C extends TypedObject = PortableTextSpan,\n S extends string = PortableTextBlockStyle,\n L extends string = PortableTextListItemType,\n> extends Omit<PortableTextBlock<M, C, S, L>, \"listItem\"> {\n listItem: L;\n}\n\n/**\n * A set of _common_ (but not required/standardized) list item types\n * @public\n */\nexport declare type PortableTextListItemType = \"bullet\" | \"number\" | string;\n\n/**\n * A mark definition holds information for marked text. For instance, a text span could reference\n * a mark definition for a hyperlink, a geoposition, a reference to a document or anything that is\n * representable as a JSON object.\n * @public\n */\nexport declare interface PortableTextMarkDefinition {\n /**\n * Unknown properties\n */\n [key: string]: unknown;\n /**\n * Identifies the type of mark this is, and is used to pick the correct React components to use\n * when rendering a text span marked with this mark type.\n */\n _type: string;\n /**\n * Uniquely identifies this mark definition within the block\n */\n _key: string;\n}\n\n/**\n * A Portable Text Span holds a chunk of the actual text value of a Portable Text Block\n * @public\n */\nexport declare interface PortableTextSpan {\n /**\n * Type is always `span` for portable text spans, as these don't vary in shape\n */\n _type: \"span\";\n /**\n * Unique (within parent block) key for this portable text span\n */\n _key?: string;\n /**\n * The actual text value of this text span\n */\n text: string;\n /**\n * An array of marks this text span is annotated with, identified by its `_key`.\n * If the key cannot be found in the parent blocks mark definition, the mark is assumed to be a\n * decorator (a simpler mark without any properties - for instance `strong` or `em`)\n */\n marks?: string[];\n}\n\n/**\n * Any object with an `_type` property (which is required in portable text arrays),\n * as well as a _potential_ `_key` (highly encouraged)\n * @public\n */\nexport declare interface TypedObject {\n /**\n * Identifies the type of object/span this is, and is used to pick the correct React components\n * to use when rendering a span or inline object with this type.\n */\n _type: string;\n /**\n * Uniquely identifies this object within its parent block.\n * Not _required_, but highly encouraged.\n */\n _key?: string;\n}\n\nexport {};\n"],"x_google_ignoreList":[0],"mappings":";;;AAIA;AAeA;AACYO,aAhBQP,oBAAAA,GAAuBC,WAgB/BM,GAAAA;EAA6BA,CAAAA,GAAAA,EAAAA,MAAAA,CAAAA,EAAAA,GAAAA;CAC7BN;;;;;;;;;;AAgDZ;AA6BA;AACYM,kBAhFaL,mBAgFbK,CAA6BA,UA/E7BA,0BA+E6BA,GA/EAA,0BA+EAA,EAC7BN,UA/EAA,WA+EAA,GA/EcD,oBA+EdC,GA/EqCO,gBA+ErCP,EAAcO,UAAAA,MAAAA,GA9ELC,sBA8EKD,EACLC,UAAAA,MAAAA,GA9EAC,wBA8EAD,CACAC,SA9EXT,WA8EWS,CAAAA;EACYP;;;;;;EAAvBU,KAAAA,EAAAA,OAAAA,GAAAA,MAAAA;EAAI;AAQd;AAQA;AAoBA;AA0BA;;EC5JA;AAQA;;ACHA;EASA,QAAY,EFmBAT,CEnBA,EAAA;EAOZ;AAQA;;;;EAC0C,QAAA,CAAA,EFS7BD,CET6B,EAAA;EAM1C;;;;EAC0C,KAAA,CAAA,EFOhCE,CEPgC;EAS1C;;;;EAmBS,QAAA,CAAA,EFhBIC,CEgBJ;EAWI;;;EACP,KAAA,CAAA,EAAA,MAAA;;;;;;AA8BS,aF/CKG,sBAAAA,GEqDsB,QAAA,GAArB,YAAA,GAMmB,IAAA,GAArB,IAAA,GAAoB,IAAA,GAQtB,IAAA,GAwCL,IAAA,GACkB,IAAA,GAA5B,MAAA;;;;;AAyDF;;ACrMkD;;;AAiCjC,kBH4BQG,yBG5BR,CAAoB,UH6BzBL,0BG7ByB,GH6BIA,0BG7BJ,EAMrC,UHwBYN,WGxBI,GHwBUO,gBGxBY,EACtB,UAAA,MAAA,GHwBKC,sBGxBL,EAAc,UAAA,MAAA,G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AA,CAAA;IAAmC,KAAA,CAAA,EQwCnC,aRxCmC,CAAA;MACJ,GAAA,EAAA,MAAA;MAAhC,GAAA,EAAA,MAAA;MAA+B,KAAA,EAAA,MAAA,GAAA,SAAA;IASzB,CAAA,CAAA;EAWO,CAAA;EAAf,IAAA,CAAA,EAAA;IAQe;;;;;;;IAuBe,MAAA,CAAA,EAAA,MAAA,GAAA,MAAA;EAAjC,CAAA;CACA;;;;;;AA8BkC,iBQ2ExB,sBAAA,CR3EwB,QAAA,EAAA,MAAA,EAAA,OAAA,CAAA,EQ6E5B,OR7E4B,CAAA,EQ8ErC,KR9EqC,CQ8E/B,iBR9E+B,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":["TypedObject","ArbitraryTypedObject","PortableTextBlock","M","C","S","L","PortableTextMarkDefinition","PortableTextSpan","PortableTextBlockStyle","PortableTextListItemType","PortableTextListItemBlock","Omit","PortableTextLink"],"sources":["../../../node_modules/.pnpm/@portabletext+types@4.0.0/node_modules/@portabletext/types/dist/index.d.ts","../src/from-portable-text/renderers/block-spacing.ts","../src/from-portable-text/types.ts","../src/from-portable-text/portable-text-to-markdown.ts","../src/from-portable-text/renderers/hard-break.ts","../src/from-portable-text/renderers/list-item.ts","../src/from-portable-text/renderers/style.ts","../src/from-portable-text/renderers/marks.ts","../src/from-portable-text/renderers/type.ts","../src/to-portable-text/matchers.ts","../src/to-portable-text/markdown-to-portable-text.ts"],"sourcesContent":["/**\n* Any object with an `_type` property (which is required in portable text arrays),\n* as well as a _potential_ `_key` (highly encouraged)\n* @public\n*/\ninterface TypedObject {\n /**\n * Identifies the type of object/span this is, and is used to pick the correct React components\n * to use when rendering a span or inline object with this type.\n */\n _type: string;\n /**\n * Uniquely identifies this object within its parent block.\n * Not _required_, but highly encouraged.\n */\n _key?: string;\n}\n/**\n* Any object with an `_type` that is a string. Can hold any other properties.\n* @public\n*/\ntype ArbitraryTypedObject = TypedObject & {\n [key: string]: any;\n};\n/**\n* A Portable Text Block can be thought of as one paragraph, quote or list item.\n* In other words, it is a container for text, that can have a visual style associated with it.\n* The actual text value is stored in portable text spans inside of the `childen` array.\n*\n* @typeParam M - Mark types that be used for text spans\n* @typeParam C - Types allowed as children of this block\n* @typeParam S - Allowed block styles (eg `normal`, `blockquote`, `h3` etc)\n* @typeParam L - Allowed list item types (eg `number`, `bullet` etc)\n* @public\n*/\ninterface PortableTextBlock<M extends PortableTextMarkDefinition = PortableTextMarkDefinition, C extends TypedObject = ArbitraryTypedObject | PortableTextSpan, S extends string = PortableTextBlockStyle, L extends string = PortableTextListItemType> extends TypedObject {\n /**\n * Type name identifying this as a portable text block.\n * All items within a portable text array should have a `_type` property.\n *\n * Usually 'block', but can be customized to other values\n */\n _type: \"block\" | (string & {});\n /**\n * A key that identifies this block uniquely within the parent array. Used to more easily address\n * the block when editing collaboratively, but is also very useful for keys inside of React and\n * other rendering frameworks that can use keys to optimize operations.\n */\n _key?: string;\n /**\n * Array of inline items for this block. Usually contain text spans, but can be\n * configured to include inline objects of other types as well.\n */\n children: C[];\n /**\n * Array of mark definitions used in child text spans. By having them be on the block level,\n * the same mark definition can be reused for multiple text spans, which is often the case\n * with nested marks.\n */\n markDefs?: M[];\n /**\n * Visual style of the block\n * Common values: 'normal', 'blockquote', 'h1'...'h6'\n */\n style?: S;\n /**\n * If this block is a list item, identifies which style of list item this is\n * Common values: 'bullet', 'number', but can be configured\n */\n listItem?: L;\n /**\n * If this block is a list item, identifies which level of nesting it belongs within\n */\n level?: number;\n}\n/**\n* Strictly speaking the same as a portable text block, but `listItem` is required\n*\n* @typeParam M - Mark types that be used for text spans\n* @typeParam C - Types allowed as children of this block\n* @typeParam S - Allowed block styles (eg `normal`, `blockquote`, `h3` etc)\n* @typeParam L - Allowed list item types (eg `number`, `bullet` etc)\n* @public\n*/\ninterface PortableTextListItemBlock<M extends PortableTextMarkDefinition = PortableTextMarkDefinition, C extends TypedObject = PortableTextSpan, S extends string = PortableTextBlockStyle, L extends string = PortableTextListItemType> extends Omit<PortableTextBlock<M, C, S, L>, \"listItem\"> {\n listItem: L;\n}\n/**\n* A set of _common_ (but not required/standarized) block styles\n* @public\n*/\ntype PortableTextBlockStyle = \"normal\" | \"blockquote\" | \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\" | (string & {});\n/**\n* A set of _common_ (but not required/standardized) list item types\n* @public\n*/\ntype PortableTextListItemType = \"bullet\" | \"number\" | (string & {});\n/**\n* A mark definition holds information for marked text. For instance, a text span could reference\n* a mark definition for a hyperlink, a geoposition, a reference to a document or anything that is\n* representable as a JSON object.\n* @public\n*/\ninterface PortableTextMarkDefinition {\n /**\n * Unknown properties\n */\n [key: string]: unknown;\n /**\n * Identifies the type of mark this is, and is used to pick the correct React components to use\n * when rendering a text span marked with this mark type.\n */\n _type: string;\n /**\n * Uniquely identifies this mark definition within the block\n */\n _key: string;\n}\n/**\n* A Portable Text Span holds a chunk of the actual text value of a Portable Text Block\n* @public\n*/\ninterface PortableTextSpan {\n /**\n * Type is always `span` for portable text spans, as these don't vary in shape\n */\n _type: \"span\";\n /**\n * Unique (within parent block) key for this portable text span\n */\n _key?: string;\n /**\n * The actual text value of this text span\n */\n text: string;\n /**\n * An array of marks this text span is annotated with, identified by its `_key`.\n * If the key cannot be found in the parent blocks mark definition, the mark is assumed to be a\n * decorator (a simpler mark without any properties - for instance `strong` or `em`)\n */\n marks?: string[];\n}\n/**\n* The simplest representation of a link\n* @public\n*/\ninterface PortableTextLink {\n _type: \"link\";\n href: string;\n}\nexport { ArbitraryTypedObject, PortableTextBlock, PortableTextBlockStyle, PortableTextLink, PortableTextListItemBlock, PortableTextListItemType, PortableTextMarkDefinition, PortableTextSpan, TypedObject };\n//# sourceMappingURL=index.d.ts.map"],"x_google_ignoreList":[0],"mappings":";;;;AAKqB;AAgBkB;UAhB7BA,WAAAA,CA8B4BO;EAA6BA;;;;EAAgHE,KAAAA,EAAAA,MAAAA;EAA2CC;;;;EAkCjNJ,IAAAA,CAAAA,EAAA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hC,KAAA,EAAA,MAAA,GAAA,SAAA;IAA+B,CAAA,CAAA;EAM9B,CAAA;EAAmC,IAAA,CAAA,EAAA;IACJ;;;AAS3C;;;;IAmBS,MAAA,CAAA,EAAA,MAAA,GAAA,MAAA;EAWS,CAAA;CAAwB;;;;;;AAgBpC,iBQkGU,sBAAA,CRlGV,QAAA,EAAA,MAAA,EAAA,OAAA,CAAA,EQoGM,ORpGN,CAAA,EQqGH,KRrGG,CQqGG,iBRrGH,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@portabletext/markdown",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.5",
|
|
4
4
|
"description": "Convert Portable Text to and from Markdown",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"portable-text",
|
|
@@ -32,14 +32,14 @@
|
|
|
32
32
|
"dist"
|
|
33
33
|
],
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@portabletext/toolkit": "^
|
|
35
|
+
"@portabletext/toolkit": "^5.0.0",
|
|
36
36
|
"markdown-it": "^14.1.0",
|
|
37
37
|
"@portabletext/schema": "^2.0.1"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@portabletext/types": "^
|
|
41
|
-
"@sanity/pkg-utils": "^10.1.
|
|
42
|
-
"@sanity/tsconfig": "^
|
|
40
|
+
"@portabletext/types": "^4.0.0",
|
|
41
|
+
"@sanity/pkg-utils": "^10.1.2",
|
|
42
|
+
"@sanity/tsconfig": "^2.0.0",
|
|
43
43
|
"@types/markdown-it": "^14.1.2",
|
|
44
44
|
"typescript": "5.9.3",
|
|
45
45
|
"vitest": "^4.0.9",
|