css-calipers 0.13.0 → 0.15.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/README.md +21 -25
- package/dist/cjs/factory.js +0 -3
- package/dist/cjs/internal/createCoreApi.js +30 -9
- package/dist/esm/core.d.ts +21 -17
- package/dist/esm/core.d.ts.map +1 -1
- package/dist/esm/factory.d.ts +0 -2
- package/dist/esm/factory.d.ts.map +1 -1
- package/dist/esm/factory.js +0 -3
- package/dist/esm/internal/createCoreApi.d.ts +7 -11
- package/dist/esm/internal/createCoreApi.d.ts.map +1 -1
- package/dist/esm/internal/createCoreApi.js +30 -9
- package/package.json +11 -24
- package/RELEASING.md +0 -62
- package/dist/cjs/comparisons/index.js +0 -25
- package/dist/cjs/containerQueries/containerQueries.js +0 -115
- package/dist/cjs/containerQueries/factory.js +0 -123
- package/dist/cjs/containerQueries/helpers.js +0 -95
- package/dist/cjs/containerQueries/index.js +0 -16
- package/dist/cjs/containerQueries/linting/aspectRatio.js +0 -24
- package/dist/cjs/containerQueries/linting/block.js +0 -23
- package/dist/cjs/containerQueries/linting/core.js +0 -25
- package/dist/cjs/containerQueries/linting/custom.js +0 -11
- package/dist/cjs/containerQueries/linting/inline.js +0 -23
- package/dist/cjs/containerQueries/linting/resolution.js +0 -12
- package/dist/cjs/containerQueries/linting/style.js +0 -28
- package/dist/cjs/containerQueries/linting.js +0 -24
- package/dist/cjs/containerQueries/moduleRegistry.js +0 -5
- package/dist/cjs/containerQueries/modules/aspectRatio.js +0 -51
- package/dist/cjs/containerQueries/modules/block.js +0 -53
- package/dist/cjs/containerQueries/modules/custom.js +0 -43
- package/dist/cjs/containerQueries/modules/index.js +0 -21
- package/dist/cjs/containerQueries/modules/inline.js +0 -53
- package/dist/cjs/containerQueries/modules/size.js +0 -2
- package/dist/cjs/containerQueries/modules/style.js +0 -36
- package/dist/cjs/containerQueries/types.js +0 -2
- package/dist/cjs/containerQueries/validation.js +0 -191
- package/dist/cjs/fraction.js +0 -139
- package/dist/cjs/internal/createComponentQueriesApi.js +0 -56
- package/dist/cjs/internal/createMediaQueriesApi.js +0 -74
- package/dist/cjs/internal/normalizeToArray.js +0 -9
- package/dist/cjs/libraryHelpers/vanilla-extract.js +0 -11
- package/dist/cjs/logicalOperators/index.js +0 -18
- package/dist/cjs/mediaQueries/factory.js +0 -187
- package/dist/cjs/mediaQueries/helpers.js +0 -97
- package/dist/cjs/mediaQueries/index.js +0 -23
- package/dist/cjs/mediaQueries/libraryHelpers/vanilla-extract.js +0 -77
- package/dist/cjs/mediaQueries/linting/core.js +0 -19
- package/dist/cjs/mediaQueries/linting/resolution.js +0 -11
- package/dist/cjs/mediaQueries/linting.js +0 -24
- package/dist/cjs/mediaQueries/mediaQueries.js +0 -53
- package/dist/cjs/mediaQueries/mediaQueryFactory.js +0 -120
- package/dist/cjs/mediaQueries/moduleRegistry.js +0 -5
- package/dist/cjs/mediaQueries/modules/custom.js +0 -26
- package/dist/cjs/mediaQueries/modules/dimensions.js +0 -61
- package/dist/cjs/mediaQueries/modules/display.js +0 -20
- package/dist/cjs/mediaQueries/modules/environment.js +0 -20
- package/dist/cjs/mediaQueries/modules/index.js +0 -23
- package/dist/cjs/mediaQueries/modules/interaction.js +0 -26
- package/dist/cjs/mediaQueries/modules/preferences.js +0 -26
- package/dist/cjs/mediaQueries/modules/resolution.js +0 -31
- package/dist/cjs/mediaQueries/types.js +0 -2
- package/dist/cjs/mediaQueries/validation.js +0 -131
- package/dist/cjs/types.js +0 -2
- package/dist/cjs/validation.js +0 -20
- package/dist/esm/comparisons/index.d.ts +0 -23
- package/dist/esm/comparisons/index.d.ts.map +0 -1
- package/dist/esm/comparisons/index.js +0 -22
- package/dist/esm/containerQueries/containerQueries.d.ts +0 -36
- package/dist/esm/containerQueries/containerQueries.d.ts.map +0 -1
- package/dist/esm/containerQueries/containerQueries.js +0 -109
- package/dist/esm/containerQueries/factory.d.ts +0 -20
- package/dist/esm/containerQueries/factory.d.ts.map +0 -1
- package/dist/esm/containerQueries/factory.js +0 -119
- package/dist/esm/containerQueries/helpers.d.ts +0 -53
- package/dist/esm/containerQueries/helpers.d.ts.map +0 -1
- package/dist/esm/containerQueries/helpers.js +0 -82
- package/dist/esm/containerQueries/index.d.ts +0 -10
- package/dist/esm/containerQueries/index.d.ts.map +0 -1
- package/dist/esm/containerQueries/index.js +0 -4
- package/dist/esm/containerQueries/linting/aspectRatio.d.ts +0 -4
- package/dist/esm/containerQueries/linting/aspectRatio.d.ts.map +0 -1
- package/dist/esm/containerQueries/linting/aspectRatio.js +0 -19
- package/dist/esm/containerQueries/linting/block.d.ts +0 -4
- package/dist/esm/containerQueries/linting/block.d.ts.map +0 -1
- package/dist/esm/containerQueries/linting/block.js +0 -18
- package/dist/esm/containerQueries/linting/core.d.ts +0 -4
- package/dist/esm/containerQueries/linting/core.d.ts.map +0 -1
- package/dist/esm/containerQueries/linting/core.js +0 -20
- package/dist/esm/containerQueries/linting/custom.d.ts +0 -3
- package/dist/esm/containerQueries/linting/custom.d.ts.map +0 -1
- package/dist/esm/containerQueries/linting/custom.js +0 -7
- package/dist/esm/containerQueries/linting/inline.d.ts +0 -4
- package/dist/esm/containerQueries/linting/inline.d.ts.map +0 -1
- package/dist/esm/containerQueries/linting/inline.js +0 -18
- package/dist/esm/containerQueries/linting/resolution.d.ts +0 -1
- package/dist/esm/containerQueries/linting/resolution.d.ts.map +0 -1
- package/dist/esm/containerQueries/linting/resolution.js +0 -12
- package/dist/esm/containerQueries/linting/style.d.ts +0 -3
- package/dist/esm/containerQueries/linting/style.d.ts.map +0 -1
- package/dist/esm/containerQueries/linting/style.js +0 -24
- package/dist/esm/containerQueries/linting.d.ts +0 -4
- package/dist/esm/containerQueries/linting.d.ts.map +0 -1
- package/dist/esm/containerQueries/linting.js +0 -20
- package/dist/esm/containerQueries/moduleRegistry.d.ts +0 -25
- package/dist/esm/containerQueries/moduleRegistry.d.ts.map +0 -1
- package/dist/esm/containerQueries/moduleRegistry.js +0 -1
- package/dist/esm/containerQueries/modules/aspectRatio.d.ts +0 -17
- package/dist/esm/containerQueries/modules/aspectRatio.d.ts.map +0 -1
- package/dist/esm/containerQueries/modules/aspectRatio.js +0 -47
- package/dist/esm/containerQueries/modules/block.d.ts +0 -20
- package/dist/esm/containerQueries/modules/block.d.ts.map +0 -1
- package/dist/esm/containerQueries/modules/block.js +0 -49
- package/dist/esm/containerQueries/modules/custom.d.ts +0 -13
- package/dist/esm/containerQueries/modules/custom.d.ts.map +0 -1
- package/dist/esm/containerQueries/modules/custom.js +0 -39
- package/dist/esm/containerQueries/modules/index.d.ts +0 -6
- package/dist/esm/containerQueries/modules/index.d.ts.map +0 -1
- package/dist/esm/containerQueries/modules/index.js +0 -5
- package/dist/esm/containerQueries/modules/inline.d.ts +0 -20
- package/dist/esm/containerQueries/modules/inline.d.ts.map +0 -1
- package/dist/esm/containerQueries/modules/inline.js +0 -49
- package/dist/esm/containerQueries/modules/size.d.ts +0 -41
- package/dist/esm/containerQueries/modules/size.d.ts.map +0 -1
- package/dist/esm/containerQueries/modules/size.js +0 -1
- package/dist/esm/containerQueries/modules/style.d.ts +0 -11
- package/dist/esm/containerQueries/modules/style.d.ts.map +0 -1
- package/dist/esm/containerQueries/modules/style.js +0 -32
- package/dist/esm/containerQueries/types.d.ts +0 -81
- package/dist/esm/containerQueries/types.d.ts.map +0 -1
- package/dist/esm/containerQueries/types.js +0 -1
- package/dist/esm/containerQueries/validation.d.ts +0 -41
- package/dist/esm/containerQueries/validation.d.ts.map +0 -1
- package/dist/esm/containerQueries/validation.js +0 -187
- package/dist/esm/fraction.d.ts +0 -23
- package/dist/esm/fraction.d.ts.map +0 -1
- package/dist/esm/fraction.js +0 -129
- package/dist/esm/internal/createComponentQueriesApi.d.ts +0 -34
- package/dist/esm/internal/createComponentQueriesApi.d.ts.map +0 -1
- package/dist/esm/internal/createComponentQueriesApi.js +0 -52
- package/dist/esm/internal/createMediaQueriesApi.d.ts +0 -35
- package/dist/esm/internal/createMediaQueriesApi.d.ts.map +0 -1
- package/dist/esm/internal/createMediaQueriesApi.js +0 -70
- package/dist/esm/internal/normalizeToArray.d.ts +0 -2
- package/dist/esm/internal/normalizeToArray.d.ts.map +0 -1
- package/dist/esm/internal/normalizeToArray.js +0 -5
- package/dist/esm/libraryHelpers/vanilla-extract.d.ts +0 -4
- package/dist/esm/libraryHelpers/vanilla-extract.d.ts.map +0 -1
- package/dist/esm/libraryHelpers/vanilla-extract.js +0 -6
- package/dist/esm/logicalOperators/index.d.ts +0 -2
- package/dist/esm/logicalOperators/index.d.ts.map +0 -1
- package/dist/esm/logicalOperators/index.js +0 -17
- package/dist/esm/mediaQueries/factory.d.ts +0 -45
- package/dist/esm/mediaQueries/factory.d.ts.map +0 -1
- package/dist/esm/mediaQueries/factory.js +0 -183
- package/dist/esm/mediaQueries/helpers.d.ts +0 -40
- package/dist/esm/mediaQueries/helpers.d.ts.map +0 -1
- package/dist/esm/mediaQueries/helpers.js +0 -87
- package/dist/esm/mediaQueries/index.d.ts +0 -8
- package/dist/esm/mediaQueries/index.d.ts.map +0 -1
- package/dist/esm/mediaQueries/index.js +0 -7
- package/dist/esm/mediaQueries/libraryHelpers/vanilla-extract.d.ts +0 -5
- package/dist/esm/mediaQueries/libraryHelpers/vanilla-extract.d.ts.map +0 -1
- package/dist/esm/mediaQueries/libraryHelpers/vanilla-extract.js +0 -71
- package/dist/esm/mediaQueries/linting/core.d.ts +0 -5
- package/dist/esm/mediaQueries/linting/core.d.ts.map +0 -1
- package/dist/esm/mediaQueries/linting/core.js +0 -14
- package/dist/esm/mediaQueries/linting/resolution.d.ts +0 -3
- package/dist/esm/mediaQueries/linting/resolution.d.ts.map +0 -1
- package/dist/esm/mediaQueries/linting/resolution.js +0 -7
- package/dist/esm/mediaQueries/linting.d.ts +0 -4
- package/dist/esm/mediaQueries/linting.d.ts.map +0 -1
- package/dist/esm/mediaQueries/linting.js +0 -20
- package/dist/esm/mediaQueries/mediaQueries.d.ts +0 -23
- package/dist/esm/mediaQueries/mediaQueries.d.ts.map +0 -1
- package/dist/esm/mediaQueries/mediaQueries.js +0 -48
- package/dist/esm/mediaQueries/moduleRegistry.d.ts +0 -27
- package/dist/esm/mediaQueries/moduleRegistry.d.ts.map +0 -1
- package/dist/esm/mediaQueries/moduleRegistry.js +0 -1
- package/dist/esm/mediaQueries/modules/custom.d.ts +0 -10
- package/dist/esm/mediaQueries/modules/custom.d.ts.map +0 -1
- package/dist/esm/mediaQueries/modules/custom.js +0 -22
- package/dist/esm/mediaQueries/modules/dimensions.d.ts +0 -19
- package/dist/esm/mediaQueries/modules/dimensions.d.ts.map +0 -1
- package/dist/esm/mediaQueries/modules/dimensions.js +0 -57
- package/dist/esm/mediaQueries/modules/display.d.ts +0 -9
- package/dist/esm/mediaQueries/modules/display.d.ts.map +0 -1
- package/dist/esm/mediaQueries/modules/display.js +0 -16
- package/dist/esm/mediaQueries/modules/environment.d.ts +0 -9
- package/dist/esm/mediaQueries/modules/environment.d.ts.map +0 -1
- package/dist/esm/mediaQueries/modules/environment.js +0 -16
- package/dist/esm/mediaQueries/modules/index.d.ts +0 -8
- package/dist/esm/mediaQueries/modules/index.d.ts.map +0 -1
- package/dist/esm/mediaQueries/modules/index.js +0 -7
- package/dist/esm/mediaQueries/modules/interaction.d.ts +0 -11
- package/dist/esm/mediaQueries/modules/interaction.d.ts.map +0 -1
- package/dist/esm/mediaQueries/modules/interaction.js +0 -22
- package/dist/esm/mediaQueries/modules/preferences.d.ts +0 -11
- package/dist/esm/mediaQueries/modules/preferences.d.ts.map +0 -1
- package/dist/esm/mediaQueries/modules/preferences.js +0 -22
- package/dist/esm/mediaQueries/modules/resolution.d.ts +0 -12
- package/dist/esm/mediaQueries/modules/resolution.d.ts.map +0 -1
- package/dist/esm/mediaQueries/modules/resolution.js +0 -27
- package/dist/esm/mediaQueries/types.d.ts +0 -117
- package/dist/esm/mediaQueries/types.d.ts.map +0 -1
- package/dist/esm/mediaQueries/types.js +0 -1
- package/dist/esm/mediaQueries/validation.d.ts +0 -34
- package/dist/esm/mediaQueries/validation.d.ts.map +0 -1
- package/dist/esm/mediaQueries/validation.js +0 -127
- package/dist/esm/types.d.ts +0 -35
- package/dist/esm/types.d.ts.map +0 -1
- package/dist/esm/types.js +0 -1
- package/dist/esm/validation.d.ts +0 -10
- package/dist/esm/validation.d.ts.map +0 -1
- package/dist/esm/validation.js +0 -15
- package/dist/examples/containerQueries.example.js +0 -54
- package/dist/examples/examples/containerQueries.example.js +0 -54
- package/dist/examples/examples/factory-wrapper.example.js +0 -33
- package/dist/examples/examples/lineHeight-normalizer.example.js +0 -81
- package/dist/examples/examples/mediaQueries-multipleInstances.example.js +0 -127
- package/dist/examples/examples/mixedQueries.example.js +0 -55
- package/dist/examples/examples/validation-and-runtime-checks.example.js +0 -85
- package/dist/examples/examples/validation-unit-tests.example.js +0 -35
- package/dist/examples/factory-wrapper.example.js +0 -33
- package/dist/examples/lineHeight-normalizer.example.js +0 -81
- package/dist/examples/mediaQueries-multipleInstances.example.js +0 -127
- package/dist/examples/mixedQueries.example.js +0 -60
- package/dist/examples/src/comparisons/index.js +0 -25
- package/dist/examples/src/containerQueries/containerQueries.js +0 -96
- package/dist/examples/src/containerQueries/factory.js +0 -123
- package/dist/examples/src/containerQueries/helpers.js +0 -94
- package/dist/examples/src/containerQueries/index.js +0 -16
- package/dist/examples/src/containerQueries/linting/aspectRatio.js +0 -20
- package/dist/examples/src/containerQueries/linting/block.js +0 -20
- package/dist/examples/src/containerQueries/linting/core.js +0 -19
- package/dist/examples/src/containerQueries/linting/custom.js +0 -11
- package/dist/examples/src/containerQueries/linting/inline.js +0 -20
- package/dist/examples/src/containerQueries/linting/style.js +0 -28
- package/dist/examples/src/containerQueries/linting.js +0 -24
- package/dist/examples/src/containerQueries/moduleRegistry.js +0 -5
- package/dist/examples/src/containerQueries/modules/aspectRatio.js +0 -33
- package/dist/examples/src/containerQueries/modules/block.js +0 -44
- package/dist/examples/src/containerQueries/modules/custom.js +0 -31
- package/dist/examples/src/containerQueries/modules/index.js +0 -21
- package/dist/examples/src/containerQueries/modules/inline.js +0 -44
- package/dist/examples/src/containerQueries/modules/style.js +0 -36
- package/dist/examples/src/containerQueries/types.js +0 -2
- package/dist/examples/src/containerQueries/validation.js +0 -177
- package/dist/examples/src/core.js +0 -16
- package/dist/examples/src/factory.js +0 -21
- package/dist/examples/src/index.js +0 -30
- package/dist/examples/src/internal/buildMeasurementCreationError.js +0 -16
- package/dist/examples/src/internal/createCoreApi.js +0 -336
- package/dist/examples/src/internal/createMediaQueriesApi.js +0 -74
- package/dist/examples/src/internal/createUnitsApi.js +0 -18
- package/dist/examples/src/internal/errors.js +0 -130
- package/dist/examples/src/libraryHelpers/vanilla-extract.js +0 -11
- package/dist/examples/src/mediaQueries/factory.js +0 -163
- package/dist/examples/src/mediaQueries/helpers.js +0 -88
- package/dist/examples/src/mediaQueries/index.js +0 -23
- package/dist/examples/src/mediaQueries/linting/core.js +0 -19
- package/dist/examples/src/mediaQueries/linting/resolution.js +0 -11
- package/dist/examples/src/mediaQueries/linting.js +0 -24
- package/dist/examples/src/mediaQueries/mediaQueries.js +0 -53
- package/dist/examples/src/mediaQueries/moduleRegistry.js +0 -5
- package/dist/examples/src/mediaQueries/modules/custom.js +0 -26
- package/dist/examples/src/mediaQueries/modules/dimensions.js +0 -61
- package/dist/examples/src/mediaQueries/modules/display.js +0 -20
- package/dist/examples/src/mediaQueries/modules/environment.js +0 -20
- package/dist/examples/src/mediaQueries/modules/index.js +0 -23
- package/dist/examples/src/mediaQueries/modules/interaction.js +0 -26
- package/dist/examples/src/mediaQueries/modules/preferences.js +0 -26
- package/dist/examples/src/mediaQueries/modules/resolution.js +0 -31
- package/dist/examples/src/mediaQueries/types.js +0 -2
- package/dist/examples/src/mediaQueries/validation.js +0 -128
- package/dist/examples/src/ratio.js +0 -141
- package/dist/examples/src/types.js +0 -2
- package/dist/examples/src/unitDefinitions.js +0 -67
- package/dist/examples/src/units/absolute.js +0 -11
- package/dist/examples/src/units/angle.js +0 -8
- package/dist/examples/src/units/container.js +0 -10
- package/dist/examples/src/units/font-relative.js +0 -16
- package/dist/examples/src/units/frequency.js +0 -6
- package/dist/examples/src/units/grid.js +0 -5
- package/dist/examples/src/units/percent.js +0 -7
- package/dist/examples/src/units/resolution.js +0 -7
- package/dist/examples/src/units/time.js +0 -6
- package/dist/examples/src/units/viewport-dynamic.js +0 -10
- package/dist/examples/src/units/viewport-large.js +0 -10
- package/dist/examples/src/units/viewport-small.js +0 -10
- package/dist/examples/src/units/viewport.js +0 -10
- package/dist/examples/src/validation.js +0 -20
- package/dist/examples/validation-and-runtime-checks.example.js +0 -85
- package/dist/examples/validation-unit-tests.example.js +0 -35
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import type { IMediaQueryCore } from './mediaQueries';
|
|
2
|
-
import type { IMediaQueryCustomFeatures, IMediaQueryDimensions, IMediaQueryDisplay, IMediaQueryEnvironment, IMediaQueryInteraction, IMediaQueryPreferences, IMediaQueryResolutionRange } from './modules';
|
|
3
|
-
export type MediaQueryModuleId = 'core' | 'dimensions' | 'resolution' | 'interaction' | 'preferences' | 'display' | 'environment' | 'custom';
|
|
4
|
-
export type MediaQueryModulePropsMap = {
|
|
5
|
-
core: IMediaQueryCore;
|
|
6
|
-
dimensions: IMediaQueryDimensions;
|
|
7
|
-
resolution: IMediaQueryResolutionRange;
|
|
8
|
-
interaction: IMediaQueryInteraction;
|
|
9
|
-
preferences: IMediaQueryPreferences;
|
|
10
|
-
display: IMediaQueryDisplay;
|
|
11
|
-
environment: IMediaQueryEnvironment;
|
|
12
|
-
custom: IMediaQueryCustomFeatures;
|
|
13
|
-
};
|
|
14
|
-
export type MediaQueryModuleKeysMap = {
|
|
15
|
-
core: 'type' | 'minWidth' | 'maxWidth';
|
|
16
|
-
dimensions: 'width' | 'height' | 'minHeight' | 'maxHeight' | 'aspectRatio' | 'minAspectRatio' | 'maxAspectRatio' | 'orientation';
|
|
17
|
-
resolution: 'resolutionValue' | 'minResolution' | 'maxResolution';
|
|
18
|
-
interaction: 'hover' | 'anyHover' | 'pointer' | 'anyPointer' | 'update';
|
|
19
|
-
preferences: 'colorScheme' | 'reducedMotion' | 'reducedData' | 'contrast' | 'forcedColors';
|
|
20
|
-
display: 'colorGamut' | 'dynamicRange' | 'invertedColors';
|
|
21
|
-
environment: 'scripting' | 'overflowBlock' | 'overflowInline';
|
|
22
|
-
custom: 'customFeatures';
|
|
23
|
-
};
|
|
24
|
-
export type MediaQueryModuleKeys<M extends MediaQueryModuleId> = MediaQueryModuleKeysMap[M];
|
|
25
|
-
export type MediaQueryModulesList = readonly MediaQueryModuleId[];
|
|
26
|
-
export declare const defineMediaQueryModules: <T extends MediaQueryModulesList>(...modules: T) => T;
|
|
27
|
-
//# sourceMappingURL=moduleRegistry.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"moduleRegistry.d.ts","sourceRoot":"","sources":["../../../src/mediaQueries/moduleRegistry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,KAAK,EACV,yBAAyB,EACzB,qBAAqB,EACrB,kBAAkB,EAClB,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,EACtB,0BAA0B,EAC3B,MAAM,WAAW,CAAC;AAEnB,MAAM,MAAM,kBAAkB,GAC1B,MAAM,GACN,YAAY,GACZ,YAAY,GACZ,aAAa,GACb,aAAa,GACb,SAAS,GACT,aAAa,GACb,QAAQ,CAAC;AAEb,MAAM,MAAM,wBAAwB,GAAG;IACrC,IAAI,EAAE,eAAe,CAAC;IACtB,UAAU,EAAE,qBAAqB,CAAC;IAClC,UAAU,EAAE,0BAA0B,CAAC;IACvC,WAAW,EAAE,sBAAsB,CAAC;IACpC,WAAW,EAAE,sBAAsB,CAAC;IACpC,OAAO,EAAE,kBAAkB,CAAC;IAC5B,WAAW,EAAE,sBAAsB,CAAC;IACpC,MAAM,EAAE,yBAAyB,CAAC;CACnC,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG;IACpC,IAAI,EAAE,MAAM,GAAG,UAAU,GAAG,UAAU,CAAC;IACvC,UAAU,EACN,OAAO,GACP,QAAQ,GACR,WAAW,GACX,WAAW,GACX,aAAa,GACb,gBAAgB,GAChB,gBAAgB,GAChB,aAAa,CAAC;IAClB,UAAU,EAAE,iBAAiB,GAAG,eAAe,GAAG,eAAe,CAAC;IAClE,WAAW,EAAE,OAAO,GAAG,UAAU,GAAG,SAAS,GAAG,YAAY,GAAG,QAAQ,CAAC;IACxE,WAAW,EACP,aAAa,GACb,eAAe,GACf,aAAa,GACb,UAAU,GACV,cAAc,CAAC;IACnB,OAAO,EAAE,YAAY,GAAG,cAAc,GAAG,gBAAgB,CAAC;IAC1D,WAAW,EAAE,WAAW,GAAG,eAAe,GAAG,gBAAgB,CAAC;IAC9D,MAAM,EAAE,gBAAgB,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,oBAAoB,CAAC,CAAC,SAAS,kBAAkB,IAC3D,uBAAuB,CAAC,CAAC,CAAC,CAAC;AAE7B,MAAM,MAAM,qBAAqB,GAAG,SAAS,kBAAkB,EAAE,CAAC;AAElE,eAAO,MAAM,uBAAuB,GAAI,CAAC,SAAS,qBAAqB,EACrE,GAAG,SAAS,CAAC,KACZ,CAAY,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export const defineMediaQueryModules = (...modules) => modules;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { IMeasurement } from '../../core';
|
|
2
|
-
import type { MediaQueryBuilderHelpers, MediaQueryValidator } from '../helpers';
|
|
3
|
-
type MediaQueryFeatureValue = string | number | IMeasurement;
|
|
4
|
-
export interface IMediaQueryCustomFeatures {
|
|
5
|
-
customFeatures?: Record<string, MediaQueryFeatureValue>;
|
|
6
|
-
}
|
|
7
|
-
export type MediaQueryCustomFeaturesValidator = MediaQueryValidator<IMediaQueryCustomFeatures>;
|
|
8
|
-
export declare const emitCustomFeatures: (props: IMediaQueryCustomFeatures, helpers: MediaQueryBuilderHelpers, validate?: MediaQueryCustomFeaturesValidator) => void;
|
|
9
|
-
export {};
|
|
10
|
-
//# sourceMappingURL=custom.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"custom.d.ts","sourceRoot":"","sources":["../../../../src/mediaQueries/modules/custom.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE/C,OAAO,KAAK,EACV,wBAAwB,EACxB,mBAAmB,EACpB,MAAM,YAAY,CAAC;AAGpB,KAAK,sBAAsB,GAAG,MAAM,GAAG,MAAM,GAAG,YAAY,CAAC;AAE7D,MAAM,WAAW,yBAAyB;IACxC,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,sBAAsB,CAAC,CAAC;CACzD;AAED,MAAM,MAAM,iCAAiC,GAC3C,mBAAmB,CAAC,yBAAyB,CAAC,CAAC;AAEjD,eAAO,MAAM,kBAAkB,GAC7B,OAAO,yBAAyB,EAChC,SAAS,wBAAwB,EACjC,WAAW,iCAAiC,KAC3C,IAqBF,CAAC"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { hasCssMethod } from '../../core';
|
|
2
|
-
import { applyMediaQueryValidation } from '../helpers';
|
|
3
|
-
export const emitCustomFeatures = (props, helpers, validate) => {
|
|
4
|
-
if (!applyMediaQueryValidation(props, helpers, validate, 'custom')) {
|
|
5
|
-
return;
|
|
6
|
-
}
|
|
7
|
-
const { addFeature } = helpers;
|
|
8
|
-
if (!props.customFeatures)
|
|
9
|
-
return;
|
|
10
|
-
Object.entries(props.customFeatures).forEach(([name, value]) => {
|
|
11
|
-
if (value === undefined || value === null)
|
|
12
|
-
return;
|
|
13
|
-
const trimmedName = name.trim();
|
|
14
|
-
if (!trimmedName) {
|
|
15
|
-
throw new Error('Custom feature name must be non-empty.');
|
|
16
|
-
}
|
|
17
|
-
if (typeof value === 'object' && !hasCssMethod(value)) {
|
|
18
|
-
throw new Error(`Custom feature "${trimmedName}" must be a primitive or a measurement.`);
|
|
19
|
-
}
|
|
20
|
-
addFeature(trimmedName, value);
|
|
21
|
-
});
|
|
22
|
-
};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { IMeasurement, IRatio } from '../../core';
|
|
2
|
-
import type { MediaQueryBuilderHelpers, MediaQueryValidator } from '../helpers';
|
|
3
|
-
import { type MediaQueryValidation } from '../validation';
|
|
4
|
-
type MediaQueryRatio = IRatio;
|
|
5
|
-
export interface IMediaQueryDimensions {
|
|
6
|
-
width?: IMeasurement;
|
|
7
|
-
minHeight?: IMeasurement;
|
|
8
|
-
maxHeight?: IMeasurement;
|
|
9
|
-
height?: IMeasurement;
|
|
10
|
-
aspectRatio?: MediaQueryRatio;
|
|
11
|
-
minAspectRatio?: MediaQueryRatio;
|
|
12
|
-
maxAspectRatio?: MediaQueryRatio;
|
|
13
|
-
orientation?: 'landscape' | 'portrait';
|
|
14
|
-
}
|
|
15
|
-
export type MediaQueryDimensionsValidator = MediaQueryValidator<IMediaQueryDimensions>;
|
|
16
|
-
export declare const createEmitDimensionsFeatures: (validation: MediaQueryValidation) => (props: IMediaQueryDimensions, helpers: MediaQueryBuilderHelpers, validate?: MediaQueryDimensionsValidator) => void;
|
|
17
|
-
export declare const emitDimensionsFeatures: (props: IMediaQueryDimensions, helpers: MediaQueryBuilderHelpers, validate?: MediaQueryDimensionsValidator) => void;
|
|
18
|
-
export {};
|
|
19
|
-
//# sourceMappingURL=dimensions.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dimensions.d.ts","sourceRoot":"","sources":["../../../../src/mediaQueries/modules/dimensions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AACvD,OAAO,KAAK,EACV,wBAAwB,EACxB,mBAAmB,EACpB,MAAM,YAAY,CAAC;AAEpB,OAAO,EAEL,KAAK,oBAAoB,EAC1B,MAAM,eAAe,CAAC;AAOvB,KAAK,eAAe,GAAG,MAAM,CAAC;AAE9B,MAAM,WAAW,qBAAqB;IACpC,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB,SAAS,CAAC,EAAE,YAAY,CAAC;IACzB,SAAS,CAAC,EAAE,YAAY,CAAC;IACzB,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,WAAW,CAAC,EAAE,eAAe,CAAC;IAC9B,cAAc,CAAC,EAAE,eAAe,CAAC;IACjC,cAAc,CAAC,EAAE,eAAe,CAAC;IACjC,WAAW,CAAC,EAAE,WAAW,GAAG,UAAU,CAAC;CACxC;AAED,MAAM,MAAM,6BAA6B,GACvC,mBAAmB,CAAC,qBAAqB,CAAC,CAAC;AAE7C,eAAO,MAAM,4BAA4B,GACvC,YAAY,oBAAoB,MAEhC,OAAO,qBAAqB,EAC5B,SAAS,wBAAwB,EACjC,WAAW,6BAA6B,KACvC,IAmHF,CAAC;AAEF,eAAO,MAAM,sBAAsB,UAxH1B,qBAAqB,WACnB,wBAAwB,aACtB,6BAA6B,KACvC,IAuHF,CAAC"}
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { applyMediaQueryValidation } from '../helpers';
|
|
2
|
-
import { defaultMediaQueryValidation, } from '../validation';
|
|
3
|
-
import { runMediaQueryLint } from '../linting';
|
|
4
|
-
import { lintHeightRedundancy, lintWidthRedundancy, } from '../linting/core';
|
|
5
|
-
export const createEmitDimensionsFeatures = (validation) => (props, helpers, validate) => {
|
|
6
|
-
const { runMediaQueryValidation, validateMinMaxHeight, validateHeightValuesPositive, validateMinMaxAspectRatio, validateAspectRatioValuesPositive, validateWidthValuesPositive, } = validation;
|
|
7
|
-
if (!runMediaQueryValidation(props, helpers, validateMinMaxHeight, 'dimensions', 'minHeight must be less than or equal to maxHeight')) {
|
|
8
|
-
return;
|
|
9
|
-
}
|
|
10
|
-
if (!runMediaQueryValidation(props, helpers, validateHeightValuesPositive, 'dimensions', 'height values must be greater than 0')) {
|
|
11
|
-
return;
|
|
12
|
-
}
|
|
13
|
-
if (!runMediaQueryLint(props, helpers, lintWidthRedundancy, 'width should not be combined with minWidth or maxWidth')) {
|
|
14
|
-
return;
|
|
15
|
-
}
|
|
16
|
-
if (!runMediaQueryLint(props, helpers, lintHeightRedundancy, 'height should not be combined with minHeight or maxHeight')) {
|
|
17
|
-
return;
|
|
18
|
-
}
|
|
19
|
-
if (!runMediaQueryValidation(props, helpers, validateWidthValuesPositive, 'dimensions', 'width values must be greater than 0')) {
|
|
20
|
-
return;
|
|
21
|
-
}
|
|
22
|
-
if (!runMediaQueryValidation(props, helpers, validateMinMaxAspectRatio, 'dimensions', 'minAspectRatio must be less than or equal to maxAspectRatio')) {
|
|
23
|
-
return;
|
|
24
|
-
}
|
|
25
|
-
if (!runMediaQueryValidation(props, helpers, validateAspectRatioValuesPositive, 'dimensions', 'aspect ratio values must be greater than 0')) {
|
|
26
|
-
return;
|
|
27
|
-
}
|
|
28
|
-
if (!applyMediaQueryValidation(props, helpers, validate, 'dimensions')) {
|
|
29
|
-
return;
|
|
30
|
-
}
|
|
31
|
-
const { addFeature } = helpers;
|
|
32
|
-
if (props.width) {
|
|
33
|
-
addFeature('width', props.width);
|
|
34
|
-
}
|
|
35
|
-
if (props.height) {
|
|
36
|
-
addFeature('height', props.height);
|
|
37
|
-
}
|
|
38
|
-
if (props.minHeight) {
|
|
39
|
-
addFeature('min-height', props.minHeight);
|
|
40
|
-
}
|
|
41
|
-
if (props.maxHeight) {
|
|
42
|
-
addFeature('max-height', props.maxHeight);
|
|
43
|
-
}
|
|
44
|
-
if (props.aspectRatio) {
|
|
45
|
-
addFeature('aspect-ratio', props.aspectRatio);
|
|
46
|
-
}
|
|
47
|
-
if (props.minAspectRatio) {
|
|
48
|
-
addFeature('min-aspect-ratio', props.minAspectRatio);
|
|
49
|
-
}
|
|
50
|
-
if (props.maxAspectRatio) {
|
|
51
|
-
addFeature('max-aspect-ratio', props.maxAspectRatio);
|
|
52
|
-
}
|
|
53
|
-
if (props.orientation) {
|
|
54
|
-
addFeature('orientation', props.orientation);
|
|
55
|
-
}
|
|
56
|
-
};
|
|
57
|
-
export const emitDimensionsFeatures = createEmitDimensionsFeatures(defaultMediaQueryValidation);
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { MediaQueryBuilderHelpers, MediaQueryValidator } from '../helpers';
|
|
2
|
-
export interface IMediaQueryDisplay {
|
|
3
|
-
colorGamut?: 'srgb' | 'p3' | 'rec2020';
|
|
4
|
-
dynamicRange?: 'standard' | 'high';
|
|
5
|
-
invertedColors?: 'none' | 'inverted';
|
|
6
|
-
}
|
|
7
|
-
export type MediaQueryDisplayValidator = MediaQueryValidator<IMediaQueryDisplay>;
|
|
8
|
-
export declare const emitDisplayFeatures: (props: IMediaQueryDisplay, helpers: MediaQueryBuilderHelpers, validate?: MediaQueryDisplayValidator) => void;
|
|
9
|
-
//# sourceMappingURL=display.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"display.d.ts","sourceRoot":"","sources":["../../../../src/mediaQueries/modules/display.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,wBAAwB,EACxB,mBAAmB,EACpB,MAAM,YAAY,CAAC;AAGpB,MAAM,WAAW,kBAAkB;IACjC,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACvC,YAAY,CAAC,EAAE,UAAU,GAAG,MAAM,CAAC;IACnC,cAAc,CAAC,EAAE,MAAM,GAAG,UAAU,CAAC;CACtC;AAED,MAAM,MAAM,0BAA0B,GACpC,mBAAmB,CAAC,kBAAkB,CAAC,CAAC;AAE1C,eAAO,MAAM,mBAAmB,GAC9B,OAAO,kBAAkB,EACzB,SAAS,wBAAwB,EACjC,WAAW,0BAA0B,KACpC,IAgBF,CAAC"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { applyMediaQueryValidation } from '../helpers';
|
|
2
|
-
export const emitDisplayFeatures = (props, helpers, validate) => {
|
|
3
|
-
if (!applyMediaQueryValidation(props, helpers, validate, 'display')) {
|
|
4
|
-
return;
|
|
5
|
-
}
|
|
6
|
-
const { addFeature } = helpers;
|
|
7
|
-
if (props.colorGamut) {
|
|
8
|
-
addFeature('color-gamut', props.colorGamut);
|
|
9
|
-
}
|
|
10
|
-
if (props.dynamicRange) {
|
|
11
|
-
addFeature('dynamic-range', props.dynamicRange);
|
|
12
|
-
}
|
|
13
|
-
if (props.invertedColors) {
|
|
14
|
-
addFeature('inverted-colors', props.invertedColors);
|
|
15
|
-
}
|
|
16
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { MediaQueryBuilderHelpers, MediaQueryValidator } from '../helpers';
|
|
2
|
-
export interface IMediaQueryEnvironment {
|
|
3
|
-
scripting?: 'none' | 'initial-only' | 'enabled';
|
|
4
|
-
overflowBlock?: 'none' | 'scroll' | 'paged';
|
|
5
|
-
overflowInline?: 'none' | 'scroll';
|
|
6
|
-
}
|
|
7
|
-
export type MediaQueryEnvironmentValidator = MediaQueryValidator<IMediaQueryEnvironment>;
|
|
8
|
-
export declare const emitEnvironmentFeatures: (props: IMediaQueryEnvironment, helpers: MediaQueryBuilderHelpers, validate?: MediaQueryEnvironmentValidator) => void;
|
|
9
|
-
//# sourceMappingURL=environment.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"environment.d.ts","sourceRoot":"","sources":["../../../../src/mediaQueries/modules/environment.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,wBAAwB,EACxB,mBAAmB,EACpB,MAAM,YAAY,CAAC;AAGpB,MAAM,WAAW,sBAAsB;IACrC,SAAS,CAAC,EAAE,MAAM,GAAG,cAAc,GAAG,SAAS,CAAC;IAChD,aAAa,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;IAC5C,cAAc,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAC;CACpC;AAED,MAAM,MAAM,8BAA8B,GACxC,mBAAmB,CAAC,sBAAsB,CAAC,CAAC;AAE9C,eAAO,MAAM,uBAAuB,GAClC,OAAO,sBAAsB,EAC7B,SAAS,wBAAwB,EACjC,WAAW,8BAA8B,KACxC,IAkBF,CAAC"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { applyMediaQueryValidation } from '../helpers';
|
|
2
|
-
export const emitEnvironmentFeatures = (props, helpers, validate) => {
|
|
3
|
-
if (!applyMediaQueryValidation(props, helpers, validate, 'environment')) {
|
|
4
|
-
return;
|
|
5
|
-
}
|
|
6
|
-
const { addFeature } = helpers;
|
|
7
|
-
if (props.scripting) {
|
|
8
|
-
addFeature('scripting', props.scripting);
|
|
9
|
-
}
|
|
10
|
-
if (props.overflowBlock) {
|
|
11
|
-
addFeature('overflow-block', props.overflowBlock);
|
|
12
|
-
}
|
|
13
|
-
if (props.overflowInline) {
|
|
14
|
-
addFeature('overflow-inline', props.overflowInline);
|
|
15
|
-
}
|
|
16
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/mediaQueries/modules/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { MediaQueryBuilderHelpers, MediaQueryValidator } from '../helpers';
|
|
2
|
-
export interface IMediaQueryInteraction {
|
|
3
|
-
hover?: 'none' | 'hover';
|
|
4
|
-
anyHover?: 'none' | 'hover';
|
|
5
|
-
pointer?: 'none' | 'coarse' | 'fine';
|
|
6
|
-
anyPointer?: 'none' | 'coarse' | 'fine';
|
|
7
|
-
update?: 'none' | 'slow' | 'fast';
|
|
8
|
-
}
|
|
9
|
-
export type MediaQueryInteractionValidator = MediaQueryValidator<IMediaQueryInteraction>;
|
|
10
|
-
export declare const emitInteractionFeatures: (props: IMediaQueryInteraction, helpers: MediaQueryBuilderHelpers, validate?: MediaQueryInteractionValidator) => void;
|
|
11
|
-
//# sourceMappingURL=interaction.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"interaction.d.ts","sourceRoot":"","sources":["../../../../src/mediaQueries/modules/interaction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,wBAAwB,EACxB,mBAAmB,EACpB,MAAM,YAAY,CAAC;AAGpB,MAAM,WAAW,sBAAsB;IACrC,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IACzB,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAC5B,OAAO,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,MAAM,CAAC;IACrC,UAAU,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,MAAM,CAAC;IACxC,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;CACnC;AAED,MAAM,MAAM,8BAA8B,GACxC,mBAAmB,CAAC,sBAAsB,CAAC,CAAC;AAE9C,eAAO,MAAM,uBAAuB,GAClC,OAAO,sBAAsB,EAC7B,SAAS,wBAAwB,EACjC,WAAW,8BAA8B,KACxC,IAwBF,CAAC"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { applyMediaQueryValidation } from '../helpers';
|
|
2
|
-
export const emitInteractionFeatures = (props, helpers, validate) => {
|
|
3
|
-
if (!applyMediaQueryValidation(props, helpers, validate, 'interaction')) {
|
|
4
|
-
return;
|
|
5
|
-
}
|
|
6
|
-
const { addFeature } = helpers;
|
|
7
|
-
if (props.hover) {
|
|
8
|
-
addFeature('hover', props.hover);
|
|
9
|
-
}
|
|
10
|
-
if (props.anyHover) {
|
|
11
|
-
addFeature('any-hover', props.anyHover);
|
|
12
|
-
}
|
|
13
|
-
if (props.pointer) {
|
|
14
|
-
addFeature('pointer', props.pointer);
|
|
15
|
-
}
|
|
16
|
-
if (props.anyPointer) {
|
|
17
|
-
addFeature('any-pointer', props.anyPointer);
|
|
18
|
-
}
|
|
19
|
-
if (props.update) {
|
|
20
|
-
addFeature('update', props.update);
|
|
21
|
-
}
|
|
22
|
-
};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { MediaQueryBuilderHelpers, MediaQueryValidator } from '../helpers';
|
|
2
|
-
export interface IMediaQueryPreferences {
|
|
3
|
-
colorScheme?: 'light' | 'dark';
|
|
4
|
-
reducedMotion?: 'no-preference' | 'reduce';
|
|
5
|
-
reducedData?: 'no-preference' | 'reduce';
|
|
6
|
-
contrast?: 'no-preference' | 'more' | 'less';
|
|
7
|
-
forcedColors?: 'none' | 'active';
|
|
8
|
-
}
|
|
9
|
-
export type MediaQueryPreferencesValidator = MediaQueryValidator<IMediaQueryPreferences>;
|
|
10
|
-
export declare const emitPreferencesFeatures: (props: IMediaQueryPreferences, helpers: MediaQueryBuilderHelpers, validate?: MediaQueryPreferencesValidator) => void;
|
|
11
|
-
//# sourceMappingURL=preferences.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"preferences.d.ts","sourceRoot":"","sources":["../../../../src/mediaQueries/modules/preferences.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,wBAAwB,EACxB,mBAAmB,EACpB,MAAM,YAAY,CAAC;AAGpB,MAAM,WAAW,sBAAsB;IACrC,WAAW,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAC/B,aAAa,CAAC,EAAE,eAAe,GAAG,QAAQ,CAAC;IAC3C,WAAW,CAAC,EAAE,eAAe,GAAG,QAAQ,CAAC;IACzC,QAAQ,CAAC,EAAE,eAAe,GAAG,MAAM,GAAG,MAAM,CAAC;IAC7C,YAAY,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAC;CAClC;AAED,MAAM,MAAM,8BAA8B,GACxC,mBAAmB,CAAC,sBAAsB,CAAC,CAAC;AAE9C,eAAO,MAAM,uBAAuB,GAClC,OAAO,sBAAsB,EAC7B,SAAS,wBAAwB,EACjC,WAAW,8BAA8B,KACxC,IAwBF,CAAC"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { applyMediaQueryValidation } from '../helpers';
|
|
2
|
-
export const emitPreferencesFeatures = (props, helpers, validate) => {
|
|
3
|
-
if (!applyMediaQueryValidation(props, helpers, validate, 'preferences')) {
|
|
4
|
-
return;
|
|
5
|
-
}
|
|
6
|
-
const { addFeature } = helpers;
|
|
7
|
-
if (props.colorScheme) {
|
|
8
|
-
addFeature('prefers-color-scheme', props.colorScheme);
|
|
9
|
-
}
|
|
10
|
-
if (props.reducedMotion) {
|
|
11
|
-
addFeature('prefers-reduced-motion', props.reducedMotion);
|
|
12
|
-
}
|
|
13
|
-
if (props.reducedData) {
|
|
14
|
-
addFeature('prefers-reduced-data', props.reducedData);
|
|
15
|
-
}
|
|
16
|
-
if (props.contrast) {
|
|
17
|
-
addFeature('prefers-contrast', props.contrast);
|
|
18
|
-
}
|
|
19
|
-
if (props.forcedColors) {
|
|
20
|
-
addFeature('forced-colors', props.forcedColors);
|
|
21
|
-
}
|
|
22
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { IMeasurement } from '../../core';
|
|
2
|
-
import type { MediaQueryBuilderHelpers, MediaQueryValidator } from '../helpers';
|
|
3
|
-
import { type MediaQueryValidation } from '../validation';
|
|
4
|
-
export interface IMediaQueryResolutionRange {
|
|
5
|
-
minResolution?: IMeasurement;
|
|
6
|
-
maxResolution?: IMeasurement;
|
|
7
|
-
resolutionValue?: IMeasurement;
|
|
8
|
-
}
|
|
9
|
-
export type MediaQueryResolutionValidator = MediaQueryValidator<IMediaQueryResolutionRange>;
|
|
10
|
-
export declare const createEmitResolutionFeatures: (validation: MediaQueryValidation) => (props: IMediaQueryResolutionRange, helpers: MediaQueryBuilderHelpers, validate?: MediaQueryResolutionValidator) => void;
|
|
11
|
-
export declare const emitResolutionFeatures: (props: IMediaQueryResolutionRange, helpers: MediaQueryBuilderHelpers, validate?: MediaQueryResolutionValidator) => void;
|
|
12
|
-
//# sourceMappingURL=resolution.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"resolution.d.ts","sourceRoot":"","sources":["../../../../src/mediaQueries/modules/resolution.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,KAAK,EACV,wBAAwB,EACxB,mBAAmB,EACpB,MAAM,YAAY,CAAC;AAEpB,OAAO,EAEL,KAAK,oBAAoB,EAC1B,MAAM,eAAe,CAAC;AAIvB,MAAM,WAAW,0BAA0B;IACzC,aAAa,CAAC,EAAE,YAAY,CAAC;IAC7B,aAAa,CAAC,EAAE,YAAY,CAAC;IAC7B,eAAe,CAAC,EAAE,YAAY,CAAC;CAChC;AAED,MAAM,MAAM,6BAA6B,GACvC,mBAAmB,CAAC,0BAA0B,CAAC,CAAC;AAElD,eAAO,MAAM,4BAA4B,GACvC,YAAY,oBAAoB,MAEhC,OAAO,0BAA0B,EACjC,SAAS,wBAAwB,EACjC,WAAW,6BAA6B,KACvC,IAwCF,CAAC;AAEF,eAAO,MAAM,sBAAsB,UA7C1B,0BAA0B,WACxB,wBAAwB,aACtB,6BAA6B,KACvC,IA4CF,CAAC"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { applyMediaQueryValidation } from '../helpers';
|
|
2
|
-
import { defaultMediaQueryValidation, } from '../validation';
|
|
3
|
-
import { runMediaQueryLint } from '../linting';
|
|
4
|
-
import { lintResolutionRedundancy } from '../linting/resolution';
|
|
5
|
-
export const createEmitResolutionFeatures = (validation) => (props, helpers, validate) => {
|
|
6
|
-
const { runMediaQueryValidation, validateResolutionValues } = validation;
|
|
7
|
-
if (!runMediaQueryValidation(props, helpers, validateResolutionValues, 'resolution', 'resolution values must be greater than 0')) {
|
|
8
|
-
return;
|
|
9
|
-
}
|
|
10
|
-
if (!runMediaQueryLint(props, helpers, lintResolutionRedundancy, 'resolution should not be combined with minResolution or maxResolution')) {
|
|
11
|
-
return;
|
|
12
|
-
}
|
|
13
|
-
if (!applyMediaQueryValidation(props, helpers, validate, 'resolution')) {
|
|
14
|
-
return;
|
|
15
|
-
}
|
|
16
|
-
const { addFeature } = helpers;
|
|
17
|
-
if (props.resolutionValue) {
|
|
18
|
-
addFeature('resolution', props.resolutionValue);
|
|
19
|
-
}
|
|
20
|
-
if (props.minResolution) {
|
|
21
|
-
addFeature('min-resolution', props.minResolution);
|
|
22
|
-
}
|
|
23
|
-
if (props.maxResolution) {
|
|
24
|
-
addFeature('max-resolution', props.maxResolution);
|
|
25
|
-
}
|
|
26
|
-
};
|
|
27
|
-
export const emitResolutionFeatures = createEmitResolutionFeatures(defaultMediaQueryValidation);
|
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
import type { AtRule, Properties } from "csstype";
|
|
2
|
-
export type Resolve<T> = {
|
|
3
|
-
[Key in keyof T]: T[Key];
|
|
4
|
-
} & {};
|
|
5
|
-
export type CSSVarFunction = string;
|
|
6
|
-
export type MapLeafNodes<T, Leaf> = T extends null ? null : T extends string ? Leaf : T extends object ? {
|
|
7
|
-
[Key in keyof T]: MapLeafNodes<T[Key], Leaf>;
|
|
8
|
-
} : Leaf;
|
|
9
|
-
type CSSTypeProperties = Properties<number | (string & {})>;
|
|
10
|
-
export type CSSProperties = {
|
|
11
|
-
[Property in keyof CSSTypeProperties]: CSSTypeProperties[Property] | CSSVarFunction | Array<CSSVarFunction | CSSTypeProperties[Property]>;
|
|
12
|
-
};
|
|
13
|
-
export interface CSSKeyframes {
|
|
14
|
-
[time: string]: CSSPropertiesWithVars;
|
|
15
|
-
}
|
|
16
|
-
export type CSSPropertiesWithVars = CSSProperties & {
|
|
17
|
-
vars?: {
|
|
18
|
-
[key: string]: string;
|
|
19
|
-
};
|
|
20
|
-
};
|
|
21
|
-
export type SimplePseudo = `:${string}` | `::${string}`;
|
|
22
|
-
type PseudoProperties = {
|
|
23
|
-
[key in SimplePseudo]?: CSSPropertiesWithVars;
|
|
24
|
-
};
|
|
25
|
-
type CSSPropertiesAndPseudos = CSSPropertiesWithVars & PseudoProperties;
|
|
26
|
-
type Query<Key extends string, StyleType> = {
|
|
27
|
-
[key in Key]?: {
|
|
28
|
-
[query: string]: Omit<StyleType, Key>;
|
|
29
|
-
};
|
|
30
|
-
};
|
|
31
|
-
export type MediaQueries<StyleType> = Query<"@media", StyleType>;
|
|
32
|
-
export type FeatureQueries<StyleType> = Query<"@supports", StyleType>;
|
|
33
|
-
export type ContainerQueries<StyleType> = Query<"@container", StyleType>;
|
|
34
|
-
export type Layers<StyleType> = Query<"@layer", StyleType>;
|
|
35
|
-
export type StartingStyle<StyleType> = {
|
|
36
|
-
"@starting-style"?: Omit<StyleType, "@starting-style">;
|
|
37
|
-
};
|
|
38
|
-
interface AllQueries<StyleType> extends MediaQueries<StyleType & AllQueries<StyleType>>, FeatureQueries<StyleType & AllQueries<StyleType>>, ContainerQueries<StyleType & AllQueries<StyleType>>, Layers<StyleType & AllQueries<StyleType>>, StartingStyle<StyleType> {
|
|
39
|
-
}
|
|
40
|
-
export type WithQueries<StyleType> = StyleType & AllQueries<StyleType>;
|
|
41
|
-
export interface StyleWithSelectors extends CSSPropertiesAndPseudos {
|
|
42
|
-
selectors?: SelectorMap;
|
|
43
|
-
}
|
|
44
|
-
export type StyleRule = WithQueries<StyleWithSelectors>;
|
|
45
|
-
export interface SelectorMap {
|
|
46
|
-
[selector: string]: WithQueries<StyleWithSelectors>;
|
|
47
|
-
}
|
|
48
|
-
export type GlobalStyleRule = WithQueries<CSSPropertiesWithVars>;
|
|
49
|
-
export type GlobalFontFaceRule = Omit<AtRule.FontFaceFallback, "src"> & Required<Pick<AtRule.FontFaceFallback, "src">>;
|
|
50
|
-
export type FontFaceRule = Omit<GlobalFontFaceRule, "fontFamily">;
|
|
51
|
-
export type CSSStyleBlock = {
|
|
52
|
-
type: "local";
|
|
53
|
-
selector: string;
|
|
54
|
-
rule: StyleRule;
|
|
55
|
-
};
|
|
56
|
-
export type CSSFontFaceBlock = {
|
|
57
|
-
type: "fontFace";
|
|
58
|
-
rule: GlobalFontFaceRule;
|
|
59
|
-
};
|
|
60
|
-
export type CSSKeyframesBlock = {
|
|
61
|
-
type: "keyframes";
|
|
62
|
-
name: string;
|
|
63
|
-
rule: CSSKeyframes;
|
|
64
|
-
};
|
|
65
|
-
export type CSSSelectorBlock = {
|
|
66
|
-
type: "selector" | "global";
|
|
67
|
-
selector: string;
|
|
68
|
-
rule: GlobalStyleRule;
|
|
69
|
-
};
|
|
70
|
-
export type CSSLayerDeclaration = {
|
|
71
|
-
type: "layer";
|
|
72
|
-
name: string;
|
|
73
|
-
};
|
|
74
|
-
export type CSSPropertyBlock = {
|
|
75
|
-
type: "property";
|
|
76
|
-
name: string;
|
|
77
|
-
rule: AtRule.Property;
|
|
78
|
-
};
|
|
79
|
-
export type CSS = CSSStyleBlock | CSSFontFaceBlock | CSSKeyframesBlock | CSSSelectorBlock | CSSLayerDeclaration | CSSPropertyBlock;
|
|
80
|
-
export type FileScope = {
|
|
81
|
-
packageName?: string;
|
|
82
|
-
filePath: string;
|
|
83
|
-
};
|
|
84
|
-
export interface Composition {
|
|
85
|
-
identifier: string;
|
|
86
|
-
classList: string;
|
|
87
|
-
}
|
|
88
|
-
type CustomIdentFunction = (params: {
|
|
89
|
-
hash: string;
|
|
90
|
-
filePath: string;
|
|
91
|
-
debugId?: string;
|
|
92
|
-
packageName?: string;
|
|
93
|
-
}) => string;
|
|
94
|
-
type IdentOption = "short" | "debug" | CustomIdentFunction;
|
|
95
|
-
export interface Adapter {
|
|
96
|
-
appendCss: (css: CSS, fileScope: FileScope) => void;
|
|
97
|
-
registerClassName: (className: string, fileScope: FileScope) => void;
|
|
98
|
-
registerComposition: (composition: Composition, fileScope: FileScope) => void;
|
|
99
|
-
markCompositionUsed: (identifier: string) => void;
|
|
100
|
-
onBeginFileScope?: (fileScope: FileScope) => void;
|
|
101
|
-
onEndFileScope: (fileScope: FileScope) => void;
|
|
102
|
-
getIdentOption: () => IdentOption;
|
|
103
|
-
}
|
|
104
|
-
export type NullableTokens = {
|
|
105
|
-
[key: string]: string | NullableTokens | null;
|
|
106
|
-
};
|
|
107
|
-
export type Tokens = {
|
|
108
|
-
[key: string]: string | Tokens;
|
|
109
|
-
};
|
|
110
|
-
export type ThemeVars<ThemeContract extends NullableTokens> = MapLeafNodes<ThemeContract, CSSVarFunction>;
|
|
111
|
-
export type ClassNames = string | Array<ClassNames>;
|
|
112
|
-
export type ComplexStyleRule = StyleRule | Array<StyleRule | ClassNames>;
|
|
113
|
-
type _PropertySyntax = "<angle>" | "<color>" | "<custom-ident>" | "<image>" | "<integer>" | "<length-percentage>" | "<length>" | "<number>" | "<percentage>" | "<resolution>" | "<string>" | "<time>" | "<transform-function>" | "<transform-list>" | "<url>" | "*";
|
|
114
|
-
type LooseAutocomplete<Suggestions extends string> = Suggestions | Omit<string, Suggestions>;
|
|
115
|
-
export type PropertySyntax = LooseAutocomplete<_PropertySyntax>;
|
|
116
|
-
export {};
|
|
117
|
-
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/mediaQueries/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAElD,MAAM,MAAM,OAAO,CAAC,CAAC,IAAI;KACtB,GAAG,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC;CACzB,GAAG,EAAE,CAAC;AAEP,MAAM,MAAM,cAAc,GAAG,MAAM,CAAC;AAEpC,MAAM,MAAM,YAAY,CAAC,CAAC,EAAE,IAAI,IAAI,CAAC,SA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GACT,gBAAgB,GAChB,SAAS,GACT,WAAW,GACX,qBAAqB,GACrB,UAAU,GACV,UAAU,GACV,cAAc,GACd,cAAc,GACd,UAAU,GACV,QAAQ,GACR,sBAAsB,GACtB,kBAAkB,GAClB,OAAO,GACP,GAAG,CAAC;AAER,KAAK,iBAAiB,CAAC,WAAW,SAAS,MAAM,IAC7C,WAAW,GACX,IAAI,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;AAE9B,MAAM,MAAM,cAAc,GAAG,iBAAiB,CAAC,eAAe,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import type { MediaQueryBuilderHelpers } from './helpers';
|
|
2
|
-
import { assertCondition, assertMatchingUnits } from '../core';
|
|
3
|
-
import type { IMediaQueryCore } from './mediaQueries';
|
|
4
|
-
import type { IMediaQueryDimensions } from './modules/dimensions';
|
|
5
|
-
import type { IMediaQueryResolutionRange } from './modules/resolution';
|
|
6
|
-
export type MediaQueryValidationCheck<TConfig> = (config: TConfig) => void;
|
|
7
|
-
export type MediaQueryCoreHelpers = {
|
|
8
|
-
assertCondition: typeof assertCondition;
|
|
9
|
-
assertMatchingUnits: typeof assertMatchingUnits;
|
|
10
|
-
};
|
|
11
|
-
export type MediaQueryValidation = ReturnType<typeof createMediaQueryValidation>;
|
|
12
|
-
export declare const createMediaQueryValidation: (core: MediaQueryCoreHelpers) => {
|
|
13
|
-
runMediaQueryValidation: <TConfig>(config: TConfig, helpers: MediaQueryBuilderHelpers, check?: MediaQueryValidationCheck<TConfig>, context?: string, fallbackMessage?: string) => boolean;
|
|
14
|
-
validateMinMaxWidth: (props: IMediaQueryCore) => void;
|
|
15
|
-
validateWidthValuesPositive: (props: IMediaQueryCore & IMediaQueryDimensions) => void;
|
|
16
|
-
validateMinMaxHeight: (props: IMediaQueryDimensions) => void;
|
|
17
|
-
validateHeightValuesPositive: (props: IMediaQueryDimensions) => void;
|
|
18
|
-
validateMinMaxAspectRatio: (props: IMediaQueryDimensions) => void;
|
|
19
|
-
validateAspectRatioValuesPositive: (props: IMediaQueryDimensions) => void;
|
|
20
|
-
validateResolutionValues: (props: IMediaQueryResolutionRange) => void;
|
|
21
|
-
};
|
|
22
|
-
declare const defaultMediaQueryValidation: {
|
|
23
|
-
runMediaQueryValidation: <TConfig>(config: TConfig, helpers: MediaQueryBuilderHelpers, check?: MediaQueryValidationCheck<TConfig>, context?: string, fallbackMessage?: string) => boolean;
|
|
24
|
-
validateMinMaxWidth: (props: IMediaQueryCore) => void;
|
|
25
|
-
validateWidthValuesPositive: (props: IMediaQueryCore & IMediaQueryDimensions) => void;
|
|
26
|
-
validateMinMaxHeight: (props: IMediaQueryDimensions) => void;
|
|
27
|
-
validateHeightValuesPositive: (props: IMediaQueryDimensions) => void;
|
|
28
|
-
validateMinMaxAspectRatio: (props: IMediaQueryDimensions) => void;
|
|
29
|
-
validateAspectRatioValuesPositive: (props: IMediaQueryDimensions) => void;
|
|
30
|
-
validateResolutionValues: (props: IMediaQueryResolutionRange) => void;
|
|
31
|
-
};
|
|
32
|
-
export declare const runMediaQueryValidation: <TConfig>(config: TConfig, helpers: MediaQueryBuilderHelpers, check?: MediaQueryValidationCheck<TConfig>, context?: string, fallbackMessage?: string) => boolean, validateMinMaxWidth: (props: IMediaQueryCore) => void, validateWidthValuesPositive: (props: IMediaQueryCore & IMediaQueryDimensions) => void, validateMinMaxHeight: (props: IMediaQueryDimensions) => void, validateHeightValuesPositive: (props: IMediaQueryDimensions) => void, validateMinMaxAspectRatio: (props: IMediaQueryDimensions) => void, validateAspectRatioValuesPositive: (props: IMediaQueryDimensions) => void, validateResolutionValues: (props: IMediaQueryResolutionRange) => void;
|
|
33
|
-
export { defaultMediaQueryValidation };
|
|
34
|
-
//# sourceMappingURL=validation.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../../src/mediaQueries/validation.ts"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