@md-plugins/quasar-app-extension-q-press 0.1.0-alpha.28 → 0.1.0-alpha.29

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@md-plugins/quasar-app-extension-q-press",
3
- "version": "0.1.0-alpha.28",
3
+ "version": "0.1.0-alpha.29",
4
4
  "description": "QPress - The Ultimate Markdown Solution for Quasar Framework",
5
5
  "author": "hawkeye64 <galbraith64@gmail.com>",
6
6
  "keywords": [
@@ -29,19 +29,19 @@
29
29
  "dependencies": {
30
30
  "@types/markdown-it": "^14.1.2",
31
31
  "markdown-it": "^14.1.0",
32
- "@md-plugins/md-plugin-blockquote": "0.1.0-alpha.28",
33
- "@md-plugins/md-plugin-containers": "0.1.0-alpha.28",
34
- "@md-plugins/md-plugin-headers": "0.1.0-alpha.28",
35
- "@md-plugins/md-plugin-imports": "0.1.0-alpha.28",
36
- "@md-plugins/md-plugin-frontmatter": "0.1.0-alpha.28",
37
- "@md-plugins/md-plugin-image": "0.1.0-alpha.28",
38
- "@md-plugins/md-plugin-inlinecode": "0.1.0-alpha.28",
39
- "@md-plugins/md-plugin-table": "0.1.0-alpha.28",
40
- "@md-plugins/md-plugin-link": "0.1.0-alpha.28",
41
- "@md-plugins/md-plugin-title": "0.1.0-alpha.28",
42
- "@md-plugins/md-plugin-codeblocks": "0.1.0-alpha.28",
43
- "@md-plugins/vite-md-plugin": "0.1.0-alpha.28",
44
- "@md-plugins/shared": "0.1.0-alpha.28"
32
+ "@md-plugins/md-plugin-blockquote": "0.1.0-alpha.29",
33
+ "@md-plugins/md-plugin-codeblocks": "0.1.0-alpha.29",
34
+ "@md-plugins/md-plugin-containers": "0.1.0-alpha.29",
35
+ "@md-plugins/md-plugin-frontmatter": "0.1.0-alpha.29",
36
+ "@md-plugins/md-plugin-headers": "0.1.0-alpha.29",
37
+ "@md-plugins/md-plugin-image": "0.1.0-alpha.29",
38
+ "@md-plugins/md-plugin-imports": "0.1.0-alpha.29",
39
+ "@md-plugins/md-plugin-inlinecode": "0.1.0-alpha.29",
40
+ "@md-plugins/md-plugin-link": "0.1.0-alpha.29",
41
+ "@md-plugins/md-plugin-table": "0.1.0-alpha.29",
42
+ "@md-plugins/shared": "0.1.0-alpha.29",
43
+ "@md-plugins/md-plugin-title": "0.1.0-alpha.29",
44
+ "@md-plugins/vite-md-plugin": "0.1.0-alpha.29"
45
45
  },
46
46
  "devDependencies": {
47
47
  "@types/markdown-it": "^14.1.2",
@@ -44,7 +44,6 @@ declare const htmlUnescape: (str: string) => string
44
44
  interface MarkdownItEnv {
45
45
  plugins?: Record<string, unknown>
46
46
  }
47
-
48
47
  interface MarkdownItHeader {
49
48
  /**
50
49
  * The slug of the header
@@ -73,6 +72,16 @@ interface MarkdownItHeader {
73
72
  */
74
73
  children: MarkdownItHeader[]
75
74
  }
75
+ type ResolvePluginOptionsFn = <T extends object, K extends keyof any>(
76
+ options:
77
+ | T
78
+ | {
79
+ [P in K]?: T
80
+ }
81
+ | undefined,
82
+ key: K,
83
+ defaults: T,
84
+ ) => T
76
85
 
77
86
  interface ResolveTitleOptions {
78
87
  /**
@@ -90,7 +99,6 @@ interface ResolveTitleOptions {
90
99
  */
91
100
  shouldEscapeText: boolean
92
101
  }
93
-
94
102
  /**
95
103
  * Resolve header title from markdown-it token
96
104
  *
@@ -103,7 +111,7 @@ declare const resolveTitleFromToken: (
103
111
 
104
112
  interface ResolveHeadersOptions extends ResolveTitleOptions {
105
113
  /**
106
- * Heading level that is going to be resolved; ie: `1` to `6`
114
+ * Heading level that going to be resolved
107
115
  */
108
116
  level: number[]
109
117
  /**
@@ -123,7 +131,6 @@ interface ResolveHeadersOptions extends ResolveTitleOptions {
123
131
  */
124
132
  format?: (str: string) => string | undefined
125
133
  }
126
-
127
134
  /**
128
135
  * Resolve headers from markdown-it tokens
129
136
  */
@@ -144,14 +151,27 @@ declare const resolveHeadersFromTokens: (
144
151
  */
145
152
  declare const slugify: (str: string) => string
146
153
 
154
+ declare function resolvePluginOptions<T extends object, K extends keyof any>(
155
+ options:
156
+ | T
157
+ | {
158
+ [key in K]?: T
159
+ }
160
+ | undefined,
161
+ key: K,
162
+ defaults: T,
163
+ ): T
164
+
147
165
  export {
148
166
  type MarkdownItEnv,
149
167
  type MarkdownItHeader,
150
168
  type ResolveHeadersOptions,
169
+ type ResolvePluginOptionsFn,
151
170
  type ResolveTitleOptions,
152
171
  htmlEscape,
153
172
  htmlUnescape,
154
173
  resolveHeadersFromTokens,
174
+ resolvePluginOptions,
155
175
  resolveTitleFromToken,
156
176
  slugify,
157
177
  }