@ecency/render-helper 2.5.3 → 2.5.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/README.md +1 -1
- package/dist/browser/index.d.ts +9 -1
- package/dist/browser/index.js +1 -1
- package/dist/browser/index.js.map +1 -1
- package/dist/node/index.cjs +1 -0
- package/dist/node/index.cjs.map +1 -1
- package/dist/node/index.mjs +1 -1
- package/dist/node/index.mjs.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
- `catchPostImage` - Extract first image from post content or metadata
|
|
33
33
|
- `postBodySummary` - Generate text summary from post body
|
|
34
34
|
- `proxifyImageSrc` - Proxify image URLs through Ecency's image server
|
|
35
|
-
- `setProxyBase` - Configure image proxy endpoint (default: `https://
|
|
35
|
+
- `setProxyBase` - Configure image proxy endpoint (default: `https://i.ecency.com`)
|
|
36
36
|
- `setCacheSize` - Configure LRU cache size (default: 60 entries)
|
|
37
37
|
|
|
38
38
|
### Processing Pipeline
|
package/dist/browser/index.d.ts
CHANGED
|
@@ -61,6 +61,14 @@ declare function proxifyImageSrc(url?: string, width?: number, height?: number,
|
|
|
61
61
|
*/
|
|
62
62
|
declare function buildSrcSet(url?: string): string;
|
|
63
63
|
|
|
64
|
+
/**
|
|
65
|
+
* The `sizes` value the renderer applies to in-body post images (see `img()`
|
|
66
|
+
* and `createImageHTML()`). Exported as the single source of truth so consumers
|
|
67
|
+
* preloading the LCP image (`<link rel="preload" as="image" imagesizes>`) can
|
|
68
|
+
* match the exact srcset candidate the rendered <img> selects.
|
|
69
|
+
*/
|
|
70
|
+
declare const IMAGE_SIZES = "(max-width: 768px) 100vw, 700px";
|
|
71
|
+
|
|
64
72
|
declare function setCacheSize(size: number): void;
|
|
65
73
|
|
|
66
74
|
declare const SECTION_LIST: string[];
|
|
@@ -77,4 +85,4 @@ declare function isValidPermlink(permlink: string): boolean;
|
|
|
77
85
|
*/
|
|
78
86
|
declare function simpleMarkdownToHTML(input: string): string;
|
|
79
87
|
|
|
80
|
-
export { type Entry, type RenderOptions, SECTION_LIST, type SeoContext, buildSrcSet, catchPostImage, isValidPermlink, getPostBodySummary as postBodySummary, proxifyImageSrc, markdown2Html as renderPostBody, setCacheSize, setProxyBase, setSlowRenderThresholdMs, simpleMarkdownToHTML };
|
|
88
|
+
export { type Entry, IMAGE_SIZES, type RenderOptions, SECTION_LIST, type SeoContext, buildSrcSet, catchPostImage, isValidPermlink, getPostBodySummary as postBodySummary, proxifyImageSrc, markdown2Html as renderPostBody, setCacheSize, setProxyBase, setSlowRenderThresholdMs, simpleMarkdownToHTML };
|
package/dist/browser/index.js
CHANGED
|
@@ -2048,6 +2048,6 @@ function getPostBodySummary(obj, length, platform) {
|
|
|
2048
2048
|
return res;
|
|
2049
2049
|
}
|
|
2050
2050
|
|
|
2051
|
-
export { SECTION_LIST, buildSrcSet, catchPostImage, isValidPermlink, getPostBodySummary as postBodySummary, proxifyImageSrc, markdown2Html as renderPostBody, setCacheSize, setProxyBase, setSlowRenderThresholdMs, simpleMarkdownToHTML };
|
|
2051
|
+
export { IMAGE_SIZES, SECTION_LIST, buildSrcSet, catchPostImage, isValidPermlink, getPostBodySummary as postBodySummary, proxifyImageSrc, markdown2Html as renderPostBody, setCacheSize, setProxyBase, setSlowRenderThresholdMs, simpleMarkdownToHTML };
|
|
2052
2052
|
//# sourceMappingURL=index.js.map
|
|
2053
2053
|
//# sourceMappingURL=index.js.map
|