@spaceandtimelabs/makeinfinite-ui 0.25.5 → 0.27.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
@@ -1,10 +1,15 @@
1
- import { ExplorePage } from '@spaceandtimelabs/dapp-mi-components';
1
+ import { default as default_2 } from 'react';
2
2
  import { JSX as JSX_2 } from 'react/jsx-runtime';
3
- import { LandingPage } from '@spaceandtimelabs/dapp-mi-components';
4
- import { Layout } from '@spaceandtimelabs/dapp-mi-components';
5
- import { MI_DAPP_COMPONENTS_THEME } from '@spaceandtimelabs/dapp-mi-components';
6
3
 
7
- export { ExplorePage }
4
+ declare interface APIContextType {
5
+ isLoading: boolean;
6
+ wrapAPICall: <T>(promise: Promise<T>) => Promise<T>;
7
+ wrapXHRCall: <T>(xhrCreator: () => XMLHttpRequest, processResponse: (xhr: XMLHttpRequest) => T) => Promise<T>;
8
+ }
9
+
10
+ export declare const getHeadCommit: (projectName: string) => Promise<string>;
11
+
12
+ export declare const getRedoTargetCommitForFile: (projectName: string, filePath: string) => Promise<[string, string]>;
8
13
 
9
14
  export declare const getTags: (projectName: string, projectUrl: string) => Promise<{
10
15
  tag: string;
@@ -12,51 +17,91 @@ export declare const getTags: (projectName: string, projectUrl: string) => Promi
12
17
  ref: string;
13
18
  }[]>;
14
19
 
15
- /**
16
- * ImageGallery component displays a modal gallery of images from the project's images directory.
17
- * It allows users to view and select images to reference in their chat messages.
18
- * @component
19
- */
20
- export declare const ImageGallery: React.FC<ImageGalleryProps>;
21
-
22
- /**
23
- * Represents the properties required by the ImageGallery component.
24
- * @interface ImageGalleryProps
25
- */
26
- declare interface ImageGalleryProps {
27
- /** Controls the visibility of the gallery */
28
- isOpen: boolean;
29
- /** Callback function triggered when the gallery should be closed */
30
- onClose: () => void;
31
- /**
32
- * Callback function triggered when an image is selected
33
- * @param imagePath The relative path to the selected image (e.g., "./src/assets/images/example.jpg")
34
- */
35
- onImageSelect: (imagePath: string) => void;
36
- /** The name of the current project */
37
- projectName: string;
38
- }
20
+ export declare const getUndoTargetCommitForFile: (projectName: string, filePath: string) => Promise<[string, string]>;
39
21
 
40
22
  export declare const initializeMakeInfinite: () => void;
41
23
 
42
- export { LandingPage }
24
+ export declare const listDir: (dirPath: string) => Promise<string[]>;
43
25
 
44
- export { Layout }
26
+ export declare const loadLibraryComponents: (apiHandler: any) => Promise<any>;
45
27
 
46
- export declare const MakeInfinite: () => JSX_2.Element;
47
-
48
- export { MI_DAPP_COMPONENTS_THEME }
28
+ export declare const loadProjectComponents: (projectName: string) => Promise<{
29
+ components: any;
30
+ layout: any;
31
+ }>;
49
32
 
50
33
  export declare const MiniApp: () => JSX_2.Element;
51
34
 
52
- export declare const ProjectManager: () => JSX_2.Element;
53
-
54
35
  export declare const ProjectProvider: (props: {
55
36
  config: any;
56
37
  metadata?: any;
57
38
  children?: React.ReactNode;
58
39
  }) => JSX_2.Element;
59
40
 
41
+ export declare const RGComponent: default_2.ForwardRefExoticComponent<Omit<RGContainerProps, "ref"> & default_2.RefAttributes<HTMLDivElement>>;
42
+
43
+ export declare class RGComponentErrorBoundary<T> extends default_2.Component<RGComponentErrorBoundaryProps<T>, RGComponentErrorBoundaryState> {
44
+ constructor(props: RGComponentErrorBoundaryProps<T>);
45
+ static getDerivedStateFromError(error: Error): {
46
+ hasError: boolean;
47
+ error: Error;
48
+ };
49
+ render(): default_2.ReactNode;
50
+ resetState(): void;
51
+ }
52
+
53
+ declare interface RGComponentErrorBoundaryProps<T> {
54
+ children: default_2.ReactNode;
55
+ fallback?: default_2.ComponentType<RGFallbackComponentProps & T>;
56
+ fallbackProps?: T;
57
+ }
58
+
59
+ declare interface RGComponentErrorBoundaryState {
60
+ hasError: boolean;
61
+ error: Error | null;
62
+ }
63
+
64
+ declare interface RGContainerProps {
65
+ style?: any;
66
+ className?: string;
67
+ onMouseDown?: any;
68
+ onMouseUp?: any;
69
+ onTouchEnd?: any;
70
+ children?: default_2.ReactNode;
71
+ [key: string]: any;
72
+ componentId: any;
73
+ }
74
+
75
+ export declare const RGDroppable: (props: {
76
+ id: string;
77
+ type: string;
78
+ initialSize: object;
79
+ metadata: object;
80
+ node: React.ReactNode;
81
+ }) => JSX_2.Element;
82
+
83
+ export declare const RGEditLayout: (props: {
84
+ components: any;
85
+ layout: any;
86
+ onLayoutChange: any;
87
+ onResize: any;
88
+ onDrop: any;
89
+ onDrag: any;
90
+ }) => JSX_2.Element;
91
+
92
+ declare interface RGFallbackComponentProps {
93
+ error: Error | null;
94
+ }
95
+
96
+ export declare const RGPreviewLayout: (props: {
97
+ components: any;
98
+ layout: any;
99
+ }) => JSX_2.Element;
100
+
101
+ export declare const syncAndRetry: (projectName: string, projectRepository: string) => Promise<void>;
102
+
103
+ export declare const useAPI: () => APIContextType;
104
+
60
105
  export declare const useB64UrlForProjectImage: (projectName: string, imageFilename: string) => string;
61
106
 
62
107
  export declare const useProject: () => any;