markstream-vue 0.0.9 → 0.0.10-beta.1
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/.agents/skills/markstream-angular/SKILL.md +34 -0
- package/.agents/skills/markstream-angular/agents/openai.yaml +4 -0
- package/.agents/skills/markstream-custom-components/SKILL.md +46 -0
- package/.agents/skills/markstream-custom-components/agents/openai.yaml +4 -0
- package/.agents/skills/markstream-custom-components/references/patterns.md +31 -0
- package/.agents/skills/markstream-install/SKILL.md +45 -0
- package/.agents/skills/markstream-install/agents/openai.yaml +4 -0
- package/.agents/skills/markstream-install/references/scenarios.md +33 -0
- package/.agents/skills/markstream-migration/SKILL.md +50 -0
- package/.agents/skills/markstream-migration/agents/openai.yaml +4 -0
- package/.agents/skills/markstream-migration/references/adoption-checklist.md +30 -0
- package/.agents/skills/markstream-nuxt/SKILL.md +31 -0
- package/.agents/skills/markstream-nuxt/agents/openai.yaml +4 -0
- package/.agents/skills/markstream-react/SKILL.md +33 -0
- package/.agents/skills/markstream-react/agents/openai.yaml +4 -0
- package/.agents/skills/markstream-vue/SKILL.md +32 -0
- package/.agents/skills/markstream-vue/agents/openai.yaml +4 -0
- package/.agents/skills/markstream-vue2/SKILL.md +32 -0
- package/.agents/skills/markstream-vue2/agents/openai.yaml +4 -0
- package/.agents/skills/markstream-vue2-cli/SKILL.md +31 -0
- package/.agents/skills/markstream-vue2-cli/agents/openai.yaml +4 -0
- package/.agents/skills/markstream-vue2-vite/SKILL.md +31 -0
- package/.agents/skills/markstream-vue2-vite/agents/openai.yaml +4 -0
- package/README.md +51 -0
- package/README.zh-CN.md +51 -0
- package/bin/markstream-vue.mjs +116 -0
- package/bin/prompts-lib.mjs +49 -0
- package/bin/skills-lib.mjs +214 -0
- package/dist/exports.js +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.px.css +1 -1
- package/dist/index.tailwind.css +1 -1
- package/dist/index4.js +1 -1
- package/dist/index5.js +1 -1
- package/dist/tailwind.ts +0 -0
- package/package.json +30 -8
- package/prompts/add-custom-tag-thinking.md +25 -0
- package/prompts/audit-markstream-integration.md +23 -0
- package/prompts/install-markstream.md +27 -0
- package/prompts/migrate-react-markdown.md +25 -0
- package/prompts/override-built-in-components.md +25 -0
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: markstream-angular
|
|
3
|
+
description: Integrate markstream-angular into an Angular app. Use when Codex needs standalone component imports, signal-based examples, CSS wiring, custom HTML tags or customComponents setup, or optional peer integration in an Angular repository.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Markstream Angular
|
|
7
|
+
|
|
8
|
+
Use this skill when the host app is Angular and the task is to adopt the Angular package cleanly.
|
|
9
|
+
|
|
10
|
+
## Workflow
|
|
11
|
+
|
|
12
|
+
1. Confirm the repo is Angular.
|
|
13
|
+
2. Install `markstream-angular` plus only the requested optional peers.
|
|
14
|
+
3. Import `markstream-angular/index.css` from the app shell.
|
|
15
|
+
- Add `katex/dist/katex.min.css` when math is enabled.
|
|
16
|
+
4. Prefer standalone Angular integration.
|
|
17
|
+
- Use `MarkstreamAngularComponent` in `imports` and keep examples signal-friendly.
|
|
18
|
+
5. Start with `[content]`.
|
|
19
|
+
- Use `[final]`, `[codeBlockStream]`, and other streaming inputs only when the UI actually streams.
|
|
20
|
+
6. Use `[customHtmlTags]` and `[customComponents]` for trusted tag workflows.
|
|
21
|
+
7. Validate with the smallest useful Angular dev or build command.
|
|
22
|
+
|
|
23
|
+
## Default Decisions
|
|
24
|
+
|
|
25
|
+
- Standalone Angular first, NgModule-era patterns only when the repo still depends on them.
|
|
26
|
+
- Treat streaming flags as opt-in.
|
|
27
|
+
- Keep optional peers minimal and explicit.
|
|
28
|
+
|
|
29
|
+
## Useful Doc Targets
|
|
30
|
+
|
|
31
|
+
- `docs/guide/angular-quick-start.md`
|
|
32
|
+
- `docs/guide/angular-installation.md`
|
|
33
|
+
- `docs/guide/playground.md`
|
|
34
|
+
- `docs/guide/troubleshooting.md`
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
interface:
|
|
2
|
+
display_name: Markstream Angular
|
|
3
|
+
short_description: Install and wire markstream-angular in Angular apps
|
|
4
|
+
default_prompt: 'Use $markstream-angular to integrate markstream-angular into this Angular repository with the right CSS, optional peers, and standalone setup.'
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: markstream-custom-components
|
|
3
|
+
description: Override built-in Markstream node renderers and add trusted custom tags. Use when Codex needs to apply `setCustomComponents`, keep overrides scoped with `customId`, map override keys like `image`, `code_block`, `mermaid`, or `link`, or wire `customHtmlTags` and nested renderers for tags such as `thinking`.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Markstream Custom Components
|
|
7
|
+
|
|
8
|
+
Use this skill when the task is to change how Markstream renders specific nodes or custom tags.
|
|
9
|
+
|
|
10
|
+
Read [references/patterns.md](references/patterns.md) before choosing an override strategy.
|
|
11
|
+
|
|
12
|
+
## Workflow
|
|
13
|
+
|
|
14
|
+
1. Classify the request.
|
|
15
|
+
- `built-in override`: replace an existing renderer such as `image`, `link`, `code_block`, `mermaid`, `d2`, or `inline_code`.
|
|
16
|
+
- `custom tag`: support trusted HTML-like tags such as `thinking`.
|
|
17
|
+
- `parser-level`: requires token transforms or AST reshaping. Only then should you leave this skill and use low-level parser hooks.
|
|
18
|
+
2. Prefer scoped mappings.
|
|
19
|
+
- Use `setCustomComponents(customId, mapping)` instead of global mappings whenever practical.
|
|
20
|
+
- Pass the same `customId` or `custom-id` to the renderer instance.
|
|
21
|
+
3. Start with the smallest safe override.
|
|
22
|
+
- Leaf-like nodes (`image`, `link`, `inline_code`, `mermaid`) are easier than container nodes (`heading`, `paragraph`, `list_item`).
|
|
23
|
+
- If the request only changes Mermaid, use `mermaid`, not `code_block`.
|
|
24
|
+
4. Preserve nested Markdown when needed.
|
|
25
|
+
- For trusted custom tags with inner Markdown, render `node.content` with a nested renderer.
|
|
26
|
+
- Pass the same custom-tag allowlist to nested renderers.
|
|
27
|
+
5. Keep props and cleanup intact.
|
|
28
|
+
- Preserve `node`, `loading`, `indexKey`, `customId`, and `isDark`.
|
|
29
|
+
- Remove temporary scoped mappings with `removeCustomComponents(customId)` when the scope is no longer needed.
|
|
30
|
+
6. Validate with the smallest useful check.
|
|
31
|
+
- Prefer a local demo, targeted test, or docs build.
|
|
32
|
+
- Call out whether the implementation is safe for repeated and nested custom tags.
|
|
33
|
+
|
|
34
|
+
## Default Decisions
|
|
35
|
+
|
|
36
|
+
- Scoped overrides first, global overrides only when the whole app truly needs them.
|
|
37
|
+
- Leaf-node overrides before container-node overrides.
|
|
38
|
+
- `customHtmlTags` plus scoped custom components before parser hooks.
|
|
39
|
+
- Nested renderers for tag bodies that contain Markdown.
|
|
40
|
+
|
|
41
|
+
## Useful Doc Targets
|
|
42
|
+
|
|
43
|
+
- `docs/guide/component-overrides.md`
|
|
44
|
+
- `docs/guide/custom-components.md`
|
|
45
|
+
- `docs/guide/components.md`
|
|
46
|
+
- `docs/guide/advanced.md`
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Override Patterns
|
|
2
|
+
|
|
3
|
+
## Common override keys
|
|
4
|
+
|
|
5
|
+
| Key | Typical use |
|
|
6
|
+
|-----|-------------|
|
|
7
|
+
| `image` | lightboxes, captions, lazy-loading wrappers |
|
|
8
|
+
| `link` | analytics, router integration, custom tooltip behavior |
|
|
9
|
+
| `code_block` | replace regular fenced code blocks |
|
|
10
|
+
| `mermaid` | customize Mermaid only |
|
|
11
|
+
| `d2` | customize D2 only |
|
|
12
|
+
| `infographic` | customize infographic blocks only |
|
|
13
|
+
| `inline_code` | typography or special inline behavior |
|
|
14
|
+
| `heading`, `paragraph`, `list_item` | container overrides that must render children |
|
|
15
|
+
|
|
16
|
+
## Trusted custom-tag pattern
|
|
17
|
+
|
|
18
|
+
1. register the tag in `customHtmlTags`
|
|
19
|
+
2. map the same tag name with `setCustomComponents(customId, { tagName: Component })`
|
|
20
|
+
3. if the tag body contains Markdown, render `node.content` with a nested renderer
|
|
21
|
+
4. pass the same `customHtmlTags` list to the nested renderer
|
|
22
|
+
|
|
23
|
+
## Nested renderer defaults
|
|
24
|
+
|
|
25
|
+
- `typewriter: false`
|
|
26
|
+
- `viewportPriority: false`
|
|
27
|
+
- `deferNodesUntilVisible: false`
|
|
28
|
+
- `maxLiveNodes: 0`
|
|
29
|
+
- `batchRendering: false`
|
|
30
|
+
|
|
31
|
+
Use those defaults when predictable nested streaming behavior matters more than optimization.
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: markstream-install
|
|
3
|
+
description: Install and wire markstream-vue, markstream-react, markstream-vue2, or markstream-angular into an existing repository. Use when Codex needs to choose the right package, install the smallest peer-dependency set, fix CSS/reset order, decide between `content` and `nodes`, or add a minimal working renderer example.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Markstream Install
|
|
7
|
+
|
|
8
|
+
Use this skill when the task is "add markstream to an app" or "fix a broken markstream install".
|
|
9
|
+
|
|
10
|
+
Read [references/scenarios.md](references/scenarios.md) before making dependency choices.
|
|
11
|
+
|
|
12
|
+
## Workflow
|
|
13
|
+
|
|
14
|
+
1. Detect the target framework and CSS stack.
|
|
15
|
+
- Check `package.json`, app entry files, Tailwind or UnoCSS config, and whether the repo is SSR or streaming-focused.
|
|
16
|
+
- Choose the package that matches the host app: `markstream-vue`, `markstream-vue2`, `markstream-react`, or `markstream-angular`.
|
|
17
|
+
2. Install the smallest peer set that matches the requested features.
|
|
18
|
+
- Add peers only for features the user actually needs: Monaco, Mermaid, D2, KaTeX, or Shiki.
|
|
19
|
+
- Do not install every optional peer by default.
|
|
20
|
+
3. Fix CSS order.
|
|
21
|
+
- Put reset styles before Markstream styles.
|
|
22
|
+
- In Tailwind or UnoCSS projects, place `markstream-*/index.css` inside `@layer components`.
|
|
23
|
+
- Import `katex/dist/katex.min.css` when math is enabled.
|
|
24
|
+
4. Add the smallest working render example.
|
|
25
|
+
- Use `content` for static or low-frequency rendering.
|
|
26
|
+
- Use `nodes` plus `final` when the app receives streaming updates.
|
|
27
|
+
5. Keep customization scoped.
|
|
28
|
+
- If the task requires overrides, prefer `customId` / `custom-id` plus scoped `setCustomComponents(...)`.
|
|
29
|
+
6. Validate.
|
|
30
|
+
- Run the smallest relevant build, typecheck, test, or docs build command.
|
|
31
|
+
- Report which peers were installed, where CSS lives, and whether the repo should later adopt `nodes`.
|
|
32
|
+
|
|
33
|
+
## Default Decisions
|
|
34
|
+
|
|
35
|
+
- Prefer the minimal peer set over "install everything".
|
|
36
|
+
- Prefer `content` unless the app is clearly SSE, chat, token-streaming, or worker-preparsed.
|
|
37
|
+
- Treat CSS order as a first-class part of installation, not a later cleanup.
|
|
38
|
+
- When the request includes SSR, explicitly gate browser-only peers behind client-only boundaries.
|
|
39
|
+
|
|
40
|
+
## Useful Doc Targets
|
|
41
|
+
|
|
42
|
+
- `docs/guide/installation.md`
|
|
43
|
+
- `docs/guide/usage.md`
|
|
44
|
+
- `docs/guide/troubleshooting.md`
|
|
45
|
+
- `docs/guide/component-overrides.md`
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Install Scenarios
|
|
2
|
+
|
|
3
|
+
## Package selection
|
|
4
|
+
|
|
5
|
+
| Host app | Package |
|
|
6
|
+
|----------|---------|
|
|
7
|
+
| Vue 3 / Nuxt 3 | `markstream-vue` |
|
|
8
|
+
| Vue 2.6 / 2.7 | `markstream-vue2` |
|
|
9
|
+
| React 18+ | `markstream-react` |
|
|
10
|
+
| Angular 20+ | `markstream-angular` |
|
|
11
|
+
|
|
12
|
+
## Peer selection
|
|
13
|
+
|
|
14
|
+
| Feature | Peers |
|
|
15
|
+
|---------|-------|
|
|
16
|
+
| Lightweight highlighted code blocks | `shiki`, `stream-markdown` |
|
|
17
|
+
| Monaco-powered code blocks | `stream-monaco` |
|
|
18
|
+
| Mermaid | `mermaid` |
|
|
19
|
+
| D2 | `@terrastruct/d2` |
|
|
20
|
+
| KaTeX math | `katex` |
|
|
21
|
+
|
|
22
|
+
## CSS checklist
|
|
23
|
+
|
|
24
|
+
- reset first
|
|
25
|
+
- Markstream CSS after reset
|
|
26
|
+
- in Tailwind or UnoCSS projects, keep Markstream CSS inside `@layer components`
|
|
27
|
+
- import KaTeX CSS when math is used
|
|
28
|
+
- when standalone node components are rendered directly, wrap them with `.markstream-vue`
|
|
29
|
+
|
|
30
|
+
## Input choice
|
|
31
|
+
|
|
32
|
+
- `content`: docs pages, static articles, low-frequency updates
|
|
33
|
+
- `nodes` + `final`: SSE, token streaming, AI chat, worker-preparsed content
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: markstream-migration
|
|
3
|
+
description: Audit and migrate existing Markdown rendering to Markstream. Use when Codex needs to replace another renderer, classify direct vs custom vs plugin-heavy usage, preserve behavior during adoption, migrate custom renderers into scoped Markstream overrides, or decide when `nodes` streaming is worth adopting.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Markstream Migration
|
|
7
|
+
|
|
8
|
+
Use this skill when a repo already renders Markdown and the task is to adopt Markstream safely.
|
|
9
|
+
|
|
10
|
+
Read [references/adoption-checklist.md](references/adoption-checklist.md) before changing code.
|
|
11
|
+
|
|
12
|
+
## Workflow
|
|
13
|
+
|
|
14
|
+
1. Audit the repo's current renderer usage.
|
|
15
|
+
- Search for markdown renderers, plugin chains, raw HTML handling, security props, and custom renderers.
|
|
16
|
+
- List every call site that will be touched.
|
|
17
|
+
2. Classify the migration.
|
|
18
|
+
- `direct`: simple string-in renderer swap.
|
|
19
|
+
- `renderer-custom`: custom renderers but limited parser work.
|
|
20
|
+
- `plugin-heavy`: remark, rehype, markdown-it, or other transform-heavy pipelines.
|
|
21
|
+
- `security-heavy`: allow or deny lists, URL rewriting, sanitization, or raw HTML policies.
|
|
22
|
+
3. Swap the renderer first.
|
|
23
|
+
- Introduce the correct Markstream package and CSS.
|
|
24
|
+
- Preserve user-visible behavior before adding richer Markstream-only features.
|
|
25
|
+
4. Migrate custom renderers.
|
|
26
|
+
- Convert tag-based renderers into node-type overrides with scoped `setCustomComponents`.
|
|
27
|
+
- For trusted tag-like content, prefer `customHtmlTags`.
|
|
28
|
+
5. Review gaps honestly.
|
|
29
|
+
- Do not claim 1:1 parity where none exists.
|
|
30
|
+
- Call out parser, plugin, security, or HTML behavior that still needs manual review.
|
|
31
|
+
6. Treat streaming as a second pass unless clearly required now.
|
|
32
|
+
- Move to `nodes` only when the app receives streaming or high-frequency updates.
|
|
33
|
+
7. Validate and summarize.
|
|
34
|
+
- Run the smallest relevant tests or build.
|
|
35
|
+
- Report direct mappings, TODOs, and remaining verification work.
|
|
36
|
+
|
|
37
|
+
## Default Decisions
|
|
38
|
+
|
|
39
|
+
- Renderer swap first, streaming optimization second.
|
|
40
|
+
- Preserve safety over feature parity when HTML or security rules are involved.
|
|
41
|
+
- Prefer explicit TODOs over vague claims.
|
|
42
|
+
- Recommend against migration when the current stack depends heavily on transforms that Markstream does not mirror directly.
|
|
43
|
+
|
|
44
|
+
## Useful Doc Targets
|
|
45
|
+
|
|
46
|
+
- `docs/guide/react-markdown-migration.md`
|
|
47
|
+
- `docs/guide/react-markdown-migration-cookbook.md`
|
|
48
|
+
- `docs/guide/installation.md`
|
|
49
|
+
- `docs/guide/component-overrides.md`
|
|
50
|
+
- `docs/guide/advanced.md`
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
interface:
|
|
2
|
+
display_name: Markstream Migration
|
|
3
|
+
short_description: Audit and migrate existing Markdown rendering to Markstream
|
|
4
|
+
default_prompt: "Use $markstream-migration to audit this repository's current Markdown renderer and migrate it to the appropriate Markstream package."
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Adoption Checklist
|
|
2
|
+
|
|
3
|
+
## Audit queries
|
|
4
|
+
|
|
5
|
+
- `react-markdown`
|
|
6
|
+
- `remarkPlugins`
|
|
7
|
+
- `rehypePlugins`
|
|
8
|
+
- `markdown-it`
|
|
9
|
+
- `marked`
|
|
10
|
+
- `rehypeRaw`
|
|
11
|
+
- `skipHtml`
|
|
12
|
+
- `allowedElements`
|
|
13
|
+
- `disallowedElements`
|
|
14
|
+
- `allowElement`
|
|
15
|
+
- `urlTransform`
|
|
16
|
+
- custom renderers and wrapper components
|
|
17
|
+
|
|
18
|
+
## Classification guide
|
|
19
|
+
|
|
20
|
+
- `direct`: plain renderer swap, little or no custom behavior
|
|
21
|
+
- `renderer-custom`: existing custom renderers can become Markstream node overrides
|
|
22
|
+
- `plugin-heavy`: large transform chains need manual review
|
|
23
|
+
- `security-heavy`: HTML policies and URL rewriting need explicit review
|
|
24
|
+
|
|
25
|
+
## Migration defaults
|
|
26
|
+
|
|
27
|
+
- swap the renderer package first
|
|
28
|
+
- keep CSS order correct before debugging visual differences
|
|
29
|
+
- move to scoped `setCustomComponents` instead of global mutations
|
|
30
|
+
- only adopt `nodes` if the app is streaming or frequently re-parsing
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: markstream-nuxt
|
|
3
|
+
description: Integrate markstream-vue into a Nuxt 3 or Nuxt 4 app. Use when Codex needs client-only boundaries, SSR-safe setup, browser-only peer gating, worker-aware initialization, or a safe `MarkdownRender` integration inside pages, components, or Nuxt plugins.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Markstream Nuxt
|
|
7
|
+
|
|
8
|
+
Use this skill when the host app is Nuxt and SSR boundaries matter.
|
|
9
|
+
|
|
10
|
+
## Workflow
|
|
11
|
+
|
|
12
|
+
1. Confirm the repo is Nuxt 3 or 4.
|
|
13
|
+
2. Install `markstream-vue` plus only the optional peers required by the requested features.
|
|
14
|
+
3. Keep browser-only peers behind client-only boundaries.
|
|
15
|
+
- Prefer `<client-only>` wrappers, `.client` plugins, or guarded setup paths.
|
|
16
|
+
4. Import `markstream-vue/index.css` from a client-safe app shell or plugin.
|
|
17
|
+
5. Start with `content`, and move to `nodes` plus `final` only when the UI is streaming.
|
|
18
|
+
6. Validate with the smallest relevant Nuxt dev, build, or typecheck command.
|
|
19
|
+
|
|
20
|
+
## Default Decisions
|
|
21
|
+
|
|
22
|
+
- SSR safety comes before feature completeness.
|
|
23
|
+
- Avoid import-time access to browser globals from server code paths.
|
|
24
|
+
- Treat Monaco, Mermaid workers, and similar heavy peers as client-only unless the repo already has a proven SSR pattern.
|
|
25
|
+
|
|
26
|
+
## Useful Doc Targets
|
|
27
|
+
|
|
28
|
+
- `docs/nuxt-ssr.md`
|
|
29
|
+
- `docs/guide/installation.md`
|
|
30
|
+
- `docs/guide/usage.md`
|
|
31
|
+
- `docs/guide/troubleshooting.md`
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: markstream-react
|
|
3
|
+
description: Integrate markstream-react into a React 18+ or Next app. Use when Codex needs to add the React renderer, import CSS correctly, choose between `content` and `nodes`, keep Next client boundaries safe, convert renderer overrides, or prepare a repo for `react-markdown` migration.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Markstream React
|
|
7
|
+
|
|
8
|
+
Use this skill when the host app is React or Next and the task is to wire Markstream safely.
|
|
9
|
+
|
|
10
|
+
## Workflow
|
|
11
|
+
|
|
12
|
+
1. Confirm the repo is React, Next, or another React-based host.
|
|
13
|
+
2. Install `markstream-react` plus only the requested optional peers.
|
|
14
|
+
3. Import `markstream-react/index.css` from the app shell or client entry.
|
|
15
|
+
4. Start with `content`.
|
|
16
|
+
- Move to `nodes` plus `final` only when the UI receives streaming or high-frequency updates.
|
|
17
|
+
5. Respect SSR boundaries in Next.
|
|
18
|
+
- Prefer `use client`, dynamic imports with `ssr: false`, or other client-only boundaries when browser-only peers are involved.
|
|
19
|
+
6. Use scoped Markstream overrides before custom parser work.
|
|
20
|
+
7. Validate with the smallest useful dev, build, or typecheck command.
|
|
21
|
+
|
|
22
|
+
## Default Decisions
|
|
23
|
+
|
|
24
|
+
- Renderer wiring first, migration cleanup second.
|
|
25
|
+
- If the repo already uses `react-markdown`, pair this skill with `markstream-migration`.
|
|
26
|
+
- Prefer the smallest client-only boundary that solves the SSR issue.
|
|
27
|
+
|
|
28
|
+
## Useful Doc Targets
|
|
29
|
+
|
|
30
|
+
- `docs/guide/react-quick-start.md`
|
|
31
|
+
- `docs/guide/react-installation.md`
|
|
32
|
+
- `docs/guide/react-markdown-migration.md`
|
|
33
|
+
- `docs/guide/component-overrides.md`
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
interface:
|
|
2
|
+
display_name: Markstream React
|
|
3
|
+
short_description: Install and wire markstream-react in React or Next
|
|
4
|
+
default_prompt: Use $markstream-react to integrate markstream-react into this React or Next repository with safe client boundaries and the right optional peers.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: markstream-vue
|
|
3
|
+
description: Integrate markstream-vue into a Vue 3 app. Use when Codex needs to add the Vue 3 renderer, import CSS in the right order, choose between `content` and `nodes`, enable optional peers like Mermaid, KaTeX, D2, Monaco, or Shiki, or wire scoped custom components in a non-Nuxt Vue repository.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Markstream Vue 3
|
|
7
|
+
|
|
8
|
+
Use this skill when the host app is plain Vue 3, typically Vite-based, and not Nuxt.
|
|
9
|
+
|
|
10
|
+
## Workflow
|
|
11
|
+
|
|
12
|
+
1. Confirm the repo is Vue 3 and not Nuxt.
|
|
13
|
+
2. Install `markstream-vue` plus only the optional peers required by the requested features.
|
|
14
|
+
3. Import `markstream-vue/index.css` after resets.
|
|
15
|
+
- In Tailwind or UnoCSS projects, keep Markstream styles inside `@layer components`.
|
|
16
|
+
4. Start with `<MarkdownRender :content="markdown" />`.
|
|
17
|
+
- Switch to `nodes` plus `final` only for streaming, SSE, or high-frequency updates.
|
|
18
|
+
5. Use `custom-id` plus scoped `setCustomComponents(...)` for overrides.
|
|
19
|
+
6. Validate with the smallest useful dev, build, or typecheck command.
|
|
20
|
+
|
|
21
|
+
## Default Decisions
|
|
22
|
+
|
|
23
|
+
- Vue 3 apps default to `content`.
|
|
24
|
+
- Prefer local component registration unless the repo already uses a shared plugin entry.
|
|
25
|
+
- If the host is actually Nuxt, leave SSR-specific setup to `markstream-nuxt`.
|
|
26
|
+
|
|
27
|
+
## Useful Doc Targets
|
|
28
|
+
|
|
29
|
+
- `docs/guide/quick-start.md`
|
|
30
|
+
- `docs/guide/installation.md`
|
|
31
|
+
- `docs/guide/usage.md`
|
|
32
|
+
- `docs/guide/component-overrides.md`
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: markstream-vue2
|
|
3
|
+
description: Integrate markstream-vue2 into a Vue 2.6 or 2.7 app. Use when Codex needs Vue 2-compatible setup, `@vue/composition-api` decisions, CSS wiring, optional peer setup, or scoped Markstream overrides in a Vue 2 repository that is not specifically Vue CLI / Webpack 4 constrained.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Markstream Vue 2
|
|
7
|
+
|
|
8
|
+
Use this skill when the host app is Vue 2 and not specifically a Vue CLI / Webpack 4 edge case.
|
|
9
|
+
|
|
10
|
+
## Workflow
|
|
11
|
+
|
|
12
|
+
1. Confirm the repo is Vue 2.6 or 2.7.
|
|
13
|
+
2. Install `markstream-vue2`.
|
|
14
|
+
- Add `@vue/composition-api` only when the repo is Vue 2.6 and uses Composition API patterns.
|
|
15
|
+
3. Import `markstream-vue2/index.css` after resets.
|
|
16
|
+
4. Start with `<MarkdownRender :content="markdown" />`.
|
|
17
|
+
5. Use scoped custom component mappings when the task needs overrides or trusted tags.
|
|
18
|
+
6. Validate with the smallest useful dev or build command.
|
|
19
|
+
|
|
20
|
+
## Default Decisions
|
|
21
|
+
|
|
22
|
+
- Vue 2.7 can use built-in Composition API support.
|
|
23
|
+
- Vue 2.6 needs `@vue/composition-api` only when the codebase actually relies on Composition API.
|
|
24
|
+
- If the repo is Vue CLI / Webpack 4, prefer `markstream-vue2-cli`.
|
|
25
|
+
- If the repo is Vue 2 plus Vite worker imports, prefer `markstream-vue2-vite`.
|
|
26
|
+
|
|
27
|
+
## Useful Doc Targets
|
|
28
|
+
|
|
29
|
+
- `docs/guide/vue2-quick-start.md`
|
|
30
|
+
- `docs/guide/vue2-installation.md`
|
|
31
|
+
- `docs/guide/vue2-components.md`
|
|
32
|
+
- `docs/guide/troubleshooting.md`
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: markstream-vue2-cli
|
|
3
|
+
description: Integrate markstream-vue2 into a Vue 2 Vue CLI or Webpack 4 app. Use when Codex needs Webpack 4-friendly setup, CDN worker fallbacks for Mermaid or KaTeX, `dist/index.css` imports, Vue 2 composition-api shims, or safer code block defaults that avoid fragile Monaco worker setups.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Markstream Vue 2 CLI
|
|
7
|
+
|
|
8
|
+
Use this skill when the host app is Vue 2 on Vue CLI or another Webpack 4-style stack.
|
|
9
|
+
|
|
10
|
+
## Workflow
|
|
11
|
+
|
|
12
|
+
1. Confirm the repo uses Vue 2 plus Vue CLI or Webpack 4-era tooling.
|
|
13
|
+
2. Install `markstream-vue2` and only the peers required for the requested features.
|
|
14
|
+
3. Import `markstream-vue2/dist/index.css` in the app shell.
|
|
15
|
+
4. Avoid Vite-style `?worker` imports.
|
|
16
|
+
- Use `createKaTeXWorkerFromCDN(...)` and `createMermaidWorkerFromCDN(...)` when workers are needed.
|
|
17
|
+
5. Prefer stable code block defaults over brittle Monaco wiring.
|
|
18
|
+
- `MarkdownCodeBlockNode` plus `stream-markdown` is safer than Monaco in Webpack 4-era repos.
|
|
19
|
+
6. Validate with the smallest useful local dev or build command.
|
|
20
|
+
|
|
21
|
+
## Default Decisions
|
|
22
|
+
|
|
23
|
+
- Treat Monaco and worker-heavy setups as opt-in and fragile on Webpack 4.
|
|
24
|
+
- Prefer CDN workers over bundler workers for Mermaid and KaTeX.
|
|
25
|
+
- Keep the Vue 2 composition-api shim explicit when the repo is on Vue 2.6.
|
|
26
|
+
|
|
27
|
+
## Useful Doc Targets
|
|
28
|
+
|
|
29
|
+
- `docs/guide/vue2-quick-start.md`
|
|
30
|
+
- `docs/guide/vue2-installation.md`
|
|
31
|
+
- `docs/guide/troubleshooting.md`
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: markstream-vue2-vite
|
|
3
|
+
description: Integrate markstream-vue2 into a Vue 2 plus Vite app. Use when Codex needs Vite-friendly worker imports, `?worker` or `?worker&inline` setup for Mermaid or KaTeX, modern CSS ordering, or Vue 2 compatibility in a Vite-based repository.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Markstream Vue 2 Vite
|
|
7
|
+
|
|
8
|
+
Use this skill when the host app is Vue 2 and the bundler is Vite.
|
|
9
|
+
|
|
10
|
+
## Workflow
|
|
11
|
+
|
|
12
|
+
1. Confirm the repo is Vue 2 with Vite-based tooling.
|
|
13
|
+
2. Install `markstream-vue2` plus only the requested optional peers.
|
|
14
|
+
3. Import `markstream-vue2/index.css` after resets.
|
|
15
|
+
4. Use Vite worker imports when the repo needs bundled workers.
|
|
16
|
+
- `markstream-vue2/workers/... ?worker` or `?worker&inline` patterns are allowed here.
|
|
17
|
+
5. Keep Composition API decisions explicit for Vue 2.6 repos.
|
|
18
|
+
6. Validate with the smallest useful Vite dev or build command.
|
|
19
|
+
|
|
20
|
+
## Default Decisions
|
|
21
|
+
|
|
22
|
+
- Prefer bundled workers over CDN workers in Vite-based Vue 2 repos.
|
|
23
|
+
- Keep UnoCSS or Tailwind resets before Markstream CSS.
|
|
24
|
+
- Use the generic `markstream-vue2` skill only when the bundler-specific choice does not matter.
|
|
25
|
+
|
|
26
|
+
## Useful Doc Targets
|
|
27
|
+
|
|
28
|
+
- `docs/guide/vue2-quick-start.md`
|
|
29
|
+
- `docs/guide/vue2-installation.md`
|
|
30
|
+
- `docs/guide/tailwind.md`
|
|
31
|
+
- `docs/guide/troubleshooting.md`
|
package/README.md
CHANGED
|
@@ -25,6 +25,7 @@ Looking for other frameworks?
|
|
|
25
25
|
## Contents
|
|
26
26
|
|
|
27
27
|
- [TL;DR Highlights](#tldr-highlights)
|
|
28
|
+
- [Choose Your Path](#choose-your-path)
|
|
28
29
|
- [Try It Now](#-try-it-now)
|
|
29
30
|
- [Community & support](#-community--support)
|
|
30
31
|
- [Quick Start](#-quick-start)
|
|
@@ -56,6 +57,17 @@ Looking for other frameworks?
|
|
|
56
57
|
- Works with **raw Markdown strings or pre-parsed nodes**, supports **custom Vue components** inline.
|
|
57
58
|
- TypeScript-first, ship-ready defaults — import CSS and render.
|
|
58
59
|
|
|
60
|
+
## Choose Your Path
|
|
61
|
+
|
|
62
|
+
| If you want to... | Start here | Then go to |
|
|
63
|
+
| --- | --- | --- |
|
|
64
|
+
| get the first render on screen | [Quick Start](#-quick-start) | [Installation guide](https://markstream-vue-docs.simonhe.me/guide/installation) |
|
|
65
|
+
| integrate it into a docs site or VitePress theme | [Docs Site & VitePress](https://markstream-vue-docs.simonhe.me/guide/vitepress-docs-integration) | [Custom Tags & Advanced Components](https://markstream-vue-docs.simonhe.me/guide/custom-components) |
|
|
66
|
+
| build an AI chat UI or SSE stream | [AI Chat & Streaming](https://markstream-vue-docs.simonhe.me/guide/ai-chat-streaming) | [Performance](https://markstream-vue-docs.simonhe.me/guide/performance) |
|
|
67
|
+
| replace one built-in renderer | [Override Built-in Components](https://markstream-vue-docs.simonhe.me/guide/component-overrides) | [Renderer & Node Components](https://markstream-vue-docs.simonhe.me/guide/components) |
|
|
68
|
+
| add trusted tags such as `thinking` | [Custom Tags & Advanced Components](https://markstream-vue-docs.simonhe.me/guide/custom-components) | [API Reference](https://markstream-vue-docs.simonhe.me/guide/api) |
|
|
69
|
+
| debug a broken integration but do not know why yet | [Troubleshooting by Symptom](https://markstream-vue-docs.simonhe.me/guide/troubleshooting-path) | [Troubleshooting](https://markstream-vue-docs.simonhe.me/guide/troubleshooting) |
|
|
70
|
+
|
|
59
71
|
## 🚀 Try It Now
|
|
60
72
|
|
|
61
73
|
- Playground (interactive demo): https://markstream-vue.simonhe.me/
|
|
@@ -68,6 +80,37 @@ Looking for other frameworks?
|
|
|
68
80
|
- Nuxt playground: `pnpm play:nuxt`
|
|
69
81
|
- Discord: https://discord.gg/vkzdkjeRCW
|
|
70
82
|
|
|
83
|
+
## CLI helpers for skills and prompts
|
|
84
|
+
|
|
85
|
+
If you want the packaged AI assets without cloning the repo:
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
npx skills add Simon-He95/markstream-vue
|
|
89
|
+
npx markstream-vue skills list
|
|
90
|
+
npx markstream-vue skills install
|
|
91
|
+
npx markstream-vue prompts list
|
|
92
|
+
npx markstream-vue prompts show install-markstream
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
Recommended usage:
|
|
96
|
+
|
|
97
|
+
- `npx skills add Simon-He95/markstream-vue` is the primary path for Codex-compatible skill discovery because it reads `.agents/skills` directly from the GitHub repository
|
|
98
|
+
- `skills install` installs the bundled skills into your agent skill directory (default: `~/.agents/skills`)
|
|
99
|
+
- `prompts list` and `prompts show` to discover and copy maintained prompt templates
|
|
100
|
+
|
|
101
|
+
Other `npx skills add` forms also work:
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
# Full GitHub URL
|
|
105
|
+
npx skills add https://github.com/Simon-He95/markstream-vue
|
|
106
|
+
|
|
107
|
+
# Direct path to one skill in this repo
|
|
108
|
+
npx skills add https://github.com/Simon-He95/markstream-vue/tree/main/.agents/skills/markstream-install
|
|
109
|
+
|
|
110
|
+
# Any git URL
|
|
111
|
+
npx skills add git@github.com:Simon-He95/markstream-vue.git
|
|
112
|
+
```
|
|
113
|
+
|
|
71
114
|
## 💬 Community & support
|
|
72
115
|
|
|
73
116
|
- Discussions: https://github.com/Simon-He95/markstream-vue/discussions
|
|
@@ -76,6 +119,14 @@ Looking for other frameworks?
|
|
|
76
119
|
|
|
77
120
|
The test page gives you an editor + live preview plus “generate share link” that encodes the input in the URL (with a fallback to open directly or pre-fill a GitHub Issue for long payloads).
|
|
78
121
|
|
|
122
|
+
## Support the project
|
|
123
|
+
|
|
124
|
+
If markstream-vue helps your work, you can support ongoing maintenance with one of these QR codes.
|
|
125
|
+
|
|
126
|
+
| Alipay | WeChat Pay |
|
|
127
|
+
| --- | --- |
|
|
128
|
+
| <img src="https://raw.githubusercontent.com/Simon-He95/markstream-vue/main/docs/public/sponsor/zhifubao.jpg" alt="Alipay QR code" width="240" /> | <img src="https://raw.githubusercontent.com/Simon-He95/markstream-vue/main/docs/public/sponsor/weixin.jpg" alt="WeChat Pay QR code" width="240" /> |
|
|
129
|
+
|
|
79
130
|
## ⚡ Quick Start
|
|
80
131
|
|
|
81
132
|
```bash
|