@cellgit/markdown-render 1.0.1 → 1.1.0

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.
@@ -1197,6 +1197,9 @@
1197
1197
  // Code blocks inside a message get their copy button from the same render
1198
1198
  // pipeline as a standalone document, so it needs the same strings.
1199
1199
  options.i18n = runtimeConfig.i18n || {};
1200
+ if (runtimeConfig.imageSources) {
1201
+ options.imageSources = runtimeConfig.imageSources;
1202
+ }
1200
1203
  if (!options.reasoning) {
1201
1204
  options.reasoning = markdownReasoningConfig;
1202
1205
  }
@@ -251,6 +251,12 @@
251
251
  // have to travel with the render options rather than only reaching the
252
252
  // click handler.
253
253
  options.i18n = runtimeConfig.i18n || {};
254
+ // Where the images written in the markdown actually load from. The host
255
+ // holds the mapping (signed, expiring URLs against stable relative
256
+ // paths), so it travels with the render options like the copy strings do.
257
+ if (runtimeConfig.imageSources) {
258
+ options.imageSources = runtimeConfig.imageSources;
259
+ }
254
260
  if (runtimeConfig.streaming && runtimeConfig.streaming.incremental !== false) {
255
261
  incrementalRerender(options);
256
262
  } else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cellgit/markdown-render",
3
- "version": "1.0.1",
3
+ "version": "1.1.0",
4
4
  "description": "Streaming-friendly markdown renderer with KaTeX math, code highlighting, and iOS-ready WebView bundle.",
5
5
  "engines": {
6
6
  "node": ">=18"