Skip to content

feat: improve embed wrapper ergonomics#5

Merged
markbang merged 4 commits into
mainfrom
feat/embed-wrapper-ergonomics
Mar 9, 2026
Merged

feat: improve embed wrapper ergonomics#5
markbang merged 4 commits into
mainfrom
feat/embed-wrapper-ergonomics

Conversation

@markbang
Copy link
Copy Markdown
Owner

@markbang markbang commented Mar 9, 2026

Summary

  • let the React wrapper render pre-fetched memo data and work cleanly in Next.js client boundaries
  • add stronger blog customization tools with extendTheme(), optional built-in style disabling, and Web Component ::part(...) guidance
  • add multi-memo helpers with fetchMemos() and renderMemoListHtmlSnippet() for roundups, weekly notes, and archive pages
  • add MemoEmbedList to the React package so React/MDX blogs can render multiple memo cards with one shared style block
  • add createMemoClient() in core plus MemoClientProvider in React for cross-embed request deduping on pages with many embeds
  • expand docs and examples for Next.js, MDX, Astro, and static-site integrations
  • keep artifact consumer smoke coverage aligned by overriding transitive package resolution to local tarballs

Testing

  • pnpm validate

@vercel
Copy link
Copy Markdown

vercel Bot commented Mar 9, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
memos-embed-site Ready Ready Preview, Comment Mar 9, 2026 7:43am

Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 14 files

Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 29 files (changes from recent commits).

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="packages/memos-embed/src/__tests__/theme.test.ts">

<violation number="1" location="packages/memos-embed/src/__tests__/theme.test.ts:6">
P2: This test case does not match its stated behavior: it checks omitted input, not an unknown theme name, leaving the unknown-string fallback path untested.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.


describe("resolveTheme", () => {
it("falls back to the default theme for unknown input", () => {
expect(resolveTheme()).toEqual(themePresets.minimal);
Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot Mar 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: This test case does not match its stated behavior: it checks omitted input, not an unknown theme name, leaving the unknown-string fallback path untested.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At packages/memos-embed/src/__tests__/theme.test.ts, line 6:

<comment>This test case does not match its stated behavior: it checks omitted input, not an unknown theme name, leaving the unknown-string fallback path untested.</comment>

<file context>
@@ -0,0 +1,50 @@
+
+describe("resolveTheme", () => {
+	it("falls back to the default theme for unknown input", () => {
+		expect(resolveTheme()).toEqual(themePresets.minimal);
+	});
+});
</file context>
Fix with Cubic

@markbang markbang merged commit c56d489 into main Mar 9, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant