@alpaca-editor/core 1.0.3896 → 1.0.3898
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/components/ActionButton.js +2 -2
- package/dist/components/ActionButton.js.map +1 -1
- package/dist/components/ui/button.js +3 -3
- package/dist/components/ui/button.js.map +1 -1
- package/dist/config/config.js +44 -22
- package/dist/config/config.js.map +1 -1
- package/dist/editor/FieldListField.js +1 -1
- package/dist/editor/FieldListField.js.map +1 -1
- package/dist/editor/Titlebar.js +2 -1
- package/dist/editor/Titlebar.js.map +1 -1
- package/dist/editor/client/EditorClient.d.ts +27 -2
- package/dist/editor/client/EditorClient.js +140 -1
- package/dist/editor/client/EditorClient.js.map +1 -1
- package/dist/editor/client/editContext.d.ts +6 -1
- package/dist/editor/client/editContext.js.map +1 -1
- package/dist/editor/client/itemsRepository.js +1 -1
- package/dist/editor/client/itemsRepository.js.map +1 -1
- package/dist/editor/client/operations.js +1 -1
- package/dist/editor/client/operations.js.map +1 -1
- package/dist/editor/control-center/About.d.ts +1 -0
- package/dist/editor/control-center/About.js +8 -0
- package/dist/editor/control-center/About.js.map +1 -0
- package/dist/editor/control-center/ControlCenterMenu.js +3 -0
- package/dist/editor/control-center/ControlCenterMenu.js.map +1 -1
- package/dist/editor/control-center/Info.d.ts +1 -0
- package/dist/editor/control-center/Info.js +10 -0
- package/dist/editor/control-center/Info.js.map +1 -0
- package/dist/editor/control-center/QuotaInfo.d.ts +1 -0
- package/dist/editor/control-center/QuotaInfo.js +102 -0
- package/dist/editor/control-center/QuotaInfo.js.map +1 -0
- package/dist/editor/control-center/Status.js +69 -2
- package/dist/editor/control-center/Status.js.map +1 -1
- package/dist/editor/control-center/WebSocketMessages.d.ts +1 -0
- package/dist/editor/control-center/WebSocketMessages.js +66 -0
- package/dist/editor/control-center/WebSocketMessages.js.map +1 -0
- package/dist/editor/page-editor-chrome/FieldActionIndicator.js +7 -6
- package/dist/editor/page-editor-chrome/FieldActionIndicator.js.map +1 -1
- package/dist/editor/page-viewer/PageViewer.js.map +1 -1
- package/dist/editor/services/aiService.d.ts +7 -1
- package/dist/editor/services/aiService.js +8 -1
- package/dist/editor/services/aiService.js.map +1 -1
- package/dist/editor/sidebar/ComponentTree.js +1 -1
- package/dist/editor/sidebar/ComponentTree.js.map +1 -1
- package/dist/editor/sidebar/ViewSelector.js +9 -4
- package/dist/editor/sidebar/ViewSelector.js.map +1 -1
- package/dist/editor/ui/Icons.d.ts +19 -1
- package/dist/editor/ui/Icons.js +23 -5
- package/dist/editor/ui/Icons.js.map +1 -1
- package/dist/editor/ui/SimpleMenu.js +1 -1
- package/dist/editor/ui/SimpleMenu.js.map +1 -1
- package/dist/fonts/index.d.ts +4 -0
- package/dist/fonts/index.js +9 -0
- package/dist/fonts/index.js.map +1 -0
- package/dist/images/wizard-bg.png +0 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/page-wizard/WizardBox.d.ts +8 -0
- package/dist/page-wizard/WizardBox.js +6 -0
- package/dist/page-wizard/WizardBox.js.map +1 -0
- package/dist/page-wizard/WizardBoxConnector.d.ts +3 -0
- package/dist/page-wizard/WizardBoxConnector.js +6 -0
- package/dist/page-wizard/WizardBoxConnector.js.map +1 -0
- package/dist/page-wizard/WizardSteps.d.ts +4 -2
- package/dist/page-wizard/WizardSteps.js +44 -18
- package/dist/page-wizard/WizardSteps.js.map +1 -1
- package/dist/page-wizard/steps/CollectStep.js +16 -21
- package/dist/page-wizard/steps/CollectStep.js.map +1 -1
- package/dist/page-wizard/steps/ComponentTypesSelector.js +50 -45
- package/dist/page-wizard/steps/ComponentTypesSelector.js.map +1 -1
- package/dist/page-wizard/steps/CreatePage.js +6 -3
- package/dist/page-wizard/steps/CreatePage.js.map +1 -1
- package/dist/page-wizard/steps/CreatePageAndLayoutStep.js +21 -28
- package/dist/page-wizard/steps/CreatePageAndLayoutStep.js.map +1 -1
- package/dist/page-wizard/steps/Generate.js +27 -5
- package/dist/page-wizard/steps/Generate.js.map +1 -1
- package/dist/page-wizard/steps/ImagesStep.js +46 -44
- package/dist/page-wizard/steps/ImagesStep.js.map +1 -1
- package/dist/page-wizard/steps/SelectStep.js +11 -19
- package/dist/page-wizard/steps/SelectStep.js.map +1 -1
- package/dist/page-wizard/steps/usePageCreator.js +41 -12
- package/dist/page-wizard/steps/usePageCreator.js.map +1 -1
- package/dist/revision.d.ts +2 -2
- package/dist/revision.js +2 -2
- package/dist/styles.css +236 -120
- package/images/wizard-bg.png +0 -0
- package/package.json +1 -1
- package/src/components/ActionButton.tsx +6 -8
- package/src/components/ui/button.tsx +3 -3
- package/src/config/config.tsx +54 -22
- package/src/editor/FieldListField.tsx +2 -2
- package/src/editor/Titlebar.tsx +2 -1
- package/src/editor/client/EditorClient.tsx +192 -9
- package/src/editor/client/editContext.ts +12 -2
- package/src/editor/client/itemsRepository.ts +1 -1
- package/src/editor/client/operations.ts +1 -1
- package/src/editor/control-center/About.tsx +342 -0
- package/src/editor/control-center/ControlCenterMenu.tsx +5 -0
- package/src/editor/control-center/Info.tsx +104 -0
- package/src/editor/control-center/QuotaInfo.tsx +301 -0
- package/src/editor/control-center/Status.tsx +108 -2
- package/src/editor/control-center/WebSocketMessages.tsx +155 -0
- package/src/editor/page-editor-chrome/FieldActionIndicator.tsx +20 -5
- package/src/editor/page-viewer/PageViewer.tsx +1 -1
- package/src/editor/services/aiService.ts +17 -2
- package/src/editor/sidebar/ComponentTree.tsx +1 -1
- package/src/editor/sidebar/ViewSelector.tsx +10 -11
- package/src/editor/ui/Icons.tsx +146 -26
- package/src/editor/ui/SimpleMenu.tsx +1 -1
- package/src/fonts/index.ts +10 -0
- package/src/index.ts +7 -1
- package/src/page-wizard/WizardBox.tsx +40 -0
- package/src/page-wizard/WizardBoxConnector.tsx +21 -0
- package/src/page-wizard/WizardSteps.tsx +236 -116
- package/src/page-wizard/steps/CollectStep.tsx +129 -67
- package/src/page-wizard/steps/ComponentTypesSelector.tsx +32 -11
- package/src/page-wizard/steps/CreatePage.tsx +130 -84
- package/src/page-wizard/steps/CreatePageAndLayoutStep.tsx +47 -30
- package/src/page-wizard/steps/Generate.tsx +45 -17
- package/src/page-wizard/steps/ImagesStep.tsx +161 -141
- package/src/page-wizard/steps/SelectStep.tsx +92 -76
- package/src/page-wizard/steps/usePageCreator.ts +40 -14
- package/src/revision.ts +2 -2
- package/styles.css +49 -8
|
@@ -11,6 +11,9 @@ import { LanguageSelector } from "../../editor/menubar/LanguageSelector";
|
|
|
11
11
|
import { InputText } from "primereact/inputtext";
|
|
12
12
|
import { InputTextarea } from "primereact/inputtextarea";
|
|
13
13
|
import { getItemDescriptor } from "../../editor/utils";
|
|
14
|
+
import { WizardBox } from "../WizardBox";
|
|
15
|
+
import { WizardBoxConnector } from "../WizardBoxConnector";
|
|
16
|
+
import { Settings, FileText } from "lucide-react";
|
|
14
17
|
|
|
15
18
|
export function CreatePage({
|
|
16
19
|
wizard,
|
|
@@ -192,92 +195,135 @@ export function CreatePage({
|
|
|
192
195
|
};
|
|
193
196
|
|
|
194
197
|
return (
|
|
195
|
-
<div className="
|
|
196
|
-
<
|
|
197
|
-
|
|
198
|
-
<
|
|
199
|
-
|
|
198
|
+
<div className="flex h-full">
|
|
199
|
+
<WizardBox
|
|
200
|
+
title="Page Setup"
|
|
201
|
+
icon={<Settings />}
|
|
202
|
+
description="Configure the target location and language for your new page"
|
|
203
|
+
className="w-96"
|
|
204
|
+
>
|
|
205
|
+
<div className="flex h-full flex-col items-stretch">
|
|
206
|
+
<div className="relative flex-1">
|
|
207
|
+
<div className="absolute inset-0 overflow-y-auto pr-6">
|
|
208
|
+
<div className="mb-4">
|
|
209
|
+
<div className="mb-1 text-sm font-medium">
|
|
210
|
+
Target Parent Item
|
|
211
|
+
</div>
|
|
212
|
+
<div className="mb-4 break-after-all text-xs">
|
|
213
|
+
{fullParentItem?.path}
|
|
214
|
+
</div>
|
|
215
|
+
</div>
|
|
216
|
+
<div className="relative mb-4">
|
|
217
|
+
<label
|
|
218
|
+
htmlFor="language"
|
|
219
|
+
className="mb-1 block text-sm font-medium"
|
|
220
|
+
>
|
|
221
|
+
Language
|
|
222
|
+
</label>
|
|
223
|
+
<div className="w-fit">
|
|
224
|
+
<LanguageSelector
|
|
225
|
+
selectedLanguage={language}
|
|
226
|
+
darkMode={true}
|
|
227
|
+
disabled={isBuilding || isGenerating}
|
|
228
|
+
onLanguageSelected={(language) =>
|
|
229
|
+
setLanguage(language.languageCode)
|
|
230
|
+
}
|
|
231
|
+
showAllLanguages={true}
|
|
232
|
+
/>
|
|
233
|
+
</div>
|
|
234
|
+
</div>
|
|
235
|
+
</div>
|
|
236
|
+
</div>
|
|
200
237
|
</div>
|
|
201
|
-
</
|
|
202
|
-
<
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
</div>
|
|
238
|
+
</WizardBox>
|
|
239
|
+
<WizardBoxConnector className="mt-6" />
|
|
240
|
+
<WizardBox
|
|
241
|
+
title="Page Details"
|
|
242
|
+
icon={<FileText />}
|
|
243
|
+
description="Define the page name and meta information for SEO optimization"
|
|
244
|
+
className="flex-1"
|
|
245
|
+
>
|
|
246
|
+
<div className="flex h-full flex-col items-stretch">
|
|
247
|
+
<div className="relative flex-1">
|
|
248
|
+
<div className="absolute inset-0 overflow-y-auto pr-6">
|
|
249
|
+
<div className="mb-4">
|
|
250
|
+
<label
|
|
251
|
+
htmlFor="pageName"
|
|
252
|
+
className="mb-1 block text-sm font-medium"
|
|
253
|
+
>
|
|
254
|
+
Page Name
|
|
255
|
+
</label>
|
|
256
|
+
<InputText
|
|
257
|
+
id="pageName"
|
|
258
|
+
type="text"
|
|
259
|
+
disabled={!!pageItem || isBuilding || isGenerating}
|
|
260
|
+
className="w-full rounded border p-2 text-sm"
|
|
261
|
+
value={pageModel.name}
|
|
262
|
+
onChange={(e) => handleInputChange("name", e.target.value)}
|
|
263
|
+
placeholder="Enter page name"
|
|
264
|
+
/>
|
|
265
|
+
{validationMessage && (
|
|
266
|
+
<div className="mt-2 text-sm text-red-500">
|
|
267
|
+
{validationMessage}
|
|
268
|
+
</div>
|
|
269
|
+
)}
|
|
270
|
+
</div>
|
|
235
271
|
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
272
|
+
<div className="mb-4">
|
|
273
|
+
<label
|
|
274
|
+
htmlFor="metaDescription"
|
|
275
|
+
className="mb-1 block text-sm font-medium"
|
|
276
|
+
>
|
|
277
|
+
Meta Description
|
|
278
|
+
</label>
|
|
279
|
+
<InputTextarea
|
|
280
|
+
id="metaDescription"
|
|
281
|
+
disabled={!!pageItem || isBuilding || isGenerating}
|
|
282
|
+
className="min-h-[100px] w-full rounded border p-2 text-sm"
|
|
283
|
+
value={pageModel.metaDescription}
|
|
284
|
+
onChange={(e) =>
|
|
285
|
+
handleInputChange("metaDescription", e.target.value)
|
|
286
|
+
}
|
|
287
|
+
placeholder="Enter meta description"
|
|
288
|
+
/>
|
|
289
|
+
</div>
|
|
290
|
+
<div className="mb-4">
|
|
291
|
+
<label
|
|
292
|
+
htmlFor="metaKeywords"
|
|
293
|
+
className="mb-1 block text-sm font-medium"
|
|
294
|
+
>
|
|
295
|
+
Meta Keywords
|
|
296
|
+
</label>
|
|
297
|
+
<InputTextarea
|
|
298
|
+
id="metaKeywords"
|
|
299
|
+
disabled={!!pageItem || isBuilding || isGenerating}
|
|
300
|
+
className="min-h-[100px] w-full rounded border p-2 text-sm"
|
|
301
|
+
value={pageModel.metaKeywords}
|
|
302
|
+
onChange={(e) =>
|
|
303
|
+
handleInputChange("metaKeywords", e.target.value)
|
|
304
|
+
}
|
|
305
|
+
placeholder="Enter meta keywords"
|
|
306
|
+
/>
|
|
307
|
+
</div>
|
|
308
|
+
</div>
|
|
309
|
+
</div>
|
|
310
|
+
{!pageItem && (
|
|
311
|
+
<div className="py-2">
|
|
312
|
+
<ActionButton
|
|
313
|
+
disabled={isBuilding || isGenerating || !!validationMessage}
|
|
314
|
+
className="w-full"
|
|
315
|
+
onClick={() => {
|
|
316
|
+
createPage();
|
|
317
|
+
}}
|
|
318
|
+
isLoading={isBuilding || isGenerating}
|
|
319
|
+
loadingText={isGenerating ? "Generating..." : "Create Page"}
|
|
320
|
+
>
|
|
321
|
+
Create Page
|
|
322
|
+
</ActionButton>
|
|
323
|
+
</div>
|
|
324
|
+
)}
|
|
325
|
+
</div>
|
|
326
|
+
</WizardBox>
|
|
281
327
|
</div>
|
|
282
328
|
);
|
|
283
329
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { Splitter, SplitterPanel } from "../../editor/ui/Splitter";
|
|
2
1
|
import { StepComponentProps } from "../../config/types";
|
|
3
2
|
|
|
4
3
|
import { CreatePage } from "./CreatePage";
|
|
@@ -8,7 +7,7 @@ import {
|
|
|
8
7
|
useEditContext,
|
|
9
8
|
useModifiedFieldsContext,
|
|
10
9
|
} from "../../editor/client/editContext";
|
|
11
|
-
|
|
10
|
+
|
|
12
11
|
import { ComponentTypeSelector } from "./ComponentTypesSelector";
|
|
13
12
|
import { ActionButton } from "../../components/ActionButton";
|
|
14
13
|
import { convertPageSchemaToWizardComponents } from "./schema";
|
|
@@ -21,6 +20,10 @@ import { useThrottledCallback } from "use-debounce";
|
|
|
21
20
|
import { InputTextarea } from "primereact/inputtextarea";
|
|
22
21
|
|
|
23
22
|
import { convertToAiPageModel } from "../../editor/ai/aiPageModel";
|
|
23
|
+
import { WizardBox } from "../WizardBox";
|
|
24
|
+
import { Layers, PanelsTopLeft } from "lucide-react";
|
|
25
|
+
import { cn } from "../../lib/utils";
|
|
26
|
+
import { WizardBoxConnector } from "../WizardBoxConnector";
|
|
24
27
|
|
|
25
28
|
export function CreatePageAndLayoutStep({
|
|
26
29
|
wizard,
|
|
@@ -164,8 +167,6 @@ export function CreatePageAndLayoutStep({
|
|
|
164
167
|
editContext,
|
|
165
168
|
);
|
|
166
169
|
|
|
167
|
-
console.log("MODEL: ", existingPageModel);
|
|
168
|
-
|
|
169
170
|
const result = await executePrompt(
|
|
170
171
|
[
|
|
171
172
|
{
|
|
@@ -184,14 +185,15 @@ export function CreatePageAndLayoutStep({
|
|
|
184
185
|
.map((c) => c.type)
|
|
185
186
|
.join(", ")}
|
|
186
187
|
Tell the user your reasoning in the message field.
|
|
187
|
-
|
|
188
|
+
If the user provided image ids, fill them into picture / image fields with an "id:" prefix. The image id needs to be guid.
|
|
189
|
+
If you dont have a matching image id, provide a description of a picture that you would like to use with a "generate:" prefix instead.
|
|
188
190
|
The language of the page is ${pageItem.descriptor.language}.
|
|
189
191
|
Input data: ${JSON.stringify(data)}`,
|
|
190
192
|
|
|
191
193
|
name: "system",
|
|
192
194
|
role: "system",
|
|
193
195
|
},
|
|
194
|
-
],
|
|
196
|
+
], //Fill image ids into picture / image fields.
|
|
195
197
|
editContext,
|
|
196
198
|
createWizardAiContext,
|
|
197
199
|
{ allowedFunctions: [] },
|
|
@@ -247,11 +249,15 @@ export function CreatePageAndLayoutStep({
|
|
|
247
249
|
);
|
|
248
250
|
};
|
|
249
251
|
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
<
|
|
252
|
+
return (
|
|
253
|
+
<div className="flex h-full">
|
|
254
|
+
<WizardBox
|
|
255
|
+
title="Generate content"
|
|
256
|
+
icon={<Layers />}
|
|
257
|
+
description="Generate content for the page"
|
|
258
|
+
className="w-96"
|
|
259
|
+
>
|
|
260
|
+
<div className="flex h-full flex-col items-stretch">
|
|
255
261
|
<div className="relative flex-1">
|
|
256
262
|
<div className="absolute inset-0 overflow-y-auto pr-6">
|
|
257
263
|
<div className="text-sm font-medium">Page item</div>
|
|
@@ -272,8 +278,8 @@ export function CreatePageAndLayoutStep({
|
|
|
272
278
|
{customInstructionsPanel()}
|
|
273
279
|
</div>
|
|
274
280
|
</div>
|
|
275
|
-
<div className="
|
|
276
|
-
<div className="flex gap-2">
|
|
281
|
+
<div className="py-2">
|
|
282
|
+
<div className="flex w-full gap-2">
|
|
277
283
|
<ActionButton
|
|
278
284
|
onClick={createLayout}
|
|
279
285
|
disabled={
|
|
@@ -282,13 +288,19 @@ export function CreatePageAndLayoutStep({
|
|
|
282
288
|
!data.selectedComponentTypes ||
|
|
283
289
|
data.selectedComponentTypes.length === 0
|
|
284
290
|
}
|
|
285
|
-
isLoading={
|
|
291
|
+
isLoading={
|
|
292
|
+
isLoading ||
|
|
293
|
+
isCreatingComponents ||
|
|
294
|
+
!!editContext?.activeFieldActions.find(
|
|
295
|
+
(action) => action.state === "running",
|
|
296
|
+
)
|
|
297
|
+
}
|
|
286
298
|
loadingText="Working"
|
|
287
|
-
className="flex-1"
|
|
299
|
+
className="w-full flex-1"
|
|
288
300
|
>
|
|
289
301
|
{internalState.componentsCreated
|
|
290
|
-
? "Reset and
|
|
291
|
-
: "Generate
|
|
302
|
+
? "Reset and regenerate content"
|
|
303
|
+
: "Generate content"}
|
|
292
304
|
</ActionButton>
|
|
293
305
|
|
|
294
306
|
{isLoading && (
|
|
@@ -303,13 +315,21 @@ export function CreatePageAndLayoutStep({
|
|
|
303
315
|
{message && <div className="mt-2 text-xs">{message}</div>}
|
|
304
316
|
</div>
|
|
305
317
|
</div>
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
318
|
+
</WizardBox>
|
|
319
|
+
<WizardBoxConnector className="mt-6" />
|
|
320
|
+
<WizardBox
|
|
321
|
+
title="Page preview"
|
|
322
|
+
icon={<PanelsTopLeft />}
|
|
323
|
+
description="After finalizing the page, you can edit, further enhance the content and share the page with your team for collaboration."
|
|
324
|
+
noPadding={true}
|
|
325
|
+
className="flex-1"
|
|
326
|
+
>
|
|
327
|
+
<div
|
|
328
|
+
className={cn(
|
|
329
|
+
"border-t border-gray-200",
|
|
330
|
+
pageLoaded ? "h-full" : "h-0",
|
|
331
|
+
)}
|
|
332
|
+
>
|
|
313
333
|
<PageViewer
|
|
314
334
|
name="single"
|
|
315
335
|
compareView={false}
|
|
@@ -318,12 +338,9 @@ export function CreatePageAndLayoutStep({
|
|
|
318
338
|
pageViewContext={editContext!.pageView}
|
|
319
339
|
/>
|
|
320
340
|
</div>
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
];
|
|
325
|
-
|
|
326
|
-
return <Splitter panels={panels}></Splitter>;
|
|
341
|
+
</WizardBox>
|
|
342
|
+
</div>
|
|
343
|
+
);
|
|
327
344
|
}
|
|
328
345
|
|
|
329
346
|
/**
|
|
@@ -1,31 +1,59 @@
|
|
|
1
1
|
import { classNames } from "primereact/utils";
|
|
2
|
-
import {
|
|
3
|
-
import { SparkleIconSmall } from "../../editor/ui/Icons";
|
|
2
|
+
import { Logo } from "../../editor/ui/Icons";
|
|
4
3
|
|
|
5
4
|
interface GenerateProps {
|
|
6
5
|
title: string;
|
|
7
6
|
}
|
|
8
7
|
|
|
9
8
|
function Generate({ title }: GenerateProps) {
|
|
10
|
-
console.log("Generate", title);
|
|
11
9
|
return (
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
10
|
+
<>
|
|
11
|
+
<style>
|
|
12
|
+
{`
|
|
13
|
+
@keyframes colorShift {
|
|
14
|
+
0% { color: #9650FB; }
|
|
15
|
+
25% { color: #FF6B9D; }
|
|
16
|
+
50% { color: #4ECDC4; }
|
|
17
|
+
75% { color: #45B7D1; }
|
|
18
|
+
100% { color: #9650FB; }
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
@keyframes sparkle {
|
|
22
|
+
0%, 100% {
|
|
23
|
+
transform: scale(1);
|
|
24
|
+
filter: drop-shadow(0 0 20px currentColor) brightness(1);
|
|
25
|
+
}
|
|
26
|
+
50% {
|
|
27
|
+
transform: scale(1.1);
|
|
28
|
+
filter: drop-shadow(0 0 30px currentColor) brightness(1.3);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.magic-logo {
|
|
33
|
+
animation: colorShift 3s ease-in-out infinite, sparkle 2s ease-in-out infinite;
|
|
34
|
+
filter: drop-shadow(0 0 20px currentColor);
|
|
35
|
+
}
|
|
36
|
+
`}
|
|
37
|
+
</style>
|
|
38
|
+
<div
|
|
39
|
+
className={classNames(
|
|
40
|
+
"animate-fadeIn flex h-full flex-col items-center justify-center transition-all duration-300",
|
|
41
|
+
)}
|
|
42
|
+
>
|
|
43
|
+
<div className="mb-20">
|
|
44
|
+
<div className="flex justify-center">
|
|
45
|
+
<div className="h-64 w-64 animate-pulse">
|
|
46
|
+
<div className="magic-logo h-full w-full">
|
|
47
|
+
<Logo />
|
|
48
|
+
</div>
|
|
49
|
+
</div>
|
|
50
|
+
</div>
|
|
20
51
|
</div>
|
|
21
|
-
<div className="
|
|
22
|
-
|
|
23
|
-
</div>
|
|
24
|
-
<div className="flex justify-center mr-20 animate-sparkle w-auto min-h-10 delay-500">
|
|
25
|
-
<SparkleIconSmall />
|
|
52
|
+
<div className="text-theme-secondary text-center text-sm font-medium">
|
|
53
|
+
{title}
|
|
26
54
|
</div>
|
|
27
55
|
</div>
|
|
28
|
-
|
|
56
|
+
</>
|
|
29
57
|
);
|
|
30
58
|
}
|
|
31
59
|
|