@openreceive/react 0.3.1 → 0.3.3
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/dist/index.d.ts +15 -1
- package/dist/index.js +532 -364
- package/dist/styles.css +1 -1
- package/package.json +4 -3
- package/skills/debug-openreceive-payment/SKILL.md +88 -0
- package/skills/integrate-openreceive/SKILL.md +116 -0
- package/skills/integrate-openreceive/references/node.md +480 -0
- package/skills/integrate-openreceive/references/rails.md +568 -0
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { CheckoutComponentProps, CheckoutState, QrEncoder, BrowserLoggerOption, CheckoutStatusRefresh, Status, SwapRefundStaging, CheckoutSnapshot, AssetUrlResolver, BrowserLogContext, CheckoutInvoiceSnapshot,
|
|
2
|
+
import { CheckoutComponentProps, CheckoutState, QrEncoder, BrowserLoggerOption, CheckoutStatusRefresh, Status, SwapRefundStaging, CheckoutSnapshot, AssetUrlResolver, ThemePreference, BrowserLogContext, CheckoutInvoiceSnapshot, ResolvedTheme, ThemeModel, CheckoutPhase, CheckoutStatusModel, UnixSeconds, BrowserLogger, TransactionDetailsSource } from '@openreceive/browser/headless';
|
|
3
3
|
export { TransactionDetailsSource, resolveTransactionDetailRows } from '@openreceive/browser/headless';
|
|
4
4
|
|
|
5
5
|
interface CheckoutData {
|
|
@@ -164,11 +164,23 @@ interface CheckoutProps extends CheckoutComponentProps, CheckoutEventHandlers, O
|
|
|
164
164
|
readonly children?: CheckoutChildren;
|
|
165
165
|
/** Passed through to the payment wizard. See {@link PaymentWizardProps.resolveAssetUrl}. */
|
|
166
166
|
readonly resolveAssetUrl?: AssetUrlResolver;
|
|
167
|
+
/**
|
|
168
|
+
* Lock the checkout to one theme. Wins over the stored preference and any
|
|
169
|
+
* ancestor ThemeScope, and hides the toggle: a host embedding the checkout in
|
|
170
|
+
* a page that is already dark passes `theme="dark"` and is done. `"system"`
|
|
171
|
+
* locks to `prefers-color-scheme`, ignoring the stored preference. Unset (the
|
|
172
|
+
* default), the payer's stored choice applies, falling back to
|
|
173
|
+
* `defaultTheme`, falling back to the system scheme. The custom element's
|
|
174
|
+
* `theme` attribute is the same lock.
|
|
175
|
+
*/
|
|
176
|
+
readonly theme?: ThemePreference;
|
|
167
177
|
}
|
|
168
178
|
interface UseThemeOptions {
|
|
169
179
|
readonly defaultTheme?: ThemePreference;
|
|
170
180
|
readonly storageKey?: string;
|
|
171
181
|
readonly storage?: Storage;
|
|
182
|
+
/** Lock: this preference wins over storage and scope, and `setTheme` becomes a no-op. */
|
|
183
|
+
readonly theme?: ThemePreference;
|
|
172
184
|
}
|
|
173
185
|
interface UseThemeResult {
|
|
174
186
|
readonly theme: ThemePreference;
|
|
@@ -195,6 +207,8 @@ interface ThemeScopeProps extends Omit<React.HTMLAttributes<HTMLElement>, "child
|
|
|
195
207
|
readonly defaultTheme?: ThemePreference;
|
|
196
208
|
readonly storageKey?: string;
|
|
197
209
|
readonly storage?: Storage;
|
|
210
|
+
/** Lock: this preference wins over storage, and the toggle is not rendered. */
|
|
211
|
+
readonly theme?: ThemePreference;
|
|
198
212
|
readonly themeToggle?: boolean;
|
|
199
213
|
readonly topbarClassName?: string;
|
|
200
214
|
readonly themeToggleClassName?: string;
|