@maplibre/maplibre-gl-style-spec
Advanced tools
Comparing version 18.0.1-pre.10 to 18.0.1-pre.11
@@ -7,24 +7,2 @@ // Generated by dts-bundle-generator v7.2.0 | ||
/** | ||
* Format a MapLibre GL Style. Returns a stringified style with its keys | ||
* sorted in the same order as the reference style. | ||
* | ||
* The optional `space` argument is passed to | ||
* [`JSON.stringify`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify) | ||
* to generate formatted output. | ||
* | ||
* If `space` is unspecified, a default of `2` spaces will be used. | ||
* | ||
* @private | ||
* @param {Object} style a MapLibre GL Style | ||
* @param {number} [space] space argument to pass to `JSON.stringify` | ||
* @returns {string} stringified formatted JSON | ||
* @example | ||
* var fs = require('fs'); | ||
* var format = require('maplibre-gl-style-spec').format; | ||
* var style = fs.readFileSync('./source.json', 'utf8'); | ||
* fs.writeFileSync('./dest.json', format(style)); | ||
* fs.writeFileSync('./dest.min.json', format(style, 0)); | ||
*/ | ||
export declare function format(style: any, space?: number): string; | ||
/** | ||
* Given an array of layers, some of which may contain `ref` properties | ||
@@ -1527,3 +1505,2 @@ * whose value is the `id` of another property, return a new array where | ||
}, callback: PropertyCallback): void; | ||
declare function validateStyle(style: StyleSpecification | string | Buffer, styleSpec?: any): Array<ValidationError>; | ||
export declare function supportsPropertyExpression(spec: StylePropertySpecification): boolean; | ||
@@ -1746,5 +1723,4 @@ export declare const interpolateFactory: (interpolationType: "number" | "color" | "array" | "padding") => typeof number | typeof color | typeof array | typeof padding; | ||
styleFunction as function, | ||
validateStyle as validate, | ||
}; | ||
export {}; |
{ | ||
"name": "@maplibre/maplibre-gl-style-spec", | ||
"description": "a specification for maplibre gl styles", | ||
"version": "18.0.1-pre.10", | ||
"version": "18.0.1-pre.11", | ||
"author": "MapLibre", | ||
@@ -6,0 +6,0 @@ "keywords": [ |
@@ -69,3 +69,2 @@ type ExpressionType = 'data-driven' | 'cross-faded' | 'cross-faded-data-driven' | 'color-ramp' | 'data-constant' | 'constant'; | ||
import latest from './reference/latest'; | ||
import format from './format'; | ||
import derefLayers from './deref'; | ||
@@ -86,3 +85,2 @@ import diff, {operations} from './diff'; | ||
import ResolvedImage from './expression/types/resolved_image'; | ||
import validate from './validate_style'; | ||
import {supportsPropertyExpression} from './util/properties'; | ||
@@ -161,7 +159,5 @@ import {IMercatorCoordinate, ICanonicalTileID, ILngLat, ILngLatLike} from './tiles_and_coordinates'; | ||
interpolateFactory, | ||
validate, | ||
validateStyleMin, | ||
groupByLayout, | ||
emptyStyle, | ||
format, | ||
derefLayers, | ||
@@ -168,0 +164,0 @@ normalizePropertyExpression, |
@@ -18,4 +18,4 @@ import {readdir} from 'fs/promises'; | ||
expect(await import('../../dist/index.cjs')).toHaveProperty('validate'); | ||
expect(await import('../../dist/index.cjs')).toHaveProperty('validateStyleMin'); | ||
}); | ||
}); |
@@ -67,3 +67,2 @@ type ExpressionType = 'data-driven' | 'cross-faded' | 'cross-faded-data-driven' | 'color-ramp' | 'data-constant' | 'constant'; | ||
import latest from './reference/latest'; | ||
import format from './format'; | ||
import derefLayers from './deref'; | ||
@@ -83,3 +82,2 @@ import diff, { operations } from './diff'; | ||
import ResolvedImage from './expression/types/resolved_image'; | ||
import validate from './validate_style'; | ||
import { supportsPropertyExpression } from './util/properties'; | ||
@@ -122,2 +120,2 @@ import { IMercatorCoordinate, ICanonicalTileID, ILngLat, ILngLatLike } from './tiles_and_coordinates'; | ||
}; | ||
export { Interpolate, InterpolationType, ValidationError, ParsingError, FeatureState, Color, Step, CompoundExpression, Padding, Formatted, ResolvedImage, Feature, EvaluationContext, GlobalProperties, SourceExpression, CompositeExpression, FormattedSection, IMercatorCoordinate, ICanonicalTileID, ILngLat, ILngLatLike, StyleExpression, ZoomConstantExpression, Literal, Type, StylePropertyFunction, StylePropertyExpression, ZoomDependentExpression, FormatExpression, latest, interpolateFactory, validate, validateStyleMin, groupByLayout, emptyStyle, format, derefLayers, normalizePropertyExpression, isExpression, diff, supportsPropertyExpression, convertFunction, createExpression, isFunction, createFunction, createPropertyExpression, convertFilter, featureFilter, typeOf, toString, ColorType, interpolates, v8, NullType, styleFunction as function, visit, operations, expressions, expression, FormattedType, }; | ||
export { Interpolate, InterpolationType, ValidationError, ParsingError, FeatureState, Color, Step, CompoundExpression, Padding, Formatted, ResolvedImage, Feature, EvaluationContext, GlobalProperties, SourceExpression, CompositeExpression, FormattedSection, IMercatorCoordinate, ICanonicalTileID, ILngLat, ILngLatLike, StyleExpression, ZoomConstantExpression, Literal, Type, StylePropertyFunction, StylePropertyExpression, ZoomDependentExpression, FormatExpression, latest, interpolateFactory, validateStyleMin, groupByLayout, emptyStyle, derefLayers, normalizePropertyExpression, isExpression, diff, supportsPropertyExpression, convertFunction, createExpression, isFunction, createFunction, createPropertyExpression, convertFilter, featureFilter, typeOf, toString, ColorType, interpolates, v8, NullType, styleFunction as function, visit, operations, expressions, expression, FormattedType, }; |
import v8Spec from './reference/v8.json' assert { type: 'json' }; | ||
const v8 = v8Spec; | ||
import latest from './reference/latest'; | ||
import format from './format'; | ||
import derefLayers from './deref'; | ||
@@ -19,3 +18,2 @@ import diff, { operations } from './diff'; | ||
import ResolvedImage from './expression/types/resolved_image'; | ||
import validate from './validate_style'; | ||
import { supportsPropertyExpression } from './util/properties'; | ||
@@ -52,3 +50,3 @@ import EvaluationContext from './expression/evaluation_context'; | ||
const visit = { eachLayer, eachProperty, eachSource }; | ||
export { Interpolate, ValidationError, ParsingError, Color, Step, CompoundExpression, Padding, Formatted, ResolvedImage, EvaluationContext, FormattedSection, StyleExpression, ZoomConstantExpression, Literal, StylePropertyFunction, ZoomDependentExpression, FormatExpression, latest, interpolateFactory, validate, validateStyleMin, groupByLayout, emptyStyle, format, derefLayers, normalizePropertyExpression, isExpression, diff, supportsPropertyExpression, convertFunction, createExpression, isFunction, createFunction, createPropertyExpression, convertFilter, featureFilter, typeOf, toString, ColorType, interpolates, v8, NullType, styleFunction as function, visit, operations, expressions, expression, FormattedType, }; | ||
export { Interpolate, ValidationError, ParsingError, Color, Step, CompoundExpression, Padding, Formatted, ResolvedImage, EvaluationContext, FormattedSection, StyleExpression, ZoomConstantExpression, Literal, StylePropertyFunction, ZoomDependentExpression, FormatExpression, latest, interpolateFactory, validateStyleMin, groupByLayout, emptyStyle, derefLayers, normalizePropertyExpression, isExpression, diff, supportsPropertyExpression, convertFunction, createExpression, isFunction, createFunction, createPropertyExpression, convertFilter, featureFilter, typeOf, toString, ColorType, interpolates, v8, NullType, styleFunction as function, visit, operations, expressions, expression, FormattedType, }; | ||
//# sourceMappingURL=style-spec.js.map |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2987819
60440