Repository navigation
feat(code): add comark-code, copy and wrap buttons on code blocks and actions of your own - #46
Conversation
🚀 Deploying Preview to Cloudflare 🚀Preview Deployments by commit
|
comark-annotate
comark-carousel
comark-charts
comark-code
comark-embed
comark-github-callouts
comark-include
comark-lint
comark-tabs
comark-zoom
commit: |
Latest result Pull request merged. Final answersSession Pull request merged. Session Waiting for GitHub merge request c6dd82dd-fb6f-4abc-ba51-0d6cb321f9f5. Session Restored the docs index card-copy and window-tab runtime handlers, which caused the three reported e2e failures, and fixed the docs stylesheet formatting issue. Pushed the single repair commit; current-head checks are pending. Local validation was limited by the host pnpm SQLite store error. Session Restored the docs index card-copy and window-tab runtime handlers, which caused the three reported e2e failures, and fixed the docs stylesheet formatting issue. Pushed the single repair commit; current-head checks are pending. Local validation was limited by the host pnpm SQLite store error. Session Restored the docs index card-copy and window-tab runtime handlers, which caused the three reported e2e failures, and fixed the docs stylesheet formatting issue. Pushed the single repair commit; current-head checks are pending. Local validation was limited by the host pnpm SQLite store error. Session Restored the docs index card-copy and window-tab runtime handlers, which caused the three reported e2e failures, and fixed the docs stylesheet formatting issue. Pushed the single repair commit; current-head checks are pending. Local validation was limited by the host pnpm SQLite store error. Session Restored the docs index card-copy and window-tab runtime handlers, which caused the three reported e2e failures, and fixed the docs stylesheet formatting issue. Pushed the single repair commit; current-head checks are pending. Local validation was limited by the host pnpm SQLite store error. Session Restored the docs index card-copy and window-tab runtime handlers, which caused the three reported e2e failures, and fixed the docs stylesheet formatting issue. Pushed the single repair commit; current-head checks are pending. Local validation was limited by the host pnpm SQLite store error. Session Restored the docs index card-copy and window-tab runtime handlers, which caused the three reported e2e failures, and fixed the docs stylesheet formatting issue. Pushed the single repair commit; current-head checks are pending. Local validation was limited by the host pnpm SQLite store error. Session Restored the docs index card-copy and window-tab runtime handlers, which caused the three reported e2e failures, and fixed the docs stylesheet formatting issue. Pushed the single repair commit; current-head checks are pending. Local validation was limited by the host pnpm SQLite store error. Session Restored the docs index card-copy and window-tab runtime handlers, which caused the three reported e2e failures, and fixed the docs stylesheet formatting issue. Pushed the single repair commit; current-head checks are pending. Local validation was limited by the host pnpm SQLite store error. |
Shared guides for renderers, theming, validation, and agents replace the sections each package page copied. Recipes show annotate with zoom groups, carousels, and a whole review document. The sidebar groups every page, and a package's For agents button installs only its own skill.
… actions of your own
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
- New code-block package — Reviewed the parse plugin, shared browser runtime, CSS, HTML/Vue/React/Svelte renderers, package exports, and public documentation for Copy, Wrap, and custom action buttons.
- Renderer and lifecycle integration — Traced the HTML
prehandler against Comark's renderer state semantics and checked the framework component cleanup/reference-counting behavior. - Code-group and workspace integration — Reviewed the tabs CSS adjustment, optional lint loading, package build configuration, tests, and lockfile changes.
gpt-5.6-sol | 𝕏
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
- Documentation restructure integration — Reviewed the new
/code/links and Page behavior grouping, the shared Renderers, Theming, and Validation guide updates, and the docs build's updated TOC selector. - Feature documentation consistency — Confirmed the incremental edits preserve the package's documented renderer imports, shared styling guidance, and validation behavior without changing runtime code.
gpt-5.6-sol | 𝕏
There was a problem hiding this comment.
Important
The merge-resolution commit removes comark-charts from the generated Agent Skills discovery indexes, so the existing charts skill is no longer discoverable from the deployed docs site.
Reviewed changes
- Resolved the stacked docs merge — Reviewed the new
ddde964changes to the docs builder, page navigation, chart/code documentation integration, and workspace configuration. - Preserved code package behavior — Rechecked the
comark-coderenderer, runtime, action metadata, tabs integration, and framework/package exports in the full PR context. - Validated prior review state — Confirmed the earlier Pullfrog reviews have no open threads requiring retirement.
gpt-5.6-sol | 𝕏
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
- Restored charts skill discovery — Rechecked the new docs build output path and confirmed the charts skill is copied alongside annotate and included in both Agent Skills discovery manifests.
- Revalidated the incremental delta — Reviewed the docs build restructuring, code documentation updates, and dependency ordering in the full PR context; no additional behavioral regressions were found.
- Retired the prior concern — Confirmed the issue reported against
ddde964is addressed by826de74.
gpt-5.6-sol | 𝕏
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
- Resolved merge conflicts — Rechecked the latest
3b9b3dcdelta: the root Doctor config now has one components declaration,comark-tabsparser-only blocks are recognized bycomark-lint, and code-group CSS still joins.ck-wrapped code blocks to their headers. - Preserved prior fixes — Confirmed the restored annotate and charts Agent Skills discovery remains present in the current full diff and was not regressed by the latest merge-resolution changes.
gpt-5.6-sol | 𝕏
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
- Restored docs interactions — Rechecked the package-card copy buttons, installer behavior, and the index window's tab and reduced-motion interactions after the merge-resolution commits.
- Removed obsolete docs copy UI — Confirmed the old hand-rolled
precopy selector and related styles were removed without affecting the newcomark-codecontrols. - Preserved prior fixes — Revalidated the charts skill discovery restoration and the existing code-package, tabs, and framework integration in the current full diff.
gpt-5.6-sol | 𝕏
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
- Restored docs interactions — Rechecked the new commit's restoration of package-card copy handlers and the index window tab, keyboard, indicator, and typing transitions, plus the removal of obsolete generic code-copy styling.
gpt-5.6-sol | 𝕏

Stacked on #47 (docs restructure); merge that first, and this PR's base switches to
main.Adds
comark-code, a new package that puts Copy and Wrap buttons on every code block, like T3 Code's code blocks, plus buttons of your own, such as Run, that hand the block's code to the host app. It has renderers for HTML, Vue, React, and Svelte that output the same markup, an inlined script withstart()/stop(),style.css, docs at/code/, and e2e tests.What it does
pre. Each one wraps the block, rendered as it would be without the plugin, in<div class="ck">with a.ck-barof buttons. Shiki's classes and the host'sprestyles still apply. The wrapper has no padding or border, so the block's margins collapse through it and the bar sits in the block's top right corner.comark-tabslooks forprechildren in::code-group. Wrapping at parse time would break code groups whenevercode()came beforetabs(). Overridingprein the renderers works in either order (tested both).actions: [{ id, label }]ontoprenodes whose language matches. Copy and Wrap need only the components. The HTML renderer removesactionsfrom both the node andstate.renderData.propsbefore calling Comark's default handler, since in HTML mode that handler writes the resolved props.buttons()inclient.tsbuilds the inside of the bar from escaped text, and every renderer inlines it (innerHTML,dangerouslySetInnerHTML,{@html}), so the four can't drift apart.code.textContent, shows a check, and announces "Copied" through arole="status". Without clipboard access (plain http, a frame that isn't allowed it), it selects the code and says to press Ctrl+C or ⌘C.data-code-wrapandaria-pressedon one block, and isn't saved. Its rule sits outside thecomarklayer, because pages setwhite-spaceon code blocks with plain rules.comark-code-actionCustomEventwith{ action, code, language }.HTMLElementEventMap,DocumentEventMap, andWindowEventMapare augmented, soevent.detailis typed. The plugin never runs anything itself.:focus-within, and always on touch screens.Other changes
.ct-panel>.ck>pre. The e2e test checks that the block still meets the header with square top corners.comark-code/htmlas an optional peer dependency, like the others./code/follows the new structure. It sits under Page behavior and links the shared guides instead of repeating them. Code also gets a row in the Renderers guide, its.ckroot in Theming, and a mention in Validation (it has nothing to report). The site renders its code blocks with the plugin, so its hand-rolled copy script and.copystyles are gone. I removed the forcedpre-wrapontxtblocks too, because with it the Wrap button did nothing there.comark-codeneeds a trusted publisher on npmjs.com (workflowrelease.yaml, environmentnpm) before its first release.Checks
pnpm readypasses: format, build, lint, typecheck, 178 tests, Vite Doctor, and the docs lint. Its two lint warnings are ine2e/annotate.e2e.ts, which this PR doesn't touch./code/in the new layout, and of a code group in light and dark.🤖 Generated with Claude Code