svelte-streamdown 2.2.2 → 2.2.3

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.
@@ -1,6 +1,6 @@
1
1
  <script lang="ts">
2
2
  import type { Snippet } from 'svelte';
3
- import { useStreamdown } from './streamdown.svelte.js';
3
+ import { useStreamdown } from './context.svelte.js';
4
4
 
5
5
  let { children }: { children: Snippet } = $props();
6
6
 
@@ -1,5 +1,5 @@
1
1
  <script lang="ts">
2
- import { useStreamdown } from './streamdown.svelte.js';
2
+ import { useStreamdown } from './context.svelte.js';
3
3
  let { text }: { text: string } = $props();
4
4
 
5
5
  const streamdown = useStreamdown();
package/dist/Block.svelte CHANGED
@@ -3,7 +3,7 @@
3
3
  import Element from './Elements/Element.svelte';
4
4
  import { lex, type StreamdownToken } from './marked/index.js';
5
5
  import AnimatedText from './AnimatedText.svelte';
6
- import { useStreamdown } from './streamdown.svelte.js';
6
+ import { useStreamdown } from './context.svelte.js';
7
7
  import AnimatedBlock from './AnimatedBlock.svelte';
8
8
 
9
9
  let {
@@ -13,7 +13,7 @@
13
13
  /><path d="M12 17h.01" />`
14
14
  };
15
15
 
16
- import { useStreamdown } from '../streamdown.svelte.js';
16
+ import { useStreamdown } from '../context.svelte.js';
17
17
  import Slot from './Slot.svelte';
18
18
  import type { AlertToken } from '../marked/index.js';
19
19
  import type { Snippet } from 'svelte';
@@ -1,5 +1,5 @@
1
1
  <script lang="ts">
2
- import { useStreamdown } from '../streamdown.svelte.js';
2
+ import { useStreamdown } from '../context.svelte.js';
3
3
  import { save } from '../utils/save.js';
4
4
  import { useCopy } from '../utils/copy.svelte.js';
5
5
  import { HighlighterManager, languageExtensionMap } from '../utils/hightlighter.svelte.js';
@@ -8,7 +8,7 @@
8
8
  import Alert from './Alert.svelte';
9
9
  import type { StreamdownToken } from '../marked/index.js';
10
10
  import Slot from './Slot.svelte';
11
- import { useStreamdown } from '../streamdown.svelte.js';
11
+ import { useStreamdown } from '../context.svelte.js';
12
12
  import FootnoteRef from './FootnoteRef.svelte';
13
13
  let { token, children }: { token: StreamdownToken; children: Snippet } = $props();
14
14
  const streamdown = useStreamdown();
@@ -1,5 +1,5 @@
1
1
  <script lang="ts">
2
- import { useStreamdown } from '../streamdown.svelte.js';
2
+ import { useStreamdown } from '../context.svelte.js';
3
3
  import Slot from './Slot.svelte';
4
4
  import type { FootnoteRef } from '../marked/marked-footnotes.js';
5
5
  import {
@@ -1,5 +1,5 @@
1
1
  <script lang="ts">
2
- import { useStreamdown } from '../streamdown.svelte.js';
2
+ import { useStreamdown } from '../context.svelte.js';
3
3
  import { transformUrl } from '../utils/url.js';
4
4
  import Slot from './Slot.svelte';
5
5
  import type { Tokens } from 'marked';
@@ -1,5 +1,5 @@
1
1
  <script lang="ts">
2
- import { useStreamdown } from '../streamdown.svelte.js';
2
+ import { useStreamdown } from '../context.svelte.js';
3
3
  import { transformUrl } from '../utils/url.js';
4
4
  import Slot from './Slot.svelte';
5
5
  import type { Tokens } from 'marked';
@@ -1,6 +1,6 @@
1
1
  <script lang="ts">
2
2
  import { onMount, untrack } from 'svelte';
3
- import { useStreamdown } from '../streamdown.svelte.js';
3
+ import { useStreamdown } from '../context.svelte.js';
4
4
  import type { MathToken } from '../marked/index.js';
5
5
  import type { KatexOptions } from 'katex';
6
6
  import 'katex/dist/katex.min.css';
@@ -1,6 +1,6 @@
1
1
  <script lang="ts">
2
2
  import { onMount } from 'svelte';
3
- import { useStreamdown } from '../streamdown.svelte.js';
3
+ import { useStreamdown } from '../context.svelte.js';
4
4
  import type { Tokens } from 'marked';
5
5
  import type { MermaidConfig } from 'mermaid';
6
6
  import { on } from 'svelte/events';
@@ -1,5 +1,5 @@
1
1
  <script lang="ts">
2
- import { useStreamdown } from '../streamdown.svelte.js';
2
+ import { useStreamdown } from '../context.svelte.js';
3
3
  import Slot from './Slot.svelte';
4
4
  import type { Tokens } from 'marked';
5
5
  import type { Snippet } from 'svelte';
@@ -1,6 +1,6 @@
1
1
  <script lang="ts">
2
2
  import Block from './Block.svelte';
3
- import { StreamdownContext, type StreamdownProps } from './streamdown.svelte.js';
3
+ import { StreamdownContext, type StreamdownProps } from './context.svelte.js';
4
4
  import { mergeTheme, shadcnTheme } from './theme.js';
5
5
  import { parseBlocks } from './marked/index.js';
6
6
 
@@ -0,0 +1,4 @@
1
+ import { type StreamdownProps } from './context.svelte.js';
2
+ declare const Streamdown: import("svelte").Component<StreamdownProps, {}, "streamdown" | "element">;
3
+ type Streamdown = ReturnType<typeof Streamdown>;
4
+ export default Streamdown;
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  export { default as Streamdown } from './Streamdown.svelte';
2
- export { useStreamdown, type StreamdownProps } from './streamdown.svelte.js';
2
+ export { useStreamdown, type StreamdownProps } from './context.svelte.js';
3
3
  export { theme, shadcnTheme, mergeTheme, type Theme } from './theme.js';
4
4
  export { lex, parseBlocks, type StreamdownToken } from './marked/index.js';
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
1
  export { default as Streamdown } from './Streamdown.svelte';
2
- export { useStreamdown } from './streamdown.svelte.js';
2
+ export { useStreamdown } from './context.svelte.js';
3
3
  export { theme, shadcnTheme, mergeTheme } from './theme.js';
4
4
  export { lex, parseBlocks } from './marked/index.js';
@@ -1,5 +1,5 @@
1
1
  import {} from './index.js';
2
- import { StreamdownContext } from '../streamdown.svelte.js';
2
+ import { StreamdownContext } from '../context.svelte.js';
3
3
  import { getContext } from 'svelte';
4
4
  const safeGetContext = () => {
5
5
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "svelte-streamdown",
3
- "version": "2.2.2",
3
+ "version": "2.2.3",
4
4
  "scripts": {
5
5
  "dev": "vite dev",
6
6
  "build": "vite build && npm run prepack",