sveltekit-ui 1.1.39 → 1.1.41

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sveltekit-ui",
3
- "version": "1.1.39",
3
+ "version": "1.1.41",
4
4
  "description": "A SvelteKit UI component library for building modern web applications",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -19,14 +19,14 @@
19
19
  "dependencies": {
20
20
  "context-filter-polyfill": "^0.3.23",
21
21
  "qr-code-styling": "^1.9.2",
22
- "svelte": "^5.50.1"
22
+ "svelte": "^5.53.5"
23
23
  },
24
24
  "peerDependencies": {
25
25
  "@sveltejs/kit": "^2.22.2"
26
26
  },
27
27
  "devDependencies": {
28
- "@sveltejs/adapter-vercel": "^6.3.1",
29
- "@sveltejs/kit": "^2.50.2",
28
+ "@sveltejs/adapter-vercel": "^6.3.3",
29
+ "@sveltejs/kit": "^2.53.2",
30
30
  "@sveltejs/package": "^2.5.7",
31
31
  "@sveltejs/vite-plugin-svelte": "^6.2.4",
32
32
  "@vercel/analytics": "^1.6.1",
@@ -9,6 +9,57 @@
9
9
  import { definitions, docs_definition_to_sample_code, docs_overview_code_sample } from "$lib/client/docs/index.js"
10
10
  import { copy_to_clipboard } from "$lib/client/index.js"
11
11
 
12
+ const colors_section = `color system (oklch css variables)
13
+
14
+ overview
15
+ - all colors are exposed as css custom properties (variables).
16
+ - most of the time you should use the "-t" themed versions (they automatically flip for dark mode).
17
+ - variables are designed to be composable: oklch(lightness chroma hue / alpha).
18
+
19
+ core pieces
20
+ 1) lightness scale
21
+ - --l0 ... --l24 are lightness steps for the default (light) theme.
22
+ - --l0-t ... --l24-t are the themed lightness steps (invert in dark theme).
23
+
24
+ 2) hue + chroma scales
25
+ - --h0 ... --h24 are hue steps (0-360-ish).
26
+ - --c0 ... --c24 are chroma steps (0-1-ish).
27
+ - --o0 ... --o24 are opacity steps (0-1).
28
+
29
+ 3) grayscale system tied to the primary hue
30
+ - --g0 ... --g24 and --g0-t ... --g24-t are “neutral grays” but actually oklch grays tinted toward --primary-h.
31
+ - use these for almost everything (text, borders, surfaces) because they stay cohesive with your primary color.
32
+
33
+ theme guidance
34
+ - use *-t variables by default (ex: var(--g6-t), var(--bg), var(--shadow3-t)).
35
+ - use non -t variables only if you explicitly want the same value in light and dark modes.
36
+
37
+ recommended usage patterns
38
+ - page background: var(--bg)
39
+ - elevated/surface background: var(--bg2) or var(--shadow1-t) (subtle)
40
+ - primary brand color: var(--primary) or var(--primary-t)
41
+ - primary text: var(--g6-t)
42
+ - muted text / labels: var(--g10-t) to var(--g14-t)
43
+ - borders / dividers: var(--g16-t) or var(--shadow7-t)
44
+ - shadows: var(--shadow1-t) ... var(--shadow10-t)
45
+ - tints (light overlays): var(--tint1-t) ... var(--tint10-t)
46
+
47
+ states
48
+ - focus ring: var(--selected-t) with contrast ring var(--g1-t)
49
+ - error/warning/success: var(--error-t), var(--warning-t), var(--success-t)
50
+
51
+ examples
52
+ - text color: color: var(--g6-t);
53
+ - surface: background: var(--bg2);
54
+ - border: box-shadow: inset 0 0 0 1px var(--shadow7-t);
55
+ - primary button: background: var(--primary-t); color: var(--primary-contrast-t);
56
+ - translucent primary: background: var(--primary-transparent1-t);
57
+
58
+ dark theme
59
+ - dark theme is activated with [data-theme="dark"] on a parent element.
60
+ - in dark theme, the -t lightness ramp is inverted so your chosen step numbers still "mean" the same thing (lower = darker surface, higher = brighter surface), without rewriting styles.
61
+ `
62
+
12
63
  let content_manager = create_content_manager({
13
64
  val: {
14
65
  type_id: "div",
@@ -255,6 +306,26 @@
255
306
  },
256
307
  })
257
308
 
309
+ const overview = `Each component can be combined into a more complex component. This is intended for sveltekit projects. The whole "tree" of components should be initialized at the parent-most level which is likely in the <script> tags of a +page.svelte file.
310
+
311
+ ${docs_overview_code_sample}
312
+
313
+ ${colors_section}
314
+
315
+ below are the docs for each component individually
316
+
317
+ `
318
+
319
+ let docs_prepped = {}
320
+ for (let [key, definition] of Object.entries(definitions)) {
321
+ let sample_code = docs_definition_to_sample_code(definition)
322
+ docs_prepped[key] = {
323
+ ...definition,
324
+ sample_code: sample_code,
325
+ }
326
+ }
327
+ const all_docs = overview + JSON.stringify(docs_prepped)
328
+
258
329
  let button_manager = create_button_manager({
259
330
  text: "Visit Docs",
260
331
  mt: 2,
@@ -269,25 +340,7 @@
269
340
  is_success_animation: true,
270
341
  mt: 2,
271
342
  support_icon: "clipboard",
272
- on_click: () => {
273
- const overview = `Each component can be combined into a more complex component. This is intended for sveltekit projects. The whole "tree" of components should be initialized at the parent-most level which is likely in the <script> tags of a +page.svelte file.
274
-
275
- ${docs_overview_code_sample}
276
-
277
- below are the docs for each component individually
278
-
279
- `
280
-
281
- let docs_prepped = {}
282
- for (let [key, definition] of Object.entries(definitions)) {
283
- let sample_code = docs_definition_to_sample_code(definition)
284
- docs_prepped[key] = {
285
- ...definition,
286
- sample_code: sample_code,
287
- }
288
- }
289
- copy_to_clipboard(overview + JSON.stringify(docs_prepped))
290
- },
343
+ on_click: () => copy_to_clipboard(all_docs),
291
344
  })
292
345
 
293
346
  let youtube_video_manager = create_youtube_video_manager({
@@ -302,9 +355,10 @@ below are the docs for each component individually
302
355
  <Content manager={content_manager} />
303
356
  <Button manager={button_manager} />
304
357
  <Button manager={copy_all_docs_button_manager} />
305
- <p>
306
- Questions? Email <a href="mailto:info@sveltekit-ui.com">info@sveltekit-ui.com</a>
307
- </p>
358
+ <div>
359
+ <h3>All Docs</h3>
360
+ {all_docs}
361
+ </div>
308
362
  </div>
309
363
 
310
364
  <style>