@charstudios/pallet 0.1.0 → 0.3.0

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/dist/index.js CHANGED
@@ -135,11 +135,11 @@ function resolveColors(theme, scheme) {
135
135
  function themeToCss(theme, options = {}) {
136
136
  const selector = options.selector ?? ":root";
137
137
  const darkSelector = options.darkSelector ?? ".dark";
138
- const light3 = resolveTheme(theme, "light");
138
+ const light4 = resolveTheme(theme, "light");
139
139
  const darkColors = resolveColors(theme, "dark");
140
140
  const variantComment = options.includeVariantComment ? `/* pallet variant: ${theme.variant} (set data-pallet-variant="${theme.variant}") */
141
141
  ` : "";
142
- return variantComment + `${selector}{${cssVarsToString(light3)}}${darkSelector}{${cssVarsToString(darkColors)}}`;
142
+ return variantComment + `${selector}{${cssVarsToString(light4)}}${darkSelector}{${cssVarsToString(darkColors)}}`;
143
143
  }
144
144
  function serializeTheme(theme) {
145
145
  return JSON.stringify(theme);
@@ -305,124 +305,239 @@ var flat = {
305
305
  }
306
306
  };
307
307
 
308
- // src/presets/launch.ts
308
+ // src/presets/frosted.ts
309
309
  var light2 = {
310
- background: "oklch(0.98 0.003 264)",
311
- foreground: "oklch(0.21 0.03 264)",
312
- card: "oklch(1 0 0)",
313
- cardForeground: "oklch(0.21 0.03 264)",
314
- popover: "oklch(1 0 0)",
315
- popoverForeground: "oklch(0.21 0.03 264)",
316
- primary: "oklch(0.7 0.11 264)",
317
- primaryForeground: "oklch(0.99 0.002 264)",
318
- secondary: "oklch(0.965 0.006 264)",
319
- secondaryForeground: "oklch(0.3 0.03 264)",
320
- muted: "oklch(0.965 0.006 264)",
321
- mutedForeground: "oklch(0.55 0.03 264)",
322
- accent: "oklch(0.95 0.03 264)",
323
- accentForeground: "oklch(0.42 0.11 264)",
324
- destructive: "oklch(0.62 0.22 25)",
310
+ background: "oklch(0.94 0.02 240)",
311
+ foreground: "oklch(0.24 0.03 255)",
312
+ card: "oklch(1 0.01 240 / 55%)",
313
+ cardForeground: "oklch(0.24 0.03 255)",
314
+ popover: "oklch(1 0.01 240 / 62%)",
315
+ popoverForeground: "oklch(0.24 0.03 255)",
316
+ primary: "oklch(0.62 0.12 240)",
317
+ primaryForeground: "oklch(0.99 0.005 240)",
318
+ secondary: "oklch(0.92 0.02 240 / 70%)",
319
+ secondaryForeground: "oklch(0.3 0.04 255)",
320
+ muted: "oklch(0.93 0.015 240 / 65%)",
321
+ mutedForeground: "oklch(0.5 0.03 250)",
322
+ accent: "oklch(0.9 0.04 230 / 70%)",
323
+ accentForeground: "oklch(0.35 0.08 245)",
324
+ destructive: "oklch(0.6 0.2 25)",
325
325
  destructiveForeground: "oklch(0.99 0 0)",
326
- border: "oklch(0.92 0.008 264)",
327
- input: "oklch(0.965 0.006 264)",
328
- ring: "oklch(0.6 0.19 264)",
329
- chart1: "oklch(0.7 0.11 264)",
330
- chart2: "oklch(0.62 0.15 264)",
331
- chart3: "oklch(0.55 0.19 264)",
332
- chart4: "oklch(0.72 0.1 210)",
333
- chart5: "oklch(0.68 0.13 300)",
334
- sidebar: "oklch(0.985 0.003 264)",
335
- sidebarForeground: "oklch(0.21 0.03 264)",
336
- sidebarPrimary: "oklch(0.7 0.11 264)",
337
- sidebarPrimaryForeground: "oklch(0.99 0.002 264)",
338
- sidebarAccent: "oklch(0.95 0.03 264)",
339
- sidebarAccentForeground: "oklch(0.42 0.11 264)",
340
- sidebarBorder: "oklch(0.92 0.008 264)",
341
- sidebarRing: "oklch(0.6 0.19 264)"
326
+ border: "oklch(0.85 0.02 240 / 55%)",
327
+ input: "oklch(0.97 0.01 240 / 50%)",
328
+ ring: "oklch(0.62 0.14 235)",
329
+ chart1: "oklch(0.62 0.12 240)",
330
+ chart2: "oklch(0.68 0.1 200)",
331
+ chart3: "oklch(0.58 0.14 280)",
332
+ chart4: "oklch(0.72 0.08 180)",
333
+ chart5: "oklch(0.66 0.11 320)",
334
+ sidebar: "oklch(0.96 0.015 240 / 55%)",
335
+ sidebarForeground: "oklch(0.24 0.03 255)",
336
+ sidebarPrimary: "oklch(0.62 0.12 240)",
337
+ sidebarPrimaryForeground: "oklch(0.99 0.005 240)",
338
+ sidebarAccent: "oklch(0.9 0.04 230 / 70%)",
339
+ sidebarAccentForeground: "oklch(0.35 0.08 245)",
340
+ sidebarBorder: "oklch(0.85 0.02 240 / 50%)",
341
+ sidebarRing: "oklch(0.62 0.14 235)"
342
342
  };
343
343
  var dark2 = {
344
- background: "oklch(0.19 0.02 264)",
345
- foreground: "oklch(0.97 0.005 264)",
346
- card: "oklch(0.23 0.024 264)",
347
- cardForeground: "oklch(0.97 0.005 264)",
348
- popover: "oklch(0.23 0.024 264)",
349
- popoverForeground: "oklch(0.97 0.005 264)",
350
- primary: "oklch(0.72 0.12 264)",
351
- primaryForeground: "oklch(0.16 0.03 264)",
352
- secondary: "oklch(0.28 0.02 264)",
353
- secondaryForeground: "oklch(0.97 0.005 264)",
354
- muted: "oklch(0.28 0.02 264)",
355
- mutedForeground: "oklch(0.72 0.02 264)",
356
- accent: "oklch(0.32 0.05 264)",
357
- accentForeground: "oklch(0.9 0.05 264)",
358
- destructive: "oklch(0.7 0.19 22)",
344
+ background: "oklch(0.18 0.03 260)",
345
+ foreground: "oklch(0.96 0.01 240)",
346
+ card: "oklch(0.28 0.04 260 / 45%)",
347
+ cardForeground: "oklch(0.96 0.01 240)",
348
+ popover: "oklch(0.3 0.04 260 / 52%)",
349
+ popoverForeground: "oklch(0.96 0.01 240)",
350
+ primary: "oklch(0.72 0.12 230)",
351
+ primaryForeground: "oklch(0.18 0.03 260)",
352
+ secondary: "oklch(0.32 0.03 260 / 55%)",
353
+ secondaryForeground: "oklch(0.96 0.01 240)",
354
+ muted: "oklch(0.3 0.03 260 / 50%)",
355
+ mutedForeground: "oklch(0.72 0.03 250)",
356
+ accent: "oklch(0.36 0.05 250 / 55%)",
357
+ accentForeground: "oklch(0.92 0.03 230)",
358
+ destructive: "oklch(0.68 0.18 22)",
359
359
  destructiveForeground: "oklch(0.99 0 0)",
360
- border: "oklch(1 0 0 / 10%)",
361
- input: "oklch(1 0 0 / 12%)",
362
- ring: "oklch(0.65 0.17 264)",
363
- chart1: "oklch(0.72 0.12 264)",
364
- chart2: "oklch(0.64 0.15 264)",
365
- chart3: "oklch(0.58 0.18 264)",
366
- chart4: "oklch(0.74 0.1 210)",
367
- chart5: "oklch(0.7 0.13 300)",
368
- sidebar: "oklch(0.21 0.022 264)",
369
- sidebarForeground: "oklch(0.97 0.005 264)",
370
- sidebarPrimary: "oklch(0.72 0.12 264)",
371
- sidebarPrimaryForeground: "oklch(0.16 0.03 264)",
372
- sidebarAccent: "oklch(0.32 0.05 264)",
373
- sidebarAccentForeground: "oklch(0.9 0.05 264)",
374
- sidebarBorder: "oklch(1 0 0 / 10%)",
375
- sidebarRing: "oklch(0.65 0.17 264)"
360
+ border: "oklch(1 0 0 / 14%)",
361
+ input: "oklch(1 0 0 / 10%)",
362
+ ring: "oklch(0.7 0.12 230)",
363
+ chart1: "oklch(0.72 0.12 230)",
364
+ chart2: "oklch(0.7 0.1 200)",
365
+ chart3: "oklch(0.66 0.14 280)",
366
+ chart4: "oklch(0.74 0.08 180)",
367
+ chart5: "oklch(0.68 0.11 320)",
368
+ sidebar: "oklch(0.22 0.035 260 / 50%)",
369
+ sidebarForeground: "oklch(0.96 0.01 240)",
370
+ sidebarPrimary: "oklch(0.72 0.12 230)",
371
+ sidebarPrimaryForeground: "oklch(0.18 0.03 260)",
372
+ sidebarAccent: "oklch(0.36 0.05 250 / 55%)",
373
+ sidebarAccentForeground: "oklch(0.92 0.03 230)",
374
+ sidebarBorder: "oklch(1 0 0 / 12%)",
375
+ sidebarRing: "oklch(0.7 0.12 230)"
376
376
  };
377
- var launch = {
378
- name: "launch",
379
- variant: "launch",
377
+ var frosted = {
378
+ name: "frosted",
379
+ variant: "frosted",
380
380
  colors: { light: light2, dark: dark2 },
381
381
  typography: {
382
382
  sans: '"Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif',
383
- heading: '"Plus Jakarta Sans", "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif',
383
+ heading: '"Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif',
384
384
  mono: 'ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace',
385
- googleFonts: ["Inter", "Plus Jakarta Sans"]
385
+ googleFonts: ["Inter"]
386
386
  },
387
387
  radius: {
388
- base: "1.25rem",
389
- // A slightly gentler ramp so large elements do not over-round.
388
+ base: "0.75rem",
390
389
  scale: {
391
- sm: 0.4,
392
- md: 0.6,
390
+ sm: 0.55,
391
+ md: 0.8,
393
392
  lg: 1,
394
393
  xl: 1.2,
395
- "2xl": 1.5,
396
- "3xl": 1.8,
397
- "4xl": 2.2
394
+ "2xl": 1.4,
395
+ "3xl": 1.6,
396
+ "4xl": 1.8
398
397
  }
399
398
  },
400
399
  elevation: {
401
400
  shadows: {
402
- xs: "0 1px 2px 0 oklch(0.55 0.19 264 / 0.06)",
403
- sm: "0 2px 8px -2px oklch(0.55 0.19 264 / 0.10), 0 1px 3px -1px oklch(0 0 0 / 0.05)",
404
- md: "0 6px 20px -6px oklch(0.55 0.19 264 / 0.16), 0 2px 6px -2px oklch(0 0 0 / 0.06)",
405
- lg: "0 14px 34px -10px oklch(0.55 0.19 264 / 0.20), 0 4px 10px -4px oklch(0 0 0 / 0.07)",
406
- xl: "0 24px 56px -16px oklch(0.55 0.19 264 / 0.26), 0 8px 18px -8px oklch(0 0 0 / 0.08)"
401
+ xs: "none",
402
+ sm: "none",
403
+ md: "0 4px 16px -8px oklch(0.45 0.08 240 / 0.12)",
404
+ lg: "0 10px 28px -12px oklch(0.45 0.08 240 / 0.16)",
405
+ xl: "0 18px 40px -16px oklch(0.45 0.08 240 / 0.2)"
407
406
  },
408
- borderStrength: 0.5,
409
- level: "md"
407
+ borderStrength: 0.35,
408
+ level: "sm"
410
409
  },
411
410
  density: {
412
- spacing: "0.26rem",
413
- scale: 1.1
411
+ spacing: "0.25rem",
412
+ scale: 1.05
414
413
  },
415
414
  motion: {
416
- duration: 240,
415
+ duration: 260,
417
416
  easing: "cubic-bezier(0.22, 1, 0.36, 1)",
418
417
  intensity: 1
419
418
  }
420
419
  };
421
420
 
421
+ // src/presets/toon.ts
422
+ var light3 = {
423
+ background: "oklch(0.965 0.005 260)",
424
+ foreground: "oklch(0.22 0.02 260)",
425
+ card: "oklch(1 0 0)",
426
+ cardForeground: "oklch(0.22 0.02 260)",
427
+ popover: "oklch(1 0 0)",
428
+ popoverForeground: "oklch(0.22 0.02 260)",
429
+ primary: "oklch(0.55 0.19 255)",
430
+ primaryForeground: "oklch(0.99 0.005 255)",
431
+ secondary: "oklch(0.96 0.01 260)",
432
+ secondaryForeground: "oklch(0.28 0.03 260)",
433
+ muted: "oklch(0.95 0.008 260)",
434
+ mutedForeground: "oklch(0.52 0.02 260)",
435
+ accent: "oklch(0.94 0.03 255)",
436
+ accentForeground: "oklch(0.4 0.12 255)",
437
+ destructive: "oklch(0.58 0.22 25)",
438
+ destructiveForeground: "oklch(0.99 0 0)",
439
+ border: "oklch(0.82 0.015 260)",
440
+ input: "oklch(1 0 0)",
441
+ ring: "oklch(0.55 0.19 255)",
442
+ chart1: "oklch(0.55 0.19 255)",
443
+ chart2: "oklch(0.62 0.18 300)",
444
+ chart3: "oklch(0.7 0.16 55)",
445
+ chart4: "oklch(0.65 0.17 145)",
446
+ chart5: "oklch(0.6 0.2 25)",
447
+ sidebar: "oklch(1 0 0)",
448
+ sidebarForeground: "oklch(0.22 0.02 260)",
449
+ sidebarPrimary: "oklch(0.55 0.19 255)",
450
+ sidebarPrimaryForeground: "oklch(0.99 0.005 255)",
451
+ sidebarAccent: "oklch(0.94 0.03 255)",
452
+ sidebarAccentForeground: "oklch(0.4 0.12 255)",
453
+ sidebarBorder: "oklch(0.82 0.015 260)",
454
+ sidebarRing: "oklch(0.55 0.19 255)"
455
+ };
456
+ var dark3 = {
457
+ background: "oklch(0.18 0.02 260)",
458
+ foreground: "oklch(0.96 0.01 260)",
459
+ card: "oklch(0.24 0.025 260)",
460
+ cardForeground: "oklch(0.96 0.01 260)",
461
+ popover: "oklch(0.24 0.025 260)",
462
+ popoverForeground: "oklch(0.96 0.01 260)",
463
+ primary: "oklch(0.68 0.16 255)",
464
+ primaryForeground: "oklch(0.18 0.03 260)",
465
+ secondary: "oklch(0.3 0.02 260)",
466
+ secondaryForeground: "oklch(0.96 0.01 260)",
467
+ muted: "oklch(0.3 0.02 260)",
468
+ mutedForeground: "oklch(0.7 0.02 260)",
469
+ accent: "oklch(0.32 0.05 255)",
470
+ accentForeground: "oklch(0.85 0.06 255)",
471
+ destructive: "oklch(0.68 0.18 22)",
472
+ destructiveForeground: "oklch(0.99 0 0)",
473
+ border: "oklch(1 0 0 / 16%)",
474
+ input: "oklch(0.24 0.025 260)",
475
+ ring: "oklch(0.68 0.16 255)",
476
+ chart1: "oklch(0.68 0.16 255)",
477
+ chart2: "oklch(0.7 0.15 300)",
478
+ chart3: "oklch(0.75 0.14 55)",
479
+ chart4: "oklch(0.7 0.14 145)",
480
+ chart5: "oklch(0.68 0.18 25)",
481
+ sidebar: "oklch(0.22 0.025 260)",
482
+ sidebarForeground: "oklch(0.96 0.01 260)",
483
+ sidebarPrimary: "oklch(0.68 0.16 255)",
484
+ sidebarPrimaryForeground: "oklch(0.18 0.03 260)",
485
+ sidebarAccent: "oklch(0.32 0.05 255)",
486
+ sidebarAccentForeground: "oklch(0.85 0.06 255)",
487
+ sidebarBorder: "oklch(1 0 0 / 14%)",
488
+ sidebarRing: "oklch(0.68 0.16 255)"
489
+ };
490
+ var toon = {
491
+ name: "toon",
492
+ variant: "toon",
493
+ colors: { light: light3, dark: dark3 },
494
+ typography: {
495
+ sans: '"Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif',
496
+ heading: '"Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif',
497
+ mono: 'ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace',
498
+ googleFonts: ["Inter"]
499
+ },
500
+ radius: {
501
+ base: "0.75rem",
502
+ scale: {
503
+ sm: 0.55,
504
+ md: 0.75,
505
+ lg: 1,
506
+ xl: 1.15,
507
+ "2xl": 1.35,
508
+ "3xl": 1.55,
509
+ "4xl": 1.75
510
+ }
511
+ },
512
+ elevation: {
513
+ // Hard lips live in the variant CSS — keep token shadows empty so utilities
514
+ // like `shadow-sm` do not reintroduce soft elevation.
515
+ shadows: {
516
+ xs: "none",
517
+ sm: "none",
518
+ md: "none",
519
+ lg: "none",
520
+ xl: "none"
521
+ },
522
+ borderStrength: 1,
523
+ level: "none"
524
+ },
525
+ density: {
526
+ spacing: "0.25rem",
527
+ scale: 1
528
+ },
529
+ motion: {
530
+ duration: 160,
531
+ easing: "cubic-bezier(0.2, 0.8, 0.2, 1)",
532
+ intensity: 1
533
+ }
534
+ };
535
+
422
536
  // src/presets/index.ts
423
537
  var presets = {
424
538
  flat,
425
- launch
539
+ toon,
540
+ frosted
426
541
  };
427
542
  function getPreset(name) {
428
543
  return presets[name];
@@ -646,6 +761,6 @@ function useColorScheme() {
646
761
  };
647
762
  }
648
763
 
649
- export { DEFAULT_RADIUS_SCALE, PalletContext, ThemeProvider, applyCssVars, buildGoogleFontsUrl, clearCssVars, colorTokensToVars, cssVarsToString, deepMerge, defaultPreset, deserializeTheme, flat, getPreset, launch, loadGoogleFonts, mergeAll, presets, resolveColors, resolveTheme, serializeTheme, structuralVars, themeToCss, themeToInlineStyle, useColorScheme, usePalletContext, usePreset, useTheme, useThemeControls };
764
+ export { DEFAULT_RADIUS_SCALE, PalletContext, ThemeProvider, applyCssVars, buildGoogleFontsUrl, clearCssVars, colorTokensToVars, cssVarsToString, deepMerge, defaultPreset, deserializeTheme, flat, frosted, getPreset, loadGoogleFonts, mergeAll, presets, resolveColors, resolveTheme, serializeTheme, structuralVars, themeToCss, themeToInlineStyle, toon, useColorScheme, usePalletContext, usePreset, useTheme, useThemeControls };
650
765
  //# sourceMappingURL=index.js.map
651
766
  //# sourceMappingURL=index.js.map