@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.
Files changed (69) hide show
  1. package/LICENSE +13 -0
  2. package/README.md +39 -0
  3. package/UPSTREAM.md +15 -0
  4. package/dist/client/chunks/chunk-6IDAODM4.js +4809 -0
  5. package/dist/client/chunks/highlighted-body-PYQZ7NZ4.js +69 -0
  6. package/dist/client/chunks/mermaid-I6WR5JDC.js +7 -0
  7. package/dist/client/cjk.js +104 -0
  8. package/dist/client/code.js +115 -0
  9. package/dist/client/index.js +57 -0
  10. package/dist/client/math.js +30 -0
  11. package/dist/client/mermaid.js +46 -0
  12. package/dist/server/chunks/chunk-55X6YY2C.js +4526 -0
  13. package/dist/server/chunks/highlighted-body-NLELYOBH.js +60 -0
  14. package/dist/server/chunks/mermaid-SICAYVAP.js +7 -0
  15. package/dist/server/cjk.js +104 -0
  16. package/dist/server/code.js +115 -0
  17. package/dist/server/index.js +57 -0
  18. package/dist/server/math.js +30 -0
  19. package/dist/server/mermaid.js +46 -0
  20. package/dist/styles.css +35 -0
  21. package/dist/types/cjk.d.ts +32 -0
  22. package/dist/types/code.d.ts +58 -0
  23. package/dist/types/hooks/use-deferred-render.d.ts +60 -0
  24. package/dist/types/index.d.ts +161 -0
  25. package/dist/types/lib/animate.d.ts +33 -0
  26. package/dist/types/lib/block-incomplete-context.d.ts +15 -0
  27. package/dist/types/lib/code-block/body.d.ts +12 -0
  28. package/dist/types/lib/code-block/container.d.ts +10 -0
  29. package/dist/types/lib/code-block/context.d.ts +7 -0
  30. package/dist/types/lib/code-block/copy-button.d.ts +10 -0
  31. package/dist/types/lib/code-block/download-button.d.ts +10 -0
  32. package/dist/types/lib/code-block/header.d.ts +6 -0
  33. package/dist/types/lib/code-block/highlighted-body.d.ts +12 -0
  34. package/dist/types/lib/code-block/index.d.ts +14 -0
  35. package/dist/types/lib/code-block/skeleton.d.ts +2 -0
  36. package/dist/types/lib/components.d.ts +3 -0
  37. package/dist/types/lib/detect-direction.d.ts +14 -0
  38. package/dist/types/lib/icon-context.d.ts +25 -0
  39. package/dist/types/lib/icons.d.ts +17 -0
  40. package/dist/types/lib/image.d.ts +6 -0
  41. package/dist/types/lib/incomplete-code-utils.d.ts +25 -0
  42. package/dist/types/lib/link-modal.d.ts +9 -0
  43. package/dist/types/lib/markdown.d.ts +33 -0
  44. package/dist/types/lib/mermaid/download-button.d.ts +13 -0
  45. package/dist/types/lib/mermaid/fullscreen-button.d.ts +11 -0
  46. package/dist/types/lib/mermaid/index.d.ts +11 -0
  47. package/dist/types/lib/mermaid/pan-zoom.d.ts +14 -0
  48. package/dist/types/lib/mermaid/utils.d.ts +7 -0
  49. package/dist/types/lib/parse-blocks.d.ts +2 -0
  50. package/dist/types/lib/plugin-context.d.ts +30 -0
  51. package/dist/types/lib/plugin-types.d.ts +151 -0
  52. package/dist/types/lib/prefix-context.d.ts +13 -0
  53. package/dist/types/lib/preprocess-custom-tags.d.ts +20 -0
  54. package/dist/types/lib/preprocess-literal-tag-content.d.ts +25 -0
  55. package/dist/types/lib/rehype/literal-tag-content.d.ts +13 -0
  56. package/dist/types/lib/remark/code-meta.d.ts +10 -0
  57. package/dist/types/lib/remark/escape-html.d.ts +4 -0
  58. package/dist/types/lib/scroll-lock.d.ts +3 -0
  59. package/dist/types/lib/table/copy-dropdown.d.ts +10 -0
  60. package/dist/types/lib/table/download-dropdown.d.ts +18 -0
  61. package/dist/types/lib/table/fullscreen-button.d.ts +10 -0
  62. package/dist/types/lib/table/index.d.ts +10 -0
  63. package/dist/types/lib/table/utils.d.ts +11 -0
  64. package/dist/types/lib/translations-context.d.ts +35 -0
  65. package/dist/types/lib/types.d.ts +17 -0
  66. package/dist/types/lib/utils.d.ts +19 -0
  67. package/dist/types/math.d.ts +44 -0
  68. package/dist/types/mermaid-plugin.d.ts +44 -0
  69. 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.