rune-lab 0.0.2-alpha-1 → 0.0.2-alpha-2

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.
@@ -336,7 +336,7 @@
336
336
  class="drawer-overlay"
337
337
  onclick={() => drawerOpen = false}
338
338
  onkeydown={(e) => e.key === 'Escape' && (drawerOpen = false)}
339
- ></button>
339
+ >.</button>
340
340
  <ul class="menu p-4 w-80 min-h-full bg-base-200 text-base-content">
341
341
  <li><button class="w-full text-left">Sidebar Item 1</button></li>
342
342
  <li><button class="w-full text-left">Sidebar Item 2</button></li>
@@ -1,4 +1,5 @@
1
1
  <script lang="ts">
2
+ // jdaslkfjsklsajdklj
2
3
  import { themeStore } from '../../stores/theme.svelte.js';
3
4
 
4
5
  // Local state using runes
@@ -16,7 +17,7 @@
16
17
  }
17
18
  </script>
18
19
 
19
- <div class="theme-selector">
20
+ <div class="relative">
20
21
  <button
21
22
  class="btn"
22
23
  onclick={() => showDropdown = !showDropdown}
@@ -25,12 +26,12 @@
25
26
  </button>
26
27
 
27
28
  {#if showDropdown}
28
- <ul class="theme-menu">
29
+ <ul class="absolute right-0 top-full mt-2 min-w-[150px] p-2 bg-base-100 border border-base-300 rounded-lg shadow-lg">
29
30
  {#each themes as theme}
30
31
  <li>
31
32
  <button
32
- class="theme-option"
33
- class:active={themeStore.currentTheme === theme.value}
33
+ class="w-full flex items-center gap-2 px-2 py-2 text-left hover:bg-base-200 transition-colors duration-200 rounded-lg
34
+ {themeStore.currentTheme === theme.value ? 'bg-base-300' : ''}"
34
35
  onclick={() => handleThemeSelect(theme.value)}
35
36
  >
36
37
  <span>{theme.icon}</span>
@@ -40,39 +41,4 @@
40
41
  {/each}
41
42
  </ul>
42
43
  {/if}
43
- </div>
44
-
45
- <style>
46
- .theme-selector {
47
- position: relative;
48
- }
49
-
50
- .theme-menu {
51
- position: absolute;
52
- right: 0;
53
- top: 100%;
54
- margin-top: 0.5rem;
55
- background: var(--background);
56
- border: 1px solid var(--border);
57
- border-radius: 0.5rem;
58
- padding: 0.5rem;
59
- min-width: 150px;
60
- }
61
-
62
- .theme-option {
63
- display: flex;
64
- align-items: center;
65
- gap: 0.5rem;
66
- padding: 0.5rem;
67
- width: 100%;
68
- text-align: left;
69
- }
70
-
71
- .theme-option:hover {
72
- background: var(--hover);
73
- }
74
-
75
- .active {
76
- background: var(--active);
77
- }
78
- </style>
44
+ </div>
@@ -1,7 +1,6 @@
1
- import { forge as f, crud, base, t_types as t } from 'ts-forge';
2
- export { f, crud, base, t };
1
+ import { type SchemaMetadata } from "ts-forge";
3
2
  export interface DatabaseState {
4
- schemas: Record<string, f.SchemaMetadata>;
3
+ schemas: Record<string, SchemaMetadata>;
5
4
  tables: Record<string, Record<string, any>>;
6
5
  activeSchema: string | null;
7
6
  activeTable: string | null;
@@ -9,13 +8,13 @@ export interface DatabaseState {
9
8
  currentOperation: 'POST' | 'GET' | 'PUT' | 'DELETE' | null;
10
9
  }
11
10
  declare class DatabaseStore {
12
- schemas: Record<string, f.SchemaMetadata>;
11
+ schemas: Record<string, SchemaMetadata>;
13
12
  tables: Record<string, Record<string, any>>;
14
13
  activeSchema: string | null;
15
14
  activeTable: string | null;
16
15
  showModal: boolean;
17
16
  currentOperation: "GET" | "POST" | "PUT" | "DELETE" | null;
18
- currentTables: any;
17
+ currentTables: SchemaMetadata | null;
19
18
  toggleSchema(schema: string): void;
20
19
  private baseClient;
21
20
  private forge;
@@ -25,3 +24,4 @@ declare class DatabaseStore {
25
24
  init(): Promise<void>;
26
25
  }
27
26
  export declare const databaseStore: DatabaseStore;
27
+ export {};
@@ -1,6 +1,5 @@
1
1
  // src/lib/stores/database.svelte.ts
2
- import { forge as f, crud, base, t_types as t } from 'ts-forge';
3
- export { f, crud, base, t };
2
+ import { BaseClient, TsForge } from "ts-forge";
4
3
  class DatabaseStore {
5
4
  // Core state with proper initialization
6
5
  schemas = $state({});
@@ -17,8 +16,8 @@ class DatabaseStore {
17
16
  console.log('Active schema:', this.activeSchema, 'Tables:', this.schemas[schema]);
18
17
  }
19
18
  // Base client
20
- baseClient = new base.BaseClient('http://localhost:8000/');
21
- forge = new f.TsForge(this.baseClient);
19
+ baseClient = new BaseClient('http://localhost:8000/');
20
+ forge = new TsForge(this.baseClient);
22
21
  // Table management
23
22
  setActiveTable(schema, table) {
24
23
  this.activeSchema = schema;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rune-lab",
3
- "version": "0.0.2-alpha-1",
3
+ "version": "0.0.2-alpha-2",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "author": "Yrrrrrf <fer.rezac@outlook.com>",
@@ -70,6 +70,6 @@
70
70
  "@tailwindcss/typography": "^0.5.15",
71
71
  "@types/bun": "^1.1.14",
72
72
  "phosphor-svelte": "^3.0.1",
73
- "ts-forge": "0.0.3"
73
+ "ts-forge": "0.0.4"
74
74
  }
75
75
  }