@fuf-stack/pixel-utils 1.5.0 → 2.0.0-next.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/README.md +56 -4
- package/dist/index.d.mts +40 -691
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +125 -10
- package/dist/index.mjs.map +1 -1
- package/dist/tokens.css +574 -0
- package/package.json +8 -8
package/dist/index.d.mts
CHANGED
|
@@ -53,7 +53,7 @@ type ClassNameArray = readonly ClassNameValue[];
|
|
|
53
53
|
/**
|
|
54
54
|
* Type the tailwind-merge configuration adheres to.
|
|
55
55
|
*/
|
|
56
|
-
interface Config
|
|
56
|
+
interface Config<ClassGroupIds extends string, ThemeGroupIds extends string> extends ConfigStaticPart, ConfigGroupsPart<ClassGroupIds, ThemeGroupIds> {}
|
|
57
57
|
/**
|
|
58
58
|
* The static part of the tailwind-merge configuration. When merging multiple configurations, the properties of this interface are always overridden.
|
|
59
59
|
*/
|
|
@@ -242,7 +242,7 @@ type AnyThemeGroupIds = string;
|
|
|
242
242
|
/**
|
|
243
243
|
* type of the tailwind-merge configuration that allows for any possible configuration.
|
|
244
244
|
*/
|
|
245
|
-
type AnyConfig = Config
|
|
245
|
+
type AnyConfig = Config<AnyClassGroupIds, AnyThemeGroupIds>;
|
|
246
246
|
type CreateConfigSubsequent = (config: AnyConfig) => AnyConfig;
|
|
247
247
|
declare const extendTailwindMerge: <AdditionalClassGroupIds extends string = never, AdditionalThemeGroupIds extends string = never>(configExtension: ConfigExtension<DefaultClassGroupIds | AdditionalClassGroupIds, DefaultThemeGroupIds | AdditionalThemeGroupIds> | CreateConfigSubsequent, ...createConfig: CreateConfigSubsequent[]) => (...classLists: ClassNameValue[]) => string;
|
|
248
248
|
type ProseClassGroupIds = 'prose-size' | 'prose-color';
|
|
@@ -383,678 +383,6 @@ type TV = {
|
|
|
383
383
|
config?: TVConfig): TVReturnType<V, S, B, EV, ES, E>;
|
|
384
384
|
};
|
|
385
385
|
type VariantProps<Component extends (...args: any) => any> = Omit<OmitUndefined<Parameters<Component>[0]>, "class" | "className">;
|
|
386
|
-
type ColorScale = Partial<{
|
|
387
|
-
50: string;
|
|
388
|
-
100: string;
|
|
389
|
-
200: string;
|
|
390
|
-
300: string;
|
|
391
|
-
400: string;
|
|
392
|
-
500: string;
|
|
393
|
-
600: string;
|
|
394
|
-
700: string;
|
|
395
|
-
800: string;
|
|
396
|
-
900: string;
|
|
397
|
-
foreground: string;
|
|
398
|
-
DEFAULT: string;
|
|
399
|
-
}> | string;
|
|
400
|
-
type BaseColors = {
|
|
401
|
-
background: ColorScale;
|
|
402
|
-
foreground: ColorScale;
|
|
403
|
-
divider: ColorScale;
|
|
404
|
-
overlay: ColorScale;
|
|
405
|
-
focus: ColorScale;
|
|
406
|
-
content1: ColorScale;
|
|
407
|
-
content2: ColorScale;
|
|
408
|
-
content3: ColorScale;
|
|
409
|
-
content4: ColorScale;
|
|
410
|
-
};
|
|
411
|
-
type ThemeColors = BaseColors & {
|
|
412
|
-
default: ColorScale;
|
|
413
|
-
primary: ColorScale;
|
|
414
|
-
secondary: ColorScale;
|
|
415
|
-
success: ColorScale;
|
|
416
|
-
warning: ColorScale;
|
|
417
|
-
danger: ColorScale;
|
|
418
|
-
};
|
|
419
|
-
type DefaultThemeType = "light" | "dark";
|
|
420
|
-
type BaseThemeUnit = {
|
|
421
|
-
small?: string;
|
|
422
|
-
medium?: string;
|
|
423
|
-
large?: string;
|
|
424
|
-
};
|
|
425
|
-
type FontThemeUnit = BaseThemeUnit & {
|
|
426
|
-
tiny?: string;
|
|
427
|
-
};
|
|
428
|
-
interface LayoutTheme {
|
|
429
|
-
/**
|
|
430
|
-
* The default font size applied across the components.
|
|
431
|
-
*
|
|
432
|
-
* @default
|
|
433
|
-
* {
|
|
434
|
-
* tiny: "0.75rem",
|
|
435
|
-
* small: "0.875rem",
|
|
436
|
-
* medium: "1rem",
|
|
437
|
-
* large: "1.125rem",
|
|
438
|
-
* DEFAULT: "1rem",
|
|
439
|
-
* }
|
|
440
|
-
*/
|
|
441
|
-
fontSize?: FontThemeUnit;
|
|
442
|
-
/**
|
|
443
|
-
* The default line height applied across the components.
|
|
444
|
-
*
|
|
445
|
-
* @default
|
|
446
|
-
* {
|
|
447
|
-
* tiny: "1rem",
|
|
448
|
-
* small: "1.25rem",
|
|
449
|
-
* medium: "1.5rem",
|
|
450
|
-
* large: "1.75rem",
|
|
451
|
-
* DEFAULT: "1.5rem",
|
|
452
|
-
* }
|
|
453
|
-
*/
|
|
454
|
-
lineHeight?: FontThemeUnit;
|
|
455
|
-
/**
|
|
456
|
-
* The default radius applied across the components.
|
|
457
|
-
* we recommend to use `rem` units.
|
|
458
|
-
*
|
|
459
|
-
* @default
|
|
460
|
-
* {
|
|
461
|
-
* small: "0.25rem",
|
|
462
|
-
* medium: "0.5rem",
|
|
463
|
-
* large: "0.75rem",
|
|
464
|
-
* }
|
|
465
|
-
*/
|
|
466
|
-
radius?: BaseThemeUnit;
|
|
467
|
-
/**
|
|
468
|
-
* A number between 0 and 1 that is applied as opacity-[value] when the component is disabled.
|
|
469
|
-
*
|
|
470
|
-
* format: ".[value]"
|
|
471
|
-
*
|
|
472
|
-
* @default .5
|
|
473
|
-
*/
|
|
474
|
-
disabledOpacity?: string | number;
|
|
475
|
-
/**
|
|
476
|
-
* A number between 0 and 1 that is applied as opacity-[value] when the component is hovered.
|
|
477
|
-
*
|
|
478
|
-
* format: ".[value]"
|
|
479
|
-
*
|
|
480
|
-
* @default .8
|
|
481
|
-
*/
|
|
482
|
-
hoverOpacity?: string | number;
|
|
483
|
-
/**
|
|
484
|
-
* The default height applied to the divider component.
|
|
485
|
-
* we recommend to use `px` units.
|
|
486
|
-
*
|
|
487
|
-
* @default 1px
|
|
488
|
-
*/
|
|
489
|
-
dividerWeight?: string;
|
|
490
|
-
/**
|
|
491
|
-
* The border width applied across the components.
|
|
492
|
-
* @default
|
|
493
|
-
* {
|
|
494
|
-
* small: "1px",
|
|
495
|
-
* medium: "2px",
|
|
496
|
-
* large: "3px",
|
|
497
|
-
* }
|
|
498
|
-
*
|
|
499
|
-
*/
|
|
500
|
-
borderWidth?: BaseThemeUnit;
|
|
501
|
-
/**
|
|
502
|
-
* The box shadow applied across the components.
|
|
503
|
-
*
|
|
504
|
-
* @default
|
|
505
|
-
* {
|
|
506
|
-
* small: 0px 0px 5px 0px rgb(0 0 0 / 0.01), 0px 2px 10px 0px rgb(0 0 0 / 0.06),
|
|
507
|
-
* medium: 0px 0px 15px 0px rgb(0 0 0 / 0.02), 0px 2px 30px 0px rgb(0 0 0 / 0.08),
|
|
508
|
-
* large: 0px 0px 30px 0px rgb(0 0 0 / 0.03), 0px 30px 60px 0px rgb(0 0 0 / 0.12),
|
|
509
|
-
* }
|
|
510
|
-
*/
|
|
511
|
-
boxShadow?: BaseThemeUnit;
|
|
512
|
-
}
|
|
513
|
-
type ConfigTheme = {
|
|
514
|
-
extend?: "light" | "dark";
|
|
515
|
-
layout?: LayoutTheme;
|
|
516
|
-
colors?: Partial<ThemeColors>;
|
|
517
|
-
};
|
|
518
|
-
type ConfigThemes = Record<string, ConfigTheme>;
|
|
519
|
-
/**
|
|
520
|
-
* The HeroUI config.
|
|
521
|
-
* @see https://heroui.com/docs/customization/customize-theme
|
|
522
|
-
*/
|
|
523
|
-
type HeroUIPluginConfig = {
|
|
524
|
-
/**
|
|
525
|
-
* The prefix for the css variables.
|
|
526
|
-
* @default "heroui"
|
|
527
|
-
*/
|
|
528
|
-
prefix?: string;
|
|
529
|
-
/**
|
|
530
|
-
* If true, the common heroui colors (e.g. "blue", "green", "purple") will not be extended on the theme.
|
|
531
|
-
* @default false
|
|
532
|
-
*/
|
|
533
|
-
addCommonColors?: boolean;
|
|
534
|
-
/**
|
|
535
|
-
* Common layout definitions. These definitions are applied to all themes.
|
|
536
|
-
*/
|
|
537
|
-
layout?: LayoutTheme;
|
|
538
|
-
/**
|
|
539
|
-
* The theme definitions.
|
|
540
|
-
*/
|
|
541
|
-
themes?: ConfigThemes;
|
|
542
|
-
/**
|
|
543
|
-
* The default theme to use.
|
|
544
|
-
* @default "light"
|
|
545
|
-
*/
|
|
546
|
-
defaultTheme?: DefaultThemeType;
|
|
547
|
-
/**
|
|
548
|
-
* The default theme to extend.
|
|
549
|
-
* @default "light"
|
|
550
|
-
*/
|
|
551
|
-
defaultExtendTheme?: DefaultThemeType;
|
|
552
|
-
};
|
|
553
|
-
declare const _default: {
|
|
554
|
-
inherit: string;
|
|
555
|
-
current: string;
|
|
556
|
-
transparent: string;
|
|
557
|
-
black: string;
|
|
558
|
-
white: string;
|
|
559
|
-
slate: {
|
|
560
|
-
'50': string;
|
|
561
|
-
'100': string;
|
|
562
|
-
'200': string;
|
|
563
|
-
'300': string;
|
|
564
|
-
'400': string;
|
|
565
|
-
'500': string;
|
|
566
|
-
'600': string;
|
|
567
|
-
'700': string;
|
|
568
|
-
'800': string;
|
|
569
|
-
'900': string;
|
|
570
|
-
'950': string;
|
|
571
|
-
};
|
|
572
|
-
gray: {
|
|
573
|
-
'50': string;
|
|
574
|
-
'100': string;
|
|
575
|
-
'200': string;
|
|
576
|
-
'300': string;
|
|
577
|
-
'400': string;
|
|
578
|
-
'500': string;
|
|
579
|
-
'600': string;
|
|
580
|
-
'700': string;
|
|
581
|
-
'800': string;
|
|
582
|
-
'900': string;
|
|
583
|
-
'950': string;
|
|
584
|
-
};
|
|
585
|
-
zinc: {
|
|
586
|
-
'50': string;
|
|
587
|
-
'100': string;
|
|
588
|
-
'200': string;
|
|
589
|
-
'300': string;
|
|
590
|
-
'400': string;
|
|
591
|
-
'500': string;
|
|
592
|
-
'600': string;
|
|
593
|
-
'700': string;
|
|
594
|
-
'800': string;
|
|
595
|
-
'900': string;
|
|
596
|
-
'950': string;
|
|
597
|
-
};
|
|
598
|
-
neutral: {
|
|
599
|
-
'50': string;
|
|
600
|
-
'100': string;
|
|
601
|
-
'200': string;
|
|
602
|
-
'300': string;
|
|
603
|
-
'400': string;
|
|
604
|
-
'500': string;
|
|
605
|
-
'600': string;
|
|
606
|
-
'700': string;
|
|
607
|
-
'800': string;
|
|
608
|
-
'900': string;
|
|
609
|
-
'950': string;
|
|
610
|
-
};
|
|
611
|
-
stone: {
|
|
612
|
-
'50': string;
|
|
613
|
-
'100': string;
|
|
614
|
-
'200': string;
|
|
615
|
-
'300': string;
|
|
616
|
-
'400': string;
|
|
617
|
-
'500': string;
|
|
618
|
-
'600': string;
|
|
619
|
-
'700': string;
|
|
620
|
-
'800': string;
|
|
621
|
-
'900': string;
|
|
622
|
-
'950': string;
|
|
623
|
-
};
|
|
624
|
-
mauve: {
|
|
625
|
-
'50': string;
|
|
626
|
-
'100': string;
|
|
627
|
-
'200': string;
|
|
628
|
-
'300': string;
|
|
629
|
-
'400': string;
|
|
630
|
-
'500': string;
|
|
631
|
-
'600': string;
|
|
632
|
-
'700': string;
|
|
633
|
-
'800': string;
|
|
634
|
-
'900': string;
|
|
635
|
-
'950': string;
|
|
636
|
-
};
|
|
637
|
-
olive: {
|
|
638
|
-
'50': string;
|
|
639
|
-
'100': string;
|
|
640
|
-
'200': string;
|
|
641
|
-
'300': string;
|
|
642
|
-
'400': string;
|
|
643
|
-
'500': string;
|
|
644
|
-
'600': string;
|
|
645
|
-
'700': string;
|
|
646
|
-
'800': string;
|
|
647
|
-
'900': string;
|
|
648
|
-
'950': string;
|
|
649
|
-
};
|
|
650
|
-
mist: {
|
|
651
|
-
'50': string;
|
|
652
|
-
'100': string;
|
|
653
|
-
'200': string;
|
|
654
|
-
'300': string;
|
|
655
|
-
'400': string;
|
|
656
|
-
'500': string;
|
|
657
|
-
'600': string;
|
|
658
|
-
'700': string;
|
|
659
|
-
'800': string;
|
|
660
|
-
'900': string;
|
|
661
|
-
'950': string;
|
|
662
|
-
};
|
|
663
|
-
taupe: {
|
|
664
|
-
'50': string;
|
|
665
|
-
'100': string;
|
|
666
|
-
'200': string;
|
|
667
|
-
'300': string;
|
|
668
|
-
'400': string;
|
|
669
|
-
'500': string;
|
|
670
|
-
'600': string;
|
|
671
|
-
'700': string;
|
|
672
|
-
'800': string;
|
|
673
|
-
'900': string;
|
|
674
|
-
'950': string;
|
|
675
|
-
};
|
|
676
|
-
red: {
|
|
677
|
-
'50': string;
|
|
678
|
-
'100': string;
|
|
679
|
-
'200': string;
|
|
680
|
-
'300': string;
|
|
681
|
-
'400': string;
|
|
682
|
-
'500': string;
|
|
683
|
-
'600': string;
|
|
684
|
-
'700': string;
|
|
685
|
-
'800': string;
|
|
686
|
-
'900': string;
|
|
687
|
-
'950': string;
|
|
688
|
-
};
|
|
689
|
-
orange: {
|
|
690
|
-
'50': string;
|
|
691
|
-
'100': string;
|
|
692
|
-
'200': string;
|
|
693
|
-
'300': string;
|
|
694
|
-
'400': string;
|
|
695
|
-
'500': string;
|
|
696
|
-
'600': string;
|
|
697
|
-
'700': string;
|
|
698
|
-
'800': string;
|
|
699
|
-
'900': string;
|
|
700
|
-
'950': string;
|
|
701
|
-
};
|
|
702
|
-
amber: {
|
|
703
|
-
'50': string;
|
|
704
|
-
'100': string;
|
|
705
|
-
'200': string;
|
|
706
|
-
'300': string;
|
|
707
|
-
'400': string;
|
|
708
|
-
'500': string;
|
|
709
|
-
'600': string;
|
|
710
|
-
'700': string;
|
|
711
|
-
'800': string;
|
|
712
|
-
'900': string;
|
|
713
|
-
'950': string;
|
|
714
|
-
};
|
|
715
|
-
yellow: {
|
|
716
|
-
'50': string;
|
|
717
|
-
'100': string;
|
|
718
|
-
'200': string;
|
|
719
|
-
'300': string;
|
|
720
|
-
'400': string;
|
|
721
|
-
'500': string;
|
|
722
|
-
'600': string;
|
|
723
|
-
'700': string;
|
|
724
|
-
'800': string;
|
|
725
|
-
'900': string;
|
|
726
|
-
'950': string;
|
|
727
|
-
};
|
|
728
|
-
lime: {
|
|
729
|
-
'50': string;
|
|
730
|
-
'100': string;
|
|
731
|
-
'200': string;
|
|
732
|
-
'300': string;
|
|
733
|
-
'400': string;
|
|
734
|
-
'500': string;
|
|
735
|
-
'600': string;
|
|
736
|
-
'700': string;
|
|
737
|
-
'800': string;
|
|
738
|
-
'900': string;
|
|
739
|
-
'950': string;
|
|
740
|
-
};
|
|
741
|
-
green: {
|
|
742
|
-
'50': string;
|
|
743
|
-
'100': string;
|
|
744
|
-
'200': string;
|
|
745
|
-
'300': string;
|
|
746
|
-
'400': string;
|
|
747
|
-
'500': string;
|
|
748
|
-
'600': string;
|
|
749
|
-
'700': string;
|
|
750
|
-
'800': string;
|
|
751
|
-
'900': string;
|
|
752
|
-
'950': string;
|
|
753
|
-
};
|
|
754
|
-
emerald: {
|
|
755
|
-
'50': string;
|
|
756
|
-
'100': string;
|
|
757
|
-
'200': string;
|
|
758
|
-
'300': string;
|
|
759
|
-
'400': string;
|
|
760
|
-
'500': string;
|
|
761
|
-
'600': string;
|
|
762
|
-
'700': string;
|
|
763
|
-
'800': string;
|
|
764
|
-
'900': string;
|
|
765
|
-
'950': string;
|
|
766
|
-
};
|
|
767
|
-
teal: {
|
|
768
|
-
'50': string;
|
|
769
|
-
'100': string;
|
|
770
|
-
'200': string;
|
|
771
|
-
'300': string;
|
|
772
|
-
'400': string;
|
|
773
|
-
'500': string;
|
|
774
|
-
'600': string;
|
|
775
|
-
'700': string;
|
|
776
|
-
'800': string;
|
|
777
|
-
'900': string;
|
|
778
|
-
'950': string;
|
|
779
|
-
};
|
|
780
|
-
cyan: {
|
|
781
|
-
'50': string;
|
|
782
|
-
'100': string;
|
|
783
|
-
'200': string;
|
|
784
|
-
'300': string;
|
|
785
|
-
'400': string;
|
|
786
|
-
'500': string;
|
|
787
|
-
'600': string;
|
|
788
|
-
'700': string;
|
|
789
|
-
'800': string;
|
|
790
|
-
'900': string;
|
|
791
|
-
'950': string;
|
|
792
|
-
};
|
|
793
|
-
sky: {
|
|
794
|
-
'50': string;
|
|
795
|
-
'100': string;
|
|
796
|
-
'200': string;
|
|
797
|
-
'300': string;
|
|
798
|
-
'400': string;
|
|
799
|
-
'500': string;
|
|
800
|
-
'600': string;
|
|
801
|
-
'700': string;
|
|
802
|
-
'800': string;
|
|
803
|
-
'900': string;
|
|
804
|
-
'950': string;
|
|
805
|
-
};
|
|
806
|
-
blue: {
|
|
807
|
-
'50': string;
|
|
808
|
-
'100': string;
|
|
809
|
-
'200': string;
|
|
810
|
-
'300': string;
|
|
811
|
-
'400': string;
|
|
812
|
-
'500': string;
|
|
813
|
-
'600': string;
|
|
814
|
-
'700': string;
|
|
815
|
-
'800': string;
|
|
816
|
-
'900': string;
|
|
817
|
-
'950': string;
|
|
818
|
-
};
|
|
819
|
-
indigo: {
|
|
820
|
-
'50': string;
|
|
821
|
-
'100': string;
|
|
822
|
-
'200': string;
|
|
823
|
-
'300': string;
|
|
824
|
-
'400': string;
|
|
825
|
-
'500': string;
|
|
826
|
-
'600': string;
|
|
827
|
-
'700': string;
|
|
828
|
-
'800': string;
|
|
829
|
-
'900': string;
|
|
830
|
-
'950': string;
|
|
831
|
-
};
|
|
832
|
-
violet: {
|
|
833
|
-
'50': string;
|
|
834
|
-
'100': string;
|
|
835
|
-
'200': string;
|
|
836
|
-
'300': string;
|
|
837
|
-
'400': string;
|
|
838
|
-
'500': string;
|
|
839
|
-
'600': string;
|
|
840
|
-
'700': string;
|
|
841
|
-
'800': string;
|
|
842
|
-
'900': string;
|
|
843
|
-
'950': string;
|
|
844
|
-
};
|
|
845
|
-
purple: {
|
|
846
|
-
'50': string;
|
|
847
|
-
'100': string;
|
|
848
|
-
'200': string;
|
|
849
|
-
'300': string;
|
|
850
|
-
'400': string;
|
|
851
|
-
'500': string;
|
|
852
|
-
'600': string;
|
|
853
|
-
'700': string;
|
|
854
|
-
'800': string;
|
|
855
|
-
'900': string;
|
|
856
|
-
'950': string;
|
|
857
|
-
};
|
|
858
|
-
fuchsia: {
|
|
859
|
-
'50': string;
|
|
860
|
-
'100': string;
|
|
861
|
-
'200': string;
|
|
862
|
-
'300': string;
|
|
863
|
-
'400': string;
|
|
864
|
-
'500': string;
|
|
865
|
-
'600': string;
|
|
866
|
-
'700': string;
|
|
867
|
-
'800': string;
|
|
868
|
-
'900': string;
|
|
869
|
-
'950': string;
|
|
870
|
-
};
|
|
871
|
-
pink: {
|
|
872
|
-
'50': string;
|
|
873
|
-
'100': string;
|
|
874
|
-
'200': string;
|
|
875
|
-
'300': string;
|
|
876
|
-
'400': string;
|
|
877
|
-
'500': string;
|
|
878
|
-
'600': string;
|
|
879
|
-
'700': string;
|
|
880
|
-
'800': string;
|
|
881
|
-
'900': string;
|
|
882
|
-
'950': string;
|
|
883
|
-
};
|
|
884
|
-
rose: {
|
|
885
|
-
'50': string;
|
|
886
|
-
'100': string;
|
|
887
|
-
'200': string;
|
|
888
|
-
'300': string;
|
|
889
|
-
'400': string;
|
|
890
|
-
'500': string;
|
|
891
|
-
'600': string;
|
|
892
|
-
'700': string;
|
|
893
|
-
'800': string;
|
|
894
|
-
'900': string;
|
|
895
|
-
'950': string;
|
|
896
|
-
};
|
|
897
|
-
};
|
|
898
|
-
type NamedUtilityValue = {
|
|
899
|
-
kind: 'named';
|
|
900
|
-
/**
|
|
901
|
-
* ```
|
|
902
|
-
* bg-red-500
|
|
903
|
-
* ^^^^^^^
|
|
904
|
-
*
|
|
905
|
-
* w-1/2
|
|
906
|
-
* ^
|
|
907
|
-
* ```
|
|
908
|
-
*/
|
|
909
|
-
value: string;
|
|
910
|
-
/**
|
|
911
|
-
* ```
|
|
912
|
-
* w-1/2
|
|
913
|
-
* ^^^
|
|
914
|
-
* ```
|
|
915
|
-
*/
|
|
916
|
-
fraction: string | null;
|
|
917
|
-
};
|
|
918
|
-
type PluginUtils = {
|
|
919
|
-
theme: (keypath: string, defaultValue?: any) => any;
|
|
920
|
-
colors: typeof _default;
|
|
921
|
-
};
|
|
922
|
-
/**
|
|
923
|
-
* The source code for one or more nodes in the AST
|
|
924
|
-
*
|
|
925
|
-
* This generally corresponds to a stylesheet
|
|
926
|
-
*/
|
|
927
|
-
interface Source {
|
|
928
|
-
/**
|
|
929
|
-
* The path to the file that contains the referenced source code
|
|
930
|
-
*
|
|
931
|
-
* If this references the *output* source code, this is `null`.
|
|
932
|
-
*/
|
|
933
|
-
file: string | null;
|
|
934
|
-
/**
|
|
935
|
-
* The referenced source code
|
|
936
|
-
*/
|
|
937
|
-
code: string;
|
|
938
|
-
}
|
|
939
|
-
/**
|
|
940
|
-
* The file and offsets within it that this node covers
|
|
941
|
-
*
|
|
942
|
-
* This can represent either:
|
|
943
|
-
* - A location in the original CSS which caused this node to be created
|
|
944
|
-
* - A location in the output CSS where this node resides
|
|
945
|
-
*/
|
|
946
|
-
type SourceLocation = [source: Source, start: number, end: number];
|
|
947
|
-
type Config = UserConfig;
|
|
948
|
-
type PluginFn = (api: PluginAPI) => void;
|
|
949
|
-
type PluginWithConfig = {
|
|
950
|
-
handler: PluginFn;
|
|
951
|
-
config?: UserConfig;
|
|
952
|
-
/** @internal */
|
|
953
|
-
reference?: boolean;
|
|
954
|
-
src?: SourceLocation | undefined;
|
|
955
|
-
};
|
|
956
|
-
type PluginWithOptions<T> = {
|
|
957
|
-
(options?: T): PluginWithConfig;
|
|
958
|
-
__isOptionsFunction: true;
|
|
959
|
-
};
|
|
960
|
-
type Plugin = PluginFn | PluginWithConfig | PluginWithOptions<any>;
|
|
961
|
-
type PluginAPI = {
|
|
962
|
-
addBase(base: CssInJs): void;
|
|
963
|
-
addVariant(name: string, variant: string | string[] | CssInJs): void;
|
|
964
|
-
matchVariant<T = string>(name: string, cb: (value: T | string, extra: {
|
|
965
|
-
modifier: string | null;
|
|
966
|
-
}) => string | string[], options?: {
|
|
967
|
-
values?: Record<string, T>;
|
|
968
|
-
sort?(a: {
|
|
969
|
-
value: T | string;
|
|
970
|
-
modifier: string | null;
|
|
971
|
-
}, b: {
|
|
972
|
-
value: T | string;
|
|
973
|
-
modifier: string | null;
|
|
974
|
-
}): number;
|
|
975
|
-
}): void;
|
|
976
|
-
addUtilities(utilities: Record<string, CssInJs | CssInJs[]> | Record<string, CssInJs | CssInJs[]>[], options?: {}): void;
|
|
977
|
-
matchUtilities(utilities: Record<string, (value: string, extra: {
|
|
978
|
-
modifier: string | null;
|
|
979
|
-
}) => CssInJs | CssInJs[]>, options?: Partial<{
|
|
980
|
-
type: string | string[];
|
|
981
|
-
supportsNegativeValues: boolean;
|
|
982
|
-
values: Record<string, string> & {
|
|
983
|
-
__BARE_VALUE__?: (value: NamedUtilityValue) => string | undefined;
|
|
984
|
-
};
|
|
985
|
-
modifiers: 'any' | Record<string, string>;
|
|
986
|
-
}>): void;
|
|
987
|
-
addComponents(utilities: Record<string, CssInJs> | Record<string, CssInJs>[], options?: {}): void;
|
|
988
|
-
matchComponents(utilities: Record<string, (value: string, extra: {
|
|
989
|
-
modifier: string | null;
|
|
990
|
-
}) => CssInJs>, options?: Partial<{
|
|
991
|
-
type: string | string[];
|
|
992
|
-
supportsNegativeValues: boolean;
|
|
993
|
-
values: Record<string, string> & {
|
|
994
|
-
__BARE_VALUE__?: (value: NamedUtilityValue) => string | undefined;
|
|
995
|
-
};
|
|
996
|
-
modifiers: 'any' | Record<string, string>;
|
|
997
|
-
}>): void;
|
|
998
|
-
theme(path: string, defaultValue?: any): any;
|
|
999
|
-
config(path?: string, defaultValue?: any): any;
|
|
1000
|
-
prefix(className: string): string;
|
|
1001
|
-
};
|
|
1002
|
-
type CssInJs = {
|
|
1003
|
-
[key: string]: string | string[] | CssInJs | CssInJs[];
|
|
1004
|
-
};
|
|
1005
|
-
type ResolvableTo<T> = T | ((utils: PluginUtils) => T);
|
|
1006
|
-
type ThemeValue = ResolvableTo<Record<string, unknown>> | null | undefined;
|
|
1007
|
-
type ThemeConfig = Record<string, ThemeValue> & {
|
|
1008
|
-
extend?: Record<string, ThemeValue>;
|
|
1009
|
-
};
|
|
1010
|
-
type ContentFile = string | {
|
|
1011
|
-
raw: string;
|
|
1012
|
-
extension?: string;
|
|
1013
|
-
};
|
|
1014
|
-
type DarkModeStrategy = false | 'media' | 'class' | ['class', string] | 'selector' | ['selector', string] | ['variant', string | string[]];
|
|
1015
|
-
interface UserConfig {
|
|
1016
|
-
presets?: UserConfig[];
|
|
1017
|
-
theme?: ThemeConfig;
|
|
1018
|
-
plugins?: Plugin[];
|
|
1019
|
-
}
|
|
1020
|
-
interface UserConfig {
|
|
1021
|
-
content?: ContentFile[] | {
|
|
1022
|
-
relative?: boolean;
|
|
1023
|
-
files: ContentFile[];
|
|
1024
|
-
};
|
|
1025
|
-
}
|
|
1026
|
-
interface UserConfig {
|
|
1027
|
-
darkMode?: DarkModeStrategy;
|
|
1028
|
-
}
|
|
1029
|
-
interface UserConfig {
|
|
1030
|
-
prefix?: string;
|
|
1031
|
-
}
|
|
1032
|
-
interface UserConfig {
|
|
1033
|
-
blocklist?: string[];
|
|
1034
|
-
}
|
|
1035
|
-
interface UserConfig {
|
|
1036
|
-
important?: boolean | string;
|
|
1037
|
-
}
|
|
1038
|
-
interface UserConfig {
|
|
1039
|
-
future?: 'all' | Record<string, boolean>;
|
|
1040
|
-
}
|
|
1041
|
-
interface UserConfig {
|
|
1042
|
-
experimental?: 'all' | Record<string, boolean>;
|
|
1043
|
-
}
|
|
1044
|
-
declare function createPlugin(handler: PluginFn, config?: Partial<Config>): PluginWithConfig;
|
|
1045
|
-
declare namespace createPlugin {
|
|
1046
|
-
var withOptions: <T>(pluginFunction: (options?: T) => PluginFn, configFunction?: (options?: T) => Partial<Config>) => PluginWithOptions<T>;
|
|
1047
|
-
}
|
|
1048
|
-
/**
|
|
1049
|
-
* Based on tw-colors by L-Blondy
|
|
1050
|
-
* @see https://github.com/L-Blondy/tw-colors
|
|
1051
|
-
*/
|
|
1052
|
-
declare const heroui: (config?: HeroUIPluginConfig) => ReturnType<typeof createPlugin>;
|
|
1053
|
-
/**
|
|
1054
|
-
* Represents a class value which can be either a string or an array of strings
|
|
1055
|
-
* Used for handling both single class names and multiple class names
|
|
1056
|
-
*/
|
|
1057
|
-
export type ClassValue = string | string[];
|
|
1058
386
|
/**
|
|
1059
387
|
* Props accepted by tailwind-variants slot functions
|
|
1060
388
|
* Combines a dynamic record of string/number values with the ClassProp from tailwind-variants
|
|
@@ -1073,21 +401,6 @@ type TVFunction = (slotProps?: TVSlotProps) => string;
|
|
|
1073
401
|
* Used to type the variants parameter in variantsToClassNames
|
|
1074
402
|
*/
|
|
1075
403
|
type TVRecord = Record<string, TVFunction>;
|
|
1076
|
-
/**
|
|
1077
|
-
* Re-export of tailwind-variants tv function
|
|
1078
|
-
* Used to create variant definitions with slots and variants
|
|
1079
|
-
*/
|
|
1080
|
-
export declare const tv: TV;
|
|
1081
|
-
/**
|
|
1082
|
-
* Extracts variant props from a tailwind-variants component
|
|
1083
|
-
* Used for typing component props that use variants
|
|
1084
|
-
*/
|
|
1085
|
-
export type TVProps<Component extends (...args: any) => any> = VariantProps<Component>;
|
|
1086
|
-
/**
|
|
1087
|
-
* Extracts className type from a tailwind-variants component
|
|
1088
|
-
* Can be either a partial record of slot names to class values, or a single class value
|
|
1089
|
-
*/
|
|
1090
|
-
export type TVClassName<Component extends (...args: any) => any> = Partial<Record<keyof ReturnType<Component>, ClassValue>> | ClassValue;
|
|
1091
404
|
/**
|
|
1092
405
|
* Converts tailwind-variants slots instance to actual classnames object
|
|
1093
406
|
*
|
|
@@ -1113,6 +426,42 @@ export type TVClassName<Component extends (...args: any) => any> = Partial<Recor
|
|
|
1113
426
|
* // Result: { base: 'bg-white', content: 'p-4 text-gray-700' }
|
|
1114
427
|
* ```
|
|
1115
428
|
*/
|
|
1116
|
-
|
|
1117
|
-
|
|
429
|
+
declare const variantsToClassNames: <T extends TVRecord>(variants: T, className?: ClassValue | Record<string, ClassValue | undefined>, baseSlot?: keyof T) => Record<keyof T, string>;
|
|
430
|
+
/**
|
|
431
|
+
* Represents a class value which can be either a string or an array of strings
|
|
432
|
+
* Used for handling both single class names and multiple class names
|
|
433
|
+
*/
|
|
434
|
+
export type ClassValue = string | string[];
|
|
435
|
+
/**
|
|
436
|
+
* Tailwind Variants recipe factory with isolated semantic class merging
|
|
437
|
+
* Used to create variant definitions with slots and variants
|
|
438
|
+
*/
|
|
439
|
+
export declare const tv: TV;
|
|
440
|
+
/**
|
|
441
|
+
* Extracts variant props from a tailwind-variants component
|
|
442
|
+
* Used for typing component props that use variants
|
|
443
|
+
*/
|
|
444
|
+
export type TVProps<Component extends (...args: any) => any> = VariantProps<Component>;
|
|
445
|
+
/**
|
|
446
|
+
* Extracts className type from a tailwind-variants component
|
|
447
|
+
* Can be either a partial record of slot names to class values, or a single class value
|
|
448
|
+
*/
|
|
449
|
+
export type TVClassName<Component extends (...args: any) => any> = Partial<Record<keyof ReturnType<Component>, ClassValue>> | ClassValue;
|
|
450
|
+
type Recipe = (...args: any[]) => any;
|
|
451
|
+
export type StylingConfig = ConfigExtension<string, string>;
|
|
452
|
+
export interface Styling {
|
|
453
|
+
readonly cn: (...classes: ArgumentArray) => string;
|
|
454
|
+
/** Resolve a module-level pixel-utils recipe with this instance's merge rules. */
|
|
455
|
+
readonly resolve: <T extends Recipe>(recipe: T, ...props: Parameters<T>) => ReturnType<T>;
|
|
456
|
+
readonly tv: TV;
|
|
457
|
+
readonly variantsToClassNames: typeof variantsToClassNames;
|
|
458
|
+
}
|
|
459
|
+
/**
|
|
460
|
+
* Creates isolated class helpers. No React or process-global configuration.
|
|
461
|
+
* Recipe classes are concatenated by the lite engine, then merged once, after
|
|
462
|
+
* defaults, variants, compounds, and caller overrides have all been collected.
|
|
463
|
+
*/
|
|
464
|
+
export declare const createStyling: (config?: StylingConfig) => Styling;
|
|
465
|
+
export declare const defaultStyling: Styling;
|
|
466
|
+
export { variantsToClassNames };
|
|
1118
467
|
//# sourceMappingURL=index.d.mts.map
|