@tachui/responsive 0.8.0-alpha

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.
Files changed (31) hide show
  1. package/LICENSE +363 -0
  2. package/README.md +507 -0
  3. package/dist/index.d.ts +11 -0
  4. package/dist/index.d.ts.map +1 -0
  5. package/dist/index.js +2538 -0
  6. package/dist/index.js.map +1 -0
  7. package/dist/modifiers/index.d.ts +5 -0
  8. package/dist/modifiers/index.d.ts.map +1 -0
  9. package/dist/modifiers/responsive/advanced-utilities.d.ts +121 -0
  10. package/dist/modifiers/responsive/advanced-utilities.d.ts.map +1 -0
  11. package/dist/modifiers/responsive/breakpoints.d.ts +81 -0
  12. package/dist/modifiers/responsive/breakpoints.d.ts.map +1 -0
  13. package/dist/modifiers/responsive/css-generator.d.ts +100 -0
  14. package/dist/modifiers/responsive/css-generator.d.ts.map +1 -0
  15. package/dist/modifiers/responsive/dev-tools.d.ts +107 -0
  16. package/dist/modifiers/responsive/dev-tools.d.ts.map +1 -0
  17. package/dist/modifiers/responsive/index.d.ts +29 -0
  18. package/dist/modifiers/responsive/index.d.ts.map +1 -0
  19. package/dist/modifiers/responsive/layout-patterns.d.ts +230 -0
  20. package/dist/modifiers/responsive/layout-patterns.d.ts.map +1 -0
  21. package/dist/modifiers/responsive/performance.d.ts +130 -0
  22. package/dist/modifiers/responsive/performance.d.ts.map +1 -0
  23. package/dist/modifiers/responsive/responsive-builder.d.ts +133 -0
  24. package/dist/modifiers/responsive/responsive-builder.d.ts.map +1 -0
  25. package/dist/modifiers/responsive/responsive-modifier.d.ts +123 -0
  26. package/dist/modifiers/responsive/responsive-modifier.d.ts.map +1 -0
  27. package/dist/modifiers/responsive/types.d.ts +183 -0
  28. package/dist/modifiers/responsive/types.d.ts.map +1 -0
  29. package/dist/modifiers/responsive/utilities.d.ts +149 -0
  30. package/dist/modifiers/responsive/utilities.d.ts.map +1 -0
  31. package/package.json +73 -0
@@ -0,0 +1,121 @@
1
+ /**
2
+ * Advanced Responsive Utilities
3
+ *
4
+ * Provides programmatic access to responsive behavior, advanced hooks,
5
+ * and complex responsive logic utilities for sophisticated applications.
6
+ */
7
+ import { Signal } from '@tachui/core';
8
+ import { ResponsiveValue, BreakpointKey, BreakpointContext } from './types';
9
+ /**
10
+ * Advanced breakpoint utilities with enhanced functionality
11
+ */
12
+ export declare class AdvancedBreakpointUtils {
13
+ /**
14
+ * Create a responsive value resolver with custom logic
15
+ */
16
+ static createResponsiveResolver<T>(getValue: (breakpoint: BreakpointKey, context: BreakpointContext) => T, dependencies?: Signal<any>[]): Signal<T>;
17
+ /**
18
+ * Create responsive value that interpolates between breakpoints
19
+ */
20
+ static createInterpolatedValue(values: Partial<Record<BreakpointKey, number>>, options?: {
21
+ smoothing?: 'linear' | 'ease' | 'ease-in' | 'ease-out';
22
+ clamp?: boolean;
23
+ }): Signal<number>;
24
+ /**
25
+ * Create conditional responsive behavior
26
+ */
27
+ static createConditionalResponsive<T>(condition: (context: BreakpointContext) => boolean, trueValue: ResponsiveValue<T>, falseValue: ResponsiveValue<T>): Signal<T>;
28
+ /**
29
+ * Resolve responsive value at specific breakpoint
30
+ */
31
+ private static resolveResponsiveValue;
32
+ }
33
+ /**
34
+ * Advanced responsive hooks for complex scenarios
35
+ */
36
+ export declare class ResponsiveHooks {
37
+ /**
38
+ * Hook for responsive arrays (e.g., responsive grid columns data)
39
+ */
40
+ static useResponsiveArray<T>(arrays: Partial<Record<BreakpointKey, T[]>>): Signal<T[]>;
41
+ /**
42
+ * Hook for responsive object selection
43
+ */
44
+ static useResponsiveObject<T extends Record<string, any>>(objects: Partial<Record<BreakpointKey, T>>): Signal<T | null>;
45
+ /**
46
+ * Hook for responsive function selection and execution
47
+ */
48
+ static useResponsiveFunction<TArgs extends any[], TReturn>(functions: Partial<Record<BreakpointKey, (...args: TArgs) => TReturn>>): Signal<((...args: TArgs) => TReturn) | null>;
49
+ /**
50
+ * Hook for responsive state management
51
+ */
52
+ static useResponsiveState<T>(initialValues: Partial<Record<BreakpointKey, T>>): [
53
+ Signal<T | undefined>,
54
+ (value: T | Partial<Record<BreakpointKey, T>>) => void
55
+ ];
56
+ /**
57
+ * Hook for responsive computations with memoization
58
+ */
59
+ static useResponsiveComputation<T>(computation: (context: BreakpointContext) => T, dependencies?: Signal<any>[]): Signal<T>;
60
+ /**
61
+ * Hook for responsive side effects
62
+ */
63
+ static useResponsiveEffect(effect: (context: BreakpointContext, prevContext?: BreakpointContext) => void | (() => void), dependencies?: Signal<any>[]): void;
64
+ }
65
+ /**
66
+ * Responsive breakpoint targeting utilities
67
+ */
68
+ export declare class ResponsiveTargeting {
69
+ /**
70
+ * Execute callback only on specific breakpoints
71
+ */
72
+ static onBreakpoints(breakpoints: BreakpointKey[], callback: (context: BreakpointContext) => void | (() => void)): () => void;
73
+ /**
74
+ * Execute callback when breakpoint changes
75
+ */
76
+ static onBreakpointChange(callback: (newBreakpoint: BreakpointKey, oldBreakpoint: BreakpointKey, context: BreakpointContext) => void): () => void;
77
+ /**
78
+ * Execute callback when entering/leaving specific breakpoint ranges
79
+ */
80
+ static onBreakpointRange(minBreakpoint: BreakpointKey, maxBreakpoint: BreakpointKey, callbacks: {
81
+ onEnter?: (context: BreakpointContext) => void | (() => void);
82
+ onLeave?: (context: BreakpointContext) => void;
83
+ onWithin?: (context: BreakpointContext) => void | (() => void);
84
+ }): () => void;
85
+ }
86
+ /**
87
+ * Responsive data management utilities
88
+ */
89
+ export declare class ResponsiveDataUtils {
90
+ /**
91
+ * Create responsive pagination
92
+ */
93
+ static createResponsivePagination<T>(data: T[], itemsPerPage: ResponsiveValue<number>): {
94
+ currentPage: Signal<number>;
95
+ totalPages: Signal<number>;
96
+ currentItems: Signal<T[]>;
97
+ setPage: (page: number) => void;
98
+ nextPage: () => void;
99
+ prevPage: () => void;
100
+ hasNext: Signal<boolean>;
101
+ hasPrev: Signal<boolean>;
102
+ };
103
+ /**
104
+ * Create responsive filtering
105
+ */
106
+ static createResponsiveFilter<T>(data: T[], filters: Partial<Record<BreakpointKey, (item: T) => boolean>>): Signal<T[]>;
107
+ /**
108
+ * Create responsive sorting
109
+ */
110
+ static createResponsiveSort<T>(data: T[], sorters: Partial<Record<BreakpointKey, (a: T, b: T) => number>>): Signal<T[]>;
111
+ }
112
+ /**
113
+ * Export all advanced utilities
114
+ */
115
+ export declare const ResponsiveAdvanced: {
116
+ Breakpoints: typeof AdvancedBreakpointUtils;
117
+ Hooks: typeof ResponsiveHooks;
118
+ Targeting: typeof ResponsiveTargeting;
119
+ Data: typeof ResponsiveDataUtils;
120
+ };
121
+ //# sourceMappingURL=advanced-utilities.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"advanced-utilities.d.ts","sourceRoot":"","sources":["../../../src/modifiers/responsive/advanced-utilities.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAKL,MAAM,EACP,MAAM,cAAc,CAAA;AACrB,OAAO,EACL,eAAe,EACf,aAAa,EACb,iBAAiB,EAElB,MAAM,SAAS,CAAA;AAQhB;;GAEG;AACH,qBAAa,uBAAuB;IAClC;;OAEG;IACH,MAAM,CAAC,wBAAwB,CAAC,CAAC,EAC/B,QAAQ,EAAE,CAAC,UAAU,EAAE,aAAa,EAAE,OAAO,EAAE,iBAAiB,KAAK,CAAC,EACtE,YAAY,GAAE,MAAM,CAAC,GAAG,CAAC,EAAO,GAC/B,MAAM,CAAC,CAAC,CAAC;IAaZ;;OAEG;IACH,MAAM,CAAC,uBAAuB,CAC5B,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC,EAC9C,OAAO,GAAE;QACP,SAAS,CAAC,EAAE,QAAQ,GAAG,MAAM,GAAG,SAAS,GAAG,UAAU,CAAA;QACtD,KAAK,CAAC,EAAE,OAAO,CAAA;KACX,GACL,MAAM,CAAC,MAAM,CAAC;IA6EjB;;OAEG;IACH,MAAM,CAAC,2BAA2B,CAAC,CAAC,EAClC,SAAS,EA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,CAAC,EACjC,IAAI,EAAE,CAAC,EAAE,EACT,YAAY,EAAE,eAAe,CAAC,MAAM,CAAC,GACpC;QACD,WAAW,EAAE,MAAM,CAAC,MAAM,CAAC,CAAA;QAC3B,UAAU,EAAE,MAAM,CAAC,MAAM,CAAC,CAAA;QAC1B,YAAY,EAAE,MAAM,CAAC,CAAC,EAAE,CAAC,CAAA;QACzB,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;QAC/B,QAAQ,EAAE,MAAM,IAAI,CAAA;QACpB,QAAQ,EAAE,MAAM,IAAI,CAAA;QACpB,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC,CAAA;QACxB,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC,CAAA;KACzB;IAgED;;OAEG;IACH,MAAM,CAAC,sBAAsB,CAAC,CAAC,EAC7B,IAAI,EAAE,CAAC,EAAE,EACT,OAAO,EAAE,OAAO,CAAC,MAAM,CAAC,aAAa,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,OAAO,CAAC,CAAC,GAC5D,MAAM,CAAC,CAAC,EAAE,CAAC;IAed;;OAEG;IACH,MAAM,CAAC,oBAAoB,CAAC,CAAC,EAC3B,IAAI,EAAE,CAAC,EAAE,EACT,OAAO,EAAE,OAAO,CAAC,MAAM,CAAC,aAAa,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,MAAM,CAAC,CAAC,GAC9D,MAAM,CAAC,CAAC,EAAE,CAAC;CAcf;AAED;;GAEG;AACH,eAAO,MAAM,kBAAkB;;;;;CAK9B,CAAA"}
@@ -0,0 +1,81 @@
1
+ /**
2
+ * Breakpoint Configuration System
3
+ *
4
+ * Manages responsive breakpoint configuration, validation, and utilities.
5
+ * Supports both default Tailwind-inspired breakpoints and custom configurations.
6
+ */
7
+ import { BreakpointKey, BreakpointConfig, BreakpointContext } from './types';
8
+ import { Signal } from '@tachui/core';
9
+ /**
10
+ * Configure global breakpoints for the application
11
+ */
12
+ export declare function configureBreakpoints(config: Partial<BreakpointConfig>): void;
13
+ /**
14
+ * Get the current breakpoint configuration
15
+ */
16
+ export declare function getCurrentBreakpointConfig(): Required<BreakpointConfig>;
17
+ /**
18
+ * Get the current active breakpoint
19
+ */
20
+ export declare function getCurrentBreakpoint(): Signal<BreakpointKey>;
21
+ /**
22
+ * Get current viewport dimensions
23
+ */
24
+ export declare function getViewportDimensions(): Signal<{
25
+ width: number;
26
+ height: number;
27
+ }>;
28
+ /**
29
+ * Initialize the responsive system (should be called once on app startup)
30
+ */
31
+ export declare function initializeResponsiveSystem(): void;
32
+ /**
33
+ * Create a breakpoint context for utilities
34
+ */
35
+ export declare function createBreakpointContext(): BreakpointContext;
36
+ /**
37
+ * Convert breakpoint value to numeric pixels for comparison
38
+ */
39
+ export declare function breakpointToPixels(breakpoint: BreakpointKey): number;
40
+ /**
41
+ * Get breakpoint index for comparison (base = 0, sm = 1, etc.)
42
+ */
43
+ export declare function getBreakpointIndex(breakpoint: BreakpointKey): number;
44
+ /**
45
+ * Check if breakpoint A is above breakpoint B
46
+ */
47
+ export declare function isBreakpointAbove(a: BreakpointKey, b: BreakpointKey): boolean;
48
+ /**
49
+ * Check if breakpoint A is below breakpoint B
50
+ */
51
+ export declare function isBreakpointBelow(a: BreakpointKey, b: BreakpointKey): boolean;
52
+ /**
53
+ * Generate CSS media query string for a breakpoint
54
+ */
55
+ export declare function generateMediaQuery(breakpoint: BreakpointKey): string;
56
+ /**
57
+ * Generate CSS media query for a range of breakpoints
58
+ */
59
+ export declare function generateRangeMediaQuery(min: BreakpointKey, max?: BreakpointKey): string;
60
+ /**
61
+ * Get all breakpoints sorted by size
62
+ */
63
+ export declare function getSortedBreakpoints(): BreakpointKey[];
64
+ /**
65
+ * Get breakpoints above a given breakpoint
66
+ */
67
+ export declare function getBreakpointsAbove(breakpoint: BreakpointKey): BreakpointKey[];
68
+ /**
69
+ * Get breakpoints below a given breakpoint
70
+ */
71
+ export declare function getBreakpointsBelow(breakpoint: BreakpointKey): BreakpointKey[];
72
+ /**
73
+ * Create common breakpoint configurations
74
+ */
75
+ export declare const BreakpointPresets: {
76
+ readonly tailwind: BreakpointConfig;
77
+ readonly bootstrap: BreakpointConfig;
78
+ readonly material: BreakpointConfig;
79
+ readonly mobileFocus: BreakpointConfig;
80
+ };
81
+ //# sourceMappingURL=breakpoints.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"breakpoints.d.ts","sourceRoot":"","sources":["../../../src/modifiers/responsive/breakpoints.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EACL,aAAa,EACb,gBAAgB,EAEhB,iBAAiB,EAElB,MAAM,SAAS,CAAA;AAChB,OAAO,EAAgB,MAAM,EAAE,MAAM,cAAc,CAAA;AAuBnD;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,OAAO,CAAC,gBAAgB,CAAC,GAAG,IAAI,CAiB5E;AAED;;GAEG;AACH,wBAAgB,0BAA0B,IAAI,QAAQ,CAAC,gBAAgB,CAAC,CAEvE;AAED;;GAEG;AACH,wBAAgB,oBAAoB,IAAI,MAAM,CAAC,aAAa,CAAC,CAE5D;AAED;;GAEG;AACH,wBAAgB,qBAAqB,IAAI,MAAM,CAAC;IAC9C,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,MAAM,CAAA;CACf,CAAC,CAED;AAED;;GAEG;AACH,wBAAgB,0BAA0B,IAAI,IAAI,CAuBjD;AAED;;GAEG;AACH,wBAAgB,uBAAuB,IAAI,iBAAiB,CAgB3D;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,aAAa,GAAG,MAAM,CAcpE;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,aAAa,GAAG,MAAM,CAGpE;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,aAAa,EAAE,CAAC,EAAE,aAAa,GAAG,OAAO,CAE7E;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,aAAa,EAAE,CAAC,EAAE,aAAa,GAAG,OAAO,CAE7E;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,aAAa,GAAG,MAAM,CAOpE;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CACrC,GAAG,EAAE,aAAa,EAClB,GAAG,CAAC,EAAE,aAAa,GAClB,MAAM,CAkBR;AAED;;GAEG;AACH,wBAAgB,oBAAoB,IAAI,aAAa,EAAE,CAEtD;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CACjC,UAAU,EAAE,aAAa,GACxB,aAAa,EAAE,CAIjB;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CACjC,UAAU,EAAE,aAAa,GACxB,aAAa,EAAE,CAIjB;AAmFD;;GAEG;AACH,eAAO,MAAM,iBAAiB;uBAQvB,gBAAgB;wBAShB,gBAAgB;uBAShB,gBAAgB;0BAShB,gBAAgB;CACb,CAAA"}
@@ -0,0 +1,100 @@
1
+ /**
2
+ * Responsive CSS Generation Engine
3
+ *
4
+ * Generates optimized CSS media queries from responsive modifier configurations.
5
+ * Supports mobile-first design patterns and advanced media query features.
6
+ */
7
+ import { ResponsiveValue, ResponsiveStyleConfig, MediaQueryConfig, ResponsiveModifierResult } from './types';
8
+ /**
9
+ * CSS generation options
10
+ */
11
+ export interface CSSGenerationOptions {
12
+ selector: string;
13
+ generateMinified?: boolean;
14
+ includeComments?: boolean;
15
+ optimizeOutput?: boolean;
16
+ mobileFirst?: boolean;
17
+ }
18
+ /**
19
+ * Main CSS generation class
20
+ */
21
+ export declare class ResponsiveCSSGenerator {
22
+ private options;
23
+ constructor(options: CSSGenerationOptions);
24
+ /**
25
+ * Generate complete responsive CSS from a style configuration
26
+ */
27
+ generateResponsiveCSS(config: ResponsiveStyleConfig): ResponsiveModifierResult;
28
+ /**
29
+ * Generate media queries for a single property
30
+ */
31
+ private generatePropertyMediaQueries;
32
+ /**
33
+ * Generate CSS rules from media queries and base styles
34
+ */
35
+ private generateCSSRules;
36
+ /**
37
+ * Group media queries by their query string for optimization
38
+ */
39
+ private groupQueriesByMediaQuery;
40
+ /**
41
+ * Generate a single CSS rule
42
+ */
43
+ private generateCSSRule;
44
+ /**
45
+ * Generate a CSS media query rule
46
+ */
47
+ private generateMediaQueryRule;
48
+ /**
49
+ * Convert camelCase property to CSS kebab-case
50
+ */
51
+ private toCSSProperty;
52
+ /**
53
+ * Format CSS value with appropriate units and validation
54
+ */
55
+ private formatCSSValue;
56
+ /**
57
+ * Add !important for properties that need to override base component styles
58
+ */
59
+ private addImportantIfNeeded;
60
+ /**
61
+ * Convert property name to appropriate CSS property (including custom properties)
62
+ */
63
+ private toCSSPropertyName;
64
+ /**
65
+ * Extract breakpoint name from media query for comments
66
+ */
67
+ private getBreakpointFromQuery;
68
+ }
69
+ /**
70
+ * Utility function to generate responsive CSS for a single property
71
+ */
72
+ export declare function generateResponsiveProperty(selector: string, property: string, value: ResponsiveValue<any>, options?: Partial<CSSGenerationOptions>): string[];
73
+ /**
74
+ * Utility function to generate media query for custom conditions
75
+ */
76
+ export declare function generateCustomMediaQuery(selector: string, mediaQueryConfig: MediaQueryConfig, options?: Partial<CSSGenerationOptions>): string;
77
+ /**
78
+ * CSS injection utilities for runtime application
79
+ */
80
+ export declare class CSSInjector {
81
+ private static styleSheet;
82
+ private static injectedRules;
83
+ /**
84
+ * Get or create the tachUI responsive stylesheet
85
+ */
86
+ private static getStyleSheet;
87
+ /**
88
+ * Inject CSS rules into the document
89
+ */
90
+ static injectCSS(rules: string[]): void;
91
+ /**
92
+ * Clear all injected responsive CSS
93
+ */
94
+ static clearCSS(): void;
95
+ /**
96
+ * Check if a rule has been injected
97
+ */
98
+ static hasRule(rule: string): boolean;
99
+ }
100
+ //# sourceMappingURL=css-generator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"css-generator.d.ts","sourceRoot":"","sources":["../../../src/modifiers/responsive/css-generator.ts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OAAO,CAAC,oBAAoB,CAAC,GACtC,MAAM,CAsBR;AAED;;GAEG;AACH,qBAAa,WAAW;IACtB,OAAO,CAAC,MAAM,CAAC,UAAU,CAA6B;IACtD,OAAO,CAAC,MAAM,CAAC,aAAa,CAAoB;IAEhD;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,aAAa;IAa5B;;OAEG;IACH,MAAM,CAAC,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,IAAI;IAqBvC;;OAEG;IACH,MAAM,CAAC,QAAQ,IAAI,IAAI;IASvB;;OAEG;IACH,MAAM,CAAC,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;CAGtC"}
@@ -0,0 +1,107 @@
1
+ /**
2
+ * Responsive Development Tools and Debugging Features
3
+ *
4
+ * Provides comprehensive debugging, inspection, and development tools
5
+ * for the responsive design system.
6
+ */
7
+ import { Signal } from '@tachui/core';
8
+ import { ResponsiveValue, BreakpointKey, BreakpointContext } from './types';
9
+ /**
10
+ * Development mode responsive debugging
11
+ */
12
+ export declare class ResponsiveDevTools {
13
+ private static isEnabled;
14
+ private static debugOverlay;
15
+ private static logLevel;
16
+ /**
17
+ * Enable responsive development tools
18
+ */
19
+ static enable(options?: {
20
+ showOverlay?: boolean;
21
+ showBreakpoints?: boolean;
22
+ showPerformance?: boolean;
23
+ logLevel?: 'error' | 'warn' | 'info' | 'debug';
24
+ highlightResponsiveElements?: boolean;
25
+ position?: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
26
+ }): void;
27
+ /**
28
+ * Disable responsive development tools
29
+ */
30
+ static disable(): void;
31
+ /**
32
+ * Check if development tools are enabled
33
+ */
34
+ static get enabled(): boolean;
35
+ /**
36
+ * Log responsive information
37
+ */
38
+ private static log;
39
+ /**
40
+ * Create visual debug overlay
41
+ */
42
+ private static createDebugOverlay;
43
+ /**
44
+ * Update debug overlay content
45
+ */
46
+ private static updateDebugOverlay;
47
+ /**
48
+ * Enable element highlighting for responsive elements
49
+ */
50
+ private static enableElementHighlighting;
51
+ /**
52
+ * Disable element highlighting
53
+ */
54
+ private static disableElementHighlighting;
55
+ /**
56
+ * Highlight elements with responsive classes
57
+ */
58
+ private static highlightResponsiveElements;
59
+ /**
60
+ * Enable performance monitoring display
61
+ */
62
+ private static enablePerformanceMonitoring;
63
+ /**
64
+ * Log current responsive state
65
+ */
66
+ static logResponsiveState(): void;
67
+ /**
68
+ * Inspect a responsive value
69
+ */
70
+ static inspectResponsiveValue<T>(value: ResponsiveValue<T>, label?: string): void;
71
+ /**
72
+ * Test responsive behavior
73
+ */
74
+ static testResponsiveBehavior(responsiveValue: ResponsiveValue<any>, testBreakpoints?: BreakpointKey[]): Partial<Record<BreakpointKey, any>>;
75
+ /**
76
+ * Export responsive configuration for debugging
77
+ */
78
+ static exportConfiguration(): {
79
+ breakpoints: Record<BreakpointKey, string>;
80
+ currentContext: BreakpointContext;
81
+ performance: any;
82
+ mediaQueries: Record<string, boolean>;
83
+ };
84
+ }
85
+ /**
86
+ * Responsive value inspector hook
87
+ */
88
+ export declare function useResponsiveInspector<T>(value: ResponsiveValue<T>, label?: string): Signal<{
89
+ resolvedValue: T | undefined;
90
+ activeBreakpoint: BreakpointKey;
91
+ allValues: Partial<Record<BreakpointKey, T>>;
92
+ isResponsive: boolean;
93
+ }>;
94
+ /**
95
+ * Browser compatibility testing utilities
96
+ */
97
+ export declare class BrowserCompatibility {
98
+ /**
99
+ * Test CSS features support
100
+ */
101
+ static testCSSFeatures(): Record<string, boolean>;
102
+ /**
103
+ * Test responsive behavior across different viewport sizes
104
+ */
105
+ static testViewportSizes(callback: (width: number, height: number) => void): void;
106
+ }
107
+ //# sourceMappingURL=dev-tools.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dev-tools.d.ts","sourceRoot":"","sources":["../../../src/modifiers/responsive/dev-tools.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAkB,MAAM,EAAE,MAAM,cAAc,CAAA;AACrD,O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AAM,GACb,IAAI;IA+CP;;OAEG;IACH,MAAM,CAAC,sBAAsB,CAC3B,eAAe,EAAE,eAAe,CAAC,GAAG,CAAC,EACrC,eAAe,GAAE,aAAa,EAA4C,GACzE,OAAO,CAAC,MAAM,CAAC,aAAa,EAAE,GAAG,CAAC,CAAC;IAetC;;OAEG;IACH,MAAM,CAAC,mBAAmB,IAAI;QAC5B,WAAW,EAAE,MAAM,CAAC,aAAa,EAAE,MAAM,CAAC,CAAA;QAC1C,cAAc,EAAE,iBAAiB,CAAA;QACjC,WAAW,EAAE,GAAG,CAAA;QAChB,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;KACtC;CA6BF;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,CAAC,EACtC,KAAK,EAAE,eAAe,CAAC,CAAC,CAAC,EACzB,KAAK,CAAC,EAAE,MAAM,GACb,MAAM,CAAC;IACR,aAAa,EAAE,CAAC,GAAG,SAAS,CAAA;IAC5B,gBAAgB,EAAE,aAAa,CAAA;IAC/B,SAAS,EAAE,OAAO,CAAC,MAAM,CAAC,aAAa,EAAE,CAAC,CAAC,CAAC,CAAA;IAC5C,YAAY,EAAE,OAAO,CAAA;CACtB,CAAC,CAsDD;AAED;;GAEG;AACH,qBAAa,oBAAoB;IAC/B;;OAEG;IACH,MAAM,CAAC,eAAe,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAuCjD;;OAEG;IACH,MAAM,CAAC,iBAAiB,CACtB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,IAAI,GAChD,IAAI;CAsBR"}
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Responsive Design System - Main Export
3
+ *
4
+ * Complete CSS-native responsive design system for tachUI.
5
+ * Provides mobile-first responsive modifiers with TypeScript support.
6
+ */
7
+ export * from './types';
8
+ export * from './breakpoints';
9
+ export * from './css-generator';
10
+ export * from './responsive-modifier';
11
+ export * from './responsive-builder';
12
+ export * from './utilities';
13
+ export * from './layout-patterns';
14
+ export * from './performance';
15
+ export * from './advanced-utilities';
16
+ export * from './dev-tools';
17
+ export type { ResponsiveValue, BreakpointKey, ResponsiveStyleConfig, } from './types';
18
+ export type { ResponsiveModifierBuilder } from './responsive-builder';
19
+ export { ResponsiveModifierBuilderImpl, withResponsive, createResponsiveBuilder, } from './responsive-builder';
20
+ export { configureBreakpoints, initializeResponsiveSystem, getCurrentBreakpointConfig, getCurrentBreakpoint, getViewportDimensions, createBreakpointContext, generateMediaQuery, BreakpointPresets, } from './breakpoints';
21
+ export { createResponsiveModifier, createMediaQueryModifier, createResponsivePropertyModifier, createResponsiveLayoutModifier, } from './responsive-modifier';
22
+ export { useBreakpoint, useMediaQuery, useResponsiveValue } from './utilities';
23
+ export { DEFAULT_BREAKPOINTS } from './types';
24
+ export { MediaQueries, enableResponsiveDebugOverlay, logResponsiveState, } from './utilities';
25
+ export { ResponsiveGridPatterns, ResponsiveFlexPatterns, ResponsiveContainerPatterns, ResponsiveVisibilityPatterns, ResponsiveSpacingPatterns, ResponsiveTypographyPatterns, LayoutPatterns, ResponsiveGrid, Flex, Container, Visibility, Spacing, ResponsiveTypography, } from './layout-patterns';
26
+ export { AdvancedBreakpointUtils, ResponsiveHooks, ResponsiveTargeting, ResponsiveDataUtils, ResponsiveAdvanced, } from './advanced-utilities';
27
+ export { OptimizedCSSGenerator, ResponsivePerformanceMonitor, cssRuleCache, } from './performance';
28
+ export { ResponsiveDevTools, BrowserCompatibility, useResponsiveInspector, } from './dev-tools';
29
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/modifiers/responsive/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,cAAc,SAAS,CAAA;AAGvB,cAAc,eAAe,CAAA;AAG7B,cAAc,iBAAiB,CAAA;AAG/B,cAAc,uBAAuB,CAAA;AAGrC,cAAc,sBAA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