@llmnative/react 2.0.1 → 2.2.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/bin/cli.js +117 -117
- package/dist/index.css +1 -1
- package/dist/index.js +21 -21
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +10468 -8488
- package/dist/index.mjs.map +1 -1
- package/dist/types/src/App.d.ts +19 -1
- package/dist/types/src/I18n.d.ts +91 -0
- package/dist/types/src/Theme.d.ts +16 -0
- package/dist/types/src/components/auth/AuthGate.d.ts +26 -0
- package/dist/types/src/components/auth/AuthLayout.d.ts +38 -0
- package/dist/types/src/components/auth/ForgotPassword.d.ts +19 -0
- package/dist/types/src/components/auth/OneTimeCodeInput.d.ts +27 -0
- package/dist/types/src/components/auth/ResetPassword.d.ts +31 -0
- package/dist/types/src/components/auth/SignIn.d.ts +42 -0
- package/dist/types/src/components/auth/SignUp.d.ts +43 -0
- package/dist/types/src/components/auth/VerifyCode.d.ts +32 -0
- package/dist/types/src/components/auth/VerifyEmail.d.ts +31 -0
- package/dist/types/src/components/auth/index.d.ts +12 -0
- package/dist/types/src/components/auth/providers.d.ts +22 -0
- package/dist/types/src/components/auth/shared.d.ts +124 -0
- package/dist/types/src/components/auth/useAuthFlows.d.ts +46 -0
- package/dist/types/src/index.d.ts +5 -1
- package/dist/types/src/providers/auth/AuthProvider.d.ts +51 -0
- package/dist/types/src/providers/auth/firebase/FirebaseAuthProvider.d.ts +8 -1
- package/dist/types/src/providers/auth/github/GitHubAuthProvider.d.ts +2 -0
- package/dist/types/src/providers/auth/mock/MockAuthProvider.d.ts +55 -0
- package/dist/types/src/providers/auth/supabase/SupabaseAuthProvider.d.ts +16 -1
- package/dist/types/src/providers/manifest.d.ts +4 -1
- package/llms-full.txt +96 -2
- package/package.json +1 -1
- package/scripts/cli/setup-project.js +678 -647
- package/templates/_shared/conf/access.tsx +23 -0
- package/templates/_shared/pages/access/ForgotPasswordPage.tsx +13 -0
- package/templates/_shared/pages/access/ResetPasswordPage.tsx +19 -0
- package/templates/_shared/pages/access/SignInPage.tsx +21 -0
- package/templates/_shared/pages/access/SignUpPage.tsx +23 -0
- package/templates/_shared/pages/access/VerifyEmailPage.tsx +20 -0
- package/templates/_shared/pages/access/paths.ts +12 -0
- package/templates/_shared/sections/Footer.tsx +1 -1
- package/templates/_shared/sections/Header.tsx +2 -2
- package/themes/default.ts +13 -12
- package/themes/tokyo-night-light.ts +24 -2
- package/themes/tokyo-night.ts +24 -2
- package/themes/vscode-dark-modern.ts +24 -2
- package/themes/vscode-dark-plus.ts +24 -2
- package/themes/vscode-light-modern.ts +24 -2
- package/themes/vscode-light-plus.ts +24 -2
package/bin/cli.js
CHANGED
|
@@ -1,118 +1,118 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
const path = require('path');
|
|
4
|
-
|
|
5
|
-
const SCRIPT_PATH = '../scripts/cli';
|
|
6
|
-
const [,, cmd] = process.argv;
|
|
7
|
-
const args = process.argv.slice(3);
|
|
8
|
-
|
|
9
|
-
function printGeneralHelp() {
|
|
10
|
-
console.log(`
|
|
11
|
-
LLM Native CLI
|
|
12
|
-
|
|
13
|
-
Available commands:
|
|
14
|
-
|
|
15
|
-
create - Generates a Vite + React project scaffold
|
|
16
|
-
devtools - Generates Vite, TypeScript, and PostCSS config only
|
|
17
|
-
version - Prints the installed @llmnative/react version
|
|
18
|
-
help - Displays this help message
|
|
19
|
-
|
|
20
|
-
Examples:
|
|
21
|
-
npx @llmnative/react create
|
|
22
|
-
npx @llmnative/react create --yes --provider=mock
|
|
23
|
-
npx @llmnative/react create --yes --provider=mock --ai-provider=openai
|
|
24
|
-
npx @llmnative/react create --yes --provider=mock --proxy-provider=viteDevProxy
|
|
25
|
-
npx @llmnative/react create --help
|
|
26
|
-
npx @llmnative/react devtools
|
|
27
|
-
npx @llmnative/react version
|
|
28
|
-
`);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
function printCreateHelp() {
|
|
32
|
-
console.log(`
|
|
33
|
-
LLM Native create
|
|
34
|
-
|
|
35
|
-
Usage:
|
|
36
|
-
npx llmnative create
|
|
37
|
-
npx llmnative create --yes --name=my-app --provider=mock
|
|
38
|
-
|
|
39
|
-
Interactive prompts:
|
|
40
|
-
project name
|
|
41
|
-
data provider: firebase | supabase | mock | custom
|
|
42
|
-
ai provider: none | openai | gemini | anthropic | mistral
|
|
43
|
-
proxy provider: none | vite | express | nextjs-app | nextjs-pages | cloudflare
|
|
44
|
-
icon provider: lucide | phosphor
|
|
45
|
-
theme: default | flat | cyber
|
|
46
|
-
provider credentials for Firebase, Supabase or the selected AI provider
|
|
47
|
-
|
|
48
|
-
Options:
|
|
49
|
-
--yes
|
|
50
|
-
--reset
|
|
51
|
-
--name=<name>
|
|
52
|
-
--provider=<firebase|supabase|mock|custom>
|
|
53
|
-
--ai-provider=<none|openai|gemini|anthropic|mistral>
|
|
54
|
-
--proxy-provider=<none|vite|express|nextjs-app|nextjs-pages|cloudflare>
|
|
55
|
-
--icon-provider=<lucide|phosphor>
|
|
56
|
-
--theme=<default|flat|cyber>
|
|
57
|
-
--hosting=<site|n>
|
|
58
|
-
--firebase-api-key=<value>
|
|
59
|
-
--firebase-auth-domain=<value>
|
|
60
|
-
--firebase-database-url=<value>
|
|
61
|
-
--firebase-project-id=<value>
|
|
62
|
-
--firebase-storage-bucket=<value>
|
|
63
|
-
--firebase-messaging-sender-id=<value>
|
|
64
|
-
--firebase-app-id=<value>
|
|
65
|
-
--firebase-measurement-id=<value>
|
|
66
|
-
--google-client-id=<value>
|
|
67
|
-
--supabase-url=<value>
|
|
68
|
-
--supabase-anon-key=<value>
|
|
69
|
-
--openai-api-key=<value>
|
|
70
|
-
--openrouter-api-key=<value>
|
|
71
|
-
--opencode-api-key=<value>
|
|
72
|
-
--gemini-api-key=<value>
|
|
73
|
-
--anthropic-api-key=<value>
|
|
74
|
-
--deepseek-api-key=<value>
|
|
75
|
-
--mistral-api-key=<value>
|
|
76
|
-
|
|
77
|
-
Generated files:
|
|
78
|
-
.env (filled with values from prompts/flags)
|
|
79
|
-
.env.example (same structure, all values empty — commit this)
|
|
80
|
-
|
|
81
|
-
Generated env variables:
|
|
82
|
-
VITE_PROVIDER, VITE_AI_PROVIDER, VITE_ICON_PROVIDER, VITE_THEME
|
|
83
|
-
VITE_PROXY_PROVIDER, VITE_PROXY_ENABLED (route is fixed: /api/proxy)
|
|
84
|
-
VITE_FIREBASE_* (apikey, authDomain, databaseURL, projectId, storageBucket, messagingSenderId, appId, measurementId)
|
|
85
|
-
VITE_GOOGLE_CLIENT_ID, VITE_GOOGLE_SCOPE
|
|
86
|
-
VITE_SUPABASE_URL, VITE_SUPABASE_ANON_KEY
|
|
87
|
-
VITE_DROPBOX_CLIENT_ID, VITE_DROPBOX_ROOT_PATH
|
|
88
|
-
VITE_OPENAI_API_KEY, VITE_OPENROUTER_API_KEY, VITE_OPENCODE_API_KEY
|
|
89
|
-
VITE_GEMINI_API_KEY, VITE_ANTHROPIC_API_KEY, VITE_DEEPSEEK_API_KEY, VITE_MISTRAL_API_KEY
|
|
90
|
-
VITE_OPENAI_COMPATIBLE_BASE_URL, VITE_OPENAI_COMPATIBLE_API_KEY
|
|
91
|
-
`);
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
switch (cmd) {
|
|
95
|
-
case 'create':
|
|
96
|
-
if (args.includes('--help') || args.includes('-h')) {
|
|
97
|
-
printCreateHelp();
|
|
98
|
-
} else {
|
|
99
|
-
require(`${SCRIPT_PATH}/setup-project`).scaffoldProject();
|
|
100
|
-
}
|
|
101
|
-
break;
|
|
102
|
-
|
|
103
|
-
case 'devtools':
|
|
104
|
-
require(`${SCRIPT_PATH}/setup-devtools`).setupDevTools();
|
|
105
|
-
break;
|
|
106
|
-
|
|
107
|
-
case 'version':
|
|
108
|
-
case '--version':
|
|
109
|
-
case '-v':
|
|
110
|
-
const pkg = require(path.join(__dirname, '../package.json'));
|
|
111
|
-
console.log(`@llmnative/react version: ${pkg.version}`);
|
|
112
|
-
break;
|
|
113
|
-
|
|
114
|
-
case 'help':
|
|
115
|
-
default:
|
|
116
|
-
printGeneralHelp();
|
|
117
|
-
break;
|
|
118
|
-
}
|
|
2
|
+
|
|
3
|
+
const path = require('path');
|
|
4
|
+
|
|
5
|
+
const SCRIPT_PATH = '../scripts/cli';
|
|
6
|
+
const [,, cmd] = process.argv;
|
|
7
|
+
const args = process.argv.slice(3);
|
|
8
|
+
|
|
9
|
+
function printGeneralHelp() {
|
|
10
|
+
console.log(`
|
|
11
|
+
LLM Native CLI
|
|
12
|
+
|
|
13
|
+
Available commands:
|
|
14
|
+
|
|
15
|
+
create - Generates a Vite + React project scaffold
|
|
16
|
+
devtools - Generates Vite, TypeScript, and PostCSS config only
|
|
17
|
+
version - Prints the installed @llmnative/react version
|
|
18
|
+
help - Displays this help message
|
|
19
|
+
|
|
20
|
+
Examples:
|
|
21
|
+
npx @llmnative/react create
|
|
22
|
+
npx @llmnative/react create --yes --provider=mock
|
|
23
|
+
npx @llmnative/react create --yes --provider=mock --ai-provider=openai
|
|
24
|
+
npx @llmnative/react create --yes --provider=mock --proxy-provider=viteDevProxy
|
|
25
|
+
npx @llmnative/react create --help
|
|
26
|
+
npx @llmnative/react devtools
|
|
27
|
+
npx @llmnative/react version
|
|
28
|
+
`);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
function printCreateHelp() {
|
|
32
|
+
console.log(`
|
|
33
|
+
LLM Native create
|
|
34
|
+
|
|
35
|
+
Usage:
|
|
36
|
+
npx llmnative create
|
|
37
|
+
npx llmnative create --yes --name=my-app --provider=mock
|
|
38
|
+
|
|
39
|
+
Interactive prompts:
|
|
40
|
+
project name
|
|
41
|
+
data provider: firebase | supabase | mock | custom
|
|
42
|
+
ai provider: none | openai | gemini | anthropic | mistral
|
|
43
|
+
proxy provider: none | vite | express | nextjs-app | nextjs-pages | cloudflare
|
|
44
|
+
icon provider: lucide | phosphor
|
|
45
|
+
theme: vscode-light-modern (default) | vscode-dark-modern | vscode-light-plus | vscode-dark-plus | tokyo-night-light | tokyo-night | default | flat | cyber
|
|
46
|
+
provider credentials for Firebase, Supabase or the selected AI provider
|
|
47
|
+
|
|
48
|
+
Options:
|
|
49
|
+
--yes
|
|
50
|
+
--reset
|
|
51
|
+
--name=<name>
|
|
52
|
+
--provider=<firebase|supabase|mock|custom>
|
|
53
|
+
--ai-provider=<none|openai|gemini|anthropic|mistral>
|
|
54
|
+
--proxy-provider=<none|vite|express|nextjs-app|nextjs-pages|cloudflare>
|
|
55
|
+
--icon-provider=<lucide|phosphor>
|
|
56
|
+
--theme=<vscode-light-modern|vscode-dark-modern|vscode-light-plus|vscode-dark-plus|tokyo-night-light|tokyo-night|default|flat|cyber>
|
|
57
|
+
--hosting=<site|n>
|
|
58
|
+
--firebase-api-key=<value>
|
|
59
|
+
--firebase-auth-domain=<value>
|
|
60
|
+
--firebase-database-url=<value>
|
|
61
|
+
--firebase-project-id=<value>
|
|
62
|
+
--firebase-storage-bucket=<value>
|
|
63
|
+
--firebase-messaging-sender-id=<value>
|
|
64
|
+
--firebase-app-id=<value>
|
|
65
|
+
--firebase-measurement-id=<value>
|
|
66
|
+
--google-client-id=<value>
|
|
67
|
+
--supabase-url=<value>
|
|
68
|
+
--supabase-anon-key=<value>
|
|
69
|
+
--openai-api-key=<value>
|
|
70
|
+
--openrouter-api-key=<value>
|
|
71
|
+
--opencode-api-key=<value>
|
|
72
|
+
--gemini-api-key=<value>
|
|
73
|
+
--anthropic-api-key=<value>
|
|
74
|
+
--deepseek-api-key=<value>
|
|
75
|
+
--mistral-api-key=<value>
|
|
76
|
+
|
|
77
|
+
Generated files:
|
|
78
|
+
.env (filled with values from prompts/flags)
|
|
79
|
+
.env.example (same structure, all values empty — commit this)
|
|
80
|
+
|
|
81
|
+
Generated env variables:
|
|
82
|
+
VITE_PROVIDER, VITE_AI_PROVIDER, VITE_ICON_PROVIDER, VITE_THEME
|
|
83
|
+
VITE_PROXY_PROVIDER, VITE_PROXY_ENABLED (route is fixed: /api/proxy)
|
|
84
|
+
VITE_FIREBASE_* (apikey, authDomain, databaseURL, projectId, storageBucket, messagingSenderId, appId, measurementId)
|
|
85
|
+
VITE_GOOGLE_CLIENT_ID, VITE_GOOGLE_SCOPE
|
|
86
|
+
VITE_SUPABASE_URL, VITE_SUPABASE_ANON_KEY
|
|
87
|
+
VITE_DROPBOX_CLIENT_ID, VITE_DROPBOX_ROOT_PATH
|
|
88
|
+
VITE_OPENAI_API_KEY, VITE_OPENROUTER_API_KEY, VITE_OPENCODE_API_KEY
|
|
89
|
+
VITE_GEMINI_API_KEY, VITE_ANTHROPIC_API_KEY, VITE_DEEPSEEK_API_KEY, VITE_MISTRAL_API_KEY
|
|
90
|
+
VITE_OPENAI_COMPATIBLE_BASE_URL, VITE_OPENAI_COMPATIBLE_API_KEY
|
|
91
|
+
`);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
switch (cmd) {
|
|
95
|
+
case 'create':
|
|
96
|
+
if (args.includes('--help') || args.includes('-h')) {
|
|
97
|
+
printCreateHelp();
|
|
98
|
+
} else {
|
|
99
|
+
require(`${SCRIPT_PATH}/setup-project`).scaffoldProject();
|
|
100
|
+
}
|
|
101
|
+
break;
|
|
102
|
+
|
|
103
|
+
case 'devtools':
|
|
104
|
+
require(`${SCRIPT_PATH}/setup-devtools`).setupDevTools();
|
|
105
|
+
break;
|
|
106
|
+
|
|
107
|
+
case 'version':
|
|
108
|
+
case '--version':
|
|
109
|
+
case '-v':
|
|
110
|
+
const pkg = require(path.join(__dirname, '../package.json'));
|
|
111
|
+
console.log(`@llmnative/react version: ${pkg.version}`);
|
|
112
|
+
break;
|
|
113
|
+
|
|
114
|
+
case 'help':
|
|
115
|
+
default:
|
|
116
|
+
printGeneralHelp();
|
|
117
|
+
break;
|
|
118
|
+
}
|