@portabletext/plugin-markdown-shortcuts 8.0.44 → 8.0.45

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 CHANGED
@@ -1,159 +1,105 @@
1
- import type {EditorContext} from '@portabletext/editor'
2
- import {JSX} from 'react'
3
-
4
- declare type MarkdownBehaviorsConfig = {
5
- horizontalRuleObject?: ({
6
- context,
7
- }: {
8
- context: Pick<EditorContext, 'schema' | 'keyGenerator'>
9
- }) => ObjectWithOptionalKey | undefined
10
- defaultStyle?: ({
11
- context,
12
- schema,
13
- }: {
14
- context: Pick<EditorContext, 'schema'>
1
+ import { EditorContext } from "@portabletext/editor";
2
+ type ObjectWithOptionalKey = {
3
+ _type: string;
4
+ _key?: string;
5
+ [other: string]: unknown;
6
+ };
7
+ type MarkdownBehaviorsConfig = {
8
+ horizontalRuleObject?: ({ context }: {
9
+ context: Pick<EditorContext, 'schema' | 'keyGenerator'>;
10
+ }) => ObjectWithOptionalKey | undefined;
11
+ defaultStyle?: ({ context, schema }: {
12
+ context: Pick<EditorContext, 'schema'>;
15
13
  /**
16
14
  * @deprecated Use `context.schema` instead
17
15
  */
18
- schema: EditorContext['schema']
19
- }) => string | undefined
20
- }
21
-
16
+ schema: EditorContext['schema'];
17
+ }) => string | undefined;
18
+ };
22
19
  /**
23
20
  * @public
24
21
  */
25
- export declare function MarkdownShortcutsPlugin({
26
- blockquoteStyle,
27
- boldDecorator,
28
- codeDecorator,
29
- defaultStyle,
30
- headingStyle,
31
- horizontalRuleObject,
32
- linkObject,
33
- italicDecorator,
34
- orderedList,
35
- strikeThroughDecorator,
36
- unorderedList,
37
- }: MarkdownShortcutsPluginProps): JSX.Element
38
-
39
- /**
40
- * @public
41
- */
42
- export declare type MarkdownShortcutsPluginProps = MarkdownBehaviorsConfig & {
43
- blockquoteStyle?: ({
44
- context,
45
- schema,
46
- }: {
47
- context: Pick<EditorContext, 'schema'>
22
+ type MarkdownShortcutsPluginProps = MarkdownBehaviorsConfig & {
23
+ blockquoteStyle?: ({ context, schema }: {
24
+ context: Pick<EditorContext, 'schema'>;
48
25
  /**
49
26
  * @deprecated Use `context.schema` instead
50
27
  */
51
- schema: EditorContext['schema']
52
- }) => string | undefined
53
- defaultStyle?: ({
54
- context,
55
- schema,
56
- }: {
57
- context: Pick<EditorContext, 'schema'>
28
+ schema: EditorContext['schema'];
29
+ }) => string | undefined;
30
+ defaultStyle?: ({ context, schema }: {
31
+ context: Pick<EditorContext, 'schema'>;
58
32
  /**
59
33
  * @deprecated Use `context.schema` instead
60
34
  */
61
- schema: EditorContext['schema']
62
- }) => string | undefined
63
- headingStyle?: ({
64
- context,
65
- schema,
66
- props,
67
- level,
68
- }: {
69
- context: Pick<EditorContext, 'schema'>
35
+ schema: EditorContext['schema'];
36
+ }) => string | undefined;
37
+ headingStyle?: ({ context, schema, props, level }: {
38
+ context: Pick<EditorContext, 'schema'>;
70
39
  /**
71
40
  * @deprecated Use `context.schema` instead
72
41
  */
73
- schema: EditorContext['schema']
42
+ schema: EditorContext['schema'];
74
43
  props: {
75
- level: number
76
- }
44
+ level: number;
45
+ };
77
46
  /**
78
47
  * @deprecated Use `props.level` instead
79
48
  */
80
- level: number
81
- }) => string | undefined
82
- linkObject?: ({
83
- context,
84
- props,
85
- }: {
86
- context: Pick<EditorContext, 'schema' | 'keyGenerator'>
49
+ level: number;
50
+ }) => string | undefined;
51
+ linkObject?: ({ context, props }: {
52
+ context: Pick<EditorContext, 'schema' | 'keyGenerator'>;
87
53
  props: {
88
- href: string
89
- }
90
- }) => ObjectWithOptionalKey | undefined
91
- unorderedList?: ({
92
- context,
93
- schema,
94
- }: {
95
- context: Pick<EditorContext, 'schema'>
54
+ href: string;
55
+ };
56
+ }) => ObjectWithOptionalKey | undefined;
57
+ unorderedList?: ({ context, schema }: {
58
+ context: Pick<EditorContext, 'schema'>;
96
59
  /**
97
60
  * @deprecated Use `context.schema` instead
98
61
  */
99
- schema: EditorContext['schema']
100
- }) => string | undefined
101
- orderedList?: ({
102
- context,
103
- schema,
104
- }: {
105
- context: Pick<EditorContext, 'schema'>
62
+ schema: EditorContext['schema'];
63
+ }) => string | undefined;
64
+ orderedList?: ({ context, schema }: {
65
+ context: Pick<EditorContext, 'schema'>;
106
66
  /**
107
67
  * @deprecated Use `context.schema` instead
108
68
  */
109
- schema: EditorContext['schema']
110
- }) => string | undefined
111
- boldDecorator?: ({
112
- context,
113
- schema,
114
- }: {
115
- context: Pick<EditorContext, 'schema'>
69
+ schema: EditorContext['schema'];
70
+ }) => string | undefined;
71
+ boldDecorator?: ({ context, schema }: {
72
+ context: Pick<EditorContext, 'schema'>;
116
73
  /**
117
74
  * @deprecated Use `context.schema` instead
118
75
  */
119
- schema: EditorContext['schema']
120
- }) => string | undefined
121
- codeDecorator?: ({
122
- context,
123
- schema,
124
- }: {
125
- context: Pick<EditorContext, 'schema'>
76
+ schema: EditorContext['schema'];
77
+ }) => string | undefined;
78
+ codeDecorator?: ({ context, schema }: {
79
+ context: Pick<EditorContext, 'schema'>;
126
80
  /**
127
81
  * @deprecated Use `context.schema` instead
128
82
  */
129
- schema: EditorContext['schema']
130
- }) => string | undefined
131
- italicDecorator?: ({
132
- context,
133
- schema,
134
- }: {
135
- context: Pick<EditorContext, 'schema'>
83
+ schema: EditorContext['schema'];
84
+ }) => string | undefined;
85
+ italicDecorator?: ({ context, schema }: {
86
+ context: Pick<EditorContext, 'schema'>;
136
87
  /**
137
88
  * @deprecated Use `context.schema` instead
138
89
  */
139
- schema: EditorContext['schema']
140
- }) => string | undefined
141
- strikeThroughDecorator?: ({
142
- context,
143
- schema,
144
- }: {
145
- context: Pick<EditorContext, 'schema'>
90
+ schema: EditorContext['schema'];
91
+ }) => string | undefined;
92
+ strikeThroughDecorator?: ({ context, schema }: {
93
+ context: Pick<EditorContext, 'schema'>;
146
94
  /**
147
95
  * @deprecated Use `context.schema` instead
148
96
  */
149
- schema: EditorContext['schema']
150
- }) => string | undefined
151
- }
152
-
153
- declare type ObjectWithOptionalKey = {
154
- _type: string
155
- _key?: string
156
- [other: string]: unknown
157
- }
158
-
159
- export {}
97
+ schema: EditorContext['schema'];
98
+ }) => string | undefined;
99
+ };
100
+ /**
101
+ * @public
102
+ */
103
+ declare function MarkdownShortcutsPlugin({ blockquoteStyle, boldDecorator, codeDecorator, defaultStyle, headingStyle, horizontalRuleObject, linkObject, italicDecorator, orderedList, strikeThroughDecorator, unorderedList }: MarkdownShortcutsPluginProps): import("react").JSX.Element;
104
+ export { MarkdownShortcutsPlugin, MarkdownShortcutsPluginProps };
105
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../src/behavior.markdown-shortcuts.ts","../src/plugin.markdown-shortcuts.tsx"],"mappings":";KAKY;EACV;EACA;GACC;;KAGS;EACV,0BACE;IAEA,SAAS,KAAK;QACV;EACN,kBACE,SACA;IAEA,SAAS,KAAK;;;;IAId,QAAQ;;;;;;KCLA,+BAA+B;EACzC,qBACE,SACA;IAEA,SAAS,KAAK;;;;IAId,QAAQ;;EAEV,kBACE,SACA;IAEA,SAAS,KAAK;;;;IAId,QAAQ;;EAEV,kBACE,SACA,QACA,OACA;IAEA,SAAS,KAAK;;;;IAId,QAAQ;IACR;MAAQ;;;;;IAIR;;EAEF,gBACE,SACA;IAEA,SAAS,KAAK;IACd;MAAQ;;QACJ;EACN,mBACE,SACA;IAEA,SAAS,KAAK;;;;IAId,QAAQ;;EAEV,iBACE,SACA;IAEA,SAAS,KAAK;;;;IAId,QAAQ;;EAEV,mBACE,SACA;IAEA,SAAS,KAAK;;;;IAId,QAAQ;;EAEV,mBACE,SACA;IAEA,SAAS,KAAK;;;;IAId,QAAQ;;EAEV,qBACE,SACA;IAEA,SAAS,KAAK;;;;IAId,QAAQ;;EAEV,4BACE,SACA;IAEA,SAAS,KAAK;;;;IAId,QAAQ;;;;;;iBAOI,0BACd,iBACA,eACA,eACA,cACA,cACA,sBACA,YACA,iBACA,aACA,wBACA,iBACC,+CAA4B,IAAA"}