@se-studio/markdown-renderer 1.0.93 → 1.0.94
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 +10 -0
- package/dist/MarkdownExporter.d.ts +2 -2
- package/dist/MarkdownExporter.d.ts.map +1 -1
- package/dist/converter.d.ts +8 -0
- package/dist/converter.d.ts.map +1 -0
- package/dist/converter.js +7 -0
- package/dist/converter.js.map +1 -0
- package/dist/types.d.ts +11 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +8 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @se-studio/markdown-renderer
|
|
2
2
|
|
|
3
|
+
## 1.0.94
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Version bump: patch for changed packages
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
- @se-studio/contentful-rest-api@1.0.136
|
|
10
|
+
- @se-studio/core-data-types@1.0.130
|
|
11
|
+
- @se-studio/wordpress-rest-api@1.0.11
|
|
12
|
+
|
|
3
13
|
## 1.0.93
|
|
4
14
|
|
|
5
15
|
### Patch Changes
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type BaseConverterContext, type ContentfulConfig, type FetchOptions } from '@se-studio/contentful-rest-api';
|
|
2
|
-
import type { ContentData } from './types';
|
|
3
|
-
export declare class MarkdownExporter {
|
|
2
|
+
import type { ContentData, IMarkdownExporter } from './types';
|
|
3
|
+
export declare class MarkdownExporter implements IMarkdownExporter {
|
|
4
4
|
private config;
|
|
5
5
|
private converterContext;
|
|
6
6
|
private fetchOptions;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MarkdownExporter.d.ts","sourceRoot":"","sources":["../src/MarkdownExporter.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,EAOrB,KAAK,YAAY,EAClB,MAAM,gCAAgC,CAAC;AAExC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"MarkdownExporter.d.ts","sourceRoot":"","sources":["../src/MarkdownExporter.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,EAOrB,KAAK,YAAY,EAClB,MAAM,gCAAgC,CAAC;AAExC,OAAO,KAAK,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAE9D,qBAAa,gBAAiB,YAAW,iBAAiB;IACxD,OAAO,CAAC,MAAM,CAAmB;IACjC,OAAO,CAAC,gBAAgB,CAAuB;IAC/C,OAAO,CAAC,YAAY,CAAe;gBAGjC,MAAM,EAAE,gBAAgB,EACxB,gBAAgB,EAAE,oBAAoB,EACtC,YAAY,EAAE,YAAY;IAOtB,YAAY,CAChB,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,aAAa,GAAG,UAAU,GAAG,YAAY,GAAG,QAAQ,GAAG,KAAK,EACvF,IAAI,EAAE,MAAM,EACZ,MAAM,CAAC,EAAE;QAAE,WAAW,CAAC,EAAE,MAAM,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,CAAA;KAAE,GACrD,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC;CA0I/B"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Narrow entry: markdown conversion and shared types without the Contentful-backed exporter
|
|
3
|
+
* or WordPress fetchers (avoids loading `server-only` from the Contentful REST pipeline).
|
|
4
|
+
*/
|
|
5
|
+
export { MarkdownConverter } from './MarkdownConverter';
|
|
6
|
+
export type { ContentData, IMarkdownExporter, MarkdownConverterContext, MarkdownItemConverter, SiteConfig, } from './types';
|
|
7
|
+
export { cleanMarkdownText } from './utils/textUtils';
|
|
8
|
+
//# sourceMappingURL=converter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"converter.d.ts","sourceRoot":"","sources":["../src/converter.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,YAAY,EACV,WAAW,EACX,iBAAiB,EACjB,wBAAwB,EACxB,qBAAqB,EACrB,UAAU,GACX,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Narrow entry: markdown conversion and shared types without the Contentful-backed exporter
|
|
3
|
+
* or WordPress fetchers (avoids loading `server-only` from the Contentful REST pipeline).
|
|
4
|
+
*/
|
|
5
|
+
export { MarkdownConverter } from './MarkdownConverter';
|
|
6
|
+
export { cleanMarkdownText } from './utils/textUtils';
|
|
7
|
+
//# sourceMappingURL=converter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"converter.js","sourceRoot":"","sources":["../src/converter.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAQxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC"}
|
package/dist/types.d.ts
CHANGED
|
@@ -5,6 +5,17 @@ export interface ContentData {
|
|
|
5
5
|
data: IBasePage | IBaseArticle | IBaseArticleType | IBaseCustomType | IContentfulPerson | IBaseTag;
|
|
6
6
|
context: IContentContext;
|
|
7
7
|
}
|
|
8
|
+
/**
|
|
9
|
+
* Contract for slug-based CMS fetch used with MarkdownConverter (implemented by MarkdownExporter
|
|
10
|
+
* in full builds). Import from `@se-studio/markdown-renderer/converter` when you must avoid
|
|
11
|
+
* loading the Contentful REST fetch stack (e.g. Vitest without `server-only`).
|
|
12
|
+
*/
|
|
13
|
+
export interface IMarkdownExporter {
|
|
14
|
+
fetchContent(type: 'page' | 'article' | 'articleType' | 'blogPost' | 'customType' | 'person' | 'tag', slug: string, params?: {
|
|
15
|
+
articleType?: string;
|
|
16
|
+
customType?: string;
|
|
17
|
+
}): Promise<ContentData | null>;
|
|
18
|
+
}
|
|
8
19
|
export interface SiteConfig {
|
|
9
20
|
source: string;
|
|
10
21
|
license: string;
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,iBAAiB,EACjB,cAAc,EACf,MAAM,gCAAgC,CAAC;AACxC,OAAO,KAAK,EACV,YAAY,EACZ,gBAAgB,EAChB,eAAe,EACf,SAAS,EACT,QAAQ,EACR,eAAe,EACf,MAAM,EACP,MAAM,4BAA4B,CAAC;AAEpC,MAAM,WAAW,WAAW;IAC1B,WAAW,EAAE,MAAM,GAAG,SAAS,GAAG,aAAa,GAAG,YAAY,GAAG,QAAQ,GAAG,KAAK,CAAC;IAClF,IAAI,EACA,SAAS,GACT,YAAY,GACZ,gBAAgB,GAChB,eAAe,GACf,iBAAiB,GACjB,QAAQ,CAAC;IACb,OAAO,EAAE,eAAe,CAAC;CAC1B;AAED,MAAM,WAAW,UAAU;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,gBAAgB,EAAE,MAAM,CAAC;CAC1B;AAED;;;;GAIG;AACH,MAAM,MAAM,qBAAqB,GAAG,CAClC,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,wBAAwB,EACjC,YAAY,EAAE,MAAM,KACjB,MAAM,CAAC;AAEZ,MAAM,WAAW,wBAAwB;IACvC,cAAc,EAAE,eAAe,CAAC;IAChC,MAAM,EAAE,gBAAgB,CAAC;IACzB,UAAU,EAAE,UAAU,CAAC;IACvB,cAAc,EAAE,cAAc,CAAC;IAC/B;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,qBAAqB,CAAC,CAAC;CAC1D"}
|
|
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ACvB,cAAc,EAAE,cAAc,CAAC;IAC/B;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,qBAAqB,CAAC,CAAC;CAC1D"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@se-studio/markdown-renderer",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.94",
|
|
4
4
|
"description": "Markdown renderer for Contentful content",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -15,6 +15,10 @@
|
|
|
15
15
|
".": {
|
|
16
16
|
"types": "./dist/index.d.ts",
|
|
17
17
|
"import": "./dist/index.js"
|
|
18
|
+
},
|
|
19
|
+
"./converter": {
|
|
20
|
+
"types": "./dist/converter.d.ts",
|
|
21
|
+
"import": "./dist/converter.js"
|
|
18
22
|
}
|
|
19
23
|
},
|
|
20
24
|
"files": [
|
|
@@ -25,9 +29,9 @@
|
|
|
25
29
|
"@contentful/rich-text-types": "^17.2.7",
|
|
26
30
|
"html-entities": "^2.6.0",
|
|
27
31
|
"js-yaml": "^4.1.1",
|
|
28
|
-
"@se-studio/contentful-rest-api": "1.0.
|
|
29
|
-
"@se-studio/core-data-types": "1.0.
|
|
30
|
-
"@se-studio/wordpress-rest-api": "1.0.
|
|
32
|
+
"@se-studio/contentful-rest-api": "1.0.136",
|
|
33
|
+
"@se-studio/core-data-types": "1.0.130",
|
|
34
|
+
"@se-studio/wordpress-rest-api": "1.0.11"
|
|
31
35
|
},
|
|
32
36
|
"devDependencies": {
|
|
33
37
|
"@biomejs/biome": "^2.4.12",
|