@clhaas/palette-kit 0.3.0 → 0.4.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/CHANGELOG.md +25 -0
- package/README.md +80 -87
- package/dist/contrast/contrast.d.ts +16 -0
- package/dist/contrast/contrast.js +102 -0
- package/dist/core/intent-registry.d.ts +11 -0
- package/dist/core/intent-registry.js +70 -0
- package/dist/core/oklch.d.ts +16 -0
- package/dist/core/oklch.js +56 -0
- package/dist/create-palette-kit.d.ts +9 -0
- package/dist/create-palette-kit.js +67 -0
- package/dist/engine/context/context.d.ts +13 -0
- package/dist/engine/context/context.js +37 -0
- package/dist/engine/level/curves.d.ts +17 -0
- package/dist/engine/level/curves.js +49 -0
- package/dist/engine/level/level.d.ts +4 -0
- package/dist/engine/level/level.js +13 -0
- package/dist/engine/relation/relation.d.ts +105 -0
- package/dist/engine/relation/relation.js +137 -0
- package/dist/engine/resolve/resolve.d.ts +36 -0
- package/dist/engine/resolve/resolve.js +116 -0
- package/dist/engine/state/state.d.ts +46 -0
- package/dist/engine/state/state.js +68 -0
- package/dist/engine/usage/fill.d.ts +9 -0
- package/dist/engine/usage/fill.js +9 -0
- package/dist/engine/usage/lines.d.ts +9 -0
- package/dist/engine/usage/lines.js +9 -0
- package/dist/engine/usage/overlays.d.ts +9 -0
- package/dist/engine/usage/overlays.js +9 -0
- package/dist/engine/usage/strategy.d.ts +56 -0
- package/dist/engine/usage/strategy.js +30 -0
- package/dist/engine/usage/visualVocabulary.d.ts +9 -0
- package/dist/engine/usage/visualVocabulary.js +9 -0
- package/dist/export/serialize.d.ts +14 -0
- package/dist/export/serialize.js +89 -0
- package/dist/export/types.d.ts +37 -0
- package/dist/export/types.js +31 -0
- package/dist/index.d.ts +3 -3
- package/dist/index.js +2 -2
- package/dist/operators/convert.d.ts +32 -0
- package/dist/operators/convert.js +80 -0
- package/dist/presets/presets.d.ts +95 -0
- package/dist/presets/presets.js +308 -0
- package/dist/types/index.d.ts +111 -187
- package/dist/utils/errors/errors.d.ts +17 -0
- package/dist/utils/errors/errors.js +22 -0
- package/docs/API.md +167 -0
- package/docs/Alpha.md +14 -0
- package/docs/Architecture.md +56 -0
- package/docs/CLI.md +22 -0
- package/docs/Concepts.md +73 -0
- package/docs/Config.md +144 -0
- package/docs/Diagnostics.md +22 -0
- package/docs/Exporters.md +33 -0
- package/docs/FAQ.md +59 -0
- package/docs/Migration.md +61 -0
- package/docs/Overlays.md +33 -0
- package/docs/README.md +60 -0
- package/docs/Text.md +41 -0
- package/docs/Tokens.md +42 -0
- package/docs/Usage-JSON.md +39 -0
- package/docs/Usage-ReactNative.md +63 -0
- package/docs/Usage-Web.md +66 -0
- package/docs/Validation.md +97 -0
- package/docs/Why.md +37 -0
- package/docs/_api-surface.md +53 -0
- package/docs/snippets/serialize-oklch.md +9 -0
- package/docs/spec.md +98 -0
- package/package.json +74 -59
- package/.codex/skills/color-pipeline-implementer/SKILL.md +0 -23
- package/.codex/skills/commit-message-crafter/SKILL.md +0 -63
- package/.codex/skills/commit-message-crafter/references/benchmarks.md +0 -20
- package/.codex/skills/contrast-solver-helper/SKILL.md +0 -20
- package/.codex/skills/exporters-builder/SKILL.md +0 -20
- package/.codex/skills/markdownlint-writer/SKILL.md +0 -32
- package/.codex/skills/phase-implementation-runbook/SKILL.md +0 -92
- package/.codex/skills/type-contract-auditor/SKILL.md +0 -21
- package/.github/skills/review-guide/SKILL.md +0 -23
- package/.github/skills/review-guide/references/review-guide-v0.3.md +0 -629
- package/.markdownlint.json +0 -4
- package/AGENTS.md +0 -16
- package/biome.json +0 -43
- package/dist/cli/args.d.ts +0 -12
- package/dist/cli/args.js +0 -56
- package/dist/cli/args.test.d.ts +0 -1
- package/dist/cli/args.test.js +0 -22
- package/dist/cli/codegen/__snapshots__/tokens.test.js.snap +0 -87
- package/dist/cli/codegen/tokens.d.ts +0 -12
- package/dist/cli/codegen/tokens.js +0 -139
- package/dist/cli/codegen/tokens.test.d.ts +0 -1
- package/dist/cli/codegen/tokens.test.js +0 -51
- package/dist/cli/config.d.ts +0 -40
- package/dist/cli/config.js +0 -34
- package/dist/cli/validate.d.ts +0 -2
- package/dist/cli/validate.js +0 -33
- package/dist/cli/validate.test.d.ts +0 -1
- package/dist/cli/validate.test.js +0 -40
- package/dist/cli.d.ts +0 -2
- package/dist/cli.js +0 -148
- package/dist/contrast/apca.d.ts +0 -2
- package/dist/contrast/apca.js +0 -15
- package/dist/contrast/apca.test.d.ts +0 -1
- package/dist/contrast/apca.test.js +0 -16
- package/dist/contrast/index.d.ts +0 -4
- package/dist/contrast/index.js +0 -4
- package/dist/contrast/scoring.d.ts +0 -4
- package/dist/contrast/scoring.js +0 -31
- package/dist/contrast/scoring.test.d.ts +0 -1
- package/dist/contrast/scoring.test.js +0 -148
- package/dist/contrast/solver.d.ts +0 -13
- package/dist/contrast/solver.js +0 -170
- package/dist/contrast/solver.test.d.ts +0 -1
- package/dist/contrast/solver.test.js +0 -75
- package/dist/contrast/types.d.ts +0 -17
- package/dist/contrast/types.js +0 -1
- package/dist/contrast/utils.d.ts +0 -4
- package/dist/contrast/utils.js +0 -18
- package/dist/contrast/wcag2.d.ts +0 -3
- package/dist/contrast/wcag2.js +0 -19
- package/dist/contrast/wcag2.test.d.ts +0 -1
- package/dist/contrast/wcag2.test.js +0 -17
- package/dist/core/createTheme.d.ts +0 -35
- package/dist/core/createTheme.js +0 -24
- package/dist/core/dx-helpers.test.d.ts +0 -1
- package/dist/core/dx-helpers.test.js +0 -61
- package/dist/core/index.d.ts +0 -2
- package/dist/core/index.js +0 -2
- package/dist/core/onSolid.test.d.ts +0 -1
- package/dist/core/onSolid.test.js +0 -118
- package/dist/core/qa.v1.test.d.ts +0 -1
- package/dist/core/qa.v1.test.js +0 -112
- package/dist/core/resolve.d.ts +0 -3
- package/dist/core/resolve.js +0 -8
- package/dist/core/resolve.test.d.ts +0 -1
- package/dist/core/resolve.test.js +0 -89
- package/dist/core/resolveMany.d.ts +0 -8
- package/dist/core/resolveMany.js +0 -17
- package/dist/core/tokenRegistry.d.ts +0 -23
- package/dist/core/tokenRegistry.js +0 -83
- package/dist/core/tokenRegistry.test.d.ts +0 -1
- package/dist/core/tokenRegistry.test.js +0 -133
- package/dist/engine/applyOperators.d.ts +0 -3
- package/dist/engine/applyOperators.js +0 -23
- package/dist/engine/context.d.ts +0 -4
- package/dist/engine/context.js +0 -1
- package/dist/engine/gamut.d.ts +0 -13
- package/dist/engine/gamut.js +0 -101
- package/dist/engine/gamut.test.d.ts +0 -1
- package/dist/engine/gamut.test.js +0 -23
- package/dist/engine/generateScale.d.ts +0 -15
- package/dist/engine/generateScale.js +0 -29
- package/dist/engine/generateScale.test.d.ts +0 -1
- package/dist/engine/generateScale.test.js +0 -32
- package/dist/engine/index.d.ts +0 -8
- package/dist/engine/index.js +0 -4
- package/dist/engine/normalize.d.ts +0 -43
- package/dist/engine/normalize.js +0 -403
- package/dist/engine/normalize.test.d.ts +0 -1
- package/dist/engine/normalize.test.js +0 -136
- package/dist/engine/onSolid.d.ts +0 -3
- package/dist/engine/onSolid.js +0 -110
- package/dist/engine/resolveBaseColor.d.ts +0 -25
- package/dist/engine/resolveBaseColor.js +0 -127
- package/dist/engine/resolveBaseColor.test.d.ts +0 -1
- package/dist/engine/resolveBaseColor.test.js +0 -97
- package/dist/export/__snapshots__/exportTheme.test.js.snap +0 -74
- package/dist/export/exportTheme.d.ts +0 -47
- package/dist/export/exportTheme.js +0 -170
- package/dist/export/exportTheme.test.d.ts +0 -1
- package/dist/export/exportTheme.test.js +0 -118
- package/dist/export/index.d.ts +0 -1
- package/dist/export/index.js +0 -1
- package/dist/export/serializeColor.d.ts +0 -1
- package/dist/export/serializeColor.js +0 -1
- package/dist/export/serializeColor.test.d.ts +0 -1
- package/dist/export/serializeColor.test.js +0 -54
- package/dist/export.d.ts +0 -1
- package/dist/export.js +0 -1
- package/dist/operators/emphasis.d.ts +0 -3
- package/dist/operators/emphasis.js +0 -113
- package/dist/operators/emphasis.test.d.ts +0 -1
- package/dist/operators/emphasis.test.js +0 -69
- package/dist/operators/index.d.ts +0 -3
- package/dist/operators/index.js +0 -2
- package/dist/operators/state.d.ts +0 -3
- package/dist/operators/state.js +0 -102
- package/dist/operators/state.test.d.ts +0 -1
- package/dist/operators/state.test.js +0 -48
- package/dist/operators/types.d.ts +0 -13
- package/dist/operators/types.js +0 -1
- package/dist/operators/utils.d.ts +0 -16
- package/dist/operators/utils.js +0 -23
- package/dist/presets/curves.d.ts +0 -28
- package/dist/presets/curves.js +0 -145
- package/dist/presets/index.d.ts +0 -2
- package/dist/presets/index.js +0 -1
- package/dist/presets/tokens/index.d.ts +0 -3
- package/dist/presets/tokens/index.js +0 -3
- package/dist/presets/tokens/minimal-ui.d.ts +0 -6
- package/dist/presets/tokens/minimal-ui.js +0 -53
- package/dist/presets/tokens/modern-ui.d.ts +0 -5
- package/dist/presets/tokens/modern-ui.js +0 -83
- package/dist/presets/tokens/presets.test.d.ts +0 -1
- package/dist/presets/tokens/presets.test.js +0 -31
- package/dist/presets/tokens/radixLike-ui.d.ts +0 -6
- package/dist/presets/tokens/radixLike-ui.js +0 -77
- package/dist/serialize/index.d.ts +0 -1
- package/dist/serialize/index.js +0 -1
- package/dist/serialize/normalizeOutput.d.ts +0 -6
- package/dist/serialize/normalizeOutput.js +0 -45
- package/dist/serialize/serializeColor.d.ts +0 -21
- package/dist/serialize/serializeColor.js +0 -178
- package/dist/serialize/serializeResolved.test.d.ts +0 -1
- package/dist/serialize/serializeResolved.test.js +0 -45
- package/dist/serialize.d.ts +0 -1
- package/dist/serialize.js +0 -1
- package/dist/utils/clamp.d.ts +0 -1
- package/dist/utils/clamp.js +0 -1
- package/dist/utils/index.d.ts +0 -1
- package/dist/utils/index.js +0 -1
- package/dist/utils/lerp.d.ts +0 -1
- package/dist/utils/lerp.js +0 -1
- package/dist/utils/parseColor.d.ts +0 -6
- package/dist/utils/parseColor.js +0 -67
- package/dist/utils/parseColor.test.d.ts +0 -1
- package/dist/utils/parseColor.test.js +0 -51
- package/dist/utils/smoothstep.d.ts +0 -1
- package/dist/utils/smoothstep.js +0 -5
- package/planning/phase-10-review.md +0 -550
- package/planning/phase-7-review.md +0 -411
- package/planning/phase-8-review.md +0 -669
- package/planning/phase-9-review.md +0 -564
- package/planning/roadmap-v0.3.md +0 -284
- package/planning/spec-serializer-v0.3.md +0 -324
- package/planning/spec-v0.3.md +0 -305
- package/src/cli/args.test.ts +0 -28
- package/src/cli/args.ts +0 -66
- package/src/cli/codegen/__snapshots__/tokens.test.ts.snap +0 -87
- package/src/cli/codegen/tokens.test.ts +0 -61
- package/src/cli/codegen/tokens.ts +0 -191
- package/src/cli/config.ts +0 -71
- package/src/cli/validate.test.ts +0 -49
- package/src/cli/validate.ts +0 -38
- package/src/cli.ts +0 -183
- package/src/contrast/apca.test.ts +0 -20
- package/src/contrast/apca.ts +0 -26
- package/src/contrast/index.ts +0 -4
- package/src/contrast/scoring.test.ts +0 -188
- package/src/contrast/scoring.ts +0 -48
- package/src/contrast/solver.test.ts +0 -147
- package/src/contrast/solver.ts +0 -235
- package/src/contrast/types.ts +0 -20
- package/src/contrast/utils.ts +0 -28
- package/src/contrast/wcag2.test.ts +0 -21
- package/src/contrast/wcag2.ts +0 -24
- package/src/core/createTheme.ts +0 -78
- package/src/core/dx-helpers.test.ts +0 -82
- package/src/core/index.ts +0 -7
- package/src/core/onSolid.test.ts +0 -146
- package/src/core/qa.v1.test.ts +0 -149
- package/src/core/resolve.test.ts +0 -99
- package/src/core/resolve.ts +0 -11
- package/src/core/resolveMany.ts +0 -22
- package/src/core/tokenRegistry.test.ts +0 -153
- package/src/core/tokenRegistry.ts +0 -114
- package/src/engine/applyOperators.ts +0 -32
- package/src/engine/context.ts +0 -8
- package/src/engine/gamut.test.ts +0 -30
- package/src/engine/gamut.ts +0 -144
- package/src/engine/generateScale.test.ts +0 -46
- package/src/engine/generateScale.ts +0 -48
- package/src/engine/index.ts +0 -8
- package/src/engine/normalize.test.ts +0 -222
- package/src/engine/normalize.ts +0 -550
- package/src/engine/onSolid.ts +0 -178
- package/src/engine/resolveBaseColor.test.ts +0 -117
- package/src/engine/resolveBaseColor.ts +0 -203
- package/src/export/__snapshots__/exportTheme.test.ts.snap +0 -74
- package/src/export/exportTheme.test.ts +0 -144
- package/src/export/exportTheme.ts +0 -251
- package/src/export/index.ts +0 -1
- package/src/export/serializeColor.test.ts +0 -73
- package/src/export/serializeColor.ts +0 -1
- package/src/export.ts +0 -1
- package/src/index.ts +0 -3
- package/src/operators/emphasis.test.ts +0 -85
- package/src/operators/emphasis.ts +0 -132
- package/src/operators/index.ts +0 -3
- package/src/operators/state.test.ts +0 -66
- package/src/operators/state.ts +0 -122
- package/src/operators/types.ts +0 -14
- package/src/operators/utils.ts +0 -44
- package/src/presets/curves.ts +0 -168
- package/src/presets/index.ts +0 -2
- package/src/presets/tokens/index.ts +0 -3
- package/src/presets/tokens/minimal-ui.ts +0 -55
- package/src/presets/tokens/modern-ui.ts +0 -85
- package/src/presets/tokens/presets.test.ts +0 -46
- package/src/presets/tokens/radixLike-ui.ts +0 -79
- package/src/serialize/index.ts +0 -1
- package/src/serialize/normalizeOutput.ts +0 -63
- package/src/serialize/serializeColor.ts +0 -260
- package/src/serialize/serializeResolved.test.ts +0 -57
- package/src/serialize.ts +0 -1
- package/src/types/index.ts +0 -207
- package/src/utils/clamp.ts +0 -2
- package/src/utils/index.ts +0 -1
- package/src/utils/lerp.ts +0 -1
- package/src/utils/parseColor.test.ts +0 -66
- package/src/utils/parseColor.ts +0 -87
- package/src/utils/smoothstep.ts +0 -6
- package/tsconfig.build.json +0 -11
- package/tsconfig.json +0 -15
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { assertLevel } from './level.js';
|
|
2
|
+
const fillLevelTargets = Object.freeze({
|
|
3
|
+
1: 98,
|
|
4
|
+
2: 96,
|
|
5
|
+
3: 94,
|
|
6
|
+
4: 91,
|
|
7
|
+
5: 88,
|
|
8
|
+
6: 84,
|
|
9
|
+
7: 79,
|
|
10
|
+
8: 73,
|
|
11
|
+
9: 66,
|
|
12
|
+
});
|
|
13
|
+
const linesLevelTargets = Object.freeze({
|
|
14
|
+
1: 96,
|
|
15
|
+
2: 95,
|
|
16
|
+
3: 94,
|
|
17
|
+
4: 92,
|
|
18
|
+
5: 90,
|
|
19
|
+
6: 88,
|
|
20
|
+
7: 86,
|
|
21
|
+
8: 84,
|
|
22
|
+
9: 82,
|
|
23
|
+
});
|
|
24
|
+
const overlayLevelTargets = Object.freeze({
|
|
25
|
+
1: Object.freeze({ luminanceDelta: 1 }),
|
|
26
|
+
2: Object.freeze({ luminanceDelta: 2 }),
|
|
27
|
+
3: Object.freeze({ luminanceDelta: 3 }),
|
|
28
|
+
4: Object.freeze({ luminanceDelta: 4 }),
|
|
29
|
+
5: Object.freeze({ luminanceDelta: 5 }),
|
|
30
|
+
6: Object.freeze({ luminanceDelta: 6 }),
|
|
31
|
+
7: Object.freeze({ luminanceDelta: 7 }),
|
|
32
|
+
8: Object.freeze({ luminanceDelta: 8 }),
|
|
33
|
+
9: Object.freeze({ luminanceDelta: 9 }),
|
|
34
|
+
});
|
|
35
|
+
const resolveContextualLightness = (lightness, context) => context === 'dark' ? 100 - lightness : lightness;
|
|
36
|
+
export const defaultLevelCurves = Object.freeze({
|
|
37
|
+
fill(level, context) {
|
|
38
|
+
assertLevel(level);
|
|
39
|
+
return resolveContextualLightness(fillLevelTargets[level], context);
|
|
40
|
+
},
|
|
41
|
+
lines(level, context) {
|
|
42
|
+
assertLevel(level);
|
|
43
|
+
return resolveContextualLightness(linesLevelTargets[level], context);
|
|
44
|
+
},
|
|
45
|
+
overlays(level, _context) {
|
|
46
|
+
assertLevel(level);
|
|
47
|
+
return overlayLevelTargets[level];
|
|
48
|
+
},
|
|
49
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export const LEVELS = Object.freeze([1, 2, 3, 4, 5, 6, 7, 8, 9]);
|
|
2
|
+
const formatInvalidLevelError = (value) => `Invalid level "${String(value)}". Expected an integer from 1 to 9.`;
|
|
3
|
+
export function isLevel(value) {
|
|
4
|
+
return (typeof value === 'number' &&
|
|
5
|
+
Number.isInteger(value) &&
|
|
6
|
+
value >= 1 &&
|
|
7
|
+
value <= 9);
|
|
8
|
+
}
|
|
9
|
+
export function assertLevel(value) {
|
|
10
|
+
if (!isLevel(value)) {
|
|
11
|
+
throw new Error(formatInvalidLevelError(value));
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { type OklchColor } from '../../core/oklch.js';
|
|
2
|
+
import { type ResolverConfig } from '../../presets/presets.js';
|
|
3
|
+
import type { Context } from '../context/context.js';
|
|
4
|
+
import type { Level } from '../level/level.js';
|
|
5
|
+
import { type Usage } from '../usage/strategy.js';
|
|
6
|
+
export declare const RELATIONS: readonly ["on", "over", "under"];
|
|
7
|
+
export type Relation = (typeof RELATIONS)[number];
|
|
8
|
+
export type RelationAvailability = 'required' | 'optional' | 'forbidden';
|
|
9
|
+
export type RelationTarget = Readonly<OklchColor>;
|
|
10
|
+
export type RelationOptions = Readonly<{
|
|
11
|
+
on?: RelationTarget;
|
|
12
|
+
over?: RelationTarget;
|
|
13
|
+
under?: RelationTarget;
|
|
14
|
+
}>;
|
|
15
|
+
export type ResolvedRelation<R extends Relation = Relation> = Readonly<{
|
|
16
|
+
relation: R;
|
|
17
|
+
target: RelationTarget;
|
|
18
|
+
}>;
|
|
19
|
+
export type RelationApplicationInput = Readonly<{
|
|
20
|
+
usage: Usage;
|
|
21
|
+
color: RelationTarget;
|
|
22
|
+
context?: Context;
|
|
23
|
+
level?: Level;
|
|
24
|
+
resolverConfig?: ResolverConfig;
|
|
25
|
+
relations?: RelationOptions;
|
|
26
|
+
}>;
|
|
27
|
+
export type RelationApplicationResult = Readonly<{
|
|
28
|
+
color: RelationTarget;
|
|
29
|
+
relation?: ResolvedRelation;
|
|
30
|
+
}>;
|
|
31
|
+
export type RelationApplicationHookInput = Readonly<{
|
|
32
|
+
color: RelationTarget;
|
|
33
|
+
context: Context;
|
|
34
|
+
relation: ResolvedRelation;
|
|
35
|
+
level?: Level;
|
|
36
|
+
resolverConfig: ResolverConfig;
|
|
37
|
+
}>;
|
|
38
|
+
export type RelationApplicationHook = (input: RelationApplicationHookInput) => RelationApplicationResult;
|
|
39
|
+
export declare const relationCompatibility: Readonly<{
|
|
40
|
+
fill: Readonly<{
|
|
41
|
+
on: "optional";
|
|
42
|
+
over: "forbidden";
|
|
43
|
+
under: "forbidden";
|
|
44
|
+
}>;
|
|
45
|
+
lines: Readonly<{
|
|
46
|
+
on: "optional";
|
|
47
|
+
over: "forbidden";
|
|
48
|
+
under: "forbidden";
|
|
49
|
+
}>;
|
|
50
|
+
overlays: Readonly<{
|
|
51
|
+
on: "forbidden";
|
|
52
|
+
over: "optional";
|
|
53
|
+
under: "optional";
|
|
54
|
+
}>;
|
|
55
|
+
visualVocabulary: Readonly<{
|
|
56
|
+
on: "required";
|
|
57
|
+
over: "forbidden";
|
|
58
|
+
under: "forbidden";
|
|
59
|
+
}>;
|
|
60
|
+
}>;
|
|
61
|
+
export declare function isRelation(value: unknown): value is Relation;
|
|
62
|
+
export declare function assertRelation(value: unknown): asserts value is Relation;
|
|
63
|
+
export declare function validateRelationOptions(usage: Usage, relations?: RelationOptions): ResolvedRelation | undefined;
|
|
64
|
+
export declare const relationApplicationHooks: Readonly<{
|
|
65
|
+
on(input: Readonly<{
|
|
66
|
+
color: RelationTarget;
|
|
67
|
+
context: Context;
|
|
68
|
+
relation: ResolvedRelation;
|
|
69
|
+
level?: Level;
|
|
70
|
+
resolverConfig: ResolverConfig;
|
|
71
|
+
}>): Readonly<{
|
|
72
|
+
color: OklchColor;
|
|
73
|
+
relation: Readonly<{
|
|
74
|
+
relation: "on" | "over" | "under";
|
|
75
|
+
target: RelationTarget;
|
|
76
|
+
}>;
|
|
77
|
+
}>;
|
|
78
|
+
over(input: Readonly<{
|
|
79
|
+
color: RelationTarget;
|
|
80
|
+
context: Context;
|
|
81
|
+
relation: ResolvedRelation;
|
|
82
|
+
level?: Level;
|
|
83
|
+
resolverConfig: ResolverConfig;
|
|
84
|
+
}>): Readonly<{
|
|
85
|
+
color: OklchColor;
|
|
86
|
+
relation: Readonly<{
|
|
87
|
+
relation: "on" | "over" | "under";
|
|
88
|
+
target: RelationTarget;
|
|
89
|
+
}>;
|
|
90
|
+
}>;
|
|
91
|
+
under(input: Readonly<{
|
|
92
|
+
color: RelationTarget;
|
|
93
|
+
context: Context;
|
|
94
|
+
relation: ResolvedRelation;
|
|
95
|
+
level?: Level;
|
|
96
|
+
resolverConfig: ResolverConfig;
|
|
97
|
+
}>): Readonly<{
|
|
98
|
+
color: OklchColor;
|
|
99
|
+
relation: Readonly<{
|
|
100
|
+
relation: "on" | "over" | "under";
|
|
101
|
+
target: RelationTarget;
|
|
102
|
+
}>;
|
|
103
|
+
}>;
|
|
104
|
+
}>;
|
|
105
|
+
export declare function applyRelation(input: RelationApplicationInput): RelationApplicationResult;
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import { resolveOnContrast } from '../../contrast/contrast.js';
|
|
2
|
+
import { isOklchColor, normalizeOklch, } from '../../core/oklch.js';
|
|
3
|
+
import { defaultResolverConfig, } from '../../presets/presets.js';
|
|
4
|
+
import { createForbiddenAxisCombinationError, createInvalidRelationTargetError, createMissingRequiredAxisError, createMultipleRelationsError, } from '../../utils/errors/errors.js';
|
|
5
|
+
import { assertUsage } from '../usage/strategy.js';
|
|
6
|
+
export const RELATIONS = Object.freeze(['on', 'over', 'under']);
|
|
7
|
+
const fillRelationCompatibility = Object.freeze({
|
|
8
|
+
on: 'optional',
|
|
9
|
+
over: 'forbidden',
|
|
10
|
+
under: 'forbidden',
|
|
11
|
+
});
|
|
12
|
+
const visualVocabularyRelationCompatibility = Object.freeze({
|
|
13
|
+
on: 'required',
|
|
14
|
+
over: 'forbidden',
|
|
15
|
+
under: 'forbidden',
|
|
16
|
+
});
|
|
17
|
+
const linesRelationCompatibility = Object.freeze({
|
|
18
|
+
on: 'optional',
|
|
19
|
+
over: 'forbidden',
|
|
20
|
+
under: 'forbidden',
|
|
21
|
+
});
|
|
22
|
+
const overlaysRelationCompatibility = Object.freeze({
|
|
23
|
+
on: 'forbidden',
|
|
24
|
+
over: 'optional',
|
|
25
|
+
under: 'optional',
|
|
26
|
+
});
|
|
27
|
+
export const relationCompatibility = Object.freeze({
|
|
28
|
+
fill: fillRelationCompatibility,
|
|
29
|
+
lines: linesRelationCompatibility,
|
|
30
|
+
overlays: overlaysRelationCompatibility,
|
|
31
|
+
visualVocabulary: visualVocabularyRelationCompatibility,
|
|
32
|
+
});
|
|
33
|
+
const relationList = RELATIONS.join(', ');
|
|
34
|
+
const formatInvalidRelationError = (value) => `Invalid relation "${String(value)}". Expected one of: ${relationList}.`;
|
|
35
|
+
export function isRelation(value) {
|
|
36
|
+
return (typeof value === 'string' &&
|
|
37
|
+
RELATIONS.includes(value));
|
|
38
|
+
}
|
|
39
|
+
export function assertRelation(value) {
|
|
40
|
+
if (!isRelation(value)) {
|
|
41
|
+
throw new Error(formatInvalidRelationError(value));
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
function assertRelationTarget(relation, target) {
|
|
45
|
+
if (!isOklchColor(target)) {
|
|
46
|
+
throw createInvalidRelationTargetError(relation);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
const getProvidedRelations = (relations) => RELATIONS.filter((relation) => relations[relation] !== undefined);
|
|
50
|
+
export function validateRelationOptions(usage, relations = {}) {
|
|
51
|
+
assertUsage(usage);
|
|
52
|
+
const providedRelations = getProvidedRelations(relations);
|
|
53
|
+
if (providedRelations.length > 1) {
|
|
54
|
+
throw createMultipleRelationsError(providedRelations);
|
|
55
|
+
}
|
|
56
|
+
const requiredRelation = RELATIONS.find((relation) => relationCompatibility[usage][relation] === 'required');
|
|
57
|
+
if (providedRelations.length === 0) {
|
|
58
|
+
if (requiredRelation !== undefined) {
|
|
59
|
+
throw createMissingRequiredAxisError(`Relation "${requiredRelation}"`, usage);
|
|
60
|
+
}
|
|
61
|
+
return undefined;
|
|
62
|
+
}
|
|
63
|
+
const relation = providedRelations[0];
|
|
64
|
+
if (relation === undefined) {
|
|
65
|
+
return undefined;
|
|
66
|
+
}
|
|
67
|
+
const availability = relationCompatibility[usage][relation];
|
|
68
|
+
if (availability === 'forbidden') {
|
|
69
|
+
throw createForbiddenAxisCombinationError(`Relation "${relation}"`, usage);
|
|
70
|
+
}
|
|
71
|
+
const target = relations[relation];
|
|
72
|
+
assertRelationTarget(relation, target);
|
|
73
|
+
return Object.freeze({
|
|
74
|
+
relation,
|
|
75
|
+
target,
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
export const relationApplicationHooks = Object.freeze({
|
|
79
|
+
on(input) {
|
|
80
|
+
return Object.freeze({
|
|
81
|
+
color: resolveOnContrast({
|
|
82
|
+
color: input.color,
|
|
83
|
+
config: {
|
|
84
|
+
chromaLimits: input.resolverConfig.chromaLimits,
|
|
85
|
+
on: input.resolverConfig.relationParams.on,
|
|
86
|
+
},
|
|
87
|
+
context: input.context,
|
|
88
|
+
target: input.relation.target,
|
|
89
|
+
}),
|
|
90
|
+
relation: input.relation,
|
|
91
|
+
});
|
|
92
|
+
},
|
|
93
|
+
over(input) {
|
|
94
|
+
const alpha = input.level === undefined
|
|
95
|
+
? input.color.alpha
|
|
96
|
+
: input.resolverConfig.relationParams.over.baseAlphaByLevel[input.level];
|
|
97
|
+
return Object.freeze({
|
|
98
|
+
color: normalizeOklch({
|
|
99
|
+
...input.color,
|
|
100
|
+
alpha,
|
|
101
|
+
}),
|
|
102
|
+
relation: input.relation,
|
|
103
|
+
});
|
|
104
|
+
},
|
|
105
|
+
under(input) {
|
|
106
|
+
const alpha = input.level === undefined
|
|
107
|
+
? input.color.alpha
|
|
108
|
+
: input.resolverConfig.relationParams.under.baseAlphaByLevel[input.level];
|
|
109
|
+
const luminanceReduction = input.resolverConfig.relationParams.under.luminanceReduction;
|
|
110
|
+
return Object.freeze({
|
|
111
|
+
color: normalizeOklch({
|
|
112
|
+
...input.color,
|
|
113
|
+
alpha,
|
|
114
|
+
l: Math.max(0, input.color.l - luminanceReduction),
|
|
115
|
+
}),
|
|
116
|
+
relation: input.relation,
|
|
117
|
+
});
|
|
118
|
+
},
|
|
119
|
+
});
|
|
120
|
+
export function applyRelation(input) {
|
|
121
|
+
if (!isOklchColor(input.color)) {
|
|
122
|
+
throw createInvalidRelationTargetError('input', 'Relation input color must be a normalized OKLCH color.');
|
|
123
|
+
}
|
|
124
|
+
const relation = validateRelationOptions(input.usage, input.relations);
|
|
125
|
+
if (relation === undefined) {
|
|
126
|
+
return Object.freeze({
|
|
127
|
+
color: input.color,
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
return relationApplicationHooks[relation.relation]({
|
|
131
|
+
color: input.color,
|
|
132
|
+
context: input.context ?? 'light',
|
|
133
|
+
level: input.level,
|
|
134
|
+
relation,
|
|
135
|
+
resolverConfig: input.resolverConfig ?? defaultResolverConfig,
|
|
136
|
+
});
|
|
137
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { type IntentName, type IntentRegistry } from '../../core/intent-registry.js';
|
|
2
|
+
import { type OklchColor } from '../../core/oklch.js';
|
|
3
|
+
import { type ResolverConfig } from '../../presets/presets.js';
|
|
4
|
+
import { type Context } from '../context/context.js';
|
|
5
|
+
import { type Level } from '../level/level.js';
|
|
6
|
+
import { type RelationOptions, type ResolvedRelation } from '../relation/relation.js';
|
|
7
|
+
import { type State, type StateDeltaDirection } from '../state/state.js';
|
|
8
|
+
import { type Usage } from '../usage/strategy.js';
|
|
9
|
+
export type ResolveColorOptions = Readonly<{
|
|
10
|
+
intentRegistry: IntentRegistry;
|
|
11
|
+
usage: unknown;
|
|
12
|
+
intent: IntentName;
|
|
13
|
+
level?: unknown;
|
|
14
|
+
on?: RelationOptions['on'];
|
|
15
|
+
over?: RelationOptions['over'];
|
|
16
|
+
under?: RelationOptions['under'];
|
|
17
|
+
state?: unknown;
|
|
18
|
+
stateDirection?: StateDeltaDirection;
|
|
19
|
+
resolverContext?: unknown;
|
|
20
|
+
paletteContext?: unknown;
|
|
21
|
+
systemDefaultContext?: unknown;
|
|
22
|
+
resolverConfig?: ResolverConfig;
|
|
23
|
+
}>;
|
|
24
|
+
export type ResolvedColorAxes = Readonly<{
|
|
25
|
+
usage: Usage;
|
|
26
|
+
intent: IntentName;
|
|
27
|
+
context: Context;
|
|
28
|
+
level?: Level;
|
|
29
|
+
state: State;
|
|
30
|
+
relation?: ResolvedRelation;
|
|
31
|
+
}>;
|
|
32
|
+
export type ResolvedColor = Readonly<{
|
|
33
|
+
color: OklchColor;
|
|
34
|
+
axes: ResolvedColorAxes;
|
|
35
|
+
}>;
|
|
36
|
+
export declare function resolveColor(options: ResolveColorOptions): ResolvedColor;
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { getIntent, } from '../../core/intent-registry.js';
|
|
2
|
+
import { normalizeOklch } from '../../core/oklch.js';
|
|
3
|
+
import { defaultResolverConfig, } from '../../presets/presets.js';
|
|
4
|
+
import { createForbiddenAxisCombinationError, createMissingRequiredAxisError, } from '../../utils/errors/errors.js';
|
|
5
|
+
import { createContextCurveHook, resolveContext, } from '../context/context.js';
|
|
6
|
+
import { assertLevel } from '../level/level.js';
|
|
7
|
+
import { applyRelation, } from '../relation/relation.js';
|
|
8
|
+
import { applyStateAlphaDelta, applyStateDelta, assertState, } from '../state/state.js';
|
|
9
|
+
import { assertUsage, getUsageStrategy, } from '../usage/strategy.js';
|
|
10
|
+
const contextCurve = createContextCurveHook({
|
|
11
|
+
dark: 0,
|
|
12
|
+
light: 0,
|
|
13
|
+
});
|
|
14
|
+
function assertStateDeltaDirection(value) {
|
|
15
|
+
if (value !== 'increase' && value !== 'decrease') {
|
|
16
|
+
throw new Error(`Invalid stateDirection "${String(value)}". Expected one of: increase, decrease.`);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
const resolveLevel = (usage, level) => {
|
|
20
|
+
if (usage === 'visualVocabulary') {
|
|
21
|
+
if (level !== undefined) {
|
|
22
|
+
throw createForbiddenAxisCombinationError('Level', 'visualVocabulary');
|
|
23
|
+
}
|
|
24
|
+
return undefined;
|
|
25
|
+
}
|
|
26
|
+
if (level === undefined) {
|
|
27
|
+
throw createMissingRequiredAxisError('Level', usage);
|
|
28
|
+
}
|
|
29
|
+
assertLevel(level);
|
|
30
|
+
return level;
|
|
31
|
+
};
|
|
32
|
+
const resolveBaseLightness = (usage, level, context, resolverConfig) => {
|
|
33
|
+
if (usage === 'fill') {
|
|
34
|
+
return resolverConfig.levelCurves.fill(level, context);
|
|
35
|
+
}
|
|
36
|
+
if (usage === 'lines') {
|
|
37
|
+
return resolverConfig.levelCurves.lines(level, context);
|
|
38
|
+
}
|
|
39
|
+
if (usage === 'overlays') {
|
|
40
|
+
return (50 +
|
|
41
|
+
resolverConfig.levelCurves.overlays(level, context)
|
|
42
|
+
.luminanceDelta);
|
|
43
|
+
}
|
|
44
|
+
return 50;
|
|
45
|
+
};
|
|
46
|
+
const resolveStateDirection = (state, stateDirection) => {
|
|
47
|
+
if (state === 'default') {
|
|
48
|
+
if (stateDirection !== undefined) {
|
|
49
|
+
assertStateDeltaDirection(stateDirection);
|
|
50
|
+
}
|
|
51
|
+
return stateDirection ?? 'increase';
|
|
52
|
+
}
|
|
53
|
+
if (stateDirection === undefined) {
|
|
54
|
+
throw createMissingRequiredAxisError('stateDirection', 'state', 'stateDirection is required when state is not "default".');
|
|
55
|
+
}
|
|
56
|
+
assertStateDeltaDirection(stateDirection);
|
|
57
|
+
return stateDirection;
|
|
58
|
+
};
|
|
59
|
+
export function resolveColor(options) {
|
|
60
|
+
assertUsage(options.usage);
|
|
61
|
+
const resolverConfig = options.resolverConfig ?? defaultResolverConfig;
|
|
62
|
+
const stateInput = options.state ?? 'default';
|
|
63
|
+
assertState(stateInput);
|
|
64
|
+
const context = resolveContext({
|
|
65
|
+
paletteContext: options.paletteContext,
|
|
66
|
+
resolverContext: options.resolverContext,
|
|
67
|
+
systemDefaultContext: options.systemDefaultContext,
|
|
68
|
+
});
|
|
69
|
+
const level = resolveLevel(options.usage, options.level);
|
|
70
|
+
const intent = getIntent(options.intentRegistry, options.intent);
|
|
71
|
+
const usageResult = getUsageStrategy(options.usage).resolve({ intent });
|
|
72
|
+
const baseLightness = resolveBaseLightness(options.usage, level, context, resolverConfig);
|
|
73
|
+
const baseColor = normalizeOklch({
|
|
74
|
+
alpha: 1,
|
|
75
|
+
c: usageResult.intent.chroma,
|
|
76
|
+
h: usageResult.intent.hue,
|
|
77
|
+
l: baseLightness,
|
|
78
|
+
});
|
|
79
|
+
const relationResult = applyRelation({
|
|
80
|
+
color: baseColor,
|
|
81
|
+
context,
|
|
82
|
+
level,
|
|
83
|
+
relations: {
|
|
84
|
+
on: options.on,
|
|
85
|
+
over: options.over,
|
|
86
|
+
under: options.under,
|
|
87
|
+
},
|
|
88
|
+
resolverConfig,
|
|
89
|
+
usage: options.usage,
|
|
90
|
+
});
|
|
91
|
+
const stateDirection = resolveStateDirection(stateInput, options.stateDirection);
|
|
92
|
+
const stateLightness = applyStateDelta(relationResult.color.l, stateInput, stateDirection, resolverConfig.stateDeltas.luminance);
|
|
93
|
+
const contextDelta = contextCurve(context);
|
|
94
|
+
const alpha = options.usage === 'overlays'
|
|
95
|
+
? applyStateAlphaDelta(relationResult.color.alpha, stateInput, stateDirection, resolverConfig.stateDeltas.alpha)
|
|
96
|
+
: relationResult.color.alpha;
|
|
97
|
+
const color = Object.freeze(normalizeOklch({
|
|
98
|
+
...relationResult.color,
|
|
99
|
+
alpha,
|
|
100
|
+
l: stateLightness + contextDelta,
|
|
101
|
+
}));
|
|
102
|
+
const axes = Object.freeze({
|
|
103
|
+
context,
|
|
104
|
+
intent: options.intent,
|
|
105
|
+
usage: options.usage,
|
|
106
|
+
...(level === undefined ? {} : { level }),
|
|
107
|
+
state: stateInput,
|
|
108
|
+
...(relationResult.relation === undefined
|
|
109
|
+
? {}
|
|
110
|
+
: { relation: relationResult.relation }),
|
|
111
|
+
});
|
|
112
|
+
return Object.freeze({
|
|
113
|
+
axes,
|
|
114
|
+
color,
|
|
115
|
+
});
|
|
116
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
export declare const STATES: readonly ["default", "hover", "active", "focus", "selected", "disabled"];
|
|
2
|
+
export type State = (typeof STATES)[number];
|
|
3
|
+
export type StateDeltaDirection = 'increase' | 'decrease';
|
|
4
|
+
export type StateDeltaTable = Readonly<Record<State, number>>;
|
|
5
|
+
export type StateDeltaConfig = Readonly<{
|
|
6
|
+
luminance: StateDeltaTable;
|
|
7
|
+
alpha: StateDeltaTable;
|
|
8
|
+
}>;
|
|
9
|
+
export declare const defaultStateLuminanceDeltas: Readonly<{
|
|
10
|
+
active: number;
|
|
11
|
+
default: number;
|
|
12
|
+
disabled: number;
|
|
13
|
+
focus: number;
|
|
14
|
+
hover: number;
|
|
15
|
+
selected: number;
|
|
16
|
+
}>;
|
|
17
|
+
export declare const defaultStateAlphaDeltas: Readonly<{
|
|
18
|
+
active: number;
|
|
19
|
+
default: number;
|
|
20
|
+
disabled: number;
|
|
21
|
+
focus: number;
|
|
22
|
+
hover: number;
|
|
23
|
+
selected: number;
|
|
24
|
+
}>;
|
|
25
|
+
export declare const defaultStateDeltas: Readonly<{
|
|
26
|
+
alpha: Readonly<{
|
|
27
|
+
active: number;
|
|
28
|
+
default: number;
|
|
29
|
+
disabled: number;
|
|
30
|
+
focus: number;
|
|
31
|
+
hover: number;
|
|
32
|
+
selected: number;
|
|
33
|
+
}>;
|
|
34
|
+
luminance: Readonly<{
|
|
35
|
+
active: number;
|
|
36
|
+
default: number;
|
|
37
|
+
disabled: number;
|
|
38
|
+
focus: number;
|
|
39
|
+
hover: number;
|
|
40
|
+
selected: number;
|
|
41
|
+
}>;
|
|
42
|
+
}>;
|
|
43
|
+
export declare function isState(value: unknown): value is State;
|
|
44
|
+
export declare function assertState(value: unknown): asserts value is State;
|
|
45
|
+
export declare function applyStateDelta(value: number, state: State, direction: StateDeltaDirection, deltas?: StateDeltaTable): number;
|
|
46
|
+
export declare function applyStateAlphaDelta(value: number, state: State, direction: StateDeltaDirection, deltas?: StateDeltaTable): number;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
export const STATES = Object.freeze([
|
|
2
|
+
'default',
|
|
3
|
+
'hover',
|
|
4
|
+
'active',
|
|
5
|
+
'focus',
|
|
6
|
+
'selected',
|
|
7
|
+
'disabled',
|
|
8
|
+
]);
|
|
9
|
+
export const defaultStateLuminanceDeltas = Object.freeze({
|
|
10
|
+
active: 6,
|
|
11
|
+
default: 0,
|
|
12
|
+
disabled: 10,
|
|
13
|
+
focus: 4,
|
|
14
|
+
hover: 3,
|
|
15
|
+
selected: 5,
|
|
16
|
+
});
|
|
17
|
+
export const defaultStateAlphaDeltas = Object.freeze({
|
|
18
|
+
active: 0,
|
|
19
|
+
default: 0,
|
|
20
|
+
disabled: 0,
|
|
21
|
+
focus: 0,
|
|
22
|
+
hover: 0,
|
|
23
|
+
selected: 0,
|
|
24
|
+
});
|
|
25
|
+
export const defaultStateDeltas = Object.freeze({
|
|
26
|
+
alpha: defaultStateAlphaDeltas,
|
|
27
|
+
luminance: defaultStateLuminanceDeltas,
|
|
28
|
+
});
|
|
29
|
+
const stateList = STATES.join(', ');
|
|
30
|
+
const formatInvalidStateError = (value) => `Invalid state "${String(value)}". Expected one of: ${stateList}.`;
|
|
31
|
+
const clampPercentage = (value) => Math.min(100, Math.max(0, value));
|
|
32
|
+
const clampAlpha = (value) => Number(Math.min(1, Math.max(0, value)).toFixed(12));
|
|
33
|
+
export function isState(value) {
|
|
34
|
+
return (typeof value === 'string' && STATES.includes(value));
|
|
35
|
+
}
|
|
36
|
+
export function assertState(value) {
|
|
37
|
+
if (!isState(value)) {
|
|
38
|
+
throw new Error(formatInvalidStateError(value));
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
export function applyStateDelta(value, state, direction, deltas = defaultStateDeltas.luminance) {
|
|
42
|
+
if (!Number.isFinite(value)) {
|
|
43
|
+
throw new Error('State delta value must be a finite number.');
|
|
44
|
+
}
|
|
45
|
+
assertState(state);
|
|
46
|
+
const delta = deltas[state];
|
|
47
|
+
if (state === 'default') {
|
|
48
|
+
return clampPercentage(value);
|
|
49
|
+
}
|
|
50
|
+
if (direction === 'increase') {
|
|
51
|
+
return clampPercentage(value + delta);
|
|
52
|
+
}
|
|
53
|
+
return clampPercentage(value - delta);
|
|
54
|
+
}
|
|
55
|
+
export function applyStateAlphaDelta(value, state, direction, deltas = defaultStateDeltas.alpha) {
|
|
56
|
+
if (!Number.isFinite(value)) {
|
|
57
|
+
throw new Error('State alpha delta value must be a finite number.');
|
|
58
|
+
}
|
|
59
|
+
assertState(state);
|
|
60
|
+
const delta = deltas[state];
|
|
61
|
+
if (state === 'default') {
|
|
62
|
+
return clampAlpha(value);
|
|
63
|
+
}
|
|
64
|
+
if (direction === 'increase') {
|
|
65
|
+
return clampAlpha(value + delta);
|
|
66
|
+
}
|
|
67
|
+
return clampAlpha(value - delta);
|
|
68
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const fillUsageStrategy: Readonly<{
|
|
2
|
+
resolve(input: Readonly<{
|
|
3
|
+
intent: Readonly<import("../../core/intent-registry.js").IntentDefinition>;
|
|
4
|
+
}>): Readonly<{
|
|
5
|
+
intent: Readonly<import("../../core/intent-registry.js").IntentDefinition>;
|
|
6
|
+
usage: "fill";
|
|
7
|
+
}>;
|
|
8
|
+
usage: "fill";
|
|
9
|
+
}>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const linesUsageStrategy: Readonly<{
|
|
2
|
+
resolve(input: Readonly<{
|
|
3
|
+
intent: Readonly<import("../../core/intent-registry.js").IntentDefinition>;
|
|
4
|
+
}>): Readonly<{
|
|
5
|
+
intent: Readonly<import("../../core/intent-registry.js").IntentDefinition>;
|
|
6
|
+
usage: "lines";
|
|
7
|
+
}>;
|
|
8
|
+
usage: "lines";
|
|
9
|
+
}>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const overlaysUsageStrategy: Readonly<{
|
|
2
|
+
resolve(input: Readonly<{
|
|
3
|
+
intent: Readonly<import("../../core/intent-registry.js").IntentDefinition>;
|
|
4
|
+
}>): Readonly<{
|
|
5
|
+
intent: Readonly<import("../../core/intent-registry.js").IntentDefinition>;
|
|
6
|
+
usage: "overlays";
|
|
7
|
+
}>;
|
|
8
|
+
usage: "overlays";
|
|
9
|
+
}>;
|