From 3265217f27f531fa53e39e3c8f86591af8d1a751 Mon Sep 17 00:00:00 2001 From: Guilhem Date: Wed, 17 Sep 2025 08:09:44 +0100 Subject: [PATCH] Add variant --- .../lib/components/InputTransformForm.svelte | 6 +- .../InputTransformSchemaForm.svelte | 2 +- .../test_dev/ui_components/+page.svelte | 115 +++++++++++++++++- 3 files changed, 115 insertions(+), 8 deletions(-) diff --git a/frontend/src/lib/components/InputTransformForm.svelte b/frontend/src/lib/components/InputTransformForm.svelte index 617f822f46..96f4bdac42 100644 --- a/frontend/src/lib/components/InputTransformForm.svelte +++ b/frontend/src/lib/components/InputTransformForm.svelte @@ -367,10 +367,8 @@ {#if arg != undefined}
diff --git a/frontend/src/lib/components/InputTransformSchemaForm.svelte b/frontend/src/lib/components/InputTransformSchemaForm.svelte index 218a55fb10..9272daa380 100644 --- a/frontend/src/lib/components/InputTransformSchemaForm.svelte +++ b/frontend/src/lib/components/InputTransformSchemaForm.svelte @@ -99,7 +99,7 @@ {#if keys.length > 0} {#each keys as argName, index (argName)} {#if (!filter || filter.includes(argName)) && Object.keys(schema.properties ?? {}).includes(argName)} -
+
import { page } from '$app/state' import { goto } from '$app/navigation' - import { Plug, SquareFunction } from 'lucide-svelte' + import { Plug, SquareFunction, WandSparkles } from 'lucide-svelte' const schema = { $schema: 'https://json-schema.org/draft/2020-12/schema', @@ -9,11 +9,16 @@ provider: { type: 'object', format: 'ai-provider', - placeholder: 'Select an AI provider' + placeholder: 'Select an AI provider', + options: [ + { label: 'OpenAI', value: 'openai' }, + { label: 'Google AI', value: 'google_ai' }, + { label: 'OpenRouter', value: 'openrouter' } + ] }, user_message: { type: 'string', - default: 'Hello, how are you?' + placeholder: 'Ex: Hello, how are you?' }, system_prompt: { type: 'string', @@ -76,6 +81,7 @@ class="w-full bg-white border border-nord-4/30 rounded px-3 py-2 text-sm text-nord-0 focus:outline-none focus:border-nord-8" > + @@ -121,6 +127,41 @@
+ {:else if version == 'minimalistic_2'} +
+

Minimalistic 2

+
+
+ Approach: + Shapes are slightly rounded, Groups are formed by padding and background color, borders + can be added to mark contrast. Prefer borders to shadows. borders, text have 3 colors: + primary, secondary, tertiary. Primary is reserved for headers/labels. Buttons have 2 + styles: border, no background for secondary action, accent for primary action +
+
+ Colors: + Nord palette, subtle backgrounds, no shadows +
+
+ Typography: + Clean, readable hierarchy +
+
+ Spacing: + Generous padding, breathing room +
+
+ Features: + Toggle with no shadow +
+
+ Shapes: + Slightly Rounded corners +
+
+
{:else if version == 'sharp_minimal'}

Sharp Minimal

@@ -229,6 +270,74 @@
{/snippet} {/snippet} + {:else if version == 'minimalistic_2'} + +
+ {#each Object.entries(schema.properties) as [key, value]} + {@render input({ key, value })} + {/each} +
+ + {#snippet input({ key, value })} +
+ +
+
+ + +
{value.type}
+
+ + {@render actions?.()} +
+ + + +
{value.description}
+
+ {/snippet} + + {#snippet actions()} +
+ + {@render toggleButton?.()} + +
+ {#snippet toggleButton()} +
+ + +
+ {/snippet} + {/snippet} {:else if version == 'sharp_minimal'}