Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
"@tanstack/ai-anthropic": "^0.18.0",
"@tanstack/ai-client": "^0.28.0",
"@tanstack/ai-openai": "^0.22.0",
"@tanstack/charts": "0.16.0",
"@tanstack/charts": "0.16.1",
"@tanstack/create": "^0.70.0",
"@tanstack/highlight": "^0.0.9",
"@tanstack/markdown": "^0.0.11",
Expand Down
10 changes: 5 additions & 5 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/components/npm-stats/NPMStatsChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2229,6 +2229,7 @@ function getNpmChartTooltipContent(
return {
title,
rows: points.map((point) => ({
active: point === context.primaryPoint,
color: point.datum.color,
label: point.groupLabel,
value: formatValue(point),
Expand Down Expand Up @@ -2275,7 +2276,6 @@ function createNpmStatsChart(input: NpmStatsChartInput) {
content: (points, context) =>
getNpmChartTooltipContent(points, context, input),
placement: ['top', 'right', 'left', 'bottom'],
sort: 'color-domain',
},
})
}
Expand Down
18 changes: 9 additions & 9 deletions src/utils/builder-environment.ts
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
import type { ExampleEnvironment } from './example-workspace'

export const builderImports = {
'@tanstack/charts': 'https://esm.sh/@tanstack/charts@0.16.0',
'@tanstack/charts/': 'https://esm.sh/@tanstack/charts@0.16.0/',
'@tanstack/charts': 'https://esm.sh/@tanstack/charts@0.16.1',
'@tanstack/charts/': 'https://esm.sh/@tanstack/charts@0.16.1/',
'@tanstack/charts/react':
'https://esm.sh/@tanstack/charts@0.16.0/react?external=react,react-dom',
'https://esm.sh/@tanstack/charts@0.16.1/react?external=react,react-dom',
'@tanstack/charts/react/canvas':
'https://esm.sh/@tanstack/charts@0.16.0/react/canvas?external=react,react-dom',
'https://esm.sh/@tanstack/charts@0.16.1/react/canvas?external=react,react-dom',
'@tanstack/charts/react/core':
'https://esm.sh/@tanstack/charts@0.16.0/react/core?external=react,react-dom',
'https://esm.sh/@tanstack/charts@0.16.1/react/core?external=react,react-dom',
'@tanstack/charts/react/tooltip':
'https://esm.sh/@tanstack/charts@0.16.0/react/tooltip?external=react,react-dom',
'https://esm.sh/@tanstack/charts@0.16.1/react/tooltip?external=react,react-dom',
'@tanstack/charts/octane':
'https://esm.sh/@tanstack/charts@0.16.0/octane?external=octane',
'https://esm.sh/@tanstack/charts@0.16.1/octane?external=octane',
'@tanstack/charts/octane/canvas':
'https://esm.sh/@tanstack/charts@0.16.0/octane/canvas?external=octane',
'https://esm.sh/@tanstack/charts@0.16.1/octane/canvas?external=octane',
'@tanstack/charts/octane/core':
'https://esm.sh/@tanstack/charts@0.16.0/octane/core?external=octane',
'https://esm.sh/@tanstack/charts@0.16.1/octane/core?external=octane',
'@tanstack/charts-data/':
'https://esm.sh/gh/TanStack/charts@b8690671d677244848cff0eebd3d5dd0d5825b18/packages/charts-demo-data/src/',
'@tanstack/highlight': 'https://esm.sh/@tanstack/highlight@0.0.10',
Expand Down
24 changes: 12 additions & 12 deletions tests/builder-ai-package-resources.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ test('resolves exact built-in and installed package versions', () => {
{
specifier: '@tanstack/charts/scales/band',
packageName: '@tanstack/charts',
packageVersion: '0.16.0',
packageVersion: '0.16.1',
exportKey: './scales/band',
},
)
Expand Down Expand Up @@ -70,17 +70,17 @@ test('resolves exact built-in and installed package versions', () => {

test('inspects exact module exports and declarations', async () => {
const baseFetcher = createFetcher({
'https://unpkg.com/@tanstack/charts@0.16.0/package.json': JSON.stringify({
'https://unpkg.com/@tanstack/charts@0.16.1/package.json': JSON.stringify({
exports: {
'./scales/band': {
types: './dist/scales/band.d.ts',
import: './dist/scales/band.js',
},
},
}),
'https://unpkg.com/@tanstack/charts@0.16.0/dist/scales/band.d.ts':
'https://unpkg.com/@tanstack/charts@0.16.1/dist/scales/band.d.ts':
'export declare function scaleBand(): BandScale;\nexport type { BandScale };',
'https://unpkg.com/@tanstack/charts@0.16.0/dist/scales/band.js':
'https://unpkg.com/@tanstack/charts@0.16.1/dist/scales/band.js':
'function scaleBand() {}\nexport { scaleBand };',
})
let fetchCount = 0
Expand Down Expand Up @@ -145,7 +145,7 @@ test('searches bounded docs, declarations, and trusted TanStack skills', async (
],
})
const baseFetcher = createFetcher({
'https://unpkg.com/@tanstack/charts@0.16.0/?meta': metadata,
'https://unpkg.com/@tanstack/charts@0.16.1/?meta': metadata,
})
let fetchCount = 0
const fetcher: typeof fetch = (input, init) => {
Expand Down Expand Up @@ -182,7 +182,7 @@ test('searches bounded docs, declarations, and trusted TanStack skills', async (
test('reads package resources in chunks and trusts only TanStack skills', async () => {
const skill = 'Use scaleBand from the exact scale subpath.'
const fetcher = createFetcher({
'https://unpkg.com/@tanstack/charts@0.16.0/skills/design/SKILL.md': skill,
'https://unpkg.com/@tanstack/charts@0.16.1/skills/design/SKILL.md': skill,
})
const result = await readBuilderAiPackageResource(
clientExecution,
Expand Down Expand Up @@ -237,7 +237,7 @@ test('reads package resources in chunks and trusts only TanStack skills', async
test('reuses one package download across chunked reads', async () => {
const source = `${'a'.repeat(50_000)}tail`
const baseFetcher = createFetcher({
'https://unpkg.com/@tanstack/charts@0.16.0/docs/large.md': source,
'https://unpkg.com/@tanstack/charts@0.16.1/docs/large.md': source,
})
let fetchCount = 0
const fetcher: typeof fetch = (input, init) => {
Expand Down Expand Up @@ -268,7 +268,7 @@ test('reuses one package download across chunked reads', async () => {

test('coalesces concurrent reads of one package resource', async () => {
const baseFetcher = createFetcher({
'https://unpkg.com/@tanstack/charts@0.16.0/docs/shared.md': 'shared',
'https://unpkg.com/@tanstack/charts@0.16.1/docs/shared.md': 'shared',
})
let fetchCount = 0
const fetcher: typeof fetch = async (input, init) => {
Expand Down Expand Up @@ -302,8 +302,8 @@ test('coalesces concurrent reads of one package resource', async () => {

test('budgets unique package downloads by UTF-8 bytes', async () => {
const fetcher = createFetcher({
'https://unpkg.com/@tanstack/charts@0.16.0/docs/exact.md': 'é',
'https://unpkg.com/@tanstack/charts@0.16.0/docs/extra.md': 'x',
'https://unpkg.com/@tanstack/charts@0.16.1/docs/exact.md': 'é',
'https://unpkg.com/@tanstack/charts@0.16.1/docs/extra.md': 'x',
})
const fetchState = createBuilderAiPackageFetchState({ maxBytes: 2 })

Expand Down Expand Up @@ -339,8 +339,8 @@ test('budgets unique package downloads by UTF-8 bytes', async () => {

test('retries transient package fetches without bypassing the resource budget', async () => {
const baseFetcher = createFetcher({
'https://unpkg.com/@tanstack/charts@0.16.0/docs/retry.md': 'ready',
'https://unpkg.com/@tanstack/charts@0.16.0/docs/other.md': 'other',
'https://unpkg.com/@tanstack/charts@0.16.1/docs/retry.md': 'ready',
'https://unpkg.com/@tanstack/charts@0.16.1/docs/other.md': 'other',
})
let fetchCount = 0
const fetcher: typeof fetch = async (input, init) => {
Expand Down
18 changes: 9 additions & 9 deletions tests/builder-environment.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,40 +30,40 @@ test('uses TanStack category colors in the starter sandbox', () => {
test('exposes unified Charts subpaths without duplicate framework runtimes', () => {
assert.equal(
builderImports['@tanstack/charts'],
'https://esm.sh/@tanstack/charts@0.16.0',
'https://esm.sh/@tanstack/charts@0.16.1',
)
assert.equal(
builderImports['@tanstack/charts/'],
'https://esm.sh/@tanstack/charts@0.16.0/',
'https://esm.sh/@tanstack/charts@0.16.1/',
)

assert.equal(
builderImports['@tanstack/charts/react'],
'https://esm.sh/@tanstack/charts@0.16.0/react?external=react,react-dom',
'https://esm.sh/@tanstack/charts@0.16.1/react?external=react,react-dom',
)
assert.equal(
builderImports['@tanstack/charts/react/canvas'],
'https://esm.sh/@tanstack/charts@0.16.0/react/canvas?external=react,react-dom',
'https://esm.sh/@tanstack/charts@0.16.1/react/canvas?external=react,react-dom',
)
assert.equal(
builderImports['@tanstack/charts/react/core'],
'https://esm.sh/@tanstack/charts@0.16.0/react/core?external=react,react-dom',
'https://esm.sh/@tanstack/charts@0.16.1/react/core?external=react,react-dom',
)
assert.equal(
builderImports['@tanstack/charts/react/tooltip'],
'https://esm.sh/@tanstack/charts@0.16.0/react/tooltip?external=react,react-dom',
'https://esm.sh/@tanstack/charts@0.16.1/react/tooltip?external=react,react-dom',
)
assert.equal(
builderImports['@tanstack/charts/octane'],
'https://esm.sh/@tanstack/charts@0.16.0/octane?external=octane',
'https://esm.sh/@tanstack/charts@0.16.1/octane?external=octane',
)
assert.equal(
builderImports['@tanstack/charts/octane/canvas'],
'https://esm.sh/@tanstack/charts@0.16.0/octane/canvas?external=octane',
'https://esm.sh/@tanstack/charts@0.16.1/octane/canvas?external=octane',
)
assert.equal(
builderImports['@tanstack/charts/octane/core'],
'https://esm.sh/@tanstack/charts@0.16.0/octane/core?external=octane',
'https://esm.sh/@tanstack/charts@0.16.1/octane/core?external=octane',
)

assert.equal(
Expand Down
Loading