@coinlist-co/react 0.5.0 → 0.6.0
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/{chunk-N3WBC2VS.js → chunk-5C4TEVM7.js} +2 -2
- package/dist/{chunk-V6WO67RO.js → chunk-7SB2GKEU.js} +1 -1
- package/dist/{chunk-V6WO67RO.js.map → chunk-7SB2GKEU.js.map} +1 -1
- package/dist/chunk-UEJVCU2J.js +43 -0
- package/dist/chunk-UEJVCU2J.js.map +1 -0
- package/dist/client/index.cjs +441 -302
- package/dist/client/index.cjs.map +1 -1
- package/dist/client/index.d.cts +33 -3
- package/dist/client/index.d.ts +33 -3
- package/dist/client/index.js +422 -308
- package/dist/client/index.js.map +1 -1
- package/dist/{requirement-BEO42QOr.d.ts → requirement-Dk6nYN1c.d.cts} +8 -6
- package/dist/{requirement-BEO42QOr.d.cts → requirement-Dk6nYN1c.d.ts} +8 -6
- package/dist/server/index.cjs +41 -9
- package/dist/server/index.cjs.map +1 -1
- package/dist/server/index.d.cts +68 -8
- package/dist/server/index.d.ts +68 -8
- package/dist/server/index.js +42 -11
- package/dist/server/index.js.map +1 -1
- package/dist/shared/index.cjs +68 -19
- package/dist/shared/index.cjs.map +1 -1
- package/dist/shared/index.d.cts +23 -3
- package/dist/shared/index.d.ts +23 -3
- package/dist/shared/index.js +8 -4
- package/dist/shared/index.js.map +1 -1
- package/package.json +27 -28
- package/dist/chunk-CRACFEJ4.js +0 -17
- package/dist/chunk-CRACFEJ4.js.map +0 -1
- package/dist/client/styles.css +0 -2
- /package/dist/{chunk-N3WBC2VS.js.map → chunk-5C4TEVM7.js.map} +0 -0
package/dist/client/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import * as react from 'react';
|
|
3
3
|
import { ReactNode } from 'react';
|
|
4
|
-
import { A as AuthorizationCode, C as CodeVerifier, a as Config, O as OAuthAccessToken, b as Offer, P as PaginationParams, c as PaginatedResponse, d as OfferId, e as OfferDetail, f as Participation, g as ParticipationsPaginationParams, h as ParticipationId, i as CreateParticipationParams, j as OfferOptionId, R as Requirement, k as RequirementStatusInfo, l as RequirementType, m as RequirementStatusValue } from '../requirement-
|
|
4
|
+
import { A as AuthorizationCode, C as CodeVerifier, a as Config, O as OAuthAccessToken, b as Offer, P as PaginationParams, c as PaginatedResponse, d as OfferId, e as OfferDetail, f as Participation, g as ParticipationsPaginationParams, h as ParticipationId, i as CreateParticipationParams, j as OfferOptionId, R as Requirement, k as RequirementStatusInfo, l as RequirementType, m as RequirementStatusValue } from '../requirement-Dk6nYN1c.cjs';
|
|
5
5
|
|
|
6
6
|
type AuthState = 'unknown' | 'logged-in' | 'logged-out';
|
|
7
7
|
/** Discriminated error reasons from {@link CoinListClient.completeOAuth}. */
|
|
@@ -170,10 +170,40 @@ type CoinListProviderProps = {
|
|
|
170
170
|
children: ReactNode;
|
|
171
171
|
};
|
|
172
172
|
/**
|
|
173
|
-
* Provide CoinList (api + config) to the tree
|
|
173
|
+
* Provide CoinList (api + config) to the tree WITHOUT any styling. Renders only the
|
|
174
|
+
* React context: no DOM, no <style>, no .clco-sdk-root. Safe to mount app-wide:
|
|
175
|
+
* it has zero visual impact on the host's own pages.
|
|
176
|
+
*
|
|
177
|
+
* Use this when you need useCoinList() available app-wide. Wrap SDK visual components
|
|
178
|
+
* in {@link CoinListStyleScope} separately. For dropping in a single widget, use the
|
|
179
|
+
* all-in-one {@link CoinListProvider}.
|
|
180
|
+
*/
|
|
181
|
+
declare function CoinListContextProvider({ config, children, }: CoinListProviderProps): react_jsx_runtime.JSX.Element;
|
|
182
|
+
/**
|
|
183
|
+
* All-in-one provider: the React context plus the SDK styling wrapper. Convenience for
|
|
184
|
+
* dropping in a single widget. Composes {@link CoinListContextProvider} and
|
|
185
|
+
* {@link CoinListStyleScope}.
|
|
186
|
+
*
|
|
187
|
+
* Caution: this applies SDK styling (.clco-sdk-root) to everything below it. If you need
|
|
188
|
+
* context app-wide without styling the host's pages, mount {@link CoinListContextProvider}
|
|
189
|
+
* at the root and wrap only SDK visual components in {@link CoinListStyleScope}.
|
|
174
190
|
*/
|
|
175
191
|
declare function CoinListProvider({ config, children }: CoinListProviderProps): react_jsx_runtime.JSX.Element;
|
|
176
192
|
|
|
193
|
+
type CoinListStyleScopeProps = {
|
|
194
|
+
children: ReactNode;
|
|
195
|
+
};
|
|
196
|
+
/**
|
|
197
|
+
* Render the SDK styling wrapper: the Inter font links and the .clco-sdk-root div
|
|
198
|
+
* with the self-contained, scoped <style> injection. Mount this around SDK visual
|
|
199
|
+
* components only. Keep it off the host's own pages to avoid styling them.
|
|
200
|
+
*
|
|
201
|
+
* This component self-injects all SDK styles via an inline <style> tag so consumers
|
|
202
|
+
* do not need to import any CSS files or configure their bundler. Styles are fully
|
|
203
|
+
* scoped to .clco-sdk-root and do not leak to the host page.
|
|
204
|
+
*/
|
|
205
|
+
declare function CoinListStyleScope({ children }: CoinListStyleScopeProps): react_jsx_runtime.JSX.Element;
|
|
206
|
+
|
|
177
207
|
interface CoinListSignInCardProps {
|
|
178
208
|
state?: 'idle' | 'error';
|
|
179
209
|
/**
|
|
@@ -535,4 +565,4 @@ interface UseParticipationsResult {
|
|
|
535
565
|
*/
|
|
536
566
|
declare function useParticipations(offerId?: OfferId, options?: UseParticipationsOptions): UseParticipationsResult;
|
|
537
567
|
|
|
538
|
-
export { type AuthState, ChecklistStatus, type ClientConfig, type CoinListClient, CoinListClientInitializationError, CoinListContext, type CoinListContextValue, CoinListProvider, type CoinListProviderProps, CoinListSignInCard, type CoinListSignInCardProps, type CompleteOAuthFailureReason, type LoadOfferDetailsReason, type LoadOfferDetailsState, type LoadOffersReason, type LoadOffersState, type LoadParticipationsReason, type LoadParticipationsState, type LoadRequirementsReason, type LoadRequirementsState, OAUTH_CODE_VERIFIER_KEY, OAUTH_STATE_KEY, type OauthClientErrorReason, type OauthClientResult, OfferCard, type Props as OfferCardProps, OfferCardUi, OffersGrid, type OffersGridProps, RequirementItem, type RequirementItemProps, RequirementItemUi, RequirementStatus, RequirementVariant, RequirementsChecklist, type RequirementsChecklistProps, type RequirementsData, type UseCoinListResult, type UseCompleteOAuthOptions, type UseOfferDetailsOptions, type UseOfferDetailsResult, type UseOffersOptions, type UseOffersResult, type UseParticipationsOptions, type UseParticipationsResult, type UseRequirementsOptions, type UseRequirementsResult, createCoinListClient, useCoinList, useCompleteOAuth, useOfferDetails, useOffers, useParticipations, useRequirements };
|
|
568
|
+
export { type AuthState, ChecklistStatus, type ClientConfig, type CoinListClient, CoinListClientInitializationError, CoinListContext, CoinListContextProvider, type CoinListContextValue, CoinListProvider, type CoinListProviderProps, CoinListSignInCard, type CoinListSignInCardProps, CoinListStyleScope, type CoinListStyleScopeProps, type CompleteOAuthFailureReason, type LoadOfferDetailsReason, type LoadOfferDetailsState, type LoadOffersReason, type LoadOffersState, type LoadParticipationsReason, type LoadParticipationsState, type LoadRequirementsReason, type LoadRequirementsState, OAUTH_CODE_VERIFIER_KEY, OAUTH_STATE_KEY, type OauthClientErrorReason, type OauthClientResult, OfferCard, type Props as OfferCardProps, OfferCardUi, OffersGrid, type OffersGridProps, RequirementItem, type RequirementItemProps, RequirementItemUi, RequirementStatus, RequirementVariant, RequirementsChecklist, type RequirementsChecklistProps, type RequirementsData, type UseCoinListResult, type UseCompleteOAuthOptions, type UseOfferDetailsOptions, type UseOfferDetailsResult, type UseOffersOptions, type UseOffersResult, type UseParticipationsOptions, type UseParticipationsResult, type UseRequirementsOptions, type UseRequirementsResult, createCoinListClient, useCoinList, useCompleteOAuth, useOfferDetails, useOffers, useParticipations, useRequirements };
|
package/dist/client/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import * as react from 'react';
|
|
3
3
|
import { ReactNode } from 'react';
|
|
4
|
-
import { A as AuthorizationCode, C as CodeVerifier, a as Config, O as OAuthAccessToken, b as Offer, P as PaginationParams, c as PaginatedResponse, d as OfferId, e as OfferDetail, f as Participation, g as ParticipationsPaginationParams, h as ParticipationId, i as CreateParticipationParams, j as OfferOptionId, R as Requirement, k as RequirementStatusInfo, l as RequirementType, m as RequirementStatusValue } from '../requirement-
|
|
4
|
+
import { A as AuthorizationCode, C as CodeVerifier, a as Config, O as OAuthAccessToken, b as Offer, P as PaginationParams, c as PaginatedResponse, d as OfferId, e as OfferDetail, f as Participation, g as ParticipationsPaginationParams, h as ParticipationId, i as CreateParticipationParams, j as OfferOptionId, R as Requirement, k as RequirementStatusInfo, l as RequirementType, m as RequirementStatusValue } from '../requirement-Dk6nYN1c.js';
|
|
5
5
|
|
|
6
6
|
type AuthState = 'unknown' | 'logged-in' | 'logged-out';
|
|
7
7
|
/** Discriminated error reasons from {@link CoinListClient.completeOAuth}. */
|
|
@@ -170,10 +170,40 @@ type CoinListProviderProps = {
|
|
|
170
170
|
children: ReactNode;
|
|
171
171
|
};
|
|
172
172
|
/**
|
|
173
|
-
* Provide CoinList (api + config) to the tree
|
|
173
|
+
* Provide CoinList (api + config) to the tree WITHOUT any styling. Renders only the
|
|
174
|
+
* React context: no DOM, no <style>, no .clco-sdk-root. Safe to mount app-wide:
|
|
175
|
+
* it has zero visual impact on the host's own pages.
|
|
176
|
+
*
|
|
177
|
+
* Use this when you need useCoinList() available app-wide. Wrap SDK visual components
|
|
178
|
+
* in {@link CoinListStyleScope} separately. For dropping in a single widget, use the
|
|
179
|
+
* all-in-one {@link CoinListProvider}.
|
|
180
|
+
*/
|
|
181
|
+
declare function CoinListContextProvider({ config, children, }: CoinListProviderProps): react_jsx_runtime.JSX.Element;
|
|
182
|
+
/**
|
|
183
|
+
* All-in-one provider: the React context plus the SDK styling wrapper. Convenience for
|
|
184
|
+
* dropping in a single widget. Composes {@link CoinListContextProvider} and
|
|
185
|
+
* {@link CoinListStyleScope}.
|
|
186
|
+
*
|
|
187
|
+
* Caution: this applies SDK styling (.clco-sdk-root) to everything below it. If you need
|
|
188
|
+
* context app-wide without styling the host's pages, mount {@link CoinListContextProvider}
|
|
189
|
+
* at the root and wrap only SDK visual components in {@link CoinListStyleScope}.
|
|
174
190
|
*/
|
|
175
191
|
declare function CoinListProvider({ config, children }: CoinListProviderProps): react_jsx_runtime.JSX.Element;
|
|
176
192
|
|
|
193
|
+
type CoinListStyleScopeProps = {
|
|
194
|
+
children: ReactNode;
|
|
195
|
+
};
|
|
196
|
+
/**
|
|
197
|
+
* Render the SDK styling wrapper: the Inter font links and the .clco-sdk-root div
|
|
198
|
+
* with the self-contained, scoped <style> injection. Mount this around SDK visual
|
|
199
|
+
* components only. Keep it off the host's own pages to avoid styling them.
|
|
200
|
+
*
|
|
201
|
+
* This component self-injects all SDK styles via an inline <style> tag so consumers
|
|
202
|
+
* do not need to import any CSS files or configure their bundler. Styles are fully
|
|
203
|
+
* scoped to .clco-sdk-root and do not leak to the host page.
|
|
204
|
+
*/
|
|
205
|
+
declare function CoinListStyleScope({ children }: CoinListStyleScopeProps): react_jsx_runtime.JSX.Element;
|
|
206
|
+
|
|
177
207
|
interface CoinListSignInCardProps {
|
|
178
208
|
state?: 'idle' | 'error';
|
|
179
209
|
/**
|
|
@@ -535,4 +565,4 @@ interface UseParticipationsResult {
|
|
|
535
565
|
*/
|
|
536
566
|
declare function useParticipations(offerId?: OfferId, options?: UseParticipationsOptions): UseParticipationsResult;
|
|
537
567
|
|
|
538
|
-
export { type AuthState, ChecklistStatus, type ClientConfig, type CoinListClient, CoinListClientInitializationError, CoinListContext, type CoinListContextValue, CoinListProvider, type CoinListProviderProps, CoinListSignInCard, type CoinListSignInCardProps, type CompleteOAuthFailureReason, type LoadOfferDetailsReason, type LoadOfferDetailsState, type LoadOffersReason, type LoadOffersState, type LoadParticipationsReason, type LoadParticipationsState, type LoadRequirementsReason, type LoadRequirementsState, OAUTH_CODE_VERIFIER_KEY, OAUTH_STATE_KEY, type OauthClientErrorReason, type OauthClientResult, OfferCard, type Props as OfferCardProps, OfferCardUi, OffersGrid, type OffersGridProps, RequirementItem, type RequirementItemProps, RequirementItemUi, RequirementStatus, RequirementVariant, RequirementsChecklist, type RequirementsChecklistProps, type RequirementsData, type UseCoinListResult, type UseCompleteOAuthOptions, type UseOfferDetailsOptions, type UseOfferDetailsResult, type UseOffersOptions, type UseOffersResult, type UseParticipationsOptions, type UseParticipationsResult, type UseRequirementsOptions, type UseRequirementsResult, createCoinListClient, useCoinList, useCompleteOAuth, useOfferDetails, useOffers, useParticipations, useRequirements };
|
|
568
|
+
export { type AuthState, ChecklistStatus, type ClientConfig, type CoinListClient, CoinListClientInitializationError, CoinListContext, CoinListContextProvider, type CoinListContextValue, CoinListProvider, type CoinListProviderProps, CoinListSignInCard, type CoinListSignInCardProps, CoinListStyleScope, type CoinListStyleScopeProps, type CompleteOAuthFailureReason, type LoadOfferDetailsReason, type LoadOfferDetailsState, type LoadOffersReason, type LoadOffersState, type LoadParticipationsReason, type LoadParticipationsState, type LoadRequirementsReason, type LoadRequirementsState, OAUTH_CODE_VERIFIER_KEY, OAUTH_STATE_KEY, type OauthClientErrorReason, type OauthClientResult, OfferCard, type Props as OfferCardProps, OfferCardUi, OffersGrid, type OffersGridProps, RequirementItem, type RequirementItemProps, RequirementItemUi, RequirementStatus, RequirementVariant, RequirementsChecklist, type RequirementsChecklistProps, type RequirementsData, type UseCoinListResult, type UseCompleteOAuthOptions, type UseOfferDetailsOptions, type UseOfferDetailsResult, type UseOffersOptions, type UseOffersResult, type UseParticipationsOptions, type UseParticipationsResult, type UseRequirementsOptions, type UseRequirementsResult, createCoinListClient, useCoinList, useCompleteOAuth, useOfferDetails, useOffers, useParticipations, useRequirements };
|