feat(react,elements): white-label theming API for the checkout widget#46
Merged
aguilar1x merged 12 commits intoJul 19, 2026
Merged
Conversation
…ing build index.ts carried a broken merge artifact: a full inline SDK implementation (init/Pacto/PactoSession + FX getQuote) that redeclared exports already re-exported from ./client.js and referenced names it never imported, so core failed to type-check and build. client.ts is the real, compiling implementation. Removes the duplicated inline block so index.ts is a pure barrel over client.ts and the submodules, and drops the orphaned getQuote/PactoFxQuote tests (the FX-quote surface never compiled and is unused; the gateway has its own independent FX implementation). Unblocks the core build required by PACTO-LAT#45.
…nder error next@14 hoists React 18 to the root while this package pins React 19, so @testing-library/react and the component under test resolved to two different React copies — throwing 'Objects are not valid as a React child'. Alias both React packages to the root copy in the vitest config so tests run against one instance. Does not affect the shipped build (React stays a peer dependency).
…-check Pre-existing breakage from the otc-quote merge: the ApiKey model gained a required quoteSpreadBps column but several test fixtures were never updated, failing tsc in CI. Not related to the theming feature, but fixed here to keep CI green.
Two pre-existing api-docs generator issues, surfaced by the theming API's
new types:
- next build failed rendering core/react api-reference: JSDoc placeholders
like {amount}/{escrowId} rendered outside code blocks, which MDX evaluates
as JS expressions. Escape braces (and keep the existing custom-element
escaping) in prose so they render literally.
- The freshness check drifted on every commit because TypeDoc embedded the
HEAD commit SHA in source links. Pin --gitRevision main so links are stable
and the check can actually pass.
Regenerated core/react/elements api-reference with the fixed generator.
felipevega2x
force-pushed
the
feat/white-label-theming
branch
from
July 19, 2026 02:15
32cfc17 to
dfc2e8f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements the white-label theming API for the checkout widget.
What
--pacto-*CSS variables (colors, typography, radius,spacing), shared by connect-react and connect-elements via connect-core.
themeprop/option plus documented raw CSS variables.logoUrl/logoAlt) in the checkout header.en/eslocale support with deep-mergeablemessagesoverrides and adocumented path to add locales.
/theming) covering all three.Notes
dictionary in connect-core (en defaults unchanged, existing tests green).
connect-core/src/index.ts(duplicateinit/Pacto exports) that blocked the build.
Acceptance criteria
Tests
core 61/61 · elements 28/28 · react 16/16 · type-check + biome clean.
Closes #45