@visualizevalue/mint-app-base 0.1.121 → 0.1.122

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.
@@ -11,7 +11,7 @@
11
11
 
12
12
  <script setup>
13
13
  import { watchDebounced } from '@vueuse/core'
14
- import { getMarkdownSvgUri, getMarkdownHtmlUri } from '~/utils/markdown'
14
+ import { getMarkdownSvgUri, getMarkdownUri } from '~/utils/markdown'
15
15
 
16
16
  const { artifact, image, animationUrl, name, description } = useCreateMintData()
17
17
 
@@ -25,7 +25,7 @@ const updatePreview = () => {
25
25
  }
26
26
 
27
27
  image.value = getMarkdownSvgUri(name.value || '', markdown.value)
28
- animationUrl.value = getMarkdownHtmlUri(markdown.value)
28
+ animationUrl.value = getMarkdownUri(markdown.value)
29
29
  }
30
30
  watchDebounced([markdown, name], updatePreview, { debounce: 500, maxWait: 3000 })
31
31
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@visualizevalue/mint-app-base",
3
- "version": "0.1.121",
3
+ "version": "0.1.122",
4
4
  "type": "module",
5
5
  "main": "./nuxt.config.ts",
6
6
  "dependencies": {
package/utils/markdown.ts CHANGED
@@ -38,13 +38,7 @@ export const getMarkdownSvgUri = (title: string, content: string) =>
38
38
  toBase64DataUri('image/svg+xml', getMarkdownSvg(title, content))
39
39
 
40
40
  /**
41
- * Generate a simple HTML preview for the markdown content.
41
+ * Generate a markdown data URI matching the on-chain MarkdownRenderer output.
42
42
  */
43
- export const getMarkdownHtml = (content: string) =>
44
- `<!DOCTYPE html><html><head><meta charset="utf-8"><style>` +
45
- `*{margin:0;padding:0;box-sizing:border-box}` +
46
- `body{font-family:monospace;font-size:14px;color:#999;background:#111;padding:2rem;white-space:pre-wrap;word-break:break-word}` +
47
- `</style></head><body>${escapeXml(content)}</body></html>`
48
-
49
- export const getMarkdownHtmlUri = (content: string) =>
50
- toBase64DataUri('text/html', getMarkdownHtml(content))
43
+ export const getMarkdownUri = (content: string) =>
44
+ toBase64DataUri('text/markdown', content)