@sankhyatronics/sankhya-ui 0.0.13 → 0.0.14
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/api/datatypes.d.ts +14 -0
- package/dist/api/githubContentService.d.ts +24 -0
- package/dist/api/localContentService.d.ts +29 -0
- package/dist/components/Common/DynamicRenderer.constants.d.ts +1 -0
- package/dist/components/Common/ScrollToTop.d.ts +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.es.js +1852 -1791
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +20 -20
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface ComponentProps {
|
|
2
|
+
[key: string]: any;
|
|
3
|
+
}
|
|
4
|
+
export interface ContentComponent {
|
|
5
|
+
type: string;
|
|
6
|
+
data: ComponentProps;
|
|
7
|
+
children?: ContentComponent[];
|
|
8
|
+
[key: string]: any;
|
|
9
|
+
}
|
|
10
|
+
export interface PageSection {
|
|
11
|
+
title?: string;
|
|
12
|
+
data: ContentComponent;
|
|
13
|
+
}
|
|
14
|
+
export type PageContent = PageSection[];
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { PageContent } from './datatypes';
|
|
2
|
+
export interface GithubContentOptions {
|
|
3
|
+
/**
|
|
4
|
+
* GitHub branch to fetch from. Defaults to 'main'.
|
|
5
|
+
*/
|
|
6
|
+
branch?: string;
|
|
7
|
+
/**
|
|
8
|
+
* Cache duration in milliseconds. Defaults to 10 minutes.
|
|
9
|
+
*/
|
|
10
|
+
cacheDuration?: number;
|
|
11
|
+
/**
|
|
12
|
+
* Force fresh fetch, bypassing cache.
|
|
13
|
+
*/
|
|
14
|
+
noCache?: boolean;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Fetches JSON content from a public GitHub repository.
|
|
18
|
+
*
|
|
19
|
+
* @param owner The GitHub user or organization name (e.g., 'facebook').
|
|
20
|
+
* @param repo The repository name (e.g., 'react').
|
|
21
|
+
* @param path The path to the file within the repo (e.g., 'package.json' or 'docs/intro.json').
|
|
22
|
+
* @param options Configuration options.
|
|
23
|
+
*/
|
|
24
|
+
export declare function fetchGithubContent<T = PageContent>(owner: string, repo: string, path: string, options?: GithubContentOptions): Promise<T>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { PageContent } from './datatypes';
|
|
2
|
+
export interface LocalContentOptions {
|
|
3
|
+
/**
|
|
4
|
+
* Optional language code to include in the path (e.g., 'en').
|
|
5
|
+
* If provided, the path will be constructed as `{baseUrl}/{lang}/{endpoint}`.
|
|
6
|
+
* If omitted, it will be `{baseUrl}/{endpoint}`.
|
|
7
|
+
* Default depends on implementation, here we assume it might be passed or empty.
|
|
8
|
+
*/
|
|
9
|
+
lang?: string;
|
|
10
|
+
/**
|
|
11
|
+
* Base URL for the public folder. Defaults to './'.
|
|
12
|
+
*/
|
|
13
|
+
baseUrl?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Cache duration in milliseconds. Defaults to 5 minutes.
|
|
16
|
+
*/
|
|
17
|
+
cacheDuration?: number;
|
|
18
|
+
/**
|
|
19
|
+
* Force fresh fetch, bypassing cache.
|
|
20
|
+
*/
|
|
21
|
+
noCache?: boolean;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Fetches JSON content from a local public path.
|
|
25
|
+
*
|
|
26
|
+
* @param endpoint The filename or path to the JSON file (e.g., 'data.json' or 'home/hero.json').
|
|
27
|
+
* @param options Configuration options.
|
|
28
|
+
*/
|
|
29
|
+
export declare function fetchLocalContent<T = PageContent>(endpoint: string, options?: LocalContentOptions): Promise<T>;
|
|
@@ -12,6 +12,7 @@ export declare const baseComponents: {
|
|
|
12
12
|
readonly FeaturesSection: import('react').FC<import('../FeaturesSection/FeaturesSection').FeaturesSectionProps>;
|
|
13
13
|
readonly FeatureItem: import('react').FC<import('../FeaturesSection/FeatureItem').FeatureItemProps>;
|
|
14
14
|
readonly BentoGrid: import('react').FC<import('../BentoGrid/BentoGrid').BentoGridProps>;
|
|
15
|
+
readonly Footer: import('react').FC<import('../Footer/Footer').FooterProps>;
|
|
15
16
|
readonly Stats: import('react').FC<import('../Stats/Stats').StatsProps>;
|
|
16
17
|
readonly PromoBanner: import('react').FC<import('../PromoBanner/PromoBanner').PromoBannerProps>;
|
|
17
18
|
readonly Testimonials: import('react').FC<import('../Testimonials/Testimonials').TestimonialsProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function ScrollToTop(): null;
|
package/dist/index.d.ts
CHANGED
|
@@ -25,3 +25,7 @@ export * from './hooks/useDataConfig';
|
|
|
25
25
|
export { Select } from './components/Select/Select';
|
|
26
26
|
export * from './contexts/UserContext';
|
|
27
27
|
export { CookieConsent } from './components/CookieConsent/CookieConsent';
|
|
28
|
+
export { type GithubContentOptions, fetchGithubContent } from './api/githubContentService';
|
|
29
|
+
export { type LocalContentOptions, fetchLocalContent } from './api/localContentService';
|
|
30
|
+
export * from './api/datatypes';
|
|
31
|
+
export { ScrollToTop } from './components/Common/ScrollToTop';
|