@evergis/common 0.0.112 → 1.0.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/LICENSE +2 -2
  2. package/README.md +0 -28
  3. package/dist/classification/ClientStyleValidator/ClientStyleValidator.d.ts +26 -0
  4. package/dist/classification/ClientStyleValidator/constants.d.ts +2 -0
  5. package/dist/classification/ClientStyleValidator/index.d.ts +2 -0
  6. package/dist/classification/ClientStyleValidator/types.d.ts +10 -0
  7. package/dist/classification/enrichStyleItemsWithIds.d.ts +2 -0
  8. package/dist/classification/enrichStyleModelsWithIds.d.ts +2 -0
  9. package/dist/classification/findAttributeInExpression.d.ts +2 -0
  10. package/dist/classification/getActualExtrusionHeight.d.ts +2 -0
  11. package/dist/classification/getClientStyleItemId.d.ts +3 -0
  12. package/dist/classification/getLayerClientStyle.d.ts +3 -0
  13. package/dist/classification/getStyleAttributes.d.ts +2 -0
  14. package/dist/classification/index.d.ts +8 -0
  15. package/dist/common.esm.js +2507 -279
  16. package/dist/common.esm.js.map +1 -1
  17. package/dist/constants/index.d.ts +1 -0
  18. package/dist/constants/styling.d.ts +36 -0
  19. package/dist/icons/index.d.ts +1 -0
  20. package/dist/icons/parseIconNames.d.ts +27 -0
  21. package/dist/index.d.ts +7 -5
  22. package/dist/index.js +2609 -5
  23. package/dist/index.js.map +1 -0
  24. package/dist/map/constants.d.ts +4 -0
  25. package/dist/map/getMapView.d.ts +10 -0
  26. package/dist/map/index.d.ts +4 -0
  27. package/dist/map/parseMapStyle.d.ts +19 -0
  28. package/dist/map/types.d.ts +7 -0
  29. package/dist/taskParameters/SchemaResolver.d.ts +14 -0
  30. package/dist/taskParameters/buildDefaultForSchema.d.ts +23 -0
  31. package/dist/taskParameters/getPrimaryType.d.ts +2 -0
  32. package/dist/taskParameters/index.d.ts +6 -0
  33. package/dist/taskParameters/mergeHiddenFieldDefaults.d.ts +2 -0
  34. package/dist/taskParameters/orderPropertyKeys.d.ts +2 -0
  35. package/dist/taskParameters/types.d.ts +36 -0
  36. package/dist/types/attribute.d.ts +18 -0
  37. package/dist/types/feature.d.ts +11 -0
  38. package/dist/types/index.d.ts +6 -0
  39. package/dist/types/layer.d.ts +5 -0
  40. package/dist/types/project.d.ts +4 -0
  41. package/dist/types/styling.d.ts +36 -0
  42. package/dist/types/theme.d.ts +4 -0
  43. package/dist/utils/color.d.ts +28 -0
  44. package/dist/utils/date.d.ts +16 -0
  45. package/dist/utils/debounce.d.ts +1 -0
  46. package/dist/utils/format.d.ts +47 -0
  47. package/dist/utils/geometryToEwkt.d.ts +2 -0
  48. package/dist/utils/index.d.ts +10 -1
  49. package/dist/utils/isLayerService.d.ts +2 -0
  50. package/dist/utils/isNumeric.d.ts +1 -0
  51. package/dist/utils/isObject.d.ts +1 -0
  52. package/dist/utils/metersPerPixel.d.ts +1 -0
  53. package/dist/utils/roundTotalSum.d.ts +2 -0
  54. package/package.json +35 -54
  55. package/dist/ApiProvider.d.ts +0 -7
  56. package/dist/common.cjs.development.js +0 -310
  57. package/dist/common.cjs.development.js.map +0 -1
  58. package/dist/common.cjs.production.min.js +0 -2
  59. package/dist/common.cjs.production.min.js.map +0 -1
  60. package/dist/components/Politics/PolicyItem.d.ts +0 -3
  61. package/dist/components/Politics/hooks/usePolitics.d.ts +0 -8
  62. package/dist/components/Politics/index.d.ts +0 -3
  63. package/dist/components/Politics/styled.d.ts +0 -11
  64. package/dist/components/Politics/types.d.ts +0 -24
  65. package/dist/components/index.d.ts +0 -1
  66. package/dist/i18n/index.d.ts +0 -24
  67. package/dist/resources/index.d.ts +0 -1
  68. package/dist/resources/limits.d.ts +0 -2
  69. package/dist/utils/formatNumber.d.ts +0 -1
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2020 Kirill Protasov
3
+ Copyright (c) 2026 Everpoint
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
18
  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
19
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
20
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,29 +1 @@
1
1
  # @evergis/common
2
-
3
- ## Commands
4
-
5
- ```
6
- npm start # or yarn start
7
- ```
8
-
9
- This builds to `/dist` and runs the project in watch mode so any edits you save inside `src` causes a rebuild to `/dist`.
10
-
11
- Then run either example playground or storybook:
12
-
13
- ### Storybook
14
-
15
- Run inside another terminal:
16
-
17
- ```
18
- yarn storybook
19
- ```
20
-
21
- This loads the stories from `./stories`.
22
-
23
- > NOTE: Stories should reference the components as if using the library. This means importing from the root project directory. This has been aliased in the tsconfig and the storybook webpack config as a helper.
24
-
25
- ### Tests
26
-
27
- Jest tests are set up to run with `npm test` or `yarn test`. This runs the test watcher (Jest) in an interactive mode. By default, runs tests related to files changed since the last commit.
28
-
29
- > TODO: MOVE style to separate @evergis/style
@@ -0,0 +1,26 @@
1
+ import { ClientStyleValidatorOptions, SpecPropValueOptions } from './types';
2
+ import { ClientStyle } from '../../types';
3
+ export declare class ClientStyleValidator {
4
+ private options?;
5
+ constructor(options?: ClientStyleValidatorOptions);
6
+ validate(clientStyle?: ClientStyle): boolean;
7
+ getSpecPropValueOptions(key: string): SpecPropValueOptions;
8
+ isHeatmapColorValid(value: unknown): boolean;
9
+ isZoomInterpolate(value: unknown): boolean;
10
+ private validateSupportedConcatExpression;
11
+ private validateSupportedMatchExpression;
12
+ private validateSupportedCaseExpression;
13
+ private validateSupportedStepExpression;
14
+ private validateLinearZoomInterpolate;
15
+ private validateExponentialZoomInterpolate;
16
+ private validateCubicBezierZoomInterpolate;
17
+ private validateLinearDataInterpolate;
18
+ private validateExponentialDataInterpolate;
19
+ private validateCubicBezierDataInterpolate;
20
+ private validateZoomInterpolate;
21
+ private validateDataInterpolate;
22
+ private validateSupportedInterpolateExpression;
23
+ private validateSupportedExpression;
24
+ private validateTransitionValue;
25
+ private validateSpecPropValue;
26
+ }
@@ -0,0 +1,2 @@
1
+ import { SpecPropValueOptions } from './types';
2
+ export declare const SPEC_PROP_VALUE_OPTIONS: Record<string, SpecPropValueOptions>;
@@ -0,0 +1,2 @@
1
+ export * from './ClientStyleValidator';
2
+ export * from './types';
@@ -0,0 +1,10 @@
1
+ export interface ClientStyleValidatorOptions {
2
+ verbose?: boolean;
3
+ }
4
+ export interface SpecPropValueOptions {
5
+ dataExpressionSupport?: boolean;
6
+ interpolateExpressionSupport?: boolean;
7
+ transitionable?: boolean;
8
+ valueTypeAllowed?: "number" | "string" | "boolean";
9
+ arrayValue?: boolean;
10
+ }
@@ -0,0 +1,2 @@
1
+ import { ClientStyle } from '../types';
2
+ export declare const enrichStyleItemsWithIds: (style: ClientStyle) => ClientStyle;
@@ -0,0 +1,2 @@
1
+ import { ClientStyle } from '../types';
2
+ export declare const enrichStyleModelsWithIds: (style: ClientStyle) => ClientStyle;
@@ -0,0 +1,2 @@
1
+ import { ExpressionSpecification } from 'maplibre-gl';
2
+ export declare const findAttributeInExpression: (expression: ExpressionSpecification) => string[];
@@ -0,0 +1,2 @@
1
+ import { CircleLayerSpecification, LineLayerSpecification, FillLayerSpecification, FillExtrusionLayerSpecification, HeatmapLayerSpecification, SymbolLayerSpecification } from 'maplibre-gl';
2
+ export declare const getActualExtrusionHeight: (paint: CircleLayerSpecification["paint"] | LineLayerSpecification["paint"] | FillLayerSpecification["paint"] | FillExtrusionLayerSpecification["paint"] | HeatmapLayerSpecification["paint"] | SymbolLayerSpecification["paint"]) => any;
@@ -0,0 +1,3 @@
1
+ import { ClientStyle } from '../types';
2
+ /** Стабильный ID элемента стиля для MapLibre, в том числе когда `item.id` не задан. */
3
+ export declare const getClientStyleItemId: (items: ClientStyle["items"], index: number) => string;
@@ -0,0 +1,3 @@
1
+ import { QueryLayerServiceInfoDc } from '@evergis/api';
2
+ import { ClientStyle } from '../types';
3
+ export declare const getLayerClientStyle: (layer: QueryLayerServiceInfoDc) => ClientStyle;
@@ -0,0 +1,2 @@
1
+ import { ClientStyle } from '../types';
2
+ export declare const getStyleAttributes: (style?: ClientStyle) => string[];
@@ -0,0 +1,8 @@
1
+ export * from './ClientStyleValidator';
2
+ export * from './enrichStyleItemsWithIds';
3
+ export * from './getClientStyleItemId';
4
+ export * from './enrichStyleModelsWithIds';
5
+ export * from './findAttributeInExpression';
6
+ export * from './getActualExtrusionHeight';
7
+ export * from './getLayerClientStyle';
8
+ export * from './getStyleAttributes';