sk-clib 0.0.6 โ†’ 0.0.8

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/README.md CHANGED
@@ -1,61 +1,61 @@
1
- # sk-clib
2
-
3
- A flexible and modular component library built for my SvelteKit projects.
4
-
5
- ## ๐Ÿ“ฆ Installation
6
-
7
- ```bash
8
- bun install sk-clib
9
- ```
10
-
11
- ## ๐Ÿ”ง Usage
12
-
13
- Once installed, you can import and use components like this:
14
-
15
- ```svelte
16
- <script>
17
- import { Header, Text } from 'sk-clib';
18
- </script>
19
-
20
- <Header lg bold>Welp... Hi there :)</Header>
21
- <Text size="lg" weight="bold">Hello World</Text>
22
- ```
23
-
24
- If you're using path aliases, make sure to configure them properly in your `tsconfig.json` or `jsconfig.json`.
25
-
26
- ## ๐Ÿ›  Development
27
-
28
- To contribute or develop locally:
29
-
30
- ```bash
31
- bun clone https://github.com/TreltaSev/sk-clib.git
32
- cd sk-clib
33
- bun install
34
- bun run dev
35
- ```
36
-
37
- This will launch the SvelteKit dev environment so you can view and test components live.
38
-
39
- ### Commands
40
-
41
- * `npm run dev` โ€“ Start development server with live preview
42
- * `npm run build` โ€“ Build the library for publishing
43
- * `npm run lint` โ€“ Lint codebase
44
- * `npm run check` โ€“ Run type checking
45
- * `npm run test` โ€“ (If applicable) Run tests
46
-
47
- ## โœ… Publishing
48
-
49
- Make sure everything builds correctly:
50
-
51
- ```bash
52
- bun run build
53
- ```
54
-
55
- Then publish:
56
-
57
- ```bash
58
- bun publish
59
- ```
60
-
1
+ # sk-clib
2
+
3
+ A flexible and modular component library built for my SvelteKit projects.
4
+
5
+ ## ๐Ÿ“ฆ Installation
6
+
7
+ ```bash
8
+ bun install sk-clib
9
+ ```
10
+
11
+ ## ๐Ÿ”ง Usage
12
+
13
+ Once installed, you can import and use components like this:
14
+
15
+ ```svelte
16
+ <script>
17
+ import { Header, Text } from 'sk-clib';
18
+ </script>
19
+
20
+ <Header lg bold>Welp... Hi there :)</Header>
21
+ <Text size="lg" weight="bold">Hello World</Text>
22
+ ```
23
+
24
+ If you're using path aliases, make sure to configure them properly in your `tsconfig.json` or `jsconfig.json`.
25
+
26
+ ## ๐Ÿ›  Development
27
+
28
+ To contribute or develop locally:
29
+
30
+ ```bash
31
+ bun clone https://github.com/TreltaSev/sk-clib.git
32
+ cd sk-clib
33
+ bun install
34
+ bun run dev
35
+ ```
36
+
37
+ This will launch the SvelteKit dev environment so you can view and test components live.
38
+
39
+ ### Commands
40
+
41
+ * `npm run dev` โ€“ Start development server with live preview
42
+ * `npm run build` โ€“ Build the library for publishing
43
+ * `npm run lint` โ€“ Lint codebase
44
+ * `npm run check` โ€“ Run type checking
45
+ * `npm run test` โ€“ (If applicable) Run tests
46
+
47
+ ## โœ… Publishing
48
+
49
+ Make sure everything builds correctly:
50
+
51
+ ```bash
52
+ bun run build
53
+ ```
54
+
55
+ Then publish:
56
+
57
+ ```bash
58
+ bun publish
59
+ ```
60
+
61
61
  > Ensure your version is bumped and `package.json` is clean of any local dependencies before publishing.
package/dist/index.d.ts CHANGED
@@ -1,4 +1 @@
1
- export { default as Flex } from "./ui/flex/components/flex.svelte";
2
- export { default as Frame } from "./ui/frame/components/frame.svelte";
3
- export { default as Header } from "./ui/header/components/header.svelte";
4
- export { default as Text } from "./ui/text/components/text.svelte";
1
+ export * from "./ui";
package/dist/index.js CHANGED
@@ -1,5 +1 @@
1
- // Reexport your entry components here
2
- export { default as Flex } from "./ui/flex/components/flex.svelte";
3
- export { default as Frame } from "./ui/frame/components/frame.svelte";
4
- export { default as Header } from "./ui/header/components/header.svelte";
5
- export { default as Text } from "./ui/text/components/text.svelte";
1
+ export * from "./ui";
@@ -0,0 +1,328 @@
1
+ /*! tailwindcss v4.1.5 | MIT License | https://tailwindcss.com */
2
+ @layer properties;
3
+ @layer theme, base, components, utilities;
4
+ @layer theme {
5
+ :root, :host {
6
+ --font-sans: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji",
7
+ "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
8
+ --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
9
+ "Courier New", monospace;
10
+ --color-black: #000;
11
+ --color-white: #fff;
12
+ --spacing: 0.25rem;
13
+ --text-xs: 0.75rem;
14
+ --text-xs--line-height: calc(1 / 0.75);
15
+ --text-sm: 0.875rem;
16
+ --text-sm--line-height: calc(1.25 / 0.875);
17
+ --text-base: 1rem;
18
+ --text-base--line-height: calc(1.5 / 1);
19
+ --text-lg: 1.125rem;
20
+ --text-lg--line-height: calc(1.75 / 1.125);
21
+ --text-xl: 1.25rem;
22
+ --text-xl--line-height: calc(1.75 / 1.25);
23
+ --text-2xl: 1.5rem;
24
+ --text-2xl--line-height: calc(2 / 1.5);
25
+ --font-weight-light: 300;
26
+ --font-weight-normal: 400;
27
+ --font-weight-semibold: 600;
28
+ --font-weight-bold: 700;
29
+ --font-weight-extrabold: 800;
30
+ --radius-md: 0.375rem;
31
+ --default-font-family: var(--font-sans);
32
+ --default-mono-font-family: var(--font-mono);
33
+ }
34
+ }
35
+ @layer base {
36
+ *, ::after, ::before, ::backdrop, ::file-selector-button {
37
+ box-sizing: border-box;
38
+ margin: 0;
39
+ padding: 0;
40
+ border: 0 solid;
41
+ }
42
+ html, :host {
43
+ line-height: 1.5;
44
+ -webkit-text-size-adjust: 100%;
45
+ tab-size: 4;
46
+ font-family: var(--default-font-family, ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");
47
+ font-feature-settings: var(--default-font-feature-settings, normal);
48
+ font-variation-settings: var(--default-font-variation-settings, normal);
49
+ -webkit-tap-highlight-color: transparent;
50
+ }
51
+ hr {
52
+ height: 0;
53
+ color: inherit;
54
+ border-top-width: 1px;
55
+ }
56
+ abbr:where([title]) {
57
+ -webkit-text-decoration: underline dotted;
58
+ text-decoration: underline dotted;
59
+ }
60
+ h1, h2, h3, h4, h5, h6 {
61
+ font-size: inherit;
62
+ font-weight: inherit;
63
+ }
64
+ a {
65
+ color: inherit;
66
+ -webkit-text-decoration: inherit;
67
+ text-decoration: inherit;
68
+ }
69
+ b, strong {
70
+ font-weight: bolder;
71
+ }
72
+ code, kbd, samp, pre {
73
+ font-family: var(--default-mono-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);
74
+ font-feature-settings: var(--default-mono-font-feature-settings, normal);
75
+ font-variation-settings: var(--default-mono-font-variation-settings, normal);
76
+ font-size: 1em;
77
+ }
78
+ small {
79
+ font-size: 80%;
80
+ }
81
+ sub, sup {
82
+ font-size: 75%;
83
+ line-height: 0;
84
+ position: relative;
85
+ vertical-align: baseline;
86
+ }
87
+ sub {
88
+ bottom: -0.25em;
89
+ }
90
+ sup {
91
+ top: -0.5em;
92
+ }
93
+ table {
94
+ text-indent: 0;
95
+ border-color: inherit;
96
+ border-collapse: collapse;
97
+ }
98
+ :-moz-focusring {
99
+ outline: auto;
100
+ }
101
+ progress {
102
+ vertical-align: baseline;
103
+ }
104
+ summary {
105
+ display: list-item;
106
+ }
107
+ ol, ul, menu {
108
+ list-style: none;
109
+ }
110
+ img, svg, video, canvas, audio, iframe, embed, object {
111
+ display: block;
112
+ vertical-align: middle;
113
+ }
114
+ img, video {
115
+ max-width: 100%;
116
+ height: auto;
117
+ }
118
+ button, input, select, optgroup, textarea, ::file-selector-button {
119
+ font: inherit;
120
+ font-feature-settings: inherit;
121
+ font-variation-settings: inherit;
122
+ letter-spacing: inherit;
123
+ color: inherit;
124
+ border-radius: 0;
125
+ background-color: transparent;
126
+ opacity: 1;
127
+ }
128
+ :where(select:is([multiple], [size])) optgroup {
129
+ font-weight: bolder;
130
+ }
131
+ :where(select:is([multiple], [size])) optgroup option {
132
+ padding-inline-start: 20px;
133
+ }
134
+ ::file-selector-button {
135
+ margin-inline-end: 4px;
136
+ }
137
+ ::placeholder {
138
+ opacity: 1;
139
+ }
140
+ @supports (not (-webkit-appearance: -apple-pay-button)) or (contain-intrinsic-size: 1px) {
141
+ ::placeholder {
142
+ color: currentcolor;
143
+ @supports (color: color-mix(in lab, red, red)) {
144
+ color: color-mix(in oklab, currentcolor 50%, transparent);
145
+ }
146
+ }
147
+ }
148
+ textarea {
149
+ resize: vertical;
150
+ }
151
+ ::-webkit-search-decoration {
152
+ -webkit-appearance: none;
153
+ }
154
+ ::-webkit-date-and-time-value {
155
+ min-height: 1lh;
156
+ text-align: inherit;
157
+ }
158
+ ::-webkit-datetime-edit {
159
+ display: inline-flex;
160
+ }
161
+ ::-webkit-datetime-edit-fields-wrapper {
162
+ padding: 0;
163
+ }
164
+ ::-webkit-datetime-edit, ::-webkit-datetime-edit-year-field, ::-webkit-datetime-edit-month-field, ::-webkit-datetime-edit-day-field, ::-webkit-datetime-edit-hour-field, ::-webkit-datetime-edit-minute-field, ::-webkit-datetime-edit-second-field, ::-webkit-datetime-edit-millisecond-field, ::-webkit-datetime-edit-meridiem-field {
165
+ padding-block: 0;
166
+ }
167
+ :-moz-ui-invalid {
168
+ box-shadow: none;
169
+ }
170
+ button, input:where([type="button"], [type="reset"], [type="submit"]), ::file-selector-button {
171
+ appearance: button;
172
+ }
173
+ ::-webkit-inner-spin-button, ::-webkit-outer-spin-button {
174
+ height: auto;
175
+ }
176
+ [hidden]:where(:not([hidden="until-found"])) {
177
+ display: none !important;
178
+ }
179
+ }
180
+ @layer utilities {
181
+ .static {
182
+ position: static;
183
+ }
184
+ .container {
185
+ width: 100%;
186
+ @media (width >= 40rem) {
187
+ max-width: 40rem;
188
+ }
189
+ @media (width >= 48rem) {
190
+ max-width: 48rem;
191
+ }
192
+ @media (width >= 64rem) {
193
+ max-width: 64rem;
194
+ }
195
+ @media (width >= 80rem) {
196
+ max-width: 80rem;
197
+ }
198
+ @media (width >= 96rem) {
199
+ max-width: 96rem;
200
+ }
201
+ }
202
+ .flex {
203
+ display: flex;
204
+ }
205
+ .aspect-square {
206
+ aspect-ratio: 1 / 1;
207
+ }
208
+ .size-full {
209
+ width: 100%;
210
+ height: 100%;
211
+ }
212
+ .h-full {
213
+ height: 100%;
214
+ }
215
+ .w-full {
216
+ width: 100%;
217
+ }
218
+ .shrink-0 {
219
+ flex-shrink: 0;
220
+ }
221
+ .cursor-auto {
222
+ cursor: auto;
223
+ }
224
+ .cursor-default {
225
+ cursor: default;
226
+ }
227
+ .cursor-pointer {
228
+ cursor: pointer;
229
+ }
230
+ .flex-col {
231
+ flex-direction: column;
232
+ }
233
+ .flex-row {
234
+ flex-direction: row;
235
+ }
236
+ .items-center {
237
+ align-items: center;
238
+ }
239
+ .justify-center {
240
+ justify-content: center;
241
+ }
242
+ .rounded-md {
243
+ border-radius: var(--radius-md);
244
+ }
245
+ .bg-\[var\(--color-primary\)\] {
246
+ background-color: var(--color-primary);
247
+ }
248
+ .bg-black {
249
+ background-color: var(--color-black);
250
+ }
251
+ .px-4 {
252
+ padding-inline: calc(var(--spacing) * 4);
253
+ }
254
+ .py-2 {
255
+ padding-block: calc(var(--spacing) * 2);
256
+ }
257
+ .text-2xl {
258
+ font-size: var(--text-2xl);
259
+ line-height: var(--tw-leading, var(--text-2xl--line-height));
260
+ }
261
+ .text-base {
262
+ font-size: var(--text-base);
263
+ line-height: var(--tw-leading, var(--text-base--line-height));
264
+ }
265
+ .text-lg {
266
+ font-size: var(--text-lg);
267
+ line-height: var(--tw-leading, var(--text-lg--line-height));
268
+ }
269
+ .text-sm {
270
+ font-size: var(--text-sm);
271
+ line-height: var(--tw-leading, var(--text-sm--line-height));
272
+ }
273
+ .text-xl {
274
+ font-size: var(--text-xl);
275
+ line-height: var(--tw-leading, var(--text-xl--line-height));
276
+ }
277
+ .text-xs {
278
+ font-size: var(--text-xs);
279
+ line-height: var(--tw-leading, var(--text-xs--line-height));
280
+ }
281
+ .font-bold {
282
+ --tw-font-weight: var(--font-weight-bold);
283
+ font-weight: var(--font-weight-bold);
284
+ }
285
+ .font-extrabold {
286
+ --tw-font-weight: var(--font-weight-extrabold);
287
+ font-weight: var(--font-weight-extrabold);
288
+ }
289
+ .font-light {
290
+ --tw-font-weight: var(--font-weight-light);
291
+ font-weight: var(--font-weight-light);
292
+ }
293
+ .font-normal {
294
+ --tw-font-weight: var(--font-weight-normal);
295
+ font-weight: var(--font-weight-normal);
296
+ }
297
+ .font-semibold {
298
+ --tw-font-weight: var(--font-weight-semibold);
299
+ font-weight: var(--font-weight-semibold);
300
+ }
301
+ .text-white {
302
+ color: var(--color-white);
303
+ }
304
+ .italic {
305
+ font-style: italic;
306
+ }
307
+ .data-\[state\=toggled\]\:bg-black {
308
+ &[data-state="toggled"] {
309
+ background-color: var(--color-black);
310
+ }
311
+ }
312
+ .data-\[state\=toggled\]\:text-white {
313
+ &[data-state="toggled"] {
314
+ color: var(--color-white);
315
+ }
316
+ }
317
+ }
318
+ @property --tw-font-weight {
319
+ syntax: "*";
320
+ inherits: false;
321
+ }
322
+ @layer properties {
323
+ @supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))) {
324
+ *, ::before, ::after, ::backdrop {
325
+ --tw-font-weight: initial;
326
+ }
327
+ }
328
+ }
@@ -0,0 +1,24 @@
1
+ <script lang="ts">
2
+ // --- Logic ---
3
+ import { cn } from '../../../utils';
4
+ import type { Props } from '..';
5
+
6
+ let { children, class: className, buttonClass = $bindable('px-4 py-2 rounded-md bg-[var(--color-primary)] color-[var(--color-white)]'), ...rest }: Props = $props();
7
+
8
+ // Setup Button's Default Class
9
+ let buttonCls = $state(cn(buttonClass, className));
10
+ $effect(() => {
11
+ buttonCls = cn(buttonClass, className);
12
+ });
13
+ </script>
14
+
15
+ <button class={cn(buttonCls)} {...rest} tabindex="0">
16
+ {@render children?.()}
17
+ </button>
18
+
19
+ <!--@component
20
+ Generated by SvelteForge๐Ÿ”ฅ
21
+
22
+ # Button Component
23
+ Simple button component for easy customization and easy onclick functionality
24
+ -->
@@ -0,0 +1,10 @@
1
+ import type { Props } from '..';
2
+ /**
3
+ * Generated by SvelteForge๐Ÿ”ฅ
4
+ *
5
+ * # Button Component
6
+ * Simple button component for easy customization and easy onclick functionality
7
+ */
8
+ declare const Button: import("svelte").Component<Props, {}, "buttonClass">;
9
+ type Button = ReturnType<typeof Button>;
10
+ export default Button;
@@ -0,0 +1,2 @@
1
+ export { default as _, default as Root } from "./components/button.svelte";
2
+ export type { tButtonProps as Props, } from "./types";
@@ -0,0 +1 @@
1
+ export { default as _, default as Root } from "./components/button.svelte";
@@ -0,0 +1,4 @@
1
+ import type { ClassValue, HTMLButtonAttributes } from "svelte/elements";
2
+ export type tButtonProps = HTMLButtonAttributes & {
3
+ buttonClass?: ClassValue;
4
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -17,6 +17,6 @@ import type { Props } from '..';
17
17
  * This will create a flex container that is a row, centered, and fills the available space.
18
18
  * The `class` prop can be used to add additional classes to the frame, and the `children` prop can be used to pass in child components.
19
19
  */
20
- declare const Frame: import("svelte").Component<Props, {}, "flex" | "row" | "col" | "centerx" | "centery" | "center" | "fill" | "fillw" | "fillh" | "noshrink" | "aspectSquare" | "cursorAuto" | "cursorDefault" | "cursorPointer">;
20
+ declare const Frame: import("svelte").Component<Props, {}, "fill" | "flex" | "row" | "col" | "centerx" | "centery" | "center" | "fillw" | "fillh" | "noshrink" | "aspectSquare" | "cursorAuto" | "cursorDefault" | "cursorPointer">;
21
21
  type Frame = ReturnType<typeof Frame>;
22
22
  export default Frame;
@@ -0,0 +1,5 @@
1
+ export { default as Button } from "./button/components/button.svelte";
2
+ export { default as Flex } from "./flex/components/flex.svelte";
3
+ export { default as Frame } from "./frame/components/frame.svelte";
4
+ export { default as Header } from "./header/components/header.svelte";
5
+ export { default as Text } from "./text/components/text.svelte";
package/dist/ui/index.js CHANGED
@@ -1 +1,8 @@
1
- "use strict";
1
+ /* eslint-disable @typescript-eslint/ban-ts-comment */
2
+ // @ts-nocheck
3
+ // Reexport your entry components here
4
+ export { default as Button } from "./button/components/button.svelte";
5
+ export { default as Flex } from "./flex/components/flex.svelte";
6
+ export { default as Frame } from "./frame/components/frame.svelte";
7
+ export { default as Header } from "./header/components/header.svelte";
8
+ export { default as Text } from "./text/components/text.svelte";
package/package.json CHANGED
@@ -1,16 +1,24 @@
1
1
  {
2
2
  "name": "sk-clib",
3
- "version": "0.0.6",
3
+ "version": "0.0.8",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist",
7
7
  "!dist/**/*.test.*",
8
- "!dist/**/*.spec.*"
8
+ "!dist/**/*.spec.*",
9
+ "dist/styles.css"
9
10
  ],
10
11
  "exports": {
11
12
  ".": {
12
13
  "types": "./dist/index.d.ts",
13
14
  "svelte": "./dist/index.js"
15
+ },
16
+ "./ui": {
17
+ "types": "./dist/ui/index.d.ts",
18
+ "svelte": "./dist/ui/index.js"
19
+ },
20
+ "./style": {
21
+ "default": "./dist/styles.css"
14
22
  }
15
23
  },
16
24
  "svelte": "./dist/index.js",
@@ -19,7 +27,7 @@
19
27
  "**/*.css"
20
28
  ],
21
29
  "scripts": {
22
- "build": "svelte-package",
30
+ "build": "svelte-package && bunx tailwindcss -i ./src/app.css -o ./dist/styles.css",
23
31
  "prepublishOnly": "npm run build && publint",
24
32
  "dev": "vite dev",
25
33
  "preview": "vite preview",
@@ -30,7 +38,8 @@
30
38
  },
31
39
  "peerDependencies": {
32
40
  "@sveltejs/kit": "^2.0.0",
33
- "svelte": "^5.0.0"
41
+ "svelte": "^5.0.0",
42
+ "tailwindcss": "^4.1.5"
34
43
  },
35
44
  "devDependencies": {
36
45
  "@sveltejs/kit": "^2.0.0",
@@ -54,6 +63,7 @@
54
63
  "library"
55
64
  ],
56
65
  "dependencies": {
66
+ "@tailwindcss/cli": "^4.1.5",
57
67
  "tailwind-merge": "^3.2.0"
58
68
  }
59
69
  }