ol 9.2.5-dev.1718182619798 → 9.2.5-dev.1718183112915

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/expr/cpu.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cpu.d.ts","sourceRoot":"","sources":["cpu.js"],"names":[],"mappings":"AAqBA;;;;;;GAMG;AAEH;;;;;;;GAOG;AAEH;;GAEG;AACH,wCAFY,iBAAiB,CAU5B;AAED;;GAEG;AAEH;;GAEG;AAEH;;GAEG;AAEH;;GAEG;AAEH;;GAEG;AAEH;;GAEG;AAEH;;GAEG;AAEH;;GAEG;AAEH;;GAEG;AAEH;;;;;GAKG;AACH,yCALW,OAAO,iBAAiB,EAAE,iBAAiB,QAC3C,MAAM,WACN,OAAO,iBAAiB,EAAE,cAAc,GACvC,mBAAmB,CAY9B;;;;;;;;;;;;;gBAtEa,MAAM;;;;eACN,MAAM,GAAC,MAAM,GAAC,IAAI;;;;kBAClB,MAAM;;yCAiBE,iBAAiB,KAAE,OAAO,iBAAiB,EAAE,YAAY;sCAIzD,iBAAiB,KAAE,OAAO;qCAI1B,iBAAiB,KAAE,MAAM;qCAIzB,iBAAiB,KAAE,MAAM;wCAIzB,iBAAiB,KAAE,CAAC,MAAM,MAAM,CAAC,GAAC,MAAM,CAAC;0CAIzC,iBAAiB,KAAE,MAAM,MAAM,CAAC;yCAIhC,iBAAiB,KAAE,MAAM,MAAM,CAAC;mCAIhC,iBAAiB,KAAE,CAAC,MAAM,MAAM,CAAC,CAAC;uCAIlC,iBAAiB,KAAE,CAAC,MAAM,MAAM,CAAC,GAAC,MAAM,CAAC"}
1
+ {"version":3,"file":"cpu.d.ts","sourceRoot":"","sources":["cpu.js"],"names":[],"mappings":"AAcA;;;;;;GAMG;AAEH;;;;;;;GAOG;AAEH;;GAEG;AACH,wCAFY,iBAAiB,CAU5B;AAED;;GAEG;AAEH;;GAEG;AAEH;;GAEG;AAEH;;GAEG;AAEH;;GAEG;AAEH;;GAEG;AAEH;;GAEG;AAEH;;GAEG;AAEH;;GAEG;AAEH;;;;;GAKG;AACH,yCALW,OAAO,iBAAiB,EAAE,iBAAiB,QAC3C,MAAM,WACN,OAAO,iBAAiB,EAAE,cAAc,GACvC,mBAAmB,CAK9B;;;;;;;;;;;;;gBA/Da,MAAM;;;;eACN,MAAM,GAAC,MAAM,GAAC,IAAI;;;;kBAClB,MAAM;;yCAiBE,iBAAiB,KAAE,OAAO,iBAAiB,EAAE,YAAY;sCAIzD,iBAAiB,KAAE,OAAO;qCAI1B,iBAAiB,KAAE,MAAM;qCAIzB,iBAAiB,KAAE,MAAM;wCAIzB,iBAAiB,KAAE,CAAC,MAAM,MAAM,CAAC,GAAC,MAAM,CAAC;0CAIzC,iBAAiB,KAAE,MAAM,MAAM,CAAC;yCAIhC,iBAAiB,KAAE,MAAM,MAAM,CAAC;mCAIhC,iBAAiB,KAAE,CAAC,MAAM,MAAM,CAAC,CAAC;uCAIlC,iBAAiB,KAAE,CAAC,MAAM,MAAM,CAAC,GAAC,MAAM,CAAC"}
package/expr/cpu.js CHANGED
@@ -2,14 +2,7 @@
2
2
  * @module ol/expr/cpu
3
3
  */
4
4
 
5
- import {
6
- ColorType,
7
- LiteralExpression,
8
- Ops,
9
- overlapsType,
10
- parse,
11
- typeName,
12
- } from './expression.js';
5
+ import {ColorType, LiteralExpression, Ops, parse} from './expression.js';
13
6
  import {
14
7
  fromString,
15
8
  lchaToRgba,
@@ -92,14 +85,7 @@ export function newEvaluationContext() {
92
85
  * @return {ExpressionEvaluator} The expression evaluator.
93
86
  */
94
87
  export function buildExpression(encoded, type, context) {
95
- const expression = parse(encoded, context);
96
- if (!overlapsType(type, expression.type)) {
97
- const expected = typeName(type);
98
- const actual = typeName(expression.type);
99
- throw new Error(
100
- `Expected expression to be of type ${expected}, got ${actual}`,
101
- );
102
- }
88
+ const expression = parse(encoded, type, context);
103
89
  return compileExpression(expression, context);
104
90
  }
105
91
 
@@ -31,7 +31,6 @@ export function isType(type: number, expected: number): boolean;
31
31
  * @property {Set<string>} properties Properties referenced with the 'get' operator.
32
32
  * @property {boolean} featureId The style uses the feature id.
33
33
  * @property {boolean} geometryType The style uses the feature geometry type.
34
- * @property {import("../style/flat.js").FlatStyle|import("../style/webgl.js").WebGLStyle} style The style being parsed
35
34
  */
36
35
  /**
37
36
  * @return {ParsingContext} A new parsing context.
@@ -42,11 +41,11 @@ export function newParsingContext(): ParsingContext;
42
41
  */
43
42
  /**
44
43
  * @param {EncodedExpression} encoded The encoded expression.
44
+ * @param {number} expectedType The expected type.
45
45
  * @param {ParsingContext} context The parsing context.
46
- * @param {number} [typeHint] Optional type hint
47
46
  * @return {Expression} The parsed expression result.
48
47
  */
49
- export function parse(encoded: EncodedExpression, context: ParsingContext, typeHint?: number | undefined): Expression;
48
+ export function parse(encoded: EncodedExpression, expectedType: number, context: ParsingContext): Expression;
50
49
  /**
51
50
  * Returns a simplified geometry type suited for the `geometry-type` operator
52
51
  * @param {import('../geom/Geometry.js').default|import('../render/Feature.js').default} geometry Geometry object
@@ -108,19 +107,13 @@ export type ParsingContext = {
108
107
  * The style uses the feature geometry type.
109
108
  */
110
109
  geometryType: boolean;
111
- /**
112
- * The style being parsed
113
- */
114
- style: import("../style/flat.js").FlatStyle | import("../style/webgl.js").WebGLStyle;
115
110
  };
116
111
  export type EncodedExpression = LiteralValue | any[];
117
112
  /**
118
- * An argument validator applies various checks to an encoded expression arguments
119
- * Returns the parsed arguments if any.
120
- * Third argument is the array of parsed arguments from previous validators
121
- * Fourth argument is an optional type hint
113
+ * An argument validator applies various checks to an encoded expression arguments and
114
+ * returns the parsed arguments if any. The second argument is the return type of the call expression.
122
115
  */
123
- export type ArgValidator = (arg0: Array<EncodedExpression>, arg1: ParsingContext, arg2: Array<Expression>, arg3: number | null) => Array<Expression> | void;
116
+ export type ArgValidator = (arg0: Array<EncodedExpression>, arg1: number, arg2: ParsingContext) => Array<Expression> | void;
124
117
  /**
125
118
  * Base type used for literal style parameters; can be a number literal or the output of an operator,
126
119
  * which in turns takes {@link import ("./expression.js").ExpressionValue} arguments.
@@ -236,7 +229,7 @@ export type ArgValidator = (arg0: Array<EncodedExpression>, arg1: ParsingContext
236
229
  export type ExpressionValue = Array<any> | import("../color.js").Color | string | number | boolean;
237
230
  export type LiteralValue = boolean | number | string | Array<number>;
238
231
  /**
239
- * Third argument is a type hint
232
+ * Second argument is the expected type.
240
233
  */
241
- export type Parser = (arg0: any[], arg1: ParsingContext, arg2: number) => Expression;
234
+ export type Parser = (arg0: any[], arg1: number, arg2: ParsingContext) => Expression;
242
235
  //# sourceMappingURL=expression.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"expression.d.ts","sourceRoot":"","sources":["expression.js"],"names":[],"mappings":"AAsJA;;;;GAIG;AACH,+BAHW,MAAM,GACL,MAAM,CAgBjB;AAED;;;;GAIG;AACH,oCAJW,MAAM,YACN,MAAM,GACL,OAAO,CAIlB;AAED;;;;GAIG;AACH,sCAJW,MAAM,aACN,MAAM,GACL,OAAO,CAIlB;AAED;;;;GAIG;AACH,6BAJW,MAAM,YACN,MAAM,GACL,OAAO,CAIlB;AA8BD;;GAEG;AAEH;;;;;;;GAOG;AAEH;;GAEG;AACH,qCAFY,cAAc,CAUzB;AAED;;GAEG;AAEH;;;;;GAKG;AACH,+BALW,iBAAiB,WACjB,cAAc,kCAEb,UAAU,CAyDrB;AA2yBD;;;;GAIG;AACH,8CAHW,OAAO,qBAAqB,EAAE,OAAO,GAAC,OAAO,sBAAsB,EAAE,OAAO,GAC3E,OAAO,GAAC,YAAY,GAAC,SAAS,GAAC,EAAE,CA2B5C;AApgCD,yBAA0B;AAC1B,iCAA2C;AAC3C,gCAA0C;AAC1C,gCAA0C;AAC1C,+BAAyC;AACzC,qCAA+C;AAC/C,8BAAwC;AACxC,6BAAiD;AA6DjD;;GAEG;AAEH;IACE;;;OAGG;IACH,kBAHW,MAAM,SACN,YAAY,EAKtB;IAFC,aAAgB;IA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