@velarscript/web 0.10.1

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 (95) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +89 -0
  3. package/dist/analyzer.d.ts +302 -0
  4. package/dist/analyzer.d.ts.map +1 -0
  5. package/dist/analyzer.js +2931 -0
  6. package/dist/analyzer.js.map +1 -0
  7. package/dist/ast.d.ts +220 -0
  8. package/dist/ast.d.ts.map +1 -0
  9. package/dist/ast.js +102 -0
  10. package/dist/ast.js.map +1 -0
  11. package/dist/browser-test.d.ts +29 -0
  12. package/dist/browser-test.d.ts.map +1 -0
  13. package/dist/browser-test.js +33 -0
  14. package/dist/browser-test.js.map +1 -0
  15. package/dist/compiler.d.ts +9 -0
  16. package/dist/compiler.d.ts.map +1 -0
  17. package/dist/compiler.js +715 -0
  18. package/dist/compiler.js.map +1 -0
  19. package/dist/css-tokens.d.ts +46 -0
  20. package/dist/css-tokens.d.ts.map +1 -0
  21. package/dist/css-tokens.js +363 -0
  22. package/dist/css-tokens.js.map +1 -0
  23. package/dist/editor.d.ts +3 -0
  24. package/dist/editor.d.ts.map +1 -0
  25. package/dist/editor.js +147 -0
  26. package/dist/editor.js.map +1 -0
  27. package/dist/elements.d.ts +11 -0
  28. package/dist/elements.d.ts.map +1 -0
  29. package/dist/elements.js +24 -0
  30. package/dist/elements.js.map +1 -0
  31. package/dist/emitter.d.ts +79 -0
  32. package/dist/emitter.d.ts.map +1 -0
  33. package/dist/emitter.js +2699 -0
  34. package/dist/emitter.js.map +1 -0
  35. package/dist/host.d.ts +7 -0
  36. package/dist/host.d.ts.map +1 -0
  37. package/dist/host.js +224 -0
  38. package/dist/host.js.map +1 -0
  39. package/dist/index.d.ts +11 -0
  40. package/dist/index.d.ts.map +1 -0
  41. package/dist/index.js +23 -0
  42. package/dist/index.js.map +1 -0
  43. package/dist/inspection.d.ts +3 -0
  44. package/dist/inspection.d.ts.map +1 -0
  45. package/dist/inspection.js +82 -0
  46. package/dist/inspection.js.map +1 -0
  47. package/dist/keyframes.d.ts +16 -0
  48. package/dist/keyframes.d.ts.map +1 -0
  49. package/dist/keyframes.js +29 -0
  50. package/dist/keyframes.js.map +1 -0
  51. package/dist/lexer.d.ts +85 -0
  52. package/dist/lexer.d.ts.map +1 -0
  53. package/dist/lexer.js +422 -0
  54. package/dist/lexer.js.map +1 -0
  55. package/dist/look-static.d.ts +31 -0
  56. package/dist/look-static.d.ts.map +1 -0
  57. package/dist/look-static.js +266 -0
  58. package/dist/look-static.js.map +1 -0
  59. package/dist/look.d.ts +134 -0
  60. package/dist/look.d.ts.map +1 -0
  61. package/dist/look.js +627 -0
  62. package/dist/look.js.map +1 -0
  63. package/dist/parser.d.ts +71 -0
  64. package/dist/parser.d.ts.map +1 -0
  65. package/dist/parser.js +976 -0
  66. package/dist/parser.js.map +1 -0
  67. package/dist/project-config.d.ts +33 -0
  68. package/dist/project-config.d.ts.map +1 -0
  69. package/dist/project-config.js +199 -0
  70. package/dist/project-config.js.map +1 -0
  71. package/dist/runtime-foundation.d.ts +7 -0
  72. package/dist/runtime-foundation.d.ts.map +1 -0
  73. package/dist/runtime-foundation.js +1245 -0
  74. package/dist/runtime-foundation.js.map +1 -0
  75. package/dist/runtime.d.ts +7 -0
  76. package/dist/runtime.d.ts.map +1 -0
  77. package/dist/runtime.js +3444 -0
  78. package/dist/runtime.js.map +1 -0
  79. package/dist/semantic.d.ts +3 -0
  80. package/dist/semantic.d.ts.map +1 -0
  81. package/dist/semantic.js +150 -0
  82. package/dist/semantic.js.map +1 -0
  83. package/dist/types.d.ts +56 -0
  84. package/dist/types.d.ts.map +1 -0
  85. package/dist/types.js +178 -0
  86. package/dist/types.js.map +1 -0
  87. package/dist/websocket-runtime.d.ts +2 -0
  88. package/dist/websocket-runtime.d.ts.map +1 -0
  89. package/dist/websocket-runtime.js +30 -0
  90. package/dist/websocket-runtime.js.map +1 -0
  91. package/dist/worker-runtime.d.ts +2 -0
  92. package/dist/worker-runtime.d.ts.map +1 -0
  93. package/dist/worker-runtime.js +72 -0
  94. package/dist/worker-runtime.js.map +1 -0
  95. package/package.json +52 -0
@@ -0,0 +1,266 @@
1
+ import { LOOK_BUILDER_SIGNATURES, LOOK_UNIT_TYPES } from "./look.js";
2
+ import { isWebUnit } from "./ast.js";
3
+ function finite(value) {
4
+ return Number.isFinite(value) ? (Object.is(value, -0) ? 0 : value) : null;
5
+ }
6
+ function staticNumber(value) {
7
+ const normalized = finite(value);
8
+ return normalized === null ? null : { kind: "number", value: normalized };
9
+ }
10
+ function staticUnit(value, unit) {
11
+ const normalized = finite(value);
12
+ return normalized === null || !LOOK_UNIT_TYPES.has(unit) ? null : { kind: "unit", value: normalized, unit };
13
+ }
14
+ function negate(value) {
15
+ if (value.kind === "number")
16
+ return staticNumber(-value.value);
17
+ if (value.kind === "unit")
18
+ return staticUnit(-value.value, value.unit);
19
+ return null;
20
+ }
21
+ function staticArithmetic(operator, left, right) {
22
+ if (left.kind === "number" && right.kind === "number") {
23
+ if (operator === "/" && right.value === 0)
24
+ return null;
25
+ return staticNumber(operator === "+" ? left.value + right.value
26
+ : operator === "-" ? left.value - right.value
27
+ : operator === "*" ? left.value * right.value
28
+ : left.value / right.value);
29
+ }
30
+ if ((operator === "+" || operator === "-") && left.kind === "unit" && right.kind === "unit" && left.unit === right.unit) {
31
+ return staticUnit(operator === "+" ? left.value + right.value : left.value - right.value, left.unit);
32
+ }
33
+ if (operator === "*" && left.kind === "unit" && right.kind === "number")
34
+ return staticUnit(left.value * right.value, left.unit);
35
+ if (operator === "*" && left.kind === "number" && right.kind === "unit")
36
+ return staticUnit(left.value * right.value, right.unit);
37
+ if (operator === "/" && left.kind === "unit" && right.kind === "number" && right.value !== 0)
38
+ return staticUnit(left.value / right.value, left.unit);
39
+ return null;
40
+ }
41
+ export function isLookStaticValue(value) {
42
+ if (!value || typeof value !== "object")
43
+ return false;
44
+ const record = value;
45
+ if (record.kind === "number")
46
+ return typeof record.value === "number" && Number.isFinite(record.value);
47
+ if (record.kind === "css")
48
+ return typeof record.value === "string";
49
+ if (record.kind === "unit") {
50
+ return typeof record.value === "number" && Number.isFinite(record.value)
51
+ && typeof record.unit === "string" && LOOK_UNIT_TYPES.has(record.unit);
52
+ }
53
+ if (record.kind !== "object" || !record.properties || typeof record.properties !== "object" || Array.isArray(record.properties))
54
+ return false;
55
+ return Object.values(record.properties).every(isLookStaticValue);
56
+ }
57
+ /**
58
+ * Places a call's arguments at their declared positions, so a named argument
59
+ * lowers exactly like the positional spelling of the same call. A position that
60
+ * was not supplied stays a hole, which the builder rules below read as "use the
61
+ * default". Answers null when a name is not a parameter of this builder, when
62
+ * one position is written twice, or when a required position is missing —
63
+ * every one of which the analyzer reports on its own.
64
+ */
65
+ function builderArguments(expression, signature) {
66
+ const names = expression.argumentNames;
67
+ if (!names || names.every((entry) => entry === null))
68
+ return expression.arguments;
69
+ if (signature.rest)
70
+ return null;
71
+ const slots = [];
72
+ for (const [index, argument] of expression.arguments.entries()) {
73
+ const name = names[index] ?? null;
74
+ const position = name === null ? index : signature.parameters.indexOf(name);
75
+ if (position < 0 || slots[position] !== undefined)
76
+ return null;
77
+ slots[position] = argument;
78
+ }
79
+ for (let index = 0; index < signature.required; index += 1)
80
+ if (slots[index] === undefined)
81
+ return null;
82
+ return slots;
83
+ }
84
+ /**
85
+ * The static CSS a Look value lowers to at compile time: literals, unit values,
86
+ * arithmetic over them, `velar/look` builder calls, and const bindings — local
87
+ * or imported — that hold any of those. `keyframes:` needs the text itself
88
+ * because a stop becomes a real `@keyframes` rule, while a Look property keeps
89
+ * its runtime value; this is the one checker both spellings read, so a design
90
+ * token written once works in both (D60 rule 151).
91
+ */
92
+ export function lookStaticCssValue(expression, values = new Map()) {
93
+ if (isWebUnit(expression))
94
+ return expression.raw;
95
+ if (expression.kind === "LiteralExpression") {
96
+ if (typeof expression.value === "string")
97
+ return expression.value;
98
+ if (typeof expression.value !== "number")
99
+ return null;
100
+ const normalized = finite(expression.value);
101
+ return normalized === null ? null : String(normalized);
102
+ }
103
+ if (expression.kind === "IdentifierExpression" || expression.kind === "MemberExpression") {
104
+ const value = evaluateLookStaticExpression(expression, values);
105
+ return value === null ? null : lookStaticCss(value);
106
+ }
107
+ if (expression.kind === "UnaryExpression" && (expression.operator === "+" || expression.operator === "-")) {
108
+ const value = lookStaticCssValue(expression.operand, values);
109
+ if (value === null)
110
+ return null;
111
+ return expression.operator === "+" ? value : `calc(-1 * (${value}))`;
112
+ }
113
+ if (expression.kind === "BinaryExpression" && ["+", "-", "*", "/"].includes(expression.operator)) {
114
+ const left = lookStaticCssValue(expression.left, values);
115
+ const right = lookStaticCssValue(expression.right, values);
116
+ return left === null || right === null ? null : `calc(${left} ${expression.operator} ${right})`;
117
+ }
118
+ if (expression.kind !== "CallExpression" || expression.callee.kind !== "IdentifierExpression")
119
+ return null;
120
+ const name = expression.callee.name;
121
+ const signature = LOOK_BUILDER_SIGNATURES.get(name);
122
+ if (!signature)
123
+ return null;
124
+ const slots = builderArguments(expression, signature);
125
+ if (slots === null)
126
+ return null;
127
+ // shadow's sixth parameter is a bool flag, not a CSS value, so it is read
128
+ // below rather than lowered.
129
+ const lowered = slots.map((slot, index) => slot === undefined || (name === "shadow" && index === 5)
130
+ ? undefined
131
+ : lookStaticCssValue(slot, values));
132
+ if (lowered.some((value) => value === null))
133
+ return null;
134
+ const args = lowered;
135
+ const positional = args;
136
+ if (name === "color" && args.length === 1)
137
+ return positional[0];
138
+ if (name === "rgb" && args.length === 3)
139
+ return `rgb(${positional.join(" ")})`;
140
+ if (name === "rgba" && args.length === 4)
141
+ return `rgb(${positional.slice(0, 3).join(" ")} / ${positional[3]})`;
142
+ if (name === "hsl" && args.length === 3)
143
+ return `hsl(${positional[0]} ${positional[1]}% ${positional[2]}%)`;
144
+ if (name === "alpha" && args.length === 2)
145
+ return `color-mix(in srgb, ${positional[0]} ${Number(positional[1]) * 100}%, transparent)`;
146
+ if (name === "lighten" && args.length === 2)
147
+ return `color-mix(in srgb, ${positional[0]}, white ${Number(positional[1]) * 100}%)`;
148
+ if (name === "darken" && args.length === 2)
149
+ return `color-mix(in srgb, ${positional[0]}, black ${Number(positional[1]) * 100}%)`;
150
+ if (name === "border" && (args.length === 2 || args.length === 3))
151
+ return `${positional[0]} ${args[2] ?? "solid"} ${positional[1]}`;
152
+ if (name === "shadow" && args.length >= 4 && args.length <= 6) {
153
+ const inset = slots[5];
154
+ const prefix = inset?.kind === "LiteralExpression" && inset.value === true ? "inset " : "";
155
+ return `${prefix}${positional[0]} ${positional[1]} ${positional[2]} ${args[4] ?? "0px"} ${positional[3]}`;
156
+ }
157
+ if (name === "linearGradient" && args.length === 3)
158
+ return `linear-gradient(${positional.join(", ")})`;
159
+ if (name === "asset" && args.length === 1)
160
+ return `url(${JSON.stringify(positional[0])})`;
161
+ if (name === "minmax" && args.length === 2)
162
+ return `minmax(${positional.join(", ")})`;
163
+ if (name === "repeat" && args.length === 2)
164
+ return `repeat(${positional.join(", ")})`;
165
+ if (name === "tracks" && args.length > 0)
166
+ return positional.join(" ");
167
+ if (name === "spacing" && args.length > 0 && args.length <= 4)
168
+ return positional.join(" ");
169
+ if ((name === "min" || name === "max") && args.length === 2)
170
+ return `${name}(${positional.join(", ")})`;
171
+ if (name === "clamp" && args.length === 3)
172
+ return `clamp(${positional.join(", ")})`;
173
+ return null;
174
+ }
175
+ export function evaluateLookStaticExpression(expression, values) {
176
+ if (isWebUnit(expression))
177
+ return staticUnit(expression.value, expression.unit);
178
+ if (expression.kind === "LiteralExpression" && typeof expression.value === "number")
179
+ return staticNumber(expression.value);
180
+ // A keyword token is a design token too: `const shellDisplay = "grid"` reads
181
+ // in a stop exactly as the literal does. The text a Look value lowers to is
182
+ // the string itself, which is what the css kind holds.
183
+ if (expression.kind === "LiteralExpression" && typeof expression.value === "string")
184
+ return { kind: "css", value: expression.value };
185
+ if (expression.kind === "IdentifierExpression")
186
+ return values.get(expression.name) ?? null;
187
+ if (expression.kind === "UnaryExpression" && (expression.operator === "+" || expression.operator === "-")) {
188
+ const operand = evaluateLookStaticExpression(expression.operand, values);
189
+ return operand ? (expression.operator === "+" ? operand : negate(operand)) : null;
190
+ }
191
+ if (expression.kind === "BinaryExpression" && ["+", "-", "*", "/"].includes(expression.operator)) {
192
+ const left = evaluateLookStaticExpression(expression.left, values);
193
+ const right = evaluateLookStaticExpression(expression.right, values);
194
+ return left && right ? staticArithmetic(expression.operator, left, right) : null;
195
+ }
196
+ if (expression.kind === "ObjectExpression") {
197
+ const properties = Object.create(null);
198
+ for (const property of expression.properties) {
199
+ const value = evaluateLookStaticExpression(property.value, values);
200
+ if (!value)
201
+ return null;
202
+ if (property.kind === "ObjectSpread") {
203
+ if (value.kind !== "object")
204
+ return null;
205
+ Object.assign(properties, value.properties);
206
+ }
207
+ else
208
+ properties[property.name] = value;
209
+ }
210
+ return { kind: "object", properties };
211
+ }
212
+ if (expression.kind === "MemberExpression" && !expression.optional) {
213
+ const owner = evaluateLookStaticExpression(expression.object, values);
214
+ return owner?.kind === "object" ? owner.properties[expression.property] ?? null : null;
215
+ }
216
+ // A builder call resolves to the CSS text it produces, so `const glow =
217
+ // rgb(120, 150, 255)` is a design token a `keyframes:` stop can name -- in
218
+ // this module and, through the checked interface, in one that imports it.
219
+ // Every earlier branch already answered, so only a call reaches here.
220
+ if (expression.kind !== "CallExpression")
221
+ return null;
222
+ const css = lookStaticCssValue(expression, values);
223
+ return css === null ? null : { kind: "css", value: css };
224
+ }
225
+ export function collectLookStaticValues(program, imported = new Map()) {
226
+ const values = new Map(imported);
227
+ for (const statement of program.body) {
228
+ if (statement.kind !== "VariableDeclaration" || statement.binding !== "const" || statement.pattern.kind !== "NameBindingPattern")
229
+ continue;
230
+ const value = evaluateLookStaticExpression(statement.initializer, values);
231
+ if (value)
232
+ values.set(statement.pattern.name, value);
233
+ }
234
+ return values;
235
+ }
236
+ export function exportedLookStaticValues(program) {
237
+ const values = collectLookStaticValues(program);
238
+ const exported = new Map();
239
+ for (const statement of program.body) {
240
+ if (statement.kind !== "VariableDeclaration" || statement.binding !== "const" || !statement.exported
241
+ || statement.pattern.kind !== "NameBindingPattern")
242
+ continue;
243
+ const value = values.get(statement.pattern.name);
244
+ if (value)
245
+ exported.set(statement.pattern.name, value);
246
+ }
247
+ return exported;
248
+ }
249
+ export function lookStaticCss(value) {
250
+ if (value.kind === "unit")
251
+ return `${value.value}${value.unit}`;
252
+ if (value.kind === "css")
253
+ return value.value;
254
+ if (value.kind === "number")
255
+ return String(value.value);
256
+ return null;
257
+ }
258
+ export function lookStaticIdentity(value) {
259
+ if (!isLookStaticValue(value))
260
+ throw new TypeError("Invalid Look static interface value");
261
+ const normalized = (entry) => entry.kind === "object"
262
+ ? { kind: "object", properties: Object.fromEntries(Object.entries(entry.properties).sort(([left], [right]) => left.localeCompare(right)).map(([name, child]) => [name, normalized(child)])) }
263
+ : entry;
264
+ return JSON.stringify(normalized(value));
265
+ }
266
+ //# sourceMappingURL=look-static.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"look-static.js","sourceRoot":"","sources":["../src/look-static.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,uBAAuB,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AACrE,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAQrC,SAAS,MAAM,CAAC,KAAa;IAC3B,OAAO,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AAC5E,CAAC;AAED,SAAS,YAAY,CAAC,KAAa;IACjC,MAAM,UAAU,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IACjC,OAAO,UAAU,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,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C1F,MAAM,UAAU,GAAG,CAAC,KAAsB,EAAW,EAAE,CAAC,KAAK,CAAC,IAAI,KAAK,QAAQ;QAC7E,CAAC,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE;QAC7L,CAAC,CAAC,KAAK,CAAC;IACV,OAAO,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC;AAC3C,CAAC"}
package/dist/look.d.ts ADDED
@@ -0,0 +1,134 @@
1
+ export type LookUnitTypeName = "Length" | "Percentage" | "TrackFraction" | "Duration" | "Angle";
2
+ /**
3
+ * One source of truth for every suffix owned by the Web visual language.
4
+ * The lexer, analyzer, public-interface inference, and editor all consume this
5
+ * table so a unit cannot silently mean different things at different stages.
6
+ */
7
+ export declare const LOOK_UNIT_TYPES: ReadonlyMap<string, LookUnitTypeName>;
8
+ export declare const LOOK_MEDIA_LENGTH_UNITS: Set<string>;
9
+ /**
10
+ * The closed set of media-condition subjects a Look condition may name. Every
11
+ * subject lowers to a CSS media query, so the whole set stays live for the
12
+ * lifetime of the page. The names are reserved bindings in a Web module: a
13
+ * user binding of the same name would otherwise be shadowed by this table
14
+ * inside Look conditions only (LOK-D4).
15
+ */
16
+ export declare const LOOK_MEDIA_SUBJECTS: ReadonlyMap<string, ReadonlySet<string>>;
17
+ /** Media features a Web developer may reach for that Look deliberately omits. */
18
+ export declare const LOOK_ABSENT_MEDIA_SUBJECTS: Set<string>;
19
+ /**
20
+ * Properties whose CSS grammar takes a bare number. Every other numeric Look
21
+ * property is a length, so a unitless number would reach CSS as a dead
22
+ * declaration; the property tables reject it and the diagnostic teaches the
23
+ * unit (LOK-D3).
24
+ */
25
+ export declare const LOOK_UNITLESS_PROPERTIES: Set<string>;
26
+ /** Builders that compose lengths: a unitless argument other than 0 is dead CSS. */
27
+ export declare const LOOK_LENGTH_BUILDERS: Set<string>;
28
+ /**
29
+ * The numeric domains the velar/look builders enforce at run time. A literal
30
+ * argument is checked in the same terms while the module compiles, so an
31
+ * out-of-range colour never reaches a blank page (LOK-U8).
32
+ */
33
+ export declare const LOOK_BUILDER_NUMERIC_RANGES: ReadonlyMap<string, readonly (readonly [string, number, number] | null)[]>;
34
+ /** The border styles the border builder accepts, mirroring its runtime guard. */
35
+ export declare const LOOK_BORDER_STYLE_NAMES: Set<string>;
36
+ export declare const LOOK_ARITHMETIC_HINT = "@velarscript/web:look-arithmetic";
37
+ export declare const LOOK_NUMERIC_TYPE_NAMES: Set<string>;
38
+ export declare const LOOK_PUBLIC_TYPE_NAMES: readonly ["Look", "Length", "Percentage", "LengthPercentage", "TrackFraction", "Color", "Duration", "Angle", "Border", "Shadow", "Image", "Track", "TrackList", "Transition", "Spacing", "Keyframes", "Animation"];
39
+ export declare const LOOK_HOOKS: Set<string>;
40
+ export declare const LOOK_TARGETS: Set<string>;
41
+ export interface LookBuilderSignature {
42
+ /** Parameter names, in declaration order. */
43
+ readonly parameters: readonly string[];
44
+ /** How many leading parameters a call must supply. */
45
+ readonly required: number;
46
+ /** Whether the final parameter collects the remaining arguments. */
47
+ readonly rest?: boolean;
48
+ }
49
+ /**
50
+ * Every velar/look builder and the shape of its call. Three consumers read this
51
+ * one table — the published module interface, the named-argument check, and the
52
+ * static lowering that has to put a named argument back at its position when a
53
+ * builder call appears inside a `keyframes:` stop. D57 rule 134: a list two
54
+ * places need is written once and derived from.
55
+ */
56
+ export declare const LOOK_BUILDER_SIGNATURES: ReadonlyMap<string, LookBuilderSignature>;
57
+ export declare const LOOK_BUILDERS: Set<string>;
58
+ export declare const LOOK_ANIMATION_EASINGS: Set<string>;
59
+ export declare const LOOK_ANIMATION_DIRECTIONS: Set<string>;
60
+ export declare const LOOK_ANIMATION_FILLS: Set<string>;
61
+ /** Properties whose CSS values do not participate in interpolated animation. */
62
+ export declare const LOOK_NON_ANIMATABLE_PROPERTIES: Set<string>;
63
+ export interface LookPropertyGroup {
64
+ readonly family: string;
65
+ readonly properties: readonly string[];
66
+ }
67
+ /** Published Look vocabulary, grouped by the job each property performs. */
68
+ export declare const LOOK_PROPERTY_GROUPS: readonly LookPropertyGroup[];
69
+ export declare const LOOK_PROPERTIES: Set<string>;
70
+ export type LookPropertyValueKind = "animation" | "angle" | "background" | "border" | "color" | "duration" | "filter" | "image" | "keyword" | "line-height" | "metric" | "number" | "number-keyword" | "shadow" | "text" | "track" | "transform" | "transition";
71
+ export declare const LOOK_PROPERTY_VALUE_KINDS: ReadonlyMap<string, LookPropertyValueKind>;
72
+ /**
73
+ * The five keywords every CSS property accepts. They are kept apart from a
74
+ * property's own vocabulary so a diagnostic can lead with the values that
75
+ * belong to the property being written (D67 rule 174).
76
+ */
77
+ export declare const LOOK_CSS_WIDE_KEYWORDS: readonly string[];
78
+ export declare const LOOK_PROPERTY_KEYWORDS: ReadonlyMap<string, ReadonlySet<string>>;
79
+ /**
80
+ * D73 rule 187 — every kind whose string values are decided per property. D65
81
+ * rule 168 drew this line at `kind === "keyword"`, which was that wave's
82
+ * boundary rather than the principle: the principle is that publishing a
83
+ * surface which cannot be reached, or which swallows a false value, is worse
84
+ * than not publishing it (D50 rule 92), and that principle does not know about
85
+ * kinds. `metric` is absent because it answers with the sizing words when it
86
+ * has no table of its own, and `color`, `background` and `image` are absent
87
+ * because their diagnostics name a real vocabulary — a color keyword, a builder
88
+ * — rather than a table. `text`, `filter`, `transform` and `animation` accept
89
+ * arbitrary text by construction.
90
+ */
91
+ export declare const LOOK_KEYWORD_DECIDED_KINDS: ReadonlySet<LookPropertyValueKind>;
92
+ /** A property's own closed values, without the CSS-wide keywords every property shares. */
93
+ export declare function lookOwnKeywords(property: string): readonly string[];
94
+ /**
95
+ * D67 rule 174 — how many of a property's own values a diagnostic writes out
96
+ * before it names the shape of the set instead.
97
+ *
98
+ * The number is not load-bearing at its exact value: the published tables fall
99
+ * into two clumps with nothing between them, the largest single-grammar set
100
+ * holding twenty-two values and the next set up holding thirty-five. Anything
101
+ * in that gap draws the same line. What matters is that a set on the far side
102
+ * of it still says something an author can act on, which is what
103
+ * LOOK_LARGE_KEYWORD_SETS below is for.
104
+ */
105
+ export declare const LOOK_KEYWORD_LISTING_LIMIT = 24;
106
+ /**
107
+ * What a vocabulary too long to write out holds, in the terms the author would
108
+ * look it up by. A diagnostic reads this when the value it rejected is not a
109
+ * near miss of anything, so that "one of the closed keywords" is never the
110
+ * whole of the answer (D67 rule 174).
111
+ */
112
+ export declare const LOOK_LARGE_KEYWORD_SETS: ReadonlyMap<string, string>;
113
+ /**
114
+ * D65 rule 169 — what a partly closable property leaves out, and why.
115
+ *
116
+ * Some CSS value spaces cannot be written as a set: `listStyleType` reaches
117
+ * into `@counter-style` names, `fontVariant` into a combination of six feature
118
+ * groups, `fontStretch` into percentages. Such a property publishes the subset it
119
+ * can close and records the remainder here, so the boundary is visible in the
120
+ * table and in the diagnostic instead of being waved through by a fallback
121
+ * vocabulary. This is the per-value sibling of LOOK_EXCLUDED_PROPERTIES, which
122
+ * records the properties left out whole.
123
+ */
124
+ export declare const LOOK_PARTIAL_KEYWORD_PROPERTIES: ReadonlyMap<string, string>;
125
+ /** Real CSS properties deliberately outside the checked Look domain. */
126
+ export declare const LOOK_EXCLUDED_PROPERTIES: ReadonlyMap<string, string>;
127
+ export declare function cssPropertyName(name: string): string;
128
+ /**
129
+ * The closest vocabulary entry to a misspelling, or null when nothing is close
130
+ * enough to name. Case differences and one or two edits count as near misses;
131
+ * anything further apart is a different word and gets the full vocabulary.
132
+ */
133
+ export declare function nearestLookName(name: string, vocabulary: Iterable<string>): string | null;
134
+ //# sourceMappingURL=look.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"look.d.ts","sourceRoot":"","sources":["../src/look.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,gBAAgB,GAAG,QAAQ,GAAG,YAAY,GAAG,eAAe,GAAG,UAAU,GAAG,OAAO,CAAC;AAEhG;;;;GAIG;AACH,eAAO,MAAM,eAAe,EAAE,WAAW,CAAC,MAAM,EAAE,gBAAgB,CAMhE,CAAC;AAEH,eAAO,MAAM,uBAAuB,aAA+B,CAAC;AAEpE;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,EAAE,WAAW,CAAC,MAAM,EAAE,WAAW,CAAC,MAAM,CAAC,CAIvE,CAAC;AAEH,iFAAiF;AACjF,eAAO,MAAM,0BAA0B,aAA+H,CAAC;AAEvK;;;;;GAKG;AACH,eAAO,MAAM,wBAAwB,aAEnC,CAAC;AAEH,mFAAmF;AACnF,eAAO,MAAM,oBAAoB,aAAsF,CAAC;AAExH;;;;GAIG;AACH,eAAO,MAAM,2BAA2B,EAAE,WAAW,CAAC,MAAM,EAAE,SAAS,CAAC,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,CAAC,EAAE,CAOjH,CAAC;AAEH,iFAAiF;AACjF,eAAO,MAAM,uBAAuB,aAA2G,CAAC;AAEhJ,eAAO,MAAM,oBAAoB,qCAAqC,CAAC;AAEvE,eAAO,MAAM,uBAAuB,aAElC,CAAC;AAKH,eAAO,MAAM,sBAAsB,oNAGxB,CAAC;AAEZ,eAAO,MAAM,UAAU,aAErB,CAAC;AAEH,eAAO,MAAM,YAAY,aAEvB,CAAC;AAEH,MAAM,WAAW,oBAAoB;IACnC,6CAA6C;IAC7C,QAAQ,CAAC,UAAU,EAAE,SAAS,MAAM,EAAE,CAAC;IACvC,sDAAsD;IACtD,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1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