rune-lab 0.0.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.
@@ -0,0 +1,73 @@
1
+ // src/lib/stores/footer.svelte.ts
2
+ const defaultConfig = {
3
+ sections: [],
4
+ socialLinks: {},
5
+ showSocialLinks: false,
6
+ showVersion: false,
7
+ showCopyright: false
8
+ };
9
+ class FooterStore {
10
+ // State management with runes
11
+ _config = $state({ ...defaultConfig });
12
+ // Getter for the config to avoid direct state access
13
+ get config() {
14
+ return this._config;
15
+ }
16
+ // Initialize with custom configuration
17
+ init(config) {
18
+ this._config = {
19
+ sections: config.sections || [],
20
+ socialLinks: config.socialLinks || {},
21
+ showSocialLinks: config.showSocialLinks ?? false,
22
+ showVersion: config.showVersion ?? false,
23
+ showCopyright: config.showCopyright ?? false
24
+ };
25
+ return this;
26
+ }
27
+ // Set default state
28
+ reset() {
29
+ this._config = { ...defaultConfig };
30
+ return this;
31
+ }
32
+ // Section management
33
+ addSection(section) {
34
+ this._config.sections = [...this._config.sections, section];
35
+ return this;
36
+ }
37
+ updateSection(index, section) {
38
+ if (index >= 0 && index < this._config.sections.length) {
39
+ const newSections = [...this._config.sections];
40
+ newSections[index] = section;
41
+ this._config.sections = newSections;
42
+ }
43
+ return this;
44
+ }
45
+ removeSection(index) {
46
+ this._config.sections = this._config.sections.filter((_, i) => i !== index);
47
+ return this;
48
+ }
49
+ clearSections() {
50
+ this._config.sections = [];
51
+ return this;
52
+ }
53
+ // Social links management
54
+ updateSocialLinks(links) {
55
+ this._config.socialLinks = { ...this._config.socialLinks, ...links };
56
+ return this;
57
+ }
58
+ // Show/Hide features
59
+ showSocialLinks(show) {
60
+ this._config.showSocialLinks = show;
61
+ return this;
62
+ }
63
+ showVersion(show) {
64
+ this._config.showVersion = show;
65
+ return this;
66
+ }
67
+ showCopyright(show) {
68
+ this._config.showCopyright = show;
69
+ return this;
70
+ }
71
+ }
72
+ // Export singleton instance
73
+ export const footerStore = new FooterStore();
package/package.json CHANGED
@@ -1,74 +1,75 @@
1
- {
2
- "name": "rune-lab",
3
- "version": "0.0.1",
4
- "type": "module",
5
- "license": "MIT",
6
- "author": "Yrrrrrf <fer.rezac@outlook.com>",
7
- "repository": {
8
- "type": "git",
9
- "url": "git+https://github.com/Yrrrrrf/rune-lab.git"
10
- },
11
- "keywords": [
12
- "svelte",
13
- "components",
14
- "ui",
15
- "daisyui",
16
- "tailwind"
17
- ],
18
- "exports": {
19
- ".": {
20
- "types": "./dist/index.d.ts",
21
- "svelte": "./dist/index.js",
22
- "default": "./dist/index.js"
23
- },
24
- "./themes": {
25
- "types": "./dist/theme/static.d.ts",
26
- "default": "./dist/theme/static.js"
27
- }
28
- },
29
- "files": [
30
- "dist",
31
- "dist/stores/const/themes.js"
32
- ],
33
- "svelte": "./dist/index.js",
34
- "scripts": {
35
- "build": "svelte-kit sync && svelte-package",
36
- "check": "svelte-check --tsconfig ./tsconfig.json",
37
- "dev": "vite dev",
38
- "watch": "bun watch.ts",
39
- "preview": "vite preview",
40
- "package": "svelte-kit sync && svelte-package && publint",
41
- "prepublishOnly": "npm run package",
42
- "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch"
43
- },
44
- "sideEffects": [
45
- "**/*.css"
46
- ],
47
- "types": "./dist/index.d.ts",
48
- "peerDependencies": {
49
- "svelte": "^5.0.0",
50
- "tailwindcss": "^3.4.9",
51
- "daisyui": "^4.12.23"
52
- },
53
- "devDependencies": {
54
- "@sveltejs/adapter-auto": "^3.0.0",
55
- "@sveltejs/kit": "^2.0.0",
56
- "@sveltejs/package": "^2.0.0",
57
- "@sveltejs/vite-plugin-svelte": "^4.0.0",
58
- "autoprefixer": "^10.4.20",
59
- "daisyui": "^4.12.23",
60
- "publint": "^0.2.0",
61
- "svelte": "^5.0.0",
62
- "svelte-check": "^4.0.0",
63
- "tailwindcss": "^3.4.9",
64
- "typescript": "^5.0.0",
65
- "vite": "^5.4.11"
66
- },
67
- "dependencies": {
68
- "@tailwindcss/container-queries": "^0.1.1",
69
- "@tailwindcss/forms": "^0.5.9",
70
- "@tailwindcss/typography": "^0.5.15",
71
- "@types/bun": "^1.1.14",
72
- "phosphor-svelte": "^3.0.1"
73
- }
74
- }
1
+ {
2
+ "name": "rune-lab",
3
+ "version": "0.0.2-alpha-2",
4
+ "type": "module",
5
+ "license": "MIT",
6
+ "author": "Yrrrrrf <fer.rezac@outlook.com>",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/Yrrrrrf/rune-lab.git"
10
+ },
11
+ "keywords": [
12
+ "svelte",
13
+ "components",
14
+ "ui",
15
+ "daisyui",
16
+ "tailwind"
17
+ ],
18
+ "exports": {
19
+ ".": {
20
+ "types": "./dist/index.d.ts",
21
+ "svelte": "./dist/index.js",
22
+ "default": "./dist/index.js"
23
+ },
24
+ "./themes": {
25
+ "types": "./dist/theme/static.d.ts",
26
+ "default": "./dist/theme/static.js"
27
+ }
28
+ },
29
+ "files": [
30
+ "dist",
31
+ "dist/stores/const/themes.js"
32
+ ],
33
+ "svelte": "./dist/index.js",
34
+ "scripts": {
35
+ "build": "svelte-kit sync && svelte-package",
36
+ "check": "svelte-check --tsconfig ./tsconfig.json",
37
+ "dev": "vite dev",
38
+ "watch": "bun watch.ts",
39
+ "preview": "vite preview",
40
+ "package": "svelte-kit sync && svelte-package && publint",
41
+ "prepublishOnly": "npm run package",
42
+ "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch"
43
+ },
44
+ "sideEffects": [
45
+ "**/*.css"
46
+ ],
47
+ "types": "./dist/index.d.ts",
48
+ "peerDependencies": {
49
+ "svelte": "^5.0.0",
50
+ "tailwindcss": "^3.4.9",
51
+ "daisyui": "^4.12.23"
52
+ },
53
+ "devDependencies": {
54
+ "@sveltejs/adapter-auto": "^3.0.0",
55
+ "@sveltejs/kit": "^2.0.0",
56
+ "@sveltejs/package": "^2.0.0",
57
+ "@sveltejs/vite-plugin-svelte": "^4.0.0",
58
+ "autoprefixer": "^10.4.20",
59
+ "daisyui": "^4.12.23",
60
+ "publint": "^0.2.0",
61
+ "svelte": "^5.0.0",
62
+ "svelte-check": "^4.0.0",
63
+ "tailwindcss": "^3.4.9",
64
+ "typescript": "^5.0.0",
65
+ "vite": "^5.4.11"
66
+ },
67
+ "dependencies": {
68
+ "@tailwindcss/container-queries": "^0.1.1",
69
+ "@tailwindcss/forms": "^0.5.9",
70
+ "@tailwindcss/typography": "^0.5.15",
71
+ "@types/bun": "^1.1.14",
72
+ "phosphor-svelte": "^3.0.1",
73
+ "ts-forge": "0.0.4"
74
+ }
75
+ }