@llmnative/react 0.1.0 → 1.0.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/README.md +387 -364
- package/bin/cli.js +117 -98
- package/dist/index.css +1 -1
- package/dist/index.js +21 -823
- package/dist/index.mjs +14246 -9296
- package/dist/style.css +1 -0
- package/dist/types/src/App.d.ts +72 -14
- package/dist/types/src/Config.d.ts +28 -5
- package/dist/types/src/Global.d.ts +2 -2
- package/dist/types/src/I18n.d.ts +185 -0
- package/dist/types/src/Theme.d.ts +153 -81
- package/dist/types/src/auth.d.ts +13 -1
- package/dist/types/src/components/Component.d.ts +13 -27
- package/dist/types/src/components/ErrorBoundary.d.ts +30 -0
- package/dist/types/src/components/blocks/Brand.d.ts +4 -4
- package/dist/types/src/components/blocks/Breadcrumbs.d.ts +50 -4
- package/dist/types/src/components/blocks/Carousel.d.ts +5 -5
- package/dist/types/src/components/blocks/Dropdown.d.ts +26 -20
- package/dist/types/src/components/blocks/ListCard.d.ts +31 -0
- package/dist/types/src/components/blocks/Menu.d.ts +13 -16
- package/dist/types/src/components/blocks/Notifications.d.ts +8 -3
- package/dist/types/src/components/blocks/ProviderSwitcher.d.ts +63 -0
- package/dist/types/src/components/blocks/Search.d.ts +2 -2
- package/dist/types/src/components/blocks/SideNav.d.ts +45 -0
- package/dist/types/src/components/blocks/ThemeSwitcher.d.ts +24 -0
- package/dist/types/src/components/blocks/Toolbar.d.ts +19 -0
- package/dist/types/src/components/index.d.ts +27 -6
- package/dist/types/src/components/types.d.ts +10 -3
- package/dist/types/src/components/ui/Alert.d.ts +16 -4
- package/dist/types/src/components/ui/Badge.d.ts +6 -5
- package/dist/types/src/components/ui/Buttons.d.ts +13 -12
- package/dist/types/src/components/ui/Card.d.ts +8 -7
- package/dist/types/src/components/ui/Code.d.ts +1 -1
- package/dist/types/src/components/ui/Gallery.d.ts +13 -14
- package/dist/types/src/components/ui/GridSystem.d.ts +1 -1
- package/dist/types/src/components/ui/Icon.d.ts +3 -1
- package/dist/types/src/components/ui/Image.d.ts +1 -1
- package/dist/types/src/components/ui/ImageAvatar.d.ts +1 -1
- package/dist/types/src/components/ui/Loader.d.ts +1 -1
- package/dist/types/src/components/ui/LocaleSwitcher.d.ts +14 -0
- package/dist/types/src/components/ui/Modal.d.ts +42 -15
- package/dist/types/src/components/ui/Pagination.d.ts +14 -3
- package/dist/types/src/components/ui/Percentage.d.ts +5 -5
- package/dist/types/src/components/ui/Repeat.d.ts +15 -6
- package/dist/types/src/components/ui/Tab.d.ts +29 -2
- package/dist/types/src/components/ui/TabDynamic.d.ts +4 -3
- package/dist/types/src/components/ui/Table.d.ts +15 -14
- package/dist/types/src/components/ui/fields/CodeEditor.d.ts +43 -0
- package/dist/types/src/components/ui/fields/ContextMenu.d.ts +38 -0
- package/dist/types/src/components/ui/fields/Crop.d.ts +4 -2
- package/dist/types/src/components/ui/fields/ImageField.d.ts +31 -0
- package/dist/types/src/components/ui/fields/Input.d.ts +43 -14
- package/dist/types/src/components/ui/fields/Prompt.d.ts +2 -31
- package/dist/types/src/components/ui/fields/RichText.d.ts +86 -0
- package/dist/types/src/components/ui/fields/Select.d.ts +13 -10
- package/dist/types/src/components/ui/fields/Upload.d.ts +37 -2
- package/dist/types/src/components/ui/fields/UploadCSV.d.ts +2 -0
- package/dist/types/src/components/ui/useRecordSelection.d.ts +1 -2
- package/dist/types/src/components/widgets/Form.d.ts +80 -43
- package/dist/types/src/components/widgets/ImageEditor.d.ts +4 -5
- package/dist/types/src/components/widgets/MarkdownReader.d.ts +4 -4
- package/dist/types/src/components/widgets/Prompt.d.ts +71 -23
- package/dist/types/src/components/widgets/TabDynamic.d.ts +4 -3
- package/dist/types/src/components/widgets/form-controller.d.ts +42 -0
- package/dist/types/src/components/widgets/grid-core/GridCore.d.ts +1 -1
- package/dist/types/src/components/widgets/grid-core/GridDB.d.ts +1 -1
- package/dist/types/src/components/widgets/grid-core/GridGalleryView.d.ts +1 -1
- package/dist/types/src/components/widgets/grid-core/GridTableView.d.ts +1 -1
- package/dist/types/src/components/widgets/grid-core/types.d.ts +77 -27
- package/dist/types/src/components/widgets/grid-core/useGridActions.d.ts +4 -8
- package/dist/types/src/components/widgets/grid-core/useGridColumns.d.ts +2 -2
- package/dist/types/src/components/widgets/grid-core/useGridDBRecords.d.ts +1 -2
- package/dist/types/src/components/widgets/grid-core/useGridPreparedRecords.d.ts +2 -2
- package/dist/types/src/components/widgets/grid-core/useGridSelection.d.ts +4 -5
- package/dist/types/src/components/widgets/grid-core/utils.d.ts +11 -3
- package/dist/types/src/conf/Prompt.d.ts +1 -1
- package/dist/types/src/conf/i18n/ar.d.ts +2 -0
- package/dist/types/src/conf/i18n/de.d.ts +2 -0
- package/dist/types/src/conf/i18n/en.d.ts +2 -0
- package/dist/types/src/conf/i18n/index.d.ts +6 -0
- package/dist/types/src/conf/i18n/it.d.ts +2 -0
- package/dist/types/src/conf/i18n/ru.d.ts +2 -0
- package/dist/types/src/conf/i18n/zh.d.ts +2 -0
- package/dist/types/src/constant.d.ts +1 -1
- package/dist/types/src/index.d.ts +38 -13
- package/dist/types/src/libs/converter.d.ts +4 -4
- package/dist/types/src/libs/editorHeight.d.ts +12 -0
- package/dist/types/src/libs/fetch.d.ts +4 -4
- package/dist/types/src/libs/imageBuilder.d.ts +63 -14
- package/dist/types/src/libs/imageVariants.d.ts +35 -0
- package/dist/types/src/libs/index.d.ts +1 -4
- package/dist/types/src/libs/promptUtils.d.ts +24 -0
- package/dist/types/src/libs/sanitizer.d.ts +2 -2
- package/dist/types/src/libs/utils.d.ts +9 -10
- package/dist/types/src/pages/index.d.ts +0 -2
- package/dist/types/src/providers/ProviderConfiguration.d.ts +6 -0
- package/dist/types/src/providers/ProviderRegistryContext.d.ts +51 -0
- package/dist/types/src/providers/ProviderSession.d.ts +68 -0
- package/dist/types/src/providers/ai/AIProvider.d.ts +57 -0
- package/dist/types/src/providers/ai/AIProviderContext.d.ts +13 -0
- package/dist/types/src/providers/ai/anthropic.d.ts +2 -0
- package/dist/types/src/providers/ai/deepseek.d.ts +1 -0
- package/dist/types/src/providers/ai/gemini.d.ts +2 -0
- package/dist/types/src/providers/ai/glm.d.ts +1 -0
- package/dist/types/src/providers/ai/index.d.ts +9 -134
- package/dist/types/src/providers/ai/mistral.d.ts +1 -0
- package/dist/types/src/providers/ai/openai.d.ts +1 -0
- package/dist/types/src/providers/ai/openaiCompatible.d.ts +17 -0
- package/dist/types/src/providers/ai/opencode.d.ts +2 -0
- package/dist/types/src/providers/ai/openrouter.d.ts +1 -0
- package/dist/types/src/providers/ai/shared.d.ts +46 -0
- package/dist/types/src/providers/api/ApiProvider.d.ts +43 -0
- package/dist/types/src/providers/api/direct.d.ts +14 -0
- package/dist/types/src/providers/api/firebase.d.ts +14 -0
- package/dist/types/src/providers/api/mock.d.ts +7 -0
- package/dist/types/src/providers/api/supabase.d.ts +14 -0
- package/dist/types/src/providers/auth/AuthProvider.d.ts +2 -2
- package/dist/types/src/providers/auth/firebase/FirebaseAuthProvider.d.ts +26 -0
- package/dist/types/src/providers/auth/google/GoogleAuth.d.ts +2 -2
- package/dist/types/src/providers/auth/supabase/SupabaseAuthProvider.d.ts +48 -0
- package/dist/types/src/providers/credentials/CredentialsProvider.d.ts +3 -0
- package/dist/types/src/providers/credentials/CredentialsProviderContext.d.ts +12 -0
- package/dist/types/src/providers/credentials/google/GoogleServiceAccountProvider.d.ts +8 -0
- package/dist/types/src/providers/data/DataProvider.d.ts +27 -1
- package/dist/types/src/providers/data/firebase.d.ts +5 -4
- package/dist/types/src/providers/data/firestore.d.ts +38 -0
- package/dist/types/src/providers/data/mock.d.ts +8 -1
- package/dist/types/src/providers/data/supabase.d.ts +36 -10
- package/dist/types/src/providers/firebase-init.d.ts +15 -4
- package/dist/types/src/providers/icon/PhosphorIconProvider.d.ts +1 -1
- package/dist/types/src/providers/manifest.d.ts +20 -14
- package/dist/types/src/providers/proxy/index.d.ts +7 -0
- package/dist/types/src/providers/proxy/vite.d.ts +3 -0
- package/dist/types/src/providers/scrape/index.d.ts +2 -1
- package/dist/types/src/providers/seo/google/keyword.d.ts +6 -1
- package/dist/types/src/providers/storage/StorageProvider.d.ts +155 -4
- package/dist/types/src/providers/storage/dropbox.d.ts +3 -3
- package/dist/types/src/providers/storage/firebase.d.ts +38 -7
- package/dist/types/src/providers/storage/supabase.d.ts +47 -7
- package/dist/types/src/providers/supabase-init.d.ts +35 -0
- package/dist/types/src/types/FormFields.d.ts +4 -2
- package/dist/types/src/types/FormSchema.d.ts +29 -0
- package/dist/types/themes/tokyo-night-light.d.ts +3 -0
- package/dist/types/themes/tokyo-night.d.ts +3 -0
- package/dist/types/themes/vscode-dark-plus.d.ts +3 -0
- package/dist/types/themes/vscode-light-plus.d.ts +3 -0
- package/dist/vite.js +1 -0
- package/dist/vite.mjs +54 -0
- package/package.json +45 -14
- package/scripts/cli/proxy-templates/cloudflare.ts +34 -0
- package/scripts/cli/proxy-templates/express.ts +77 -0
- package/scripts/cli/proxy-templates/nextjs-app.ts +42 -0
- package/scripts/cli/proxy-templates/nextjs-pages.ts +41 -0
- package/scripts/cli/proxy-templates/scaffold.json +33 -0
- package/scripts/cli/setup-devtools.js +155 -85
- package/scripts/cli/setup-project.js +618 -484
- package/themes/cyber.ts +469 -405
- package/themes/default.ts +469 -405
- package/themes/flat.ts +469 -405
- package/themes/tokyo-night-light.ts +38 -0
- package/themes/tokyo-night.ts +38 -0
- package/themes/vscode-dark-plus.ts +29 -0
- package/themes/vscode-light-plus.ts +29 -0
- package/dist/index.js.map +0 -1
- package/dist/index.mjs.map +0 -1
- package/dist/types/src/components/FormEnhancer.d.ts +0 -26
- package/dist/types/src/components/Template.d.ts +0 -18
- package/dist/types/src/components/ui/fields/AssistantAI.d.ts +0 -23
- package/dist/types/src/components/ui/fields/Command.d.ts +0 -15
- package/dist/types/src/components/ui/fields/ImageUrl.d.ts +0 -7
- package/dist/types/src/libs/cache.d.ts +0 -9
- package/dist/types/src/libs/database.d.ts +0 -3
- package/dist/types/src/libs/log.d.ts +0 -2
- package/dist/types/src/libs/seo.d.ts +0 -8
- package/dist/types/src/libs/storage.d.ts +0 -2
- package/dist/types/src/pages/Blog.d.ts +0 -3
- package/dist/types/src/pages/BlogPost.d.ts +0 -16
- package/dist/types/src/pages/Helper.d.ts +0 -8
- package/dist/types/src/providers/auth/google/apis/auth.d.ts +0 -4
- package/dist/types/src/types/Block.d.ts +0 -4
- package/dist/types/src/types/Section.d.ts +0 -4
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { RecordProps } from "../providers/data/DataProvider";
|
|
3
|
-
import { FormRef, ChangeHandler } from './widgets/Form';
|
|
4
|
-
type FormProps = {
|
|
5
|
-
name?: string;
|
|
6
|
-
value?: any;
|
|
7
|
-
onChange?: (event: ChangeHandler) => void;
|
|
8
|
-
dataStoragePath?: string;
|
|
9
|
-
};
|
|
10
|
-
interface EnhancerProps {
|
|
11
|
-
record?: RecordProps;
|
|
12
|
-
handleChange?: (event: ChangeHandler) => void;
|
|
13
|
-
parentName?: string;
|
|
14
|
-
dataStoragePath?: string;
|
|
15
|
-
formRef?: React.Ref<FormRef>;
|
|
16
|
-
wrapClass?: string;
|
|
17
|
-
}
|
|
18
|
-
interface FormEnhancerProps extends EnhancerProps {
|
|
19
|
-
components: React.ReactNode;
|
|
20
|
-
}
|
|
21
|
-
declare const FormEnhancer: ({ components, record, handleChange, parentName, dataStoragePath, formRef, wrapClass }: FormEnhancerProps) => React.JSX.Element;
|
|
22
|
-
export declare function extractComponentProps<T>(components: React.ReactNode | React.ReactNode[], onEnhance: (props: {
|
|
23
|
-
[key: string]: any;
|
|
24
|
-
}) => T): T[];
|
|
25
|
-
export declare function asForm<P extends FormProps>(Component: React.ComponentType<P>): React.ComponentType<P>;
|
|
26
|
-
export default FormEnhancer;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { ComponentFormFieldsMap } from '../types/FormFields';
|
|
3
|
-
type ComponentSpec = {
|
|
4
|
-
tag: keyof ComponentFormFieldsMap;
|
|
5
|
-
props?: Record<string, any>;
|
|
6
|
-
};
|
|
7
|
-
type FormFieldsMap = Record<string, ComponentSpec>;
|
|
8
|
-
export declare function FormTemplate({ htmlString, components, dataStoragePath }: {
|
|
9
|
-
htmlString: string;
|
|
10
|
-
components: FormFieldsMap;
|
|
11
|
-
dataStoragePath: string;
|
|
12
|
-
}): React.JSX.Element;
|
|
13
|
-
export declare function FormTemplate2({ template, fieldBucketKey, dataSource, }: {
|
|
14
|
-
template: string;
|
|
15
|
-
fieldBucketKey: string;
|
|
16
|
-
dataSource?: string;
|
|
17
|
-
}): React.JSX.Element;
|
|
18
|
-
export {};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { UIProps } from '../../index';
|
|
3
|
-
interface AssistantAIProps extends UIProps {
|
|
4
|
-
name: string;
|
|
5
|
-
promptTopic: {
|
|
6
|
-
prompt: string;
|
|
7
|
-
label: string;
|
|
8
|
-
};
|
|
9
|
-
configVariables: {
|
|
10
|
-
lang: string;
|
|
11
|
-
voice: string;
|
|
12
|
-
style: string;
|
|
13
|
-
limit: string;
|
|
14
|
-
};
|
|
15
|
-
initialValue?: string;
|
|
16
|
-
children?: React.ReactNode;
|
|
17
|
-
onChange: (e: any) => void;
|
|
18
|
-
viewMode?: 'list' | 'carousel';
|
|
19
|
-
autoStart?: boolean;
|
|
20
|
-
onReset?: () => void;
|
|
21
|
-
}
|
|
22
|
-
declare const AssistantAI: ({ name, promptTopic, configVariables, initialValue, children, onChange, viewMode, autoStart, onReset, pre, post, wrapClass, className }: AssistantAIProps) => React.JSX.Element;
|
|
23
|
-
export default AssistantAI;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
export declare const Command: React.FC<{
|
|
3
|
-
children: React.ReactNode;
|
|
4
|
-
}> & {
|
|
5
|
-
Trigger: React.FC<TriggerProps>;
|
|
6
|
-
};
|
|
7
|
-
type TriggerProps = {
|
|
8
|
-
char: string;
|
|
9
|
-
onSelect: (value: string) => React.ReactNode;
|
|
10
|
-
children: (props: {
|
|
11
|
-
filter: string;
|
|
12
|
-
select: (value: string) => void;
|
|
13
|
-
}) => React.ReactNode;
|
|
14
|
-
};
|
|
15
|
-
export {};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { FormFieldProps } from "../../widgets/Form";
|
|
3
|
-
import { PromptMode } from "./Prompt";
|
|
4
|
-
export interface ImageUrlProps extends FormFieldProps {
|
|
5
|
-
mode?: PromptMode;
|
|
6
|
-
}
|
|
7
|
-
export declare const ImageUrl: ({ name, label, required, onChange, defaultValue, pre, post, wrapClass, className, mode, }: ImageUrlProps) => React.JSX.Element;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export interface CacheOptions {
|
|
2
|
-
callLabel: string;
|
|
3
|
-
callKey: string;
|
|
4
|
-
callBasePath: string;
|
|
5
|
-
callService: string;
|
|
6
|
-
callFunc: Function;
|
|
7
|
-
callOptions: Object;
|
|
8
|
-
}
|
|
9
|
-
export declare const cache: (search: any, strategy: any, { callLabel, callKey, callBasePath, callService, callFunc, callOptions }: CacheOptions, caller?: any, storePaths?: string[]) => Promise<any>;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { getKeywordIdeas } from "../providers/seo/google/keyword";
|
|
2
|
-
import { getGoogleTrendsData } from "../providers/seo/google/trend";
|
|
3
|
-
declare const seo: {
|
|
4
|
-
keyword: typeof getKeywordIdeas;
|
|
5
|
-
trend: typeof getGoogleTrendsData;
|
|
6
|
-
serp: null;
|
|
7
|
-
};
|
|
8
|
-
export default seo;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { PROMPTS } from '../conf/Prompt';
|
|
3
|
-
type PromptKey = keyof typeof PROMPTS;
|
|
4
|
-
interface ConfigVariables {
|
|
5
|
-
lang: string;
|
|
6
|
-
voice: string;
|
|
7
|
-
style: string;
|
|
8
|
-
limit: string;
|
|
9
|
-
}
|
|
10
|
-
export default function BlogPost({ data, promptTopic, onChange, value }: {
|
|
11
|
-
data?: ConfigVariables;
|
|
12
|
-
promptTopic?: PromptKey;
|
|
13
|
-
onChange?: (e: any) => void;
|
|
14
|
-
value?: any;
|
|
15
|
-
}): React.JSX.Element;
|
|
16
|
-
export {};
|