diff --git a/apps/www/package.json b/apps/www/package.json index 3deadbab..72ad8927 100644 --- a/apps/www/package.json +++ b/apps/www/package.json @@ -17,7 +17,7 @@ "@radix-icons/vue": "^1.0.0", "@stackblitz/sdk": "^1.9.0", "@tanstack/vue-table": "^8.10.7", - "@unovis/ts": "^1.3.0", + "@unovis/ts": "^1.2.1", "@unovis/vue": "1.3.0", "@vee-validate/zod": "^4.11.8", "@vueuse/core": "^10.5.0", diff --git a/apps/www/src/lib/registry/default/ui/chart-area/AreaChart.vue b/apps/www/src/lib/registry/default/ui/chart-area/AreaChart.vue index e330bacc..c94e872d 100644 --- a/apps/www/src/lib/registry/default/ui/chart-area/AreaChart.vue +++ b/apps/www/src/lib/registry/default/ui/chart-area/AreaChart.vue @@ -4,7 +4,7 @@ import { VisArea, VisAxis, VisLine, VisXYContainer } from '@unovis/vue' import { Area, Axis, Line } from '@unovis/ts' import { ref } from 'vue' import { useMounted } from '@vueuse/core' -import { ChartCrosshair, ChartLegend, defaultColors } from '@/lib/registry/new-york/ui/chart' +import { ChartCrosshair, ChartLegend, defaultColors } from '@/lib/registry/default/ui/chart' import { cn } from '@/lib/utils' const props = withDefaults(defineProps<{ diff --git a/apps/www/src/lib/registry/default/ui/chart-bar/BarChart.vue b/apps/www/src/lib/registry/default/ui/chart-bar/BarChart.vue index ac644331..4d177a28 100644 --- a/apps/www/src/lib/registry/default/ui/chart-bar/BarChart.vue +++ b/apps/www/src/lib/registry/default/ui/chart-bar/BarChart.vue @@ -4,7 +4,7 @@ import { VisAxis, VisGroupedBar, VisStackedBar, VisXYContainer } from '@unovis/v import { Axis, GroupedBar, StackedBar } from '@unovis/ts' import { computed, ref } from 'vue' import { useMounted } from '@vueuse/core' -import { ChartCrosshair, ChartLegend, defaultColors } from '@/lib/registry/new-york/ui/chart' +import { ChartCrosshair, ChartLegend, defaultColors } from '@/lib/registry/default/ui/chart' import { cn } from '@/lib/utils' const props = withDefaults(defineProps<{ diff --git a/apps/www/src/lib/registry/default/ui/chart/ChartCrosshair.vue b/apps/www/src/lib/registry/default/ui/chart/ChartCrosshair.vue index 80c71378..026d4f27 100644 --- a/apps/www/src/lib/registry/default/ui/chart/ChartCrosshair.vue +++ b/apps/www/src/lib/registry/default/ui/chart/ChartCrosshair.vue @@ -25,7 +25,7 @@ function template(d: any, ...a: any) { const legendReference = props.items.find(i => i.name === key) return { ...legendReference, value } }) - createApp(ChartTooltip, { title: d[props.index], data: omittedData }).mount(componentDiv) + createApp(ChartTooltip, { title: d[props.index].toString(), data: omittedData }).mount(componentDiv) wm.set(d, componentDiv.innerHTML) return componentDiv.innerHTML } diff --git a/apps/www/src/lib/registry/default/ui/chart/ChartLegend.vue b/apps/www/src/lib/registry/default/ui/chart/ChartLegend.vue index b04fcd81..df3fd9ff 100644 --- a/apps/www/src/lib/registry/default/ui/chart/ChartLegend.vue +++ b/apps/www/src/lib/registry/default/ui/chart/ChartLegend.vue @@ -21,8 +21,8 @@ onMounted(() => { nextTick(() => { const elements = elRef.value?.querySelectorAll(selector) const classes = buttonVariants({ variant: 'ghost', size: 'xs' }).split(' ') - - elements?.forEach(el => el.classList.add(...classes, '!mr-2')) + console.log(elements, classes) + elements?.forEach(el => el.classList.add(...classes, '!inline-flex', '!mr-2')) }) }) diff --git a/apps/www/src/lib/registry/default/ui/chart/ChartTooltip.vue b/apps/www/src/lib/registry/default/ui/chart/ChartTooltip.vue index 92e97fbf..8f2be084 100644 --- a/apps/www/src/lib/registry/default/ui/chart/ChartTooltip.vue +++ b/apps/www/src/lib/registry/default/ui/chart/ChartTooltip.vue @@ -33,7 +33,7 @@ defineProps<{ {{ item.name }} - {{ item.value }} + {{ item.value }} diff --git a/apps/www/src/lib/registry/default/ui/chart/index.ts b/apps/www/src/lib/registry/default/ui/chart/index.ts index 7a9a4ca5..10c9ed75 100644 --- a/apps/www/src/lib/registry/default/ui/chart/index.ts +++ b/apps/www/src/lib/registry/default/ui/chart/index.ts @@ -3,4 +3,8 @@ export { default as ChartSingleTooltip } from './ChartSingleTooltip.vue' export { default as ChartLegend } from './ChartLegend.vue' export { default as ChartCrosshair } from './ChartCrosshair.vue' -export const defaultColors = ['hsl(var(--primary))', 'hsl(var(--muted))'] +const COLOR_COUNT = 3 +export const defaultColors = [ + ...Array.from(Array(COLOR_COUNT).keys()).map(i => `hsl(var(--primary) / ${1 - (1 / COLOR_COUNT) * i})`), + ...Array.from(Array(COLOR_COUNT).keys()).map(i => `hsl(var(--secondary) / ${1 - (1 / COLOR_COUNT) * i})`), +] diff --git a/apps/www/src/lib/registry/new-york/ui/chart/ChartCrosshair.vue b/apps/www/src/lib/registry/new-york/ui/chart/ChartCrosshair.vue index 5fb1fbed..153df841 100644 --- a/apps/www/src/lib/registry/new-york/ui/chart/ChartCrosshair.vue +++ b/apps/www/src/lib/registry/new-york/ui/chart/ChartCrosshair.vue @@ -25,7 +25,7 @@ function template(d: any, ...a: any) { const legendReference = props.items.find(i => i.name === key) return { ...legendReference, value } }) - createApp(ChartTooltip, { title: d[props.index], data: omittedData }).mount(componentDiv) + createApp(ChartTooltip, { title: d[props.index].toString(), data: omittedData }).mount(componentDiv) wm.set(d, componentDiv.innerHTML) return componentDiv.innerHTML } diff --git a/apps/www/src/lib/registry/new-york/ui/chart/ChartLegend.vue b/apps/www/src/lib/registry/new-york/ui/chart/ChartLegend.vue index e20f38c3..255abb2e 100644 --- a/apps/www/src/lib/registry/new-york/ui/chart/ChartLegend.vue +++ b/apps/www/src/lib/registry/new-york/ui/chart/ChartLegend.vue @@ -22,7 +22,7 @@ onMounted(() => { const elements = elRef.value?.querySelectorAll(selector) const classes = buttonVariants({ variant: 'ghost', size: 'xs' }).split(' ') - elements?.forEach(el => el.classList.add(...classes, '!mr-2')) + elements?.forEach(el => el.classList.add(...classes, '!inline-flex', '!mr-2')) }) }) diff --git a/apps/www/src/lib/registry/new-york/ui/chart/ChartTooltip.vue b/apps/www/src/lib/registry/new-york/ui/chart/ChartTooltip.vue index e99482b8..1f8e6e98 100644 --- a/apps/www/src/lib/registry/new-york/ui/chart/ChartTooltip.vue +++ b/apps/www/src/lib/registry/new-york/ui/chart/ChartTooltip.vue @@ -33,7 +33,7 @@ defineProps<{ {{ item.name }} - {{ item.value }} + {{ item.value }} diff --git a/package.json b/package.json index 623b22b9..eaa9a25d 100644 --- a/package.json +++ b/package.json @@ -43,11 +43,6 @@ "@commitlint/config-conventional" ] }, - "pnpm": { - "patchedDependencies": { - "@unovis/vue@1.3.0": "patches/@unovis__vue@1.3.0.patch" - } - }, "simple-git-hooks": { "pre-commit": "pnpm lint-staged", "commit-msg": "pnpm commitlint --edit ${1}" diff --git a/patches/@unovis__vue@1.3.0.patch b/patches/@unovis__vue@1.3.0.patch deleted file mode 100644 index 0ce5aa0f..00000000 --- a/patches/@unovis__vue@1.3.0.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/package.json b/package.json -index cf65a07e0d7abc8bf22e213d9746287cacb336cd..109ef112fc62a2e2dc1b0006e600a9521ace0041 100644 ---- a/package.json -+++ b/package.json -@@ -51,7 +51,7 @@ - "gallery": "vite" - }, - "peerDependencies": { -- "@unovis/ts": "1.2.1", -+ "@unovis/ts": "^1.3.0", - "vue": "^3" - }, - "devDependencies": { \ No newline at end of file diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 14525a94..5dcd015b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -4,11 +4,6 @@ settings: autoInstallPeers: true excludeLinksFromLockfile: false -patchedDependencies: - '@unovis/vue@1.3.0': - hash: ngtngm7gel5uviv7fhlhavdy3a - path: patches/@unovis__vue@1.3.0.patch - importers: .: @@ -65,11 +60,11 @@ importers: specifier: ^8.10.7 version: 8.10.7(vue@3.3.7) '@unovis/ts': - specifier: ^1.3.0 - version: 1.3.0 + specifier: ^1.2.1 + version: 1.2.1 '@unovis/vue': specifier: 1.3.0 - version: 1.3.0(patch_hash=ngtngm7gel5uviv7fhlhavdy3a)(@unovis/ts@1.3.0)(vue@3.3.7) + version: 1.3.0(@unovis/ts@1.2.1)(vue@3.3.7) '@vee-validate/zod': specifier: ^4.11.8 version: 4.11.8(vue@3.3.7) @@ -235,7 +230,7 @@ importers: version: 2.4.2 radix-vue: specifier: ^1.1.0 - version: 1.1.0(vue@3.3.7) + version: 1.1.1(vue@3.3.7) recast: specifier: ^0.23.4 version: 0.23.4 @@ -2175,10 +2170,6 @@ packages: '@types/d3-zoom': 3.0.8 dev: false - /@types/dagre@0.7.52: - resolution: {integrity: sha512-XKJdy+OClLk3hketHi9Qg6gTfe1F3y+UFnHxKA2rn9Dw+oXa4Gb378Ztz9HlMgZKSxpPmn4BNVh9wgkpvrK1uw==} - dev: false - /@types/diff@5.0.3: resolution: {integrity: sha512-amrLbRqTU9bXMCc6uX0sWpxsQzRIo9z6MJPkH1pkez/qOxuqSZVuryJAWoBRq94CeG8JxY+VK4Le9HtjQR5T9A==} dev: true @@ -2579,15 +2570,14 @@ packages: lodash-es: 4.17.21 dev: false - /@unovis/ts@1.3.0: - resolution: {integrity: sha512-LHUNDVzStCDu1JS7jiEjWRT1dL5my5B6nKkXFBKmz7Elwy+2zQ4KmLNE7oDHsMvgINzH6Gg1NwqGbrkn6E2ctA==} + /@unovis/ts@1.2.1: + resolution: {integrity: sha512-787MjSqvfgN+YlOlA3pz39E7ozky1CWlTioROZXeSa0gCkQhfaacOaUAYcDEgyAhU8oHkByG5keCN7eP7hoUlg==} dependencies: '@emotion/css': 11.11.2 '@juggle/resize-observer': 3.4.0 '@types/d3': 7.4.3 '@types/d3-collection': 1.0.13 '@types/d3-sankey': 0.11.2 - '@types/dagre': 0.7.52 '@types/geojson': 7946.0.13 '@types/leaflet': 1.7.6 '@types/supercluster': 5.0.3 @@ -2616,16 +2606,15 @@ packages: tslib: 2.6.2 dev: false - /@unovis/vue@1.3.0(patch_hash=ngtngm7gel5uviv7fhlhavdy3a)(@unovis/ts@1.3.0)(vue@3.3.7): + /@unovis/vue@1.3.0(@unovis/ts@1.2.1)(vue@3.3.7): resolution: {integrity: sha512-t/72dKYDBJ1p+8wINxVdGwjst6YRqImEpJMyJdHvFn5Opl4SD0say35eGHmX9HH3f7yDLMtMQyQUE9Ure8eyIQ==} peerDependencies: '@unovis/ts': 1.2.1 vue: ^3 dependencies: - '@unovis/ts': 1.3.0 + '@unovis/ts': 1.2.1 vue: 3.3.7(typescript@5.2.2) dev: false - patched: true /@vee-validate/zod@4.11.8(vue@3.3.7): resolution: {integrity: sha512-qAyqDEigklMf669ZqIw9t95g0Ipzu9rMYUqcZpANlCvyaIAeBlJGcsv+2CewlqgwuC6BL9EAURLJ8Ux5WlBgXg==} @@ -7716,16 +7705,6 @@ packages: resolution: {integrity: sha512-RKJ22hX8mHe3Y6wH/N3wCM6BWtjaxIyyUIkpHOvfFnxdI4yD4tBXEBKSbriGujF6jnSVkJrffuo6vxACiSSxIw==} dev: false - /radix-vue@1.1.0(vue@3.3.7): - resolution: {integrity: sha512-xD8pIxzng7Gi/pypZ7HeoSkYbBRHzFDnHJjEmGzq59SDa6gjKAuG4NPkWvdFjUGASWHLSOnofZXZJs+auDtSOQ==} - dependencies: - '@floating-ui/dom': 1.5.3 - '@floating-ui/vue': 1.0.2(vue@3.3.7) - transitivePeerDependencies: - - '@vue/composition-api' - - vue - dev: false - /radix-vue@1.1.1(vue@3.3.7): resolution: {integrity: sha512-tKXwEyxJdQRdCGVhe9rjPcbluDUhtzNJ4hKd66KwP+DAgcgbLELp2xyV/3mMl3htH3y5h7ndy9aEASy/thFs5g==} dependencies: