@spaceandtimelabs/makeinfinite-ui 0.65.0 → 0.66.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/index.d.ts CHANGED
@@ -46,6 +46,7 @@ import { PanelResizeHandleProps } from 'react-resizable-panels';
46
46
  import { Popover as Popover_2 } from 'radix-ui';
47
47
  import { Portal } from 'vaul';
48
48
  import { Progress as Progress_2 } from 'radix-ui';
49
+ import { ProjectContextValue } from '../contexts';
49
50
  import { PropsWithChildren } from 'react';
50
51
  import { RadioGroup as RadioGroup_2 } from 'radix-ui';
51
52
  import * as React_2 from 'react';
@@ -120,7 +121,7 @@ declare interface APIContextType {
120
121
  export declare const APIHandler: (baseUrl: string) => {
121
122
  createProject: (description: string, theme: string, siteBackground?: File | null, secretReferences?: string | string[]) => Promise<Response>;
122
123
  createBlankProject: (description: string, theme: string, siteBackground?: File | null, secretReferences?: string | string[]) => Promise<Response>;
123
- getProjects: () => Promise<Response>;
124
+ getProjects: (include_published_info?: boolean) => Promise<Response>;
124
125
  getProjectMetadata: (projectName: string) => Promise<Response>;
125
126
  getSubdomains: (projectName: string) => Promise<Response>;
126
127
  allocateSubdomain: (projectName: string, subdomain: string) => Promise<Response>;
@@ -161,10 +162,10 @@ export declare const APIHandler: (baseUrl: string) => {
161
162
  getUserSpendAnalytics: () => Promise<Response>;
162
163
  getCreatorPointsSum: (projectName?: string | null) => Promise<Response>;
163
164
  getCreatorPointsTop: (n?: number) => Promise<Response>;
165
+ getProjectViewsHistory: (projectName: string, start?: Date, end?: Date, granularity?: "minute" | "hour" | "day" | "month" | "year", limit?: number) => Promise<Response>;
166
+ getProjectViewsTop: (n?: number) => Promise<Response>;
164
167
  };
165
168
 
166
- declare type APIHandlerType = ReturnType<typeof APIHandler>;
167
-
168
169
  export declare const APIProxyHandler: (baseUrl: string, projectHmac?: string) => {
169
170
  getSecrets: () => Promise<Response>;
170
171
  putSecret: (secretReference: string, secret: SecretProperties) => Promise<Response>;
@@ -878,7 +879,6 @@ declare const DropdownMenuTrigger: ForwardRefExoticComponent<DropdownMenu_2.Drop
878
879
  export declare type FetchProjectResponse = {
879
880
  status: string;
880
881
  projects: Project[];
881
- time_taken: string;
882
882
  };
883
883
 
884
884
  declare const Form: <TFieldValues extends FieldValues, TContext = any, TTransformedValues extends FieldValues | undefined = undefined>(props: FormProviderProps<TFieldValues, TContext, TTransformedValues>) => React.JSX.Element;
@@ -914,14 +914,6 @@ declare type GetTagsOptions = {
914
914
 
915
915
  export declare const getUndoTargetCommitForFile: (projectName: string, filePath: string) => Promise<[string, string]>;
916
916
 
917
- declare const gwAPIHandler: (baseUrl: string) => {
918
- getQueryContent: (queryId: string) => Promise<Response>;
919
- getVisuals: (pageNo: number, pageSize: number, scope: string, searchPattern: string, sortBy: string, sortOrder: string, visibility: string, visualType: string) => Promise<Response>;
920
- getSubscription: () => Promise<Response>;
921
- };
922
-
923
- declare type GwAPIHandlerType = ReturnType<typeof gwAPIHandler>;
924
-
925
917
  declare const HoverCard: FC<HoverCard_2.HoverCardProps>;
926
918
 
927
919
  declare const HoverCardContent: ForwardRefExoticComponent<Omit<HoverCard_2.HoverCardContentProps & RefAttributes<HTMLDivElement>, "ref"> & RefAttributes<HTMLDivElement>>;
@@ -1059,6 +1051,7 @@ export declare type Project = {
1059
1051
  updated_at_s: number;
1060
1052
  hmac: string;
1061
1053
  extra_meta?: string | null;
1054
+ published_url?: string;
1062
1055
  };
1063
1056
 
1064
1057
  declare interface ProjectConfig {
@@ -1069,29 +1062,6 @@ declare interface ProjectConfig {
1069
1062
  PROXY_API_BASE_URL: string | null;
1070
1063
  }
1071
1064
 
1072
- declare const ProjectContext: Context<ProjectContextValue | null>;
1073
-
1074
- declare interface ProjectContextValue {
1075
- config: ProjectConfig;
1076
- projectMetadata: ProjectMetadata;
1077
- setProjectMetadata: React.Dispatch<React.SetStateAction<ProjectMetadata>>;
1078
- syncToken: string;
1079
- setSyncToken: () => void;
1080
- selectedComponentId: string;
1081
- setSelectedComponentId: React.Dispatch<React.SetStateAction<string>>;
1082
- selectedComponentXPath: string;
1083
- setSelectedComponentXPath: React.Dispatch<React.SetStateAction<string>>;
1084
- selectedComponentHTML: string;
1085
- setSelectedComponentHTML: React.Dispatch<React.SetStateAction<string>>;
1086
- isComponentSubselected: boolean;
1087
- setIsComponentSubselected: React.Dispatch<React.SetStateAction<boolean>>;
1088
- APIHandler: APIHandlerType;
1089
- gwAPIHandler: GwAPIHandlerType;
1090
- proxyHandler: ProxyHandlerType;
1091
- proxyFetch: ProxyFetchType | null;
1092
- proxyGetView: ProxyGetViewType | null;
1093
- }
1094
-
1095
1065
  declare interface ProjectMetadata {
1096
1066
  projectName: string | null;
1097
1067
  projectURL: string | null;
@@ -1115,22 +1085,12 @@ export declare type ProxyFetchConfig = {
1115
1085
  miniappName: string;
1116
1086
  };
1117
1087
 
1118
- declare type ProxyFetchType = (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
1119
-
1120
1088
  /** Configuration for the proxy getView client */
1121
1089
  export declare type ProxyGetViewConfig = {
1122
1090
  miniappName: string;
1123
1091
  gwProxyUrl: string;
1124
1092
  };
1125
1093
 
1126
- declare type ProxyGetViewType = (schema: string, viewName: string, parameters: {
1127
- [key: string]: string | number | boolean;
1128
- }) => Promise<{
1129
- [key: string]: any;
1130
- }[]>;
1131
-
1132
- declare type ProxyHandlerType = ReturnType<typeof APIProxyHandler>;
1133
-
1134
1094
  declare const RadioGroup: ForwardRefExoticComponent<Omit<RadioGroup_2.RadioGroupProps & RefAttributes<HTMLDivElement>, "ref"> & RefAttributes<HTMLDivElement>>;
1135
1095
 
1136
1096
  declare const RadioGroupItem: ForwardRefExoticComponent<Omit<RadioGroup_2.RadioGroupItemProps & RefAttributes<HTMLButtonElement>, "ref"> & RefAttributes<HTMLButtonElement>>;
@@ -1470,7 +1430,7 @@ declare const useFormField: () => {
1470
1430
  formMessageId: string;
1471
1431
  };
1472
1432
 
1473
- export declare const useProject: () => NonNullable<React.ContextType<typeof ProjectContext>>;
1433
+ export declare const useProject: () => ProjectContextValue;
1474
1434
 
1475
1435
  export declare const useRGContext: () => any;
1476
1436