diff --git a/api/package.json b/api/package.json index 4648dec..262f459 100644 --- a/api/package.json +++ b/api/package.json @@ -5,7 +5,7 @@ "author": "Andrew Courtice", "license": "MIT", "dependencies": { - "@vercel/node": "^1.8.4", + "@vercel/node": "^1.8.5", "lodash": "^4.17.20", "node-fetch": "^2.6.1" } diff --git a/client/build/_base/config.js b/client/build/_base/config.js index b105f74..b39d90f 100644 --- a/client/build/_base/config.js +++ b/client/build/_base/config.js @@ -33,7 +33,7 @@ export default { }, resolve: { - extensions: ['.ts', '.tsx', '.js', '.jsx', '.vue'], + extensions: ['.ts', '.js'], alias: { 'components': path.resolve(__dirname, '../src/components'), @@ -77,12 +77,16 @@ export default { }, plugins: [ + new webpack.EnvironmentPlugin({ 'MAPBOX_API_KEY': '', 'WORLDTIDES_API_KEY': '', 'OWM_API_KEY': '', 'GA_TRACKING_ID': '', 'SENTRY_DSN': '', + }), + + new webpack.DefinePlugin({ '__VUE_OPTIONS_API__': false, '__VUE_PROD_DEVTOOLS__': false }), diff --git a/client/package.json b/client/package.json index 9b81dab..d699be0 100644 --- a/client/package.json +++ b/client/package.json @@ -1,7 +1,7 @@ { "name": "@ocula/client", "title": "Ocula", - "version": "1.0.2", + "version": "1.0.3", "main": "./src/index.ts", "repository": "https://github.com/andrewcourtice/ocula.git", "author": "Andrew Courtice", @@ -20,22 +20,22 @@ "@ocula/router": "1.0.0", "@ocula/state": "1.0.0", "@ocula/utilities": "1.0.0", - "@sentry/browser": "^5.27.2", - "@sentry/integrations": "^5.27.2", - "core-js": "3.6.5", + "@sentry/browser": "^5.29.0", + "@sentry/integrations": "^5.29.0", + "core-js": "3.8.1", "regenerator-runtime": "^0.13.7", - "vue": "3.0.2", - "workbox-window": "^5.1.4" + "vue": "3.0.5", + "workbox-window": "^6.0.2" }, "devDependencies": { - "@babel/core": "^7.12.3", + "@babel/core": "^7.12.9", "@babel/plugin-syntax-dynamic-import": "^7.8.3", "@babel/plugin-transform-typescript": "^7.12.1", - "@babel/preset-env": "^7.12.1", - "@babel/preset-typescript": "^7.12.1", + "@babel/preset-env": "^7.12.7", + "@babel/preset-typescript": "^7.12.7", "@babel/register": "^7.12.1", - "@types/d3": "^5.16.3", - "@vue/compiler-sfc": "3.0.2", + "@types/d3": "^6.2.0", + "@vue/compiler-sfc": "3.0.5", "autoprefixer": "^9.8.6", "babel-loader": "^8.1.0", "babel-plugin-const-enum": "^1.0.1", @@ -54,7 +54,7 @@ "style-loader": "^1.2.1", "terser-webpack-plugin": "^2.3.5", "url-loader": "^4.1.0", - "vue-loader": "16.0.0-beta.7", + "vue-loader": "16.1.1", "vue-style-loader": "^4.1.2", "webpack": "^4.44.1", "webpack-bundle-analyzer": "^3.8.0", diff --git a/client/src/components/forecast/daily-forecast.vue b/client/src/components/forecast/daily-forecast.vue index 064fb43..fbb42cd 100644 --- a/client/src/components/forecast/daily-forecast.vue +++ b/client/src/components/forecast/daily-forecast.vue @@ -73,7 +73,7 @@ import { import type { Formatted, IMappedForecastDay -} from '../../interfaces/state'; +} from '../../types/state'; export default defineComponent({ diff --git a/client/src/components/forecast/hourly-forecast.vue b/client/src/components/forecast/hourly-forecast.vue index f7c5dbe..d23a6c8 100644 --- a/client/src/components/forecast/hourly-forecast.vue +++ b/client/src/components/forecast/hourly-forecast.vue @@ -55,7 +55,7 @@ import { import type { Formatted, IMappedForecastHour -} from '../../interfaces/state'; +} from '../../types/state'; export default defineComponent({ diff --git a/client/src/components/modals/location.vue b/client/src/components/modals/location.vue index 1a346f1..c56b1e0 100644 --- a/client/src/components/modals/location.vue +++ b/client/src/components/modals/location.vue @@ -49,7 +49,7 @@ import { import type { ILocation -} from '../../interfaces/location'; +} from '../../types/location'; export default defineComponent({ diff --git a/client/src/constants/core/migrations.ts b/client/src/constants/core/migrations.ts index cd11ad6..48c33a1 100644 --- a/client/src/constants/core/migrations.ts +++ b/client/src/constants/core/migrations.ts @@ -7,7 +7,7 @@ import { import type { ISettings -} from '../../interfaces/storage'; +} from '../../types/storage'; type Migration = (settings: ISettings) => ISettings; diff --git a/client/src/constants/core/routes.ts b/client/src/constants/core/routes.ts index 5d49916..e9d94a8 100644 --- a/client/src/constants/core/routes.ts +++ b/client/src/constants/core/routes.ts @@ -1,19 +1,26 @@ export default { forecast: { - index: 'forecast-index', + index: 'forecast:index', }, maps: { - index: 'maps-index' + index: 'maps:index' }, settings: { - index: 'settings-index', - locations: 'settings-locations', - sections: 'settings-sections', - themes: 'settings-themes', - about: 'settings-about' + index: 'settings:index', + forecast: { + locations: 'settings:forecast:locations', + sections: 'settings:forecast:sections', + }, + maps: { + display: 'settings:maps:display' + }, + general: { + theme: 'settings:general:theme', + about: 'settings:general:about' + } }, error: { - index: 'error-index', - notFound: 'error-not-found' + index: 'error:index', + notFound: 'error:not:found' } } as const; \ No newline at end of file diff --git a/client/src/constants/core/settings.ts b/client/src/constants/core/settings.ts index 967ef81..55f8513 100644 --- a/client/src/constants/core/settings.ts +++ b/client/src/constants/core/settings.ts @@ -4,7 +4,7 @@ import FORECAST_SECTION from '../../enums/forecast/section'; import type { ISettings -} from '../../interfaces/storage'; +} from '../../types/storage'; export default { version: 1.1, @@ -38,5 +38,8 @@ export default { }, maps: { default: MAP.radar, + zoom: 6, + pitch: 0, + framerate: 500 } } as ISettings; \ No newline at end of file diff --git a/client/src/constants/forecast/figure.ts b/client/src/constants/forecast/figure.ts index 606e898..7f4813b 100644 --- a/client/src/constants/forecast/figure.ts +++ b/client/src/constants/forecast/figure.ts @@ -1,4 +1,4 @@ -import figures from '../../assets/images/figures/index'; +import figures from '../../assets/images/figures'; import PHASE from '../../enums/forecast/phase'; interface IFigure extends Record {}; diff --git a/client/src/constants/forecast/formats.ts b/client/src/constants/forecast/formats.ts index 92cac64..ecade74 100644 --- a/client/src/constants/forecast/formats.ts +++ b/client/src/constants/forecast/formats.ts @@ -11,7 +11,7 @@ import { import type { IForecastWeather -} from '../../interfaces/weather'; +} from '../../types/weather'; const { general, diff --git a/client/src/constants/forecast/sections.ts b/client/src/constants/forecast/sections.ts index 23334ae..b96562b 100644 --- a/client/src/constants/forecast/sections.ts +++ b/client/src/constants/forecast/sections.ts @@ -9,7 +9,7 @@ import Tides from '../../components/forecast/tides.vue'; import type { Formatted, IMappedForecast -} from '../../interfaces/state'; +} from '../../types/state'; interface IForecastSection { label: string; diff --git a/client/src/constants/forecast/tides-chart-options.ts b/client/src/constants/forecast/tides-chart-options.ts index 10c1251..94b91d3 100644 --- a/client/src/constants/forecast/tides-chart-options.ts +++ b/client/src/constants/forecast/tides-chart-options.ts @@ -10,11 +10,11 @@ import { import type { Formatted -} from '../../interfaces/state'; +} from '../../types/state'; import type { IForecastTideHeight -} from '../../interfaces/weather'; +} from '../../types/weather'; type ChartOptions = ILineOptions>; diff --git a/client/src/constants/forecast/trends.ts b/client/src/constants/forecast/trends.ts index 7d2c20a..d6f655a 100644 --- a/client/src/constants/forecast/trends.ts +++ b/client/src/constants/forecast/trends.ts @@ -15,11 +15,11 @@ import { import type { IForecastHour -} from '../../interfaces/weather'; +} from '../../types/weather'; import { Formatted -} from '../../interfaces/state'; +} from '../../types/state'; type ChartOptions = ILineOptions>; diff --git a/client/src/constants/maps/maps.ts b/client/src/constants/maps/maps.ts index b4e1a32..1a94538 100644 --- a/client/src/constants/maps/maps.ts +++ b/client/src/constants/maps/maps.ts @@ -4,7 +4,7 @@ import type { Formatted, IFormatter, IMappedForecast -} from '../../interfaces/state'; +} from '../../types/state'; interface IMapLegend { colour: string; diff --git a/client/src/index.ts b/client/src/index.ts index 4bc0f9d..c3c7cff 100644 --- a/client/src/index.ts +++ b/client/src/index.ts @@ -1,3 +1,3 @@ -import start from './startup/index'; +import start from './startup'; export default start(); \ No newline at end of file diff --git a/client/src/routes/index.ts b/client/src/routes/index.ts index e8c5764..306c1e5 100644 --- a/client/src/routes/index.ts +++ b/client/src/routes/index.ts @@ -3,10 +3,10 @@ import Maps from './maps.vue'; import Settings from './settings.vue'; import Error from './error.vue'; -import forecast from './forecast/index'; -import maps from './maps/index'; -import settings from './settings/index'; -import error from './error/index'; +import forecast from './forecast'; +import maps from './maps'; +import settings from './settings'; +import error from './error'; import type { RouteRecordRaw diff --git a/client/src/routes/maps/index.ts b/client/src/routes/maps/index.ts index 24ff081..4f30231 100644 --- a/client/src/routes/maps/index.ts +++ b/client/src/routes/maps/index.ts @@ -15,4 +15,4 @@ export default [ props: true, component: defineAsyncComponent(() => import(/* webpackChunkName: 'maps' */ './index.vue')) } -]; \ No newline at end of file +] as RouteRecordRaw[]; \ No newline at end of file diff --git a/client/src/routes/maps/index.vue b/client/src/routes/maps/index.vue index a3762a5..8b4633d 100644 --- a/client/src/routes/maps/index.vue +++ b/client/src/routes/maps/index.vue @@ -25,6 +25,8 @@ :key="theme.core.mapStyle" :latitude="forecast.lat.raw" :longitude="forecast.lon.raw" + :zoom="settings.maps.zoom" + :pitch="settings.maps.pitch" :style="theme.core.mapStyle" @movestart="onMoveStart" @moveend="onMoveEnd" @@ -125,6 +127,8 @@ export default defineComponent({ let layerIndex = ref(0); + const settings = computed(() => state.settings); + const map = computed(() => { let { layers, @@ -196,7 +200,7 @@ export default defineComponent({ function runLoop() { intervalHandle = window.setInterval(() => { layerIndex.value = layerIndex.value === layers.value.length - 1 ? 0 : layerIndex.value + 1; - }, 1000); + }, state.settings.maps.framerate); } function startPlaying() { @@ -248,6 +252,7 @@ export default defineComponent({ return { theme, forecast, + settings, map, status, layers, diff --git a/client/src/routes/settings/forecast/index.ts b/client/src/routes/settings/forecast/index.ts new file mode 100644 index 0000000..5b55ac6 --- /dev/null +++ b/client/src/routes/settings/forecast/index.ts @@ -0,0 +1,21 @@ +import ROUTES from '../../../constants/core/routes'; + +import Locations from './locations.vue'; +import Sections from './sections.vue'; + +import type { + RouteRecordRaw +} from '@ocula/router'; + +export default [ + { + path: 'forecast/locations', + name: ROUTES.settings.forecast.locations, + component: Locations + }, + { + path: 'forecast/sections', + name: ROUTES.settings.forecast.sections, + component: Sections + } +] as RouteRecordRaw[]; \ No newline at end of file diff --git a/client/src/routes/settings/locations.vue b/client/src/routes/settings/forecast/locations.vue similarity index 89% rename from client/src/routes/settings/locations.vue rename to client/src/routes/settings/forecast/locations.vue index d5f8075..12d29da 100644 --- a/client/src/routes/settings/locations.vue +++ b/client/src/routes/settings/forecast/locations.vue @@ -12,9 +12,9 @@ + + \ No newline at end of file diff --git a/client/src/routes/settings/maps/index.ts b/client/src/routes/settings/maps/index.ts new file mode 100644 index 0000000..2015e9f --- /dev/null +++ b/client/src/routes/settings/maps/index.ts @@ -0,0 +1,15 @@ +import ROUTES from '../../../constants/core/routes'; + +import Display from './display.vue'; + +import type { + RouteRecordRaw +} from '@ocula/router'; + +export default [ + { + path: 'maps/display', + name: ROUTES.settings.maps.display, + component: Display + } +] as RouteRecordRaw[]; \ No newline at end of file diff --git a/client/src/services/location.ts b/client/src/services/location.ts index 9996c0d..8ee5784 100644 --- a/client/src/services/location.ts +++ b/client/src/services/location.ts @@ -1,6 +1,6 @@ import { ILocation -} from '../interfaces/location'; +} from '../types/location'; export async function searchLocations(query: string): Promise { const response = await fetch(`/api/location/search?query=${query}`); diff --git a/client/src/services/weather.ts b/client/src/services/weather.ts index 0ef6c49..1001d0f 100644 --- a/client/src/services/weather.ts +++ b/client/src/services/weather.ts @@ -1,6 +1,6 @@ import type { IForecast -} from '../interfaces/weather'; +} from '../types/weather'; export async function getForecast(latitude: number, longitude: number, units?: string): Promise { const response = await fetch(`/api/weather/forecast?latitude=${latitude}&longitude=${longitude}&units=${units}`); diff --git a/client/src/startup/router.ts b/client/src/startup/router.ts index 1ee7baf..d327982 100644 --- a/client/src/startup/router.ts +++ b/client/src/startup/router.ts @@ -1,6 +1,6 @@ import ROUTES from '../constants/core/routes'; -import routes from '../routes/index'; +import routes from '../routes'; import setThemeMeta from '../helpers/set-theme-meta'; diff --git a/client/src/store/actions/add-location.ts b/client/src/store/actions/add-location.ts index 878958b..7ee9594 100644 --- a/client/src/store/actions/add-location.ts +++ b/client/src/store/actions/add-location.ts @@ -3,7 +3,7 @@ import setLocation from './set-location'; import type { ILocation -} from '../../interfaces/location'; +} from '../../types/location'; import { state diff --git a/client/src/store/actions/load-location.ts b/client/src/store/actions/load-location.ts index f3b86df..212298c 100644 --- a/client/src/store/actions/load-location.ts +++ b/client/src/store/actions/load-location.ts @@ -15,7 +15,7 @@ import { import type { ILocation -} from '../../interfaces/location'; +} from '../../types/location'; export default async function loadLocation(): Promise { const { diff --git a/client/src/store/actions/remove-location.ts b/client/src/store/actions/remove-location.ts index 3f2852e..0b19e31 100644 --- a/client/src/store/actions/remove-location.ts +++ b/client/src/store/actions/remove-location.ts @@ -2,7 +2,7 @@ import updateSettings from './update-settings'; import type { ILocation -} from '../../interfaces/location'; +} from '../../types/location'; import { state diff --git a/client/src/store/actions/search-locations.ts b/client/src/store/actions/search-locations.ts index f44ba9e..f024201 100644 --- a/client/src/store/actions/search-locations.ts +++ b/client/src/store/actions/search-locations.ts @@ -4,7 +4,7 @@ import { import type { ILocation -} from '../../interfaces/location'; +} from '../../types/location'; export default async function (query: string): Promise { return searchLocations(query); diff --git a/client/src/store/actions/set-location.ts b/client/src/store/actions/set-location.ts index a13349a..5abf20a 100644 --- a/client/src/store/actions/set-location.ts +++ b/client/src/store/actions/set-location.ts @@ -13,7 +13,7 @@ import { import type { ILocation -} from '../../interfaces/location'; +} from '../../types/location'; export default function setLocation(location: ILocation | LOCATION): void { if (typeIsNil(location)) { diff --git a/client/src/store/actions/update-settings.ts b/client/src/store/actions/update-settings.ts index 8d505bf..052eaba 100644 --- a/client/src/store/actions/update-settings.ts +++ b/client/src/store/actions/update-settings.ts @@ -2,7 +2,7 @@ import setSettings from '../mutations/set-settings'; import type { ISettings -} from '../../interfaces/storage'; +} from '../../types/storage'; export default function updateSettings(settings: Partial): void { setSettings(settings); diff --git a/client/src/store/getters/forecast.ts b/client/src/store/getters/forecast.ts index 7248e66..c53c18e 100644 --- a/client/src/store/getters/forecast.ts +++ b/client/src/store/getters/forecast.ts @@ -16,11 +16,11 @@ import { import type { Formatted, IMappedForecast -} from '../../interfaces/state'; +} from '../../types/state'; import type { IForecast -} from '../../interfaces/weather'; +} from '../../types/weather'; export default getter>(state => { const { diff --git a/client/src/store/getters/format.ts b/client/src/store/getters/format.ts index 1a9d46f..f98ad1f 100644 --- a/client/src/store/getters/format.ts +++ b/client/src/store/getters/format.ts @@ -9,7 +9,7 @@ import { import type { IFormatter -} from '../../interfaces/state'; +} from '../../types/state'; export default getter(({ forecast }) => { let options; diff --git a/client/src/store/getters/theme.ts b/client/src/store/getters/theme.ts index d2cf33c..c2bae4c 100644 --- a/client/src/store/getters/theme.ts +++ b/client/src/store/getters/theme.ts @@ -13,7 +13,7 @@ import { import type { ITheme -} from '../../interfaces/themes'; +} from '../../types/themes'; import { typeIsPlainObject diff --git a/client/src/store/helpers/location.ts b/client/src/store/helpers/location.ts index 6763783..b016066 100644 --- a/client/src/store/helpers/location.ts +++ b/client/src/store/helpers/location.ts @@ -1,6 +1,6 @@ import type { ICoordinate -} from '../../interfaces/location'; +} from '../../types/location'; export async function getPosition(): Promise { const position: Position = await new Promise((resolve, reject) => { diff --git a/client/src/store/helpers/storage.ts b/client/src/store/helpers/storage.ts index 28fa92d..1591663 100644 --- a/client/src/store/helpers/storage.ts +++ b/client/src/store/helpers/storage.ts @@ -10,7 +10,7 @@ import { import type { ISettings, IStoredData -} from '../../interfaces/storage'; +} from '../../types/storage'; export function getSettings(): ISettings { const storedSettings = localStorage.getItem(STORAGE_KEYS.settings); diff --git a/client/src/store/mutations/set-settings.ts b/client/src/store/mutations/set-settings.ts index 536d7e0..86eba6c 100644 --- a/client/src/store/mutations/set-settings.ts +++ b/client/src/store/mutations/set-settings.ts @@ -9,7 +9,7 @@ import { import type { ISettings -} from '../../interfaces/storage'; +} from '../../types/storage'; export default function setSettings(value: Partial) { const settings = { diff --git a/client/src/store/state/index.ts b/client/src/store/state/index.ts index 75ae577..405563e 100644 --- a/client/src/store/state/index.ts +++ b/client/src/store/state/index.ts @@ -5,7 +5,7 @@ import { import { IState -} from '../../interfaces/state'; +} from '../../types/state'; function getState(): IState { const settings = getSettings(); diff --git a/client/src/themes/core/dark/index.ts b/client/src/themes/core/dark/index.ts index 64bcdb0..2ae27e4 100644 --- a/client/src/themes/core/dark/index.ts +++ b/client/src/themes/core/dark/index.ts @@ -2,7 +2,7 @@ import './index.scss'; import type { ITheme -} from '../../../interfaces/themes'; +} from '../../../types/themes'; export default { id: 'dark', diff --git a/client/src/themes/core/default/index.ts b/client/src/themes/core/default/index.ts index 8affb5b..5abeebb 100644 --- a/client/src/themes/core/default/index.ts +++ b/client/src/themes/core/default/index.ts @@ -4,7 +4,7 @@ import PHASE from '../../../enums/forecast/phase'; import type { ITheme -} from '../../../interfaces/themes'; +} from '../../../types/themes'; export default { id: 'default', diff --git a/client/src/themes/core/light/index.ts b/client/src/themes/core/light/index.ts index 7980068..61e023d 100644 --- a/client/src/themes/core/light/index.ts +++ b/client/src/themes/core/light/index.ts @@ -2,7 +2,7 @@ import './index.scss'; import type { ITheme -} from '../../../interfaces/themes'; +} from '../../../types/themes'; export default { id: 'light', diff --git a/client/src/themes/weather/clear/index.ts b/client/src/themes/weather/clear/index.ts index f01fe27..5492f1b 100644 --- a/client/src/themes/weather/clear/index.ts +++ b/client/src/themes/weather/clear/index.ts @@ -4,7 +4,7 @@ import PHASE from '../../../enums/forecast/phase'; import type { ITheme -} from '../../../interfaces/themes'; +} from '../../../types/themes'; export default { id: 'weather-clear', diff --git a/client/src/themes/weather/default/index.ts b/client/src/themes/weather/default/index.ts index c29a504..b65d963 100644 --- a/client/src/themes/weather/default/index.ts +++ b/client/src/themes/weather/default/index.ts @@ -1,6 +1,6 @@ import type { ITheme -} from '../../../interfaces/themes'; +} from '../../../types/themes'; export default { id: 'weather-default', diff --git a/client/src/themes/weather/partly-cloudy/index.ts b/client/src/themes/weather/partly-cloudy/index.ts index 673e49d..0ec9ea5 100644 --- a/client/src/themes/weather/partly-cloudy/index.ts +++ b/client/src/themes/weather/partly-cloudy/index.ts @@ -4,7 +4,7 @@ import PHASE from '../../../enums/forecast/phase'; import type { ITheme -} from '../../../interfaces/themes'; +} from '../../../types/themes'; export default { id: 'weather-partly-cloudy', diff --git a/client/src/themes/weather/rainy/index.ts b/client/src/themes/weather/rainy/index.ts index 991bb31..a964ef2 100644 --- a/client/src/themes/weather/rainy/index.ts +++ b/client/src/themes/weather/rainy/index.ts @@ -2,7 +2,7 @@ import './index.scss'; import type { ITheme -} from '../../../interfaces/themes'; +} from '../../../types/themes'; export default { id: 'weather-rainy', diff --git a/client/src/interfaces/location.ts b/client/src/types/location.ts similarity index 100% rename from client/src/interfaces/location.ts rename to client/src/types/location.ts diff --git a/client/src/interfaces/state.ts b/client/src/types/state.ts similarity index 100% rename from client/src/interfaces/state.ts rename to client/src/types/state.ts diff --git a/client/src/interfaces/storage.ts b/client/src/types/storage.ts similarity index 73% rename from client/src/interfaces/storage.ts rename to client/src/types/storage.ts index f612f2d..40f1f62 100644 --- a/client/src/interfaces/storage.ts +++ b/client/src/types/storage.ts @@ -17,18 +17,25 @@ interface ISection { options: any; } +export interface IForecastSettings { + sections: ISection[]; +} + +export interface IMapSettings { + default: MAP; + zoom: number; + pitch: number; + framerate: number; +} + export interface ISettings { version: number; units: UNITS; theme: string; location?: ILocation | LOCATION; locations?: ILocation[]; - forecast: { - sections: ISection[]; - }, - maps: { - default: MAP; - } + forecast: IForecastSettings; + maps: IMapSettings; }; export interface IStoredData { diff --git a/client/src/interfaces/themes.ts b/client/src/types/themes.ts similarity index 100% rename from client/src/interfaces/themes.ts rename to client/src/types/themes.ts diff --git a/client/src/interfaces/weather.ts b/client/src/types/weather.ts similarity index 100% rename from client/src/interfaces/weather.ts rename to client/src/types/weather.ts diff --git a/package.json b/package.json index e1dea57..0636948 100644 --- a/package.json +++ b/package.json @@ -15,6 +15,6 @@ "build": "cd client && yarn build" }, "devDependencies": { - "typescript": "^4.0.5" + "typescript": "^4.1.2" } } diff --git a/packages/charts/package.json b/packages/charts/package.json index 1ae3bda..99d83c7 100644 --- a/packages/charts/package.json +++ b/packages/charts/package.json @@ -5,7 +5,7 @@ "license": "MIT", "dependencies": { "@ocula/utilities": "1.0.0", - "d3-array": "^2.8.0", + "d3-array": "^2.9.1", "d3-axis": "^2.0.0", "d3-ease": "^2.0.0", "d3-path": "^2.0.0", diff --git a/packages/charts/src/charts/_base/chart.ts b/packages/charts/src/charts/_base/chart.ts index ad2b716..fddb3bc 100644 --- a/packages/charts/src/charts/_base/chart.ts +++ b/packages/charts/src/charts/_base/chart.ts @@ -1,4 +1,4 @@ -import * as d3 from '../../d3/index'; +import * as d3 from '../../d3'; import { objectMerge, diff --git a/packages/charts/src/charts/line/constants/curve.ts b/packages/charts/src/charts/line/constants/curve.ts index 5cc82fd..6849185 100644 --- a/packages/charts/src/charts/line/constants/curve.ts +++ b/packages/charts/src/charts/line/constants/curve.ts @@ -1,6 +1,6 @@ import LINE_TYPE from '../enums/line-type'; -import * as d3 from '../../../d3/index'; +import * as d3 from '../../../d3'; export default { [LINE_TYPE.line]: d3.curveLinear, diff --git a/packages/charts/src/charts/line/index.ts b/packages/charts/src/charts/line/index.ts index b2f5379..9797787 100644 --- a/packages/charts/src/charts/line/index.ts +++ b/packages/charts/src/charts/line/index.ts @@ -6,11 +6,11 @@ import CURVE from './constants/curve'; import Chart from '../_base/chart'; -import * as d3 from '../../d3/index'; +import * as d3 from '../../d3'; import { getScale -} from '../../scales/index'; +} from '../../scales'; import { valueGetAccessor @@ -19,7 +19,7 @@ import { import type { ILineOptions, ILinePoint -} from './interfaces'; +} from './types'; const lineGenerator = d3.line() .defined(data => !!data.y1) diff --git a/packages/charts/src/charts/line/interfaces/index.ts b/packages/charts/src/charts/line/types/index.ts similarity index 100% rename from packages/charts/src/charts/line/interfaces/index.ts rename to packages/charts/src/charts/line/types/index.ts diff --git a/packages/charts/src/index.ts b/packages/charts/src/index.ts index 35fa55f..c8201a0 100644 --- a/packages/charts/src/index.ts +++ b/packages/charts/src/index.ts @@ -3,4 +3,4 @@ export { default as SCALE_TYPE } from './enums/scale'; export { default as LINE_TYPE } from './charts/line/enums/line-type'; export { default as MARKER_TYPE } from './charts/line/enums/marker-type'; export { default as LineChart } from './charts/line'; -export * from './charts/line/interfaces'; \ No newline at end of file +export * from './charts/line/types'; \ No newline at end of file diff --git a/packages/charts/src/scales/linear.ts b/packages/charts/src/scales/linear.ts index 3c30002..c759579 100644 --- a/packages/charts/src/scales/linear.ts +++ b/packages/charts/src/scales/linear.ts @@ -1,4 +1,4 @@ -import * as d3 from '../d3/index'; +import * as d3 from '../d3'; export default function(data, options, range) { const { diff --git a/packages/charts/src/scales/point.ts b/packages/charts/src/scales/point.ts index 14a5142..3f640db 100644 --- a/packages/charts/src/scales/point.ts +++ b/packages/charts/src/scales/point.ts @@ -1,4 +1,4 @@ -import * as d3 from '../d3/index'; +import * as d3 from '../d3'; export default function(data, options, range) { const { diff --git a/packages/charts/src/scales/time.ts b/packages/charts/src/scales/time.ts index c8c8181..4a58148 100644 --- a/packages/charts/src/scales/time.ts +++ b/packages/charts/src/scales/time.ts @@ -1,4 +1,4 @@ -import * as d3 from '../d3/index'; +import * as d3 from '../d3'; export default function(data, options, range) { const { diff --git a/packages/components/package.json b/packages/components/package.json index ee12a6e..4cb5f0a 100644 --- a/packages/components/package.json +++ b/packages/components/package.json @@ -8,12 +8,12 @@ "@ocula/style": "1.0.0", "@ocula/task-queue": "1.0.0", "@ocula/utilities": "1.0.0", - "mapbox-gl": "^1.12.0" + "mapbox-gl": "^2.0.0" }, "peerDependencies": { - "vue": "3.0.2" + "vue": "3.0.5" }, "devDependencies": { - "@types/mapbox-gl": "^1.12.5" + "@types/mapbox-gl": "^1.12.9" } } diff --git a/packages/components/src/components/block/block.vue b/packages/components/src/components/block/block.vue index d78dcf4..f27393f 100644 --- a/packages/components/src/components/block/block.vue +++ b/packages/components/src/components/block/block.vue @@ -1,9 +1,12 @@