@instruments/materialgraph 0.18.0 → 0.20.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.
Files changed (69) hide show
  1. package/association-types.d.ts +29 -4
  2. package/attribution-types.d.ts +51 -0
  3. package/attribution-types.js +13 -0
  4. package/browse-types.d.ts +14 -3
  5. package/by-colour-types.d.ts +33 -6
  6. package/by-spec-types.d.ts +4 -0
  7. package/catalogue-client.d.ts +54 -0
  8. package/catalogue-client.js +16 -0
  9. package/catalogue-types.d.ts +3 -1
  10. package/citation-types.d.ts +34 -0
  11. package/citation-types.js +1 -0
  12. package/client-browse.d.ts +1 -0
  13. package/client-browse.js +1 -0
  14. package/client-vocabulary.d.ts +10 -0
  15. package/client-vocabulary.js +32 -0
  16. package/client.d.ts +22 -45
  17. package/client.js +40 -55
  18. package/colours-client.d.ts +8 -3
  19. package/colours-client.js +8 -0
  20. package/composition-types.d.ts +6 -0
  21. package/corpus-scope-types.d.ts +1 -1
  22. package/errors.d.ts +1 -1
  23. package/errors.js +2 -0
  24. package/identify-types.d.ts +72 -0
  25. package/identify-types.js +7 -0
  26. package/index.d.ts +10 -0
  27. package/json-value-types.d.ts +8 -0
  28. package/json-value-types.js +1 -0
  29. package/match-stream-types.d.ts +13 -0
  30. package/match-types.d.ts +13 -0
  31. package/material-block-types.d.ts +4 -0
  32. package/material-resources-client.d.ts +3 -0
  33. package/material-resources-client.js +4 -0
  34. package/material-types.d.ts +24 -0
  35. package/operations.d.ts +1 -1
  36. package/operations.js +64 -2
  37. package/package.json +8 -1
  38. package/palette-completion-types.d.ts +115 -0
  39. package/palette-completion-types.js +1 -0
  40. package/palette-search-types.d.ts +16 -2
  41. package/render-assets-types.d.ts +65 -0
  42. package/render-assets-types.js +1 -0
  43. package/run-events.d.ts +13 -0
  44. package/samplize-catalogue-types.d.ts +92 -0
  45. package/samplize-catalogue-types.js +1 -0
  46. package/samplize-colorvec.d.ts +70 -0
  47. package/samplize-colorvec.js +167 -0
  48. package/schedule-reference-types.d.ts +46 -0
  49. package/schedule-reference-types.js +1 -0
  50. package/schedule-references-client.d.ts +14 -0
  51. package/schedule-references-client.js +26 -0
  52. package/schedule-types.d.ts +34 -0
  53. package/search-card-types.d.ts +53 -0
  54. package/search-card-types.js +1 -0
  55. package/search-mood-types.d.ts +6 -0
  56. package/search-mood-types.js +1 -0
  57. package/search-refinement-types.d.ts +5 -0
  58. package/search-request-types.d.ts +5 -0
  59. package/search-response-receipt-types.d.ts +8 -0
  60. package/search-result-validation.js +10 -0
  61. package/slot-pool-types.d.ts +2 -0
  62. package/spec-types.d.ts +6 -1
  63. package/specifications.d.ts +3 -1
  64. package/specifications.js +4 -0
  65. package/substitute-types.d.ts +102 -0
  66. package/substitute-types.js +1 -0
  67. package/taxonomy-coverage-types.d.ts +34 -0
  68. package/taxonomy-coverage-types.js +1 -0
  69. package/types.d.ts +42 -57
package/operations.js CHANGED
@@ -1,6 +1,42 @@
1
1
  import { MaterialGraphError } from "./errors.js";
2
2
  export const MATERIALGRAPH_API_VERSION = "0.7.0";
3
3
  const OPERATION_DEFINITIONS = [
4
+ [
5
+ "colours.complete",
6
+ "POST",
7
+ "/api/v1/colours/palettes/complete",
8
+ "complete_interior_palette",
9
+ ],
10
+ [
11
+ "colours.discover",
12
+ "GET",
13
+ "/api/v1/colours/palettes",
14
+ "discover_interior_palettes",
15
+ ],
16
+ [
17
+ "samplizeColorVecCache",
18
+ "GET",
19
+ "/api/v1/catalogues/samplize/colorvec",
20
+ "samplize_colorvec_cache",
21
+ ],
22
+ [
23
+ "samplizeCatalogueSearch",
24
+ "POST",
25
+ "/api/v1/catalogues/samplize/search",
26
+ "samplize_catalogue_search",
27
+ ],
28
+ [
29
+ "scheduleReferences.list",
30
+ "GET",
31
+ "/api/v1/schedules/{scheduleId}/references",
32
+ "list_schedule_reference_feedback",
33
+ ],
34
+ [
35
+ "scheduleReferences.put",
36
+ "PUT",
37
+ "/api/v1/schedules/{scheduleId}/references/{referenceId}",
38
+ "put_schedule_reference_feedback",
39
+ ],
4
40
  ["catalogs", "GET", "/api/v1/catalogs", "list_catalog_documents"],
5
41
  [
6
42
  "catalogPages",
@@ -21,7 +57,14 @@ const OPERATION_DEFINITIONS = [
21
57
  "list_catalog_product_references",
22
58
  ],
23
59
  ["search", "POST", "/api/v1/search", "search_materials_post"],
60
+ ["identify", "POST", "/api/v1/identify", "retrieval.identify"],
24
61
  ["planQuery", "POST", "/api/v1/search/plan", "plan_material_query"],
62
+ [
63
+ "samplizeCatalogue",
64
+ "GET",
65
+ "/api/v1/catalogues/samplize/products",
66
+ "samplize_catalogue_products",
67
+ ],
25
68
  ["searchGet", "GET", "/api/v1/search", "search_materials_get"],
26
69
  ["match", "POST", "/api/v1/search/match", "match_material"],
27
70
  ["byColour", "GET", "/api/v1/search/colours", "search_by_colour"],
@@ -62,6 +105,12 @@ const OPERATION_DEFINITIONS = [
62
105
  "/api/v1/materials/{variantId}/assets",
63
106
  "list_material_assets",
64
107
  ],
108
+ [
109
+ "materialRenderAssets",
110
+ "GET",
111
+ "/api/v1/materials/{variantId}/render-assets",
112
+ "get_material_render_assets",
113
+ ],
65
114
  [
66
115
  "materialDocuments",
67
116
  "GET",
@@ -115,6 +164,12 @@ const OPERATION_DEFINITIONS = [
115
164
  "/api/v1/materials/{variantId}/pairings",
116
165
  "get_material_pairings",
117
166
  ],
167
+ [
168
+ "findSubstitutes",
169
+ "POST",
170
+ "/api/v1/materials/{variantId}/substitutes",
171
+ "find_material_substitutes",
172
+ ],
118
173
  [
119
174
  "associatedFinishes",
120
175
  "GET",
@@ -178,6 +233,12 @@ const OPERATION_DEFINITIONS = [
178
233
  ["resolve", "POST", "/api/v1/resolve", "resolve_phrases"],
179
234
  ["bySpec", "GET", "/api/v1/search/specifications", "catalog_by_spec"],
180
235
  ["taxonomy", "GET", "/api/v1/taxonomy/categories", "get_category_taxonomy"],
236
+ [
237
+ "productTypeCoverage",
238
+ "GET",
239
+ "/api/v1/taxonomy/coverage",
240
+ "get_product_type_status_coverage",
241
+ ],
181
242
  ["whoami", "GET", "/api/v1/whoami", "whoami"],
182
243
  ["coordinate", "POST", "/api/v1/pairings/coordinate", "coordinate_materials"],
183
244
  ["demand", "GET", "/api/v1/demand", "get_material_demand"],
@@ -234,13 +295,13 @@ const OPERATION_DEFINITIONS = [
234
295
  "get_source_material_batch",
235
296
  ],
236
297
  [
237
- "sourceMaterialComments",
298
+ "sourceMaterialComments.list",
238
299
  "GET",
239
300
  "/api/v1/source-material/{batchId}/sources/{sourceId}/comments",
240
301
  "list_source_material_comments",
241
302
  ],
242
303
  [
243
- "sourceMaterialComments",
304
+ "sourceMaterialComments.post",
244
305
  "POST",
245
306
  "/api/v1/source-material/{batchId}/sources/{sourceId}/comments",
246
307
  "post_source_material_comment",
@@ -255,6 +316,7 @@ const OPERATION_DEFINITIONS = [
255
316
  "/api/v1/runs/{runId}/schedule",
256
317
  "get_run_finish_schedule",
257
318
  ],
319
+ ["citation", "GET", "/api/v1/citations/{citationId}", "get_verdict_citation"],
258
320
  [
259
321
  "streamRunEvents",
260
322
  "GET",
package/package.json CHANGED
@@ -1,13 +1,20 @@
1
1
  {
2
2
  "name": "@instruments/materialgraph",
3
- "version": "0.18.0",
3
+ "version": "0.20.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
7
7
  "types": "./index.d.ts",
8
8
  "import": "./index.js"
9
+ },
10
+ "./samplize-colorvec": {
11
+ "types": "./samplize-colorvec.d.ts",
12
+ "import": "./samplize-colorvec.js"
9
13
  }
10
14
  },
15
+ "dependencies": {
16
+ "@instruments/colorscope": "7.6.0"
17
+ },
11
18
  "license": "Proprietary",
12
19
  "engines": {
13
20
  "node": ">=24.0.0"
@@ -0,0 +1,115 @@
1
+ /** Public wire types; the SDK does not load the producer corpus. */
2
+ export type CompositionalRole = "Foundation" | "Supporting" | "Accent";
3
+ export interface RetainedColor {
4
+ readonly id: string;
5
+ readonly hex: string;
6
+ readonly role?: CompositionalRole;
7
+ readonly paintVariantId?: string;
8
+ }
9
+ export interface CompletionRequest {
10
+ readonly inputs: readonly RetainedColor[];
11
+ readonly maxDistance?: number;
12
+ readonly limit?: number;
13
+ readonly white?: "published" | "perceptual";
14
+ readonly memberCount?: number;
15
+ readonly excludeHexes?: readonly string[];
16
+ }
17
+ export interface CompletionAssignment {
18
+ readonly input: RetainedColor;
19
+ readonly referenceIndex: number;
20
+ readonly referenceHex: string;
21
+ readonly distance: number;
22
+ }
23
+ export interface CompletionMember {
24
+ readonly hex: string;
25
+ readonly referenceHex: string;
26
+ readonly referenceIndex: number;
27
+ readonly inputIds: readonly string[];
28
+ readonly role: CompositionalRole;
29
+ readonly proportion: number;
30
+ readonly sourceRole: string | null;
31
+ readonly sourceRelation: string | null;
32
+ }
33
+ export interface PaletteCompletion {
34
+ readonly uses?: readonly {
35
+ readonly inputId: string;
36
+ readonly role: CompositionalRole;
37
+ readonly proportions: readonly number[];
38
+ }[];
39
+ readonly id: string;
40
+ readonly reference: {
41
+ readonly anchorIndex?: number | null;
42
+ readonly libraryId: string;
43
+ readonly paletteId: string;
44
+ readonly name: string | null;
45
+ readonly maker: string | null;
46
+ readonly intent: "joint" | "alternatives";
47
+ readonly provenance: "authored" | "derived" | "generated";
48
+ };
49
+ readonly assignments: readonly CompletionAssignment[];
50
+ readonly members: readonly CompletionMember[];
51
+ readonly evidenceBasis: "published-composition" | "published-pair" | "nearby-adaptation";
52
+ readonly proportionBasis: "sourced" | "proposed";
53
+ readonly worstDistance: number;
54
+ readonly totalDistance: number;
55
+ }
56
+ export type PaletteCompleteInput = CompletionRequest & {
57
+ sourceVersion: string;
58
+ };
59
+ export interface PaletteDiscoverInput {
60
+ sourceVersion: string;
61
+ character?: "warm" | "cool" | "very-light" | "light" | "dark" | "muted" | "soft" | "vivid";
62
+ moreLike?: string;
63
+ cursor?: string;
64
+ limit?: number;
65
+ }
66
+ export interface MaterializedPalette {
67
+ completion: PaletteCompletion;
68
+ samples: Array<{
69
+ retainedPaint?: {
70
+ variantId: string;
71
+ name: string;
72
+ maker: string;
73
+ };
74
+ referenceIndex: number;
75
+ inputIds: readonly string[];
76
+ hex: string;
77
+ product: {
78
+ variantId: string;
79
+ productId: string;
80
+ hex: string;
81
+ name: string;
82
+ brand: {
83
+ slug: string;
84
+ name: string;
85
+ };
86
+ } | null;
87
+ status: string;
88
+ distance: number | null;
89
+ units: "oklab-euclidean";
90
+ }>;
91
+ }
92
+ interface PaletteVersions {
93
+ sourceVersion: string;
94
+ corpusVersion: string;
95
+ algorithmVersion: string;
96
+ transport: "colorscope-package";
97
+ }
98
+ export interface PaletteCompleteResponse extends PaletteVersions {
99
+ results: MaterializedPalette[];
100
+ coverage: {
101
+ status: string;
102
+ supported: number;
103
+ };
104
+ tolerance: {
105
+ bound: number;
106
+ units: string;
107
+ policy: string;
108
+ };
109
+ }
110
+ export interface PaletteDiscoverResponse extends PaletteVersions {
111
+ results: MaterializedPalette[];
112
+ total: number;
113
+ nextCursor: string | null;
114
+ }
115
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -1,3 +1,4 @@
1
+ import type { CorpusScope, CorpusScopeReceipt } from "./corpus-scope-types.js";
1
2
  /**
2
3
  * Wire types for MULTI-COLOUR search — `POST /api/v1/search/palettes` and
3
4
  * `POST /api/v1/search/gradients`.
@@ -34,6 +35,7 @@ export interface GradientStop {
34
35
  oklab?: OklabTriple;
35
36
  }
36
37
  export interface SearchPaletteInput {
38
+ corpusScope?: CorpusScope;
37
39
  /** The palette to match, 1–8 colours. */
38
40
  colours: PaletteQueryColour[];
39
41
  /**
@@ -46,14 +48,15 @@ export interface SearchPaletteInput {
46
48
  limit?: number;
47
49
  }
48
50
  export interface SearchGradientInput {
51
+ corpusScope?: CorpusScope;
49
52
  /** The ordered colour transition, 2–6 stops. */
50
53
  stops: GradientStop[];
51
54
  /** Results to return; defaults to 24, capped at 48. */
52
55
  limit?: number;
53
56
  }
54
57
  /**
55
- * One swatch of a candidate's colorscope-EXTRACTED palette. Derived from product
56
- * imagery, never a manufacturer's declared colour. `name` is null when no human
58
+ * One swatch used for scoring. Samplize paint uses its selected published hex;
59
+ * other materials use colorscope palettes extracted from imagery. `name` is null when no human
57
60
  * name was resolved — unnamed, not colourless.
58
61
  */
59
62
  export interface CandidateSwatch {
@@ -140,14 +143,24 @@ export interface HueGateReceipt {
140
143
  * materials match this palette" is not a claim you can make from it.
141
144
  */
142
145
  export interface SearchPaletteResponse {
146
+ corpusScope?: CorpusScopeReceipt;
143
147
  /** The query as interpreted — check it before trusting a surprising order. */
144
148
  query: {
149
+ /** Colours that actually ran after minor stated shares were omitted. */
145
150
  colours: Array<{
146
151
  hex: string;
147
152
  proportion?: number;
148
153
  weight?: number;
149
154
  }>;
155
+ /** Colours not searched because their stated share was below 5%. */
156
+ droppedColours: Array<{
157
+ hex: string;
158
+ proportion?: number;
159
+ weight?: number;
160
+ }>;
150
161
  logic: PaletteLogic;
162
+ /** `no_effective_colours` means no material query ran. */
163
+ outcome: OpenEnum<"matches" | "no_effective_colours">;
151
164
  };
152
165
  /** The hue-family admission gate this page was scored under. */
153
166
  hueGate: HueGateReceipt;
@@ -157,6 +170,7 @@ export interface SearchPaletteResponse {
157
170
  }
158
171
  /** A PAGE, NOT A CORPUS — see {@link SearchPaletteResponse}. */
159
172
  export interface SearchGradientResponse {
173
+ corpusScope?: CorpusScopeReceipt;
160
174
  query: {
161
175
  stops: string[];
162
176
  /** The sampled path points the search actually ran against. */
@@ -0,0 +1,65 @@
1
+ import type { VariantId } from "./identifiers.js";
2
+ export type RenderAssetChannelRole = "base-color" | "normal" | "roughness" | "metalness" | "height" | "ambient-occlusion";
3
+ export type RenderAssetSourceBasis = "catalog_feed" | "declared" | "derived";
4
+ export type RenderAssetUnavailableReason = "no_accepted_appearance" | "pending" | "withheld" | "rejected" | "superseded" | "variant_inactive" | "delivery_unverified" | "integrity_error";
5
+ export interface RenderAssetFreshness {
6
+ revision: string;
7
+ updatedAt: string | null;
8
+ checkedAt: string | null;
9
+ }
10
+ export interface RenderAssetChannel {
11
+ role: RenderAssetChannelRole;
12
+ url: string;
13
+ sha256: string;
14
+ byteSize: number;
15
+ mimeType: "image/png";
16
+ width: number;
17
+ height: number;
18
+ bitDepth: 8 | 16;
19
+ colorSpace: "srgb" | "linear";
20
+ }
21
+ export interface MaterialRenderAssetsAvailable {
22
+ schemaVersion: "pbr-render-assets/v1";
23
+ variantId: VariantId;
24
+ status: "available";
25
+ setId: string;
26
+ state: "accepted";
27
+ sourceBasis: "derived";
28
+ fidelity: "unassessed";
29
+ acceptance: {
30
+ id: string;
31
+ verificationDecisionId: string;
32
+ acceptedAt: string;
33
+ checkVersion: string;
34
+ qa: {
35
+ status: "passed";
36
+ checkCount: number;
37
+ };
38
+ checkCount: number;
39
+ };
40
+ physicalRepeat: {
41
+ uMm: number;
42
+ vMm: number;
43
+ basis: "declared" | "measured";
44
+ };
45
+ tiling: {
46
+ u: boolean;
47
+ v: boolean;
48
+ };
49
+ normalConvention: "opengl" | "directx";
50
+ heightAmplitudeMm?: number;
51
+ channels: RenderAssetChannel[];
52
+ supersedesSetIds: string[];
53
+ freshness: RenderAssetFreshness;
54
+ }
55
+ export interface MaterialRenderAssetsUnavailable {
56
+ schemaVersion: "pbr-render-assets/v1";
57
+ variantId: VariantId;
58
+ status: "unavailable";
59
+ setId: string | null;
60
+ state: "pending" | "withheld" | "rejected" | "superseded" | "accepted" | null;
61
+ sourceBasis: RenderAssetSourceBasis | null;
62
+ reasonCodes: RenderAssetUnavailableReason[];
63
+ freshness: RenderAssetFreshness;
64
+ }
65
+ export type MaterialRenderAssets = MaterialRenderAssetsAvailable | MaterialRenderAssetsUnavailable;
@@ -0,0 +1 @@
1
+ export {};
package/run-events.d.ts CHANGED
@@ -47,9 +47,22 @@ export interface CompositionReviewCriteriaSuggestion {
47
47
  term?: string;
48
48
  score: number;
49
49
  }
50
+ /** Exact UTF-16 passage retained from the brief; no page coordinate is implied. */
51
+ export interface CompositionBriefCriterionSourceRef {
52
+ sourceId: string;
53
+ quote: string;
54
+ textRange: {
55
+ start: number;
56
+ end: number;
57
+ unit: "utf16";
58
+ };
59
+ }
50
60
  export interface CompositionReviewCriteriaUnresolved {
51
61
  slotId: string;
62
+ /** Unresolved negative language requires an explicit review decision. */
63
+ polarity?: "exclusion";
52
64
  raw: string;
65
+ sourceRefs?: CompositionBriefCriterionSourceRef[];
53
66
  /**
54
67
  * Ranked corrections, best first. MG-994: every one of these is an attribute
55
68
  * the slot's own category holds accepted values for, so accepting the top
@@ -0,0 +1,92 @@
1
+ export interface SamplizeCatalogueOptions {
2
+ limit?: number;
3
+ after?: string;
4
+ /** Pin every subsequent page to the version returned by the first page. */
5
+ sourceVersion?: string;
6
+ }
7
+ export interface SamplizeCatalogueProduct {
8
+ variantId: string;
9
+ productId: string;
10
+ name: string;
11
+ code: string;
12
+ brand: {
13
+ slug: string;
14
+ name: string;
15
+ };
16
+ hex: string;
17
+ hexSource: {
18
+ publisher: "Samplize";
19
+ url: string;
20
+ source: "snowflake_product_tags";
21
+ };
22
+ lrv: number | null;
23
+ lrvSource: SamplizeLrvObservation | null;
24
+ lrvObservations: SamplizeLrvObservation[];
25
+ /** The primary sample variant count, never an aggregate of product orders. */
26
+ demand: SamplizeDemand | null;
27
+ collectionMemberships: SamplizeCollectionMembership[];
28
+ colourAnalysis: Record<string, unknown>;
29
+ oklab: {
30
+ L: number;
31
+ a: number;
32
+ b: number;
33
+ };
34
+ sourceProductId: string;
35
+ url: string;
36
+ sizeVariants: Array<{
37
+ sourceVariantId: string;
38
+ sku: string | null;
39
+ title: string | null;
40
+ price: number | null;
41
+ inventoryAvailable: boolean;
42
+ demand: SamplizeDemand | null;
43
+ }>;
44
+ publishedHexes: SamplizeHexObservation[];
45
+ hexObservations: SamplizeHexObservation[];
46
+ }
47
+ export interface SamplizeCataloguePage {
48
+ schemaVersion: 2;
49
+ corpusScope: "samplizeCatalogue";
50
+ sourceVersion: string;
51
+ source: Record<string, unknown>;
52
+ total: number;
53
+ items: SamplizeCatalogueProduct[];
54
+ nextCursor: string | null;
55
+ /** True on the final page; completeness requires collecting total unique IDs. */
56
+ complete: boolean;
57
+ }
58
+ export interface SamplizeHexObservation {
59
+ hex: string;
60
+ publisher: string;
61
+ source: string;
62
+ sourceUrl: string | null;
63
+ sourceBasis: string;
64
+ observedAt: string | null;
65
+ differsFromSelected: boolean;
66
+ }
67
+ export interface SamplizePublicationSource {
68
+ publisher: "Samplize";
69
+ source: "algolia_shopify_products";
70
+ sourceUrl: string;
71
+ observedAt: string | null;
72
+ }
73
+ export interface SamplizeLrvObservation extends SamplizePublicationSource {
74
+ field: string;
75
+ value: number;
76
+ }
77
+ export interface SamplizeDemand extends SamplizePublicationSource {
78
+ field: "recently_ordered_count";
79
+ sourceVariantId: string;
80
+ grain: "shopify_variant";
81
+ recentlyOrderedCount: number;
82
+ /** The publisher does not supply the time window. */
83
+ window: null;
84
+ }
85
+ export interface SamplizeCollectionMembership {
86
+ sourceCollectionId: string;
87
+ handle: string;
88
+ url: string;
89
+ publisher: "Samplize";
90
+ source: "algolia_shopify_products";
91
+ observedAt: string | null;
92
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,70 @@
1
+ export declare const SAMPLIZE_COLORVEC_RANKING_VERSION = "solid-colorvec-cosine-v2";
2
+ export declare const SAMPLIZE_COLORVEC_EMBEDDING_VERSION = "oklch-anchor-quantiles-v12";
3
+ export interface SamplizeColorVecPaint {
4
+ variantId: string;
5
+ hex: string;
6
+ brand: string;
7
+ oklab: {
8
+ L: number;
9
+ a: number;
10
+ b: number;
11
+ };
12
+ family: string;
13
+ lightness: string;
14
+ intensity: string;
15
+ vector: number[] | string;
16
+ }
17
+ export interface SamplizeColorVecCache {
18
+ sourceVersion: string;
19
+ dictionaryVersion: string;
20
+ embeddingVersion: string;
21
+ rankingVersion: string;
22
+ generatedAt: string;
23
+ paints: SamplizeColorVecPaint[];
24
+ }
25
+ export interface SamplizeColorVecInput {
26
+ hex?: string;
27
+ reference?: string;
28
+ palette?: Array<{
29
+ hex: string;
30
+ proportion: number;
31
+ }>;
32
+ direction?: "similar" | "lighter" | "darker" | "muted";
33
+ brand?: string[];
34
+ family?: string[];
35
+ lightness?: string[];
36
+ intensity?: string[];
37
+ lightnessMin?: number;
38
+ lightnessMax?: number;
39
+ temperatureMin?: number;
40
+ temperatureMax?: number;
41
+ limit?: number;
42
+ }
43
+ export declare const samplizeSolidColorVector: (hex: string) => number[];
44
+ /** Canonical constraints are shared by full-cache similarity and constrained text retrieval. */
45
+ export declare function selectSamplizeEligiblePaints<T extends Omit<SamplizeColorVecPaint, "vector">>(paints: T[], input: SamplizeColorVecInput): {
46
+ reference: T | undefined;
47
+ eligible: T[];
48
+ counts: Record<"brand" | "family" | "intensity" | "lightness", Record<string, number>>;
49
+ };
50
+ /** Official portable MG ranking over its complete versioned sampling-channel projection. */
51
+ export declare function createSamplizeColorVecIndex(cache: SamplizeColorVecCache): {
52
+ search(input: SamplizeColorVecInput): {
53
+ ids: string[];
54
+ groups: {
55
+ hex: string;
56
+ proportion: number;
57
+ quota: number;
58
+ ids: string[];
59
+ shortfall: number;
60
+ }[];
61
+ limited: boolean;
62
+ eligibleCount: number;
63
+ counts: Record<"brand" | "family" | "intensity" | "lightness", Record<string, number>>;
64
+ sourceVersion: string;
65
+ dictionaryVersion: string;
66
+ embeddingVersion: string;
67
+ rankingVersion: string;
68
+ countBasis: "complete-catalogue";
69
+ };
70
+ };