@luma-ai/react 0.1.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Seyed Amir Mohammad Hosseini Pour
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,54 @@
1
+ # @luma-ai/react
2
+
3
+ دستیار هوشمند لوما برای سایت‌های React: گفتگو، پیشنهاد محصول از داده زنده، باز کردن صفحه‌ها با مسیریاب خود سایت، راهنمای قدم‌به‌قدم روی همین صفحه و اقدام‌هایی که خودتان تعریف می‌کنید. با Next.js (App Router)، TanStack Start/Router، React Router 7/8 و اپ‌های تک‌صفحه‌ای بدون سرور کار می‌کند.
4
+
5
+ **مستندات کامل:** https://dash.lumai.ir/docs/react (همچنین در `docs/` همین بسته)
6
+
7
+ ```sh
8
+ npm i @luma-ai/react zod
9
+ ```
10
+
11
+ ## شروع سریع (Next.js)
12
+
13
+ ```ts
14
+ // app/api/luma/session/route.ts
15
+ import { createLumaSessionHandler } from "@luma-ai/react/server";
16
+
17
+ export const POST = createLumaSessionHandler({
18
+ apiKey: process.env.LUMA_API_KEY!, // فقط روی سرور
19
+ assistantId: process.env.LUMA_ASSISTANT_ID!,
20
+ });
21
+ ```
22
+
23
+ ```tsx
24
+ // app/layout.tsx
25
+ import { LumaProvider } from "@luma-ai/react/next";
26
+
27
+ <LumaProvider sessionEndpoint="/api/luma/session">{children}</LumaProvider>;
28
+ ```
29
+
30
+ اپ بدون بک‌اند؟ [روش بدون کلید](https://dash.lumai.ir/docs/react/keyless) را ببینید.
31
+
32
+ ## راهنماها
33
+
34
+ | صفحه | فایل |
35
+ | --- | --- |
36
+ | [روش سرور: Next.js، TanStack Start، React Router](https://dash.lumai.ir/docs/react/server) | `docs/server.md` |
37
+ | [روش بدون کلید](https://dash.lumai.ir/docs/react/keyless) | `docs/keyless.md` |
38
+ | [داده زنده سایت](https://dash.lumai.ir/docs/react/data-sources) | `docs/data-sources.md` |
39
+ | [اقدام‌ها](https://dash.lumai.ir/docs/react/actions) | `docs/actions.md` |
40
+ | [کنترل از کد و زمینه صفحه](https://dash.lumai.ir/docs/react/hooks) | `docs/hooks.md` |
41
+ | [حریم خصوصی و محدودیت‌ها](https://dash.lumai.ir/docs/react/privacy) | `docs/privacy.md` |
42
+ | [مرجع گزینه‌ها](https://dash.lumai.ir/docs/react/options) | `docs/options.md` |
43
+ | [عیب‌یابی و کدهای خطا](https://dash.lumai.ir/docs/react/troubleshooting) | `docs/troubleshooting.md` |
44
+ | [استفاده با دستیارهای کدنویسی](https://dash.lumai.ir/docs/react/ai-agents) | `docs/ai-agents.md` |
45
+
46
+ ## برای دستیارهای کدنویسی
47
+
48
+ - Skill: `skills/luma-ai-react/SKILL.md` (قابل نصب با `npx @tanstack/intent@latest install`)
49
+ - مستندات هم‌نسخه: `node_modules/@luma-ai/react/docs/`
50
+ - آنلاین: https://dash.lumai.ir/llms.txt و https://dash.lumai.ir/llms-full.txt
51
+
52
+ ## مجوز
53
+
54
+ MIT