css-calipers 0.15.0 → 1.1.0-beta.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/LICENSE.txt +1 -1
- package/README.md +70 -434
- package/dist/cjs/color/formats/display-p3/display-p3.js +25 -0
- package/dist/cjs/color/formats/escalate.js +41 -0
- package/dist/cjs/color/formats/hex/hex.js +28 -0
- package/dist/cjs/color/formats/hexAlpha/hexAlpha.js +25 -0
- package/dist/cjs/color/formats/hsl/hsl.js +23 -0
- package/dist/cjs/color/formats/hwb/hwb.js +24 -0
- package/dist/cjs/color/formats/index.js +36 -0
- package/dist/cjs/color/formats/internals.js +93 -0
- package/dist/cjs/color/formats/lab/lab.js +24 -0
- package/dist/cjs/color/formats/lch/lch.js +23 -0
- package/dist/cjs/color/formats/oklab/oklab.js +24 -0
- package/dist/cjs/color/formats/oklch/oklch.js +28 -0
- package/dist/cjs/color/formats/resolve.js +16 -0
- package/dist/cjs/color/formats/rgb/rgb.js +29 -0
- package/dist/cjs/color/formats/rgba/rgba.js +27 -0
- package/dist/cjs/color/formats/types.js +11 -0
- package/dist/cjs/color/index.js +619 -0
- package/dist/cjs/color/types.js +2 -0
- package/dist/cjs/core.js +11 -8
- package/dist/cjs/corpus.js +53 -0
- package/dist/cjs/css-values/cssValues.js +78 -0
- package/dist/cjs/css-values/index.js +36 -0
- package/dist/cjs/css-values/multi.js +290 -0
- package/dist/cjs/css-values/propertyMap.js +2 -0
- package/dist/cjs/css-values/spec.js +197 -0
- package/dist/cjs/default.js +17 -0
- package/dist/cjs/factory.js +1 -1
- package/dist/cjs/float.js +110 -0
- package/dist/cjs/index.js +29 -9
- package/dist/cjs/integer.js +114 -0
- package/dist/cjs/internal/createCoreApi.js +103 -38
- package/dist/cjs/internal/errors.js +13 -14
- package/dist/cjs/internal/toPlainDecimal.js +31 -0
- package/dist/cjs/measurements.js +41 -0
- package/dist/cjs/ratio.js +57 -22
- package/dist/cjs/scalar.js +9 -0
- package/dist/cjs/units/absolute.js +8 -8
- package/dist/cjs/units/angle.js +5 -5
- package/dist/cjs/units/container.js +7 -7
- package/dist/cjs/units/font-relative.js +13 -13
- package/dist/cjs/units/frequency.js +3 -3
- package/dist/cjs/units/grid.js +2 -2
- package/dist/cjs/units/index.js +9 -9
- package/dist/cjs/units/percent.js +4 -4
- package/dist/cjs/units/resolution.js +4 -4
- package/dist/cjs/units/time.js +3 -3
- package/dist/cjs/units/viewport-dynamic.js +7 -7
- package/dist/cjs/units/viewport-large.js +7 -7
- package/dist/cjs/units/viewport-small.js +7 -7
- package/dist/cjs/units/viewport.js +7 -7
- package/dist/esm/color/formats/display-p3/display-p3.d.ts +10 -0
- package/dist/esm/color/formats/display-p3/display-p3.d.ts.map +1 -0
- package/dist/esm/color/formats/display-p3/display-p3.js +22 -0
- package/dist/esm/color/formats/escalate.d.ts +10 -0
- package/dist/esm/color/formats/escalate.d.ts.map +1 -0
- package/dist/esm/color/formats/escalate.js +37 -0
- package/dist/esm/color/formats/hex/hex.d.ts +9 -0
- package/dist/esm/color/formats/hex/hex.d.ts.map +1 -0
- package/dist/esm/color/formats/hex/hex.js +25 -0
- package/dist/esm/color/formats/hexAlpha/hexAlpha.d.ts +9 -0
- package/dist/esm/color/formats/hexAlpha/hexAlpha.d.ts.map +1 -0
- package/dist/esm/color/formats/hexAlpha/hexAlpha.js +22 -0
- package/dist/esm/color/formats/hsl/hsl.d.ts +8 -0
- package/dist/esm/color/formats/hsl/hsl.d.ts.map +1 -0
- package/dist/esm/color/formats/hsl/hsl.js +20 -0
- package/dist/esm/color/formats/hwb/hwb.d.ts +9 -0
- package/dist/esm/color/formats/hwb/hwb.d.ts.map +1 -0
- package/dist/esm/color/formats/hwb/hwb.js +21 -0
- package/dist/esm/color/formats/index.d.ts +24 -0
- package/dist/esm/color/formats/index.d.ts.map +1 -0
- package/dist/esm/color/formats/index.js +32 -0
- package/dist/esm/color/formats/internals.d.ts +35 -0
- package/dist/esm/color/formats/internals.d.ts.map +1 -0
- package/dist/esm/color/formats/internals.js +78 -0
- package/dist/esm/color/formats/lab/lab.d.ts +9 -0
- package/dist/esm/color/formats/lab/lab.d.ts.map +1 -0
- package/dist/esm/color/formats/lab/lab.js +21 -0
- package/dist/esm/color/formats/lch/lch.d.ts +8 -0
- package/dist/esm/color/formats/lch/lch.d.ts.map +1 -0
- package/dist/esm/color/formats/lch/lch.js +20 -0
- package/dist/esm/color/formats/oklab/oklab.d.ts +9 -0
- package/dist/esm/color/formats/oklab/oklab.d.ts.map +1 -0
- package/dist/esm/color/formats/oklab/oklab.js +21 -0
- package/dist/esm/color/formats/oklch/oklch.d.ts +13 -0
- package/dist/esm/color/formats/oklch/oklch.d.ts.map +1 -0
- package/dist/esm/color/formats/oklch/oklch.js +25 -0
- package/dist/esm/color/formats/resolve.d.ts +15 -0
- package/dist/esm/color/formats/resolve.d.ts.map +1 -0
- package/dist/esm/color/formats/resolve.js +12 -0
- package/dist/esm/color/formats/rgb/rgb.d.ts +11 -0
- package/dist/esm/color/formats/rgb/rgb.d.ts.map +1 -0
- package/dist/esm/color/formats/rgb/rgb.js +26 -0
- package/dist/esm/color/formats/rgba/rgba.d.ts +9 -0
- package/dist/esm/color/formats/rgba/rgba.d.ts.map +1 -0
- package/dist/esm/color/formats/rgba/rgba.js +24 -0
- package/dist/esm/color/formats/types.d.ts +48 -0
- package/dist/esm/color/formats/types.d.ts.map +1 -0
- package/dist/esm/color/formats/types.js +7 -0
- package/dist/esm/color/index.d.ts +81 -0
- package/dist/esm/color/index.d.ts.map +1 -0
- package/dist/esm/color/index.js +609 -0
- package/dist/esm/color/types.d.ts +294 -0
- package/dist/esm/color/types.d.ts.map +1 -0
- package/dist/esm/color/types.js +1 -0
- package/dist/esm/core.d.ts +76 -270
- package/dist/esm/core.d.ts.map +1 -1
- package/dist/esm/core.js +5 -7
- package/dist/esm/corpus.d.ts +26 -0
- package/dist/esm/corpus.d.ts.map +1 -0
- package/dist/esm/corpus.js +37 -0
- package/dist/esm/css-values/cssValues.d.ts +60 -0
- package/dist/esm/css-values/cssValues.d.ts.map +1 -0
- package/dist/esm/css-values/cssValues.js +74 -0
- package/dist/esm/css-values/index.d.ts +6 -0
- package/dist/esm/css-values/index.d.ts.map +1 -0
- package/dist/esm/css-values/index.js +12 -0
- package/dist/esm/css-values/multi.d.ts +188 -0
- package/dist/esm/css-values/multi.d.ts.map +1 -0
- package/dist/esm/css-values/multi.js +281 -0
- package/dist/esm/css-values/propertyMap.d.ts +39 -0
- package/dist/esm/css-values/propertyMap.d.ts.map +1 -0
- package/dist/esm/css-values/propertyMap.js +1 -0
- package/dist/esm/css-values/spec.d.ts +36 -0
- package/dist/esm/css-values/spec.d.ts.map +1 -0
- package/dist/esm/css-values/spec.js +194 -0
- package/dist/esm/default.d.ts +267 -0
- package/dist/esm/default.d.ts.map +1 -0
- package/dist/esm/default.js +14 -0
- package/dist/esm/factory.d.ts +1 -1
- package/dist/esm/factory.d.ts.map +1 -1
- package/dist/esm/factory.js +3 -3
- package/dist/esm/float.d.ts +35 -0
- package/dist/esm/float.d.ts.map +1 -0
- package/dist/esm/float.js +104 -0
- package/dist/esm/index.d.ts +11 -9
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +19 -9
- package/dist/esm/integer.d.ts +36 -0
- package/dist/esm/integer.d.ts.map +1 -0
- package/dist/esm/integer.js +108 -0
- package/dist/esm/internal/buildMeasurementCreationError.tests.d.ts +1 -1
- package/dist/esm/internal/buildMeasurementCreationError.tests.d.ts.map +1 -1
- package/dist/esm/internal/createCoreApi.d.ts +9 -1
- package/dist/esm/internal/createCoreApi.d.ts.map +1 -1
- package/dist/esm/internal/createCoreApi.js +103 -38
- package/dist/esm/internal/createUnitsApi.d.ts +1 -1
- package/dist/esm/internal/createUnitsApi.d.ts.map +1 -1
- package/dist/esm/internal/errors.d.ts +3 -3
- package/dist/esm/internal/errors.d.ts.map +1 -1
- package/dist/esm/internal/errors.js +13 -14
- package/dist/esm/internal/toPlainDecimal.d.ts +2 -0
- package/dist/esm/internal/toPlainDecimal.d.ts.map +1 -0
- package/dist/esm/internal/toPlainDecimal.js +27 -0
- package/dist/esm/measurements.d.ts +16 -0
- package/dist/esm/measurements.d.ts.map +1 -0
- package/dist/esm/measurements.js +25 -0
- package/dist/esm/ratio.d.ts +14 -5
- package/dist/esm/ratio.d.ts.map +1 -1
- package/dist/esm/ratio.js +57 -22
- package/dist/esm/scalar.d.ts +14 -0
- package/dist/esm/scalar.d.ts.map +1 -0
- package/dist/esm/scalar.js +5 -0
- package/dist/esm/units/absolute.d.ts +1 -1
- package/dist/esm/units/absolute.d.ts.map +1 -1
- package/dist/esm/units/absolute.js +1 -1
- package/dist/esm/units/angle.d.ts +1 -1
- package/dist/esm/units/angle.d.ts.map +1 -1
- package/dist/esm/units/angle.js +1 -1
- package/dist/esm/units/container.d.ts +1 -1
- package/dist/esm/units/container.d.ts.map +1 -1
- package/dist/esm/units/container.js +1 -1
- package/dist/esm/units/font-relative.d.ts +1 -1
- package/dist/esm/units/font-relative.d.ts.map +1 -1
- package/dist/esm/units/font-relative.js +1 -1
- package/dist/esm/units/frequency.d.ts +1 -1
- package/dist/esm/units/frequency.d.ts.map +1 -1
- package/dist/esm/units/frequency.js +1 -1
- package/dist/esm/units/grid.d.ts +1 -1
- package/dist/esm/units/grid.d.ts.map +1 -1
- package/dist/esm/units/grid.js +1 -1
- package/dist/esm/units/index.d.ts +9 -9
- package/dist/esm/units/index.d.ts.map +1 -1
- package/dist/esm/units/index.js +9 -9
- package/dist/esm/units/percent.d.ts +1 -1
- package/dist/esm/units/percent.d.ts.map +1 -1
- package/dist/esm/units/percent.js +1 -1
- package/dist/esm/units/resolution.d.ts +1 -1
- package/dist/esm/units/resolution.d.ts.map +1 -1
- package/dist/esm/units/resolution.js +1 -1
- package/dist/esm/units/time.d.ts +1 -1
- package/dist/esm/units/time.d.ts.map +1 -1
- package/dist/esm/units/time.js +1 -1
- package/dist/esm/units/viewport-dynamic.d.ts +1 -1
- package/dist/esm/units/viewport-dynamic.d.ts.map +1 -1
- package/dist/esm/units/viewport-dynamic.js +1 -1
- package/dist/esm/units/viewport-large.d.ts +1 -1
- package/dist/esm/units/viewport-large.d.ts.map +1 -1
- package/dist/esm/units/viewport-large.js +1 -1
- package/dist/esm/units/viewport-small.d.ts +1 -1
- package/dist/esm/units/viewport-small.d.ts.map +1 -1
- package/dist/esm/units/viewport-small.js +1 -1
- package/dist/esm/units/viewport.d.ts +1 -1
- package/dist/esm/units/viewport.d.ts.map +1 -1
- package/dist/esm/units/viewport.js +1 -1
- package/package.json +55 -13
package/dist/esm/core.d.ts
CHANGED
|
@@ -1,12 +1,30 @@
|
|
|
1
|
+
import { f, type FloatConstraints, type FloatOptions, hardenFloat, type IFloat, isFloat } from './float';
|
|
2
|
+
import { hardenInteger, i, type IInteger, type IntegerConstraints, type IntegerOptions, isInteger } from './integer';
|
|
3
|
+
import { type ErrorCode, type ErrorConfig } from './internal/errors';
|
|
4
|
+
import { type IRatio, isRatio, normalizeRatio, parseRatio, r, type RatioParts, ratioToFloat, type RatioValue, reduceRatio, simplifyRatio, toFloat } from './ratio';
|
|
5
|
+
import { type Scalar } from './scalar';
|
|
1
6
|
import { type UnitCategory, type UnitDefinition, type UnitDefinitionRecord } from './unitDefinitions';
|
|
2
|
-
import { type ErrorConfig, type ErrorCode } from './internal/errors';
|
|
3
|
-
import { r, isRatio, normalizeRatio, parseRatio, ratioToFloat, toFloat, reduceRatio, simplifyRatio, type IRatio, type RatioParts } from './ratio';
|
|
4
7
|
type UnitSymbol = UnitDefinitionRecord[keyof UnitDefinitionRecord]['unit'];
|
|
5
8
|
export type MeasurementString<Unit extends string = UnitSymbol> = `${number}${Unit}`;
|
|
6
9
|
declare const unitBrand: unique symbol;
|
|
7
10
|
type UnitBrand<Unit extends string> = {
|
|
8
11
|
readonly [unitBrand]: Unit;
|
|
9
12
|
};
|
|
13
|
+
declare const greaterOrEqualToZeroBrand: unique symbol;
|
|
14
|
+
declare const smallerOrEqualToZeroBrand: unique symbol;
|
|
15
|
+
declare const inRangeBrand: unique symbol;
|
|
16
|
+
export type GreaterOrEqualToZeroBrand = {
|
|
17
|
+
readonly [greaterOrEqualToZeroBrand]: true;
|
|
18
|
+
};
|
|
19
|
+
export type SmallerOrEqualToZeroBrand = {
|
|
20
|
+
readonly [smallerOrEqualToZeroBrand]: true;
|
|
21
|
+
};
|
|
22
|
+
export type InRangeBrand<Min extends number = number, Max extends number = number> = {
|
|
23
|
+
readonly [inRangeBrand]: {
|
|
24
|
+
readonly min: Min;
|
|
25
|
+
readonly max: Max;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
10
28
|
export interface IMeasurement<Unit extends string = string> {
|
|
11
29
|
css: () => string;
|
|
12
30
|
toString: () => string;
|
|
@@ -23,12 +41,13 @@ export interface IMeasurement<Unit extends string = string> {
|
|
|
23
41
|
compare(other: IMeasurement<string>, strict: false): number;
|
|
24
42
|
add(delta: number | IMeasurement<Unit>): IMeasurement<Unit>;
|
|
25
43
|
subtract(delta: number | IMeasurement<Unit>): IMeasurement<Unit>;
|
|
26
|
-
multiply: (factor:
|
|
27
|
-
divide: (divisor:
|
|
44
|
+
multiply: (factor: Scalar) => IMeasurement<Unit>;
|
|
45
|
+
divide: (divisor: Scalar) => IMeasurement<Unit>;
|
|
28
46
|
double: () => IMeasurement<Unit>;
|
|
29
47
|
half: () => IMeasurement<Unit>;
|
|
30
48
|
negation: (shouldNegate?: boolean) => IMeasurement<Unit>;
|
|
31
|
-
|
|
49
|
+
/** Absolute value; always `>= 0`, so the result is hardened to `NonNegativeMeasurement`. */
|
|
50
|
+
absolute: () => NonNegativeMeasurement<Unit>;
|
|
32
51
|
round: (precision?: number) => IMeasurement<Unit>;
|
|
33
52
|
floor: () => IMeasurement<Unit>;
|
|
34
53
|
ceil: () => IMeasurement<Unit>;
|
|
@@ -40,277 +59,64 @@ export type InscribedMeasurement<Unit extends string> = IMeasurement<Unit> & Uni
|
|
|
40
59
|
* release for backwards compatibility and will be removed in a future version.
|
|
41
60
|
*/
|
|
42
61
|
export type BrandedMeasurement<Unit extends string> = InscribedMeasurement<Unit>;
|
|
62
|
+
/**
|
|
63
|
+
* A measurement proven `>= 0` by the `nonNegative` refinement. `NonNegativeMeasurement`
|
|
64
|
+
* is the conventional alias for the same constraint. The brand is additive over
|
|
65
|
+
* `IMeasurement` and is dropped by arithmetic, so a derived result must be re-checked.
|
|
66
|
+
*/
|
|
67
|
+
export type GreaterOrEqualToZeroMeasurement<Unit extends string = string> = IMeasurement<Unit> & GreaterOrEqualToZeroBrand;
|
|
68
|
+
/** Non-negative (`>= 0`); alias of {@link GreaterOrEqualToZeroMeasurement}. */
|
|
69
|
+
export type NonNegativeMeasurement<Unit extends string = string> = GreaterOrEqualToZeroMeasurement<Unit>;
|
|
70
|
+
/**
|
|
71
|
+
* A measurement proven `<= 0` by the `nonPositive` refinement. `NonPositiveMeasurement`
|
|
72
|
+
* is the conventional alias for the same constraint. The brand is additive over
|
|
73
|
+
* `IMeasurement` and is dropped by arithmetic, so a derived result must be re-checked.
|
|
74
|
+
*/
|
|
75
|
+
export type SmallerOrEqualToZeroMeasurement<Unit extends string = string> = IMeasurement<Unit> & SmallerOrEqualToZeroBrand;
|
|
76
|
+
/** Non-positive (`<= 0`); alias of {@link SmallerOrEqualToZeroMeasurement}. */
|
|
77
|
+
export type NonPositiveMeasurement<Unit extends string = string> = SmallerOrEqualToZeroMeasurement<Unit>;
|
|
78
|
+
/**
|
|
79
|
+
* A measurement proven within an inclusive numeric range by an `inRange(min, max)`
|
|
80
|
+
* refinement. The brand carries the literal bounds, so `InRangeMeasurement<'px', 0, 10>`
|
|
81
|
+
* is distinct from `InRangeMeasurement<'px', 0, 5>`. Assignability is by exact bounds, not
|
|
82
|
+
* range containment (TypeScript cannot compare numeric literals).
|
|
83
|
+
*/
|
|
84
|
+
export type InRangeMeasurement<Unit extends string = string, Min extends number = number, Max extends number = number> = IMeasurement<Unit> & InRangeBrand<Min, Max>;
|
|
85
|
+
/** Result of a non-throwing refinement check (`refinement.check`). */
|
|
86
|
+
export type MeasurementRefinementResult<M extends IMeasurement, B> = {
|
|
87
|
+
ok: true;
|
|
88
|
+
value: M & B;
|
|
89
|
+
} | {
|
|
90
|
+
ok: false;
|
|
91
|
+
value: M;
|
|
92
|
+
error: string;
|
|
93
|
+
};
|
|
94
|
+
/**
|
|
95
|
+
* The quartet a value-constraint refinement exposes, built by
|
|
96
|
+
* `makeMeasurementRefinement`. `nonNegative` / `nonPositive` / `inRange(...)` are
|
|
97
|
+
* instances. `B` is the constraint brand the refinement applies.
|
|
98
|
+
*/
|
|
99
|
+
export interface MeasurementRefinement<B> {
|
|
100
|
+
/** Non-throwing guard; narrows to the brand on success. */
|
|
101
|
+
is: <M extends IMeasurement>(measurement: M) => measurement is M & B;
|
|
102
|
+
/** Throws if the constraint fails; otherwise returns the branded measurement. */
|
|
103
|
+
ensure: <M extends IMeasurement>(measurement: M, context?: string) => M & B;
|
|
104
|
+
/** Non-throwing; returns an ok/error result. */
|
|
105
|
+
check: <M extends IMeasurement>(measurement: M) => MeasurementRefinementResult<M, B>;
|
|
106
|
+
/** Returns the measurement if valid, else the fallback (default: a known-good value). */
|
|
107
|
+
hardenWith: <M extends IMeasurement>(measurement: M, fallback?: M & B) => M & B;
|
|
108
|
+
}
|
|
43
109
|
export type UnitHelper<Unit extends string = string> = ((value: number, context?: string) => InscribedMeasurement<Unit>) & {
|
|
44
110
|
unit: Unit;
|
|
45
111
|
};
|
|
46
112
|
export type MeasurementOf<T extends UnitHelper> = ReturnType<T>;
|
|
47
113
|
export type UnitGuard<T extends UnitHelper> = (value: unknown) => value is MeasurementOf<T>;
|
|
48
114
|
export type UnitAssertion<T extends UnitHelper> = (value: unknown, context?: string) => asserts value is MeasurementOf<T>;
|
|
49
|
-
export declare const m: {
|
|
50
|
-
(value: number): InscribedMeasurement<"px">;
|
|
51
|
-
(value: number, options: {
|
|
52
|
-
context?: string;
|
|
53
|
-
}): InscribedMeasurement<"px">;
|
|
54
|
-
<Unit extends string>(value: number, unit: Unit, context?: string): InscribedMeasurement<Lowercase<Unit>>;
|
|
55
|
-
<Unit extends string>(value: number, options: {
|
|
56
|
-
unit?: Unit | undefined;
|
|
57
|
-
context?: string;
|
|
58
|
-
}): InscribedMeasurement<Lowercase<Unit>>;
|
|
59
|
-
}, isMeasurement: (x: unknown) => x is IMeasurement<string>, assertMatchingUnits: <Unit extends string>(left: IMeasurement<Unit>, right: IMeasurement<Unit>, context: string) => void, measurementMin: <Unit extends string>(a: IMeasurement<Unit>, b: IMeasurement<NoInfer<Unit>>) => IMeasurement<Unit>, measurementMax: <Unit extends string>(a: IMeasurement<Unit>, b: IMeasurement<NoInfer<Unit>>) => IMeasurement<Unit>, measurementUnitMetadata: {
|
|
60
|
-
readonly mPercent: {
|
|
61
|
-
readonly unit: "%";
|
|
62
|
-
readonly category: "percent";
|
|
63
|
-
};
|
|
64
|
-
readonly mPx: {
|
|
65
|
-
readonly unit: "px";
|
|
66
|
-
readonly category: "length-absolute";
|
|
67
|
-
};
|
|
68
|
-
readonly mCm: {
|
|
69
|
-
readonly unit: "cm";
|
|
70
|
-
readonly category: "length-absolute";
|
|
71
|
-
};
|
|
72
|
-
readonly mMm: {
|
|
73
|
-
readonly unit: "mm";
|
|
74
|
-
readonly category: "length-absolute";
|
|
75
|
-
};
|
|
76
|
-
readonly mQ: {
|
|
77
|
-
readonly unit: "q";
|
|
78
|
-
readonly category: "length-absolute";
|
|
79
|
-
};
|
|
80
|
-
readonly mIn: {
|
|
81
|
-
readonly unit: "in";
|
|
82
|
-
readonly category: "length-absolute";
|
|
83
|
-
};
|
|
84
|
-
readonly mPc: {
|
|
85
|
-
readonly unit: "pc";
|
|
86
|
-
readonly category: "length-absolute";
|
|
87
|
-
};
|
|
88
|
-
readonly mPt: {
|
|
89
|
-
readonly unit: "pt";
|
|
90
|
-
readonly category: "length-absolute";
|
|
91
|
-
};
|
|
92
|
-
readonly mEm: {
|
|
93
|
-
readonly unit: "em";
|
|
94
|
-
readonly category: "length-font-relative";
|
|
95
|
-
};
|
|
96
|
-
readonly mRem: {
|
|
97
|
-
readonly unit: "rem";
|
|
98
|
-
readonly category: "length-font-relative";
|
|
99
|
-
};
|
|
100
|
-
readonly mEx: {
|
|
101
|
-
readonly unit: "ex";
|
|
102
|
-
readonly category: "length-font-relative";
|
|
103
|
-
};
|
|
104
|
-
readonly mRex: {
|
|
105
|
-
readonly unit: "rex";
|
|
106
|
-
readonly category: "length-font-relative";
|
|
107
|
-
};
|
|
108
|
-
readonly mCh: {
|
|
109
|
-
readonly unit: "ch";
|
|
110
|
-
readonly category: "length-font-relative";
|
|
111
|
-
};
|
|
112
|
-
readonly mRch: {
|
|
113
|
-
readonly unit: "rch";
|
|
114
|
-
readonly category: "length-font-relative";
|
|
115
|
-
};
|
|
116
|
-
readonly mCap: {
|
|
117
|
-
readonly unit: "cap";
|
|
118
|
-
readonly category: "length-font-relative";
|
|
119
|
-
};
|
|
120
|
-
readonly mRcap: {
|
|
121
|
-
readonly unit: "rcap";
|
|
122
|
-
readonly category: "length-font-relative";
|
|
123
|
-
};
|
|
124
|
-
readonly mIc: {
|
|
125
|
-
readonly unit: "ic";
|
|
126
|
-
readonly category: "length-font-relative";
|
|
127
|
-
};
|
|
128
|
-
readonly mRic: {
|
|
129
|
-
readonly unit: "ric";
|
|
130
|
-
readonly category: "length-font-relative";
|
|
131
|
-
};
|
|
132
|
-
readonly mLh: {
|
|
133
|
-
readonly unit: "lh";
|
|
134
|
-
readonly category: "length-font-relative";
|
|
135
|
-
};
|
|
136
|
-
readonly mRlh: {
|
|
137
|
-
readonly unit: "rlh";
|
|
138
|
-
readonly category: "length-font-relative";
|
|
139
|
-
};
|
|
140
|
-
readonly mVw: {
|
|
141
|
-
readonly unit: "vw";
|
|
142
|
-
readonly category: "length-viewport";
|
|
143
|
-
};
|
|
144
|
-
readonly mVh: {
|
|
145
|
-
readonly unit: "vh";
|
|
146
|
-
readonly category: "length-viewport";
|
|
147
|
-
};
|
|
148
|
-
readonly mVi: {
|
|
149
|
-
readonly unit: "vi";
|
|
150
|
-
readonly category: "length-viewport";
|
|
151
|
-
};
|
|
152
|
-
readonly mVb: {
|
|
153
|
-
readonly unit: "vb";
|
|
154
|
-
readonly category: "length-viewport";
|
|
155
|
-
};
|
|
156
|
-
readonly mVmin: {
|
|
157
|
-
readonly unit: "vmin";
|
|
158
|
-
readonly category: "length-viewport";
|
|
159
|
-
};
|
|
160
|
-
readonly mVmax: {
|
|
161
|
-
readonly unit: "vmax";
|
|
162
|
-
readonly category: "length-viewport";
|
|
163
|
-
};
|
|
164
|
-
readonly mSvw: {
|
|
165
|
-
readonly unit: "svw";
|
|
166
|
-
readonly category: "length-viewport-small";
|
|
167
|
-
};
|
|
168
|
-
readonly mSvh: {
|
|
169
|
-
readonly unit: "svh";
|
|
170
|
-
readonly category: "length-viewport-small";
|
|
171
|
-
};
|
|
172
|
-
readonly mSvi: {
|
|
173
|
-
readonly unit: "svi";
|
|
174
|
-
readonly category: "length-viewport-small";
|
|
175
|
-
};
|
|
176
|
-
readonly mSvb: {
|
|
177
|
-
readonly unit: "svb";
|
|
178
|
-
readonly category: "length-viewport-small";
|
|
179
|
-
};
|
|
180
|
-
readonly mSvmin: {
|
|
181
|
-
readonly unit: "svmin";
|
|
182
|
-
readonly category: "length-viewport-small";
|
|
183
|
-
};
|
|
184
|
-
readonly mSvmax: {
|
|
185
|
-
readonly unit: "svmax";
|
|
186
|
-
readonly category: "length-viewport-small";
|
|
187
|
-
};
|
|
188
|
-
readonly mLvw: {
|
|
189
|
-
readonly unit: "lvw";
|
|
190
|
-
readonly category: "length-viewport-large";
|
|
191
|
-
};
|
|
192
|
-
readonly mLvh: {
|
|
193
|
-
readonly unit: "lvh";
|
|
194
|
-
readonly category: "length-viewport-large";
|
|
195
|
-
};
|
|
196
|
-
readonly mLvi: {
|
|
197
|
-
readonly unit: "lvi";
|
|
198
|
-
readonly category: "length-viewport-large";
|
|
199
|
-
};
|
|
200
|
-
readonly mLvb: {
|
|
201
|
-
readonly unit: "lvb";
|
|
202
|
-
readonly category: "length-viewport-large";
|
|
203
|
-
};
|
|
204
|
-
readonly mLvmin: {
|
|
205
|
-
readonly unit: "lvmin";
|
|
206
|
-
readonly category: "length-viewport-large";
|
|
207
|
-
};
|
|
208
|
-
readonly mLvmax: {
|
|
209
|
-
readonly unit: "lvmax";
|
|
210
|
-
readonly category: "length-viewport-large";
|
|
211
|
-
};
|
|
212
|
-
readonly mDvw: {
|
|
213
|
-
readonly unit: "dvw";
|
|
214
|
-
readonly category: "length-viewport-dynamic";
|
|
215
|
-
};
|
|
216
|
-
readonly mDvh: {
|
|
217
|
-
readonly unit: "dvh";
|
|
218
|
-
readonly category: "length-viewport-dynamic";
|
|
219
|
-
};
|
|
220
|
-
readonly mDvi: {
|
|
221
|
-
readonly unit: "dvi";
|
|
222
|
-
readonly category: "length-viewport-dynamic";
|
|
223
|
-
};
|
|
224
|
-
readonly mDvb: {
|
|
225
|
-
readonly unit: "dvb";
|
|
226
|
-
readonly category: "length-viewport-dynamic";
|
|
227
|
-
};
|
|
228
|
-
readonly mDvmin: {
|
|
229
|
-
readonly unit: "dvmin";
|
|
230
|
-
readonly category: "length-viewport-dynamic";
|
|
231
|
-
};
|
|
232
|
-
readonly mDvmax: {
|
|
233
|
-
readonly unit: "dvmax";
|
|
234
|
-
readonly category: "length-viewport-dynamic";
|
|
235
|
-
};
|
|
236
|
-
readonly mCqw: {
|
|
237
|
-
readonly unit: "cqw";
|
|
238
|
-
readonly category: "length-container";
|
|
239
|
-
};
|
|
240
|
-
readonly mCqh: {
|
|
241
|
-
readonly unit: "cqh";
|
|
242
|
-
readonly category: "length-container";
|
|
243
|
-
};
|
|
244
|
-
readonly mCqi: {
|
|
245
|
-
readonly unit: "cqi";
|
|
246
|
-
readonly category: "length-container";
|
|
247
|
-
};
|
|
248
|
-
readonly mCqb: {
|
|
249
|
-
readonly unit: "cqb";
|
|
250
|
-
readonly category: "length-container";
|
|
251
|
-
};
|
|
252
|
-
readonly mCqmin: {
|
|
253
|
-
readonly unit: "cqmin";
|
|
254
|
-
readonly category: "length-container";
|
|
255
|
-
};
|
|
256
|
-
readonly mCqmax: {
|
|
257
|
-
readonly unit: "cqmax";
|
|
258
|
-
readonly category: "length-container";
|
|
259
|
-
};
|
|
260
|
-
readonly mDeg: {
|
|
261
|
-
readonly unit: "deg";
|
|
262
|
-
readonly category: "angle";
|
|
263
|
-
};
|
|
264
|
-
readonly mRad: {
|
|
265
|
-
readonly unit: "rad";
|
|
266
|
-
readonly category: "angle";
|
|
267
|
-
};
|
|
268
|
-
readonly mGrad: {
|
|
269
|
-
readonly unit: "grad";
|
|
270
|
-
readonly category: "angle";
|
|
271
|
-
};
|
|
272
|
-
readonly mTurn: {
|
|
273
|
-
readonly unit: "turn";
|
|
274
|
-
readonly category: "angle";
|
|
275
|
-
};
|
|
276
|
-
readonly mS: {
|
|
277
|
-
readonly unit: "s";
|
|
278
|
-
readonly category: "time";
|
|
279
|
-
};
|
|
280
|
-
readonly mMs: {
|
|
281
|
-
readonly unit: "ms";
|
|
282
|
-
readonly category: "time";
|
|
283
|
-
};
|
|
284
|
-
readonly mHz: {
|
|
285
|
-
readonly unit: "hz";
|
|
286
|
-
readonly category: "frequency";
|
|
287
|
-
};
|
|
288
|
-
readonly mKhz: {
|
|
289
|
-
readonly unit: "khz";
|
|
290
|
-
readonly category: "frequency";
|
|
291
|
-
};
|
|
292
|
-
readonly mDpi: {
|
|
293
|
-
readonly unit: "dpi";
|
|
294
|
-
readonly category: "resolution";
|
|
295
|
-
};
|
|
296
|
-
readonly mDpcm: {
|
|
297
|
-
readonly unit: "dpcm";
|
|
298
|
-
readonly category: "resolution";
|
|
299
|
-
};
|
|
300
|
-
readonly mDppx: {
|
|
301
|
-
readonly unit: "dppx";
|
|
302
|
-
readonly category: "resolution";
|
|
303
|
-
};
|
|
304
|
-
readonly mFr: {
|
|
305
|
-
readonly unit: "fr";
|
|
306
|
-
readonly category: "flex";
|
|
307
|
-
};
|
|
308
|
-
}, makeUnitHelper: <Unit extends string>(unit: Unit) => UnitHelper<Unit>, makeUnitHelperFromDefinition: <Name extends import("./unitDefinitions").UnitHelperName>(name: Name) => UnitHelper<UnitDefinitionRecord[Name]["unit"]>, makeUnitGuard: <T extends UnitHelper>(helper: T) => UnitGuard<T>, makeUnitAssert: <T extends UnitHelper>(helper: T) => UnitAssertion<T>, hasCssMethod: (x: unknown) => x is {
|
|
309
|
-
css: () => string;
|
|
310
|
-
}, assertUnit: <Unit extends string>(measurement: IMeasurement<Unit>, expectedUnit: string, context?: string) => void, assertCondition: (condition: boolean | (() => boolean), message: string) => void, getErrorConfig: () => Required<ErrorConfig>, setErrorConfig: (next: ErrorConfig) => void;
|
|
311
115
|
export type MeasurementUnitDefinition = UnitDefinition;
|
|
312
116
|
export type MeasurementUnitCategory = UnitCategory;
|
|
313
|
-
export { type
|
|
314
|
-
export {
|
|
315
|
-
export type { IRatio, RatioParts };
|
|
117
|
+
export { type ErrorCode, type ErrorConfig };
|
|
118
|
+
export { isRatio, normalizeRatio, parseRatio, r, ratioToFloat, reduceRatio, simplifyRatio, toFloat, };
|
|
119
|
+
export type { IRatio, RatioParts, RatioValue };
|
|
120
|
+
export { f, hardenFloat, hardenInteger, i, isFloat, isInteger };
|
|
121
|
+
export type { FloatConstraints, FloatOptions, IFloat, IInteger, IntegerConstraints, IntegerOptions, };
|
|
316
122
|
//# sourceMappingURL=core.d.ts.map
|
package/dist/esm/core.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../../src/core.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,
|
|
1
|
+
{"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../../src/core.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,CAAC,EACD,KAAK,gBAAgB,EACrB,KAAK,YAAY,EACjB,WAAW,EACX,KAAK,MAAM,E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EACZ,WAAW,EACX,aAAa,EACb,OAAO,GACR,CAAC;AACF,YAAY,EAAE,MAAM,EAAE,UAAU,EAAE,UAAU,EAAE,CAAC;AAC/C,OAAO,EAAE,CAAC,EAAE,WAAW,EAAE,aAAa,EAAE,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC;AAChE,YAAY,EACV,gBAAgB,EAChB,YAAY,EACZ,MAAM,EACN,QAAQ,EACR,kBAAkB,EAClB,cAAc,GACf,CAAC"}
|
package/dist/esm/core.js
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export const { m, isMeasurement, assertMatchingUnits, measurementMin, measurementMax, measurementUnitMetadata, makeUnitHelper, makeUnitHelperFromDefinition, makeUnitGuard, makeUnitAssert, hasCssMethod, assertUnit, assertCondition, getErrorConfig, setErrorConfig, } = coreApi;
|
|
7
|
-
export { r, isRatio, normalizeRatio, parseRatio, ratioToFloat, toFloat, reduceRatio, simplifyRatio, };
|
|
1
|
+
import { f, hardenFloat, isFloat, } from './float';
|
|
2
|
+
import { hardenInteger, i, isInteger, } from './integer';
|
|
3
|
+
import { isRatio, normalizeRatio, parseRatio, r, ratioToFloat, reduceRatio, simplifyRatio, toFloat, } from './ratio';
|
|
4
|
+
export { isRatio, normalizeRatio, parseRatio, r, ratioToFloat, reduceRatio, simplifyRatio, toFloat, };
|
|
5
|
+
export { f, hardenFloat, hardenInteger, i, isFloat, isInteger };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { type ColorFormatPlugin, type CreateColorConfig, type CustomColor } from './color';
|
|
2
|
+
import { type CalipersFactoryConfig, type CalipersInstance, createCalipers } from './factory';
|
|
3
|
+
export * from './index';
|
|
4
|
+
export { createCalipers };
|
|
5
|
+
export type { CalipersFactoryConfig, CalipersInstance };
|
|
6
|
+
/** The calipers master config: one OPTIONAL key per calipers sub-factory. */
|
|
7
|
+
export interface CalipersBundleConfig<P extends ReadonlyArray<ColorFormatPlugin> = readonly []> {
|
|
8
|
+
/** forwarded to `createCalipers` (the measurement / scalar surface + units). */
|
|
9
|
+
measurements?: CalipersFactoryConfig;
|
|
10
|
+
/** forwarded to `createColor` (custom colour format plugins). */
|
|
11
|
+
color?: CreateColorConfig<P>;
|
|
12
|
+
}
|
|
13
|
+
/** The bound calipers bundle: every helper plus the colour instance, in one object. */
|
|
14
|
+
export type CalipersBundle<P extends ReadonlyArray<ColorFormatPlugin> = readonly []> = CalipersInstance & {
|
|
15
|
+
color: CustomColor<P>;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* The calipers MASTER factory: combine the two sub-factories (`createCalipers` for the
|
|
19
|
+
* measurement / scalar surface, `createColor` for the colour value) under one keyed config,
|
|
20
|
+
* returning every helper bound in one object. Mirrors `publishCompendium`. A bare
|
|
21
|
+
* `createCalipersBundle()` binds everything at defaults; this file DEFAULT-exports it, and
|
|
22
|
+
* the named re-exports above are the same helpers already bound at defaults.
|
|
23
|
+
*/
|
|
24
|
+
export declare const createCalipersBundle: <const P extends ReadonlyArray<ColorFormatPlugin> = readonly []>(config?: CalipersBundleConfig<P>) => CalipersBundle<P>;
|
|
25
|
+
export default createCalipersBundle;
|
|
26
|
+
//# sourceMappingURL=corpus.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"corpus.d.ts","sourceRoot":"","sources":["../../src/corpus.ts"],"names":[],"mappings":"AAcA,OAAO,EACL,KAAK,iBAAiB,EAEtB,KAAK,iBAAiB,EACtB,KAAK,WAAW,EACjB,MAAM,SAAS,CAAC;AACjB,OAAO,EACL,KAAK,qBAAqB,EAC1B,KAAK,gBAAgB,EACrB,cAAc,EACf,MAAM,WAAW,CAAC;AAEnB,cAAc,SAAS,CAAC;AAGxB,OAAO,EAAE,cAAc,EAAE,CAAC;AAC1B,YAAY,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,CAAC;AAExD,6EAA6E;AAC7E,MAAM,WAAW,oBAAoB,CACnC,CAAC,SAAS,aAAa,CAAC,iBAAiB,CAAC,GAAG,SAAS,EAAE;IAExD,gFAAgF;IAChF,YAAY,CAAC,EAAE,qBAAqB,CAAC;IACrC,iEAAiE;IACjE,KAAK,CAAC,EAAE,iBAAiB,CAAC,CAAC,CAAC,CAAC;CAC9B;AAED,uFAAuF;AACvF,MAAM,MAAM,cAAc,CACxB,CAAC,SAAS,aAAa,CAAC,iBAAiB,CAAC,GAAG,SAAS,EAAE,IACtD,gBAAgB,GAAG;IAAE,KAAK,EAAE,WAAW,CAAC,CAAC,CAAC,CAAA;CAAE,CAAC;AAEjD;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,GAC/B,KAAK,CAAC,CAAC,SAAS,aAAa,CAAC,iBAAiB,CAAC,GAAG,SAAS,EAAE,EAE9D,SAAQ,oBAAoB,CAAC,CAAC,CAAM,KACnC,cAAc,CAAC,CAAC,CAQjB,CAAC;AAEH,eAAe,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
// CORPUS: the css-calipers LAZY-DEFAULTS convenience entry, plus the master factory.
|
|
2
|
+
//
|
|
3
|
+
// - DEFAULT export: `createCalipersBundle`, the calipers MASTER factory. It mirrors the
|
|
4
|
+
// compendium's `publishCompendium`: one keyed config (a slot per sub-factory) that binds
|
|
5
|
+
// the whole calipers surface in one object. A bare `createCalipersBundle()` binds it all
|
|
6
|
+
// at defaults.
|
|
7
|
+
// - NAMED exports: the full default set (`m` / `r` / `i` / `f` / `color`, each a
|
|
8
|
+
// factory-at-defaults instance) plus the sub-factories (`createCalipers` / `createColor`),
|
|
9
|
+
// so a consumer who just wants the defaults never has to bind anything.
|
|
10
|
+
//
|
|
11
|
+
// This is the convenience layer ON TOP of the factory, never a replacement: configuration
|
|
12
|
+
// still goes through a factory. (Per-property value helpers are the books layer now, not
|
|
13
|
+
// calipers.) Unlike `./measurements`, this entry is NOT colour-free: it pulls in the colour
|
|
14
|
+
// value primitive (and `culori`) by design.
|
|
15
|
+
import { createColor, } from './color';
|
|
16
|
+
import { createCalipers, } from './factory';
|
|
17
|
+
export * from './index';
|
|
18
|
+
// `createCalipers` lives on the `./factory` real path and is not re-exported by the root;
|
|
19
|
+
// surface it here so the corpus exposes both sub-factories (`createCalipers` / `createColor`).
|
|
20
|
+
export { createCalipers };
|
|
21
|
+
/**
|
|
22
|
+
* The calipers MASTER factory: combine the two sub-factories (`createCalipers` for the
|
|
23
|
+
* measurement / scalar surface, `createColor` for the colour value) under one keyed config,
|
|
24
|
+
* returning every helper bound in one object. Mirrors `publishCompendium`. A bare
|
|
25
|
+
* `createCalipersBundle()` binds everything at defaults; this file DEFAULT-exports it, and
|
|
26
|
+
* the named re-exports above are the same helpers already bound at defaults.
|
|
27
|
+
*/
|
|
28
|
+
export const createCalipersBundle = (config = {}) => {
|
|
29
|
+
var _a;
|
|
30
|
+
return ({
|
|
31
|
+
...createCalipers(config.measurements),
|
|
32
|
+
// when no colour config is given, P is the default `readonly []` (no custom formats),
|
|
33
|
+
// so an empty formats list is the right default; the double cast satisfies the generic.
|
|
34
|
+
color: createColor((_a = config.color) !== null && _a !== void 0 ? _a : { formats: [] }),
|
|
35
|
+
});
|
|
36
|
+
};
|
|
37
|
+
export default createCalipersBundle;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { type CssPropertyKey, type PropertyValueMap } from './propertyMap';
|
|
2
|
+
import { CSS_VALUE_SPEC, type SpecRow } from './spec';
|
|
3
|
+
/**
|
|
4
|
+
* How an out-of-range (or non-integer) number is handled.
|
|
5
|
+
*
|
|
6
|
+
* - `'throw'`: defer to the scalar primitive, which throws on a value outside
|
|
7
|
+
* the bound (or a non-integer for an `int` row). This is the default.
|
|
8
|
+
* - `'clamp'`: clamp the number into `[min, max]` first, then build the
|
|
9
|
+
* primitive. Only meaningful when the row has both bounds; with an open bound
|
|
10
|
+
* there is nothing to clamp against on that side.
|
|
11
|
+
*/
|
|
12
|
+
export type OutOfRange = 'throw' | 'clamp';
|
|
13
|
+
/** The factory's configuration. `outOfRange` is the instance-wide default. */
|
|
14
|
+
export interface CssValuesConfig {
|
|
15
|
+
outOfRange?: OutOfRange;
|
|
16
|
+
}
|
|
17
|
+
/** Per-call options; `outOfRange` overrides the instance default for that call. */
|
|
18
|
+
export interface CssValueOptions {
|
|
19
|
+
outOfRange?: OutOfRange;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* A single typed CSS value. Build it through a property helper (`opacity(0.5)`),
|
|
23
|
+
* then render with `.css()` (typed against that property's csstype `Property`
|
|
24
|
+
* key). `.value()` returns the raw `number` (scalar input) or `string`
|
|
25
|
+
* (keyword input); `.toString()` mirrors `.css()`.
|
|
26
|
+
*/
|
|
27
|
+
export interface CssValue<CssProperty extends CssPropertyKey> {
|
|
28
|
+
css: () => PropertyValueMap[CssProperty];
|
|
29
|
+
toString: () => string;
|
|
30
|
+
value: () => number | string;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* A generated property helper: accepts the property's constrained number or one
|
|
34
|
+
* of its keywords, and returns a typed {@link CssValue}.
|
|
35
|
+
*/
|
|
36
|
+
export type CssValueHelper<CssProperty extends CssPropertyKey, Keyword extends string> = (value: number | Keyword, opts?: CssValueOptions) => CssValue<CssProperty>;
|
|
37
|
+
/**
|
|
38
|
+
* The full helper map produced by {@link createCssValues}: one helper per spec
|
|
39
|
+
* row, keyed by the row's `name`, each carrying that row's `.css()` return type
|
|
40
|
+
* and keyword union. Derived from the spec tuple so the map stays in lockstep
|
|
41
|
+
* with the table.
|
|
42
|
+
*/
|
|
43
|
+
export type CssValues = {
|
|
44
|
+
readonly [Row in CssValueSpecEntry as Row['name']]: Row extends SpecRow<string, infer CssProperty, infer Keyword> ? CssValueHelper<CssProperty, Keyword> : never;
|
|
45
|
+
};
|
|
46
|
+
type CssValueSpecEntry = (typeof CSS_VALUE_SPEC)[number];
|
|
47
|
+
/**
|
|
48
|
+
* Create a set of per-property CSS-value helpers, layered on the scalar
|
|
49
|
+
* primitives `i()` / `f()`. Each helper constrains its number against the
|
|
50
|
+
* property's bound and accepts that property's keyword companions, returning a
|
|
51
|
+
* `.css()`-renderable {@link CssValue} typed against csstype.
|
|
52
|
+
*
|
|
53
|
+
* `config.outOfRange` is the instance-wide default for out-of-range numbers
|
|
54
|
+
* (`'throw'`, the default, or `'clamp'`); a per-call `opts.outOfRange` overrides
|
|
55
|
+
* it. The package's bare `opacity` / `zIndex` / ... exports are this factory at
|
|
56
|
+
* its defaults.
|
|
57
|
+
*/
|
|
58
|
+
export declare const createCssValues: (config?: CssValuesConfig) => CssValues;
|
|
59
|
+
export {};
|
|
60
|
+
//# sourceMappingURL=cssValues.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cssValues.d.ts","sourceRoot":"","sources":["../../../src/css-values/cssValues.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACtB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,cAAc,EAAE,KAAK,OAAO,EAAE,MAAM,QAAQ,CAAC;AAEtD;;;;;;;;GAQG;AACH,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,OAAO,CAAC;AAE3C,8EAA8E;AAC9E,MAAM,WAAW,eAAe;IAC9B,UAAU,CAAC,EAAE,UAAU,CAAC;CACzB;AAED,mFAAmF;AACnF,MAAM,WAAW,eAAe;IAC9B,UAAU,CAAC,EAAE,UAAU,CAAC;CACzB;AAED;;;;;GAKG;AACH,MAAM,WAAW,QAAQ,CAAC,WAAW,SAAS,cAAc;IAC1D,GAAG,EAAE,MAAM,gBAAgB,CAAC,WAAW,CAAC,CAAC;IACzC,QAAQ,EAAE,MAAM,MAAM,CAAC;IACvB,KAAK,EAAE,MAAM,MAAM,GAAG,MAAM,CAAC;CAC9B;AAED;;;GAGG;AACH,MAAM,MAAM,cAAc,CACxB,WAAW,SAAS,cAAc,EAClC,OAAO,SAAS,MAAM,IACpB,CACF,KAAK,EAAE,MAAM,GAAG,OAAO,EACvB,IAAI,CAAC,EAAE,eAAe,KACnB,QAAQ,CAAC,WAAW,CAAC,CAAC;AAE3B;;;;;GAKG;AACH,MAAM,MAAM,SAAS,GAAG;IACtB,QAAQ,EAAE,GAAG,IAAI,iBAAiB,IAAI,GAAG,CAAC,MAAM,CAAC,GAAG,GAAG,SAAS,OAAO,CACrE,MAAM,EACN,MAAM,WAAW,EACjB,MAAM,OAAO,CACd,GACG,cAAc,CAAC,WAAW,EAAE,OAAO,CAAC,GACpC,KAAK;CACV,CAAC;AAEF,KAAK,iBAAiB,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC;AA4EzD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,eAAe,GAC1B,SAAQ,eAAoB,KAC3B,SAUF,CAAC"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { f } from '../float';
|
|
2
|
+
import { i } from '../integer';
|
|
3
|
+
import { CSS_VALUE_SPEC } from './spec';
|
|
4
|
+
const clampNumber = (value, min, max) => Math.min(max, Math.max(min, value));
|
|
5
|
+
/**
|
|
6
|
+
* Build the value object for a number input, constraining it with the row's
|
|
7
|
+
* primitive (`i()` for `int`, `f()` for `float`). Under `'clamp'`, the number is
|
|
8
|
+
* first clamped into `[min, max]` (only when both bounds exist); otherwise the
|
|
9
|
+
* primitive throws on an out-of-range or non-integer value.
|
|
10
|
+
*/
|
|
11
|
+
const buildNumber = (row, value, policy) => {
|
|
12
|
+
let next = value;
|
|
13
|
+
if (policy === 'clamp' &&
|
|
14
|
+
row.min !== undefined &&
|
|
15
|
+
row.max !== undefined) {
|
|
16
|
+
next = clampNumber(value, row.min, row.max);
|
|
17
|
+
}
|
|
18
|
+
const bounds = { min: row.min, max: row.max, context: row.name };
|
|
19
|
+
const scalar = row.kind === 'int' ? i(next, bounds) : f(next, bounds);
|
|
20
|
+
// Every `PropertyValueMap[CssProperty]` value type widens to include
|
|
21
|
+
// `(string & {})`, so the scalar's `string` render is directly assignable; no
|
|
22
|
+
// cast is needed (and one would be flagged as redundant).
|
|
23
|
+
return {
|
|
24
|
+
css: () => scalar.css(),
|
|
25
|
+
toString: () => scalar.css(),
|
|
26
|
+
value: () => scalar.value(),
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
/** Build the value object for a keyword input (passed through untouched). */
|
|
30
|
+
const buildKeyword = (keyword) => ({
|
|
31
|
+
css: () => keyword,
|
|
32
|
+
toString: () => keyword,
|
|
33
|
+
value: () => keyword,
|
|
34
|
+
});
|
|
35
|
+
/**
|
|
36
|
+
* Generate a single property helper from a spec row. Number inputs are
|
|
37
|
+
* constrained via the row's scalar primitive; keyword inputs (members of the
|
|
38
|
+
* row's `keywords`) pass through.
|
|
39
|
+
*/
|
|
40
|
+
const makeHelper = (spec, defaultPolicy) => {
|
|
41
|
+
const keywords = new Set(spec.keywords);
|
|
42
|
+
return (value, opts) => {
|
|
43
|
+
var _a;
|
|
44
|
+
if (typeof value === 'string') {
|
|
45
|
+
if (!keywords.has(value)) {
|
|
46
|
+
throw new Error(`${spec.name}: '${value}' is not a valid keyword` +
|
|
47
|
+
` (expected one of: ${spec.keywords.join(', ') || 'none'})`);
|
|
48
|
+
}
|
|
49
|
+
return buildKeyword(value);
|
|
50
|
+
}
|
|
51
|
+
const policy = (_a = opts === null || opts === void 0 ? void 0 : opts.outOfRange) !== null && _a !== void 0 ? _a : defaultPolicy;
|
|
52
|
+
return buildNumber(spec, value, policy);
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
/**
|
|
56
|
+
* Create a set of per-property CSS-value helpers, layered on the scalar
|
|
57
|
+
* primitives `i()` / `f()`. Each helper constrains its number against the
|
|
58
|
+
* property's bound and accepts that property's keyword companions, returning a
|
|
59
|
+
* `.css()`-renderable {@link CssValue} typed against csstype.
|
|
60
|
+
*
|
|
61
|
+
* `config.outOfRange` is the instance-wide default for out-of-range numbers
|
|
62
|
+
* (`'throw'`, the default, or `'clamp'`); a per-call `opts.outOfRange` overrides
|
|
63
|
+
* it. The package's bare `opacity` / `zIndex` / ... exports are this factory at
|
|
64
|
+
* its defaults.
|
|
65
|
+
*/
|
|
66
|
+
export const createCssValues = (config = {}) => {
|
|
67
|
+
var _a;
|
|
68
|
+
const defaultPolicy = (_a = config.outOfRange) !== null && _a !== void 0 ? _a : 'throw';
|
|
69
|
+
const helpers = {};
|
|
70
|
+
for (const spec of CSS_VALUE_SPEC) {
|
|
71
|
+
helpers[spec.name] = makeHelper(spec, defaultPolicy);
|
|
72
|
+
}
|
|
73
|
+
return helpers;
|
|
74
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { createCssValues, type CssValue, type CssValueHelper, type CssValueOptions, type CssValues, type CssValuesConfig, type OutOfRange, } from './cssValues';
|
|
2
|
+
export { borderImageOutset, borderImageSlice, borderImageWidth, type CounterEntry, counterIncrement, counterReset, counterSet, gridColumnEnd, gridColumnStart, type GridLineInput, gridRowEnd, gridRowStart, maskBorderOutset, maskBorderSlice, maskBorderWidth, type MultiCssValue, type MultiPropertyKey, type MultiPropertyValueMap, type NumberOrLength, scale, span, type SpanInput, strokeDasharray, strokeDashoffset, strokeWidth, tabSize, } from './multi';
|
|
3
|
+
export { type CssPropertyKey, type PropertyValueMap, } from './propertyMap';
|
|
4
|
+
export { CSS_VALUE_SPEC, type CssValueSpec, type SpecRow, } from './spec';
|
|
5
|
+
export declare const animationIterationCount: import("./cssValues").CssValueHelper<"AnimationIterationCount", "infinite">, columnCount: import("./cssValues").CssValueHelper<"ColumnCount", "auto">, fillOpacity: import("./cssValues").CssValueHelper<"FillOpacity", never>, flexGrow: import("./cssValues").CssValueHelper<"FlexGrow", never>, flexShrink: import("./cssValues").CssValueHelper<"FlexShrink", never>, floodOpacity: import("./cssValues").CssValueHelper<"FloodOpacity", never>, fontSizeAdjust: import("./cssValues").CssValueHelper<"FontSizeAdjust", "from-font" | "none">, fontWeight: import("./cssValues").CssValueHelper<"FontWeight", "normal" | "bold" | "bolder" | "lighter">, lineClamp: import("./cssValues").CssValueHelper<"WebkitLineClamp", "none">, lineHeight: import("./cssValues").CssValueHelper<"LineHeight", "normal">, mathDepth: import("./cssValues").CssValueHelper<"MathDepth", "auto-add">, opacity: import("./cssValues").CssValueHelper<"Opacity", never>, order: import("./cssValues").CssValueHelper<"Order", never>, orphans: import("./cssValues").CssValueHelper<"Orphans", never>, shapeImageThreshold: import("./cssValues").CssValueHelper<"ShapeImageThreshold", never>, stopOpacity: import("./cssValues").CssValueHelper<"StopOpacity", never>, strokeMiterlimit: import("./cssValues").CssValueHelper<"StrokeMiterlimit", never>, strokeOpacity: import("./cssValues").CssValueHelper<"StrokeOpacity", never>, widows: import("./cssValues").CssValueHelper<"Widows", never>, zIndex: import("./cssValues").CssValueHelper<"ZIndex", "auto">, zoom: import("./cssValues").CssValueHelper<"Zoom", never>;
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/css-values/index.ts"],"names":[],"mappings":"AAOA,OAAO,EACL,eAAe,EACf,KAAK,QAAQ,EACb,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,SAAS,EACd,KAAK,eAAe,EACpB,KAAK,UAAU,GAChB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,EAChB,KAAK,YAAY,EACjB,gBAAgB,EAChB,YAAY,EACZ,UAAU,EACV,aAAa,EACb,eAAe,EACf,KAAK,aAAa,EAClB,UAAU,EACV,YAAY,EACZ,gBAAgB,EAChB,eAAe,EACf,eAAe,EACf,KAAK,aAAa,EAClB,KAAK,gBAAgB,EACrB,KAAK,qBAAqB,EAC1B,KAAK,cAAc,EACnB,KAAK,EACL,IAAI,EACJ,KAAK,SAAS,EACd,eAAe,EACf,gBAAgB,EAChB,WAAW,EACX,OAAO,GACR,MAAM,SAAS,CAAC;AACjB,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,gBAAgB,GACtB,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,cAAc,EACd,KAAK,YAAY,EACjB,KAAK,OAAO,GACb,MAAM,QAAQ,CAAC;AAKhB,eAAO,MACL,uBAAuB,+EACvB,WAAW,+DACX,WAAW,8DACX,QAAQ,2DACR,UAAU,6DACV,YAAY,+DACZ,cAAc,gFACd,UAAU,gGACV,SAAS,mEACT,UAAU,gEACV,SAAS,iEACT,OAAO,0DACP,KAAK,wDACL,OAAO,0DACP,mBAAmB,sEACnB,WAAW,8DACX,gBAAgB,mEAChB,aAAa,gEACb,MAAM,yDACN,MAAM,0DACN,IAAI,qDACM,CAAC"}
|