@schematichq/schematic-components 1.9.1 → 2.0.1

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.
@@ -1,4 +1,5 @@
1
1
  import { ButtonHTMLAttributes } from 'react';
2
+ import { ClassAttributes } from 'react';
2
3
  import { Context } from 'react';
3
4
  import { DetailedHTMLProps } from 'react';
4
5
  import { FastOmit } from 'styled-components';
@@ -1779,7 +1780,7 @@ declare interface BillingSubscriptionView {
1779
1780
  trialEndSetting?: string | null;
1780
1781
  }
1781
1782
 
1782
- export declare const Box: IStyledComponentBase<"web", Substitute<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, BoxProps>> & string;
1783
+ export declare const Box: IStyledComponentBase<"web", Substitute<ClassAttributes<HTMLDivElement> & HTMLAttributes<HTMLDivElement>, BoxProps>> & string;
1783
1784
 
1784
1785
  export declare type BoxProps = ComponentProps & {
1785
1786
  $viewport?: {
@@ -2526,6 +2527,7 @@ declare interface CompanyPlanDetailResponseData {
2526
2527
  *
2527
2528
  * @type {string}
2528
2529
  * @memberof CompanyPlanDetailResponseData
2530
+ * @deprecated
2529
2531
  */
2530
2532
  audienceType?: string | null;
2531
2533
  /**
@@ -3954,7 +3956,7 @@ declare interface DesignProps_9 {
3954
3956
  };
3955
3957
  }
3956
3958
 
3957
- declare const Element_2: IStyledComponentBase<"web", FastOmit<FastOmit<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof ComponentProps | "$viewport"> & ComponentProps & {
3959
+ declare const Element_2: IStyledComponentBase<"web", FastOmit<FastOmit<ClassAttributes<HTMLDivElement> & HTMLAttributes<HTMLDivElement>, keyof ComponentProps | "$viewport"> & ComponentProps & {
3958
3960
  $viewport?: {
3959
3961
  sm?: TransientCSSProperties;
3960
3962
  md?: TransientCSSProperties;
@@ -3976,9 +3978,9 @@ export declare const EmbedContext: Context<EmbedContextProps>;
3976
3978
 
3977
3979
  export declare interface EmbedContextProps extends EmbedState {
3978
3980
  hydratePublic: () => DebouncedApiPromise<PublicPlansResponseData>;
3979
- hydrate: () => DebouncedApiPromise<ComponentHydrateResponseData>;
3980
- hydrateComponent: (id: string) => DebouncedApiPromise<ComponentHydrateResponseData>;
3981
- hydrateExternal: (fn: () => Promise<ComponentHydrateResponseData>) => DebouncedApiPromise<ComponentHydrateResponseData>;
3981
+ hydrate: () => DebouncedApiPromise<HydrateDataWithCompanyContext>;
3982
+ hydrateComponent: (id: string) => DebouncedApiPromise<HydrateDataWithCompanyContext>;
3983
+ hydrateExternal: (fn: () => Promise<HydrateDataWithCompanyContext>) => DebouncedApiPromise<HydrateDataWithCompanyContext>;
3982
3984
  getUpcomingInvoice: (id: string) => DebouncedApiPromise<HydrateUpcomingInvoiceResponse>;
3983
3985
  getCustomerBalance: () => DebouncedApiPromise<FetchCustomerBalanceResponse>;
3984
3986
  listInvoices: () => DebouncedApiPromise<ListInvoicesResponse>;
@@ -3993,7 +3995,7 @@ export declare interface EmbedContextProps extends EmbedState {
3993
3995
  setError: (error: Error) => void;
3994
3996
  setLayout: (layout: EmbedLayout) => void;
3995
3997
  setCheckoutState: (state: CheckoutState) => void;
3996
- setData: (data: ComponentHydrateResponseData) => void;
3998
+ setData: (data: HydrateDataWithCompanyContext) => void;
3997
3999
  updateSettings: (settings: DeepPartial<EmbedSettings>, options?: {
3998
4000
  update?: boolean;
3999
4001
  }) => void;
@@ -4032,7 +4034,7 @@ export declare interface EmbedState {
4032
4034
  isPending: boolean;
4033
4035
  stale: boolean;
4034
4036
  accessToken?: string;
4035
- data?: HydrateData;
4037
+ data?: HydrateDataWithCompanyContext;
4036
4038
  error?: Error;
4037
4039
  settings: EmbedSettings;
4038
4040
  layout: EmbedLayout;
@@ -5304,7 +5306,7 @@ declare interface FlagDetailResponseData_2 {
5304
5306
  updatedAt: Date;
5305
5307
  }
5306
5308
 
5307
- export declare const Flex: IStyledComponentBase<"web", FastOmit<FastOmit<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof ComponentProps | "$viewport"> & ComponentProps & {
5309
+ export declare const Flex: IStyledComponentBase<"web", FastOmit<FastOmit<ClassAttributes<HTMLDivElement> & HTMLAttributes<HTMLDivElement>, keyof ComponentProps | "$viewport"> & ComponentProps & {
5308
5310
  $viewport?: {
5309
5311
  sm?: TransientCSSProperties;
5310
5312
  md?: TransientCSSProperties;
@@ -5317,7 +5319,7 @@ xl?: TransientCSSProperties;
5317
5319
 
5318
5320
  export declare type FontStyle = keyof ThemeSettings["typography"];
5319
5321
 
5320
- export declare const FussyChild: IStyledComponentBase<"web", FastOmit<FastOmit<FastOmit<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof ComponentProps | "$viewport"> & ComponentProps & {
5322
+ export declare const FussyChild: IStyledComponentBase<"web", FastOmit<FastOmit<FastOmit<ClassAttributes<HTMLDivElement> & HTMLAttributes<HTMLDivElement>, keyof ComponentProps | "$viewport"> & ComponentProps & {
5321
5323
  $viewport?: {
5322
5324
  sm?: TransientCSSProperties;
5323
5325
  md?: TransientCSSProperties;
@@ -5399,7 +5401,7 @@ declare type HTTPQuery = {
5399
5401
  [key: string]: string | number | null | boolean | Array<string | number | null | boolean> | Set<string | number | null | boolean> | HTTPQuery;
5400
5402
  };
5401
5403
 
5402
- declare type HydrateData = PublicPlansResponseData | ComponentHydrateResponseData;
5404
+ declare type HydrateDataWithCompanyContext = ComponentHydrateResponseData;
5403
5405
 
5404
5406
  /**
5405
5407
  *
@@ -5465,7 +5467,7 @@ export declare const initialContext: {
5465
5467
  isPending: boolean;
5466
5468
  stale: boolean;
5467
5469
  accessToken?: string;
5468
- data?: HydrateData;
5470
+ data?: HydrateDataWithCompanyContext;
5469
5471
  error?: Error;
5470
5472
  settings: EmbedSettings;
5471
5473
  layout: EmbedLayout;
@@ -5703,7 +5705,7 @@ declare interface ModalProps extends React.HTMLAttributes<HTMLElement> {
5703
5705
 
5704
5706
  export declare type ModalSize = "sm" | "md" | "lg" | "auto";
5705
5707
 
5706
- export declare const Notice: IStyledComponentBase<"web", FastOmit<FastOmit<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof ComponentProps | "$viewport"> & ComponentProps & {
5708
+ export declare const Notice: IStyledComponentBase<"web", FastOmit<FastOmit<ClassAttributes<HTMLDivElement> & HTMLAttributes<HTMLDivElement>, keyof ComponentProps | "$viewport"> & ComponentProps & {
5707
5709
  $viewport?: {
5708
5710
  sm?: TransientCSSProperties;
5709
5711
  md?: TransientCSSProperties;
@@ -5860,7 +5862,7 @@ declare interface PaymentMethodResponseData {
5860
5862
  updatedAt: Date;
5861
5863
  }
5862
5864
 
5863
- declare type Plan = CompanyPlanDetailResponseData | PlanViewPublicResponseData;
5865
+ declare type Plan = CompanyPlanDetailResponseData;
5864
5866
 
5865
5867
  /**
5866
5868
  * Schematic API
@@ -6126,6 +6128,7 @@ declare interface PlanDetailResponseData {
6126
6128
  *
6127
6129
  * @type {string}
6128
6130
  * @memberof PlanDetailResponseData
6131
+ * @deprecated
6129
6132
  */
6130
6133
  audienceType?: string | null;
6131
6134
  /**
@@ -6594,6 +6597,7 @@ declare interface PlanResponseData {
6594
6597
  *
6595
6598
  * @type {string}
6596
6599
  * @memberof PlanResponseData
6600
+ * @deprecated
6597
6601
  */
6598
6602
  audienceType?: string | null;
6599
6603
  /**
@@ -6661,6 +6665,7 @@ declare interface PlanResponseData_2 {
6661
6665
  *
6662
6666
  * @type {string}
6663
6667
  * @memberof PlanResponseData
6668
+ * @deprecated
6664
6669
  */
6665
6670
  audienceType?: string | null;
6666
6671
  /**
@@ -6717,6 +6722,7 @@ declare interface PlanViewPublicResponseData {
6717
6722
  *
6718
6723
  * @type {string}
6719
6724
  * @memberof PlanViewPublicResponseData
6725
+ * @deprecated
6720
6726
  */
6721
6727
  audienceType?: string | null;
6722
6728
  /**
@@ -7285,7 +7291,7 @@ export declare type PricingTableOptions = {
7285
7291
  onCallToAction?: (plan: PlanViewPublicResponseData | CompanyPlanDetailResponseData) => unknown;
7286
7292
  };
7287
7293
 
7288
- export declare type PricingTableProps = DesignProps_7 & PricingTableOptions;
7294
+ export declare type PricingTableProps = DesignProps_7;
7289
7295
 
7290
7296
  export declare const ProgressBar: ForwardRefExoticComponent<ProgressBarProps & RefAttributes<HTMLDivElement>>;
7291
7297
 
@@ -7371,7 +7377,7 @@ declare interface ResponseContext {
7371
7377
  export declare const Root: ForwardRefExoticComponent<Omit<RootProps, "ref"> & RefAttributes<HTMLDivElement | null>>;
7372
7378
 
7373
7379
  export declare interface RootProps extends Omit<React.HTMLProps<HTMLDivElement>, "data"> {
7374
- data?: ComponentHydrateResponseData;
7380
+ data?: HydrateDataWithCompanyContext;
7375
7381
  settings?: EmbedSettings;
7376
7382
  }
7377
7383
 
@@ -7527,12 +7533,6 @@ declare interface RuleConditionDetailResponseData {
7527
7533
  * @memberof RuleConditionDetailResponseData
7528
7534
  */
7529
7535
  operator: string;
7530
- /**
7531
- *
7532
- * @type {string}
7533
- * @memberof RuleConditionDetailResponseData
7534
- */
7535
- planId?: string | null;
7536
7536
  /**
7537
7537
  *
7538
7538
  * @type {Array<string>}
@@ -7667,12 +7667,6 @@ declare interface RuleConditionDetailResponseData_2 {
7667
7667
  * @memberof RuleConditionDetailResponseData
7668
7668
  */
7669
7669
  operator: string;
7670
- /**
7671
- *
7672
- * @type {string}
7673
- * @memberof RuleConditionDetailResponseData
7674
- */
7675
- planId?: string | null;
7676
7670
  /**
7677
7671
  *
7678
7672
  * @type {Array<string>}
@@ -7759,12 +7753,6 @@ declare interface RuleConditionGroupDetailResponseData {
7759
7753
  * @memberof RuleConditionGroupDetailResponseData
7760
7754
  */
7761
7755
  id: string;
7762
- /**
7763
- *
7764
- * @type {string}
7765
- * @memberof RuleConditionGroupDetailResponseData
7766
- */
7767
- planId?: string | null;
7768
7756
  /**
7769
7757
  *
7770
7758
  * @type {string}
@@ -7815,12 +7803,6 @@ declare interface RuleConditionGroupDetailResponseData_2 {
7815
7803
  * @memberof RuleConditionGroupDetailResponseData
7816
7804
  */
7817
7805
  id: string;
7818
- /**
7819
- *
7820
- * @type {string}
7821
- * @memberof RuleConditionGroupDetailResponseData
7822
- */
7823
- planId?: string | null;
7824
7806
  /**
7825
7807
  *
7826
7808
  * @type {string}
@@ -7883,12 +7865,6 @@ declare interface RuleDetailResponseData {
7883
7865
  * @memberof RuleDetailResponseData
7884
7866
  */
7885
7867
  name: string;
7886
- /**
7887
- *
7888
- * @type {string}
7889
- * @memberof RuleDetailResponseData
7890
- */
7891
- planId?: string | null;
7892
7868
  /**
7893
7869
  *
7894
7870
  * @type {number}
@@ -7963,12 +7939,6 @@ declare interface RuleDetailResponseData_2 {
7963
7939
  * @memberof RuleDetailResponseData
7964
7940
  */
7965
7941
  name: string;
7966
- /**
7967
- *
7968
- * @type {string}
7969
- * @memberof RuleDetailResponseData
7970
- */
7971
- planId?: string | null;
7972
7942
  /**
7973
7943
  *
7974
7944
  * @type {number}
@@ -8197,7 +8167,7 @@ declare type TransientCSSProperties = {
8197
8167
  [Property in keyof React.CSSProperties as `$${string & Property}`]: React.CSSProperties[Property];
8198
8168
  };
8199
8169
 
8200
- export declare const TransitionBox: IStyledComponentBase<"web", Substitute<FastOmit<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof ComponentProps | "$viewport"> & ComponentProps & {
8170
+ export declare const TransitionBox: IStyledComponentBase<"web", Substitute<FastOmit<ClassAttributes<HTMLDivElement> & HTMLAttributes<HTMLDivElement>, keyof ComponentProps | "$viewport"> & ComponentProps & {
8201
8171
  $viewport?: {
8202
8172
  sm?: TransientCSSProperties;
8203
8173
  md?: TransientCSSProperties;
@@ -8456,8 +8426,6 @@ declare interface UsePaymentConfirmationReturn {
8456
8426
  reset: () => void;
8457
8427
  }
8458
8428
 
8459
- export declare function usePrevious<T>(value: T): T | undefined;
8460
-
8461
8429
  export declare function useRequest<TData>(fn: () => Promise<{
8462
8430
  data: TData;
8463
8431
  }> | undefined): [RequestState<TData>, () => Promise<void>];
@@ -8467,7 +8435,7 @@ export declare function useTrialEnd(): {
8467
8435
  formatted: string | undefined;
8468
8436
  };
8469
8437
 
8470
- export declare function useWrapChildren(elements: HTMLElement[]): boolean;
8438
+ export declare function useWrapChildren(ref: React.RefObject<HTMLElement[]>): boolean;
8471
8439
 
8472
8440
  export declare const Viewport: ForwardRefExoticComponent<Omit<ViewportProps, "ref"> & RefAttributes<HTMLDivElement | null>>;
8473
8441