Skip to content

Commit 0264a5a

Browse files
authored
Merge branch 'main' into serhalp/refactor/named-routes-in-cmd-palette-pkg-composable
2 parents 4f54ad4 + 8d9f314 commit 0264a5a

128 files changed

Lines changed: 8184 additions & 2884 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ on:
1212
branches:
1313
- main
1414

15-
# cancel in-progress runs on new commits to same PR (gitub.event.number)
15+
# cancel in-progress runs on new commits to same PR (github.event.number)
1616
concurrency:
1717
group: ${{ github.workflow }}-${{ github.event.number || github.sha }}
1818
cancel-in-progress: true

.nuxtrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
setups.@nuxt/test-utils="4.0.2"
1+
setups.@nuxt/test-utils="4.0.3"

.storybook/.public/mockServiceWorker.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ async function handleRequest(event, requestId, requestInterceptedAt) {
123123
const response = await getResponse(event, client, requestId, requestInterceptedAt)
124124

125125
// Send back the response clone for the "response:*" life-cycle events.
126-
// Ensure MSW is active and ready to handle the message, otherwise
126+
// Ensure MSW is active and ready to handle the message; otherwise,
127127
// this message will pend indefinitely.
128128
if (client && activeClientIds.has(client.id)) {
129129
const serializedRequest = await serializeRequest(requestCloneForEvents)

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ If you're working on admin features (org management, package access controls, op
232232
pnpm mock-connector
233233
```
234234

235-
This starts a mock connector server pre-populated with sample data (orgs, teams, members, packages). No npm login is required — operations succeed immediately without making real npm CLI calls.
235+
This starts a mock connector server prepopulated with sample data (orgs, teams, members, packages). No npm login is required — operations succeed immediately without making real npm CLI calls.
236236

237237
The mock connector prints a connection URL to the terminal, just like the real connector. Click it (or paste the token manually) to connect the UI.
238238

@@ -242,7 +242,7 @@ The mock connector prints a connection URL to the terminal, just like the real c
242242
pnpm mock-connector # default: port 31415, user "mock-user", sample data
243243
pnpm mock-connector --port 9999 # custom port
244244
pnpm mock-connector --user alice # custom username
245-
pnpm mock-connector --empty # start with no pre-populated data
245+
pnpm mock-connector --empty # start with no prepopulated data
246246
```
247247

248248
**Default sample data:**

app/assets/main.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,11 +95,11 @@
9595
--border-subtle: oklch(0.922 0 0);
9696
--border-hover: oklch(0.715 0 0);
9797

98-
--accent: var(--accent-color, oklch(0.53 0.16 247.27));
98+
--accent: var(--accent-color, oklch(0.5 0.16 247.27));
9999
--accent-muted: var(--accent-color, oklch(0.205 0 0));
100100

101101
/* accent colors */
102-
--swatch-sky: oklch(0.53 0.16 247.27);
102+
--swatch-sky: oklch(0.5 0.16 247.27);
103103
--swatch-coral: oklch(0.56 0.17 10.75);
104104
--swatch-amber: oklch(0.58 0.18 46.34);
105105
--swatch-emerald: oklch(0.51 0.13 162.4);

app/components/AppFooter.vue

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ const footerSections: Array<{ label: string; links: FooterLink[] }> = [
4848
name: t('footer.about'),
4949
href: '/about',
5050
},
51+
{
52+
name: t('footer.brand'),
53+
href: '/brand',
54+
},
5155
{
5256
name: t('a11y.footer_title'),
5357
href: '/accessibility',

app/components/Chart/SplitSparkline.vue

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import {
55
type VueUiSparklineDatasetItem,
66
} from 'vue-data-ui/vue-ui-sparkline'
77
import { VueUiPatternSeed } from 'vue-data-ui/vue-ui-pattern-seed'
8-
import { useCssVariables } from '~/composables/useColors'
8+
import { useColors } from '~/composables/useColors'
99
import type { VueUiXyDatasetItem } from 'vue-data-ui/vue-ui-xy'
1010
import { getPalette, lightenColor } from 'vue-data-ui/utils'
1111
import { CHART_PATTERN_CONFIG } from '~/utils/charts'
@@ -50,23 +50,7 @@ watch(
5050
{ flush: 'sync', immediate: true },
5151
)
5252
53-
const { colors } = useCssVariables(
54-
[
55-
'--bg',
56-
'--fg',
57-
'--bg-subtle',
58-
'--bg-elevated',
59-
'--border-hover',
60-
'--fg-subtle',
61-
'--border',
62-
'--border-subtle',
63-
],
64-
{
65-
element: rootEl,
66-
watchHtmlAttributes: true,
67-
watchResize: false, // set to true only if a var changes color on resize
68-
},
69-
)
53+
const { colors } = useColors(rootEl)
7054
7155
const isDarkMode = computed(() => resolvedMode.value === 'dark')
7256
@@ -101,7 +85,7 @@ const configs = computed(() => {
10185
? Array.from(new Set([...(unit.dashIndices ?? []), lastIndex]))
10286
: unit.dashIndices
10387
104-
// Ensure we loop through available palette colours when the series count is higher than the avalable palette
88+
// Ensure we loop through available palette colours when the series count is higher than the available palette
10589
const fallbackColor = palette[i] ?? palette[i % palette.length] ?? palette[0]!
10690
const seriesColor = unit.color ?? fallbackColor
10791
const lightenedSeriesColor: string = unit.color

app/components/Compare/FacetBarChart.vue

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import { VueUiPatternSeed } from 'vue-data-ui/vue-ui-pattern-seed'
99
import { getFrameworkColor, isListedFramework } from '~/utils/frameworks'
1010
import { createPatternDef } from 'vue-data-ui/utils'
1111
import { drawSmallNpmxLogoAndTaglineWatermark } from '~/composables/useChartWatermark'
12+
import { useColors } from '~/composables/useColors'
1213
1314
import {
1415
loadFile,
@@ -40,23 +41,7 @@ const isMobile = computed(() => width.value > 0 && width.value < mobileBreakpoin
4041
4142
const chartKey = ref(0)
4243
43-
const { colors } = useCssVariables(
44-
[
45-
'--bg',
46-
'--fg',
47-
'--bg-subtle',
48-
'--bg-elevated',
49-
'--fg-subtle',
50-
'--fg-muted',
51-
'--border',
52-
'--border-subtle',
53-
],
54-
{
55-
element: rootEl,
56-
watchHtmlAttributes: true,
57-
watchResize: false,
58-
},
59-
)
44+
const { colors } = useColors(rootEl)
6045
6146
const watermarkColors = computed(() => ({
6247
fg: colors.value.fg ?? OKLCH_NEUTRAL_FALLBACK,

app/components/Compare/FacetScatterChart.vue

Lines changed: 41 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@ import {
55
VueUiScatter,
66
type VueUiScatterConfig,
77
type VueUiScatterDatasetItem,
8+
type VueUiScatterSeries,
89
} from 'vue-data-ui/vue-ui-scatter'
910
import { buildCompareScatterChartDataset } from '~/utils/compare-scatter-chart'
1011
import { loadFile, copyAltTextForCompareScatterChart } from '~/utils/charts'
12+
import { useColors } from '~/composables/useColors'
1113
1214
import('vue-data-ui/style.css')
1315
@@ -25,25 +27,7 @@ const { copy, copied } = useClipboard()
2527
const mobileBreakpointWidth = 640
2628
const isMobile = computed(() => width.value > 0 && width.value < mobileBreakpointWidth)
2729
28-
const { colors } = useCssVariables(
29-
[
30-
'--bg',
31-
'--fg',
32-
'--bg-subtle',
33-
'--bg-elevated',
34-
'--fg-subtle',
35-
'--fg-muted',
36-
'--border',
37-
'--border-subtle',
38-
'--border-hover',
39-
'--accent',
40-
],
41-
{
42-
element: rootEl,
43-
watchHtmlAttributes: true,
44-
watchResize: false,
45-
},
46-
)
30+
const { colors } = useColors(rootEl)
4731
4832
const watermarkColors = computed(() => ({
4933
fg: colors.value.fg ?? OKLCH_NEUTRAL_FALLBACK,
@@ -285,6 +269,11 @@ function toggleAxisHighlight(state: AxisHighlight) {
285269
highlightedAxis.value = state
286270
}
287271
272+
function toggleLegendItem(legendItem: VueUiScatterSeries) {
273+
legendItem.segregate()
274+
legendItem.onEnter()
275+
}
276+
288277
const readyTeleport = shallowRef(false)
289278
290279
onMounted(async () => {
@@ -389,26 +378,26 @@ onMounted(async () => {
389378
: 'text-sm leading-6'
390379
"
391380
>
392-
<li v-for="datapoint in legend" :key="datapoint.name">
381+
<li v-for="legendItem in legend" :key="legendItem.id">
393382
<button
394-
:aria-pressed="datapoint.isSegregated"
395-
:aria-label="datapoint.name"
383+
:aria-pressed="legendItem.isSegregated"
384+
:aria-label="legendItem.name"
396385
type="button"
397386
class="flex gap-1.5 place-items-center"
398-
@click="datapoint.segregate()"
387+
:class="legendItem.isSegregated ? 'line-through' : 'hover:underline'"
388+
@click="toggleLegendItem(legendItem)"
389+
@mouseenter="legendItem.onEnter()"
390+
@mouseleave="legendItem.onLeave()"
391+
@focus="legendItem.onEnter()"
392+
@blur="legendItem.onLeave()"
399393
>
400394
<div class="h-3 w-3" aria-hidden="true">
401395
<svg viewBox="0 0 2 2" class="w-full">
402-
<circle cx="1" cy="1" r="1" :fill="datapoint.color" />
396+
<circle cx="1" cy="1" r="1" :fill="legendItem.color" />
403397
</svg>
404398
</div>
405-
<span
406-
class="text-fg"
407-
:style="{
408-
textDecoration: datapoint.isSegregated ? 'line-through' : undefined,
409-
}"
410-
>
411-
{{ datapoint.name }}
399+
<span class="text-fg">
400+
{{ legendItem.name }}
412401
</span>
413402
</button>
414403
</li>
@@ -559,14 +548,35 @@ onMounted(async () => {
559548
</template>
560549

561550
<style scoped>
551+
:deep(.vue-data-ui-component) {
552+
--super-ease-out: cubic-bezier(0.15, 0.75, 0.35, 1);
553+
}
554+
562555
:deep(.vue-data-ui-component svg:focus-visible) {
563556
outline: 1px solid var(--accent) !important;
564557
border-radius: 0.1rem;
565558
outline-offset: 0;
566559
}
560+
567561
:deep(.vue-ui-user-options-button:focus-visible),
568562
:deep(.vue-ui-user-options :first-child:focus-visible) {
569563
outline: 0.1rem solid var(--accent) !important;
570564
border-radius: 0.25rem;
571565
}
566+
567+
:deep(.vue-ui-scatter-scale-group),
568+
:deep(.vue-ui-scatter-datapoint text),
569+
:deep(.vue-ui-scatter-datapoint circle),
570+
:deep(.vue-ui-scatter-datapoint-label) {
571+
transition: all 0.5s var(--super-ease-out) !important;
572+
}
573+
574+
@media (prefers-reduced-motion: reduce) {
575+
:deep(.vue-ui-scatter-scale-group),
576+
:deep(.vue-ui-scatter-datapoint text),
577+
:deep(.vue-ui-scatter-datapoint circle),
578+
:deep(.vue-ui-scatter-datapoint-label) {
579+
transition: none !important;
580+
}
581+
}
572582
</style>

app/components/Diff/Line.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ const renderedSegments = computed(() =>
8484
<td :class="borderClasses" />
8585

8686
<!-- Line number -->
87-
<td class="tabular-nums text-center opacity-50 px-2 text-xs select-none w-12 shrink-0">
87+
<td class="tabular-nums text-center text-fg-subtle px-2 text-xs select-none w-12 shrink-0">
8888
{{ line.type === 'delete' ? '–' : lineNumberNew }}
8989
</td>
9090

0 commit comments

Comments
 (0)