@gleich/ui 0.0.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.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Matt Gleich
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,3 @@
1
+ # ui
2
+
3
+ shared ui components used across my personal projects
@@ -0,0 +1,26 @@
1
+ <script lang="ts">
2
+ import type { Snippet } from 'svelte';
3
+
4
+ const { children, padding = '10px' }: { children: Snippet; padding?: string } = $props();
5
+ </script>
6
+
7
+ <div style:--card-padding={padding}>
8
+ {@render children()}
9
+ </div>
10
+
11
+ <style>
12
+ div {
13
+ border: 1px solid var(--border);
14
+ padding: var(--card-padding);
15
+ border-radius: var(--border-radius);
16
+ box-shadow: var(--box-shadow);
17
+ background-color: var(--background);
18
+ overflow: hidden;
19
+ }
20
+
21
+ @media (max-width: 400px) {
22
+ div {
23
+ padding: calc(var(--card-padding) / 2);
24
+ }
25
+ }
26
+ </style>
@@ -0,0 +1,8 @@
1
+ import type { Snippet } from 'svelte';
2
+ type $$ComponentProps = {
3
+ children: Snippet;
4
+ padding?: string;
5
+ };
6
+ declare const Card: import("svelte").Component<$$ComponentProps, {}, "">;
7
+ type Card = ReturnType<typeof Card>;
8
+ export default Card;
@@ -0,0 +1,58 @@
1
+ <script lang="ts">
2
+ const { repo }: { repo: string } = $props();
3
+ </script>
4
+
5
+ <div class="container">
6
+ <p class="copyright">
7
+ © Matt Gleich {new Date().getFullYear()}<span class="all-rights-reserved">
8
+ . All rights reserved.</span
9
+ >
10
+ </p>
11
+ <a class="github-link" href={`https://github.com/${repo}`} target="_blank">
12
+ <div class="github-icon">
13
+ <svg viewBox="0 0 98 96" xmlns="http://www.w3.org/2000/svg"
14
+ ><path
15
+ fill-rule="evenodd"
16
+ clip-rule="evenodd"
17
+ d="M48.854 0C21.839 0 0 22 0 49.217c0 21.756 13.993 40.172 33.405 46.69 2.427.49 3.316-1.059 3.316-2.362 0-1.141-.08-5.052-.08-9.127-13.59 2.934-16.42-5.867-16.42-5.867-2.184-5.704-5.42-7.17-5.42-7.17-4.448-3.015.324-3.015.324-3.015 4.934.326 7.523 5.052 7.523 5.052 4.367 7.496 11.404 5.378 14.235 4.074.404-3.178 1.699-5.378 3.074-6.6-10.839-1.141-22.243-5.378-22.243-24.283 0-5.378 1.94-9.778 5.014-13.2-.485-1.222-2.184-6.275.486-13.038 0 0 4.125-1.304 13.426 5.052a46.97 46.97 0 0 1 12.214-1.63c4.125 0 8.33.571 12.213 1.63 9.302-6.356 13.427-5.052 13.427-5.052 2.67 6.763.97 11.816.485 13.038 3.155 3.422 5.015 7.822 5.015 13.2 0 18.905-11.404 23.06-22.324 24.283 1.78 1.548 3.316 4.481 3.316 9.126 0 6.6-.08 11.897-.08 13.526 0 1.304.89 2.853 3.316 2.364 19.412-6.52 33.405-24.935 33.405-46.691C97.707 22 75.788 0 48.854 0z"
18
+ fill="currentColor"
19
+ /></svg
20
+ >
21
+ </div>
22
+ {repo}</a
23
+ >
24
+ </div>
25
+
26
+ <style>
27
+ .container {
28
+ width: 100%;
29
+ border-top: 0.5px solid var(--border);
30
+ padding: 5px 0;
31
+ margin-top: 30px;
32
+ display: flex;
33
+ justify-content: space-between;
34
+ }
35
+
36
+ .github-icon {
37
+ color: grey;
38
+ width: 15px;
39
+ height: 15px;
40
+ }
41
+
42
+ .github-link {
43
+ display: flex;
44
+ align-items: center;
45
+ gap: 8px;
46
+ }
47
+
48
+ .github-link,
49
+ .copyright {
50
+ color: grey;
51
+ }
52
+
53
+ @media (max-width: 530px) {
54
+ .all-rights-reserved {
55
+ display: none;
56
+ }
57
+ }
58
+ </style>
@@ -0,0 +1,6 @@
1
+ type $$ComponentProps = {
2
+ repo: string;
3
+ };
4
+ declare const Copyright: import("svelte").Component<$$ComponentProps, {}, "">;
5
+ type Copyright = ReturnType<typeof Copyright>;
6
+ export default Copyright;
@@ -0,0 +1,93 @@
1
+ <script lang="ts">
2
+ import { page } from '$app/state';
3
+
4
+ let {
5
+ title,
6
+ description,
7
+ opengraphImage = {
8
+ url: 'https://mattglei.ch/opengraph.png',
9
+ width: '1200',
10
+ height: '630'
11
+ },
12
+ keywords = [],
13
+ iconRoot = 'https://mattglei.ch'
14
+ }: {
15
+ title: string;
16
+ description: string;
17
+ opengraphImage?: OpenGraphImage;
18
+ keywords?: string[];
19
+ iconRoot?: string;
20
+ } = $props();
21
+
22
+ export interface OpenGraphImage {
23
+ url: string;
24
+ width: string;
25
+ height: string;
26
+ }
27
+
28
+ keywords = keywords.concat([
29
+ 'matt gleich',
30
+ 'matt',
31
+ 'gleich',
32
+ 'matthew gleich',
33
+ 'matthew',
34
+ 'gleich',
35
+ 'photography',
36
+ 'coding',
37
+ 'cycling',
38
+ 'rit',
39
+ 'stainless',
40
+ 'bottomline technologies',
41
+ 'kcf technologies',
42
+ 'kcf'
43
+ ]);
44
+ </script>
45
+
46
+ <svelte:head>
47
+ <title>{title}</title>
48
+ <link rel="canonical" href={page.url.href.replaceAll('http://', 'https://').replace(/\/$/, '')} />
49
+ <meta name="description" content={description} />
50
+ <meta name="url" content={page.url.href} />
51
+
52
+ <meta name="author" content="Matt Gleich" />
53
+ <meta name="keywords" content={keywords.join(', ')} />
54
+
55
+ <!-- icons -->
56
+ <link rel="apple-touch-icon" href={`${iconRoot}/apple-touch-icon.png`} sizes="180x180" />
57
+ <link
58
+ rel="icon"
59
+ type="image/png"
60
+ sizes="192x192"
61
+ href={`${iconRoot}/android-chrome-192x192.png`}
62
+ />
63
+ <link
64
+ rel="icon"
65
+ type="image/png"
66
+ sizes="512x512"
67
+ href={`${iconRoot}/android-chrome-512x512.png`}
68
+ />
69
+ <link rel="icon" href={`${iconRoot}/favicon-32x32.png`} sizes="32x32" />
70
+ <link rel="icon" href={`${iconRoot}/favicon-16x16.png`} sizes="16x16" />
71
+ <link rel="mask-icon" href={`${iconRoot}/safari-pinned-tab.svg`} color="#292B2D" />
72
+ <link rel="icon" href={`${iconRoot}/favicon.ico`} />
73
+
74
+ <!-- opengraph -->
75
+ <meta property="og:title" content={title} />
76
+ <meta property="og:description" content={title} />
77
+ <meta property="og:url" content={page.url.href} />
78
+ <meta property="og:site_name" content="mattglei.ch" />
79
+ <meta property="og:locale" content="en-US" />
80
+ <meta property="og:image" content={opengraphImage.url} />
81
+ <meta property="og:image:width" content={opengraphImage.width} />
82
+ <meta property="og:image:height" content={opengraphImage.height} />
83
+ <meta property="og:type" content="website" />
84
+
85
+ <!-- twitter -->
86
+ <meta property="twitter:card" content="summary_large_image" />
87
+ <meta property="twitter:creator" content="@matt_gleich" />
88
+ <meta property="twitter:title" content={title} />
89
+ <meta property="twitter:description" content={description} />
90
+ <meta property="twitter:image" content={opengraphImage.url} />
91
+ <meta property="twitter:image:width" content={opengraphImage.width} />
92
+ <meta property="twitter:image:height" content={opengraphImage.height} />
93
+ </svelte:head>
@@ -0,0 +1,15 @@
1
+ export interface OpenGraphImage {
2
+ url: string;
3
+ width: string;
4
+ height: string;
5
+ }
6
+ type $$ComponentProps = {
7
+ title: string;
8
+ description: string;
9
+ opengraphImage?: OpenGraphImage;
10
+ keywords?: string[];
11
+ iconRoot?: string;
12
+ };
13
+ declare const DynamicHead: import("svelte").Component<$$ComponentProps, {}, "">;
14
+ type DynamicHead = ReturnType<typeof DynamicHead>;
15
+ export default DynamicHead;
@@ -0,0 +1,54 @@
1
+ <script lang="ts">
2
+ const { msg }: { msg: string } = $props();
3
+ </script>
4
+
5
+ <div class="container">
6
+ <svg
7
+ xmlns="http://www.w3.org/2000/svg"
8
+ width="24"
9
+ height="24"
10
+ viewBox="0 0 24 24"
11
+ fill="none"
12
+ stroke="currentColor"
13
+ stroke-width="2"
14
+ stroke-linecap="round"
15
+ stroke-linejoin="round"
16
+ ><polygon points="7.86 2 16.14 2 22 7.86 22 16.14 16.14 22 7.86 22 2 16.14 2 7.86 7.86 2"
17
+ ></polygon><line x1="12" y1="8" x2="12" y2="12"></line><line x1="12" y1="16" x2="12.01" y2="16"
18
+ ></line></svg
19
+ >
20
+ <h1>{msg}</h1>
21
+ </div>
22
+
23
+ <style>
24
+ svg {
25
+ height: 40px;
26
+ width: auto;
27
+ animation: blink 1s infinite;
28
+ }
29
+
30
+ .container {
31
+ display: flex;
32
+ align-items: center;
33
+ gap: 20px;
34
+ background-color: var(--red-background);
35
+ color: var(--red-foreground);
36
+ padding: 30px;
37
+ border-radius: var(--border-radius);
38
+ }
39
+
40
+ h1 {
41
+ font-size: 25px;
42
+ font-family: 'IBM Plex Sans';
43
+ }
44
+
45
+ @keyframes blink {
46
+ 0%,
47
+ 100% {
48
+ opacity: 1;
49
+ }
50
+ 50% {
51
+ opacity: 0.5;
52
+ }
53
+ }
54
+ </style>
@@ -0,0 +1,6 @@
1
+ type $$ComponentProps = {
2
+ msg: string;
3
+ };
4
+ declare const Error: import("svelte").Component<$$ComponentProps, {}, "">;
5
+ type Error = ReturnType<typeof Error>;
6
+ export default Error;
@@ -0,0 +1 @@
1
+ export {};
package/dist/index.js ADDED
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ // Reexport your entry components here
@@ -0,0 +1,40 @@
1
+ <script lang="ts">
2
+ const { invert = false, stroke = '5' }: { invert?: boolean; stroke?: string } = $props();
3
+ </script>
4
+
5
+ <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="45 45 410 410">
6
+ <path
7
+ stroke-width={stroke}
8
+ d="M101 148c0-24 19-45 43-47l-1 2-12 33-30 13v-1Zm44-45 1-2h40l-21 21-32 14 12-33Zm43-4h-40l-2 1c11-22 36-33 59-25l5 2-22 22Zm-20 22 20-20h29l-49 20Zm52-22h-30l22-22 33 12-25 10Zm-54 25 55-23h56l55 20 45 45 23 55v56l-21 55-44 45-55 23h-56l-56-21-44-44-23-55v-56l20-56 45-44Zm106-25h-48l23-9 25 9Zm58 20-49-18h31l18 18Zm-19-20h-34l-28-10 36-15 26 25Zm22 21-19-19h36l12 30-29-11Zm16-21h-36l-26-25v-1c24-10 52 2 62 26Zm15 32-12-30c25 0 45 19 47 43l-1-1-34-12Zm33 14 2 1 1 2v38l-22-21-13-32 32 12Zm4 43v-42c22 11 33 36 24 59l-1 5-23-22Zm-21-20 20 20v29l-20-49Zm21 52v-30l22 22-12 33-10-25Zm0 52v-48l9 23-9 25Zm0 5 10-28 15 36-25 26v-34Zm0 36 26-26c10 24-1 52-25 62h-1v-36Zm-1 1v36l-30 12 10-29 20-19Zm-31 50 31-12c0 25-19 45-44 47l1-1 12-34Zm9-28-10 27-30 12 40-39Zm-42 42 31-13-11 32-1 2-3 1h-38l22-22Zm-52 22 48-20-20 20h-28Zm-4 1h31l-22 22-33-12 24-10Zm-26 11 33 12-3 4a47 47 0 0 1-67 0l-1-1 38-15Zm-2-1-37 15-25-25h34l28 10Zm-64-10 26 26h-1c-24 10-52-1-62-25v-1h37Zm32-1h-32l-17-18 49 18Zm-53-20 19 20h-35l-13-30 29 10Zm-42-42 40 40-28-10-12-30Zm-3-2 14 31-33-11-2-1v-41l21 22Zm-23 16 1 2a47 47 0 0 1-25-59l2-5 22 23v39Zm0-41-22-22 12-33 10 24v31Zm-10-57-13 33-3-3a47 47 0 0 1 0-67v-1l16 38Zm10 22-9-22 9-26v48Zm0-52-10 28-15-37 25-25v34Zm20-53-18 49v-32l18-17Zm1-4-19 19v-35l30-13-11 29Zm-46 47-1-1c-10-24 2-52 26-62v37l-25 26Zm75 186h-1c-24 0-45-19-47-44l2 1 33 12 13 31Zm205 1a47 47 0 0 1-59 24l-5-1 23-23h41Zm70-188 4 4c18 18 18 48 0 67h-1l-15-37 12-34ZM247 89l-34-13 4-3c18-19 48-19 67 0l-37 16Zm-124 76 9-28 30-12-39 40Zm-22 147v-28l20 48-20-20Zm153 98-26-9h48l-22 9Zm146-98-18 18 18-49v31Zm-37-180 12 30-39-39 27 9Z"
9
+ class="lines"
10
+ style={`stroke: ${invert ? 'var(--background)' : 'var(--foreground)'}`}
11
+ />
12
+ <path
13
+ d="m198 241 1-3a99 99 0 0 1 4-12c2-5 6-8 10-8 3 0 6 1 8 4 2 2 4 4 4 8 6-8 13-12 21-12 4 0 7 1 10 3s4 6 5 10c6-8 13-13 21-13 5 0 8 2 11 4s5 6 5 11c0 6-3 17-9 32l-3 11c0 3 1 4 3 4 6 0 10-6 14-18l1-2h1l2 1v3a47 47 0 0 1-6 12l-5 5c-2 2-4 3-7 3s-6-2-8-4-3-5-3-8l2-9c6-16 9-27 9-32 0-6-2-9-7-9-7 0-14 5-20 15l-4 10a125 125 0 0 0-2 10l-6 23c-1 2-2 4-5 4l-3-2-1-2v-2l10-38 1-9c0-6-2-9-7-9-7 0-14 5-20 15l-3 10-2 5-1 5-5 23c-1 2-3 4-6 4l-3-2-1-2 1-2 11-43 1-8c0-4-2-5-4-5s-4 1-6 4l-4 13-1 3h-2l-2-1Z"
14
+ style={`fill: ${invert ? 'var(--background)' : 'var(--foreground)'}`}
15
+ />
16
+ </svg>
17
+
18
+ <style>
19
+ svg {
20
+ height: 100%;
21
+ width: 100%;
22
+ }
23
+
24
+ .lines {
25
+ animation: spin infinite 20s linear;
26
+ transform-origin: 250px 250px;
27
+ transform-box: view-box;
28
+ will-change: transform;
29
+ }
30
+
31
+ @keyframes spin {
32
+ from {
33
+ transform: rotate(0deg);
34
+ }
35
+
36
+ to {
37
+ transform: rotate(360deg);
38
+ }
39
+ }
40
+ </style>
@@ -0,0 +1,7 @@
1
+ type $$ComponentProps = {
2
+ invert?: boolean;
3
+ stroke?: string;
4
+ };
5
+ declare const Logo: import("svelte").Component<$$ComponentProps, {}, "">;
6
+ type Logo = ReturnType<typeof Logo>;
7
+ export default Logo;
@@ -0,0 +1,107 @@
1
+ <script lang="ts">
2
+ import { type Snippet } from 'svelte';
3
+
4
+ const {
5
+ gap = 15,
6
+ delay = 2,
7
+ speed = 15,
8
+ children
9
+ }: {
10
+ gap?: number;
11
+ speed?: number;
12
+ delay?: number;
13
+ children: Snippet;
14
+ } = $props();
15
+
16
+ let containerWidth = $state(0);
17
+ let marqueeWidth = $state(0);
18
+ let overflowing = $derived(containerWidth < marqueeWidth);
19
+ let duration = $derived(
20
+ marqueeWidth < containerWidth ? containerWidth / speed : (marqueeWidth + gap) / speed
21
+ );
22
+ </script>
23
+
24
+ <div
25
+ bind:clientWidth={containerWidth}
26
+ class="container"
27
+ style:--duration={`${duration}s`}
28
+ style:--delay={`${delay}s`}
29
+ style:--gradient-width={overflowing ? '10px' : '0px'}
30
+ style:--gap={overflowing ? `${gap}px` : '0px'}
31
+ >
32
+ <div
33
+ class={`marquee ${overflowing ? 'scroll-animation' : ''}`}
34
+ style={overflowing ? 'padding-left: 10px' : ''}
35
+ >
36
+ <div bind:clientWidth={marqueeWidth} class="initial-child-container">
37
+ {@render children()}
38
+ </div>
39
+ </div>
40
+ {#if overflowing}
41
+ <div class="marquee scroll-animation">
42
+ {@render children()}
43
+ </div>
44
+ {/if}
45
+ </div>
46
+
47
+ <style>
48
+ .container {
49
+ overflow-x: hidden;
50
+ display: flex;
51
+ flex-direction: row;
52
+ position: relative;
53
+ }
54
+
55
+ .container::before,
56
+ .container::after {
57
+ content: '';
58
+ position: absolute;
59
+ top: 0;
60
+ bottom: 0;
61
+ width: var(--gradient-width);
62
+ z-index: 2;
63
+ pointer-events: none;
64
+ }
65
+
66
+ .container::before {
67
+ left: 0;
68
+ background: linear-gradient(to right, var(--background), rgba(255, 255, 255, 0));
69
+ }
70
+
71
+ .container::after {
72
+ right: 0;
73
+ background: linear-gradient(to left, var(--background), rgba(255, 255, 255, 0));
74
+ }
75
+
76
+ .marquee {
77
+ flex: 0 0 auto;
78
+ min-width: 100%;
79
+ z-index: 1;
80
+ display: flex;
81
+ flex-direction: row;
82
+ align-items: center;
83
+ justify-content: center;
84
+ padding-right: var(--gap);
85
+ }
86
+
87
+ .scroll-animation {
88
+ animation: scroll var(--duration) linear var(--delay) infinite;
89
+ }
90
+
91
+ .initial-child-container {
92
+ flex: 0 0 auto;
93
+ display: flex;
94
+ min-width: auto;
95
+ flex-direction: row;
96
+ align-items: center;
97
+ }
98
+
99
+ @keyframes scroll {
100
+ 0% {
101
+ transform: translateX(0%);
102
+ }
103
+ 100% {
104
+ transform: translateX(-100%);
105
+ }
106
+ }
107
+ </style>
@@ -0,0 +1,10 @@
1
+ import { type Snippet } from 'svelte';
2
+ type $$ComponentProps = {
3
+ gap?: number;
4
+ speed?: number;
5
+ delay?: number;
6
+ children: Snippet;
7
+ };
8
+ declare const Scrolling: import("svelte").Component<$$ComponentProps, {}, "">;
9
+ type Scrolling = ReturnType<typeof Scrolling>;
10
+ export default Scrolling;
package/dist/ui.css ADDED
@@ -0,0 +1,254 @@
1
+ :root {
2
+ --border-radius: 5px;
3
+ --box-shadow-color: rgb(21, 21, 21);
4
+ --box-shadow: 0px 3px 10px var(--box-shadow-color);
5
+
6
+ --button-background: rgb(53, 53, 53);
7
+ --button-foreground: #fff;
8
+ --button-background-hover: rgb(51, 51, 53);
9
+
10
+ --foreground: white;
11
+ --actual-background: rgb(21, 25, 27);
12
+ /* the actual color of the background once the textured background is applied */
13
+ --actual-background-color: rgb(34, 35, 37);
14
+ --background: rgb(41, 43, 45);
15
+ --border: rgb(67, 67, 67);
16
+
17
+ --green-foreground: rgb(0 217 107);
18
+ --green-background: rgb(37 54 48);
19
+ --green-border: rgb(40 86 61);
20
+
21
+ --blue-foreground: #2b95ff;
22
+
23
+ --red-foreground: rgb(243, 9, 40);
24
+ --red-background: rgb(61 36 38);
25
+ --red-border: rgb(134 34 41);
26
+ }
27
+
28
+ @media (prefers-color-scheme: light) {
29
+ :root {
30
+ --box-shadow-color: rgb(188, 188, 188);
31
+ --box-shadow: 0px 4px 8px var(--box-shadow-color);
32
+
33
+ --button-background: rgb(238, 238, 238);
34
+ --button-foreground: black;
35
+ --button-background-hover: rgb(237, 237, 237);
36
+
37
+ --foreground: rgb(0, 0, 0);
38
+ --actual-background: #f4f4f4;
39
+ --background: #f4f4f4;
40
+ --actual-background-color: #f4f4f4;
41
+ --border: rgb(186, 186, 186);
42
+
43
+ --blue-foreground: #0072e5;
44
+
45
+ --green-foreground: rgb(15, 70, 17);
46
+ --green-background: rgb(179, 228, 183);
47
+ --green-border: rgb(67, 160, 71);
48
+
49
+ --red-foreground: rgb(255, 255, 255);
50
+ --red-background: rgb(224, 18, 18);
51
+ --red-border: rgb(255, 0, 0);
52
+ }
53
+
54
+ html {
55
+ color-scheme: light;
56
+ }
57
+ }
58
+
59
+ html,
60
+ body,
61
+ p,
62
+ h1,
63
+ h2,
64
+ h3,
65
+ h4,
66
+ h5,
67
+ h6 {
68
+ padding: 0;
69
+ margin: 0;
70
+ }
71
+
72
+ html {
73
+ color-scheme: dark;
74
+ color: var(--foreground);
75
+ background-color: var(--actual-background);
76
+ position: relative;
77
+ scrollbar-width: 0.2rem;
78
+ overflow-y: scroll;
79
+
80
+ /* default font configuration */
81
+ font-feature-settings: 'zero';
82
+ font-size: 16px;
83
+
84
+ /* font optimizations */
85
+ -webkit-font-smoothing: antialiased;
86
+ -webkit-text-size-adjust: 100%;
87
+ text-rendering: optimizeLegibility;
88
+ -moz-osx-font-smoothing: grayscale;
89
+ }
90
+
91
+ /* textured background */
92
+ html:before {
93
+ content: '';
94
+ background-color: transparent;
95
+ background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 600'%3E%3Cfilter id='a'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='10' numOctaves='10' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23a)'/%3E%3C/svg%3E");
96
+ background-repeat: repeat;
97
+ background-size: 182px;
98
+ opacity: 0.15;
99
+ top: 0;
100
+ left: 0;
101
+ right: 0;
102
+ bottom: 0;
103
+ position: absolute;
104
+ pointer-events: none;
105
+ z-index: -1;
106
+ }
107
+
108
+ ::selection {
109
+ background-color: var(--foreground);
110
+ text-decoration-color: var(--background);
111
+ color: var(--background);
112
+ }
113
+
114
+ ::-moz-selection {
115
+ background-color: var(--foreground);
116
+ text-decoration-color: var(--background);
117
+ color: var(--background);
118
+ }
119
+
120
+ /* custom scrollbar */
121
+ *::-webkit-scrollbar {
122
+ width: 0.2rem;
123
+ height: 0.2rem;
124
+ }
125
+
126
+ *::-webkit-scrollbar-track {
127
+ background: var(--border);
128
+ }
129
+
130
+ *::-webkit-scrollbar-thumb {
131
+ background: var(--foreground);
132
+ }
133
+
134
+ *,
135
+ *::before,
136
+ *::after {
137
+ box-sizing: border-box;
138
+ }
139
+
140
+ a {
141
+ color: var(--blue-foreground);
142
+ }
143
+
144
+ img {
145
+ -webkit-user-drag: none;
146
+ user-select: none;
147
+ -moz-user-select: none;
148
+ -webkit-user-select: none;
149
+ -ms-user-select: none;
150
+ }
151
+
152
+ h1,
153
+ h2,
154
+ h3,
155
+ h4,
156
+ h5,
157
+ h6 {
158
+ font-weight: 800;
159
+ }
160
+
161
+ h1 {
162
+ font-size: 2.9rem;
163
+ }
164
+
165
+ h2 {
166
+ font-size: 2rem;
167
+ }
168
+
169
+ h3 {
170
+ font-size: 1.7rem;
171
+ }
172
+
173
+ h4 {
174
+ font-size: 1.45rem;
175
+ }
176
+
177
+ @media (max-width: 500px) {
178
+ html {
179
+ font-size: 15px;
180
+ }
181
+
182
+ h2 {
183
+ font-size: min(1.9rem, 13vw);
184
+ }
185
+
186
+ h3 {
187
+ font-size: 1.5rem;
188
+ }
189
+
190
+ h4 {
191
+ font-size: 1.3rem;
192
+ }
193
+ }
194
+
195
+ button {
196
+ background-color: var(--button-background);
197
+ color: var(--button-foreground);
198
+ border: 1px solid var(--border);
199
+ font-family: inherit;
200
+ font-size: inherit;
201
+ border-radius: var(--border-radius);
202
+ transition:
203
+ background-color 0.07s linear,
204
+ box-shadow 0.07s linear;
205
+ box-shadow:
206
+ var(--box-shadow),
207
+ inset 0px 1px 8px transparent;
208
+ will-change: transform, opacity;
209
+ }
210
+
211
+ button:hover {
212
+ background-color: var(--button-background-hover);
213
+ cursor: pointer;
214
+ box-shadow:
215
+ 0px 1px 5px transparent,
216
+ inset 0px 1px 8px var(--box-shadow-color);
217
+ }
218
+
219
+ button:focus {
220
+ outline: 2px solid var(--blue-foreground);
221
+ outline-offset: 2px;
222
+ }
223
+
224
+ ol,
225
+ ul {
226
+ padding-left: 5px;
227
+ list-style-position: inside;
228
+ }
229
+
230
+ ol,
231
+ ul {
232
+ margin: 0;
233
+ }
234
+
235
+ ol > li {
236
+ color: var(--green-foreground);
237
+ background-color: var(--green-background);
238
+ padding: 2px 5px;
239
+ margin-top: 5px;
240
+ width: fit-content;
241
+ border-radius: 2px;
242
+ }
243
+
244
+ ol {
245
+ padding-bottom: 10px;
246
+ }
247
+
248
+ ol p {
249
+ padding-left: 25px;
250
+ }
251
+
252
+ ol > p {
253
+ padding-top: 5px;
254
+ }
package/package.json ADDED
@@ -0,0 +1,65 @@
1
+ {
2
+ "name": "@gleich/ui",
3
+ "version": "0.0.2",
4
+ "license": "MIT",
5
+ "scripts": {
6
+ "dev": "vite dev --open",
7
+ "build": "vite build && npm run prepack",
8
+ "preview": "vite preview",
9
+ "prepare": "svelte-kit sync || echo ''",
10
+ "prepack": "svelte-kit sync && svelte-package && publint",
11
+ "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
12
+ "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
13
+ "format": "prettier --write .",
14
+ "lint": "prettier --check . && eslint ."
15
+ },
16
+ "files": [
17
+ "dist",
18
+ "!dist/**/*.test.*",
19
+ "!dist/**/*.spec.*"
20
+ ],
21
+ "sideEffects": [
22
+ "**/*.css"
23
+ ],
24
+ "svelte": "./dist/index.js",
25
+ "types": "./dist/index.d.ts",
26
+ "type": "module",
27
+ "exports": {
28
+ ".": {
29
+ "types": "./dist/index.d.ts",
30
+ "svelte": "./dist/index.js"
31
+ }
32
+ },
33
+ "peerDependencies": {
34
+ "svelte": "^5.0.0",
35
+ "@sveltejs/kit": "^2.16.0"
36
+ },
37
+ "devDependencies": {
38
+ "@eslint/compat": "^1.2.5",
39
+ "@eslint/js": "^9.18.0",
40
+ "@sveltejs/adapter-auto": "^4.0.0",
41
+ "@sveltejs/kit": "^2.16.0",
42
+ "@sveltejs/package": "^2.0.0",
43
+ "@sveltejs/vite-plugin-svelte": "^5.0.0",
44
+ "eslint": "^9.18.0",
45
+ "eslint-config-prettier": "^10.0.1",
46
+ "eslint-plugin-svelte": "^3.0.0",
47
+ "globals": "^16.0.0",
48
+ "prettier": "^3.4.2",
49
+ "prettier-plugin-svelte": "^3.3.3",
50
+ "publint": "^0.3.2",
51
+ "svelte": "^5.0.0",
52
+ "svelte-check": "^4.0.0",
53
+ "typescript": "^5.0.0",
54
+ "typescript-eslint": "^8.20.0",
55
+ "vite": "^6.2.5"
56
+ },
57
+ "keywords": [
58
+ "svelte"
59
+ ],
60
+ "pnpm": {
61
+ "onlyBuiltDependencies": [
62
+ "esbuild"
63
+ ]
64
+ }
65
+ }