@domandigital/craft 0.4.0 → 0.6.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 +108 -0
- package/CHARACTER.md +335 -0
- package/PRINCIPLES.md +14 -0
- package/README.md +36 -1
- package/STANDARD.md +13 -1
- package/art-direction.schema.json +59 -0
- package/dist/audit.cjs +2444 -0
- package/dist/audit.d.cts +376 -0
- package/dist/audit.d.ts +376 -0
- package/dist/audit.js +2412 -0
- package/dist/chunk-GWMSSRIQ.js +2542 -0
- package/dist/chunk-HYGFP3LB.js +68 -0
- package/dist/cli-7ME4VIRG.js +470 -0
- package/dist/cli-F7W4F3ER.js +488 -0
- package/dist/cli.js +21 -0
- package/dist/index.cjs +2831 -21
- package/dist/index.d.cts +728 -1
- package/dist/index.d.ts +728 -1
- package/dist/index.js +2785 -21
- package/package.json +27 -4
package/dist/index.d.cts
CHANGED
|
@@ -600,6 +600,8 @@ declare function densityTokens(name: DensityName, rootPx?: number): Record<strin
|
|
|
600
600
|
*/
|
|
601
601
|
interface RestraintBudget {
|
|
602
602
|
maxFontSizes: number;
|
|
603
|
+
/** Context-relative font sizes (`em`, `%`) -- ratios, not steps. See section 9. */
|
|
604
|
+
maxRelativeFontSizes: number;
|
|
603
605
|
maxFontWeights: number;
|
|
604
606
|
/** Excludes the monospace face, which is a functional choice not a stylistic one. */
|
|
605
607
|
maxFontFamilies: number;
|
|
@@ -691,4 +693,729 @@ declare function tailwindV4Theme(): string;
|
|
|
691
693
|
/** Density names, re-exported so a consumer can type its shell prop. */
|
|
692
694
|
declare const DENSITY_NAMES: DensityName[];
|
|
693
695
|
|
|
694
|
-
|
|
696
|
+
/**
|
|
697
|
+
* A snapshot: what a page looks like once it has rendered, as plain data.
|
|
698
|
+
*
|
|
699
|
+
* Source tells read what a site writes. A snapshot reads what a visitor gets:
|
|
700
|
+
* the font that actually loaded, the colour that actually covers the page,
|
|
701
|
+
* the sections that actually fade in. The two disagree often enough to need
|
|
702
|
+
* both. A Tailwind class list can name indigo and a CMS can override it; a
|
|
703
|
+
* source can name Fraunces and the font can fail to load.
|
|
704
|
+
*
|
|
705
|
+
* Everything here is plain JSON so a snapshot can be saved, diffed, attached
|
|
706
|
+
* to a report and judged again later without a browser. Capturing one needs a
|
|
707
|
+
* browser (see `@domandigital/craft/audit`); judging one does not.
|
|
708
|
+
*/
|
|
709
|
+
declare const SNAPSHOT_VERSION = 1;
|
|
710
|
+
interface SnapshotColour {
|
|
711
|
+
/** `rgb(r, g, b)` or `rgba(r, g, b, a)`, as the browser computed it. */
|
|
712
|
+
value: string;
|
|
713
|
+
/** Painted area in CSS px², summed over every element using it. */
|
|
714
|
+
area: number;
|
|
715
|
+
/** Characters of text drawn in it, for text colours. */
|
|
716
|
+
chars: number;
|
|
717
|
+
}
|
|
718
|
+
interface SnapshotFont {
|
|
719
|
+
/** The first family in the computed stack, unquoted. */
|
|
720
|
+
family: string;
|
|
721
|
+
/** Characters of visible text set in it. */
|
|
722
|
+
chars: number;
|
|
723
|
+
/** Characters of it in headings (h1 to h3 and elements at 28px or more). */
|
|
724
|
+
displayChars: number;
|
|
725
|
+
italicChars: number;
|
|
726
|
+
weights: number[];
|
|
727
|
+
}
|
|
728
|
+
interface SnapshotHeading {
|
|
729
|
+
level: number;
|
|
730
|
+
family: string;
|
|
731
|
+
sizePx: number;
|
|
732
|
+
weight: number;
|
|
733
|
+
italic: boolean;
|
|
734
|
+
/** An `<em>`, `<i>` or italic span inside a non-italic heading: "Beauty, *reimagined*". */
|
|
735
|
+
italicPart: boolean;
|
|
736
|
+
text: string;
|
|
737
|
+
top: number;
|
|
738
|
+
}
|
|
739
|
+
interface SnapshotControl {
|
|
740
|
+
/** `button` for a <button> or submit, `link` for an anchor styled as a button. */
|
|
741
|
+
kind: "button" | "link";
|
|
742
|
+
radiusPx: number;
|
|
743
|
+
heightPx: number;
|
|
744
|
+
background: string;
|
|
745
|
+
text: string;
|
|
746
|
+
}
|
|
747
|
+
type SectionKind = "hero" | "logos" | "stats" | "cards" | "marquee" | "text" | "other";
|
|
748
|
+
interface SnapshotSection {
|
|
749
|
+
top: number;
|
|
750
|
+
height: number;
|
|
751
|
+
kind: SectionKind;
|
|
752
|
+
/** The first heading's text, or the first words, so a report can name it. */
|
|
753
|
+
label: string;
|
|
754
|
+
/** Cards laid out side by side: siblings of similar size in one row. */
|
|
755
|
+
cards: number;
|
|
756
|
+
/** Of those cards, how many open with an icon (an <svg> or small image). */
|
|
757
|
+
iconCards: number;
|
|
758
|
+
/** Hidden at load, waiting for a scroll to reveal it. */
|
|
759
|
+
hiddenAtLoad: boolean;
|
|
760
|
+
}
|
|
761
|
+
interface SnapshotGradient {
|
|
762
|
+
/** Colour stops, as computed. */
|
|
763
|
+
stops: string[];
|
|
764
|
+
area: number;
|
|
765
|
+
radial: boolean;
|
|
766
|
+
}
|
|
767
|
+
interface SnapshotEffects {
|
|
768
|
+
/** Elements with backdrop-filter blur and a translucent background. */
|
|
769
|
+
glass: number;
|
|
770
|
+
/** Text painted with a gradient (background-clip: text). */
|
|
771
|
+
gradientText: number;
|
|
772
|
+
gradients: SnapshotGradient[];
|
|
773
|
+
/** Large blurred shapes or radial gradients behind content with no content of their own. */
|
|
774
|
+
glows: number;
|
|
775
|
+
/** Repeating 1px line or dot backgrounds. */
|
|
776
|
+
gridBackgrounds: number;
|
|
777
|
+
/** Infinite horizontal translate animations. */
|
|
778
|
+
marquees: number;
|
|
779
|
+
/** Cards with a near-invisible border and a wide soft shadow. */
|
|
780
|
+
hairlineShadowCards: number;
|
|
781
|
+
/** A small bordered pill directly above the first h1. */
|
|
782
|
+
eyebrowChip: boolean;
|
|
783
|
+
}
|
|
784
|
+
interface SnapshotMotion {
|
|
785
|
+
/** Sections hidden at load (opacity near 0 or translated) that appear on scroll. */
|
|
786
|
+
hiddenSections: number;
|
|
787
|
+
sections: number;
|
|
788
|
+
/** Running CSS or Web Animations at capture time. */
|
|
789
|
+
animations: number;
|
|
790
|
+
/** A full-screen layer over the page at load that is gone a few seconds later. */
|
|
791
|
+
introOverlay: boolean;
|
|
792
|
+
}
|
|
793
|
+
interface Snapshot {
|
|
794
|
+
version: typeof SNAPSHOT_VERSION;
|
|
795
|
+
url: string;
|
|
796
|
+
capturedAt: string;
|
|
797
|
+
viewport: {
|
|
798
|
+
width: number;
|
|
799
|
+
height: number;
|
|
800
|
+
};
|
|
801
|
+
pageHeight: number;
|
|
802
|
+
/** The page ground: the body's computed background, or the html's. */
|
|
803
|
+
ground: string;
|
|
804
|
+
colours: {
|
|
805
|
+
backgrounds: SnapshotColour[];
|
|
806
|
+
text: SnapshotColour[];
|
|
807
|
+
};
|
|
808
|
+
fonts: SnapshotFont[];
|
|
809
|
+
headings: SnapshotHeading[];
|
|
810
|
+
controls: SnapshotControl[];
|
|
811
|
+
sections: SnapshotSection[];
|
|
812
|
+
effects: SnapshotEffects;
|
|
813
|
+
motion: SnapshotMotion;
|
|
814
|
+
/** The design-system measures trawl has collected since v7, kept so it can switch to this. */
|
|
815
|
+
metrics: {
|
|
816
|
+
fontSizes: number[];
|
|
817
|
+
fontWeights: number[];
|
|
818
|
+
radii: string[];
|
|
819
|
+
shadows: string[];
|
|
820
|
+
spacingOnScalePct: number | null;
|
|
821
|
+
bodyLineLengthCh: number | null;
|
|
822
|
+
bodyFontSizePx: number | null;
|
|
823
|
+
};
|
|
824
|
+
}
|
|
825
|
+
|
|
826
|
+
/**
|
|
827
|
+
* The shapes shared by the tell catalogue, the source scanner and the copy
|
|
828
|
+
* engine.
|
|
829
|
+
*
|
|
830
|
+
* A tell is a choice an AI model makes when nobody told it otherwise. It is not
|
|
831
|
+
* a mistake. Every tell here would be fine as a decision; it is flagged because
|
|
832
|
+
* it is the answer the model reaches for first, so a site full of them reads as
|
|
833
|
+
* nobody having decided anything.
|
|
834
|
+
*/
|
|
835
|
+
/**
|
|
836
|
+
* Which wave of model defaults a tell belongs to.
|
|
837
|
+
*
|
|
838
|
+
* 1: the first wave (indigo, blue-to-purple gradients, Inter, glass cards).
|
|
839
|
+
* 2: what models moved to once the first wave was named and banned (cream and
|
|
840
|
+
* italic serif, eyebrow chips, bento grids, the marquee).
|
|
841
|
+
* 3: reserved for what the harvester finds next.
|
|
842
|
+
*
|
|
843
|
+
* The tag exists because any fixed list goes stale. Knowing which wave a tell
|
|
844
|
+
* came from is what lets a report say "this site was built in 2024" rather
|
|
845
|
+
* than only "this site has tells".
|
|
846
|
+
*/
|
|
847
|
+
type Generation = 1 | 2 | 3;
|
|
848
|
+
/** Where a tell is detected first. A source tell may also carry a rendered path. */
|
|
849
|
+
type Surface = "source" | "copy";
|
|
850
|
+
/**
|
|
851
|
+
* `warn` is reported and never fails a run unless `--strict` is passed.
|
|
852
|
+
* `block` fails a run.
|
|
853
|
+
*
|
|
854
|
+
* Every entry ships as `warn`. A rule blocks only after its hits across the
|
|
855
|
+
* estate have been read by a person and the rule tuned against them. A rule
|
|
856
|
+
* that blocks on day one gets switched off by day three.
|
|
857
|
+
*/
|
|
858
|
+
type Severity = "warn" | "block";
|
|
859
|
+
interface SourceFile {
|
|
860
|
+
/** Repo-relative path. The extension decides how the file is read. */
|
|
861
|
+
path: string;
|
|
862
|
+
text: string;
|
|
863
|
+
}
|
|
864
|
+
type FixtureCase = SourceFile | SourceFile[];
|
|
865
|
+
/** A detector's raw result, before it is placed on a line. */
|
|
866
|
+
interface Hit {
|
|
867
|
+
path: string;
|
|
868
|
+
/** Character offset into the file's text. */
|
|
869
|
+
offset: number;
|
|
870
|
+
message: string;
|
|
871
|
+
/** Overrides the excerpt taken from the offset's line. */
|
|
872
|
+
excerpt?: string;
|
|
873
|
+
}
|
|
874
|
+
interface Finding {
|
|
875
|
+
tell: string;
|
|
876
|
+
name: string;
|
|
877
|
+
generation: Generation;
|
|
878
|
+
severity: Severity;
|
|
879
|
+
path: string;
|
|
880
|
+
/** 1-indexed. 0 for a finding on a rendered page, where `path` is the URL. */
|
|
881
|
+
line: number;
|
|
882
|
+
excerpt: string;
|
|
883
|
+
message: string;
|
|
884
|
+
fix: string;
|
|
885
|
+
}
|
|
886
|
+
/** A class list as it applies to one element, with where it starts. */
|
|
887
|
+
interface ClassUnit {
|
|
888
|
+
classes: string[];
|
|
889
|
+
offset: number;
|
|
890
|
+
}
|
|
891
|
+
interface CssDeclaration {
|
|
892
|
+
property: string;
|
|
893
|
+
value: string;
|
|
894
|
+
/** The innermost rule's prelude: a selector, `@theme`, `@font-face`. */
|
|
895
|
+
selector: string;
|
|
896
|
+
offset: number;
|
|
897
|
+
}
|
|
898
|
+
/** A file read once, so every detector works from the same parse. */
|
|
899
|
+
interface ParsedFile extends SourceFile {
|
|
900
|
+
kind: "markup" | "script" | "css" | "prose" | "other";
|
|
901
|
+
classUnits: ClassUnit[];
|
|
902
|
+
declarations: CssDeclaration[];
|
|
903
|
+
}
|
|
904
|
+
interface ScanContext {
|
|
905
|
+
files: ParsedFile[];
|
|
906
|
+
}
|
|
907
|
+
interface CopyBlock {
|
|
908
|
+
path: string;
|
|
909
|
+
text: string;
|
|
910
|
+
/** Offset of `text[0]` in the original file, so hits land on real lines. */
|
|
911
|
+
offset: number;
|
|
912
|
+
/** A quoted string in code, as opposed to text a reader sees in place. */
|
|
913
|
+
literal?: boolean;
|
|
914
|
+
}
|
|
915
|
+
interface CopyContext {
|
|
916
|
+
files: SourceFile[];
|
|
917
|
+
/** Sentences: what word and phrase tells read. */
|
|
918
|
+
blocks: CopyBlock[];
|
|
919
|
+
/** Every visible string on its own, however short: what badge, dash and emoji tells read. */
|
|
920
|
+
strings: CopyBlock[];
|
|
921
|
+
}
|
|
922
|
+
interface TellBase {
|
|
923
|
+
/** Stable kebab-case id. Exceptions, suppressions and reports refer to it. */
|
|
924
|
+
id: string;
|
|
925
|
+
name: string;
|
|
926
|
+
generation: Generation;
|
|
927
|
+
severity: Severity;
|
|
928
|
+
/** Why this is a default rather than a decision, in one or two sentences. */
|
|
929
|
+
why: string;
|
|
930
|
+
/** What to do instead. Specific enough to act on without reading anything else. */
|
|
931
|
+
fix: string;
|
|
932
|
+
/**
|
|
933
|
+
* Proof the rule can fire and can stay quiet. Each entry needs at least one
|
|
934
|
+
* of each, and the catalogue test runs both: a guard that cannot fail is not
|
|
935
|
+
* a guard.
|
|
936
|
+
*
|
|
937
|
+
* Each item is one case, run on its own: a file, or an array of files for a
|
|
938
|
+
* tell that only exists across several. One case per detection path, so a
|
|
939
|
+
* path that breaks cannot hide behind one that still works.
|
|
940
|
+
*/
|
|
941
|
+
fixtures: {
|
|
942
|
+
flag: FixtureCase[];
|
|
943
|
+
pass: FixtureCase[];
|
|
944
|
+
};
|
|
945
|
+
/** Present when the tell can also be seen on a live page. */
|
|
946
|
+
rendered?: RenderedPath;
|
|
947
|
+
}
|
|
948
|
+
/**
|
|
949
|
+
* The same tell measured on a rendered page: pure over a Snapshot, with its
|
|
950
|
+
* own flag and pass snapshots, proved on their own like any other path.
|
|
951
|
+
*/
|
|
952
|
+
interface RenderedPath {
|
|
953
|
+
detect(snapshot: Snapshot): Hit[];
|
|
954
|
+
fixtures: {
|
|
955
|
+
flag: Snapshot[];
|
|
956
|
+
pass: Snapshot[];
|
|
957
|
+
};
|
|
958
|
+
}
|
|
959
|
+
interface SourceTell extends TellBase {
|
|
960
|
+
surface: "source";
|
|
961
|
+
detect(ctx: ScanContext): Hit[];
|
|
962
|
+
}
|
|
963
|
+
interface CopyTell extends TellBase {
|
|
964
|
+
surface: "copy";
|
|
965
|
+
detect(ctx: CopyContext): Hit[];
|
|
966
|
+
}
|
|
967
|
+
type Tell = SourceTell | CopyTell;
|
|
968
|
+
/**
|
|
969
|
+
* A declared reason to keep a tell. Lives in the site's `art-direction.json`.
|
|
970
|
+
*
|
|
971
|
+
* DD's own brand is violet. A hue rule with no way to say so flags the agency's
|
|
972
|
+
* own site on every commit, and gets switched off. An exception without a
|
|
973
|
+
* `because` is not applied: the reason is the point.
|
|
974
|
+
*/
|
|
975
|
+
interface TellException {
|
|
976
|
+
tell: string;
|
|
977
|
+
because: string;
|
|
978
|
+
/** Where the reason comes from: the shopfront, the van, the trade's own look. */
|
|
979
|
+
evidence?: string;
|
|
980
|
+
/** Limit the exception to paths containing this string. */
|
|
981
|
+
path?: string;
|
|
982
|
+
}
|
|
983
|
+
interface CheckOptions {
|
|
984
|
+
exceptions?: TellException[];
|
|
985
|
+
/** Run only these tell ids. */
|
|
986
|
+
only?: string[];
|
|
987
|
+
}
|
|
988
|
+
interface CheckReport {
|
|
989
|
+
catalogueVersion: string;
|
|
990
|
+
findings: Finding[];
|
|
991
|
+
/** Exceptions that were declared but not applied, and why. */
|
|
992
|
+
rejectedExceptions: {
|
|
993
|
+
exception: TellException;
|
|
994
|
+
reason: string;
|
|
995
|
+
}[];
|
|
996
|
+
/** Findings each applied exception silenced, so an exception stays visible. */
|
|
997
|
+
excepted: {
|
|
998
|
+
tell: string;
|
|
999
|
+
because: string;
|
|
1000
|
+
count: number;
|
|
1001
|
+
}[];
|
|
1002
|
+
/**
|
|
1003
|
+
* Findings silenced by a `copy-ok` or `craft-ok` marker on the line or the
|
|
1004
|
+
* line above. Listed, never hidden: a marker nobody can see is a hole.
|
|
1005
|
+
*/
|
|
1006
|
+
suppressed: {
|
|
1007
|
+
tell: string;
|
|
1008
|
+
path: string;
|
|
1009
|
+
line: number;
|
|
1010
|
+
}[];
|
|
1011
|
+
summary: {
|
|
1012
|
+
files: number;
|
|
1013
|
+
findings: number;
|
|
1014
|
+
byGeneration: Record<Generation, number>;
|
|
1015
|
+
byTell: Record<string, number>;
|
|
1016
|
+
blocking: number;
|
|
1017
|
+
};
|
|
1018
|
+
}
|
|
1019
|
+
|
|
1020
|
+
/**
|
|
1021
|
+
* Running the catalogue: source scan and copy check.
|
|
1022
|
+
*
|
|
1023
|
+
* Both are pure over `{ path, text }[]`. The CLI reads files and git; a hook,
|
|
1024
|
+
* a CI job and trawl all call these with the same input and get the same
|
|
1025
|
+
* answer.
|
|
1026
|
+
*/
|
|
1027
|
+
|
|
1028
|
+
/**
|
|
1029
|
+
* Bumped whenever an entry is added, removed or its detection changes, so a
|
|
1030
|
+
* report can say which list it was judged against.
|
|
1031
|
+
*/
|
|
1032
|
+
declare const CATALOGUE_VERSION = "2026.09.3";
|
|
1033
|
+
declare const CATALOGUE: readonly Tell[];
|
|
1034
|
+
declare function tellById(id: string): Tell | undefined;
|
|
1035
|
+
/** Scan markup, component code and stylesheets for design tells. */
|
|
1036
|
+
declare function scanSource(files: SourceFile[], options?: CheckOptions): CheckReport;
|
|
1037
|
+
/** Check the prose in files for copy tells. */
|
|
1038
|
+
declare function checkCopy(files: SourceFile[], options?: CheckOptions): CheckReport;
|
|
1039
|
+
/**
|
|
1040
|
+
* Judge a rendered page. Every tell with a rendered path runs over the
|
|
1041
|
+
* snapshot; findings carry the URL as their path and line 0.
|
|
1042
|
+
*/
|
|
1043
|
+
declare function auditSnapshot(snapshot: Snapshot, options?: CheckOptions): CheckReport;
|
|
1044
|
+
/** Run one tell's detector over some files. What the fixture test calls. */
|
|
1045
|
+
declare function runTell(tell: Tell, files: SourceFile[]): Hit[];
|
|
1046
|
+
/**
|
|
1047
|
+
* The catalogue as a Markdown table. CHARACTER.md carries this between
|
|
1048
|
+
* markers, and a test fails if the two differ.
|
|
1049
|
+
*/
|
|
1050
|
+
declare function catalogueTable(): string;
|
|
1051
|
+
|
|
1052
|
+
/** Plain-text rendering of a report, for a terminal or a hook. */
|
|
1053
|
+
|
|
1054
|
+
declare function formatReport(report: CheckReport, title: string): string;
|
|
1055
|
+
|
|
1056
|
+
/**
|
|
1057
|
+
* The rendered detection path for tells that can be seen on a live page.
|
|
1058
|
+
*
|
|
1059
|
+
* Same tells, same ids, measured on what the visitor gets rather than on what
|
|
1060
|
+
* the source says. A report can then say "Inter in source and on the page",
|
|
1061
|
+
* or catch the violet a CMS sets that no source file mentions.
|
|
1062
|
+
*
|
|
1063
|
+
* Pure over a Snapshot. Thresholds are here, next to their fixtures, and not
|
|
1064
|
+
* in the in-page collector, so each one can be proved without a browser.
|
|
1065
|
+
*/
|
|
1066
|
+
|
|
1067
|
+
declare const RENDERED_PATHS: Record<string, RenderedPath>;
|
|
1068
|
+
|
|
1069
|
+
/**
|
|
1070
|
+
* A plain, decided-looking page as a snapshot, for fixtures.
|
|
1071
|
+
*
|
|
1072
|
+
* Every rendered tell's pass case starts from this and its flag case changes
|
|
1073
|
+
* one thing, so a detector is proved against the difference it claims to see.
|
|
1074
|
+
* Exported so a client repo can write the same kind of test.
|
|
1075
|
+
*/
|
|
1076
|
+
|
|
1077
|
+
type SnapshotPatch = {
|
|
1078
|
+
[K in keyof Snapshot]?: Snapshot[K] extends object ? Partial<Snapshot[K]> | Snapshot[K] : Snapshot[K];
|
|
1079
|
+
};
|
|
1080
|
+
declare function makeSnapshot(patch?: SnapshotPatch): Snapshot;
|
|
1081
|
+
|
|
1082
|
+
/**
|
|
1083
|
+
* Font family names as a browser reports them, turned back into the names a
|
|
1084
|
+
* person would use.
|
|
1085
|
+
*
|
|
1086
|
+
* `next/font` renames every family it loads: Inter arrives as
|
|
1087
|
+
* `__Inter_d65c78` and its metric-matched fallback as `__Inter_Fallback_d65c78`.
|
|
1088
|
+
* A rendered check that compared raw names would never see a single reflex
|
|
1089
|
+
* font on a Next.js site, which is most of the estate.
|
|
1090
|
+
*/
|
|
1091
|
+
type FontClass = "serif" | "sans" | "mono" | "script" | "system";
|
|
1092
|
+
declare function normaliseFamily(raw: string): string;
|
|
1093
|
+
declare function fontClass(family: string): FontClass;
|
|
1094
|
+
|
|
1095
|
+
/**
|
|
1096
|
+
* A fingerprint: the handful of choices that make a site look like itself,
|
|
1097
|
+
* reduced to something two sites can be compared on.
|
|
1098
|
+
*
|
|
1099
|
+
* Signals 2 and 3 of CHARACTER.md both need a distance. "Would a model have
|
|
1100
|
+
* built this anyway" is a distance from what the model builds; "does this
|
|
1101
|
+
* look like the agency's other sites" is a distance from the estate. Neither
|
|
1102
|
+
* cares about the exact pixels. They care whether the accent, the type, the
|
|
1103
|
+
* ground, the shape language, the motion and the running order were chosen
|
|
1104
|
+
* or defaulted, so that is what a fingerprint records.
|
|
1105
|
+
*
|
|
1106
|
+
* Pure. Built from a Snapshot, so it describes what a visitor gets.
|
|
1107
|
+
*/
|
|
1108
|
+
|
|
1109
|
+
declare const FINGERPRINT_VERSION = 1;
|
|
1110
|
+
interface Fingerprint {
|
|
1111
|
+
version: typeof FINGERPRINT_VERSION;
|
|
1112
|
+
/** The most prominent chromatic colour: button fills first, then painted area, then text. */
|
|
1113
|
+
accent: Oklch | null;
|
|
1114
|
+
ground: Oklch;
|
|
1115
|
+
display: {
|
|
1116
|
+
family: string;
|
|
1117
|
+
class: FontClass;
|
|
1118
|
+
};
|
|
1119
|
+
body: {
|
|
1120
|
+
family: string;
|
|
1121
|
+
class: FontClass;
|
|
1122
|
+
};
|
|
1123
|
+
/** Median button corner radius over its height, 0 (square) to 0.5 (pill). */
|
|
1124
|
+
roundness: number | null;
|
|
1125
|
+
/** Share of below-the-fold sections that wait for a scroll to appear. */
|
|
1126
|
+
motion: number;
|
|
1127
|
+
/** Which second-look effects are present, as tell ids. */
|
|
1128
|
+
effects: string[];
|
|
1129
|
+
/** Section kinds in running order, hero first. */
|
|
1130
|
+
layout: SectionKind[];
|
|
1131
|
+
}
|
|
1132
|
+
declare function fingerprint(s: Snapshot): Fingerprint;
|
|
1133
|
+
interface FingerprintDistance {
|
|
1134
|
+
/** 0 identical, 1 nothing in common. A weighted mean of the parts. */
|
|
1135
|
+
total: number;
|
|
1136
|
+
parts: {
|
|
1137
|
+
accent: number;
|
|
1138
|
+
ground: number;
|
|
1139
|
+
type: number;
|
|
1140
|
+
shape: number;
|
|
1141
|
+
motion: number;
|
|
1142
|
+
effects: number;
|
|
1143
|
+
layout: number;
|
|
1144
|
+
};
|
|
1145
|
+
}
|
|
1146
|
+
/**
|
|
1147
|
+
* How much each part counts. Accent and type are where a model's defaults
|
|
1148
|
+
* show first and where a real business has something of its own, so they
|
|
1149
|
+
* carry half the weight between them.
|
|
1150
|
+
*/
|
|
1151
|
+
declare const DISTANCE_WEIGHTS: {
|
|
1152
|
+
readonly accent: 0.25;
|
|
1153
|
+
readonly type: 0.25;
|
|
1154
|
+
readonly ground: 0.1;
|
|
1155
|
+
readonly shape: 0.1;
|
|
1156
|
+
readonly motion: 0.1;
|
|
1157
|
+
readonly effects: 0.1;
|
|
1158
|
+
readonly layout: 0.1;
|
|
1159
|
+
};
|
|
1160
|
+
declare function fingerprintDistance(a: Fingerprint, b: Fingerprint): FingerprintDistance;
|
|
1161
|
+
/**
|
|
1162
|
+
* The nearest neighbours of a fingerprint in a set, closest first. Typicality
|
|
1163
|
+
* (phase D) and estate distance (phase E) are both this, against different sets.
|
|
1164
|
+
*/
|
|
1165
|
+
declare function nearest<T>(target: Fingerprint, set: {
|
|
1166
|
+
id: T;
|
|
1167
|
+
fingerprint: Fingerprint;
|
|
1168
|
+
}[], k?: number): {
|
|
1169
|
+
id: T;
|
|
1170
|
+
distance: FingerprintDistance;
|
|
1171
|
+
}[];
|
|
1172
|
+
|
|
1173
|
+
/**
|
|
1174
|
+
* Every colour syntax the estate actually writes, read into OKLCh.
|
|
1175
|
+
*
|
|
1176
|
+
* A hue rule that only knows Tailwind class names misses the site that sets its
|
|
1177
|
+
* violet as `#5a35d1`, which is exactly what the old checker did. Hue is judged
|
|
1178
|
+
* in OKLCh because that is where "violet" is one range of angles; in RGB and HSL
|
|
1179
|
+
* the same perceived hue drifts with lightness.
|
|
1180
|
+
*/
|
|
1181
|
+
|
|
1182
|
+
interface FoundColour {
|
|
1183
|
+
raw: string;
|
|
1184
|
+
oklch: Oklch;
|
|
1185
|
+
alpha: number;
|
|
1186
|
+
/** Offset of `raw` inside the searched string. */
|
|
1187
|
+
index: number;
|
|
1188
|
+
}
|
|
1189
|
+
declare function parseColour(raw: string): {
|
|
1190
|
+
oklch: Oklch;
|
|
1191
|
+
alpha: number;
|
|
1192
|
+
} | null;
|
|
1193
|
+
declare function findColours(value: string): FoundColour[];
|
|
1194
|
+
/**
|
|
1195
|
+
* The indigo-to-purple band models default to, in OKLCh hue degrees.
|
|
1196
|
+
*
|
|
1197
|
+
* Tailwind's blue-600 sits at 262, indigo-600 at 277, violet-600 at 293,
|
|
1198
|
+
* purple-600 at 304 and fuchsia at 322. The band starts past blue, so a
|
|
1199
|
+
* plumber's navy is left alone, and stops before fuchsia and pink, which are
|
|
1200
|
+
* a different conversation. Chroma must be high enough to read as a colour
|
|
1201
|
+
* choice rather than a tinted grey.
|
|
1202
|
+
*/
|
|
1203
|
+
declare const AI_VIOLET: {
|
|
1204
|
+
readonly hueMin: 268;
|
|
1205
|
+
readonly hueMax: 312;
|
|
1206
|
+
readonly minChroma: 0.1;
|
|
1207
|
+
readonly minL: 0.3;
|
|
1208
|
+
readonly maxL: 0.85;
|
|
1209
|
+
};
|
|
1210
|
+
declare function isAiViolet({ l, c, h }: Oklch): boolean;
|
|
1211
|
+
/**
|
|
1212
|
+
* The warm off-white the second wave moved to once violet was named: parchment,
|
|
1213
|
+
* linen, oat. Very light, faintly saturated, yellow-orange hue.
|
|
1214
|
+
*/
|
|
1215
|
+
declare function isCream({ l, c, h }: Oklch): boolean;
|
|
1216
|
+
|
|
1217
|
+
/**
|
|
1218
|
+
* Tells found in source: markup, component code and stylesheets.
|
|
1219
|
+
*
|
|
1220
|
+
* Detectors are deliberately plain. Each reads the parse every other detector
|
|
1221
|
+
* reads, looks for one pattern, and says where. Thresholds for the counted
|
|
1222
|
+
* tells (reveals, pills) come from the estate survey: they sit below the sites
|
|
1223
|
+
* that read as templated and above the ones that do not.
|
|
1224
|
+
*/
|
|
1225
|
+
|
|
1226
|
+
/** The faces a model picks when the brief does not name one. */
|
|
1227
|
+
declare const REFLEX_FONTS_1: readonly ["Inter", "Roboto", "Open Sans", "Poppins", "Montserrat", "Lato"];
|
|
1228
|
+
/** What models moved to once Inter was named and banned. */
|
|
1229
|
+
declare const REFLEX_FONTS_2: readonly ["Inter Tight", "DM Sans", "Manrope", "Space Grotesk", "Plus Jakarta Sans", "Outfit", "Geist", "Sora", "Instrument Sans", "Instrument Serif", "Fraunces", "Playfair Display", "Cormorant Garamond", "DM Serif Display"];
|
|
1230
|
+
/** Above this many scroll reveals in one scan, reveal is the default, not a choice. */
|
|
1231
|
+
declare const REVEAL_LIMIT = 12;
|
|
1232
|
+
/** Above this many fully rounded shapes in one scan, the pill is the shape language by accident. */
|
|
1233
|
+
declare const PILL_LIMIT = 30;
|
|
1234
|
+
/** A components/ui folder with this many stock primitives is a generator's dump. */
|
|
1235
|
+
declare const SHADCN_LIMIT = 12;
|
|
1236
|
+
/** The stock shadcn/ui primitives, as their files are named. */
|
|
1237
|
+
declare const SHADCN_PRIMITIVES: readonly ["accordion", "alert", "alert-dialog", "aspect-ratio", "avatar", "badge", "breadcrumb", "button", "calendar", "card", "carousel", "chart", "checkbox", "collapsible", "command", "context-menu", "dialog", "drawer", "dropdown-menu", "form", "hover-card", "input", "input-otp", "label", "menubar", "navigation-menu", "pagination", "popover", "progress", "radio-group", "resizable", "scroll-area", "select", "separator", "sheet", "sidebar", "skeleton", "slider", "sonner", "switch", "table", "tabs", "textarea", "toast", "toaster", "toggle", "toggle-group", "tooltip"];
|
|
1238
|
+
|
|
1239
|
+
/**
|
|
1240
|
+
* Tells found in copy.
|
|
1241
|
+
*
|
|
1242
|
+
* The rule lists live here as data, with fixtures, rather than hardcoded in a
|
|
1243
|
+
* checker in another repo where they had already drifted from the written
|
|
1244
|
+
* rules. Since 2026.09.2 this is also where the house copy rules live: the
|
|
1245
|
+
* blocking tier of claude-kit's `house-style/copy-rules.md` is carried by its
|
|
1246
|
+
* own tells here, and `copy-check` is a wrapper that decides which of them
|
|
1247
|
+
* fail a commit. craft itself ships every tell as `warn`.
|
|
1248
|
+
*
|
|
1249
|
+
* Word and phrase tells read sentences (`ctx.blocks`). Tells that key on a
|
|
1250
|
+
* shape short enough to sit in a label, an em dash, an emoji, a "No catch."
|
|
1251
|
+
* badge, read every visible string (`ctx.strings`).
|
|
1252
|
+
*/
|
|
1253
|
+
|
|
1254
|
+
/**
|
|
1255
|
+
* Words a model reaches for that a person writing about their own business
|
|
1256
|
+
* rarely uses. The house-blocking words (seamless, empower, delve, leverage,
|
|
1257
|
+
* harness) are not here: they have tells of their own, so a finding says
|
|
1258
|
+
* which tier it belongs to.
|
|
1259
|
+
*/
|
|
1260
|
+
declare const AI_WORDS: readonly ["tapestry", "testament", "realm", "embark", "embarking", "unleash", "unlocks", "unlocking", "elevate", "elevates", "elevated", "elevating", "bustling", "nestled", "meticulous", "meticulously", "paramount", "furthermore", "moreover", "navigating", "ever-evolving", "unparalleled"];
|
|
1261
|
+
declare const STOCK_PHRASES: readonly ["in today's digital age", "to the next level", "one-stop shop", "second to none", "we pride ourselves", "passionate about", "your journey", "our journey", "curated", "crafted with care", "tailored to your", "peace of mind"];
|
|
1262
|
+
/**
|
|
1263
|
+
* The phrase list from the blocking tier of copy-rules.md, plus the phrases
|
|
1264
|
+
* the old copy-check blocked that the rules had never written down. Each is a
|
|
1265
|
+
* phrase generated copy uses far more than people do.
|
|
1266
|
+
*/
|
|
1267
|
+
declare const AI_PHRASES: readonly ["let's dive in", "dive into", "let's unpack", "let's break this down", "let's break it down", "here's the thing", "it's important to note", "it's important to remember", "it is worth noting that", "at its core", "the key takeaway", "the reality is", "the truth is", "increasingly digital", "seamless", "seamlessly", "unlock your", "unlock the power", "meaningful impact", "drive meaningful", "foster collaboration", "fosters collaboration", "fostering collaboration", "comprehensive guide to", "look no further", "in the event that", "at no additional cost to you", "rest assured", "when it comes to", "we have got you covered", "we've got you covered"];
|
|
1268
|
+
/** Blocked because a plainer word almost always exists. */
|
|
1269
|
+
declare const PLAINER_WORDS: readonly ["empower", "empowers", "empowered", "empowering", "harness", "harnesses", "harnessed", "harnessing", "delve", "delves", "delved", "delving", "leverage", "leverages", "leveraged", "leveraging"];
|
|
1270
|
+
/** The corporate buzzwords of the house list. Older than any model; models still reach for them. */
|
|
1271
|
+
declare const BUZZWORDS: readonly ["synergy", "synergise", "synergize", "cutting-edge", "cutting edge", "best-in-class", "best in class", "best of breed", "game-changer", "game changer", "paradigm shift", "world-class", "state of the art", "state-of-the-art", "mission-critical", "low-hanging fruit", "move the needle", "circle back", "touch base", "reach out", "value-add", "robust", "turnkey", "holistic", "disruptive"];
|
|
1272
|
+
declare const NEGATIVE_REASSURANCE: readonly ["no risk", "never locked in", "nothing goes wrong", "no hidden fees", "never pay", "without the hassle", "no surprises"];
|
|
1273
|
+
/** Banned only when vague. Reported for review, never blocking. */
|
|
1274
|
+
declare const VAGUE_WORDS: readonly ["innovative", "scalable", "end-to-end", "streamline", "solutions"];
|
|
1275
|
+
/** The review tier of copy-rules.md: normal English once, a tell when stacked. */
|
|
1276
|
+
declare const REVIEW_PHRASES: readonly ["great question", "of course!", "absolutely!", "absolutely,", "truly", "genuinely", "deeply", "ultimately", "one-size-fits-all", "one size fits all", "let me know if you'd", "the single most", "by far the most", "hands down the", "arguably the best", "bar none"];
|
|
1277
|
+
|
|
1278
|
+
/**
|
|
1279
|
+
* `art-direction.json`: what a site decided about how it looks, and why.
|
|
1280
|
+
*
|
|
1281
|
+
* CHARACTER.md's reason rule lives here. Every expressive choice records a
|
|
1282
|
+
* `because` drawn from the client's real world (the shopfront, the van, the
|
|
1283
|
+
* trade's own lettering, the place, the materials) and points at a source
|
|
1284
|
+
* that shows it. A choice with no reason is a default, however good it looks.
|
|
1285
|
+
*
|
|
1286
|
+
* The file also carries the tell exceptions craft has read since phase A, in
|
|
1287
|
+
* the same shape, so an existing file stays valid.
|
|
1288
|
+
*/
|
|
1289
|
+
|
|
1290
|
+
declare const DIRECTION_VERSION = 1;
|
|
1291
|
+
/** Where a reason comes from. Deliberately physical: a mood board is not a source. */
|
|
1292
|
+
declare const SOURCE_KINDS: readonly ["livery", "shopfront", "signage", "packaging", "product", "uniform", "interior", "place", "material", "trade", "print", "photo", "founder"];
|
|
1293
|
+
type SourceKind = (typeof SOURCE_KINDS)[number];
|
|
1294
|
+
interface DirectionSource {
|
|
1295
|
+
/** Short id a choice refers to: "van", "fascia", "price-list". */
|
|
1296
|
+
id: string;
|
|
1297
|
+
kind: SourceKind;
|
|
1298
|
+
/** What it is and where, in a sentence. */
|
|
1299
|
+
note: string;
|
|
1300
|
+
/** A photo or file in the repo, or a URL. */
|
|
1301
|
+
path?: string;
|
|
1302
|
+
/** Colours read off it by a person or by `craft direction propose`, as hex. */
|
|
1303
|
+
colours?: string[];
|
|
1304
|
+
/** Lettering seen on it: "hand-painted sign-writing", "stencilled capitals". */
|
|
1305
|
+
lettering?: string;
|
|
1306
|
+
}
|
|
1307
|
+
/** The expressive choices. Layout and navigation are not here: they stay conventional. */
|
|
1308
|
+
declare const CHOICE_KEYS: readonly ["accent", "ground", "display", "body", "shape", "motif", "signature"];
|
|
1309
|
+
type ChoiceKey = (typeof CHOICE_KEYS)[number];
|
|
1310
|
+
interface DirectionChoice {
|
|
1311
|
+
/** A colour as hex for accent and ground, a family name for display and body, words otherwise. */
|
|
1312
|
+
value: string;
|
|
1313
|
+
because: string;
|
|
1314
|
+
/** Source ids this reason rests on. */
|
|
1315
|
+
evidence: string[];
|
|
1316
|
+
}
|
|
1317
|
+
interface ArtDirection {
|
|
1318
|
+
$schema?: string;
|
|
1319
|
+
version: typeof DIRECTION_VERSION;
|
|
1320
|
+
client: string;
|
|
1321
|
+
/** Who, where, and what they do, in a sentence or two. The brief a model would have been given. */
|
|
1322
|
+
brief: string;
|
|
1323
|
+
sources: DirectionSource[];
|
|
1324
|
+
choices: Partial<Record<ChoiceKey, DirectionChoice>>;
|
|
1325
|
+
exceptions?: TellException[];
|
|
1326
|
+
}
|
|
1327
|
+
type DirectionSeverity = "error" | "warn";
|
|
1328
|
+
interface DirectionProblem {
|
|
1329
|
+
severity: DirectionSeverity;
|
|
1330
|
+
/** Where in the file: "choices.accent.because", "sources[2].kind". */
|
|
1331
|
+
at: string;
|
|
1332
|
+
message: string;
|
|
1333
|
+
}
|
|
1334
|
+
interface DirectionReport {
|
|
1335
|
+
valid: boolean;
|
|
1336
|
+
problems: DirectionProblem[];
|
|
1337
|
+
/** How many of the seven choices carry an accepted reason. */
|
|
1338
|
+
decided: number;
|
|
1339
|
+
}
|
|
1340
|
+
|
|
1341
|
+
/**
|
|
1342
|
+
* Checking an art direction: the file's shape, the reason rule, and whether
|
|
1343
|
+
* the site actually does what the file says.
|
|
1344
|
+
*
|
|
1345
|
+
* Pure. The CLI reads the file, any snapshot and the paths it cites.
|
|
1346
|
+
*/
|
|
1347
|
+
|
|
1348
|
+
interface ValidateContext {
|
|
1349
|
+
/** The fingerprint of the rendered site, to check the file against what ships. */
|
|
1350
|
+
fingerprint?: Fingerprint;
|
|
1351
|
+
/** Which cited paths exist, when the caller can look. */
|
|
1352
|
+
pathExists?: (path: string) => boolean;
|
|
1353
|
+
}
|
|
1354
|
+
declare function validateDirection(input: unknown, ctx?: ValidateContext): DirectionReport;
|
|
1355
|
+
|
|
1356
|
+
/**
|
|
1357
|
+
* A first art-direction.json for a site that exists: what it does today,
|
|
1358
|
+
* written down, with every reason left empty.
|
|
1359
|
+
*
|
|
1360
|
+
* Empty on purpose. `validateDirection` fails the file until each choice has
|
|
1361
|
+
* a source and a reason, so the first thing init produces is the list of
|
|
1362
|
+
* things nobody decided.
|
|
1363
|
+
*/
|
|
1364
|
+
|
|
1365
|
+
declare function initDirection(input: {
|
|
1366
|
+
client?: string;
|
|
1367
|
+
brief?: string;
|
|
1368
|
+
current?: Fingerprint;
|
|
1369
|
+
exceptions?: ArtDirection["exceptions"];
|
|
1370
|
+
}): ArtDirection;
|
|
1371
|
+
|
|
1372
|
+
/**
|
|
1373
|
+
* Proposing an art direction from the client's world.
|
|
1374
|
+
*
|
|
1375
|
+
* A proposal is a draft, never a decision. Every choice it writes carries a
|
|
1376
|
+
* `because` that starts "PROPOSED:", and `validateDirection` rejects that
|
|
1377
|
+
* prefix, so the file cannot pass until a person has looked at the van, agreed
|
|
1378
|
+
* the green is the van's green, and said so in their own words.
|
|
1379
|
+
*
|
|
1380
|
+
* Pure. Pixels come in as numbers; the CLI decodes the images.
|
|
1381
|
+
*/
|
|
1382
|
+
|
|
1383
|
+
declare const PROPOSED = "PROPOSED:";
|
|
1384
|
+
interface PaletteColour {
|
|
1385
|
+
hex: string;
|
|
1386
|
+
/** Share of sampled pixels, 0 to 1. */
|
|
1387
|
+
share: number;
|
|
1388
|
+
oklch: Oklch;
|
|
1389
|
+
}
|
|
1390
|
+
/**
|
|
1391
|
+
* The dominant colours in an RGBA pixel buffer: k-means in OKLab, so colours
|
|
1392
|
+
* cluster the way they look alike. Deterministic: seeded by lightness order,
|
|
1393
|
+
* not at random, so the same photo always proposes the same colours.
|
|
1394
|
+
*/
|
|
1395
|
+
declare function paletteFromPixels(rgba: ArrayLike<number>, k?: number, maxSamples?: number): PaletteColour[];
|
|
1396
|
+
interface ProposeInput {
|
|
1397
|
+
client: string;
|
|
1398
|
+
brief: string;
|
|
1399
|
+
sources: DirectionSource[];
|
|
1400
|
+
/** What the site ships today, if it exists. */
|
|
1401
|
+
current?: Fingerprint;
|
|
1402
|
+
/** The rest of the estate, so a proposal does not land on a sibling. */
|
|
1403
|
+
estate?: {
|
|
1404
|
+
id: string;
|
|
1405
|
+
fingerprint: Fingerprint;
|
|
1406
|
+
}[];
|
|
1407
|
+
}
|
|
1408
|
+
interface Proposal {
|
|
1409
|
+
key: ChoiceKey;
|
|
1410
|
+
candidates: {
|
|
1411
|
+
value: string;
|
|
1412
|
+
evidence: string[];
|
|
1413
|
+
note: string;
|
|
1414
|
+
}[];
|
|
1415
|
+
}
|
|
1416
|
+
declare function propose(input: ProposeInput): {
|
|
1417
|
+
proposals: Proposal[];
|
|
1418
|
+
direction: ArtDirection;
|
|
1419
|
+
};
|
|
1420
|
+
|
|
1421
|
+
export { AI_PHRASES, AI_VIOLET, AI_WORDS, type AccentFork, type AccentForkOptions, type ArtDirection, BUZZWORDS, CATALOGUE, CATALOGUE_VERSION, CHOICE_KEYS, type CheckOptions, type CheckReport, type CheckRestraintInput, type ChoiceKey, type ContrastCheck, type ContrastReport, type CopyTell, type CraftTokensInput, type CraftTokensResult, DENSITIES, DENSITY_NAMES, DIRECTION_VERSION, DISTANCE_WEIGHTS, DURATION_MS, DURATION_S, type DensityCssOptions, type DensityName, type DirectionChoice, type DirectionProblem, type DirectionReport, type DirectionSource, type DurationName, EASE, EASE_TUPLE, EXIT_RATIO, type EaseName, type EmitCssOptions, FINGERPRINT_VERSION, type Finding, type Fingerprint, type FingerprintDistance, type FluidSpaceOptions, type FluidTypeOptions, type FluidTypeResult, type FontClass, type Gamut, type Generation, HOUSE_BUDGET, HOUSE_TYPE, type Hit, LIGHTNESS_CURVE, type MotionDecision, type MotionKind, NEGATIVE_REASSURANCE, type Oklch, type OklchToHexOptions, PILL_LIMIT, PLAINER_WORDS, PROPOSED, type PaletteColour, type Proposal, type ProposeInput, RAMP_STEPS, REFLEX_FONTS_1, REFLEX_FONTS_2, RENDERED_PATHS, REVEAL_LIMIT, REVIEW_PHRASES, type Ramp, type RampFromAnchorsOptions, type RampOptions, type RampStep, type RestraintBudget, type RestraintReport, type RestraintSeverity, type RestraintViolation, type Rgb, SCALE, SHADCN_LIMIT, SHADCN_PRIMITIVES, SNAPSHOT_VERSION, SOURCE_KINDS, SPACE_STEPS, SPRING, STOCK_PHRASES, type SectionKind, type SectionRhythmOptions, type SemanticInput, type SemanticResult, type Severity, type ShouldAnimateInput, type Snapshot, type SnapshotColour, type SnapshotControl, type SnapshotEffects, type SnapshotFont, type SnapshotGradient, type SnapshotHeading, type SnapshotMotion, type SnapshotPatch, type SnapshotSection, type SourceFile, type SourceKind, type SourceTell, type SpaceStep, type Surface, TYPE_STEPS, type TailwindPreset, type Tell, type TellException, type TypeStep, VAGUE_WORDS, type ValidateContext, accentFork, apcaContrast, auditSnapshot, catalogueTable, checkCopy, checkPair, checkRestraint, craftTokens, deltaEOk, deltaEOkHex, densityCss, densityTokens, emitCss, exitDuration, findColours, fingerprint, fingerprintDistance, fluidClamp, fluidSpace, fluidType, fontClass, formatHex, formatReport, hexToOklch, inP3Gamut, inSrgbGamut, initDirection, isAiViolet, isCream, makeSnapshot, motionTokens, nearest, normaliseFamily, oklchToHex, oklchToRgb, paletteFromPixels, parseColour, parseHex, propose, ramp, rampFromAnchors, runTell, scanSource, sectionRhythm, semantic, shouldAnimate, tailwindV3Preset, tailwindV4Theme, tellById, toGamut, typeFeatureTokens, validateDirection, wcagContrast };
|