markstream-svelte 0.0.5 → 0.0.7

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.
@@ -370,7 +370,7 @@
370
370
  }
371
371
  const padding = getCodePadding()
372
372
  const configuredUnsafeCSS = typeof raw.unsafeCSS === 'string' ? raw.unsafeCSS : ''
373
- const unsafeCSS = `[data-file], [data-diff] { --diffs-min-number-column-width-default: 4ch !important; }
373
+ const unsafeCSS = `[data-file], [data-diff] { --diffs-min-number-column-width-default: 2ch !important; }
374
374
  ${configuredUnsafeCSS}`.trim()
375
375
  const finalOptions = {
376
376
  MAX_HEIGHT: maxHeight,
@@ -30,7 +30,7 @@
30
30
  let lineNumbersText = $derived(buildLineNumbersText(lineCount))
31
31
  let lineNumberLayoutStyle = $derived(
32
32
  showLineGutter
33
- ? `--markstream-pre-line-number-width: ${Math.max(4, String(lineCount).length)}ch; --markstream-pre-diff-line-number-width: ${Math.max(4, String(lineCount).length)}ch; --markstream-code-padding-left: calc(var(--markstream-pre-line-number-padding-left, 2ch) + var(--markstream-pre-line-number-width, 2ch) + var(--markstream-pre-line-number-padding-right, 1ch) + var(--markstream-pre-line-number-separator-width, 2px) + var(--markstream-pre-line-number-gap-to-code, 1ch));`
33
+ ? `--markstream-pre-line-number-width: ${Math.max(2, String(lineCount).length)}ch; --markstream-pre-diff-line-number-width: ${Math.max(2, String(lineCount).length)}ch; --markstream-code-padding-left: calc(var(--markstream-pre-line-number-padding-left, 2ch) + var(--markstream-pre-line-number-width, 2ch) + var(--markstream-pre-line-number-padding-right, 1ch) + var(--markstream-pre-line-number-separator-width, 2px) + var(--markstream-pre-line-number-gap-to-code, 1ch));`
34
34
  : '',
35
35
  )
36
36
  let mergedStyle = $derived([lineNumberLayoutStyle, style].filter(Boolean).join(' '))
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "markstream-svelte",
3
3
  "type": "module",
4
- "version": "0.0.5",
4
+ "version": "0.0.7",
5
5
  "description": "Svelte 5 and SvelteKit streaming Markdown renderer for AI chat, LLM token streams, SSE/WebSocket output, incomplete Markdown, Mermaid, KaTeX, Monaco-powered code blocks, and custom Svelte components.",
6
6
  "author": "Simon He",
7
7
  "license": "MIT",
@@ -73,6 +73,16 @@
73
73
  "files": [
74
74
  "dist"
75
75
  ],
76
+ "scripts": {
77
+ "build": "pnpm --dir ../markdown-parser build && pnpm --dir ../markstream-core build && svelte-package -i src -o dist --tsconfig tsconfig.build.json && postcss src/index.css -o dist/index.css && cp dist/index.css dist/index.tailwind.css && node ../../scripts/generate-px-css.mjs",
78
+ "dev": "vite dev",
79
+ "preview": "vite preview",
80
+ "typecheck": "svelte-check --tsconfig ./tsconfig.json",
81
+ "prepublishOnly": "pnpm run build && pnpm run check:workspace-deps-published",
82
+ "check:core-published": "node ../../scripts/check-core-published.mjs --package-json package.json --core-package-json ../markstream-core/package.json",
83
+ "check:workspace-deps-published": "node ../../scripts/check-workspace-deps-published.mjs --package-json package.json",
84
+ "release": "pnpm run check:workspace-deps-published && bumpp --all --commit --no-tag --no-push --execute 'pnpm --workspace-root run docs:llms:generate' && DIST_TAG=\"$(node ../../scripts/dist-tag.mjs)\" && pnpm publish --access public --tag \"${DIST_TAG}\" && node ../../scripts/tag-package.mjs --package-json package.json --push"
85
+ },
76
86
  "peerDependencies": {
77
87
  "@antv/infographic": "^0.2.3",
78
88
  "@terrastruct/d2": ">=0.1.33",
@@ -104,8 +114,8 @@
104
114
  },
105
115
  "dependencies": {
106
116
  "@floating-ui/dom": "^1.8.0",
107
- "markstream-core": "1.0.3",
108
- "stream-markdown-parser": "1.2.1"
117
+ "markstream-core": "workspace:*",
118
+ "stream-markdown-parser": "workspace:*"
109
119
  },
110
120
  "devDependencies": {
111
121
  "@sveltejs/package": "^2.5.8",
@@ -118,14 +128,5 @@
118
128
  "tailwindcss": "^3.4.19",
119
129
  "typescript": "^5.9.3",
120
130
  "vite": "^7.3.6"
121
- },
122
- "scripts": {
123
- "build": "pnpm --dir ../markdown-parser build && pnpm --dir ../markstream-core build && svelte-package -i src -o dist --tsconfig tsconfig.build.json && postcss src/index.css -o dist/index.css && cp dist/index.css dist/index.tailwind.css && node ../../scripts/generate-px-css.mjs",
124
- "dev": "vite dev",
125
- "preview": "vite preview",
126
- "typecheck": "svelte-check --tsconfig ./tsconfig.json",
127
- "check:core-published": "node ../../scripts/check-core-published.mjs --package-json package.json --core-package-json ../markstream-core/package.json",
128
- "check:workspace-deps-published": "node ../../scripts/check-workspace-deps-published.mjs --package-json package.json",
129
- "release": "pnpm run check:workspace-deps-published && bumpp --all --commit --no-tag --no-push --execute 'pnpm --workspace-root run docs:llms:generate' && pnpm publish --access public $(node ../../scripts/dist-tag.mjs) && node ../../scripts/tag-package.mjs --package-json package.json --push"
130
131
  }
131
- }
132
+ }