@omnic/widget-locations 1.0.25 → 1.0.27

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 (36) hide show
  1. package/dist/lib/src/components/Aside/Aside.d.ts +2 -2
  2. package/dist/lib/src/components/Header/Header.d.ts +3 -3
  3. package/dist/lib/src/components/LocationAside/LocationAside.d.ts +3 -1
  4. package/dist/lib/src/components/LocationSelector/LocationSelector.d.ts +0 -3
  5. package/dist/lib/src/components/MapGoogle/MapGoogle.hooks.d.ts +2 -2
  6. package/dist/lib/src/components/Sidebar/ReceiveFilterContainer.d.ts +8 -0
  7. package/dist/lib/src/components/Sidebar/SendFilterContainer.d.ts +8 -0
  8. package/dist/lib/src/components/Sidebar/TypeFilterContainer.d.ts +8 -0
  9. package/dist/lib/src/hooks/index.d.ts +2 -5
  10. package/dist/lib/src/hooks/useMapRenderer.d.ts +3 -0
  11. package/dist/lib/src/hooks/useWidgetConfig.d.ts +2 -0
  12. package/dist/lib/src/stores/filters.d.ts +8 -0
  13. package/dist/lib/src/stores/locationAside.d.ts +8 -0
  14. package/dist/lib/src/stores/map.d.ts +3 -1
  15. package/dist/lib/src/stores/selectedPlace.d.ts +9 -0
  16. package/dist/lib/src/stores/selectedPoint.d.ts +2 -2
  17. package/dist/lib/src/types/config.d.ts +2 -3
  18. package/dist/lib/src/utils/index.d.ts +1 -0
  19. package/dist/lib/src/utils/setWidgetCSSProperty.d.ts +1 -0
  20. package/dist/lib/src/views/Widget/Widget.hooks.d.ts +6 -0
  21. package/dist/lib/src/views/Widget/WidgetContainer.d.ts +6 -0
  22. package/dist/lib/style.css +1 -1
  23. package/dist/lib/widget.es.js +5093 -9052
  24. package/dist/lib/widget.umd.js +15 -27
  25. package/package.json +3 -2
  26. package/dist/lib/src/components/Devtool/Devtool.d.ts +0 -2
  27. package/dist/lib/src/components/Devtool/Devtool.utils.d.ts +0 -27
  28. package/dist/lib/src/components/Devtool/index.d.ts +0 -1
  29. package/dist/lib/src/components/Header/LocationSelectorContainer.d.ts +0 -2
  30. package/dist/lib/src/context/filter.d.ts +0 -10
  31. package/dist/lib/src/context/location.d.ts +0 -14
  32. package/dist/lib/src/hooks/useConfig.d.ts +0 -2
  33. package/dist/lib/src/hooks/useFilters.d.ts +0 -5
  34. package/dist/lib/src/hooks/useLocation.d.ts +0 -6
  35. package/dist/lib/src/hooks/useLocationAside.d.ts +0 -4
  36. package/dist/lib/src/hooks/useMapFactory.d.ts +0 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@omnic/widget-locations",
3
- "version": "1.0.25",
3
+ "version": "1.0.27",
4
4
  "type": "module",
5
5
  "main": "./dist/lib/widget.umd.js",
6
6
  "module": "./dist/lib/widget.es.js",
@@ -24,7 +24,8 @@
24
24
  "lint": "eslint src --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
25
25
  "format": "prettier --write {src,@types}/**/*.{ts,tsx,css,scss,md,json}",
26
26
  "link:app": "rm -rf clients/vanilla/lib && npm run build:app && cp -R dist/app clients/vanilla/lib",
27
- "type-check": "tsc --noEmit"
27
+ "type-check": "tsc --noEmit",
28
+ "preview": "vite preview"
28
29
  },
29
30
  "peerDependencies": {
30
31
  "react": "^18.2.0",
@@ -1,2 +0,0 @@
1
- import { FC } from "react";
2
- export declare const Devtool: FC;
@@ -1,27 +0,0 @@
1
- import { Reducer } from "react";
2
- import { Locale } from '../../types/i18n';
3
- import { HexColor, MapProvider, WidgetConfig } from '../../types/config';
4
- export type DevtoolState = WidgetConfig;
5
- export type DevtoolAction = {
6
- type: "SET_FONT";
7
- payload: string;
8
- } | {
9
- type: "SET_RADIUS";
10
- payload: number;
11
- } | {
12
- type: "SET_LOCALE";
13
- payload: Locale;
14
- } | {
15
- type: "SET_COUNTRY";
16
- payload: string;
17
- } | {
18
- type: "SET_PALETTE_PRIMARY";
19
- payload: HexColor;
20
- } | {
21
- type: "SET_MAP_PROVIDER";
22
- payload: MapProvider;
23
- } | {
24
- type: "SET_PALETTE_PRIMARY_DARK";
25
- payload: HexColor;
26
- };
27
- export declare const reducer: Reducer<DevtoolState, DevtoolAction>;
@@ -1 +0,0 @@
1
- export * from "./Devtool";
@@ -1,2 +0,0 @@
1
- import { FC } from "react";
2
- export declare const LocationSelectorContainer: FC;
@@ -1,10 +0,0 @@
1
- /// <reference types="react" />
2
- import { Filter } from '../types/filters';
3
- interface FilterContextType {
4
- filter: Filter;
5
- setFilter(filter: Partial<Filter>): void;
6
- }
7
- export declare const initialFilter: Filter;
8
- export declare const FilterContext: import("react").Context<FilterContextType>;
9
- export declare const useFilterContext: () => FilterContextType;
10
- export {};
@@ -1,14 +0,0 @@
1
- /// <reference types="google.maps" />
2
- /// <reference types="react" />
3
- export interface LocationAside {
4
- open: boolean;
5
- toggle(value?: boolean): void;
6
- }
7
- interface LocationContextType {
8
- aside: LocationAside;
9
- city: null | google.maps.places.PlaceResult;
10
- setCity(city: null | google.maps.places.PlaceResult): void;
11
- }
12
- export declare const LocationContext: import("react").Context<LocationContextType>;
13
- export declare const useLocationContext: () => LocationContextType;
14
- export {};
@@ -1,2 +0,0 @@
1
- import { WidgetConfig } from '../types/config';
2
- export declare const useConfig: (initialConfig?: WidgetConfig) => WidgetConfig;
@@ -1,5 +0,0 @@
1
- import { Filter } from '../types/filters';
2
- export declare const useFilters: () => {
3
- filter: Filter;
4
- setFilter: (nextFilter: Partial<Filter>) => void;
5
- };
@@ -1,6 +0,0 @@
1
- /// <reference types="google.maps" />
2
- /// <reference types="react" />
3
- export declare const useLocation: () => {
4
- city: google.maps.places.PlaceResult | null;
5
- setCity: import("react").Dispatch<import("react").SetStateAction<google.maps.places.PlaceResult | null>>;
6
- };
@@ -1,4 +0,0 @@
1
- export declare const useLocationAside: () => {
2
- open: boolean;
3
- toggle: (value?: boolean) => void;
4
- };
@@ -1,3 +0,0 @@
1
- /// <reference types="react" />
2
- import { MapProvider } from '../types/config';
3
- export declare const useMapFactory: (provider: MapProvider) => import("react").FC<import("..").MapProps> | import("react").NamedExoticComponent<import("..").MapProps>;