@octanejs/streamdown 0.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.
- package/LICENSE +13 -0
- package/README.md +39 -0
- package/UPSTREAM.md +15 -0
- package/dist/client/chunks/chunk-6IDAODM4.js +4809 -0
- package/dist/client/chunks/highlighted-body-PYQZ7NZ4.js +69 -0
- package/dist/client/chunks/mermaid-I6WR5JDC.js +7 -0
- package/dist/client/cjk.js +104 -0
- package/dist/client/code.js +115 -0
- package/dist/client/index.js +57 -0
- package/dist/client/math.js +30 -0
- package/dist/client/mermaid.js +46 -0
- package/dist/server/chunks/chunk-55X6YY2C.js +4526 -0
- package/dist/server/chunks/highlighted-body-NLELYOBH.js +60 -0
- package/dist/server/chunks/mermaid-SICAYVAP.js +7 -0
- package/dist/server/cjk.js +104 -0
- package/dist/server/code.js +115 -0
- package/dist/server/index.js +57 -0
- package/dist/server/math.js +30 -0
- package/dist/server/mermaid.js +46 -0
- package/dist/styles.css +35 -0
- package/dist/types/cjk.d.ts +32 -0
- package/dist/types/code.d.ts +58 -0
- package/dist/types/hooks/use-deferred-render.d.ts +60 -0
- package/dist/types/index.d.ts +161 -0
- package/dist/types/lib/animate.d.ts +33 -0
- package/dist/types/lib/block-incomplete-context.d.ts +15 -0
- package/dist/types/lib/code-block/body.d.ts +12 -0
- package/dist/types/lib/code-block/container.d.ts +10 -0
- package/dist/types/lib/code-block/context.d.ts +7 -0
- package/dist/types/lib/code-block/copy-button.d.ts +10 -0
- package/dist/types/lib/code-block/download-button.d.ts +10 -0
- package/dist/types/lib/code-block/header.d.ts +6 -0
- package/dist/types/lib/code-block/highlighted-body.d.ts +12 -0
- package/dist/types/lib/code-block/index.d.ts +14 -0
- package/dist/types/lib/code-block/skeleton.d.ts +2 -0
- package/dist/types/lib/components.d.ts +3 -0
- package/dist/types/lib/detect-direction.d.ts +14 -0
- package/dist/types/lib/icon-context.d.ts +25 -0
- package/dist/types/lib/icons.d.ts +17 -0
- package/dist/types/lib/image.d.ts +6 -0
- package/dist/types/lib/incomplete-code-utils.d.ts +25 -0
- package/dist/types/lib/link-modal.d.ts +9 -0
- package/dist/types/lib/markdown.d.ts +33 -0
- package/dist/types/lib/mermaid/download-button.d.ts +13 -0
- package/dist/types/lib/mermaid/fullscreen-button.d.ts +11 -0
- package/dist/types/lib/mermaid/index.d.ts +11 -0
- package/dist/types/lib/mermaid/pan-zoom.d.ts +14 -0
- package/dist/types/lib/mermaid/utils.d.ts +7 -0
- package/dist/types/lib/parse-blocks.d.ts +2 -0
- package/dist/types/lib/plugin-context.d.ts +30 -0
- package/dist/types/lib/plugin-types.d.ts +151 -0
- package/dist/types/lib/prefix-context.d.ts +13 -0
- package/dist/types/lib/preprocess-custom-tags.d.ts +20 -0
- package/dist/types/lib/preprocess-literal-tag-content.d.ts +25 -0
- package/dist/types/lib/rehype/literal-tag-content.d.ts +13 -0
- package/dist/types/lib/remark/code-meta.d.ts +10 -0
- package/dist/types/lib/remark/escape-html.d.ts +4 -0
- package/dist/types/lib/scroll-lock.d.ts +3 -0
- package/dist/types/lib/table/copy-dropdown.d.ts +10 -0
- package/dist/types/lib/table/download-dropdown.d.ts +18 -0
- package/dist/types/lib/table/fullscreen-button.d.ts +10 -0
- package/dist/types/lib/table/index.d.ts +10 -0
- package/dist/types/lib/table/utils.d.ts +11 -0
- package/dist/types/lib/translations-context.d.ts +35 -0
- package/dist/types/lib/types.d.ts +17 -0
- package/dist/types/lib/utils.d.ts +19 -0
- package/dist/types/math.d.ts +44 -0
- package/dist/types/mermaid-plugin.d.ts +44 -0
- package/package.json +121 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
Copyright 2023 Vercel, Inc.
|
|
2
|
+
|
|
3
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
you may not use this file except in compliance with the License.
|
|
5
|
+
You may obtain a copy of the License at
|
|
6
|
+
|
|
7
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
|
|
9
|
+
Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
See the License for the specific language governing permissions and
|
|
13
|
+
limitations under the License.
|
package/README.md
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# @octanejs/streamdown
|
|
2
|
+
|
|
3
|
+
Octane bindings for [Streamdown](https://streamdown.ai), the streaming Markdown
|
|
4
|
+
renderer for AI applications.
|
|
5
|
+
|
|
6
|
+
```tsrx
|
|
7
|
+
import { Streamdown } from '@octanejs/streamdown';
|
|
8
|
+
import { code } from '@octanejs/streamdown/code';
|
|
9
|
+
import { math } from '@octanejs/streamdown/math';
|
|
10
|
+
|
|
11
|
+
export function Message({ content }: { content: string }) {
|
|
12
|
+
return (
|
|
13
|
+
<Streamdown plugins={{ code, math }} isAnimating>
|
|
14
|
+
{content}
|
|
15
|
+
</Streamdown>
|
|
16
|
+
);
|
|
17
|
+
}
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Import the package styles and any plugin-specific styles from the application
|
|
21
|
+
entry point:
|
|
22
|
+
|
|
23
|
+
```ts
|
|
24
|
+
import '@octanejs/streamdown/styles.css';
|
|
25
|
+
import 'katex/dist/katex.min.css';
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
The root entry mirrors `streamdown@2.5.0`. The `./code`, `./math`,
|
|
29
|
+
`./mermaid`, and `./cjk` entries mirror the corresponding official Streamdown
|
|
30
|
+
plugin packages without a React runtime dependency.
|
|
31
|
+
|
|
32
|
+
The package ships precompiled client and server modules. Consumers do not compile
|
|
33
|
+
the binding's `.tsrx` source. When developing against a local checkout, build the
|
|
34
|
+
package before linking it:
|
|
35
|
+
|
|
36
|
+
```sh
|
|
37
|
+
pnpm --dir packages/streamdown build
|
|
38
|
+
pnpm --dir /path/to/app add @octanejs/streamdown@link:/path/to/octane/packages/streamdown
|
|
39
|
+
```
|
package/UPSTREAM.md
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Upstream
|
|
2
|
+
|
|
3
|
+
- Repository: https://github.com/vercel/streamdown
|
|
4
|
+
- Commit: `e5deed330aa4231751a106445d93d62e4716a22f`
|
|
5
|
+
- Core package: `streamdown@2.5.0`
|
|
6
|
+
- Plugin packages:
|
|
7
|
+
- `@streamdown/code@1.1.1`
|
|
8
|
+
- `@streamdown/math@1.0.2`
|
|
9
|
+
- `@streamdown/mermaid@1.0.2`
|
|
10
|
+
- `@streamdown/cjk@1.0.3`
|
|
11
|
+
- License: Apache-2.0
|
|
12
|
+
|
|
13
|
+
The framework-neutral Markdown, HAST, remark/rehype, code-highlighting,
|
|
14
|
+
Mermaid, math, and CJK logic is retained from upstream. React-owned component,
|
|
15
|
+
hook, portal, element, and JSX-runtime boundaries are ported to Octane.
|