@smart-cloud/ai-kit-ui 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/.gitattributes +8 -0
- package/dist/ai-kit-ui.css +201 -0
- package/dist/index.cjs +14 -0
- package/dist/index.d.cts +87 -0
- package/dist/index.d.ts +87 -0
- package/dist/index.js +14 -0
- package/eslint.config.js +18 -0
- package/package.json +75 -0
- package/src/ShadowBoundary.tsx +266 -0
- package/src/ai-feature/AiFeature.tsx +1824 -0
- package/src/ai-feature/AiFeatureBorder.tsx +22 -0
- package/src/ai-feature/ProofreadDiff.tsx +118 -0
- package/src/ai-feature/index.tsx +2 -0
- package/src/ai-feature/utils.tsx +20 -0
- package/src/i18n/ar.ts +156 -0
- package/src/i18n/de.ts +157 -0
- package/src/i18n/en.ts +156 -0
- package/src/i18n/es.ts +157 -0
- package/src/i18n/fr.ts +158 -0
- package/src/i18n/he.ts +156 -0
- package/src/i18n/hi.ts +157 -0
- package/src/i18n/hu.ts +156 -0
- package/src/i18n/id.ts +157 -0
- package/src/i18n/index.ts +47 -0
- package/src/i18n/it.ts +159 -0
- package/src/i18n/ja.ts +157 -0
- package/src/i18n/ko.ts +155 -0
- package/src/i18n/nb.ts +156 -0
- package/src/i18n/nl.ts +157 -0
- package/src/i18n/pl.ts +158 -0
- package/src/i18n/pt.ts +155 -0
- package/src/i18n/ru.ts +157 -0
- package/src/i18n/sv.ts +156 -0
- package/src/i18n/th.ts +154 -0
- package/src/i18n/tr.ts +158 -0
- package/src/i18n/ua.ts +159 -0
- package/src/i18n/zh.ts +151 -0
- package/src/index.tsx +4 -0
- package/src/styles/ai-kit-ui.css +201 -0
- package/src/useAiRun.ts +177 -0
- package/src/withAiKitShell.tsx +208 -0
- package/tsconfig.json +32 -0
- package/tsconfig.node.json +13 -0
- package/tsup.config.ts +21 -0
package/src/i18n/tr.ts
ADDED
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
export const trDict: Record<string, string> = {
|
|
2
|
+
"WPSuite AI-Kit": "WPSuite AI-Kit",
|
|
3
|
+
Accept: "Kabul etmek",
|
|
4
|
+
"Additional instructions to guide the AI.":
|
|
5
|
+
"Yapay zekayı yönlendirmek için ek talimatlar.",
|
|
6
|
+
"Alt Text": "Alternatif Metin",
|
|
7
|
+
"An unknown error occurred.": "Bilinmeyen bir hata oluştu.",
|
|
8
|
+
Arabic: "Arapça",
|
|
9
|
+
"As-Is": "Değişiklik yok",
|
|
10
|
+
"Auto-detect": "Otomatik algılama",
|
|
11
|
+
Cancel: "İptal etmek",
|
|
12
|
+
Caption: "Altyazı",
|
|
13
|
+
Casual: "Samimi",
|
|
14
|
+
"Checking capabilities...": "Yetenekleri kontrol etme...",
|
|
15
|
+
Chinese: "Çince",
|
|
16
|
+
Close: "Kapat",
|
|
17
|
+
Corrected: "Düzeltildi",
|
|
18
|
+
"Creating LanguageDetector session":
|
|
19
|
+
"LanguageDetector oturumu oluşturuluyor.",
|
|
20
|
+
"Creating LanguageModel session": "LanguageModel oturumu oluşturuluyor",
|
|
21
|
+
"Creating Proofreader session": "Düzeltmen Oluşturma oturumu",
|
|
22
|
+
"Creating Rewriter session": "Rewriter oturumu oluşturuluyor",
|
|
23
|
+
"Creating Summarizer session": "Özetleyici oturumu oluşturuluyor",
|
|
24
|
+
"Creating Translator session": "Çevirmen oturumu oluşturuluyor",
|
|
25
|
+
"Creating Writer session": "Yazar Oluşturma Oturumu",
|
|
26
|
+
"Deciding capability": "Yeteneğe karar verme",
|
|
27
|
+
Description: "Tanım",
|
|
28
|
+
"Detecting language": "Dil tespiti",
|
|
29
|
+
"Done.": "Tamamlamak.",
|
|
30
|
+
"Downloading model...": "Model indiriliyor...",
|
|
31
|
+
Dutch: "Flemenkçe",
|
|
32
|
+
English: "İngilizce",
|
|
33
|
+
Excerpt: "Alıntı",
|
|
34
|
+
Formal: "Resmi",
|
|
35
|
+
French: "Fransızca",
|
|
36
|
+
Generate: "Oluştur",
|
|
37
|
+
"Generated content": "Oluşturulan içerik",
|
|
38
|
+
"Generating text": "Metin oluşturma",
|
|
39
|
+
"Generating...": "Oluşturuluyor...",
|
|
40
|
+
German: "Almanca",
|
|
41
|
+
HTML: "HTML",
|
|
42
|
+
Headline: "Başlık",
|
|
43
|
+
Hebrew: "İbranice",
|
|
44
|
+
Hide: "Saklamak",
|
|
45
|
+
Hindi: "Hintçe",
|
|
46
|
+
"Hover highlights to see explanations.":
|
|
47
|
+
"Vurgulanan noktaların üzerine fareyle gelin ve açıklamaları görüntüleyin.",
|
|
48
|
+
Hungarian: "Macarca",
|
|
49
|
+
Indonesian: "Endonezyalı",
|
|
50
|
+
"Initializing on-device AI...": "Cihaz üzerinde yapay zeka başlatılıyor...",
|
|
51
|
+
"Inlining images as base64":
|
|
52
|
+
"Görüntüleri base64 olarak satır içine yerleştirme",
|
|
53
|
+
"Input and output languages cannot be the same.":
|
|
54
|
+
"Giriş ve çıkış dilleri aynı olamaz.",
|
|
55
|
+
"Input language": "Giriş dili",
|
|
56
|
+
Instructions: "Talimatlar",
|
|
57
|
+
Italian: "İtalyan",
|
|
58
|
+
Japanese: "Japonca",
|
|
59
|
+
"Key Points": "Önemli Noktalar",
|
|
60
|
+
Korean: "Korece",
|
|
61
|
+
Length: "Uzunluk",
|
|
62
|
+
Long: "Uzun",
|
|
63
|
+
Longer: "Daha uzun",
|
|
64
|
+
Markdown: "Markdown",
|
|
65
|
+
Medium: "Orta",
|
|
66
|
+
"More casual": "Daha rahat",
|
|
67
|
+
"More formal": "Daha resmi",
|
|
68
|
+
Neutral: "Doğal",
|
|
69
|
+
"No issues found. Your text looks great!":
|
|
70
|
+
"Herhangi bir sorun bulunmadı. Metniniz harika görünüyor!",
|
|
71
|
+
"No overrides": "Override yok",
|
|
72
|
+
Norwegian: "Norveççe",
|
|
73
|
+
"On-device model ready.": "Cihaz üzerinde kullanıma hazır model.",
|
|
74
|
+
Options: "Seçenekler",
|
|
75
|
+
"Output format": "Çıktı formatı",
|
|
76
|
+
"Output language": "Çıktı dili",
|
|
77
|
+
Polish: "Lehçe",
|
|
78
|
+
Portuguese: "Portekizce",
|
|
79
|
+
Preview: "Önizleme",
|
|
80
|
+
Proofread: "Düzeltme işlemini yapın",
|
|
81
|
+
"Proofread again": "Tekrar gözden geçirin",
|
|
82
|
+
"Proofread on Backend": "Arka uçta yazım denetimi yapın",
|
|
83
|
+
Proofreading: "Düzeltme",
|
|
84
|
+
"Received backend response.": "Arka uçtan yanıt alındı.",
|
|
85
|
+
Regenerate: "Yeniden oluştur",
|
|
86
|
+
"Regenerate on Backend": "Arka uçta yeniden oluştur",
|
|
87
|
+
"Replace with": "Şununla değiştirin:",
|
|
88
|
+
"Requesting signed URL": "İmzalı URL isteniyor",
|
|
89
|
+
Rewrite: "Yeniden yaz",
|
|
90
|
+
"Rewrite again": "Tekrar yazın",
|
|
91
|
+
"Rewrite on Backend": "Arka uçta yeniden yazma",
|
|
92
|
+
"Rewriting text": "Metni yeniden yazmak",
|
|
93
|
+
Russian: "Rusça",
|
|
94
|
+
"Sending request to backend...": "Arka uca istek gönderiliyor...",
|
|
95
|
+
Short: "Kısa",
|
|
96
|
+
Shorter: "Daha kısa",
|
|
97
|
+
Show: "Göstermek",
|
|
98
|
+
"Something went wrong.": "Bir şeyler ters gitti.",
|
|
99
|
+
Spanish: "İspanyol",
|
|
100
|
+
"Suggested change": "Önerilen değişiklik",
|
|
101
|
+
Summarize: "Özetleyin",
|
|
102
|
+
"Summarize again": "Tekrar özetleyin",
|
|
103
|
+
"Summarize on Backend": "Arka uç hakkında özet",
|
|
104
|
+
Summarizing: "Özetleme",
|
|
105
|
+
Swedish: "İsveççe",
|
|
106
|
+
"TL;DR": "Özetle",
|
|
107
|
+
Teaser: "Tanıtım videosu",
|
|
108
|
+
Thai: "Tayland",
|
|
109
|
+
"The alt text for the image.": "Görselin alternatif metni.",
|
|
110
|
+
"The caption for the image.": "Görselin altındaki açıklama.",
|
|
111
|
+
"The description for the image.": "Görselin açıklaması.",
|
|
112
|
+
"The excerpt for the post.":
|
|
113
|
+
"İsteğe bağlı. Arama sonuçlarında ve önizlemelerde görünebilecek kısa özet.",
|
|
114
|
+
"The language AI-Kit should use for generated text by default (when applicable).":
|
|
115
|
+
"AI-Kit'in varsayılan olarak (uygun olduğunda) oluşturacağı metin için kullanması gereken dil.",
|
|
116
|
+
"The language of the input text.": "Giriş metninin dili.",
|
|
117
|
+
"The summary style to generate.": "Oluşturulacak özet stili.",
|
|
118
|
+
"The target output length.": "Hedef çıktı uzunluğu.",
|
|
119
|
+
"The title for the image.": "Görselin başlığı.",
|
|
120
|
+
"The title for the post.": "Yazının başlığı.",
|
|
121
|
+
"The tone or style for the AI to use.":
|
|
122
|
+
"Yapay zekanın kullanacağı üslup veya tarz.",
|
|
123
|
+
"The topic or subject for the AI to write about.":
|
|
124
|
+
"Yapay zekanın hakkında yazacağı konu veya başlık.",
|
|
125
|
+
Title: "Başlık",
|
|
126
|
+
Tone: "Ton",
|
|
127
|
+
Topic: "Başlık",
|
|
128
|
+
Translate: "Çevir",
|
|
129
|
+
"Translate again": "Tekrar çevir",
|
|
130
|
+
"Translate on Backend": "Arka uçta çeviri yap",
|
|
131
|
+
Translating: "Çeviri",
|
|
132
|
+
Turkish: "Türkçe",
|
|
133
|
+
Type: "Tip",
|
|
134
|
+
Ukrainian: "Ukrayna",
|
|
135
|
+
Uploading: "Yükleniyor",
|
|
136
|
+
"Uploading images via signed URL": "İmzalı URL üzerinden resim yükleme",
|
|
137
|
+
"Using backend": "Arka uç kullanımı",
|
|
138
|
+
"Using on-device": "Cihaz üzerinde kullanılıyor",
|
|
139
|
+
"Waiting for backend response...": "Arka uçtan yanıt bekleniyor...",
|
|
140
|
+
Why: "Neden",
|
|
141
|
+
"Working...": "Çalışma...",
|
|
142
|
+
"as-is": "olduğu gibi",
|
|
143
|
+
auto: "otomatik",
|
|
144
|
+
casual: "gündelik",
|
|
145
|
+
formal: "resmi",
|
|
146
|
+
headline: "başlık",
|
|
147
|
+
"key-points": "önemli noktalar",
|
|
148
|
+
long: "uzun",
|
|
149
|
+
longer: "daha uzun",
|
|
150
|
+
medium: "orta",
|
|
151
|
+
"more-casual": "daha rahat",
|
|
152
|
+
"more-formal": "daha resmi",
|
|
153
|
+
neutral: "doğal",
|
|
154
|
+
short: "kısa",
|
|
155
|
+
shorter: "daha kısa",
|
|
156
|
+
teaser: "tanıtım videosu",
|
|
157
|
+
tldr: "özet",
|
|
158
|
+
};
|
package/src/i18n/ua.ts
ADDED
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
export const uaDict: Record<string, string> = {
|
|
2
|
+
"WPSuite AI-Kit": "WPSuite AI-Kit",
|
|
3
|
+
Accept: "Прийняти",
|
|
4
|
+
"Additional instructions to guide the AI.":
|
|
5
|
+
"Додаткові інструкції для керування ШІ.",
|
|
6
|
+
"Alt Text": "Альтернативний текст",
|
|
7
|
+
"An unknown error occurred.": "Сталася невідома помилка.",
|
|
8
|
+
Arabic: "Арабська",
|
|
9
|
+
"As-Is": "Без змін",
|
|
10
|
+
"Auto-detect": "Автоматичне визначення",
|
|
11
|
+
Cancel: "Скасувати",
|
|
12
|
+
Caption: "Підпис",
|
|
13
|
+
Casual: "Повсякденний",
|
|
14
|
+
"Checking capabilities...": "Перевірка можливостей...",
|
|
15
|
+
Chinese: "китайська",
|
|
16
|
+
Close: "Закрити",
|
|
17
|
+
Corrected: "Виправлено",
|
|
18
|
+
"Creating LanguageDetector session": "Створення сеансу LanguageDetector",
|
|
19
|
+
"Creating LanguageModel session": "Створення сеансу LanguageModel",
|
|
20
|
+
"Creating Proofreader session": "Створення сеансу коректора",
|
|
21
|
+
"Creating Rewriter session": "Створення сеансу перезаписування",
|
|
22
|
+
"Creating Summarizer session": "Створення сеансу підсумовування",
|
|
23
|
+
"Creating Translator session": "Створення сеансу перекладача",
|
|
24
|
+
"Creating Writer session": "Створення сеансу Writer",
|
|
25
|
+
"Deciding capability": "Здатність приймати рішення",
|
|
26
|
+
Description: "Опис",
|
|
27
|
+
"Detecting language": "Виявлення мови",
|
|
28
|
+
"Done.": "Готово.",
|
|
29
|
+
"Downloading model...": "Завантаження моделі...",
|
|
30
|
+
Dutch: "Нідерландська",
|
|
31
|
+
English: "Англійська",
|
|
32
|
+
Excerpt: "Уривок",
|
|
33
|
+
Formal: "Формальний",
|
|
34
|
+
French: "Французька",
|
|
35
|
+
Generate: "Згенерувати",
|
|
36
|
+
"Generated content": "Згенерований контент",
|
|
37
|
+
"Generating text": "Генерація тексту",
|
|
38
|
+
"Generating...": "Генерування...",
|
|
39
|
+
German: "Німецька",
|
|
40
|
+
HTML: "HTML",
|
|
41
|
+
Headline: "Заголовок",
|
|
42
|
+
Hebrew: "Іврит",
|
|
43
|
+
Hide: "Приховати",
|
|
44
|
+
Hindi: "Хінді",
|
|
45
|
+
"Hover highlights to see explanations.":
|
|
46
|
+
"Наведіть курсор на виділення, щоб побачити пояснення.",
|
|
47
|
+
Hungarian: "Угорська",
|
|
48
|
+
Indonesian: "Індонезійська",
|
|
49
|
+
"Initializing on-device AI...":
|
|
50
|
+
"Ініціалізація штучного інтелекту на пристрої...",
|
|
51
|
+
"Inlining images as base64": "Вбудовування зображень як base64",
|
|
52
|
+
"Input and output languages cannot be the same.":
|
|
53
|
+
"Мови введення та виведення не можуть бути однаковими.",
|
|
54
|
+
"Input language": "Мова введення",
|
|
55
|
+
Instructions: "Інструкції",
|
|
56
|
+
Italian: "італійська",
|
|
57
|
+
Japanese: "Японська",
|
|
58
|
+
"Key Points": "Ключові моменти",
|
|
59
|
+
Korean: "Корейська",
|
|
60
|
+
Length: "Довжина",
|
|
61
|
+
Long: "Довгий",
|
|
62
|
+
Longer: "Довший",
|
|
63
|
+
Markdown: "Уцінка",
|
|
64
|
+
Medium: "Середній",
|
|
65
|
+
"More casual": "Більш невимушений",
|
|
66
|
+
"More formal": "Більш формальний",
|
|
67
|
+
Neutral: "Нейтральний",
|
|
68
|
+
"No issues found. Your text looks great!":
|
|
69
|
+
"Проблем не знайдено. Ваш текст виглядає чудово!",
|
|
70
|
+
"No overrides": "Без перевизначень",
|
|
71
|
+
Norwegian: "Норвезька",
|
|
72
|
+
"On-device model ready.": "Модель на пристрої готова.",
|
|
73
|
+
Options: "Опції",
|
|
74
|
+
"Output format": "Вихідний формат",
|
|
75
|
+
"Output language": "Мова виводу",
|
|
76
|
+
Polish: "польська",
|
|
77
|
+
Portuguese: "Португальська",
|
|
78
|
+
Preview: "Попередній перегляд",
|
|
79
|
+
Proofread: "Коректура",
|
|
80
|
+
"Proofread again": "Перевірте ще раз",
|
|
81
|
+
"Proofread on Backend": "Коректура на бекенді",
|
|
82
|
+
Proofreading: "Коректура",
|
|
83
|
+
"Received backend response.": "Отримано відповідь від сервера.",
|
|
84
|
+
Regenerate: "Регенерувати",
|
|
85
|
+
"Regenerate on Backend": "Регенерувати на серверній частині",
|
|
86
|
+
"Replace with": "Замінити на",
|
|
87
|
+
"Requesting signed URL": "Запит підписаної URL-адреси",
|
|
88
|
+
Rewrite: "Переписати",
|
|
89
|
+
"Rewrite again": "Перепишіть ще раз",
|
|
90
|
+
"Rewrite on Backend": "Переписати на бекенді",
|
|
91
|
+
"Rewriting text": "Переписування тексту",
|
|
92
|
+
Russian: "Російська",
|
|
93
|
+
"Sending request to backend...": "Надсилання запиту до серверної частини...",
|
|
94
|
+
Short: "Короткий",
|
|
95
|
+
Shorter: "Коротше",
|
|
96
|
+
Show: "Показати",
|
|
97
|
+
"Something went wrong.": "Щось пішло не так.",
|
|
98
|
+
Spanish: "Іспанська",
|
|
99
|
+
"Suggested change": "Запропонована зміна",
|
|
100
|
+
Summarize: "Підсумувати",
|
|
101
|
+
"Summarize again": "Підсумуйте ще раз",
|
|
102
|
+
"Summarize on Backend": "Підсумувати на серверній частині",
|
|
103
|
+
Summarizing: "Підсумовуючи",
|
|
104
|
+
Swedish: "Шведська",
|
|
105
|
+
"TL;DR": "TL;DR",
|
|
106
|
+
Teaser: "Тизер",
|
|
107
|
+
Thai: "Тайська",
|
|
108
|
+
"The alt text for the image.": "Альтернативний текст для зображення.",
|
|
109
|
+
"The caption for the image.": "Підпис до зображення.",
|
|
110
|
+
"The description for the image.": "Опис зображення.",
|
|
111
|
+
"The excerpt for the post.":
|
|
112
|
+
"Необов’язково. Короткий опис, який може відображатися в результатах пошуку та попередньому перегляді.",
|
|
113
|
+
"The language AI-Kit should use for generated text by default (when applicable).":
|
|
114
|
+
"Мова, яку AI-Kit має використовувати для згенерованого тексту за замовчуванням (якщо це можливо).",
|
|
115
|
+
"The language of the input text.": "Мова вхідного тексту.",
|
|
116
|
+
"The summary style to generate.": "Стиль зведення, який потрібно створити.",
|
|
117
|
+
"The target output length.": "Цільова довжина виводу.",
|
|
118
|
+
"The title for the image.": "Назва зображення.",
|
|
119
|
+
"The title for the post.": "Назва публікації.",
|
|
120
|
+
"The tone or style for the AI to use.":
|
|
121
|
+
"Тон або стиль, який використовуватиме ШІ.",
|
|
122
|
+
"The topic or subject for the AI to write about.":
|
|
123
|
+
"Тема або предмет, про яку має написати ШІ.",
|
|
124
|
+
Title: "Назва",
|
|
125
|
+
Tone: "Тон",
|
|
126
|
+
Topic: "Тема",
|
|
127
|
+
Translate: "Перекласти",
|
|
128
|
+
"Translate again": "Перекласти ще раз",
|
|
129
|
+
"Translate on Backend": "Переклад на серверній частині",
|
|
130
|
+
Translating: "Переклад",
|
|
131
|
+
Turkish: "Турецька",
|
|
132
|
+
Type: "Тип",
|
|
133
|
+
Ukrainian: "українська",
|
|
134
|
+
Uploading: "Завантаження",
|
|
135
|
+
"Uploading images via signed URL":
|
|
136
|
+
"Завантаження зображень через підписану URL-адресу",
|
|
137
|
+
"Using backend": "Використання бекенду",
|
|
138
|
+
"Using on-device": "Використання на пристрої",
|
|
139
|
+
"Waiting for backend response...":
|
|
140
|
+
"Очікування відповіді серверної частини...",
|
|
141
|
+
Why: "Чому",
|
|
142
|
+
"Working...": "Працюємо...",
|
|
143
|
+
"as-is": "як є",
|
|
144
|
+
auto: "авто",
|
|
145
|
+
casual: "повсякденний",
|
|
146
|
+
formal: "формальний",
|
|
147
|
+
headline: "заголовок",
|
|
148
|
+
"key-points": "ключові моменти",
|
|
149
|
+
long: "довгий",
|
|
150
|
+
longer: "довше",
|
|
151
|
+
medium: "середній",
|
|
152
|
+
"more-casual": "більш невимушений",
|
|
153
|
+
"more-formal": "більш формальний",
|
|
154
|
+
neutral: "нейтральний",
|
|
155
|
+
short: "короткий",
|
|
156
|
+
shorter: "коротший",
|
|
157
|
+
teaser: "тизер",
|
|
158
|
+
tldr: "tldr",
|
|
159
|
+
};
|
package/src/i18n/zh.ts
ADDED
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
export const zhDict: Record<string, string> = {
|
|
2
|
+
"WPSuite AI-Kit": "WPSuite AI-Kit",
|
|
3
|
+
Accept: "接受",
|
|
4
|
+
"Additional instructions to guide the AI.": "指导人工智能的附加指令。",
|
|
5
|
+
"Alt Text": "替代文字",
|
|
6
|
+
"An unknown error occurred.": "发生未知错误。",
|
|
7
|
+
Arabic: "阿拉伯",
|
|
8
|
+
"As-Is": "不变",
|
|
9
|
+
"Auto-detect": "自动检测",
|
|
10
|
+
Cancel: "取消",
|
|
11
|
+
Caption: "标题",
|
|
12
|
+
Casual: "随意的",
|
|
13
|
+
"Checking capabilities...": "正在检查功能……",
|
|
14
|
+
Chinese: "中国人",
|
|
15
|
+
Close: "关闭",
|
|
16
|
+
Corrected: "已更正",
|
|
17
|
+
"Creating LanguageDetector session": "创建 LanguageDetector 会话",
|
|
18
|
+
"Creating LanguageModel session": "创建 LanguageModel 会话",
|
|
19
|
+
"Creating Proofreader session": "创建校对会议",
|
|
20
|
+
"Creating Rewriter session": "创建 Rewriter 会话",
|
|
21
|
+
"Creating Summarizer session": "创建摘要器会话",
|
|
22
|
+
"Creating Translator session": "创建翻译会话",
|
|
23
|
+
"Creating Writer session": "创建作家会议",
|
|
24
|
+
"Deciding capability": "决策能力",
|
|
25
|
+
Description: "描述",
|
|
26
|
+
"Detecting language": "语言检测",
|
|
27
|
+
"Done.": "完毕。",
|
|
28
|
+
"Downloading model...": "正在下载模型...",
|
|
29
|
+
Dutch: "荷兰语",
|
|
30
|
+
English: "英语",
|
|
31
|
+
Excerpt: "摘抄",
|
|
32
|
+
Formal: "正式的",
|
|
33
|
+
French: "法语",
|
|
34
|
+
Generate: "产生",
|
|
35
|
+
"Generated content": "生成的内容",
|
|
36
|
+
"Generating text": "生成文本",
|
|
37
|
+
"Generating...": "正在生成...",
|
|
38
|
+
German: "德语",
|
|
39
|
+
HTML: "HTML",
|
|
40
|
+
Headline: "标题",
|
|
41
|
+
Hebrew: "希伯来语",
|
|
42
|
+
Hide: "隐藏",
|
|
43
|
+
Hindi: "印地语",
|
|
44
|
+
"Hover highlights to see explanations.": "将鼠标悬停在高亮部分即可查看说明。",
|
|
45
|
+
Hungarian: "匈牙利",
|
|
46
|
+
Indonesian: "印度尼西亚",
|
|
47
|
+
"Initializing on-device AI...": "正在初始化设备端人工智能……",
|
|
48
|
+
"Inlining images as base64": "将图像内联为 base64 格式",
|
|
49
|
+
"Input and output languages cannot be the same.":
|
|
50
|
+
"输入语言和输出语言不能相同。",
|
|
51
|
+
"Input language": "输入语言",
|
|
52
|
+
Instructions: "指示",
|
|
53
|
+
Italian: "意大利语",
|
|
54
|
+
Japanese: "日本人",
|
|
55
|
+
"Key Points": "要点",
|
|
56
|
+
Korean: "韩国人",
|
|
57
|
+
Length: "长度",
|
|
58
|
+
Long: "长的",
|
|
59
|
+
Longer: "更长",
|
|
60
|
+
Markdown: "Markdown",
|
|
61
|
+
Medium: "中等的",
|
|
62
|
+
"More casual": "更休闲",
|
|
63
|
+
"More formal": "更正式",
|
|
64
|
+
Neutral: "中性的",
|
|
65
|
+
"No issues found. Your text looks great!": "未发现问题。您的文本看起来很棒!",
|
|
66
|
+
"No overrides": "不覆盖",
|
|
67
|
+
Norwegian: "挪威",
|
|
68
|
+
"On-device model ready.": "设备端模型已准备就绪。",
|
|
69
|
+
Options: "选项",
|
|
70
|
+
"Output format": "输出格式",
|
|
71
|
+
"Output language": "输出语言",
|
|
72
|
+
Polish: "抛光",
|
|
73
|
+
Portuguese: "葡萄牙语",
|
|
74
|
+
Preview: "预览",
|
|
75
|
+
Proofread: "校对",
|
|
76
|
+
"Proofread again": "再次校对",
|
|
77
|
+
"Proofread on Backend": "后端校对",
|
|
78
|
+
Proofreading: "校对",
|
|
79
|
+
"Received backend response.": "已收到后端响应。",
|
|
80
|
+
Regenerate: "再生",
|
|
81
|
+
"Regenerate on Backend": "后端重新生成",
|
|
82
|
+
"Replace with": "替换为",
|
|
83
|
+
"Requesting signed URL": "请求已签名 URL",
|
|
84
|
+
Rewrite: "改写",
|
|
85
|
+
"Rewrite again": "重写",
|
|
86
|
+
"Rewrite on Backend": "后端重写",
|
|
87
|
+
"Rewriting text": "重写文本",
|
|
88
|
+
Russian: "俄语",
|
|
89
|
+
"Sending request to backend...": "正在向后端发送请求...",
|
|
90
|
+
Short: "短的",
|
|
91
|
+
Shorter: "较短",
|
|
92
|
+
Show: "展示",
|
|
93
|
+
"Something went wrong.": "出问题了。",
|
|
94
|
+
Spanish: "西班牙语",
|
|
95
|
+
"Suggested change": "建议的更改",
|
|
96
|
+
Summarize: "总结",
|
|
97
|
+
"Summarize again": "再次总结",
|
|
98
|
+
"Summarize on Backend": "后端总结",
|
|
99
|
+
Summarizing: "总结",
|
|
100
|
+
Swedish: "瑞典",
|
|
101
|
+
"TL;DR": "太长不看",
|
|
102
|
+
Teaser: "预告片",
|
|
103
|
+
Thai: "泰国",
|
|
104
|
+
"The alt text for the image.": "图片的替代文字。",
|
|
105
|
+
"The caption for the image.": "图片说明文字。",
|
|
106
|
+
"The description for the image.": "图片描述。",
|
|
107
|
+
"The excerpt for the post.": "可选。可能显示在搜索结果和预览中的简短摘要。",
|
|
108
|
+
"The language AI-Kit should use for generated text by default (when applicable).":
|
|
109
|
+
"AIKit 默认用于生成文本的语言(如适用)。",
|
|
110
|
+
"The language of the input text.": "输入文本的语言。",
|
|
111
|
+
"The summary style to generate.": "要生成的摘要样式。",
|
|
112
|
+
"The target output length.": "目标输出长度。",
|
|
113
|
+
"The title for the image.": "图片标题。",
|
|
114
|
+
"The title for the post.": "帖子标题。",
|
|
115
|
+
"The tone or style for the AI to use.": "人工智能使用的语气或风格。",
|
|
116
|
+
"The topic or subject for the AI to write about.":
|
|
117
|
+
"人工智能要撰写的主题或题目。",
|
|
118
|
+
Title: "标题",
|
|
119
|
+
Tone: "语气",
|
|
120
|
+
Topic: "话题",
|
|
121
|
+
Translate: "翻译",
|
|
122
|
+
"Translate again": "再次翻译",
|
|
123
|
+
"Translate on Backend": "后端翻译",
|
|
124
|
+
Translating: "翻译",
|
|
125
|
+
Turkish: "土耳其",
|
|
126
|
+
Type: "类型",
|
|
127
|
+
Ukrainian: "乌克兰",
|
|
128
|
+
Uploading: "上传",
|
|
129
|
+
"Uploading images via signed URL": "通过已签名 URL 上传图片",
|
|
130
|
+
"Using backend": "使用后端",
|
|
131
|
+
"Using on-device": "使用设备上的设备",
|
|
132
|
+
"Waiting for backend response...": "正在等待后端响应……",
|
|
133
|
+
Why: "为什么",
|
|
134
|
+
"Working...": "在职的...",
|
|
135
|
+
"as-is": "原样",
|
|
136
|
+
auto: "汽车",
|
|
137
|
+
casual: "随意的",
|
|
138
|
+
formal: "正式的",
|
|
139
|
+
headline: "标题",
|
|
140
|
+
"key-points": "要点",
|
|
141
|
+
long: "长的",
|
|
142
|
+
longer: "更长",
|
|
143
|
+
medium: "中等的",
|
|
144
|
+
"more-casual": "更随意",
|
|
145
|
+
"more-formal": "更正式的",
|
|
146
|
+
neutral: "中性的",
|
|
147
|
+
short: "短的",
|
|
148
|
+
shorter: "较短",
|
|
149
|
+
teaser: "预告片",
|
|
150
|
+
tldr: "太长不看",
|
|
151
|
+
};
|
package/src/index.tsx
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
--ai-kit-border-width: 1px;
|
|
3
|
+
|
|
4
|
+
--ai-kit-border-color: var(
|
|
5
|
+
--mantine-color-default-border,
|
|
6
|
+
rgba(0, 0, 0, 0.12)
|
|
7
|
+
);
|
|
8
|
+
--ai-kit-text-color: var(
|
|
9
|
+
--mantine-color-text,
|
|
10
|
+
var(--mantine-color-default-color)
|
|
11
|
+
);
|
|
12
|
+
|
|
13
|
+
--ai-kit-background-color: var(--mantine-color-body);
|
|
14
|
+
--ai-kit-options-background-color: rgba(235, 235, 235, 0.15);
|
|
15
|
+
|
|
16
|
+
--ai-kit-border-radius: var(--paper-radius);
|
|
17
|
+
--ai-kit-border-thickness: 2px;
|
|
18
|
+
--ai-kit-border-speed: 1400ms;
|
|
19
|
+
--ai-kit-border-angle: 0deg;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
:host[data-ai-kit-variation="default"] {
|
|
23
|
+
--ai-kit-background-color: transparent;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.ai-feature-root {
|
|
27
|
+
--mb-z-index: var(--ai-kit-z-index, 100000) !important;
|
|
28
|
+
border: var(--ai-kit-border-width) solid var(--ai-kit-border-color);
|
|
29
|
+
border-radius: var(--ai-kit-border-radius);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.ai-feature-root .Mantine-Paper-root {
|
|
33
|
+
background-color: transparent;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.ai-feature-title-icon {
|
|
37
|
+
width: 24px;
|
|
38
|
+
height: 24px;
|
|
39
|
+
fill: none;
|
|
40
|
+
margin-right: 8px;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.ai-feature-open-button-no-title {
|
|
44
|
+
padding-inline-start: var(--button-padding-x);
|
|
45
|
+
}
|
|
46
|
+
.ai-feature-open-button-no-title .mantine-Button-section {
|
|
47
|
+
margin-inline-end: unset;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.ai-feature-options {
|
|
51
|
+
background-color: var(--ai-kit-options-background-color);
|
|
52
|
+
border: var(--ai-kit-border-width) solid var(--ai-kit-border-color);
|
|
53
|
+
border-radius: var(--ai-kit-border-radius);
|
|
54
|
+
font-size: var(--mantine-font-size-xs);
|
|
55
|
+
cursor: pointer;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.ai-feature-options[data-options-display="horizontal"] {
|
|
59
|
+
cursor: default;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.ai-feature-options[data-options-display="horizontal"] .ai-feature-option {
|
|
63
|
+
flex: 1 1 auto;
|
|
64
|
+
min-width: 120px;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.ai-feature-options-summary {
|
|
68
|
+
--group-wrap: nowrap !important;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.ai-feature-status-text {
|
|
72
|
+
font-size: var(--mantine-font-size-xs);
|
|
73
|
+
opacity: 0.85;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.ai-feature-generated-content {
|
|
77
|
+
border: var(--ai-kit-border-width) solid var(--ai-kit-border-color);
|
|
78
|
+
border-radius: var(--ai-kit-border-radius);
|
|
79
|
+
white-space: normal;
|
|
80
|
+
background-color: var(--ai-kit-options-background-color);
|
|
81
|
+
max-height: 400px;
|
|
82
|
+
overflow: auto;
|
|
83
|
+
padding: var(--mantine-spacing-sm);
|
|
84
|
+
font-size: var(--mantine-font-size-sm);
|
|
85
|
+
line-height: var(--mantine-line-height-sm);
|
|
86
|
+
}
|
|
87
|
+
.ai-feature-generated-content * {
|
|
88
|
+
margin-block-start: auto;
|
|
89
|
+
margin-block-end: auto;
|
|
90
|
+
}
|
|
91
|
+
.ai-feature-generated-content.ai-feature-preview,
|
|
92
|
+
.ai-feature-generated-content.ai-feature-editor {
|
|
93
|
+
max-height: 200px;
|
|
94
|
+
}
|
|
95
|
+
.ai-feature-generated-content.ai-feature-editor textarea {
|
|
96
|
+
border: 0;
|
|
97
|
+
max-height: 198px;
|
|
98
|
+
resize: vertical;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.ai-kit-feature-border {
|
|
102
|
+
background-color: var(--ai-kit-background-color);
|
|
103
|
+
position: relative;
|
|
104
|
+
overflow: visible;
|
|
105
|
+
padding: var(--ai-kit-border-thickness);
|
|
106
|
+
border-radius: var(--ai-kit-border-radius);
|
|
107
|
+
width: 100%;
|
|
108
|
+
box-sizing: border-box;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.ai-kit-feature-border__content {
|
|
112
|
+
position: relative;
|
|
113
|
+
z-index: 1;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.ai-kit-feature-border[data-ai-kit-active="false"]::before {
|
|
117
|
+
content: "";
|
|
118
|
+
position: absolute;
|
|
119
|
+
inset: 0;
|
|
120
|
+
z-index: 0;
|
|
121
|
+
border-radius: var(--ai-kit-border-radius);
|
|
122
|
+
padding: var(--ai-kit-border-thickness);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.ai-kit-feature-border[data-ai-kit-active="true"]::before {
|
|
126
|
+
content: "";
|
|
127
|
+
position: absolute;
|
|
128
|
+
inset: 0;
|
|
129
|
+
z-index: 0;
|
|
130
|
+
border-radius: var(--ai-kit-border-radius);
|
|
131
|
+
padding: var(--ai-kit-border-thickness);
|
|
132
|
+
background: var(
|
|
133
|
+
--ai-kit-border-gradient,
|
|
134
|
+
conic-gradient(
|
|
135
|
+
from var(--ai-kit-border-angle, 0deg) at 50% 50%,
|
|
136
|
+
#00c2ff,
|
|
137
|
+
#7c3aed,
|
|
138
|
+
#22c55e,
|
|
139
|
+
#f59e0b,
|
|
140
|
+
#00c2ff
|
|
141
|
+
)
|
|
142
|
+
);
|
|
143
|
+
animation: ai-kit-border-run var(--ai-kit-border-speed) linear infinite;
|
|
144
|
+
-webkit-mask:
|
|
145
|
+
linear-gradient(#000 0 0) content-box,
|
|
146
|
+
linear-gradient(#000 0 0);
|
|
147
|
+
-webkit-mask-composite: xor;
|
|
148
|
+
mask:
|
|
149
|
+
linear-gradient(#000 0 0) content-box,
|
|
150
|
+
linear-gradient(#000 0 0);
|
|
151
|
+
mask-composite: exclude;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.ai-kit-feature-border[data-ai-kit-active="true"][data-ai-kit-variation="modal"] {
|
|
155
|
+
box-shadow:
|
|
156
|
+
0 0 0 0.5px rgba(0, 0, 0, 0.06),
|
|
157
|
+
0 8px 24px rgba(0, 0, 0, 0.14),
|
|
158
|
+
0 0 28px rgba(124, 58, 237, 0.22);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
@keyframes ai-kit-border-run {
|
|
162
|
+
from {
|
|
163
|
+
--ai-kit-border-angle: 0deg;
|
|
164
|
+
}
|
|
165
|
+
to {
|
|
166
|
+
--ai-kit-border-angle: 360deg;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
@media (prefers-reduced-motion: reduce) {
|
|
171
|
+
.ai-kit-feature-border[data-ai-kit-active="true"]::before {
|
|
172
|
+
animation: none;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
/* AiResult inner padding so content doesn't touch the animated border */
|
|
177
|
+
.ai-kit-actions {
|
|
178
|
+
display: flex;
|
|
179
|
+
width: 100%;
|
|
180
|
+
gap: var(--ai-kit-actions-gap, 8px);
|
|
181
|
+
justify-content: flex-end;
|
|
182
|
+
flex-wrap: wrap;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.ai-kit-actions .mantine-Button-root {
|
|
186
|
+
flex: var(--ai-kit-actions-button-flex, 1 1 0);
|
|
187
|
+
min-width: var(--ai-kit-actions-button-min-width, 140px);
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
@media (max-width: var(--ai-kit-actions-breakpoint, 520px)) {
|
|
191
|
+
.ai-kit-actions {
|
|
192
|
+
flex-direction: column;
|
|
193
|
+
align-items: stretch;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
.ai-kit-actions .mantine-Button-root {
|
|
197
|
+
flex: 1 1 auto;
|
|
198
|
+
width: 100%;
|
|
199
|
+
min-width: 0;
|
|
200
|
+
}
|
|
201
|
+
}
|