@lobb-js/lobb-ext-llm 0.1.10

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/package.json ADDED
@@ -0,0 +1,35 @@
1
+ {
2
+ "name": "@lobb-js/lobb-ext-llm",
3
+ "version": "0.1.10",
4
+ "type": "module",
5
+ "publishConfig": {
6
+ "access": "public"
7
+ },
8
+ "files": [
9
+ "studio"
10
+ ],
11
+ "exports": {
12
+ ".": "./studio/src/index.ts"
13
+ },
14
+ "scripts": {
15
+ "dev": "cd studio && vite",
16
+ "build": "cd studio && vite build",
17
+ "preview": "cd studio && vite preview",
18
+ "check": "cd studio && svelte-check --tsconfig ./tsconfig.app.json && tsc -p tsconfig.node.json"
19
+ },
20
+ "dependencies": {
21
+ "@lobb-js/studio": "0.1.31"
22
+ },
23
+ "devDependencies": {
24
+ "@sveltejs/vite-plugin-svelte": "6.2.1",
25
+ "@tsconfig/svelte": "^5.0.6",
26
+ "@types/node": "^24.10.1",
27
+ "autoprefixer": "^10.4.23",
28
+ "svelte": "^5.43.8",
29
+ "svelte-check": "^4.3.4",
30
+ "tailwindcss": "^3.4.19",
31
+ "tailwindcss-animate": "^1.0.7",
32
+ "typescript": "~5.9.3",
33
+ "vite": "6.3.3"
34
+ }
35
+ }
@@ -0,0 +1,27 @@
1
+ # LLM Extension - Studio
2
+
3
+ This directory contains the frontend/dashboard interface for the LLM extension.
4
+
5
+ ## Structure
6
+
7
+ ```
8
+ studio/
9
+ ├── src/
10
+ │ ├── index.ts # Extension entry point
11
+ │ ├── main.ts # Vite app entry
12
+ │ └── pages/ # UI pages (to be added)
13
+ ├── public/ # Static assets
14
+ ├── index.html # HTML entry point
15
+ ├── vite.config.ts # Vite configuration
16
+ ├── tailwind.config.ts # Tailwind CSS configuration
17
+ └── tsconfig.json # TypeScript configuration
18
+ ```
19
+
20
+ ## Future Features
21
+
22
+ The studio interface could include:
23
+ - LLM provider configuration UI
24
+ - Chat interface for testing models
25
+ - Model selection and settings
26
+ - API key management
27
+ - Usage analytics and monitoring
@@ -0,0 +1,28 @@
1
+ // TODO: Import these types from @lobb-js/studio once available
2
+ export interface Extension {
3
+ name: string;
4
+ onStartup?: (utils: ExtensionUtils) => void;
5
+ components?: Record<string, any>;
6
+ dashboardNavs?: {
7
+ top?: NavItem[];
8
+ middle?: NavItem[];
9
+ bottom?: NavItem[];
10
+ };
11
+ }
12
+
13
+ export interface NavItem {
14
+ label: string;
15
+ icon?: any;
16
+ href?: string;
17
+ onclick?: () => void;
18
+ navs?: NavItem[];
19
+ }
20
+
21
+ export interface ExtensionUtils {
22
+ components: {
23
+ Icons: Record<string, any>;
24
+ };
25
+ location: {
26
+ navigate: (path: string) => void;
27
+ };
28
+ }
@@ -0,0 +1,13 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <link rel="icon" type="image/svg+xml" href="/vite.svg" />
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
+ <title>Lobb Studio</title>
8
+ </head>
9
+ <body>
10
+ <div id="app"></div>
11
+ <script type="module" src="/src/main.ts"></script>
12
+ </body>
13
+ </html>
@@ -0,0 +1,6 @@
1
+ export default {
2
+ plugins: {
3
+ tailwindcss: {},
4
+ autoprefixer: {}
5
+ }
6
+ };
@@ -0,0 +1,20 @@
1
+ import type { Extension, ExtensionUtils } from "../extension.types";
2
+
3
+ export function extension(utils: ExtensionUtils): Extension {
4
+ return {
5
+ name: "llm",
6
+ // onStartup: onStartup,
7
+ components: {
8
+ // "pages.settings": Settings,
9
+ },
10
+ dashboardNavs: {
11
+ middle: [
12
+ // {
13
+ // label: "LLM",
14
+ // icon: utils.components.Icons.Bot,
15
+ // href: "/extensions/llm/settings",
16
+ // },
17
+ ],
18
+ },
19
+ };
20
+ }
@@ -0,0 +1,12 @@
1
+ import { mount } from "svelte";
2
+ import Studio from "@lobb-js/studio";
3
+ import { extension } from "./index.ts";
4
+
5
+ const app = mount(Studio, {
6
+ target: document.getElementById("app")!,
7
+ props: {
8
+ extensions: [extension],
9
+ },
10
+ });
11
+
12
+ export default app;
@@ -0,0 +1,8 @@
1
+ import { vitePreprocess } from '@sveltejs/vite-plugin-svelte'
2
+
3
+ /** @type {import("@sveltejs/vite-plugin-svelte").SvelteConfig} */
4
+ export default {
5
+ // Consult https://svelte.dev/docs#compile-time-svelte-preprocess
6
+ // for more information about preprocessors
7
+ preprocess: vitePreprocess(),
8
+ }
@@ -0,0 +1,92 @@
1
+ import { fontFamily } from "tailwindcss/defaultTheme";
2
+ import type { Config } from "tailwindcss";
3
+ import tailwindcssAnimate from "tailwindcss-animate";
4
+
5
+ const config: Config = {
6
+ darkMode: ["class"],
7
+ content: [
8
+ "./src/**/*.{html,js,svelte,ts}",
9
+ "../../../packages/studio/src/**/*.{html,js,svelte,ts}",
10
+ ],
11
+ safelist: ["dark"],
12
+ theme: {
13
+ container: {
14
+ center: true,
15
+ padding: "2rem",
16
+ screens: {
17
+ "2xl": "1400px",
18
+ },
19
+ },
20
+ extend: {
21
+ colors: {
22
+ border: "hsl(var(--border) / <alpha-value>)",
23
+ input: "hsl(var(--input) / <alpha-value>)",
24
+ ring: "hsl(var(--ring) / <alpha-value>)",
25
+ background: "hsl(var(--background) / <alpha-value>)",
26
+ foreground: "hsl(var(--foreground) / <alpha-value>)",
27
+ primary: {
28
+ DEFAULT: "hsl(var(--primary) / <alpha-value>)",
29
+ foreground: "hsl(var(--primary-foreground) / <alpha-value>)",
30
+ },
31
+ secondary: {
32
+ DEFAULT: "hsl(var(--secondary) / <alpha-value>)",
33
+ foreground: "hsl(var(--secondary-foreground) / <alpha-value>)",
34
+ },
35
+ destructive: {
36
+ DEFAULT: "hsl(var(--destructive) / <alpha-value>)",
37
+ foreground: "hsl(var(--destructive-foreground) / <alpha-value>)",
38
+ },
39
+ soft: {
40
+ DEFAULT: "hsl(var(--soft) / <alpha-value>)",
41
+ },
42
+ muted: {
43
+ DEFAULT: "hsl(var(--muted) / <alpha-value>)",
44
+ foreground: "hsl(var(--muted-foreground) / <alpha-value>)",
45
+ },
46
+ accent: {
47
+ DEFAULT: "hsl(var(--accent) / <alpha-value>)",
48
+ foreground: "hsl(var(--accent-foreground) / <alpha-value>)",
49
+ },
50
+ popover: {
51
+ DEFAULT: "hsl(var(--popover) / <alpha-value>)",
52
+ foreground: "hsl(var(--popover-foreground) / <alpha-value>)",
53
+ },
54
+ card: {
55
+ DEFAULT: "hsl(var(--card) / <alpha-value>)",
56
+ foreground: "hsl(var(--card-foreground) / <alpha-value>)",
57
+ },
58
+ },
59
+ borderRadius: {
60
+ xl: "calc(var(--radius) + 4px)",
61
+ lg: "var(--radius)",
62
+ md: "calc(var(--radius) - 2px)",
63
+ sm: "calc(var(--radius) - 4px)",
64
+ },
65
+ fontFamily: {
66
+ sans: [...fontFamily.sans],
67
+ },
68
+ keyframes: {
69
+ "accordion-down": {
70
+ from: { height: "0" },
71
+ to: { height: "var(--bits-accordion-content-height)" },
72
+ },
73
+ "accordion-up": {
74
+ from: { height: "var(--bits-accordion-content-height)" },
75
+ to: { height: "0" },
76
+ },
77
+ "caret-blink": {
78
+ "0%,70%,100%": { opacity: "1" },
79
+ "20%,50%": { opacity: "0" },
80
+ },
81
+ },
82
+ animation: {
83
+ "accordion-down": "accordion-down 0.2s ease-out",
84
+ "accordion-up": "accordion-up 0.2s ease-out",
85
+ "caret-blink": "caret-blink 1.25s ease-out infinite",
86
+ },
87
+ },
88
+ },
89
+ plugins: [tailwindcssAnimate],
90
+ };
91
+
92
+ export default config;
@@ -0,0 +1,22 @@
1
+ {
2
+ "extends": "@tsconfig/svelte/tsconfig.json",
3
+ "compilerOptions": {
4
+ "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
5
+ "target": "ES2022",
6
+ "useDefineForClassFields": true,
7
+ "module": "ESNext",
8
+ "types": ["svelte", "vite/client"],
9
+ "noEmit": true,
10
+ "allowArbitraryExtensions": true,
11
+ /**
12
+ * Typecheck JS in `.svelte` and `.js` files by default.
13
+ * Disable checkJs if you'd like to use dynamic types in JS.
14
+ * Note that setting allowJs false does not prevent the use
15
+ * of JS in `.svelte` files.
16
+ */
17
+ "allowJs": true,
18
+ "checkJs": true,
19
+ "moduleDetection": "force"
20
+ },
21
+ "include": ["src/**/*.ts", "src/**/*.js", "src/**/*.svelte"]
22
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "files": [],
3
+ "references": [
4
+ { "path": "./tsconfig.app.json" },
5
+ { "path": "./tsconfig.node.json" }
6
+ ]
7
+ }
@@ -0,0 +1,26 @@
1
+ {
2
+ "compilerOptions": {
3
+ "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
4
+ "target": "ES2023",
5
+ "lib": ["ES2023"],
6
+ "module": "ESNext",
7
+ "types": ["node"],
8
+ "skipLibCheck": true,
9
+
10
+ /* Bundler mode */
11
+ "moduleResolution": "bundler",
12
+ "allowImportingTsExtensions": true,
13
+ "verbatimModuleSyntax": true,
14
+ "moduleDetection": "force",
15
+ "noEmit": true,
16
+
17
+ /* Linting */
18
+ "strict": true,
19
+ "noUnusedLocals": true,
20
+ "noUnusedParameters": true,
21
+ "erasableSyntaxOnly": true,
22
+ "noFallthroughCasesInSwitch": true,
23
+ "noUncheckedSideEffectImports": true
24
+ },
25
+ "include": ["vite.config.ts"]
26
+ }
@@ -0,0 +1,13 @@
1
+ import { defineConfig } from "vite";
2
+ import { svelte } from "@sveltejs/vite-plugin-svelte";
3
+ import path from "path";
4
+
5
+ // https://vite.dev/config/
6
+ export default defineConfig({
7
+ plugins: [svelte()],
8
+ resolve: {
9
+ alias: {
10
+ $lib: path.resolve("../../../packages/studio/src/lib"),
11
+ },
12
+ },
13
+ });