diff --git a/.changeset/ninety-adults-sing.md b/.changeset/ninety-adults-sing.md new file mode 100644 index 000000000..0077c8990 --- /dev/null +++ b/.changeset/ninety-adults-sing.md @@ -0,0 +1,5 @@ +--- +'style-dictionary': minor +--- + +Add `tokenMap` properties to Dictionary, which is a JavaScript Map structure of the tokens, which makes it easy to iterate as well as access tokens. Also add `convertTokenData` utility that allows to seemlessly convert between Map, Object or Array of tokens, and deprecate the `flattenTokens` utility in favor of that one. diff --git a/__integration__/__snapshots__/customFormats.test.snap.js b/__integration__/__snapshots__/customFormats.test.snap.js index d2ca28e1c..69ec2448c 100644 --- a/__integration__/__snapshots__/customFormats.test.snap.js +++ b/__integration__/__snapshots__/customFormats.test.snap.js @@ -114,7 +114,8 @@ snapshots["integration custom formats inline custom with new args should match s "size", "padding", "small" - ] + ], + "key": "{size.padding.small}" }, { "value": "1rem", @@ -135,7 +136,8 @@ snapshots["integration custom formats inline custom with new args should match s "size", "padding", "medium" - ] + ], + "key": "{size.padding.medium}" }, { "value": "1rem", @@ -156,7 +158,8 @@ snapshots["integration custom formats inline custom with new args should match s "size", "padding", "large" - ] + ], + "key": "{size.padding.large}" }, { "value": "1rem", @@ -177,9 +180,11 @@ snapshots["integration custom formats inline custom with new args should match s "size", "padding", "xl" - ] + ], + "key": "{size.padding.xl}" } ], + "tokenMap": {}, "unfilteredTokens": { "size": { "padding": { @@ -290,7 +295,8 @@ snapshots["integration custom formats inline custom with new args should match s "size", "padding", "small" - ] + ], + "key": "{size.padding.small}" }, { "value": "1rem", @@ -311,7 +317,8 @@ snapshots["integration custom formats inline custom with new args should match s "size", "padding", "medium" - ] + ], + "key": "{size.padding.medium}" }, { "value": "1rem", @@ -332,7 +339,8 @@ snapshots["integration custom formats inline custom with new args should match s "size", "padding", "large" - ] + ], + "key": "{size.padding.large}" }, { "value": "1rem", @@ -353,9 +361,11 @@ snapshots["integration custom formats inline custom with new args should match s "size", "padding", "xl" - ] + ], + "key": "{size.padding.xl}" } - ] + ], + "unfilteredTokenMap": {} }, "allTokens": [ { @@ -377,7 +387,8 @@ snapshots["integration custom formats inline custom with new args should match s "size", "padding", "small" - ] + ], + "key": "{size.padding.small}" }, { "value": "1rem", @@ -398,7 +409,8 @@ snapshots["integration custom formats inline custom with new args should match s "size", "padding", "medium" - ] + ], + "key": "{size.padding.medium}" }, { "value": "1rem", @@ -419,7 +431,8 @@ snapshots["integration custom formats inline custom with new args should match s "size", "padding", "large" - ] + ], + "key": "{size.padding.large}" }, { "value": "1rem", @@ -440,7 +453,8 @@ snapshots["integration custom formats inline custom with new args should match s "size", "padding", "xl" - ] + ], + "key": "{size.padding.xl}" } ], "tokens": { @@ -1075,7 +1089,8 @@ snapshots["integration custom formats register custom format with new args shoul "size", "padding", "small" - ] + ], + "key": "{size.padding.small}" }, { "value": "1rem", @@ -1096,7 +1111,8 @@ snapshots["integration custom formats register custom format with new args shoul "size", "padding", "medium" - ] + ], + "key": "{size.padding.medium}" }, { "value": "1rem", @@ -1117,7 +1133,8 @@ snapshots["integration custom formats register custom format with new args shoul "size", "padding", "large" - ] + ], + "key": "{size.padding.large}" }, { "value": "1rem", @@ -1138,9 +1155,11 @@ snapshots["integration custom formats register custom format with new args shoul "size", "padding", "xl" - ] + ], + "key": "{size.padding.xl}" } ], + "tokenMap": {}, "unfilteredTokens": { "size": { "padding": { @@ -1251,7 +1270,8 @@ snapshots["integration custom formats register custom format with new args shoul "size", "padding", "small" - ] + ], + "key": "{size.padding.small}" }, { "value": "1rem", @@ -1272,7 +1292,8 @@ snapshots["integration custom formats register custom format with new args shoul "size", "padding", "medium" - ] + ], + "key": "{size.padding.medium}" }, { "value": "1rem", @@ -1293,7 +1314,8 @@ snapshots["integration custom formats register custom format with new args shoul "size", "padding", "large" - ] + ], + "key": "{size.padding.large}" }, { "value": "1rem", @@ -1314,9 +1336,11 @@ snapshots["integration custom formats register custom format with new args shoul "size", "padding", "xl" - ] + ], + "key": "{size.padding.xl}" } - ] + ], + "unfilteredTokenMap": {} }, "allTokens": [ { @@ -1338,7 +1362,8 @@ snapshots["integration custom formats register custom format with new args shoul "size", "padding", "small" - ] + ], + "key": "{size.padding.small}" }, { "value": "1rem", @@ -1359,7 +1384,8 @@ snapshots["integration custom formats register custom format with new args shoul "size", "padding", "medium" - ] + ], + "key": "{size.padding.medium}" }, { "value": "1rem", @@ -1380,7 +1406,8 @@ snapshots["integration custom formats register custom format with new args shoul "size", "padding", "large" - ] + ], + "key": "{size.padding.large}" }, { "value": "1rem", @@ -1401,7 +1428,8 @@ snapshots["integration custom formats register custom format with new args shoul "size", "padding", "xl" - ] + ], + "key": "{size.padding.xl}" } ], "tokens": { diff --git a/__perf_tests__/basic.test.js b/__perf_tests__/basic.test.js index c4055512d..644c753df 100644 --- a/__perf_tests__/basic.test.js +++ b/__perf_tests__/basic.test.js @@ -108,7 +108,8 @@ describe('cliBuildWithJsConfig', () => { expect(end - start).to.be.below(70); }); - // TODO: aim for <1000ms (maybe a bit more margin due to CI CPUs being slower) + // TODO: this should be way lower in the future when transform/resolve are using tokenMap + // and refs are getting cached it('should run tons of refs within 2750ms', async () => { // 9000 tokens, 6000 refs // (first layer is raw values, other 2 layers are refs to previous layer) diff --git a/__tests__/StyleDictionary.test.js b/__tests__/StyleDictionary.test.js index 220177b4b..f5c6033a7 100644 --- a/__tests__/StyleDictionary.test.js +++ b/__tests__/StyleDictionary.test.js @@ -17,7 +17,7 @@ import chalk from 'chalk'; import { fileToJSON, clearOutput, fileExists, clearSDMeta } from './__helpers.js'; import { resolve } from '../lib/resolve.js'; import GroupMessages from '../lib/utils/groupMessages.js'; -import flattenTokens from '../lib/utils/flattenTokens.js'; +import { convertTokenData } from '../lib/utils/convertTokenData.js'; import { stripMeta } from '../lib/utils/stripMeta.js'; import formats from '../lib/common/formats.js'; import { restore, stubMethod } from 'hanbi'; @@ -1145,7 +1145,7 @@ ${dictionary.allTokens.map((tok) => ` ${tok.name}: "${tok.value}";`).join('\n') }, { tokens: tokens, - allTokens: flattenTokens(tokens), + allTokens: convertTokenData(tokens, { output: 'array' }), }, ); await expect(output).to.matchSnapshot(); diff --git a/__tests__/common/formatHelpers/createPropertyFormatter.test.js b/__tests__/common/formatHelpers/createPropertyFormatter.test.js index 7086504d8..057bf443b 100644 --- a/__tests__/common/formatHelpers/createPropertyFormatter.test.js +++ b/__tests__/common/formatHelpers/createPropertyFormatter.test.js @@ -12,7 +12,7 @@ */ import { expect } from 'chai'; import createPropertyFormatter from '../../../lib/common/formatHelpers/createPropertyFormatter.js'; -import flattenTokens from '../../../lib/utils/flattenTokens.js'; +import { convertTokenData } from '../../../lib/utils/convertTokenData.js'; import { outputReferencesFilter } from '../../../lib/utils/references/outputReferencesFilter.js'; const dictionary = { @@ -257,7 +257,7 @@ describe('common', () => { }, }; const tokens = { ...unfilteredTokens }; - const allTokens = flattenTokens(tokens); + const allTokens = convertTokenData(tokens, { output: 'array' }); const propFormatter = createPropertyFormatter({ dictionary: { tokens, @@ -317,7 +317,7 @@ describe('common', () => { }; const tokens = { ...unfilteredTokens }; delete tokens.foo; - const allTokens = flattenTokens(tokens); + const allTokens = convertTokenData(tokens, { output: 'array' }); const propFormatter = createPropertyFormatter({ dictionary: { tokens, @@ -378,7 +378,7 @@ describe('common', () => { }; const tokens = { ...unfilteredTokens }; delete tokens.foo; - const allTokens = flattenTokens(tokens, true); + const allTokens = convertTokenData(tokens, { output: 'array', usesDtcg: true }); const propFormatter = createPropertyFormatter({ dictionary: { tokens, diff --git a/__tests__/filterTokens.test.js b/__tests__/filterTokens.test.js index c643b7f8e..bd1836a35 100644 --- a/__tests__/filterTokens.test.js +++ b/__tests__/filterTokens.test.js @@ -13,7 +13,7 @@ import { expect } from 'chai'; import filterTokens from '../lib/filterTokens.js'; import { clearOutput } from './__helpers.js'; -import flattenTokens from '../lib/utils/flattenTokens.js'; +import { convertTokenData } from '../lib/utils/convertTokenData.js'; const colorRed = { value: '#FF0000', @@ -123,7 +123,7 @@ const random_meta_tokens = { const random_meta_dictionary = { tokens: random_meta_tokens, - allTokens: flattenTokens(random_meta_tokens), + allTokens: convertTokenData(random_meta_tokens, { output: 'array' }), }; const falsy_values = { @@ -133,12 +133,12 @@ const falsy_values = { const dictionary = { tokens, - allTokens: flattenTokens(tokens), + allTokens: convertTokenData(tokens, { output: 'array' }), }; const falsy_dictionary = { tokens: falsy_values, - allTokens: flattenTokens(falsy_values), + allTokens: convertTokenData(falsy_values, { output: 'array' }), }; describe('filterTokens', () => { @@ -161,7 +161,10 @@ describe('filterTokens', () => { expect(token).to.not.equal(colorRed); expect(token).not.to.not.equal(colorBlue); }); - expect(filteredDictionary.allTokens).to.eql([sizeSmall, sizeLarge]); + expect(filteredDictionary.allTokens).to.eql([ + { ...sizeSmall, key: '{size.small}' }, + { ...sizeLarge, key: '{size.large}' }, + ]); expect(filteredDictionary.tokens).to.have.property('size'); expect(filteredDictionary.tokens).to.not.have.property('color'); }); @@ -173,7 +176,7 @@ describe('filterTokens', () => { filteredDictionary.allTokens.forEach((token) => { expect(token).to.not.equal(not_kept); }); - expect(filteredDictionary.allTokens).to.eql([kept]); + expect(filteredDictionary.allTokens).to.eql([{ ...kept, key: '{kept}' }]); expect(filteredDictionary.tokens).to.have.property('kept'); expect(filteredDictionary.tokens).to.not.have.property('not_kept'); }); @@ -184,7 +187,9 @@ describe('filterTokens', () => { }; const filteredDictionary = await filterTokens(random_meta_dictionary, filter); - expect(filteredDictionary.allTokens).to.eql([random_meta_tokens.foo.bar]); + expect(filteredDictionary.allTokens).to.eql([ + { ...random_meta_tokens.foo.bar, key: '{foo.bar}' }, + ]); expect(filteredDictionary.tokens).to.have.nested.property('foo.bar'); expect(filteredDictionary.tokens).to.not.have.property('qux'); }); diff --git a/__tests__/formats/all.test.js b/__tests__/formats/all.test.js index 983b8aac5..de2233866 100644 --- a/__tests__/formats/all.test.js +++ b/__tests__/formats/all.test.js @@ -13,7 +13,7 @@ import { expect } from 'chai'; import formats from '../../lib/common/formats.js'; import createFormatArgs from '../../lib/utils/createFormatArgs.js'; -import flattenTokens from '../../lib/utils/flattenTokens.js'; +import { convertTokenData } from '../../lib/utils/convertTokenData.js'; import { deepmerge } from '../../lib/utils/deepmerge.js'; const file = { @@ -45,7 +45,7 @@ describe('formats', async () => { it('should match ' + key + ' snapshot', async () => { const output = await format( createFormatArgs({ - dictionary: { tokens, allTokens: flattenTokens(tokens) }, + dictionary: { tokens, allTokens: convertTokenData(tokens, { output: 'array' }) }, file, platform: {}, }), @@ -65,7 +65,7 @@ describe('formats', async () => { }); const output = await format( createFormatArgs({ - dictionary: { tokens, allTokens: flattenTokens(tokens) }, + dictionary: { tokens, allTokens: convertTokenData(tokens, { output: 'array' }) }, file: _file, platform: {}, }), @@ -78,7 +78,7 @@ describe('formats', async () => { it('should return ' + key + ' as a string', async () => { const output = await format( createFormatArgs({ - dictionary: { tokens, allTokens: flattenTokens(tokens) }, + dictionary: { tokens, allTokens: convertTokenData(tokens, { output: 'array' }) }, file, platform: {}, }), diff --git a/__tests__/formats/androidCompose.test.js b/__tests__/formats/androidCompose.test.js index 64197edb5..173a579eb 100644 --- a/__tests__/formats/androidCompose.test.js +++ b/__tests__/formats/androidCompose.test.js @@ -13,7 +13,7 @@ import { expect } from 'chai'; import formats from '../../lib/common/formats.js'; import createFormatArgs from '../../lib/utils/createFormatArgs.js'; -import flattenTokens from '../../lib/utils/flattenTokens.js'; +import { convertTokenData } from '../../lib/utils/convertTokenData.js'; const tokens = { size: { @@ -75,7 +75,7 @@ describe('formats', () => { it('should match default snapshot', async () => { const f = await format( createFormatArgs({ - dictionary: { tokens, allTokens: flattenTokens(tokens) }, + dictionary: { tokens, allTokens: convertTokenData(tokens, { output: 'array' }) }, file, platform: {}, }), @@ -101,7 +101,7 @@ describe('formats', () => { }; const f = await format( createFormatArgs({ - dictionary: { tokens, allTokens: flattenTokens(tokens) }, + dictionary: { tokens, allTokens: convertTokenData(tokens, { output: 'array' }) }, file, platform: {}, }), diff --git a/__tests__/formats/androidResources.test.js b/__tests__/formats/androidResources.test.js index fdb01385f..a85564f27 100644 --- a/__tests__/formats/androidResources.test.js +++ b/__tests__/formats/androidResources.test.js @@ -13,7 +13,7 @@ import { expect } from 'chai'; import formats from '../../lib/common/formats.js'; import createFormatArgs from '../../lib/utils/createFormatArgs.js'; -import flattenTokens from '../../lib/utils/flattenTokens.js'; +import { convertTokenData } from '../../lib/utils/convertTokenData.js'; const tokens = { size: { @@ -100,7 +100,7 @@ describe('formats', () => { it('should match default snapshot', async () => { const f = await format( createFormatArgs({ - dictionary: { tokens, allTokens: flattenTokens(tokens) }, + dictionary: { tokens, allTokens: convertTokenData(tokens, { output: 'array' }) }, file, platform: {}, }), @@ -114,7 +114,7 @@ describe('formats', () => { const file = { options: { resourceType: 'dimen' } }; const f = await format( createFormatArgs({ - dictionary: { tokens, allTokens: flattenTokens(tokens) }, + dictionary: { tokens, allTokens: convertTokenData(tokens, { output: 'array' }) }, file, platform: {}, }), @@ -136,7 +136,10 @@ describe('formats', () => { }; const f = await format( createFormatArgs({ - dictionary: { tokens: customTokens, allTokens: flattenTokens(customTokens) }, + dictionary: { + tokens: customTokens, + allTokens: convertTokenData(customTokens, { output: 'array' }), + }, file, platform: {}, }), diff --git a/__tests__/formats/es6Constants.test.js b/__tests__/formats/es6Constants.test.js index 0a2c50aeb..b2440228f 100644 --- a/__tests__/formats/es6Constants.test.js +++ b/__tests__/formats/es6Constants.test.js @@ -13,7 +13,7 @@ import { expect } from 'chai'; import formats from '../../lib/common/formats.js'; import createFormatArgs from '../../lib/utils/createFormatArgs.js'; -import flattenTokens from '../../lib/utils/flattenTokens.js'; +import { convertTokenData } from '../../lib/utils/convertTokenData.js'; const file = { destination: '__output/', @@ -44,7 +44,7 @@ describe('formats', () => { await expect( await format( createFormatArgs({ - dictionary: { tokens, allTokens: flattenTokens(tokens) }, + dictionary: { tokens, allTokens: convertTokenData(tokens, { output: 'array' }) }, file, platform: {}, }), diff --git a/__tests__/formats/es6Module.test.js b/__tests__/formats/es6Module.test.js index b6738174a..4296b91fa 100644 --- a/__tests__/formats/es6Module.test.js +++ b/__tests__/formats/es6Module.test.js @@ -13,7 +13,7 @@ import { expect } from 'chai'; import formats from '../../lib/common/formats.js'; import createFormatArgs from '../../lib/utils/createFormatArgs.js'; -import flattenTokens from '../../lib/utils/flattenTokens.js'; +import { convertTokenData } from '../../lib/utils/convertTokenData.js'; const file = { destination: '__output/', @@ -89,7 +89,7 @@ describe('formats', () => { await expect( await format( createFormatArgs({ - dictionary: { tokens, allTokens: flattenTokens(tokens) }, + dictionary: { tokens, allTokens: convertTokenData(tokens, { output: 'array' }) }, file, platform: {}, }), @@ -103,7 +103,7 @@ describe('formats', () => { await expect( await format( createFormatArgs({ - dictionary: { tokens, allTokens: flattenTokens(tokens) }, + dictionary: { tokens, allTokens: convertTokenData(tokens, { output: 'array' }) }, file, platform: {}, options: { @@ -120,7 +120,7 @@ describe('formats', () => { await expect( await format( createFormatArgs({ - dictionary: { tokens, allTokens: flattenTokens(tokens) }, + dictionary: { tokens, allTokens: convertTokenData(tokens, { output: 'array' }) }, file, platform: {}, options: { @@ -139,7 +139,7 @@ describe('formats', () => { await expect( await format( createFormatArgs({ - dictionary: { tokens, allTokens: flattenTokens(tokens) }, + dictionary: { tokens, allTokens: convertTokenData(tokens, { output: 'array' }) }, file, platform: {}, options: { @@ -158,7 +158,10 @@ describe('formats', () => { await expect( await format( createFormatArgs({ - dictionary: { tokens: DTCGTokens, allTokens: flattenTokens(DTCGTokens) }, + dictionary: { + tokens: DTCGTokens, + allTokens: convertTokenData(tokens, { output: 'array', usesDtcg: true }), + }, file, platform: {}, options: { diff --git a/__tests__/formats/es6ModuleMinify.test.js b/__tests__/formats/es6ModuleMinify.test.js index d9ffe0497..6fc78aa3c 100644 --- a/__tests__/formats/es6ModuleMinify.test.js +++ b/__tests__/formats/es6ModuleMinify.test.js @@ -13,7 +13,7 @@ import { expect } from 'chai'; import formats from '../../lib/common/formats.js'; import createFormatArgs from '../../lib/utils/createFormatArgs.js'; -import flattenTokens from '../../lib/utils/flattenTokens.js'; +import { convertTokenData } from '../../lib/utils/convertTokenData.js'; const file = { destination: '__output/', @@ -40,7 +40,7 @@ describe('formats', () => { await expect( await format( createFormatArgs({ - dictionary: { tokens, allTokens: flattenTokens(tokens) }, + dictionary: { tokens, allTokens: convertTokenData(tokens, { output: 'array' }) }, file, platform: {}, }), diff --git a/__tests__/formats/javascriptModule.test.js b/__tests__/formats/javascriptModule.test.js index 8d5037fff..ef205c51d 100644 --- a/__tests__/formats/javascriptModule.test.js +++ b/__tests__/formats/javascriptModule.test.js @@ -13,7 +13,7 @@ import { expect } from 'chai'; import formats from '../../lib/common/formats.js'; import createFormatArgs from '../../lib/utils/createFormatArgs.js'; -import flattenTokens from '../../lib/utils/flattenTokens.js'; +import { convertTokenData } from '../../lib/utils/convertTokenData.js'; const file = { destination: '__output/', @@ -37,7 +37,7 @@ describe('formats', () => { await expect( await format( createFormatArgs({ - dictionary: { tokens, allTokens: flattenTokens(tokens) }, + dictionary: { tokens, allTokens: convertTokenData(tokens, { output: 'array' }) }, file, platform: {}, }), diff --git a/__tests__/formats/javascriptModuleFlat.test.js b/__tests__/formats/javascriptModuleFlat.test.js index 77eb342fb..80a0d01aa 100644 --- a/__tests__/formats/javascriptModuleFlat.test.js +++ b/__tests__/formats/javascriptModuleFlat.test.js @@ -13,7 +13,7 @@ import { expect } from 'chai'; import formats from '../../lib/common/formats.js'; import createFormatArgs from '../../lib/utils/createFormatArgs.js'; -import flattenTokens from '../../lib/utils/flattenTokens.js'; +import { convertTokenData } from '../../lib/utils/convertTokenData.js'; const file = { destination: '__output/', @@ -40,7 +40,7 @@ describe('formats', () => { await expect( await format( createFormatArgs({ - dictionary: { tokens, allTokens: flattenTokens(tokens) }, + dictionary: { tokens, allTokens: convertTokenData(tokens, { output: 'array' }) }, file, platform: {}, }), diff --git a/__tests__/formats/javascriptObject.test.js b/__tests__/formats/javascriptObject.test.js index e46ee869d..8a0aa249f 100644 --- a/__tests__/formats/javascriptObject.test.js +++ b/__tests__/formats/javascriptObject.test.js @@ -13,7 +13,7 @@ import { expect } from 'chai'; import formats from '../../lib/common/formats.js'; import createFormatArgs from '../../lib/utils/createFormatArgs.js'; -import flattenTokens from '../../lib/utils/flattenTokens.js'; +import { convertTokenData } from '../../lib/utils/convertTokenData.js'; const file = { destination: '__output/', @@ -35,7 +35,7 @@ describe('formats', () => { await expect( await format( createFormatArgs({ - dictionary: { tokens, allTokens: flattenTokens(tokens) }, + dictionary: { tokens, allTokens: convertTokenData(tokens, { output: 'array' }) }, file, platform: {}, }), diff --git a/__tests__/formats/javascriptUmd.test.js b/__tests__/formats/javascriptUmd.test.js index 74d4a2fbb..f46d1096e 100644 --- a/__tests__/formats/javascriptUmd.test.js +++ b/__tests__/formats/javascriptUmd.test.js @@ -13,7 +13,7 @@ import { expect } from 'chai'; import formats from '../../lib/common/formats.js'; import createFormatArgs from '../../lib/utils/createFormatArgs.js'; -import flattenTokens from '../../lib/utils/flattenTokens.js'; +import { convertTokenData } from '../../lib/utils/convertTokenData.js'; const file = { destination: '__output/', @@ -37,7 +37,7 @@ describe('formats', () => { await expect( await format( createFormatArgs({ - dictionary: { tokens, allTokens: flattenTokens(tokens) }, + dictionary: { tokens, allTokens: convertTokenData(tokens, { output: 'array' }) }, file, platform: {}, }), diff --git a/__tests__/formats/json.test.js b/__tests__/formats/json.test.js index 87bfd94a3..9fb918fd5 100644 --- a/__tests__/formats/json.test.js +++ b/__tests__/formats/json.test.js @@ -13,7 +13,7 @@ import { expect } from 'chai'; import formats from '../../lib/common/formats.js'; import createFormatArgs from '../../lib/utils/createFormatArgs.js'; -import flattenTokens from '../../lib/utils/flattenTokens.js'; +import { convertTokenData } from '../../lib/utils/convertTokenData.js'; const file = { destination: '__output/', @@ -86,7 +86,7 @@ describe('formats', () => { await expect( format( createFormatArgs({ - dictionary: { tokens, allTokens: flattenTokens(tokens) }, + dictionary: { tokens, allTokens: convertTokenData(tokens, { output: 'array' }) }, file, platform: {}, }), @@ -100,7 +100,7 @@ describe('formats', () => { await expect( format( createFormatArgs({ - dictionary: { tokens, allTokens: flattenTokens(tokens) }, + dictionary: { tokens, allTokens: convertTokenData(tokens, { output: 'array' }) }, file, platform: {}, options: { @@ -117,7 +117,7 @@ describe('formats', () => { await expect( format( createFormatArgs({ - dictionary: { tokens, allTokens: flattenTokens(tokens) }, + dictionary: { tokens, allTokens: convertTokenData(tokens, { output: 'array' }) }, file, platform: {}, options: { @@ -136,7 +136,7 @@ describe('formats', () => { await expect( format( createFormatArgs({ - dictionary: { tokens, allTokens: flattenTokens(tokens) }, + dictionary: { tokens, allTokens: convertTokenData(tokens, { output: 'array' }) }, file, platform: {}, options: { @@ -155,7 +155,10 @@ describe('formats', () => { await expect( format( createFormatArgs({ - dictionary: { tokens: DTCGTokens, allTokens: flattenTokens(DTCGTokens) }, + dictionary: { + tokens: DTCGTokens, + allTokens: convertTokenData(DTCGTokens, { output: 'array' }), + }, file, platform: {}, options: { diff --git a/__tests__/formats/jsonFlat.test.js b/__tests__/formats/jsonFlat.test.js index fa2333da2..86ed035b8 100644 --- a/__tests__/formats/jsonFlat.test.js +++ b/__tests__/formats/jsonFlat.test.js @@ -13,7 +13,7 @@ import { expect } from 'chai'; import formats from '../../lib/common/formats.js'; import createFormatArgs from '../../lib/utils/createFormatArgs.js'; -import flattenTokens from '../../lib/utils/flattenTokens.js'; +import { convertTokenData } from '../../lib/utils/convertTokenData.js'; const colorTokenName = 'color-base-red-400'; const colorTokenValue = '#EF5350'; @@ -48,7 +48,10 @@ describe('formats', () => { await expect( format( createFormatArgs({ - dictionary: { tokens: colorTokens, allTokens: flattenTokens(colorTokens) }, + dictionary: { + tokens: colorTokens, + allTokens: convertTokenData(colorTokens, { output: 'array' }), + }, file, platform: {}, }), diff --git a/__tests__/formats/jsonNested.test.js b/__tests__/formats/jsonNested.test.js index 2030c06f4..3b0fcb576 100644 --- a/__tests__/formats/jsonNested.test.js +++ b/__tests__/formats/jsonNested.test.js @@ -13,7 +13,7 @@ import { expect } from 'chai'; import formats from '../../lib/common/formats.js'; import createFormatArgs from '../../lib/utils/createFormatArgs.js'; -import flattenTokens from '../../lib/utils/flattenTokens.js'; +import { convertTokenData } from '../../lib/utils/convertTokenData.js'; const file = { destination: 'output/', @@ -43,7 +43,7 @@ describe('formats', function () { await expect( format( createFormatArgs({ - dictionary: { tokens, allTokens: flattenTokens(tokens) }, + dictionary: { tokens, allTokens: convertTokenData(tokens, { output: 'array' }) }, file, platform: {}, }), diff --git a/__tests__/formats/lessIcons.test.js b/__tests__/formats/lessIcons.test.js index a691247a8..707df30ed 100644 --- a/__tests__/formats/lessIcons.test.js +++ b/__tests__/formats/lessIcons.test.js @@ -13,7 +13,7 @@ import { expect } from 'chai'; import formats from '../../lib/common/formats.js'; import createFormatArgs from '../../lib/utils/createFormatArgs.js'; -import flattenTokens from '../../lib/utils/flattenTokens.js'; +import { convertTokenData } from '../../lib/utils/convertTokenData.js'; import { isNode } from '../../lib/utils/isNode.js'; const file = { @@ -61,7 +61,7 @@ describe('formats', () => { it('should have a valid less syntax and match snapshot', async () => { const result = await format( createFormatArgs({ - dictionary: { tokens, allTokens: flattenTokens(tokens) }, + dictionary: { tokens, allTokens: convertTokenData(tokens, { output: 'array' }) }, file, platform, }), diff --git a/__tests__/formats/lessVariables.test.js b/__tests__/formats/lessVariables.test.js index ffa9454f0..048f4e931 100644 --- a/__tests__/formats/lessVariables.test.js +++ b/__tests__/formats/lessVariables.test.js @@ -13,7 +13,7 @@ import { expect } from 'chai'; import formats from '../../lib/common/formats.js'; import createFormatArgs from '../../lib/utils/createFormatArgs.js'; -import flattenTokens from '../../lib/utils/flattenTokens.js'; +import { convertTokenData } from '../../lib/utils/convertTokenData.js'; import { isNode } from '../../lib/utils/isNode.js'; const file = { @@ -49,7 +49,7 @@ describe('formats', () => { it('should have a valid less syntax and match snapshot', async () => { const result = await format( createFormatArgs({ - dictionary: { tokens, allTokens: flattenTokens(tokens) }, + dictionary: { tokens, allTokens: convertTokenData(tokens, { output: 'array' }) }, file, platform: {}, }), diff --git a/__tests__/formats/scssIcons.test.js b/__tests__/formats/scssIcons.test.js index c60e90ab6..2f4dc20c5 100644 --- a/__tests__/formats/scssIcons.test.js +++ b/__tests__/formats/scssIcons.test.js @@ -14,7 +14,7 @@ import { expect } from 'chai'; import { compileString } from 'sass'; import formats from '../../lib/common/formats.js'; import createFormatArgs from '../../lib/utils/createFormatArgs.js'; -import flattenTokens from '../../lib/utils/flattenTokens.js'; +import { convertTokenData } from '../../lib/utils/convertTokenData.js'; const file = { destination: '__output/', @@ -61,7 +61,7 @@ describe('formats', () => { it('should have a valid scss syntax and match snapshot', async () => { const result = await format( createFormatArgs({ - dictionary: { tokens, allTokens: flattenTokens(tokens) }, + dictionary: { tokens, allTokens: convertTokenData(tokens, { output: 'array' }) }, file, platform, }), diff --git a/__tests__/formats/scssMaps.test.js b/__tests__/formats/scssMaps.test.js index 833f6f772..2f8c90136 100644 --- a/__tests__/formats/scssMaps.test.js +++ b/__tests__/formats/scssMaps.test.js @@ -14,7 +14,7 @@ import { expect } from 'chai'; import { compileString } from 'sass'; import formats from '../../lib/common/formats.js'; import createFormatArgs from '../../lib/utils/createFormatArgs.js'; -import flattenTokens from '../../lib/utils/flattenTokens.js'; +import { convertTokenData } from '../../lib/utils/convertTokenData.js'; const tokens = { size: { @@ -86,7 +86,7 @@ describe('formats', () => { const format = formats[key].bind(file); const output = await format( createFormatArgs({ - dictionary: { tokens, allTokens: flattenTokens(tokens) }, + dictionary: { tokens, allTokens: convertTokenData(tokens, { output: 'array' }) }, file, platform: {}, }), @@ -122,7 +122,7 @@ describe('formats', () => { }; const result = await format( createFormatArgs({ - dictionary: { tokens, allTokens: flattenTokens(tokens) }, + dictionary: { tokens, allTokens: convertTokenData(tokens, { output: 'array' }) }, file, platform: {}, }), diff --git a/__tests__/formats/scssVariables.test.js b/__tests__/formats/scssVariables.test.js index 5dbedf8d5..34217904c 100644 --- a/__tests__/formats/scssVariables.test.js +++ b/__tests__/formats/scssVariables.test.js @@ -14,7 +14,7 @@ import { expect } from 'chai'; import { compileString } from 'sass'; import formats from '../../lib/common/formats.js'; import createFormatArgs from '../../lib/utils/createFormatArgs.js'; -import flattenTokens from '../../lib/utils/flattenTokens.js'; +import { convertTokenData } from '../../lib/utils/convertTokenData.js'; const file = { destination: '__output/', @@ -49,7 +49,7 @@ describe('formats', () => { it('should have a valid scss syntax and match snapshot', async () => { const result = await format( createFormatArgs({ - dictionary: { tokens, allTokens: flattenTokens(tokens) }, + dictionary: { tokens, allTokens: convertTokenData(tokens, { output: 'array' }) }, file, platform: {}, }), @@ -62,10 +62,13 @@ describe('formats', () => { }); it('should optionally use !default', async () => { - const themeableDictionary = { tokens, allTokens: flattenTokens(tokens) }; + const themeableDictionary = { + tokens, + allTokens: convertTokenData(tokens, { output: 'array' }), + }; const formattedScss = await format( createFormatArgs({ - dictionary: { tokens, allTokens: flattenTokens(tokens) }, + dictionary: { tokens, allTokens: convertTokenData(tokens, { output: 'array' }) }, file, platform: {}, }), diff --git a/__tests__/formats/stylusVariable.test.js b/__tests__/formats/stylusVariable.test.js index 6e868aa07..61072c981 100644 --- a/__tests__/formats/stylusVariable.test.js +++ b/__tests__/formats/stylusVariable.test.js @@ -14,7 +14,7 @@ import { expect } from 'chai'; // import stylus from 'stylus'; see comment in test below import formats from '../../lib/common/formats.js'; import createFormatArgs from '../../lib/utils/createFormatArgs.js'; -import flattenTokens from '../../lib/utils/flattenTokens.js'; +import { convertTokenData } from '../../lib/utils/convertTokenData.js'; const file = { destination: '__output/', @@ -49,7 +49,7 @@ describe('formats', () => { it('should have a valid stylus syntax and match snapshot', async () => { const result = format( createFormatArgs({ - dictionary: { tokens, allTokens: flattenTokens(tokens) }, + dictionary: { tokens, allTokens: convertTokenData(tokens, { output: 'array' }) }, file, platform: {}, }), diff --git a/__tests__/formats/swiftFile.test.js b/__tests__/formats/swiftFile.test.js index 2fb4899c4..71ef8bfa5 100644 --- a/__tests__/formats/swiftFile.test.js +++ b/__tests__/formats/swiftFile.test.js @@ -13,7 +13,7 @@ import { expect } from 'chai'; import formats from '../../lib/common/formats.js'; import createFormatArgs from '../../lib/utils/createFormatArgs.js'; -import flattenTokens from '../../lib/utils/flattenTokens.js'; +import { convertTokenData } from '../../lib/utils/convertTokenData.js'; const originalFile = { destination: '__output/', @@ -54,7 +54,7 @@ describe('formats', () => { await expect( await format( createFormatArgs({ - dictionary: { tokens, allTokens: flattenTokens(tokens) }, + dictionary: { tokens, allTokens: convertTokenData(tokens, { output: 'array' }) }, file, platform: {}, }), @@ -69,7 +69,7 @@ describe('formats', () => { await expect( await format( createFormatArgs({ - dictionary: { tokens, allTokens: flattenTokens(tokens) }, + dictionary: { tokens, allTokens: convertTokenData(tokens, { output: 'array' }) }, file, platform: {}, }), @@ -84,7 +84,7 @@ describe('formats', () => { await expect( await format( createFormatArgs({ - dictionary: { tokens, allTokens: flattenTokens(tokens) }, + dictionary: { tokens, allTokens: convertTokenData(tokens, { output: 'array' }) }, file, platform: {}, }), @@ -99,7 +99,7 @@ describe('formats', () => { await expect( await format( createFormatArgs({ - dictionary: { tokens, allTokens: flattenTokens(tokens) }, + dictionary: { tokens, allTokens: convertTokenData(tokens, { output: 'array' }) }, file, platform: {}, }), diff --git a/__tests__/formats/typeScriptEs6Declarations.test.js b/__tests__/formats/typeScriptEs6Declarations.test.js index 9d990b0c0..5e6590cc9 100644 --- a/__tests__/formats/typeScriptEs6Declarations.test.js +++ b/__tests__/formats/typeScriptEs6Declarations.test.js @@ -13,7 +13,7 @@ import { expect } from 'chai'; import formats from '../../lib/common/formats.js'; import createFormatArgs from '../../lib/utils/createFormatArgs.js'; -import flattenTokens from '../../lib/utils/flattenTokens.js'; +import { convertTokenData } from '../../lib/utils/convertTokenData.js'; const file = { destination: '__output/', @@ -43,7 +43,7 @@ describe('formats', () => { it('should be a valid TS file', async () => { const output = await format( createFormatArgs({ - dictionary: { tokens, allTokens: flattenTokens(tokens) }, + dictionary: { tokens, allTokens: convertTokenData(tokens, { output: 'array' }) }, file, platform: {}, }), @@ -68,7 +68,7 @@ describe('formats', () => { const output = await format( createFormatArgs({ - dictionary: { tokens, allTokens: flattenTokens(tokens) }, + dictionary: { tokens, allTokens: convertTokenData(tokens, { output: 'array' }) }, file: customFile, platform: {}, }), diff --git a/__tests__/formats/typeScriptModuleDeclarations.test.js b/__tests__/formats/typeScriptModuleDeclarations.test.js index 3072a63ee..c0a4a5dc4 100644 --- a/__tests__/formats/typeScriptModuleDeclarations.test.js +++ b/__tests__/formats/typeScriptModuleDeclarations.test.js @@ -13,7 +13,7 @@ import { expect } from 'chai'; import formats from '../../lib/common/formats.js'; import createFormatArgs from '../../lib/utils/createFormatArgs.js'; -import flattenTokens from '../../lib/utils/flattenTokens.js'; +import { convertTokenData } from '../../lib/utils/convertTokenData.js'; const file = { destination: '__output/', @@ -34,7 +34,7 @@ describe('formats', () => { it('should be a valid TS file', async () => { const output = await format( createFormatArgs({ - dictionary: { tokens, allTokens: flattenTokens(tokens) }, + dictionary: { tokens, allTokens: convertTokenData(tokens, { output: 'array' }) }, file, platform: {}, }), diff --git a/__tests__/utils/convertTokenData.test.js b/__tests__/utils/convertTokenData.test.js new file mode 100644 index 000000000..29162e2fa --- /dev/null +++ b/__tests__/utils/convertTokenData.test.js @@ -0,0 +1,110 @@ +/* + * Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with + * the License. A copy of the License is located at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions + * and limitations under the License. + */ +import { expect } from 'chai'; +import { convertTokenData } from '../../lib/utils/convertTokenData.js'; +import { convertToDTCG } from '../../lib/utils/convertToDTCG.js'; + +const data = { + normal: { + object: { + colors: { + red: { + 500: { + value: '#f00', + foo: 'bar', + // key is usually only added by the convertTokenData + // and not part of the input, but for the sake of testing, + // we put it here initialiy + key: '{colors.red.500}', + }, + }, + green: { + 500: { + value: '#0f0', + foo: 'baz', + key: '{colors.green.500}', + }, + }, + blue: { + 500: { + value: '#00f', + foo: 'qux', + key: '{colors.blue.500}', + }, + }, + }, + }, + map: new Map([ + ['{colors.red.500}', { value: '#f00', foo: 'bar', key: '{colors.red.500}' }], + ['{colors.green.500}', { value: '#0f0', foo: 'baz', key: '{colors.green.500}' }], + ['{colors.blue.500}', { value: '#00f', foo: 'qux', key: '{colors.blue.500}' }], + ]), + array: [ + { key: '{colors.red.500}', value: '#f00', foo: 'bar' }, + { key: '{colors.green.500}', value: '#0f0', foo: 'baz' }, + { key: '{colors.blue.500}', value: '#00f', foo: 'qux' }, + ], + }, +}; + +// Bit ugly but converting the above data to DTCG style +const copyNormal = structuredClone(data.normal); +data.DTCG = {}; + +// object +data.DTCG.object = convertToDTCG(copyNormal.object, { applyTypesToGroup: false }); + +// map +data.DTCG.map = new Map(); +Array.from(copyNormal.map.entries()).forEach(([key, val]) => { + data.DTCG.map.set(key, { foo: val.foo, $value: val.value, key: val.key }); +}); + +// array +data.DTCG.array = copyNormal.array.map((item) => ({ + key: item.key, + foo: item.foo, + $value: item.value, +})); + +describe('utils', () => { + describe('convertTokenData', () => { + // Use the test below here if you need to debug a specific conversion, which is a bit harder to do + // in the dynamically generated tests below it. + // it.only(`should convert object to map for DTCG tokens`, () => { + // expect(convertTokenData(data['DTCG']['object'], { output: 'map', usesDtcg: true })).to.eql( + // data['DTCG']['map'], + // ); + // }); + + // The below produces: (mode * outputs * inputs) matrix -> (2 * 3 * 3) = 18 tests + // For mode "normal" and mode "DTCG" tokens + Object.keys(data).forEach((mode) => { + describe(`${mode} tests`, () => { + // For outputs array map and object + Object.keys(data[mode]).forEach((output) => { + describe(`convert to ${output}`, () => { + // Verify each input (array map and object) produces the correct result + Object.keys(data[mode]).forEach((input) => { + it(`should convert ${input} to ${output}`, () => { + expect( + convertTokenData(data[mode][input], { output, usesDtcg: mode === 'DTCG' }), + ).to.eql(data[mode][output]); + }); + }); + }); + }); + }); + }); + }); +}); diff --git a/__tests__/utils/flattenTokens.test.js b/__tests__/utils/flattenTokens.test.js index b236d8f37..d4305dd86 100644 --- a/__tests__/utils/flattenTokens.test.js +++ b/__tests__/utils/flattenTokens.test.js @@ -40,7 +40,10 @@ describe('utils', () => { }, }; - const expected_ret = [tokens.black, tokens.white]; + const expected_ret = [ + { key: '{black}', ...tokens.black }, + { key: '{white}', ...tokens.white }, + ]; const sortedExpectedRet = expected_ret.sort(sortBy('value')); const ret = flattenTokens(tokens); @@ -60,7 +63,10 @@ describe('utils', () => { }, }; - const expected_ret = [tokens.color.black, tokens.color.white]; + const expected_ret = [ + { key: '{color.black}', ...tokens.color.black }, + { key: '{color.white}', ...tokens.color.white }, + ]; const sortedExpectedRet = expected_ret.sort(sortBy('value')); const ret = flattenTokens(tokens); @@ -85,11 +91,63 @@ describe('utils', () => { }; const ret = flattenTokens(tokens, { usesDtcg: true }); - const expected_ret = [tokens.color.black, tokens.color.white]; + const expected_ret = [ + { key: '{color.black}', ...tokens.color.black }, + { key: '{color.white}', ...tokens.color.white }, + ]; + const sortedExpectedRet = expected_ret.sort(sortBy('value')); const sortedRet = ret.sort(sortBy('value')); expect(sortedRet).to.eql(sortedExpectedRet); }); + + it('should pass a key prop to flattened tokens matching the ancestor tree', () => { + const tokens = { + dimension: { + scale: { + value: '2', + type: 'sizing', + }, + sm: { + value: '{dimension.xs} * {dimension.scale}', + type: 'sizing', + }, + foo: { + bar: { + baz: { + value: '2', + type: 'sizing', + }, + }, + qux: { value: '2', type: 'sizing' }, + }, + lg: { + value: '{dimension.md} * {dimension.scale}', + type: 'sizing', + }, + }, + spacing: { + sm: { + value: '{dimension.sm}', + type: 'spacing', + }, + lg: { + value: '{dimension.lg}', + type: 'spacing', + }, + }, + }; + const ret = flattenTokens(tokens); + expect(ret.map((r) => r.key)).to.eql([ + '{dimension.scale}', + '{dimension.sm}', + '{dimension.foo.bar.baz}', + '{dimension.foo.qux}', + '{dimension.lg}', + '{spacing.sm}', + '{spacing.lg}', + ]); + }); }); }); diff --git a/docs/src/components/Head.astro b/docs/src/components/Head.astro index 5b699633d..8fb91ad8c 100644 --- a/docs/src/components/Head.astro +++ b/docs/src/components/Head.astro @@ -2,7 +2,8 @@ import Default from '@astrojs/starlight/components/Head.astro'; import type { Props } from '@astrojs/starlight/props'; --- + - \ No newline at end of file + diff --git a/docs/src/content/docs/getting-started/using_the_npm_module.md b/docs/src/content/docs/getting-started/using_the_npm_module.md index 986e9af1e..0cf8ec964 100644 --- a/docs/src/content/docs/getting-started/using_the_npm_module.md +++ b/docs/src/content/docs/getting-started/using_the_npm_module.md @@ -106,7 +106,7 @@ The [multi-brand-multi-platform example](https://github.com/amzn/style-dictionar There is also a utils entrypoint on the NPM module that contains helper utils. ```js title="import-utils.js" -import { flattenTokens } from 'style-dictionary/utils'; +import { convertTokenData } from 'style-dictionary/utils'; ``` For more details, [read the utils docs](/reference/utils) diff --git a/docs/src/content/docs/reference/Hooks/Formats/index.md b/docs/src/content/docs/reference/Hooks/Formats/index.md index a31e98f8d..b0a38617f 100644 --- a/docs/src/content/docs/reference/Hooks/Formats/index.md +++ b/docs/src/content/docs/reference/Hooks/Formats/index.md @@ -156,7 +156,7 @@ export default { options: { // Look here 👇 outputReferences: (token, { dictionary, usesDtcg }) => { - // `dictionary` contains `allTokens`, `tokens` and `unfilteredTokens` props + // `dictionary` contains `allTokens`, `tokens`, `tokenMap`, `unfilteredTokens`, `unfilteredAllTokens` and `unfilteredTokenMap` props // `usesDtcg` tells you whether the Design Token Community Group spec is used with $ prefixes ($value, $type etc.) // return true or false }, @@ -272,17 +272,19 @@ You might be wondering why the return type of a format function is `unknown`. [More information about this here](#custom-return-types) ::: -| Param | Type | Description | -| ------------------------------------- | -------------------- | ----------------------------------------------------------------------------------------------------- | -| `args` | `Object` | A single argument to support named parameters and destructuring. | -| `args.dictionary` | `Dictionary` | Transformed Dictionary object containing allTokens, tokens and unfilteredTokens. | -| `args.dictionary.allTokens` | `TransformedToken[]` | Flattened array of all tokens, easiest to loop over and export to a flat format. | -| `args.dictionary.tokens` | `TransformedTokens` | All tokens, still in unflattened object format. | -| `args.dictionary.unfilteredAllTokens` | `TransformedToken[]` | Flattened array of all tokens, including tokens that were filtered out by filters. | -| `args.dictionary.unfilteredTokens` | `TransformedTokens` | All tokens, still in unflattened object format, including tokens that were filtered out by filters. | -| `args.platform` | `Platform` | [Platform config](/reference/config#platform) | -| `args.file` | `File` | [File config](/reference/config#file) | -| `args.options` | `Object` | Merged object with SD [Config](/reference/config#properties) & [FormatOptions](#format-configuration) | +| Param | Type | Description | +| ------------------------------------- | ---------------------------------- | --------------------------------------------------------------------------------------------------------------------- | +| `args` | `Object` | A single argument to support named parameters and destructuring. | +| `args.dictionary` | `Dictionary` | Transformed Dictionary object containing allTokens, tokens and unfilteredTokens. | +| `args.dictionary.allTokens` | `TransformedToken[]` | Flattened array of all tokens, easiest to loop over and export to a flat format. | +| `args.dictionary.tokens` | `TransformedTokens` | All tokens, still in unflattened object format. | +| `args.dictionary.tokenMap` | `Record` | All tokens as a JavaScript Map that's keyed, making it easy to access a single token as well as iterate through them. | +| `args.dictionary.unfilteredAllTokens` | `TransformedToken[]` | Flattened array of all tokens, including tokens that were filtered out by filters. | +| `args.dictionary.unfilteredTokens` | `TransformedTokens` | All tokens, still in unflattened object format, including tokens that were filtered out by filters. | +| `args.dictionary.unfilteredTokenMap` | `TransformedTokens` | All tokens as a JavaScript Map, including tokens that were filtered out by filters. | +| `args.platform` | `Platform` | [Platform config](/reference/config#platform) | +| `args.file` | `File` | [File config](/reference/config#file) | +| `args.options` | `Object` | Merged object with SD [Config](/reference/config#properties) & [FormatOptions](#format-configuration) | Example: diff --git a/docs/src/content/docs/reference/Utils/format-helpers.md b/docs/src/content/docs/reference/Utils/format-helpers.md index c403dde6f..330eee8e0 100644 --- a/docs/src/content/docs/reference/Utils/format-helpers.md +++ b/docs/src/content/docs/reference/Utils/format-helpers.md @@ -34,18 +34,21 @@ to use as the function on `dictionary.allTokens.map`. The formatting is configurable either by supplying a `format` option or a `formatting` object which uses: prefix, indentation, separator, suffix, and commentStyle. -| Param | Type | Description | -| ------------------------------------- | ------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `options` | `Object` | A single argument to support named parameters and destructuring. | -| `options.outputReferences` | `boolean \| OutputReferencesFunction` | Whether or not to output references. You will want to pass this from the `options` object sent to the format function. Also allows passing a function to conditionally output references on a per token basis. | -| `options.outputReferenceFallbacks` | `boolean` | Whether or not to output css variable fallback values when using output references. You will want to pass this from the `options` object sent to the format function. | -| `options.dictionary` | `Dictionary` | Transformed Dictionary object containing allTokens, tokens and unfilteredTokens. | -| `options.dictionary.allTokens` | `TransformedToken[]` | Flattened array of all tokens, easiest to loop over and export to a flat format. | -| `options.dictionary.tokens` | `TransformedTokens` | All tokens, still in unflattened object format. | -| `options.dictionary.unfilteredTokens` | `TransformedTokens` | All tokens, still in unflattened object format, including tokens that were filtered out by filters. | -| `options.format` | `string` | Available formats are: 'css', 'sass', 'less', and 'stylus'. If you want to customize the format and can't use one of those predefined formats, use the `formatting` option | -| `options.formatting` | `FormattingOptions` | Custom formatting properties that define parts of a declaration line in code. The configurable strings are: `prefix`, `indentation`, `separator`, `suffix`, `lineSeparator`, `fileHeaderTimestamp`, `header`, `footer`, `commentStyle` and `commentPosition`. Those are used to generate a line like this: `${indentation}${prefix}${token.name}${separator} ${prop.value}${suffix}`. The remaining formatting options are used for the fileHeader helper. | -| `options.themeable` | `boolean` | Whether tokens should default to being themeable. Defaults to false. | +| Param | Type | Description | +| ---------------------------------------- | ------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `options` | `Object` | A single argument to support named parameters and destructuring. | +| `options.outputReferences` | `boolean \| OutputReferencesFunction` | Whether or not to output references. You will want to pass this from the `options` object sent to the format function. Also allows passing a function to conditionally output references on a per token basis. | +| `options.outputReferenceFallbacks` | `boolean` | Whether or not to output css variable fallback values when using output references. You will want to pass this from the `options` object sent to the format function. | +| `options.dictionary` | `Dictionary` | Transformed Dictionary object containing allTokens, tokens and unfilteredTokens. | +| `options.dictionary.tokens` | `TransformedTokens` | All tokens, still in unflattened object format. | +| `options.dictionary.allTokens` | `TransformedToken[]` | Flattened array of all tokens, easiest to loop over and export to a flat format. | +| `options.dictionary.tokenMap` | `Record` | All tokens as JavaScript. Map | +| `options.dictionary.unfilteredTokens` | `TransformedTokens` | All tokens, still in unflattened object format, including tokens that were filtered out by filters. | +| `options.dictionary.unfilteredAllTokens` | `TransformedToken[]` | Flattened array of all tokens, easiest to loop over and export to a flat, including tokens that were filtered out by filters. | +| `options.dictionary.unfilteredTokenMap` | `Record` | All tokens as JavaScript Map, still in unflattened object format, including tokens that were filtered out by filters. | +| `options.format` | `string` | Available formats are: 'css', 'sass', 'less', and 'stylus'. If you want to customize the format and can't use one of those predefined formats, use the `formatting` option | +| `options.formatting` | `FormattingOptions` | Custom formatting properties that define parts of a declaration line in code. The configurable strings are: `prefix`, `indentation`, `separator`, `suffix`, `lineSeparator`, `fileHeaderTimestamp`, `header`, `footer`, `commentStyle` and `commentPosition`. Those are used to generate a line like this: `${indentation}${prefix}${token.name}${separator} ${prop.value}${suffix}`. The remaining formatting options are used for the fileHeader helper. | +| `options.themeable` | `boolean` | Whether tokens should default to being themeable. Defaults to false. | Example: diff --git a/docs/src/content/docs/reference/Utils/index.md b/docs/src/content/docs/reference/Utils/index.md index 8213d3365..24590425d 100644 --- a/docs/src/content/docs/reference/Utils/index.md +++ b/docs/src/content/docs/reference/Utils/index.md @@ -15,7 +15,7 @@ npm install -D style-dictionary ## Usage ```js title="script.js" -import { flattenTokens, resolveReferences, typeDtcgDelegate } from 'style-dictionary/utils'; +import { convertTokenData, resolveReferences, typeDtcgDelegate } from 'style-dictionary/utils'; ``` Check out the next pages for more details about the specific categories of utility functions. diff --git a/docs/src/content/docs/reference/Utils/tokens.md b/docs/src/content/docs/reference/Utils/tokens.md deleted file mode 100644 index a56966115..000000000 --- a/docs/src/content/docs/reference/Utils/tokens.md +++ /dev/null @@ -1,119 +0,0 @@ ---- -title: Tokens ---- - -These utilities have to do with processing/formatting tokens object. - -## flattenTokens - -Flatten dictionary tokens object to an array of flattened tokens. - -:::note -Only the "value" / "$value" property is required for this utility to consider a leaf node a "token" to be added to the flattened array output. -::: - -```javascript title="build-tokens.js" -import StyleDictionary from 'style-dictionary'; -import { flattenTokens } from 'style-dictionary/utils'; - -const sd = new StyleDictionary({ - tokens: { - colors: { - black: { - value: '#000', - type: 'color', - name: 'colors-black', - }, - }, - spacing: { - 2: { - value: '2px', - type: 'dimension', - name: 'spacing-2', - }, - }, - border: { - value: 'solid {spacing.2} {colors.black}', - name: 'border', - }, - }, -}); - -const flat = flattenTokens(sd); -/** - * [ - * { value: '#000', type: 'color', name: 'colors-black' }, - * { value: '2px', type: 'dimension', name: 'spacing-2' }, - * { value: 'solid {spacing.2} {colors.black}', name: 'border' } - * ] - */ -``` - -:::note -You can pass a second argument `usesDtcg`, if set to true, the flattenTokens utility will assume DTCG syntax (`$value` props). -::: - -## stripMeta - -Allows you to strip meta data from design tokens, useful if you want to output clean nested formats. - -You can define which meta properties to strip or which properties to keep (allowlist / blocklist), in the second `options` parameter. - -This utility is also used in the [`'json'` format](/reference/hooks/formats/predefined#json). - -```javascript title="build-tokens.js" -import StyleDictionary from 'style-dictionary'; -import { stripMeta } from 'style-dictionary/utils'; - -const sd = new StyleDictionary({ - tokens: { - colors: { - black: { - value: '#000', - type: 'color', - name: 'colors-black', - attributes: { foo: 'bar' }, - path: ['colors', 'black'], - }, - }, - spacing: { - 2: { - value: '2px', - type: 'dimension', - name: 'spacing-2', - attributes: { foo: 'bar' }, - path: ['spacing', '2'], - }, - }, - border: { - value: 'solid {spacing.2} {colors.black}', - name: 'border', - attributes: { foo: 'bar' }, - path: ['border'], - }, - }, -}); - -const stripped = stripMeta(sd, { keep: ['value'] }); -/** - * { - * colors: { - * black: { - * value: '#000', - * }, - * }, - * spacing: { - * 2: { - * value: '2px', - * }, - * }, - * border: { - * value: 'solid {spacing.2} {colors.black}', - * }, - * } - */ -``` - -:::note -You can pass `usesDtcg` property in the `options` object parameter, if set to true, the stripMeta utility will assume DTCG syntax (`$value` props). -::: diff --git a/docs/src/content/docs/reference/Utils/tokens.mdx b/docs/src/content/docs/reference/Utils/tokens.mdx new file mode 100644 index 000000000..16841c7a9 --- /dev/null +++ b/docs/src/content/docs/reference/Utils/tokens.mdx @@ -0,0 +1,214 @@ +--- +title: Tokens +--- + +import { Badge } from '@astrojs/starlight/components'; + +These utilities have to do with processing/formatting tokens. + +## flattenTokens + +> Deprecated in favor of [`convertTokenData`](/reference/utils/tokens#converttokendata), see below. + +Flatten dictionary tokens object to an array of flattened tokens. + +:::note +Only the "value" / "$value" property is required for this utility to consider a leaf node a "token" to be added to the flattened array output. +::: + +```javascript title="build-tokens.js" +import StyleDictionary from 'style-dictionary'; +import { flattenTokens } from 'style-dictionary/utils'; + +const sd = new StyleDictionary({ + tokens: { + colors: { + black: { + value: '#000', + type: 'color', + name: 'colors-black', + }, + }, + spacing: { + 2: { + value: '2px', + type: 'dimension', + name: 'spacing-2', + }, + }, + border: { + value: 'solid {spacing.2} {colors.black}', + name: 'border', + }, + }, +}); +await sd.hasInitialized; + +const flat = flattenTokens(sd.tokens); +/** + * [ + * { key: '{colors.black}', value: '#000', type: 'color', name: 'colors-black' }, + * { key: '{spacing.2}', value: '2px', type: 'dimension', name: 'spacing-2' }, + * { key: '{border}', value: 'solid {spacing.2} {colors.black}', name: 'border' } + * ] + */ +``` + +:::note +You can pass a second argument `usesDtcg`, if set to true, the flattenTokens utility will assume DTCG syntax (`$value` props). +::: + +The key is added so that it is easy to transform the flattened array back to a nested object if needed later, by using the [convertTokenData](/reference/utils/tokens#converttokendata) utility. + +## convertTokenData + +Convert tokens from one data structure to another. + +Available data structures: + +- `Array` (available as `allTokens` on `dictionary`) -> easy to iterate e.g. for outputting flat formats +- `Object` (available as `tokens` on `dictionary`) -> similar to JSON input format e.g. DTCG format, useful for outputting nested / deep formats such as JSON +- `Map` (available as `tokenMap` on `dictionary`) -> easy to iterate & access, optimal for token processing and will be used internally in Style Dictionary in the future + +> All 3 structures can be converted to one another + +| Param | Type | Description | +| ------------------ | ------------------------------- | ------------------------------------------------------------ | +| `tokens` | `Tokens \| Token[] \| TokenMap` | The input tokens data as either `Object`, `Array` or `Map`. | +| `options` | `Object` | Options object, with multiple properties. | +| `options.usesDtcg` | `boolean` | Whether the input data uses DTCG syntax, `false` by default. | +| `options.output` | `'object' \| 'array' \| 'map'` | Output data format | + +We are currently considering making the `Map` structure the de-facto standard in a future v5, making the `Object`/`Array` versions available only through this utility. This is to optimize the library's base functionality. + +This utility auto-detects the input data type and allows you to specify the desired output data type. +You can optionally pass `usesDtcg` flag as well if you use DTCG format, this is necessary for converting from Object to `Map`/`Array`, since we need to know whether to use the `$value` or `value` to identify tokens in the `Object`. + +```javascript title="build-tokens.js" +import StyleDictionary from 'style-dictionary'; +import { convertTokenData } from 'style-dictionary/utils'; + +const sd = new StyleDictionary({ + tokens: { + colors: { + black: { + value: '#000', + type: 'color', + name: 'colors-black', + }, + }, + spacing: { + 2: { + value: '2px', + type: 'dimension', + name: 'spacing-2', + }, + }, + border: { + value: 'solid {spacing.2} {colors.black}', + name: 'border', + }, + }, +}); +await sd.hasInitialized; + +const flatArray = convertTokenData(sd.tokens, { output: 'array' }); +/** + * [ + * { key: '{colors.black}', value: '#000', type: 'color', name: 'colors-black' }, + * { key: '{spacing.2}', value: '2px', type: 'dimension', name: 'spacing-2' }, + * { key: '{border}', value: 'solid {spacing.2} {colors.black}', name: 'border' } + * ] + */ + +/** + * Using the flatArray as input here is cheaper than using sd.tokens, since in order for + * it to convert a tokens Object to a Map, it would first flatten it to an Array. + * + * However, you definitely CAN use the sd.tokens as input as well + */ +const map = convertTokenData(flatArray, { output: 'map' }); +/** + * Map(3): { + * '{colors.black}' => { value: '#000', type: 'color', name: 'colors-black' }, + * '{spacing.2}' => { value: '2px', type: 'dimension', name: 'spacing-2' }, + * '{border}' => { value: 'solid {spacing.2} {colors.black}', name: 'border' } + * } + */ +const borderToken = map.get('{border}'); // easy to access a token since it's keyed + +/** + * Same as above, you could use `sd.tokens` or `map` as inputs as well + * `sd.tokens` is cheapest since it's already an object and just returns it, no conversion happens + * `array` is just slightly cheaper than map since map needs to call .values() Iterator to iterate + */ +const object = convertTokenData(flatArray, { output: 'object' }); +/** + * Same as original tokens input, we basically went full circle + */ +``` + +## stripMeta + +Allows you to strip meta data from design tokens, useful if you want to output clean nested formats. + +You can define which meta properties to strip or which properties to keep (allowlist / blocklist), in the second `options` parameter. + +This utility is also used in the [`'json'` format](/reference/hooks/formats/predefined#json). + +```javascript title="build-tokens.js" +import StyleDictionary from 'style-dictionary'; +import { stripMeta } from 'style-dictionary/utils'; + +const sd = new StyleDictionary({ + tokens: { + colors: { + black: { + value: '#000', + type: 'color', + name: 'colors-black', + attributes: { foo: 'bar' }, + path: ['colors', 'black'], + }, + }, + spacing: { + 2: { + value: '2px', + type: 'dimension', + name: 'spacing-2', + attributes: { foo: 'bar' }, + path: ['spacing', '2'], + }, + }, + border: { + value: 'solid {spacing.2} {colors.black}', + name: 'border', + attributes: { foo: 'bar' }, + path: ['border'], + }, + }, +}); + +const stripped = stripMeta(sd, { keep: ['value'] }); +/** + * { + * colors: { + * black: { + * value: '#000', + * }, + * }, + * spacing: { + * 2: { + * value: '2px', + * }, + * }, + * border: { + * value: 'solid {spacing.2} {colors.black}', + * }, + * } + */ +``` + +:::note +You can pass `usesDtcg` property in the `options` object parameter, if set to true, the stripMeta utility will assume DTCG syntax (`$value` props). +::: diff --git a/docs/src/content/docs/reference/api.md b/docs/src/content/docs/reference/api.mdx similarity index 97% rename from docs/src/content/docs/reference/api.md rename to docs/src/content/docs/reference/api.mdx index a562ba9e4..ca214d266 100644 --- a/docs/src/content/docs/reference/api.md +++ b/docs/src/content/docs/reference/api.mdx @@ -4,6 +4,8 @@ sidebar: order: 1 --- +import { Badge } from '@astrojs/starlight/components'; + ## new StyleDictionary() Create a new StyleDictionary instance. @@ -204,7 +206,7 @@ type formatPlatform = ( | platform | `string` | Name of the platform you want to build. | | opts | `{ cache?: boolean }` | `cache` prop determines whether or not it should reuse the cached tokens/config if they've already been processed earlier for this platform. `false` by default | -Runs [`getPlatform`](#getplatform) under the hood, and then loops over the `files`, and formats the dictionary for each file, returning an array of file objects: +Runs [`getPlatformTokens`](#getplatformtokens) under the hood, and then loops over the `files`, and formats the dictionary for each file, returning an array of file objects: - `output` property, which is usually a string but depending on the format, it could also be any other data type. This is useful if you don't intend to write to a file, but want to do something else with the formatted tokens. - `destination` property, this one is optional, if you don't intend on writing to a file you don't need this, but it can still be useful to name your outputs if you've got multiple `files`. @@ -337,7 +339,9 @@ defined in the platform and calls the undo method on any actions. - For `exportPlatform`, use `getPlatformTokens` instead, turning off the cache option if needed. - For `getPlatform`, use `getPlatformConfig` insetad, turning off the cache option if needed. -### exportPlatform +### exportPlatform + +> Deprecated in favor of [`getPlatformTokens`](#getplatformtokens). ```ts type exportPlatform = (platform: string, opts: { cache?: boolean }) => Promise; @@ -354,7 +358,9 @@ This is useful if you want to use a Style Dictionary in JS build tools like Webp --- -### getPlatform +### getPlatform + +> Deprecated in favor of [`getPlatformConfig`](#getplatformconfig). ```ts type getPlatform = ( @@ -365,6 +371,7 @@ type getPlatform = ( dictionary: { tokens: DesignTokens; allTokens: DesignToken[]; + tokenMap: Map; }; }>; ``` @@ -376,7 +383,7 @@ Wrapper around [`exportPlatform`](#exportplatform), returns a bit more data. Returns an object with `platformConfig` and `dictionary` properties: - `platformConfig` a processed version of the user config for the platform -- `dictionary` an object with `tokens` after transformations and reference resolutions, and an `allTokens` property which is a flattened (Array) version of that. +- `dictionary` an object with `tokens` after transformations and reference resolutions, and an `allTokens` property which is a flattened (Array) version of that. There's also a `tokenMap` property which combines best of both worlds, it is a JavaScript Map that's keyed, making it easy to access a single token as well as iterate through them. This is useful if you want to use a Style Dictionary in JS build tools like Webpack. diff --git a/lib/StyleDictionary.js b/lib/StyleDictionary.js index 0a2f68c86..52ed5119e 100644 --- a/lib/StyleDictionary.js +++ b/lib/StyleDictionary.js @@ -21,13 +21,13 @@ import deepExtend from './utils/deepExtend.js'; import resolveObject from './utils/resolveObject.js'; import getName from './utils/references/getName.js'; import GroupMessages, { verbosityInfo } from './utils/groupMessages.js'; -import flattenTokens from './utils/flattenTokens.js'; import { detectDtcgSyntax } from './utils/detectDtcgSyntax.js'; import { preprocess } from './utils/preprocess.js'; import { typeDtcgDelegate } from './utils/typeDtcgDelegate.js'; import createFormatArgs from './utils/createFormatArgs.js'; import { deepmerge } from './utils/deepmerge.js'; import { expandTokens } from './utils/expandObjectTokens.js'; +import { convertTokenData } from './utils/convertTokenData.js'; import { resolve } from './resolve.js'; import { Register } from './Register.js'; @@ -112,8 +112,10 @@ export default class StyleDictionary extends Register { this.options = {}; /** @type {PreprocessedTokens} */ this.tokens = {}; - /** @type {PreprocessedTokens[]} */ + /** @type {Token[]} */ this.allTokens = []; + /** @type {Map} */ + this.tokenMap = new Map(); /** @type {boolean | undefined} */ this.usesDtcg = undefined; /** @type {LogConfig} */ @@ -302,7 +304,8 @@ export default class StyleDictionary extends Register { const result = await combineJSON( this.source, true, - /** @param {Token} prop */ + // TODO: abstract into its own reusable interface, since it is used in deepExtend util as well + /** @param {{ target: Tokens, copy: Tokens, path: string[], key: string }} prop */ function Collision(prop) { GroupMessages.add( PROPERTY_VALUE_COLLISIONS, @@ -361,7 +364,9 @@ export default class StyleDictionary extends Register { preprocessedTokens = expandTokens(preprocessedTokens, this.options); } this.tokens = preprocessedTokens; - this.allTokens = flattenTokens(/** @type {PreprocessedTokens} */ (this.tokens), this.usesDtcg); + this.allTokens = convertTokenData(this.tokens, { output: 'array', usesDtcg: this.usesDtcg }); + this.tokenMap = convertTokenData(this.allTokens, { output: 'map', usesDtcg: this.usesDtcg }); + this.hasInitializedResolve(null); // For chaining @@ -436,21 +441,34 @@ export default class StyleDictionary extends Register { await this.hasInitialized; const platformConfig = this.getPlatformConfig(platform); - let platformProcessedTokens = /** @type {PreprocessedTokens} */ (this.tokens); - - platformProcessedTokens = await preprocess( - platformProcessedTokens, - platformConfig.preprocessors, - this.hooks.preprocessors, - platformConfig, - ); + /** @type {PreprocessedTokens | TransformedTokens} */ + let tokens = this.tokens; + /** @type {Map | Map} */ + let tokenMap = this.tokenMap; + /** @type {Token[] | TransformedTokens[]} */ + let allTokens = /** */ this.allTokens; + + // let tokensChanged = false; + if (platformConfig.preprocessors && platformConfig.preprocessors.length > 0) { + tokens = await preprocess( + tokens, + platformConfig.preprocessors, + this.hooks.preprocessors, + platformConfig, + ); + // tokensChanged = true; + } if (this.shouldRunExpansion(platformConfig.expand)) { - platformProcessedTokens = expandTokens(platformProcessedTokens, this.options, platformConfig); + tokens = expandTokens(tokens, this.options, platformConfig); + // tokensChanged = true; } - let exportableResult = /** @type {PreprocessedTokens|TransformedTokens} */ ( - platformProcessedTokens - ); + // TODO: re-enable below when Map is source of truth for transforming/resolving + + // // re-convert to Map when preprocessors/expand have ran on the tokens object + // if (tokensChanged) { + // tokenMap = convertTokenData(tokens, { output: 'map', usesDtcg: this.usesDtcg }); + // } /** * @type {string[]} @@ -510,8 +528,9 @@ export default class StyleDictionary extends Register { // values like "1px solid {color.border.base}" we want to // transform the original value (color.border.base) before // replacing that value in the string. - const transformed = await transformObject( - exportableResult, + // TODO: use tokenMap instead and refactor to flat transform util, this will be much cheaper/faster + tokens = await transformObject( + tokens, platformConfig, this.options, transformationContext, @@ -524,7 +543,8 @@ export default class StyleDictionary extends Register { const ignorePathsToResolve = deferredPropValueTransforms.map((p) => getName([p, this.usesDtcg ? '$value' : 'value']), ); - exportableResult = resolveObject(transformed, { + // TODO: use tokenMap instead and refactor to flat resolve util, this will be much cheaper/faster + tokens = resolveObject(tokens, { ignorePaths: ignorePathsToResolve, usesDtcg: this.usesDtcg, }); @@ -540,7 +560,8 @@ export default class StyleDictionary extends Register { // if we didn't resolve any deferred references then we have a circular reference // the resolveObject method will find the circular references // we do this in case there are multiple circular references - resolveObject(transformed, { + // TODO: use tokenMap instead and refactor to flat resolve util, this will be much cheaper/faster + resolveObject(tokens, { usesDtcg: this.usesDtcg, }); finished = true; @@ -586,7 +607,17 @@ export default class StyleDictionary extends Register { console.log(chalk.rgb(255, 140, 0).bold(err)); } } - return { tokens: exportableResult, allTokens: flattenTokens(exportableResult, this.usesDtcg) }; + + // TODO: When the transform / resolve have applied to the tokenMap instead of tokens, use the map and convert back to array / tokens obj + allTokens = convertTokenData(tokens, { output: 'array', usesDtcg: this.usesDtcg }); + tokenMap = convertTokenData(allTokens, { output: 'map', usesDtcg: this.usesDtcg }); + // TODO: re-enable below when the Map is the source of truth while transforming/resolving + // tokens = convertTokenData(allTokens, { output: 'object', usesDtcg: this.usesDtcg }); + return { + tokens, + allTokens: /** @type {TransformedToken[]} */ (allTokens), + tokenMap: /** @type {Map} */ (tokenMap), + }; } /** @@ -652,12 +683,13 @@ export default class StyleDictionary extends Register { const filteredTokens = await filterTokens(dictionary, filter, this.options); const filteredDictionary = { - ...dictionary, tokens: filteredTokens.tokens, allTokens: filteredTokens.allTokens, + tokenMap: filteredTokens.tokenMap, // keep the unfiltered tokens object for reference resolution unfilteredTokens: dictionary.tokens, - unfilteredAllTokens: flattenTokens(dictionary.tokens, this.usesDtcg), + unfilteredAllTokens: dictionary.allTokens, + unfilteredTokenMap: dictionary.tokenMap, }; // if tokens object is empty, return without creating a file diff --git a/lib/filterTokens.js b/lib/filterTokens.js index 738254656..d91d77736 100644 --- a/lib/filterTokens.js +++ b/lib/filterTokens.js @@ -11,6 +11,7 @@ * and limitations under the License. */ import isPlainObject from 'is-plain-obj'; +import { convertTokenData } from './utils/convertTokenData.js'; /** * @typedef {import('../types/DesignToken.d.ts').Dictionary} Dictionary @@ -96,10 +97,14 @@ export default async function filterTokens(dictionary, filter, options = {}) { } else { const allTokens = await asyncFilter(dictionary.allTokens ?? [], filter, options); const tokens = await filterTokenObject(dictionary.tokens, filter, options); + const tokenMap = /** @type {Map} */ ( + convertTokenData(allTokens, { output: 'map' }) + ); return { allTokens, tokens, + tokenMap, }; } } diff --git a/lib/fs.js b/lib/fs.js index c03264b60..17ad4d271 100644 --- a/lib/fs.js +++ b/lib/fs.js @@ -1,4 +1,4 @@ -import memfs from '@bundled-es-modules/memfs'; +import { fs as memfs } from '@bundled-es-modules/memfs'; /** * @typedef {import('../types/Volume.d.ts').Volume} Volume diff --git a/lib/utils/convertTokenData.js b/lib/utils/convertTokenData.js new file mode 100644 index 000000000..138dbfec1 --- /dev/null +++ b/lib/utils/convertTokenData.js @@ -0,0 +1,123 @@ +/* + * Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with + * the License. A copy of the License is located at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions + * and limitations under the License. + */ +import flattenTokens from './flattenTokens.js'; + +/** + * @typedef {import('../../types/DesignToken').DesignTokens} DesignTokens + * @typedef {import('../../types/DesignToken').DesignToken} DesignToken + * @typedef {import('../../types/DesignToken').TransformedTokens} TransformedTokens + * @typedef {import('../../types/DesignToken').TransformedToken} TransformedToken + * @typedef {DesignToken|TransformedToken} Token + * @typedef {DesignTokens|TransformedTokens} Tokens + * @typedef {Map} TokenMap + * @typedef {{'map': TokenMap, 'object': Tokens, 'array': Token[]}} TypeMap + */ + +/** + * @template {Token} T + * @param {Array} flattenedTokens + * @returns {Map} + */ +function convertToTokenMap(flattenedTokens) { + return new Map( + flattenedTokens.map((t) => { + return [/** @type {string} */ (t.key), t]; + }), + ); +} + +/** + * @param {Token[]} tokenArray + * @returns + */ +function convertToTokenObject(tokenArray) { + const obj = /** @type {TransformedTokens} */ ({}); + tokenArray.forEach((token) => { + const { key } = token; + const keyArr = /** @type {string} */ (key).replace('{', '').replace('}', '').split('.'); + let slice = obj; + keyArr.forEach((k, i, arr) => { + if (slice[k] === undefined) { + slice[k] = {}; + } + // end + if (i === arr.length - 1) { + slice[k] = token; + } + slice = slice[k]; + }); + }); + return obj; +} + +/** + * Allows converting your tokens to one of the 3 data structures available: + * 'map' -> JavaScript Map + * 'object' -> JavaScript Object + * 'array' -> JavaScript Array + * + * The input format is automatically detected + * + * The return type depends on the "output" prop input, hence the use of a generic / type mapping + * @template {keyof TypeMap} T + * @param {Tokens | Token[] | TokenMap} tokens + * @param {{output: T, usesDtcg?: boolean}} options + * @return {TypeMap[T]} + */ +export function convertTokenData(tokens, options) { + const { usesDtcg, output } = options; + + /** @type {keyof TypeMap} */ + const input = Array.isArray(tokens) ? 'array' : tokens instanceof Map ? 'map' : 'object'; + + switch (output) { + case 'array': { + if (input === 'object') { + // adds "key" prop + return /** @type {TypeMap[T]} */ (flattenTokens(/** @type {Tokens} */ (tokens), usesDtcg)); + } else if (input === 'map') { + // we assume map is always keyed with "key" prop + return /** @type {TypeMap[T]} */ ( + Array.from(/** @type {TokenMap} */ (tokens)).map(([key, value]) => ({ + key, + ...value, + })) + ); + } + break; + } + case 'map': { + if (input === 'object') { + // adds "key" prop + const flattened = flattenTokens(/** @type {Tokens} */ (tokens), usesDtcg); + return /** @type {TypeMap[T]} */ (convertToTokenMap(flattened)); + } else if (input === 'array') { + // we assume that if it's an array, this array was created by flattenTokens which adds the "key" props + return /** @type {TypeMap[T]} */ (convertToTokenMap(/** @type {Token[]} */ (tokens))); + } + break; + } + case 'object': { + if (input === 'map') { + // we assume map is always keyed with "key" prop + const arr = Array.from(/** @type {TokenMap} */ (tokens).values()); + return /** @type {TypeMap[T]} */ (convertToTokenObject(arr)); + } else if (input === 'array') { + // we assume that if it's an array, this array was created by flattenTokens which adds the "key" props + return /** @type {TypeMap[T]} */ (convertToTokenObject(/** @type {Token[]} */ (tokens))); + } + break; + } + } + return /** @type {TypeMap[T]} */ (tokens); +} diff --git a/lib/utils/flattenTokens.js b/lib/utils/flattenTokens.js index 83972707d..8681cd78e 100644 --- a/lib/utils/flattenTokens.js +++ b/lib/utils/flattenTokens.js @@ -14,38 +14,50 @@ import isPlainObject from 'is-plain-obj'; /** - * @typedef {import('../../types/DesignToken.d.ts').TransformedTokens} Tokens - * @typedef {import('../../types/DesignToken.d.ts').TransformedToken} Token + * @typedef {import('../../types/DesignToken.ts').DesignToken} Token + * @typedef {import('../../types/DesignToken.ts').DesignTokens} Tokens + * @typedef {import('../../types/DesignToken.ts').TransformedToken} TransformedToken + * @typedef {import('../../types/DesignToken.ts').TransformedTokens} TransformedTokens */ /** * @private - * @param {Tokens} slice - The plain object you want flattened into an array. + * @template {Token | TransformedToken} T + * @template {Tokens | TransformedTokens} U + * @param {U} slice - The plain object you want flattened into an array. * @param {boolean} [usesDtcg] - Whether or not tokens are using DTCG syntax. - * @param {Token[]} [to_ret] - Tokens array. This function is recursive therefore this is what gets passed along. - * @return {Token[]} + * @param {Array} [result] - Tokens array. This function is recursive therefore this is what gets passed along. + * @param {string[]} [keyMemo] - Memo of keys we're traversing in order of depth + * @return {Array} */ -function _flattenTokens(slice, usesDtcg, to_ret = []) { - for (let name in slice) { - if (Object.hasOwn(slice, name)) { - // TODO: this is a bit fragile and arbitrary to stop when we get to a 'value' property. - if (isPlainObject(slice[name]) && Object.hasOwn(slice[name], `${usesDtcg ? '$' : ''}value`)) { - to_ret.push(/** @type {Token} */ (slice[name])); - } else if (isPlainObject(slice[name])) { - _flattenTokens(slice[name], usesDtcg, to_ret); +function _flattenTokens(slice, usesDtcg, result = [], keyMemo = []) { + for (let key in slice) { + if (Object.hasOwn(slice, key)) { + // Stop either when we encounter a "value" prop or if we find that every prop is not an object, meaning we cannot traverse any further + if (isPlainObject(slice[key]) && Object.hasOwn(slice[key], `${usesDtcg ? '$' : ''}value`)) { + result.push({ + .../** @type {T} */ (slice[key]), + // this keeps track of the ancestor keys of the token e.g. 'colors.red.500' + key: `{${[...keyMemo, key].join('.')}}`, + }); + } else if (isPlainObject(slice[key])) { + // pass the current slice key to the end of the memo onto the next recursive call + _flattenTokens(slice[key], usesDtcg, result, keyMemo.concat(key)); } } } - return to_ret; + return result; } /** * Takes an plain javascript object and will make a flat array of all the leaf nodes. * A leaf node in this context has a 'value' property. Potentially refactor this to * be more generic. - * @param {Tokens} tokens - The plain object you want flattened into an array. + * @template {Token | TransformedToken} T + * @template {Tokens | TransformedTokens} U + * @param {U} tokens - The plain object you want flattened into an array. * @param {boolean} [usesDtcg] - Whether or not tokens are using DTCG syntax. - * @return {Token[]} + * @return {Array} */ export default function flattenTokens(tokens, usesDtcg = false) { return _flattenTokens(tokens, usesDtcg); diff --git a/lib/utils/index.js b/lib/utils/index.js index eec211937..88b60f4e1 100644 --- a/lib/utils/index.js +++ b/lib/utils/index.js @@ -17,6 +17,7 @@ import { resolveReferences } from './references/resolveReferences.js'; import { outputReferencesFilter } from './references/outputReferencesFilter.js'; import { outputReferencesTransformed } from './references/outputReferencesTransformed.js'; import flattenTokens from './flattenTokens.js'; +import { convertTokenData } from './convertTokenData.js'; import { typeDtcgDelegate } from './typeDtcgDelegate.js'; import { convertToDTCG, convertJSONToDTCG, convertZIPToDTCG } from './convertToDTCG.js'; import { stripMeta } from './stripMeta.js'; @@ -28,11 +29,13 @@ export { resolveReferences, outputReferencesFilter, outputReferencesTransformed, + /** @deprecated */ flattenTokens, typeDtcgDelegate, convertToDTCG, convertJSONToDTCG, convertZIPToDTCG, stripMeta, + convertTokenData, }; export * from '../common/formatHelpers/index.js'; diff --git a/package-lock.json b/package-lock.json index e1648f61d..fd7b4fd18 100644 --- a/package-lock.json +++ b/package-lock.json @@ -28,8 +28,8 @@ "style-dictionary": "bin/style-dictionary.js" }, "devDependencies": { - "@astrojs/check": "^0.5.10", - "@astrojs/starlight": "^0.23.1", + "@astrojs/check": "^0.9.4", + "@astrojs/starlight": "^0.29.2", "@babel/plugin-proposal-private-property-in-object": "^7.21.11", "@changesets/cli": "^2.27.1", "@commitlint/cli": "^18.4.3", @@ -41,12 +41,12 @@ "@types/chai": "^4.3.9", "@types/tinycolor2": "^1.4.6", "@types/uuid": "^9.0.8", - "@typescript-eslint/parser": "^8.13.0", + "@typescript-eslint/parser": "^8.16.0", "@web/test-runner": "^0.18.2", "@web/test-runner-commands": "^0.9.0", "@web/test-runner-playwright": "^0.11.0", "acorn": "^8.11.3", - "astro": "^4.3.5", + "astro": "^4.16.16", "chai": "^5.0.0-alpha.2", "eslint": "^9.14.0", "eslint-plugin-mocha": "^10.5.0", @@ -68,9 +68,9 @@ "npm-run-all": "^4.1.5", "sass": "^1.69.5", "sharp": "^0.32.5", - "starlight-links-validator": "^0.12.1", + "starlight-links-validator": "^0.13.3", "stylus": "^0.56.0", - "typescript": "^5.3.3", + "typescript": "^5.7.2", "unist-util-visit": "^5.0.0", "uuid": "^9.0.1", "yaml": "^2.3.4" @@ -116,14 +116,14 @@ } }, "node_modules/@astrojs/check": { - "version": "0.5.10", - "resolved": "https://registry.npmjs.org/@astrojs/check/-/check-0.5.10.tgz", - "integrity": "sha512-vliHXM9cu/viGeKiksUM4mXfO816ohWtawTl2ADPgTsd4nUMjFiyAl7xFZhF34yy4hq4qf7jvK1F2PlR3b5I5w==", + "version": "0.9.4", + "resolved": "https://registry.npmjs.org/@astrojs/check/-/check-0.9.4.tgz", + "integrity": "sha512-IOheHwCtpUfvogHHsvu0AbeRZEnjJg3MopdLddkJE70mULItS/Vh37BHcI00mcOJcH1vhD3odbpvWokpxam7xA==", "dev": true, + "license": "MIT", "dependencies": { - "@astrojs/language-server": "^2.8.4", - "chokidar": "^3.5.3", - "fast-glob": "^3.3.1", + "@astrojs/language-server": "^2.15.0", + "chokidar": "^4.0.1", "kleur": "^4.1.5", "yargs": "^17.7.2" }, @@ -134,6 +134,36 @@ "typescript": "^5.0.0" } }, + "node_modules/@astrojs/check/node_modules/chokidar": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.1.tgz", + "integrity": "sha512-n8enUVCED/KVRQlab1hr3MVpcVMvxtZjmEa956u+4YijlmQED223XMSYj2tLuKvr4jcCTzNNMpQDUer72MMmzA==", + "dev": true, + "license": "MIT", + "dependencies": { + "readdirp": "^4.0.1" + }, + "engines": { + "node": ">= 14.16.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@astrojs/check/node_modules/readdirp": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.0.2.tgz", + "integrity": "sha512-yDMz9g+VaZkqBYS/ozoBJwaBhTbZo3UNYQHNRw1D3UFQB8oHB4uS/tAODO+ZLjGWmUbKnIlOWO+aaIiAxrUWHA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 14.16.0" + }, + "funding": { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + }, "node_modules/@astrojs/compiler": { "version": "2.10.3", "resolved": "https://registry.npmjs.org/@astrojs/compiler/-/compiler-2.10.3.tgz", @@ -147,25 +177,28 @@ "dev": true }, "node_modules/@astrojs/language-server": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/@astrojs/language-server/-/language-server-2.10.0.tgz", - "integrity": "sha512-crHXpqYfA5qWioiuZnZFpTsNItgBlF1f0S9MzDYS7/pfCALkHNJ7K3w9U/j0uMKymsT4hC7BfMaX0DYlfdSzHg==", + "version": "2.15.4", + "resolved": "https://registry.npmjs.org/@astrojs/language-server/-/language-server-2.15.4.tgz", + "integrity": "sha512-JivzASqTPR2bao9BWsSc/woPHH7OGSGc9aMxXL4U6egVTqBycB3ZHdBJPuOCVtcGLrzdWTosAqVPz1BVoxE0+A==", "dev": true, + "license": "MIT", "dependencies": { - "@astrojs/compiler": "^2.7.0", + "@astrojs/compiler": "^2.10.3", + "@astrojs/yaml2ts": "^0.2.2", "@jridgewell/sourcemap-codec": "^1.4.15", - "@volar/kit": "~2.2.3", - "@volar/language-core": "~2.2.3", - "@volar/language-server": "~2.2.3", - "@volar/language-service": "~2.2.3", - "@volar/typescript": "~2.2.3", + "@volar/kit": "~2.4.7", + "@volar/language-core": "~2.4.7", + "@volar/language-server": "~2.4.7", + "@volar/language-service": "~2.4.7", "fast-glob": "^3.2.12", - "volar-service-css": "0.0.45", - "volar-service-emmet": "0.0.45", - "volar-service-html": "0.0.45", - "volar-service-prettier": "0.0.45", - "volar-service-typescript": "0.0.45", - "volar-service-typescript-twoslash-queries": "0.0.45", + "muggle-string": "^0.4.1", + "volar-service-css": "0.0.62", + "volar-service-emmet": "0.0.62", + "volar-service-html": "0.0.62", + "volar-service-prettier": "0.0.62", + "volar-service-typescript": "0.0.62", + "volar-service-typescript-twoslash-queries": "0.0.62", + "volar-service-yaml": "0.0.62", "vscode-html-languageservice": "^5.2.0", "vscode-uri": "^3.0.8" }, @@ -186,52 +219,85 @@ } }, "node_modules/@astrojs/markdown-remark": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/@astrojs/markdown-remark/-/markdown-remark-5.1.1.tgz", - "integrity": "sha512-rkWWjR9jVo0LAMxQ2+T19RKbQUa7NwBGhFj03bAz3hGf3blqeBIXs1NSPpizshO5kZzcOqKe8OlG6XpYO8esHg==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/@astrojs/markdown-remark/-/markdown-remark-5.3.0.tgz", + "integrity": "sha512-r0Ikqr0e6ozPb5bvhup1qdWnSPUvQu6tub4ZLYaKyG50BXZ0ej6FhGz3GpChKpH7kglRFPObJd/bDyf2VM9pkg==", "dev": true, + "license": "MIT", "dependencies": { "@astrojs/prism": "3.1.0", "github-slugger": "^2.0.0", - "hast-util-from-html": "^2.0.1", + "hast-util-from-html": "^2.0.3", "hast-util-to-text": "^4.0.2", "import-meta-resolve": "^4.1.0", "mdast-util-definitions": "^6.0.0", "rehype-raw": "^7.0.0", - "rehype-stringify": "^10.0.0", + "rehype-stringify": "^10.0.1", "remark-gfm": "^4.0.0", "remark-parse": "^11.0.0", - "remark-rehype": "^11.1.0", - "remark-smartypants": "^3.0.1", - "shiki": "^1.9.0", + "remark-rehype": "^11.1.1", + "remark-smartypants": "^3.0.2", + "shiki": "^1.22.0", "unified": "^11.0.5", "unist-util-remove-position": "^5.0.0", "unist-util-visit": "^5.0.0", "unist-util-visit-parents": "^6.0.1", - "vfile": "^6.0.1" + "vfile": "^6.0.3" + } + }, + "node_modules/@astrojs/markdown-remark/node_modules/hast-util-from-html": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/hast-util-from-html/-/hast-util-from-html-2.0.3.tgz", + "integrity": "sha512-CUSRHXyKjzHov8yKsQjGOElXy/3EKpyX56ELnkHH34vDVw1N1XSQ1ZcAvTyAPtGqLTuKP/uxM+aLkSPqF/EtMw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/hast": "^3.0.0", + "devlop": "^1.1.0", + "hast-util-from-parse5": "^8.0.0", + "parse5": "^7.0.0", + "vfile": "^6.0.0", + "vfile-message": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/@astrojs/markdown-remark/node_modules/parse5": { + "version": "7.2.1", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.2.1.tgz", + "integrity": "sha512-BuBYQYlv1ckiPdQi/ohiivi9Sagc9JG+Ozs0r7b/0iK3sKmrb0b9FdWdBbOdx6hBCM/F9Ir82ofnBhtZOjCRPQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "entities": "^4.5.0" + }, + "funding": { + "url": "https://github.com/inikulin/parse5?sponsor=1" } }, "node_modules/@astrojs/mdx": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/@astrojs/mdx/-/mdx-3.1.2.tgz", - "integrity": "sha512-0EizCWhUi0wdYPm31kNOHsOrGmn8pEJy+YEGQlHWt4Flg2NYfV7nWZuYG8KxoRSK/W397vPhyHYrITCYo7JMYw==", + "version": "3.1.9", + "resolved": "https://registry.npmjs.org/@astrojs/mdx/-/mdx-3.1.9.tgz", + "integrity": "sha512-3jPD4Bff6lIA20RQoonnZkRtZ9T3i0HFm6fcDF7BMsKIZ+xBP2KXzQWiuGu62lrVCmU612N+SQVGl5e0fI+zWg==", "dev": true, + "license": "MIT", "dependencies": { - "@astrojs/markdown-remark": "5.1.1", - "@mdx-js/mdx": "^3.0.1", - "acorn": "^8.12.0", + "@astrojs/markdown-remark": "5.3.0", + "@mdx-js/mdx": "^3.1.0", + "acorn": "^8.14.0", "es-module-lexer": "^1.5.4", "estree-util-visit": "^2.0.0", - "github-slugger": "^2.0.0", "gray-matter": "^4.0.3", - "hast-util-to-html": "^9.0.1", + "hast-util-to-html": "^9.0.3", "kleur": "^4.1.5", "rehype-raw": "^7.0.0", "remark-gfm": "^4.0.0", - "remark-smartypants": "^3.0.1", + "remark-smartypants": "^3.0.2", "source-map": "^0.7.4", "unist-util-visit": "^5.0.0", - "vfile": "^6.0.1" + "vfile": "^6.0.3" }, "engines": { "node": "^18.17.1 || ^20.3.0 || >=21.0.0" @@ -264,34 +330,76 @@ } }, "node_modules/@astrojs/starlight": { - "version": "0.23.4", - "resolved": "https://registry.npmjs.org/@astrojs/starlight/-/starlight-0.23.4.tgz", - "integrity": "sha512-EHsjFfnvv+m2bHGJCwFoCLrbW1kfCPnHaPIbqCTMW+NWU8xO/bwtz6MgK6ant5wqjf0DqUkwHY6Esn72kmc9jQ==", + "version": "0.29.2", + "resolved": "https://registry.npmjs.org/@astrojs/starlight/-/starlight-0.29.2.tgz", + "integrity": "sha512-xv9AhWkP3fxCB6EF6MlT4yEbxzye3aMSbuVbFEGbQh8G/w1MPhdNCnQakIHpmIwwyxwG9cW3mQdAZum4oOO39w==", "dev": true, + "license": "MIT", "dependencies": { - "@astrojs/mdx": "^3.0.0", - "@astrojs/sitemap": "^3.0.5", + "@astrojs/mdx": "^3.1.3", + "@astrojs/sitemap": "^3.1.6", "@pagefind/default-ui": "^1.0.3", - "@types/hast": "^3.0.3", - "@types/mdast": "^4.0.3", - "astro-expressive-code": "^0.35.2", + "@types/hast": "^3.0.4", + "@types/mdast": "^4.0.4", + "astro-expressive-code": "^0.38.3", "bcp-47": "^2.1.0", "hast-util-from-html": "^2.0.1", "hast-util-select": "^6.0.2", "hast-util-to-string": "^3.0.0", - "hastscript": "^8.0.0", + "hastscript": "^9.0.0", + "i18next": "^23.11.5", + "js-yaml": "^4.1.0", "mdast-util-directive": "^3.0.0", "mdast-util-to-markdown": "^2.1.0", + "mdast-util-to-string": "^4.0.0", "pagefind": "^1.0.3", "rehype": "^13.0.1", "rehype-format": "^5.0.0", "remark-directive": "^3.0.0", - "unified": "^11.0.4", + "unified": "^11.0.5", "unist-util-visit": "^5.0.0", - "vfile": "^6.0.1" + "vfile": "^6.0.2" }, "peerDependencies": { - "astro": "^4.8.6" + "astro": "^4.14.0" + } + }, + "node_modules/@astrojs/starlight/node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true, + "license": "Python-2.0" + }, + "node_modules/@astrojs/starlight/node_modules/hastscript": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/hastscript/-/hastscript-9.0.0.tgz", + "integrity": "sha512-jzaLBGavEDKHrc5EfFImKN7nZKKBdSLIdGvCwDZ9TfzbF2ffXiov8CKE445L2Z1Ek2t/m4SKQ2j6Ipv7NyUolw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/hast": "^3.0.0", + "comma-separated-tokens": "^2.0.0", + "hast-util-parse-selector": "^4.0.0", + "property-information": "^6.0.0", + "space-separated-tokens": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/@astrojs/starlight/node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" } }, "node_modules/@astrojs/telemetry": { @@ -327,13 +435,25 @@ "node": ">=8" } }, + "node_modules/@astrojs/yaml2ts": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/@astrojs/yaml2ts/-/yaml2ts-0.2.2.tgz", + "integrity": "sha512-GOfvSr5Nqy2z5XiwqTouBBpy5FyI6DEe+/g/Mk5am9SjILN1S5fOEvYK0GuWHg98yS/dobP4m8qyqw/URW35fQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "yaml": "^2.5.0" + } + }, "node_modules/@babel/code-frame": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.25.7.tgz", - "integrity": "sha512-0xZJFNE5XMpENsgfHYTw8FbX4kv53mFLn2i3XPoq69LyhYSCBJtitaHx9QnsVTrsogI4Z3+HtEfZ2/GFPOtf5g==", + "version": "7.26.2", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.26.2.tgz", + "integrity": "sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/highlight": "^7.25.7", + "@babel/helper-validator-identifier": "^7.25.9", + "js-tokens": "^4.0.0", "picocolors": "^1.0.0" }, "engines": { @@ -341,30 +461,32 @@ } }, "node_modules/@babel/compat-data": { - "version": "7.25.8", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.25.8.tgz", - "integrity": "sha512-ZsysZyXY4Tlx+Q53XdnOFmqwfB9QDTHYxaZYajWRoBLuLEAwI2UIbtxOjWh/cFaa9IKUlcB+DDuoskLuKu56JA==", + "version": "7.26.2", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.26.2.tgz", + "integrity": "sha512-Z0WgzSEa+aUcdiJuCIqgujCshpMWgUpgOxXotrYPSA53hA3qopNaqcJpyr0hVb1FeWdnqFA35/fUtXgBK8srQg==", "dev": true, + "license": "MIT", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/core": { - "version": "7.25.8", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.25.8.tgz", - "integrity": "sha512-Oixnb+DzmRT30qu9d3tJSQkxuygWm32DFykT4bRoORPa9hZ/L4KhVB/XiRm6KG+roIEM7DBQlmg27kw2HZkdZg==", + "version": "7.26.0", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.26.0.tgz", + "integrity": "sha512-i1SLeK+DzNnQ3LL/CswPCa/E5u4lh1k6IAEphON8F+cXt0t9euTshDru0q7/IqMa1PMPz5RnHuHscF8/ZJsStg==", "dev": true, + "license": "MIT", "dependencies": { "@ampproject/remapping": "^2.2.0", - "@babel/code-frame": "^7.25.7", - "@babel/generator": "^7.25.7", - "@babel/helper-compilation-targets": "^7.25.7", - "@babel/helper-module-transforms": "^7.25.7", - "@babel/helpers": "^7.25.7", - "@babel/parser": "^7.25.8", - "@babel/template": "^7.25.7", - "@babel/traverse": "^7.25.7", - "@babel/types": "^7.25.8", + "@babel/code-frame": "^7.26.0", + "@babel/generator": "^7.26.0", + "@babel/helper-compilation-targets": "^7.25.9", + "@babel/helper-module-transforms": "^7.26.0", + "@babel/helpers": "^7.26.0", + "@babel/parser": "^7.26.0", + "@babel/template": "^7.25.9", + "@babel/traverse": "^7.25.9", + "@babel/types": "^7.26.0", "convert-source-map": "^2.0.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", @@ -380,12 +502,14 @@ } }, "node_modules/@babel/generator": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.25.7.tgz", - "integrity": "sha512-5Dqpl5fyV9pIAD62yK9P7fcA768uVPUyrQmqpqstHWgMma4feF1x/oFysBCVZLY5wJ2GkMUCdsNDnGZrPoR6rA==", + "version": "7.26.2", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.26.2.tgz", + "integrity": "sha512-zevQbhbau95nkoxSq3f/DC/SC+EEOUZd3DYqfSkMhY2/wfSeaHV1Ew4vk8e+x8lja31IbyuUa2uQ3JONqKbysw==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/types": "^7.25.7", + "@babel/parser": "^7.26.2", + "@babel/types": "^7.26.0", "@jridgewell/gen-mapping": "^0.3.5", "@jridgewell/trace-mapping": "^0.3.25", "jsesc": "^3.0.2" @@ -395,25 +519,27 @@ } }, "node_modules/@babel/helper-annotate-as-pure": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.25.7.tgz", - "integrity": "sha512-4xwU8StnqnlIhhioZf1tqnVWeQ9pvH/ujS8hRfw/WOza+/a+1qv69BWNy+oY231maTCWgKWhfBU7kDpsds6zAA==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.25.9.tgz", + "integrity": "sha512-gv7320KBUFJz1RnylIg5WWYPRXKZ884AGkYpgpWW02TH66Dl+HaC1t1CKd0z3R4b6hdYEcmrNZHUmfCP+1u3/g==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/types": "^7.25.7" + "@babel/types": "^7.25.9" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-compilation-targets": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.25.7.tgz", - "integrity": "sha512-DniTEax0sv6isaw6qSQSfV4gVRNtw2rte8HHM45t9ZR0xILaufBRNkpMifCRiAPyvL4ACD6v0gfCwCmtOQaV4A==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.25.9.tgz", + "integrity": "sha512-j9Db8Suy6yV/VHa4qzrj9yZfZxhLWQdVnRlXxmKLYlhWUVB1sB2G5sxuWYXk/whHD9iW76PmNzxZ4UCnTQTVEQ==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/compat-data": "^7.25.7", - "@babel/helper-validator-option": "^7.25.7", + "@babel/compat-data": "^7.25.9", + "@babel/helper-validator-option": "^7.25.9", "browserslist": "^4.24.0", "lru-cache": "^5.1.1", "semver": "^6.3.1" @@ -484,28 +610,29 @@ } }, "node_modules/@babel/helper-module-imports": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.25.7.tgz", - "integrity": "sha512-o0xCgpNmRohmnoWKQ0Ij8IdddjyBFE4T2kagL/x6M3+4zUgc+4qTOUBoNe4XxDskt1HPKO007ZPiMgLDq2s7Kw==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.25.9.tgz", + "integrity": "sha512-tnUA4RsrmflIM6W6RFTLFSXITtl0wKjgpnLgXyowocVPrbYrLUXSBXDgTs8BlbmIzIdlBySRQjINYs2BAkiLtw==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/traverse": "^7.25.7", - "@babel/types": "^7.25.7" + "@babel/traverse": "^7.25.9", + "@babel/types": "^7.25.9" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-module-transforms": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.25.7.tgz", - "integrity": "sha512-k/6f8dKG3yDz/qCwSM+RKovjMix563SLxQFo0UhRNo239SP6n9u5/eLtKD6EAjwta2JHJ49CsD8pms2HdNiMMQ==", + "version": "7.26.0", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.26.0.tgz", + "integrity": "sha512-xO+xu6B5K2czEnQye6BHA7DolFFmS3LB7stHZFaOLb1pAwO1HWLS8fXA+eh0A2yIvltPVmx3eNNDBJA2SLHXFw==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-module-imports": "^7.25.7", - "@babel/helper-simple-access": "^7.25.7", - "@babel/helper-validator-identifier": "^7.25.7", - "@babel/traverse": "^7.25.7" + "@babel/helper-module-imports": "^7.25.9", + "@babel/helper-validator-identifier": "^7.25.9", + "@babel/traverse": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -527,10 +654,11 @@ } }, "node_modules/@babel/helper-plugin-utils": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.25.7.tgz", - "integrity": "sha512-eaPZai0PiqCi09pPs3pAFfl/zYgGaE6IdXtYvmf0qlcDTd3WCtO7JWCcRd64e0EQrcYgiHibEZnOGsSY4QSgaw==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.25.9.tgz", + "integrity": "sha512-kSMlyUVdWe25rEsRGviIgOWnoT/nfABVWlqt9N19/dIPWViAOW2s9wznP5tURbs/IDuNk4gPy3YdYRgH3uxhBw==", "dev": true, + "license": "MIT", "engines": { "node": ">=6.9.0" } @@ -552,19 +680,6 @@ "@babel/core": "^7.0.0" } }, - "node_modules/@babel/helper-simple-access": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.25.7.tgz", - "integrity": "sha512-FPGAkJmyoChQeM+ruBGIDyrT2tKfZJO8NcxdC+CWNJi7N8/rZpSxK7yvBJ5O/nF1gfu5KzN7VKG3YVSLFfRSxQ==", - "dev": true, - "dependencies": { - "@babel/traverse": "^7.25.7", - "@babel/types": "^7.25.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/@babel/helper-skip-transparent-expression-wrappers": { "version": "7.24.7", "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.24.7.tgz", @@ -591,111 +706,57 @@ } }, "node_modules/@babel/helper-string-parser": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.25.7.tgz", - "integrity": "sha512-CbkjYdsJNHFk8uqpEkpCvRs3YRp9tY6FmFY7wLMSYuGYkrdUi7r2lc4/wqsvlHoMznX3WJ9IP8giGPq68T/Y6g==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.25.9.tgz", + "integrity": "sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA==", "dev": true, + "license": "MIT", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.7.tgz", - "integrity": "sha512-AM6TzwYqGChO45oiuPqwL2t20/HdMC1rTPAesnBCgPCSF1x3oN9MVUwQV2iyz4xqWrctwK5RNC8LV22kaQCNYg==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz", + "integrity": "sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-option": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.25.7.tgz", - "integrity": "sha512-ytbPLsm+GjArDYXJ8Ydr1c/KJuutjF2besPNbIZnZ6MKUxi/uTA22t2ymmA4WFjZFpjiAMO0xuuJPqK2nvDVfQ==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.25.9.tgz", + "integrity": "sha512-e/zv1co8pp55dNdEcCynfj9X7nyUKUXoUEwfXqaZt0omVOmDe9oOTdKStH4GmAw6zxMFs50ZayuMfHDKlO7Tfw==", "dev": true, + "license": "MIT", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helpers": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.25.7.tgz", - "integrity": "sha512-Sv6pASx7Esm38KQpF/U/OXLwPPrdGHNKoeblRxgZRLXnAtnkEe4ptJPDtAZM7fBLadbc1Q07kQpSiGQ0Jg6tRA==", - "dev": true, - "dependencies": { - "@babel/template": "^7.25.7", - "@babel/types": "^7.25.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/highlight": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.25.7.tgz", - "integrity": "sha512-iYyACpW3iW8Fw+ZybQK+drQre+ns/tKpXbNESfrhNnPLIklLbXr7MYJ6gPEd0iETGLOK+SxMjVvKb/ffmk+FEw==", + "version": "7.26.0", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.26.0.tgz", + "integrity": "sha512-tbhNuIxNcVb21pInl3ZSjksLCvgdZy9KwJ8brv993QtIVKJBBkYXz4q4ZbAv31GdnC+R90np23L5FbEBlthAEw==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-validator-identifier": "^7.25.7", - "chalk": "^2.4.2", - "js-tokens": "^4.0.0", - "picocolors": "^1.0.0" + "@babel/template": "^7.25.9", + "@babel/types": "^7.26.0" }, "engines": { "node": ">=6.9.0" } }, - "node_modules/@babel/highlight/node_modules/chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/highlight/node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/@babel/highlight/node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/highlight/node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/@babel/parser": { - "version": "7.25.8", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.25.8.tgz", - "integrity": "sha512-HcttkxzdPucv3nNFmfOOMfFf64KgdJVqm1KaCm25dPGMLElo9nsLvXeJECQg8UzPuBGLyTSA0ZzqCtDSzKTEoQ==", + "version": "7.26.2", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.26.2.tgz", + "integrity": "sha512-DWMCZH9WA4Maitz2q21SRKHo9QXZxkDsbNZoVD62gusNtNBBqDg9i7uOhASfTfIGNzW+O+r7+jAlM8dwphcJKQ==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/types": "^7.25.8" + "@babel/types": "^7.26.0" }, "bin": { "parser": "bin/babel-parser.js" @@ -724,12 +785,13 @@ } }, "node_modules/@babel/plugin-syntax-jsx": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.25.7.tgz", - "integrity": "sha512-ruZOnKO+ajVL/MVx+PwNBPOkrnXTXoWMtte1MBpegfCArhqOe3Bj52avVj1huLLxNKYKXYaSxZ2F+woK1ekXfw==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.25.9.tgz", + "integrity": "sha512-ld6oezHQMZsZfp6pWtbjaNDF2tiiCYYDqQszHt5VV437lewP9aSi2Of99CK0D0XB21k7FLgnLcmQKyKzynfeAA==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.25.7" + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -754,16 +816,17 @@ } }, "node_modules/@babel/plugin-transform-react-jsx": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.25.7.tgz", - "integrity": "sha512-vILAg5nwGlR9EXE8JIOX4NHXd49lrYbN8hnjffDtoULwpL9hUx/N55nqh2qd0q6FyNDfjl9V79ecKGvFbcSA0Q==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.25.9.tgz", + "integrity": "sha512-s5XwpQYCqGerXl+Pu6VDL3x0j2d82eiV77UJ8a2mDHAW7j9SWRqQ2y1fNo1Z74CdcYipl5Z41zvjj4Nfzq36rw==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-annotate-as-pure": "^7.25.7", - "@babel/helper-module-imports": "^7.25.7", - "@babel/helper-plugin-utils": "^7.25.7", - "@babel/plugin-syntax-jsx": "^7.25.7", - "@babel/types": "^7.25.7" + "@babel/helper-annotate-as-pure": "^7.25.9", + "@babel/helper-module-imports": "^7.25.9", + "@babel/helper-plugin-utils": "^7.25.9", + "@babel/plugin-syntax-jsx": "^7.25.9", + "@babel/types": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -785,30 +848,32 @@ } }, "node_modules/@babel/template": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.25.7.tgz", - "integrity": "sha512-wRwtAgI3bAS+JGU2upWNL9lSlDcRCqD05BZ1n3X2ONLH1WilFP6O1otQjeMK/1g0pvYcXC7b/qVUB1keofjtZA==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.25.9.tgz", + "integrity": "sha512-9DGttpmPvIxBb/2uwpVo3dqJ+O6RooAFOS+lB+xDqoE2PVCE8nfoHMdZLpfCQRLwvohzXISPZcgxt80xLfsuwg==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/code-frame": "^7.25.7", - "@babel/parser": "^7.25.7", - "@babel/types": "^7.25.7" + "@babel/code-frame": "^7.25.9", + "@babel/parser": "^7.25.9", + "@babel/types": "^7.25.9" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/traverse": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.25.7.tgz", - "integrity": "sha512-jatJPT1Zjqvh/1FyJs6qAHL+Dzb7sTb+xr7Q+gM1b+1oBsMsQQ4FkVKb6dFlJvLlVssqkRzV05Jzervt9yhnzg==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.25.9.tgz", + "integrity": "sha512-ZCuvfwOwlz/bawvAuvcj8rrithP2/N55Tzz342AkTvq4qaWbGfmCk/tKhNaV2cthijKrPAA8SRJV5WWe7IBMJw==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/code-frame": "^7.25.7", - "@babel/generator": "^7.25.7", - "@babel/parser": "^7.25.7", - "@babel/template": "^7.25.7", - "@babel/types": "^7.25.7", + "@babel/code-frame": "^7.25.9", + "@babel/generator": "^7.25.9", + "@babel/parser": "^7.25.9", + "@babel/template": "^7.25.9", + "@babel/types": "^7.25.9", "debug": "^4.3.1", "globals": "^11.1.0" }, @@ -817,14 +882,14 @@ } }, "node_modules/@babel/types": { - "version": "7.25.8", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.25.8.tgz", - "integrity": "sha512-JWtuCu8VQsMladxVz/P4HzHUGCAwpuqacmowgXFs5XjxIgKuNjnLokQzuVjlTvIzODaDmpjT3oxcC48vyk9EWg==", + "version": "7.26.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.26.0.tgz", + "integrity": "sha512-Z/yiTPj+lDVnF7lWeKCIJzaIkI0vYO87dMpZ4bg4TDrFe4XXLFWL1TbXU27gBP3QccxV9mZICCrnjnYlJjXHOA==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-string-parser": "^7.25.7", - "@babel/helper-validator-identifier": "^7.25.7", - "to-fast-properties": "^2.0.0" + "@babel/helper-string-parser": "^7.25.9", + "@babel/helper-validator-identifier": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -2029,6 +2094,7 @@ "resolved": "https://registry.npmjs.org/@emmetio/abbreviation/-/abbreviation-2.3.3.tgz", "integrity": "sha512-mgv58UrU3rh4YgbE/TzgLQwJ3pFsHHhCLqY20aJq+9comytTXUDNGG/SMtSeMJdkpxgXSXunBGLD8Boka3JyVA==", "dev": true, + "license": "MIT", "dependencies": { "@emmetio/scanner": "^1.0.4" } @@ -2038,6 +2104,7 @@ "resolved": "https://registry.npmjs.org/@emmetio/css-abbreviation/-/css-abbreviation-2.1.8.tgz", "integrity": "sha512-s9yjhJ6saOO/uk1V74eifykk2CBYi01STTK3WlXWGOepyKa23ymJ053+DNQjpFcy1ingpaO7AxCcwLvHFY9tuw==", "dev": true, + "license": "MIT", "dependencies": { "@emmetio/scanner": "^1.0.4" } @@ -2047,6 +2114,7 @@ "resolved": "https://registry.npmjs.org/@emmetio/css-parser/-/css-parser-0.4.0.tgz", "integrity": "sha512-z7wkxRSZgrQHXVzObGkXG+Vmj3uRlpM11oCZ9pbaz0nFejvCDmAiNDpY75+wgXOcffKpj4rzGtwGaZxfJKsJxw==", "dev": true, + "license": "MIT", "dependencies": { "@emmetio/stream-reader": "^2.2.0", "@emmetio/stream-reader-utils": "^0.1.0" @@ -2057,6 +2125,7 @@ "resolved": "https://registry.npmjs.org/@emmetio/html-matcher/-/html-matcher-1.3.0.tgz", "integrity": "sha512-NTbsvppE5eVyBMuyGfVu2CRrLvo7J4YHb6t9sBFLyY03WYhXET37qA4zOYUjBWFCRHO7pS1B9khERtY0f5JXPQ==", "dev": true, + "license": "ISC", "dependencies": { "@emmetio/scanner": "^1.0.0" } @@ -2065,19 +2134,22 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/@emmetio/scanner/-/scanner-1.0.4.tgz", "integrity": "sha512-IqRuJtQff7YHHBk4G8YZ45uB9BaAGcwQeVzgj/zj8/UdOhtQpEIupUhSk8dys6spFIWVZVeK20CzGEnqR5SbqA==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@emmetio/stream-reader": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/@emmetio/stream-reader/-/stream-reader-2.2.0.tgz", "integrity": "sha512-fXVXEyFA5Yv3M3n8sUGT7+fvecGrZP4k6FnWWMSZVQf69kAq0LLpaBQLGcPR30m3zMmKYhECP4k/ZkzvhEW5kw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@emmetio/stream-reader-utils": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/@emmetio/stream-reader-utils/-/stream-reader-utils-0.1.0.tgz", "integrity": "sha512-ZsZ2I9Vzso3Ho/pjZFsmmZ++FWeEd/txqybHTm4OgaZzdS8V9V/YYWQwg5TC38Z7uLWUV1vavpLLbjJtKubR1A==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@emnapi/runtime": { "version": "1.2.0", @@ -2097,6 +2169,7 @@ "ppc64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "aix" @@ -2113,6 +2186,7 @@ "arm" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "android" @@ -2129,6 +2203,7 @@ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "android" @@ -2145,6 +2220,7 @@ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "android" @@ -2161,6 +2237,7 @@ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "darwin" @@ -2177,6 +2254,7 @@ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "darwin" @@ -2193,6 +2271,7 @@ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "freebsd" @@ -2209,6 +2288,7 @@ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "freebsd" @@ -2225,6 +2305,7 @@ "arm" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" @@ -2241,6 +2322,7 @@ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" @@ -2257,6 +2339,7 @@ "ia32" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" @@ -2273,6 +2356,7 @@ "loong64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" @@ -2289,6 +2373,7 @@ "mips64el" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" @@ -2305,6 +2390,7 @@ "ppc64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" @@ -2321,6 +2407,7 @@ "riscv64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" @@ -2337,6 +2424,7 @@ "s390x" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" @@ -2353,6 +2441,7 @@ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" @@ -2369,6 +2458,7 @@ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "netbsd" @@ -2385,6 +2475,7 @@ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "openbsd" @@ -2401,6 +2492,7 @@ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "sunos" @@ -2417,6 +2509,7 @@ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "win32" @@ -2433,6 +2526,7 @@ "ia32" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "win32" @@ -2449,6 +2543,7 @@ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "win32" @@ -2628,10 +2723,11 @@ "dev": true }, "node_modules/@expressive-code/core": { - "version": "0.35.3", - "resolved": "https://registry.npmjs.org/@expressive-code/core/-/core-0.35.3.tgz", - "integrity": "sha512-SYamcarAjufYhbuK/kfvJSvAXLsfnM7DKc78R7Dq4B73R5bKQK2m5zR0l57tXr4yp2C5Z8lu5xZncdwWxcmPdg==", + "version": "0.38.3", + "resolved": "https://registry.npmjs.org/@expressive-code/core/-/core-0.38.3.tgz", + "integrity": "sha512-s0/OtdRpBONwcn23O8nVwDNQqpBGKscysejkeBkwlIeHRLZWgiTVrusT5Idrdz1d8cW5wRk9iGsAIQmwDPXgJg==", "dev": true, + "license": "MIT", "dependencies": { "@ctrl/tinycolor": "^4.0.4", "hast-util-select": "^6.0.2", @@ -2649,6 +2745,7 @@ "resolved": "https://registry.npmjs.org/hastscript/-/hastscript-9.0.0.tgz", "integrity": "sha512-jzaLBGavEDKHrc5EfFImKN7nZKKBdSLIdGvCwDZ9TfzbF2ffXiov8CKE445L2Z1Ek2t/m4SKQ2j6Ipv7NyUolw==", "dev": true, + "license": "MIT", "dependencies": { "@types/hast": "^3.0.0", "comma-separated-tokens": "^2.0.0", @@ -2662,31 +2759,34 @@ } }, "node_modules/@expressive-code/plugin-frames": { - "version": "0.35.3", - "resolved": "https://registry.npmjs.org/@expressive-code/plugin-frames/-/plugin-frames-0.35.3.tgz", - "integrity": "sha512-QYytMq6IsaHgTofQ5b6d+CnbxkqLdikSF2hC+IL/ZZwPYHYZoUlmjIwmJZhY4/hHqJGELrtZsyVdlt06RntgmA==", + "version": "0.38.3", + "resolved": "https://registry.npmjs.org/@expressive-code/plugin-frames/-/plugin-frames-0.38.3.tgz", + "integrity": "sha512-qL2oC6FplmHNQfZ8ZkTR64/wKo9x0c8uP2WDftR/ydwN/yhe1ed7ZWYb8r3dezxsls+tDokCnN4zYR594jbpvg==", "dev": true, + "license": "MIT", "dependencies": { - "@expressive-code/core": "^0.35.3" + "@expressive-code/core": "^0.38.3" } }, "node_modules/@expressive-code/plugin-shiki": { - "version": "0.35.3", - "resolved": "https://registry.npmjs.org/@expressive-code/plugin-shiki/-/plugin-shiki-0.35.3.tgz", - "integrity": "sha512-aFQBPepv0zhVXqJFAvfQ4vXYv/meJKiqmEEKSxdjAfwXllIV49PDlnGEXmbGYjR4hUQQjbfDgzAbrbfePc3YVQ==", + "version": "0.38.3", + "resolved": "https://registry.npmjs.org/@expressive-code/plugin-shiki/-/plugin-shiki-0.38.3.tgz", + "integrity": "sha512-kqHnglZeesqG3UKrb6e9Fq5W36AZ05Y9tCREmSN2lw8LVTqENIeCIkLDdWtQ5VoHlKqwUEQFTVlRehdwoY7Gmw==", "dev": true, + "license": "MIT", "dependencies": { - "@expressive-code/core": "^0.35.3", - "shiki": "^1.1.7" + "@expressive-code/core": "^0.38.3", + "shiki": "^1.22.2" } }, "node_modules/@expressive-code/plugin-text-markers": { - "version": "0.35.3", - "resolved": "https://registry.npmjs.org/@expressive-code/plugin-text-markers/-/plugin-text-markers-0.35.3.tgz", - "integrity": "sha512-gDdnQrfDRXw5Y+PKHJDkpAUdf2pthYOthGcgy3JB8GOTQ3EL1h+755Ct/bGc4MR6jn+dgnQP47uHMWQaccvN6Q==", + "version": "0.38.3", + "resolved": "https://registry.npmjs.org/@expressive-code/plugin-text-markers/-/plugin-text-markers-0.38.3.tgz", + "integrity": "sha512-dPK3+BVGTbTmGQGU3Fkj3jZ3OltWUAlxetMHI6limUGCWBCucZiwoZeFM/WmqQa71GyKRzhBT+iEov6kkz2xVA==", "dev": true, + "license": "MIT", "dependencies": { - "@expressive-code/core": "^0.35.3" + "@expressive-code/core": "^0.38.3" } }, "node_modules/@floating-ui/core": { @@ -3542,10 +3642,11 @@ } }, "node_modules/@mdx-js/mdx": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@mdx-js/mdx/-/mdx-3.0.1.tgz", - "integrity": "sha512-eIQ4QTrOWyL3LWEe/bu6Taqzq2HQvHcyTMaOrI95P2/LmJE7AsfPfgJGuFLPVqBUE1BC1rik3VIhU+s9u72arA==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@mdx-js/mdx/-/mdx-3.1.0.tgz", + "integrity": "sha512-/QxEhPAvGwbQmy1Px8F899L5Uc2KZ6JtXwlCgJmjSTBedwOZkByYcBG4GceIGPXRDsmfxhHazuS+hlOShRLeDw==", "dev": true, + "license": "MIT", "dependencies": { "@types/estree": "^1.0.0", "@types/estree-jsx": "^1.0.0", @@ -3553,14 +3654,15 @@ "@types/mdx": "^2.0.0", "collapse-white-space": "^2.0.0", "devlop": "^1.0.0", - "estree-util-build-jsx": "^3.0.0", "estree-util-is-identifier-name": "^3.0.0", - "estree-util-to-js": "^2.0.0", + "estree-util-scope": "^1.0.0", "estree-walker": "^3.0.0", - "hast-util-to-estree": "^3.0.0", "hast-util-to-jsx-runtime": "^2.0.0", "markdown-extensions": "^2.0.0", - "periscopic": "^3.0.0", + "recma-build-jsx": "^1.0.0", + "recma-jsx": "^1.0.0", + "recma-stringify": "^1.0.0", + "rehype-recma": "^1.0.0", "remark-mdx": "^3.0.0", "remark-parse": "^11.0.0", "remark-rehype": "^11.0.0", @@ -3821,14 +3923,15 @@ } }, "node_modules/@rollup/pluginutils": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.1.2.tgz", - "integrity": "sha512-/FIdS3PyZ39bjZlwqFnWqCOVnW7o963LtKMwQOD0NhQqw22gSr2YY1afu3FxRip4ZCZNsD5jq6Aaz6QV3D/Njw==", + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.1.3.tgz", + "integrity": "sha512-Pnsb6f32CD2W3uCaLZIzDmeFyQ2b8UWMFI7xtwUezpcGBDVDW6y9XgAWIlARiGAo6eNF5FK5aQTr0LFyNyqq5A==", "dev": true, + "license": "MIT", "dependencies": { "@types/estree": "^1.0.0", "estree-walker": "^2.0.2", - "picomatch": "^2.3.1" + "picomatch": "^4.0.2" }, "engines": { "node": ">=14.0.0" @@ -3848,13 +3951,26 @@ "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", "dev": true }, - "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.22.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.22.5.tgz", - "integrity": "sha512-SU5cvamg0Eyu/F+kLeMXS7GoahL+OoizlclVFX3l5Ql6yNlywJJ0OuqTzUx0v+aHhPHEB/56CT06GQrRrGNYww==", - "cpu": [ - "arm" - ], + "node_modules/@rollup/pluginutils/node_modules/picomatch": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz", + "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/@rollup/rollup-android-arm-eabi": { + "version": "4.22.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.22.5.tgz", + "integrity": "sha512-SU5cvamg0Eyu/F+kLeMXS7GoahL+OoizlclVFX3l5Ql6yNlywJJ0OuqTzUx0v+aHhPHEB/56CT06GQrRrGNYww==", + "cpu": [ + "arm" + ], "dev": true, "optional": true, "os": [ @@ -4057,45 +4173,49 @@ ] }, "node_modules/@shikijs/core": { - "version": "1.22.0", - "resolved": "https://registry.npmjs.org/@shikijs/core/-/core-1.22.0.tgz", - "integrity": "sha512-S8sMe4q71TJAW+qG93s5VaiihujRK6rqDFqBnxqvga/3LvqHEnxqBIOPkt//IdXVtHkQWKu4nOQNk0uBGicU7Q==", + "version": "1.24.0", + "resolved": "https://registry.npmjs.org/@shikijs/core/-/core-1.24.0.tgz", + "integrity": "sha512-6pvdH0KoahMzr6689yh0QJ3rCgF4j1XsXRHNEeEN6M4xJTfQ6QPWrmHzIddotg+xPJUPEPzYzYCKzpYyhTI6Gw==", "dev": true, + "license": "MIT", "dependencies": { - "@shikijs/engine-javascript": "1.22.0", - "@shikijs/engine-oniguruma": "1.22.0", - "@shikijs/types": "1.22.0", + "@shikijs/engine-javascript": "1.24.0", + "@shikijs/engine-oniguruma": "1.24.0", + "@shikijs/types": "1.24.0", "@shikijs/vscode-textmate": "^9.3.0", "@types/hast": "^3.0.4", "hast-util-to-html": "^9.0.3" } }, "node_modules/@shikijs/engine-javascript": { - "version": "1.22.0", - "resolved": "https://registry.npmjs.org/@shikijs/engine-javascript/-/engine-javascript-1.22.0.tgz", - "integrity": "sha512-AeEtF4Gcck2dwBqCFUKYfsCq0s+eEbCEbkUuFou53NZ0sTGnJnJ/05KHQFZxpii5HMXbocV9URYVowOP2wH5kw==", + "version": "1.24.0", + "resolved": "https://registry.npmjs.org/@shikijs/engine-javascript/-/engine-javascript-1.24.0.tgz", + "integrity": "sha512-ZA6sCeSsF3Mnlxxr+4wGEJ9Tto4RHmfIS7ox8KIAbH0MTVUkw3roHPHZN+LlJMOHJJOVupe6tvuAzRpN8qK1vA==", "dev": true, + "license": "MIT", "dependencies": { - "@shikijs/types": "1.22.0", + "@shikijs/types": "1.24.0", "@shikijs/vscode-textmate": "^9.3.0", - "oniguruma-to-js": "0.4.3" + "oniguruma-to-es": "0.7.0" } }, "node_modules/@shikijs/engine-oniguruma": { - "version": "1.22.0", - "resolved": "https://registry.npmjs.org/@shikijs/engine-oniguruma/-/engine-oniguruma-1.22.0.tgz", - "integrity": "sha512-5iBVjhu/DYs1HB0BKsRRFipRrD7rqjxlWTj4F2Pf+nQSPqc3kcyqFFeZXnBMzDf0HdqaFVvhDRAGiYNvyLP+Mw==", + "version": "1.24.0", + "resolved": "https://registry.npmjs.org/@shikijs/engine-oniguruma/-/engine-oniguruma-1.24.0.tgz", + "integrity": "sha512-Eua0qNOL73Y82lGA4GF5P+G2+VXX9XnuUxkiUuwcxQPH4wom+tE39kZpBFXfUuwNYxHSkrSxpB1p4kyRW0moSg==", "dev": true, + "license": "MIT", "dependencies": { - "@shikijs/types": "1.22.0", + "@shikijs/types": "1.24.0", "@shikijs/vscode-textmate": "^9.3.0" } }, "node_modules/@shikijs/types": { - "version": "1.22.0", - "resolved": "https://registry.npmjs.org/@shikijs/types/-/types-1.22.0.tgz", - "integrity": "sha512-Fw/Nr7FGFhlQqHfxzZY8Cwtwk5E9nKDUgeLjZgt3UuhcM3yJR9xj3ZGNravZZok8XmEZMiYkSMTPlPkULB8nww==", + "version": "1.24.0", + "resolved": "https://registry.npmjs.org/@shikijs/types/-/types-1.24.0.tgz", + "integrity": "sha512-aptbEuq1Pk88DMlCe+FzXNnBZ17LCiLIGWAeCWhoFDzia5Q5Krx3DgnULLiouSdd6+LUM39XwXGppqYE0Ghtug==", "dev": true, + "license": "MIT", "dependencies": { "@shikijs/vscode-textmate": "^9.3.0", "@types/hast": "^3.0.4" @@ -4105,7 +4225,8 @@ "version": "9.3.0", "resolved": "https://registry.npmjs.org/@shikijs/vscode-textmate/-/vscode-textmate-9.3.0.tgz", "integrity": "sha512-jn7/7ky30idSkd/O5yDBfAnVt+JJpepofP/POZ1iMOxK59cOfqIgg/Dj0eFsjOTMw+4ycJN0uhZH/Eb0bs/EUA==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@shoelace-style/animations": { "version": "1.1.0", @@ -4166,6 +4287,7 @@ "resolved": "https://registry.npmjs.org/@types/acorn/-/acorn-4.0.6.tgz", "integrity": "sha512-veQTnWP+1D/xbxVrPC3zHnCZRjSrKfhbMUlEA43iMZLu7EsnTtkJklIuwrCPbOi8YkvDQAiW05VQQFvvz9oieQ==", "dev": true, + "license": "MIT", "dependencies": { "@types/estree": "*" } @@ -4335,6 +4457,7 @@ "resolved": "https://registry.npmjs.org/@types/estree-jsx/-/estree-jsx-1.0.5.tgz", "integrity": "sha512-52CcUVNFyfb1A2ALocQw/Dd1BQFNmSdkuC3BkZ6iqhdMfQz7JWOFRuJFloOzjk+6WijU56m9oKXFAXc7o3Towg==", "dev": true, + "license": "MIT", "dependencies": { "@types/estree": "*" } @@ -4481,7 +4604,8 @@ "version": "2.0.13", "resolved": "https://registry.npmjs.org/@types/mdx/-/mdx-2.0.13.tgz", "integrity": "sha512-+OWZQfAYyio6YkJb3HLxDrvnx6SWWDbC0zVPfBRzUk0/nqoDyf6dNxQi3eArPe8rJ473nobTMQ/8Zk+LxJ+Yuw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@types/mime": { "version": "1.3.5", @@ -4653,16 +4777,16 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "8.13.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.13.0.tgz", - "integrity": "sha512-w0xp+xGg8u/nONcGw1UXAr6cjCPU1w0XVyBs6Zqaj5eLmxkKQAByTdV/uGgNN5tVvN/kKpoQlP2cL7R+ajZZIQ==", + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.16.0.tgz", + "integrity": "sha512-D7DbgGFtsqIPIFMPJwCad9Gfi/hC0PWErRRHFnaCWoEDYi5tQUDiJCTmGUbBiLzjqAck4KcXt9Ayj0CNlIrF+w==", "dev": true, "license": "BSD-2-Clause", "dependencies": { - "@typescript-eslint/scope-manager": "8.13.0", - "@typescript-eslint/types": "8.13.0", - "@typescript-eslint/typescript-estree": "8.13.0", - "@typescript-eslint/visitor-keys": "8.13.0", + "@typescript-eslint/scope-manager": "8.16.0", + "@typescript-eslint/types": "8.16.0", + "@typescript-eslint/typescript-estree": "8.16.0", + "@typescript-eslint/visitor-keys": "8.16.0", "debug": "^4.3.4" }, "engines": { @@ -4682,14 +4806,14 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "8.13.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.13.0.tgz", - "integrity": "sha512-XsGWww0odcUT0gJoBZ1DeulY1+jkaHUciUq4jKNv4cpInbvvrtDoyBH9rE/n2V29wQJPk8iCH1wipra9BhmiMA==", + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.16.0.tgz", + "integrity": "sha512-mwsZWubQvBki2t5565uxF0EYvG+FwdFb8bMtDuGQLdCCnGPrDEDvm1gtfynuKlnpzeBRqdFCkMf9jg1fnAK8sg==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.13.0", - "@typescript-eslint/visitor-keys": "8.13.0" + "@typescript-eslint/types": "8.16.0", + "@typescript-eslint/visitor-keys": "8.16.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -4700,9 +4824,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "8.13.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.13.0.tgz", - "integrity": "sha512-4cyFErJetFLckcThRUFdReWJjVsPCqyBlJTi6IDEpc1GWCIIZRFxVppjWLIMcQhNGhdWJJRYFHpHoDWvMlDzng==", + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.16.0.tgz", + "integrity": "sha512-NzrHj6thBAOSE4d9bsuRNMvk+BvaQvmY4dDglgkgGC0EW/tB3Kelnp3tAKH87GEwzoxgeQn9fNGRyFJM/xd+GQ==", "dev": true, "license": "MIT", "engines": { @@ -4714,14 +4838,14 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "8.13.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.13.0.tgz", - "integrity": "sha512-v7SCIGmVsRK2Cy/LTLGN22uea6SaUIlpBcO/gnMGT/7zPtxp90bphcGf4fyrCQl3ZtiBKqVTG32hb668oIYy1g==", + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.16.0.tgz", + "integrity": "sha512-E2+9IzzXMc1iaBy9zmo+UYvluE3TW7bCGWSF41hVWUE01o8nzr1rvOQYSxelxr6StUvRcTMe633eY8mXASMaNw==", "dev": true, "license": "BSD-2-Clause", "dependencies": { - "@typescript-eslint/types": "8.13.0", - "@typescript-eslint/visitor-keys": "8.13.0", + "@typescript-eslint/types": "8.16.0", + "@typescript-eslint/visitor-keys": "8.16.0", "debug": "^4.3.4", "fast-glob": "^3.3.2", "is-glob": "^4.0.3", @@ -4782,14 +4906,14 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "8.13.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.13.0.tgz", - "integrity": "sha512-7N/+lztJqH4Mrf0lb10R/CbI1EaAMMGyF5y0oJvFoAhafwgiRA7TXyd8TFn8FC8k5y2dTsYogg238qavRGNnlw==", + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.16.0.tgz", + "integrity": "sha512-pq19gbaMOmFE3CbL0ZB8J8BFCo2ckfHBfaIsaOZgBIF4EoISJIdLX5xRhd0FGB0LlHReNRuzoJoMGpTjq8F2CQ==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.13.0", - "eslint-visitor-keys": "^3.4.3" + "@typescript-eslint/types": "8.16.0", + "eslint-visitor-keys": "^4.2.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -4799,6 +4923,19 @@ "url": "https://opencollective.com/typescript-eslint" } }, + "node_modules/@typescript-eslint/visitor-keys/node_modules/eslint-visitor-keys": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz", + "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, "node_modules/@ungap/structured-clone": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", @@ -4806,13 +4943,14 @@ "dev": true }, "node_modules/@volar/kit": { - "version": "2.2.5", - "resolved": "https://registry.npmjs.org/@volar/kit/-/kit-2.2.5.tgz", - "integrity": "sha512-Bmn0UCaT43xUGGRwcmFG9lKhiCCLjRT4ScSLLPn5C9ltUcSGnIFFDlbZZa1PreHYHq25/4zkXt9Ap32klAh17w==", + "version": "2.4.10", + "resolved": "https://registry.npmjs.org/@volar/kit/-/kit-2.4.10.tgz", + "integrity": "sha512-ul+rLeO9RlFDgkY/FhPWMnpFqAsjvjkKz8VZeOY5YCJMwTblmmSBlNJtFNxSBx9t/k1q80nEthLyxiJ50ZbIAg==", "dev": true, + "license": "MIT", "dependencies": { - "@volar/language-service": "2.2.5", - "@volar/typescript": "2.2.5", + "@volar/language-service": "2.4.10", + "@volar/typescript": "2.4.10", "typesafe-path": "^0.2.2", "vscode-languageserver-textdocument": "^1.0.11", "vscode-uri": "^3.0.8" @@ -4822,25 +4960,25 @@ } }, "node_modules/@volar/language-core": { - "version": "2.2.5", - "resolved": "https://registry.npmjs.org/@volar/language-core/-/language-core-2.2.5.tgz", - "integrity": "sha512-2htyAuxRrAgETmFeUhT4XLELk3LiEcqoW/B8YUXMF6BrGWLMwIR09MFaZYvrA2UhbdAeSyeQ726HaWSWkexUcQ==", + "version": "2.4.10", + "resolved": "https://registry.npmjs.org/@volar/language-core/-/language-core-2.4.10.tgz", + "integrity": "sha512-hG3Z13+nJmGaT+fnQzAkS0hjJRa2FCeqZt6Bd+oGNhUkQ+mTFsDETg5rqUTxyzIh5pSOGY7FHCWUS8G82AzLCA==", "dev": true, + "license": "MIT", "dependencies": { - "@volar/source-map": "2.2.5" + "@volar/source-map": "2.4.10" } }, "node_modules/@volar/language-server": { - "version": "2.2.5", - "resolved": "https://registry.npmjs.org/@volar/language-server/-/language-server-2.2.5.tgz", - "integrity": "sha512-PV/jkUkI+m72HTXwnY7hsGqLY3VNi96ZRoWFRzVC9QG/853bixxjveXPJIiydMJ9I739lO3kcj3hnGrF5Sm+HA==", + "version": "2.4.10", + "resolved": "https://registry.npmjs.org/@volar/language-server/-/language-server-2.4.10.tgz", + "integrity": "sha512-odQsgrJh8hOXfxkSj/BSnpjThb2/KDhbxZnG/XAEx6E3QGDQv4hAOz9GWuKoNs0tkjgwphQGIwDMT1JYaTgRJw==", "dev": true, + "license": "MIT", "dependencies": { - "@volar/language-core": "2.2.5", - "@volar/language-service": "2.2.5", - "@volar/snapshot-document": "2.2.5", - "@volar/typescript": "2.2.5", - "@vscode/l10n": "^0.0.16", + "@volar/language-core": "2.4.10", + "@volar/language-service": "2.4.10", + "@volar/typescript": "2.4.10", "path-browserify": "^1.0.1", "request-light": "^0.7.0", "vscode-languageserver": "^9.0.1", @@ -4850,70 +4988,57 @@ } }, "node_modules/@volar/language-service": { - "version": "2.2.5", - "resolved": "https://registry.npmjs.org/@volar/language-service/-/language-service-2.2.5.tgz", - "integrity": "sha512-a97e/0uCe+uSu23F4zvgvldqJtZe6jugQeEHWjTfhgOEO8+Be0t5CZNNVItQqmPyAsD8eElg0S/cP6uxvCmCSQ==", + "version": "2.4.10", + "resolved": "https://registry.npmjs.org/@volar/language-service/-/language-service-2.4.10.tgz", + "integrity": "sha512-VxUiWS11rnRzakkqw5x1LPhsz+RBfD0CrrFarLGW2/voliYXEdCuSOM3r8JyNRvMvP4uwhD38ccAdTcULQEAIQ==", "dev": true, + "license": "MIT", "dependencies": { - "@volar/language-core": "2.2.5", + "@volar/language-core": "2.4.10", "vscode-languageserver-protocol": "^3.17.5", "vscode-languageserver-textdocument": "^1.0.11", "vscode-uri": "^3.0.8" } }, - "node_modules/@volar/snapshot-document": { - "version": "2.2.5", - "resolved": "https://registry.npmjs.org/@volar/snapshot-document/-/snapshot-document-2.2.5.tgz", - "integrity": "sha512-MTOvWVKxM7ugKO3Amffkv2pND03fe2JtfygYaputqjVFML7YxtTXj8SPnI2pODLeSwOKzDYL6Q8r5j6Y5AgUzQ==", - "dev": true, - "dependencies": { - "vscode-languageserver-protocol": "^3.17.5", - "vscode-languageserver-textdocument": "^1.0.11" - } - }, "node_modules/@volar/source-map": { - "version": "2.2.5", - "resolved": "https://registry.npmjs.org/@volar/source-map/-/source-map-2.2.5.tgz", - "integrity": "sha512-wrOEIiZNf4E+PWB0AxyM4tfhkfldPsb3bxg8N6FHrxJH2ohar7aGu48e98bp3pR9HUA7P/pR9VrLmkTrgCCnWQ==", + "version": "2.4.10", + "resolved": "https://registry.npmjs.org/@volar/source-map/-/source-map-2.4.10.tgz", + "integrity": "sha512-OCV+b5ihV0RF3A7vEvNyHPi4G4kFa6ukPmyVocmqm5QzOd8r5yAtiNvaPEjl8dNvgC/lj4JPryeeHLdXd62rWA==", "dev": true, - "dependencies": { - "muggle-string": "^0.4.0" - } + "license": "MIT" }, "node_modules/@volar/typescript": { - "version": "2.2.5", - "resolved": "https://registry.npmjs.org/@volar/typescript/-/typescript-2.2.5.tgz", - "integrity": "sha512-eSV/n75+ppfEVugMC/salZsI44nXDPAyL6+iTYCNLtiLHGJsnMv9GwiDMujrvAUj/aLQyqRJgYtXRoxop2clCw==", + "version": "2.4.10", + "resolved": "https://registry.npmjs.org/@volar/typescript/-/typescript-2.4.10.tgz", + "integrity": "sha512-F8ZtBMhSXyYKuBfGpYwqA5rsONnOwAVvjyE7KPYJ7wgZqo2roASqNWUnianOomJX5u1cxeRooHV59N0PhvEOgw==", "dev": true, + "license": "MIT", "dependencies": { - "@volar/language-core": "2.2.5", - "path-browserify": "^1.0.1" + "@volar/language-core": "2.4.10", + "path-browserify": "^1.0.1", + "vscode-uri": "^3.0.8" } }, "node_modules/@vscode/emmet-helper": { - "version": "2.9.3", - "resolved": "https://registry.npmjs.org/@vscode/emmet-helper/-/emmet-helper-2.9.3.tgz", - "integrity": "sha512-rB39LHWWPQYYlYfpv9qCoZOVioPCftKXXqrsyqN1mTWZM6dTnONT63Db+03vgrBbHzJN45IrgS/AGxw9iiqfEw==", + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/@vscode/emmet-helper/-/emmet-helper-2.11.0.tgz", + "integrity": "sha512-QLxjQR3imPZPQltfbWRnHU6JecWTF1QSWhx3GAKQpslx7y3Dp6sIIXhKjiUJ/BR9FX8PVthjr9PD6pNwOJfAzw==", "dev": true, + "license": "MIT", "dependencies": { "emmet": "^2.4.3", "jsonc-parser": "^2.3.0", "vscode-languageserver-textdocument": "^1.0.1", "vscode-languageserver-types": "^3.15.1", - "vscode-uri": "^2.1.2" + "vscode-uri": "^3.0.8" } }, - "node_modules/@vscode/emmet-helper/node_modules/vscode-uri": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/vscode-uri/-/vscode-uri-2.1.2.tgz", - "integrity": "sha512-8TEXQxlldWAuIODdukIb+TR5s+9Ds40eSJrw+1iDDA9IFORPjMELarNQE3myz5XIkWWpdprmJjm1/SxMlWOC8A==", - "dev": true - }, "node_modules/@vscode/l10n": { - "version": "0.0.16", - "resolved": "https://registry.npmjs.org/@vscode/l10n/-/l10n-0.0.16.tgz", - "integrity": "sha512-JT5CvrIYYCrmB+dCana8sUqJEcGB1ZDXNLMQ2+42bW995WmNoenijWMUdZfwmuQUTQcEVVIa2OecZzTYWUW9Cg==", - "dev": true + "version": "0.0.18", + "resolved": "https://registry.npmjs.org/@vscode/l10n/-/l10n-0.0.18.tgz", + "integrity": "sha512-KYSIHVmslkaCDyw013pphY+d7x1qV8IZupYfeIfzNA+nsaWHbn5uPuQRvdRFsa9zFzGeudPuoGoZ1Op4jrJXIQ==", + "dev": true, + "license": "MIT" }, "node_modules/@web/browser-logs": { "version": "0.4.0", @@ -5660,36 +5785,38 @@ } }, "node_modules/astring": { - "version": "1.8.6", - "resolved": "https://registry.npmjs.org/astring/-/astring-1.8.6.tgz", - "integrity": "sha512-ISvCdHdlTDlH5IpxQJIex7BWBywFWgjJSVdwst+/iQCoEYnyOaQ95+X1JGshuBjGp6nxKUy1jMgE3zPqN7fQdg==", + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/astring/-/astring-1.9.0.tgz", + "integrity": "sha512-LElXdjswlqjWrPpJFg1Fx4wpkOCxj1TDHlSV4PlaRxHGWko024xICaa97ZkMfs6DRKlCguiAI+rbXv5GWwXIkg==", "dev": true, + "license": "MIT", "bin": { "astring": "bin/astring" } }, "node_modules/astro": { - "version": "4.16.3", - "resolved": "https://registry.npmjs.org/astro/-/astro-4.16.3.tgz", - "integrity": "sha512-0IrnbCUprAyfeZ8Au/d/d0ssrYGMAZOZ1K3fX7GxI0OwUhkA9bSex0+ywiyVNiVZE5uRlTKRSkvLNKYQWdtHqw==", + "version": "4.16.16", + "resolved": "https://registry.npmjs.org/astro/-/astro-4.16.16.tgz", + "integrity": "sha512-H1CttrV6+JFrDBQx0Mcbq5i5AeLhCbztB786+9wEu3svWL/QPNeCGqF0dgNORAYmP+rODGCPu/y9qKSh87iLuA==", "dev": true, + "license": "MIT", "dependencies": { "@astrojs/compiler": "^2.10.3", "@astrojs/internal-helpers": "0.4.1", "@astrojs/markdown-remark": "5.3.0", "@astrojs/telemetry": "3.1.0", - "@babel/core": "^7.25.7", - "@babel/plugin-transform-react-jsx": "^7.25.7", - "@babel/types": "^7.25.7", + "@babel/core": "^7.26.0", + "@babel/plugin-transform-react-jsx": "^7.25.9", + "@babel/types": "^7.26.0", "@oslojs/encoding": "^1.1.0", - "@rollup/pluginutils": "^5.1.2", + "@rollup/pluginutils": "^5.1.3", "@types/babel__core": "^7.20.5", "@types/cookie": "^0.6.0", - "acorn": "^8.12.1", + "acorn": "^8.14.0", "aria-query": "^5.3.2", "axobject-query": "^4.1.0", "boxen": "8.0.1", - "ci-info": "^4.0.0", + "ci-info": "^4.1.0", "clsx": "^2.1.1", "common-ancestor-path": "^1.0.1", "cookie": "^0.7.2", @@ -5711,30 +5838,30 @@ "http-cache-semantics": "^4.1.1", "js-yaml": "^4.1.0", "kleur": "^4.1.5", - "magic-string": "^0.30.11", + "magic-string": "^0.30.14", "magicast": "^0.3.5", "micromatch": "^4.0.8", "mrmime": "^2.0.0", "neotraverse": "^0.6.18", - "ora": "^8.1.0", + "ora": "^8.1.1", "p-limit": "^6.1.0", "p-queue": "^8.0.1", "preferred-pm": "^4.0.0", "prompts": "^2.4.2", "rehype": "^13.0.2", "semver": "^7.6.3", - "shiki": "^1.22.0", - "tinyexec": "^0.3.0", - "tsconfck": "^3.1.3", + "shiki": "^1.23.1", + "tinyexec": "^0.3.1", + "tsconfck": "^3.1.4", "unist-util-visit": "^5.0.0", "vfile": "^6.0.3", - "vite": "^5.4.8", - "vitefu": "^1.0.2", + "vite": "^5.4.11", + "vitefu": "^1.0.4", "which-pm": "^3.0.0", - "xxhash-wasm": "^1.0.2", + "xxhash-wasm": "^1.1.0", "yargs-parser": "^21.1.1", "zod": "^3.23.8", - "zod-to-json-schema": "^3.23.3", + "zod-to-json-schema": "^3.23.5", "zod-to-ts": "^1.2.0" }, "bin": { @@ -5750,41 +5877,16 @@ } }, "node_modules/astro-expressive-code": { - "version": "0.35.3", - "resolved": "https://registry.npmjs.org/astro-expressive-code/-/astro-expressive-code-0.35.3.tgz", - "integrity": "sha512-f1L1m3J3EzZHDEox6TXmuKo5fTSbaNxE/HU0S0UQmvlCowtOKnU/LOsoDwsbQSYGKz+fdLRPsCjFMiKqEoyfcw==", + "version": "0.38.3", + "resolved": "https://registry.npmjs.org/astro-expressive-code/-/astro-expressive-code-0.38.3.tgz", + "integrity": "sha512-Tvdc7RV0G92BbtyEOsfJtXU35w41CkM94fOAzxbQP67Wj5jArfserJ321FO4XA7WG9QMV0GIBmQq77NBIRDzpQ==", "dev": true, + "license": "MIT", "dependencies": { - "rehype-expressive-code": "^0.35.3" + "rehype-expressive-code": "^0.38.3" }, "peerDependencies": { - "astro": "^4.0.0-beta || ^3.3.0" - } - }, - "node_modules/astro/node_modules/@astrojs/markdown-remark": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/@astrojs/markdown-remark/-/markdown-remark-5.3.0.tgz", - "integrity": "sha512-r0Ikqr0e6ozPb5bvhup1qdWnSPUvQu6tub4ZLYaKyG50BXZ0ej6FhGz3GpChKpH7kglRFPObJd/bDyf2VM9pkg==", - "dev": true, - "dependencies": { - "@astrojs/prism": "3.1.0", - "github-slugger": "^2.0.0", - "hast-util-from-html": "^2.0.3", - "hast-util-to-text": "^4.0.2", - "import-meta-resolve": "^4.1.0", - "mdast-util-definitions": "^6.0.0", - "rehype-raw": "^7.0.0", - "rehype-stringify": "^10.0.1", - "remark-gfm": "^4.0.0", - "remark-parse": "^11.0.0", - "remark-rehype": "^11.1.1", - "remark-smartypants": "^3.0.2", - "shiki": "^1.22.0", - "unified": "^11.0.5", - "unist-util-remove-position": "^5.0.0", - "unist-util-visit": "^5.0.0", - "unist-util-visit-parents": "^6.0.1", - "vfile": "^6.0.3" + "astro": "^4.0.0-beta || ^5.0.0-beta || ^3.3.0" } }, "node_modules/astro/node_modules/argparse": { @@ -5794,9 +5896,9 @@ "dev": true }, "node_modules/astro/node_modules/ci-info": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-4.0.0.tgz", - "integrity": "sha512-TdHqgGf9odd8SXNuxtUBVx8Nv+qZOejE6qyqiy5NtbYYQOeFa6zmHkxlPzmaLxWWHsU6nJmB7AETdVPi+2NBUg==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-4.1.0.tgz", + "integrity": "sha512-HutrvTNsF48wnxkzERIXOe5/mlcfFcbfCmwcg6CJnizbSue78AbDt+1cgl26zwn61WFxhcPykPfZrbqjGmBb4A==", "dev": true, "funding": [ { @@ -5804,28 +5906,11 @@ "url": "https://github.com/sponsors/sibiraj-s" } ], + "license": "MIT", "engines": { "node": ">=8" } }, - "node_modules/astro/node_modules/hast-util-from-html": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/hast-util-from-html/-/hast-util-from-html-2.0.3.tgz", - "integrity": "sha512-CUSRHXyKjzHov8yKsQjGOElXy/3EKpyX56ELnkHH34vDVw1N1XSQ1ZcAvTyAPtGqLTuKP/uxM+aLkSPqF/EtMw==", - "dev": true, - "dependencies": { - "@types/hast": "^3.0.0", - "devlop": "^1.1.0", - "hast-util-from-parse5": "^8.0.0", - "parse5": "^7.0.0", - "vfile": "^6.0.0", - "vfile-message": "^4.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, "node_modules/astro/node_modules/js-yaml": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", @@ -5853,18 +5938,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/astro/node_modules/parse5": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.2.0.tgz", - "integrity": "sha512-ZkDsAOcxsUMZ4Lz5fVciOehNcJ+Gb8gTzcA4yl3wnc273BAybYWrQ+Ks/OjCjSEpjvQkDSeZbybK9qj2VHHdGA==", - "dev": true, - "dependencies": { - "entities": "^4.5.0" - }, - "funding": { - "url": "https://github.com/inikulin/parse5?sponsor=1" - } - }, "node_modules/astro/node_modules/preferred-pm": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/preferred-pm/-/preferred-pm-4.0.0.tgz", @@ -6114,6 +6187,7 @@ "resolved": "https://registry.npmjs.org/bcp-47-match/-/bcp-47-match-2.0.3.tgz", "integrity": "sha512-JtTezzbAibu8G0R9op9zb3vcWZd9JF6M0xOYGPn0fNCd7wOpRB1mU2mH9T8gaBGbAAyIIVgB2G7xG0GP98zMAQ==", "dev": true, + "license": "MIT", "funding": { "type": "github", "url": "https://github.com/sponsors/wooorm" @@ -6188,7 +6262,8 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", "integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/boxen": { "version": "8.0.1", @@ -6280,9 +6355,9 @@ "dev": true }, "node_modules/browserslist": { - "version": "4.24.0", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.0.tgz", - "integrity": "sha512-Rmb62sR1Zpjql25eSanFGEhAxcFwfA1K0GuQcLoaJBAcENegrQut3hYdhXFF1obQfiDyqIW/cLM5HSJ/9k884A==", + "version": "4.24.2", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.2.tgz", + "integrity": "sha512-ZIc+Q62revdMcqC6aChtW4jz3My3klmCO1fEmINZY/8J3EpBg5/A/D0AKmBveUh6pgoeycoMkVMko84tuYS+Gg==", "dev": true, "funding": [ { @@ -6298,11 +6373,12 @@ "url": "https://github.com/sponsors/ai" } ], + "license": "MIT", "dependencies": { - "caniuse-lite": "^1.0.30001663", - "electron-to-chromium": "^1.5.28", + "caniuse-lite": "^1.0.30001669", + "electron-to-chromium": "^1.5.41", "node-releases": "^2.0.18", - "update-browserslist-db": "^1.1.0" + "update-browserslist-db": "^1.1.1" }, "bin": { "browserslist": "cli.js" @@ -6466,9 +6542,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001668", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001668.tgz", - "integrity": "sha512-nWLrdxqCdblixUO+27JtGJJE/txpJlyUy5YN1u53wLZkP0emYCo5zgS6QYft7VUYR42LGgi/S5hdLZTrnyIddw==", + "version": "1.0.30001684", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001684.tgz", + "integrity": "sha512-G1LRwLIQjBQoyq0ZJGqGIJUXzJ8irpbjHLpVRXDvBEScFJ9b17sgK6vlx0GAJFE21okD7zXl08rRRUfq6HdoEQ==", "dev": true, "funding": [ { @@ -6483,7 +6559,8 @@ "type": "github", "url": "https://github.com/sponsors/ai" } - ] + ], + "license": "CC-BY-4.0" }, "node_modules/catharsis": { "version": "0.9.0", @@ -6799,6 +6876,7 @@ "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.9.2.tgz", "integrity": "sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" }, @@ -7002,6 +7080,7 @@ "resolved": "https://registry.npmjs.org/collapse-white-space/-/collapse-white-space-2.1.0.tgz", "integrity": "sha512-loKTxY1zCOuG4j9f6EPnuyyYkf58RnhhWTvRoZEokgB+WbdXehfjFviyOVYkqzEWz1Q5kRiZdBYS5SwxbQYwzw==", "dev": true, + "license": "MIT", "funding": { "type": "github", "url": "https://github.com/sponsors/wooorm" @@ -7511,7 +7590,8 @@ "type": "patreon", "url": "https://patreon.com/mdevils" } - ] + ], + "license": "MIT" }, "node_modules/css/node_modules/source-map": { "version": "0.6.1", @@ -8459,6 +8539,7 @@ "resolved": "https://registry.npmjs.org/direction/-/direction-2.0.1.tgz", "integrity": "sha512-9S6m9Sukh1cZNknO1CWAr2QAWsbKLafQiyM5gZ7VgXHeuaoUwffKN4q6NC4A/Mf9iiPlOXQEKW/Mv/mh9/3YFA==", "dev": true, + "license": "MIT", "bin": { "direction": "cli.js" }, @@ -8557,10 +8638,11 @@ "dev": true }, "node_modules/electron-to-chromium": { - "version": "1.5.36", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.36.tgz", - "integrity": "sha512-HYTX8tKge/VNp6FGO+f/uVDmUkq+cEfcxYhKf15Akc4M5yxt5YmorwlAitKWjWhWQnKcDRBAQKXkhqqXMqcrjw==", - "dev": true + "version": "1.5.67", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.67.tgz", + "integrity": "sha512-nz88NNBsD7kQSAGGJyp8hS6xSPtWwqNogA0mjtc2nUYeEf3nURK9qpV18TuBdDmEDgVWotS8Wkzf+V52dSQ/LQ==", + "dev": true, + "license": "ISC" }, "node_modules/elkjs": { "version": "0.9.3", @@ -8569,10 +8651,11 @@ "dev": true }, "node_modules/emmet": { - "version": "2.4.7", - "resolved": "https://registry.npmjs.org/emmet/-/emmet-2.4.7.tgz", - "integrity": "sha512-O5O5QNqtdlnQM2bmKHtJgyChcrFMgQuulI+WdiOw2NArzprUqqxUW6bgYtKvzKgrsYpuLWalOkdhNP+1jluhCA==", + "version": "2.4.11", + "resolved": "https://registry.npmjs.org/emmet/-/emmet-2.4.11.tgz", + "integrity": "sha512-23QPJB3moh/U9sT4rQzGgeyyGIrcM+GH5uVYg2C6wZIxAIJq7Ng3QLT79tl8FUwDXhyq9SusfknOrofAKqvgyQ==", "dev": true, + "license": "MIT", "workspaces": [ "./packages/scanner", "./packages/abbreviation", @@ -8589,6 +8672,13 @@ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==" }, + "node_modules/emoji-regex-xs": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex-xs/-/emoji-regex-xs-1.0.0.tgz", + "integrity": "sha512-LRlerrMYoIDrT6jgpeZ2YYl/L8EulRTt5hQcYjy5AInh7HWXKimpqx68aknBFpGL2+/IcogTcaydJEgaTmOpDg==", + "dev": true, + "license": "MIT" + }, "node_modules/encodeurl": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", @@ -8846,12 +8936,47 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/esast-util-from-estree": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/esast-util-from-estree/-/esast-util-from-estree-2.0.0.tgz", + "integrity": "sha512-4CyanoAudUSBAn5K13H4JhsMH6L9ZP7XbLVe/dKybkxMO7eDyLsT8UHl9TRNrU2Gr9nz+FovfSIjuXWJ81uVwQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree-jsx": "^1.0.0", + "devlop": "^1.0.0", + "estree-util-visit": "^2.0.0", + "unist-util-position-from-estree": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/esast-util-from-js": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/esast-util-from-js/-/esast-util-from-js-2.0.1.tgz", + "integrity": "sha512-8Ja+rNJ0Lt56Pcf3TAmpBZjmx8ZcK5Ts4cAzIOjsjevg9oSXJnl6SUQ2EevU8tv3h6ZLWmoKL5H4fgWvdvfETw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree-jsx": "^1.0.0", + "acorn": "^8.0.0", + "esast-util-from-estree": "^2.0.0", + "vfile-message": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/esbuild": { "version": "0.21.5", "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.21.5.tgz", "integrity": "sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==", "dev": true, "hasInstallScript": true, + "license": "MIT", "bin": { "esbuild": "bin/esbuild" }, @@ -9340,6 +9465,7 @@ "resolved": "https://registry.npmjs.org/estree-util-attach-comments/-/estree-util-attach-comments-3.0.0.tgz", "integrity": "sha512-cKUwm/HUcTDsYh/9FgnuFqpfquUbwIqwKM26BVCGDPVgvaCl/nDCCjUfiLlx6lsEZ3Z4RFxNbOQ60pkaEwFxGw==", "dev": true, + "license": "MIT", "dependencies": { "@types/estree": "^1.0.0" }, @@ -9353,6 +9479,7 @@ "resolved": "https://registry.npmjs.org/estree-util-build-jsx/-/estree-util-build-jsx-3.0.1.tgz", "integrity": "sha512-8U5eiL6BTrPxp/CHbs2yMgP8ftMhR5ww1eIKoWRMlqvltHF8fZn5LRDvTKuxD3DUn+shRbLGqXemcP51oFCsGQ==", "dev": true, + "license": "MIT", "dependencies": { "@types/estree-jsx": "^1.0.0", "devlop": "^1.0.0", @@ -9369,6 +9496,22 @@ "resolved": "https://registry.npmjs.org/estree-util-is-identifier-name/-/estree-util-is-identifier-name-3.0.0.tgz", "integrity": "sha512-hFtqIDZTIUZ9BXLb8y4pYGyk6+wekIivNVTcmvk8NoOh+VeRn5y6cEHzbURrWbfp1fIqdVipilzj+lfaadNZmg==", "dev": true, + "license": "MIT", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/estree-util-scope": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/estree-util-scope/-/estree-util-scope-1.0.0.tgz", + "integrity": "sha512-2CAASclonf+JFWBNJPndcOpA8EMJwa0Q8LUFJEKqXLW6+qBvbFZuF5gItbQOs/umBUkjviCSDCbBwU2cXbmrhQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "^1.0.0", + "devlop": "^1.0.0" + }, "funding": { "type": "opencollective", "url": "https://opencollective.com/unified" @@ -9379,6 +9522,7 @@ "resolved": "https://registry.npmjs.org/estree-util-to-js/-/estree-util-to-js-2.0.0.tgz", "integrity": "sha512-WDF+xj5rRWmD5tj6bIqRi6CkLIXbbNQUcxQHzGysQzvHmdYG2G7p/Tf0J0gpxGgkeMZNTIjT/AoSvC9Xehcgdg==", "dev": true, + "license": "MIT", "dependencies": { "@types/estree-jsx": "^1.0.0", "astring": "^1.8.0", @@ -9394,6 +9538,7 @@ "resolved": "https://registry.npmjs.org/estree-util-visit/-/estree-util-visit-2.0.0.tgz", "integrity": "sha512-m5KgiH85xAhhW8Wta0vShLcUvOsh3LLPI2YVwcbio1l7E09NTLL1EyMZFM1OyWowoH0skScNbhOPl4kcBgzTww==", "dev": true, + "license": "MIT", "dependencies": { "@types/estree-jsx": "^1.0.0", "@types/unist": "^3.0.0" @@ -9477,15 +9622,16 @@ } }, "node_modules/expressive-code": { - "version": "0.35.3", - "resolved": "https://registry.npmjs.org/expressive-code/-/expressive-code-0.35.3.tgz", - "integrity": "sha512-XjWWUCxS4uQjPoRM98R7SNWWIYlFEaOeHm1piWv+c7coHCekuWno81thsc3g/UJ+DajNtOEsIQIAAcsBQZ8LMg==", + "version": "0.38.3", + "resolved": "https://registry.npmjs.org/expressive-code/-/expressive-code-0.38.3.tgz", + "integrity": "sha512-COM04AiUotHCKJgWdn7NtW2lqu8OW8owAidMpkXt1qxrZ9Q2iC7+tok/1qIn2ocGnczvr9paIySgGnEwFeEQ8Q==", "dev": true, + "license": "MIT", "dependencies": { - "@expressive-code/core": "^0.35.3", - "@expressive-code/plugin-frames": "^0.35.3", - "@expressive-code/plugin-shiki": "^0.35.3", - "@expressive-code/plugin-text-markers": "^0.35.3" + "@expressive-code/core": "^0.38.3", + "@expressive-code/plugin-frames": "^0.38.3", + "@expressive-code/plugin-shiki": "^0.38.3", + "@expressive-code/plugin-text-markers": "^0.38.3" } }, "node_modules/extend": { @@ -10602,10 +10748,11 @@ } }, "node_modules/hast-util-select": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/hast-util-select/-/hast-util-select-6.0.2.tgz", - "integrity": "sha512-hT/SD/d/Meu+iobvgkffo1QecV8WeKWxwsNMzcTJsKw1cKTQKSR/7ArJeURLNJF9HDjp9nVoORyNNJxrvBye8Q==", + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/hast-util-select/-/hast-util-select-6.0.3.tgz", + "integrity": "sha512-OVRQlQ1XuuLP8aFVLYmC2atrfWHS5UD3shonxpnyrjcCkwtvmt/+N6kYJdcY4mkMJhxp4kj2EFIxQ9kvkkt/eQ==", "dev": true, + "license": "MIT", "dependencies": { "@types/hast": "^3.0.0", "@types/unist": "^3.0.0", @@ -10617,7 +10764,6 @@ "hast-util-has-property": "^3.0.0", "hast-util-to-string": "^3.0.0", "hast-util-whitespace": "^3.0.0", - "not": "^0.1.0", "nth-check": "^2.0.0", "property-information": "^6.0.0", "space-separated-tokens": "^2.0.0", @@ -10634,6 +10780,7 @@ "resolved": "https://registry.npmjs.org/hast-util-to-estree/-/hast-util-to-estree-3.1.0.tgz", "integrity": "sha512-lfX5g6hqVh9kjS/B9E2gSkvHH4SZNiQFiqWS0x9fENzEl+8W12RqdRxX6d/Cwxi30tPQs3bIO+aolQJNp1bIyw==", "dev": true, + "license": "MIT", "dependencies": { "@types/estree": "^1.0.0", "@types/estree-jsx": "^1.0.0", @@ -10657,6 +10804,23 @@ "url": "https://opencollective.com/unified" } }, + "node_modules/hast-util-to-estree/node_modules/inline-style-parser": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/inline-style-parser/-/inline-style-parser-0.1.1.tgz", + "integrity": "sha512-7NXolsK4CAS5+xvdj5OMMbI962hU/wvwoxk+LWR9Ek9bVtyuuYScDN6eS0rUm6TxApFpw7CX1o4uJzcd4AyD3Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/hast-util-to-estree/node_modules/style-to-object": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/style-to-object/-/style-to-object-0.4.4.tgz", + "integrity": "sha512-HYNoHZa2GorYNyqiCaBgsxvcJIn7OHq6inEga+E6Ke3m5JkoqpQbnFssk4jwe+K7AhGa2fcha4wSOf1Kn01dMg==", + "dev": true, + "license": "MIT", + "dependencies": { + "inline-style-parser": "0.1.1" + } + }, "node_modules/hast-util-to-html": { "version": "9.0.3", "resolved": "https://registry.npmjs.org/hast-util-to-html/-/hast-util-to-html-9.0.3.tgz", @@ -10681,10 +10845,11 @@ } }, "node_modules/hast-util-to-jsx-runtime": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/hast-util-to-jsx-runtime/-/hast-util-to-jsx-runtime-2.3.0.tgz", - "integrity": "sha512-H/y0+IWPdsLLS738P8tDnrQ8Z+dj12zQQ6WC11TIM21C8WFVoIxcqWXf2H3hiTVZjF1AWqoimGwrTWecWrnmRQ==", + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/hast-util-to-jsx-runtime/-/hast-util-to-jsx-runtime-2.3.2.tgz", + "integrity": "sha512-1ngXYb+V9UT5h+PxNRa1O1FYguZK/XL+gkeqvp7EdHlB9oHUG0eYRo/vY5inBdcqo3RkPMC58/H94HvkbfGdyg==", "dev": true, + "license": "MIT", "dependencies": { "@types/estree": "^1.0.0", "@types/hast": "^3.0.0", @@ -10707,21 +10872,6 @@ "url": "https://opencollective.com/unified" } }, - "node_modules/hast-util-to-jsx-runtime/node_modules/inline-style-parser": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/inline-style-parser/-/inline-style-parser-0.2.3.tgz", - "integrity": "sha512-qlD8YNDqyTKTyuITrDOffsl6Tdhv+UC4hcdAVuQsK4IMQ99nSgd1MIA/Q+jQYoh9r3hVUXhYh7urSRmXPkW04g==", - "dev": true - }, - "node_modules/hast-util-to-jsx-runtime/node_modules/style-to-object": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/style-to-object/-/style-to-object-1.0.6.tgz", - "integrity": "sha512-khxq+Qm3xEyZfKd/y9L3oIWQimxuc4STrQKtQn8aSDRHb8mFgpukgX1hdzfrMEW6JCjyJ8p89x+IUMVnCBI1PA==", - "dev": true, - "dependencies": { - "inline-style-parser": "0.2.3" - } - }, "node_modules/hast-util-to-parse5": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/hast-util-to-parse5/-/hast-util-to-parse5-8.0.0.tgz", @@ -10742,10 +10892,11 @@ } }, "node_modules/hast-util-to-string": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/hast-util-to-string/-/hast-util-to-string-3.0.0.tgz", - "integrity": "sha512-OGkAxX1Ua3cbcW6EJ5pT/tslVb90uViVkcJ4ZZIMW/R33DX/AkcJcRrPebPwJkHYwlDHXz4aIwvAAaAdtrACFA==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/hast-util-to-string/-/hast-util-to-string-3.0.1.tgz", + "integrity": "sha512-XelQVTDWvqcl3axRfI0xSeoVKzyIFPwsAGSLIsKdJKQMXDYJS4WYrBNF/8J7RdhIcFI2BOHgAifggsvsxp/3+A==", "dev": true, + "license": "MIT", "dependencies": { "@types/hast": "^3.0.0" }, @@ -10949,6 +11100,30 @@ "node": ">=10.18" } }, + "node_modules/i18next": { + "version": "23.16.8", + "resolved": "https://registry.npmjs.org/i18next/-/i18next-23.16.8.tgz", + "integrity": "sha512-06r/TitrM88Mg5FdUXAKL96dJMzgqLE5dv3ryBAra4KCwD9mJ4ndOTS95ZuymIGoE+2hzfdaMak2X11/es7ZWg==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://locize.com" + }, + { + "type": "individual", + "url": "https://locize.com/i18next.html" + }, + { + "type": "individual", + "url": "https://www.i18next.com/how-to/faq#i18next-is-awesome.-how-can-i-support-the-project" + } + ], + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.23.2" + } + }, "node_modules/iconv-lite": { "version": "0.4.24", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", @@ -11092,10 +11267,11 @@ "dev": true }, "node_modules/inline-style-parser": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/inline-style-parser/-/inline-style-parser-0.1.1.tgz", - "integrity": "sha512-7NXolsK4CAS5+xvdj5OMMbI962hU/wvwoxk+LWR9Ek9bVtyuuYScDN6eS0rUm6TxApFpw7CX1o4uJzcd4AyD3Q==", - "dev": true + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/inline-style-parser/-/inline-style-parser-0.2.4.tgz", + "integrity": "sha512-0aO8FkhNZlj/ZIbNi7Lxxr12obT7cL1moPfE4tg1LkX7LlLfC6DeX4l2ZEud1ukP9jNQyNnfzQVqwbwmAATY4Q==", + "dev": true, + "license": "MIT" }, "node_modules/internal-ip": { "version": "6.2.0", @@ -11503,6 +11679,7 @@ "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-2.0.0.tgz", "integrity": "sha512-qP1vozQRI+BMOPcjFzrjXuQvdak2pHNUMZoeG2eRbiSqyvbEf/wQtEOTOX1guk6E3t36RkaqiSt8A/6YElNxLQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=12" }, @@ -11611,15 +11788,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/is-reference": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-3.0.2.tgz", - "integrity": "sha512-v3rht/LgVcsdZa3O2Nqs+NMowLOxeOm7Ay9+/ARQ2F+qEoANRcqrjAZKGN0v8ymUetZGgkp26LTnGT7H0Qo9Pg==", - "dev": true, - "dependencies": { - "@types/estree": "*" - } - }, "node_modules/is-regex": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", @@ -12178,7 +12346,8 @@ "version": "2.3.1", "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-2.3.1.tgz", "integrity": "sha512-H8jvkz1O50L3dMZCsLqiuB2tA7muqbSg1AtGEkN0leAqGjsUzDJir3Zwr02BhqdcITPg3ei3mZ+HjMocAknhhg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/jsonfile": { "version": "6.1.0", @@ -13189,15 +13358,17 @@ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", "dev": true, + "license": "ISC", "dependencies": { "yallist": "^3.0.2" } }, "node_modules/magic-string": { - "version": "0.30.12", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.12.tgz", - "integrity": "sha512-Ea8I3sQMVXr8JhN4z+H/d8zwo+tYDgHE9+5G4Wnrwhs0gaK9fXTKx0Tw5Xwsd/bCPTTZNRAdpyzvoeORe9LYpw==", + "version": "0.30.14", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.14.tgz", + "integrity": "sha512-5c99P1WKTed11ZC0HMJOj6CDIue6F8ySu+bJL+85q1zBEIY8IklrJ1eiKC2NDRh3Ct3FcvmJPyQHb9erXMTJNw==", "dev": true, + "license": "MIT", "dependencies": { "@jridgewell/sourcemap-codec": "^1.5.0" } @@ -13257,6 +13428,7 @@ "resolved": "https://registry.npmjs.org/markdown-extensions/-/markdown-extensions-2.0.0.tgz", "integrity": "sha512-o5vL7aDWatOTX8LzaS1WMoaoxIiLRQJuIKKe2wAw6IeULDHaqbiqiggmx+pKvZDb1Sj+pE46Sn1T7lCqfFtg1Q==", "dev": true, + "license": "MIT", "engines": { "node": ">=16" }, @@ -13525,6 +13697,7 @@ "resolved": "https://registry.npmjs.org/mdast-util-mdx/-/mdast-util-mdx-3.0.0.tgz", "integrity": "sha512-JfbYLAW7XnYTTbUsmpu0kdBUVe+yKVJZBItEjwyYJiDJuZ9w4eeaqks4HQO+R7objWgS2ymV60GYpI14Ug554w==", "dev": true, + "license": "MIT", "dependencies": { "mdast-util-from-markdown": "^2.0.0", "mdast-util-mdx-expression": "^2.0.0", @@ -13538,10 +13711,11 @@ } }, "node_modules/mdast-util-mdx-expression": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/mdast-util-mdx-expression/-/mdast-util-mdx-expression-2.0.0.tgz", - "integrity": "sha512-fGCu8eWdKUKNu5mohVGkhBXCXGnOTLuFqOvGMvdikr+J1w7lDJgxThOKpwRWzzbyXAU2hhSwsmssOY4yTokluw==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/mdast-util-mdx-expression/-/mdast-util-mdx-expression-2.0.1.tgz", + "integrity": "sha512-J6f+9hUp+ldTZqKRSg7Vw5V6MqjATc+3E4gf3CFNcuZNWD8XdyI6zQ8GqH7f8169MM6P7hMBRDVGnn7oHB9kXQ==", "dev": true, + "license": "MIT", "dependencies": { "@types/estree-jsx": "^1.0.0", "@types/hast": "^3.0.0", @@ -13556,10 +13730,11 @@ } }, "node_modules/mdast-util-mdx-jsx": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/mdast-util-mdx-jsx/-/mdast-util-mdx-jsx-3.1.2.tgz", - "integrity": "sha512-eKMQDeywY2wlHc97k5eD8VC+9ASMjN8ItEZQNGwJ6E0XWKiW/Z0V5/H8pvoXUf+y+Mj0VIgeRRbujBmFn4FTyA==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/mdast-util-mdx-jsx/-/mdast-util-mdx-jsx-3.1.3.tgz", + "integrity": "sha512-bfOjvNt+1AcbPLTFMFWY149nJz0OjmewJs3LQQ5pIyVGxP4CdOqNVJL6kTaM5c68p8q82Xv3nCyFfUnuEcH3UQ==", "dev": true, + "license": "MIT", "dependencies": { "@types/estree-jsx": "^1.0.0", "@types/hast": "^3.0.0", @@ -13571,7 +13746,6 @@ "mdast-util-to-markdown": "^2.0.0", "parse-entities": "^4.0.0", "stringify-entities": "^4.0.0", - "unist-util-remove-position": "^5.0.0", "unist-util-stringify-position": "^4.0.0", "vfile-message": "^4.0.0" }, @@ -13585,6 +13759,7 @@ "resolved": "https://registry.npmjs.org/mdast-util-mdxjs-esm/-/mdast-util-mdxjs-esm-2.0.1.tgz", "integrity": "sha512-EcmOpxsZ96CvlP03NghtH1EsLtr0n9Tm4lPUJUBccV9RwUOneqSycg19n5HGzCf+10LozMRSObtVr3ee1WoHtg==", "dev": true, + "license": "MIT", "dependencies": { "@types/estree-jsx": "^1.0.0", "@types/hast": "^3.0.0", @@ -14494,6 +14669,7 @@ "url": "https://opencollective.com/unified" } ], + "license": "MIT", "dependencies": { "@types/estree": "^1.0.0", "devlop": "^1.0.0", @@ -14506,10 +14682,11 @@ } }, "node_modules/micromark-extension-mdx-jsx": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/micromark-extension-mdx-jsx/-/micromark-extension-mdx-jsx-3.0.0.tgz", - "integrity": "sha512-uvhhss8OGuzR4/N17L1JwvmJIpPhAd8oByMawEKx6NVdBCbesjH4t+vjEp3ZXft9DwvlKSD07fCeI44/N0Vf2w==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/micromark-extension-mdx-jsx/-/micromark-extension-mdx-jsx-3.0.1.tgz", + "integrity": "sha512-vNuFb9czP8QCtAQcEJn0UJQJZA8Dk6DXKBqx+bg/w0WGuSxDxNr7hErW89tHUY31dUW4NqEOWwmEUNhjTFmHkg==", "dev": true, + "license": "MIT", "dependencies": { "@types/acorn": "^4.0.0", "@types/estree": "^1.0.0", @@ -14518,6 +14695,7 @@ "micromark-factory-mdx-expression": "^2.0.0", "micromark-factory-space": "^2.0.0", "micromark-util-character": "^2.0.0", + "micromark-util-events-to-acorn": "^2.0.0", "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.0", "vfile-message": "^4.0.0" @@ -14532,6 +14710,7 @@ "resolved": "https://registry.npmjs.org/micromark-extension-mdx-md/-/micromark-extension-mdx-md-2.0.0.tgz", "integrity": "sha512-EpAiszsB3blw4Rpba7xTOUptcFeBFi+6PY8VnJ2hhimH+vCQDirWgsMpz7w1XcZE7LVrSAUGb9VJpG9ghlYvYQ==", "dev": true, + "license": "MIT", "dependencies": { "micromark-util-types": "^2.0.0" }, @@ -14545,6 +14724,7 @@ "resolved": "https://registry.npmjs.org/micromark-extension-mdxjs/-/micromark-extension-mdxjs-3.0.0.tgz", "integrity": "sha512-A873fJfhnJ2siZyUrJ31l34Uqwy4xIFmvPY1oj+Ean5PHcPBYzEsvqvWGaWcfEIr11O5Dlw3p2y0tZWpKHDejQ==", "dev": true, + "license": "MIT", "dependencies": { "acorn": "^8.0.0", "acorn-jsx": "^5.0.0", @@ -14565,6 +14745,7 @@ "resolved": "https://registry.npmjs.org/micromark-extension-mdxjs-esm/-/micromark-extension-mdxjs-esm-3.0.0.tgz", "integrity": "sha512-DJFl4ZqkErRpq/dAPyeWp15tGrcrrJho1hKK5uBS70BCtfrIFg81sqcTVu3Ta+KD1Tk5vAtBNElWxtAa+m8K9A==", "dev": true, + "license": "MIT", "dependencies": { "@types/estree": "^1.0.0", "devlop": "^1.0.0", @@ -14625,9 +14806,9 @@ } }, "node_modules/micromark-factory-mdx-expression": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/micromark-factory-mdx-expression/-/micromark-factory-mdx-expression-2.0.1.tgz", - "integrity": "sha512-F0ccWIUHRLRrYp5TC9ZYXmZo+p2AM13ggbsW4T0b5CRKP8KHVRB8t4pwtBgTxtjRmwrK0Irwm7vs2JOZabHZfg==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/micromark-factory-mdx-expression/-/micromark-factory-mdx-expression-2.0.2.tgz", + "integrity": "sha512-5E5I2pFzJyg2CtemqAbcyCktpHXuJbABnsb32wX2U8IQKhhVFBqkcZR5LRm1WVoFqa4kTueZK4abep7wdo9nrw==", "dev": true, "funding": [ { @@ -14639,9 +14820,11 @@ "url": "https://opencollective.com/unified" } ], + "license": "MIT", "dependencies": { "@types/estree": "^1.0.0", "devlop": "^1.0.0", + "micromark-factory-space": "^2.0.0", "micromark-util-character": "^2.0.0", "micromark-util-events-to-acorn": "^2.0.0", "micromark-util-symbol": "^2.0.0", @@ -14866,6 +15049,7 @@ "url": "https://opencollective.com/unified" } ], + "license": "MIT", "dependencies": { "@types/acorn": "^4.0.0", "@types/estree": "^1.0.0", @@ -15066,6 +15250,7 @@ "resolved": "https://registry.npmjs.org/mimic-function/-/mimic-function-5.0.1.tgz", "integrity": "sha512-VP79XUPxV2CigYP3jWwAUFSku2aKqBH7uTAapFWCBqutsbmDo96KY5o8uh6U+/YSIn5OxJnXp73beVkpqMIGhA==", "dev": true, + "license": "MIT", "engines": { "node": ">=18" }, @@ -15502,7 +15687,8 @@ "version": "0.4.1", "resolved": "https://registry.npmjs.org/muggle-string/-/muggle-string-0.4.1.tgz", "integrity": "sha512-VNTrAak/KhO2i8dqqnqnAHOa3cYBwXEZe9h+D5h/1ZqFSTEFHdM65lR7RoIqq3tBBYavsOXV84NoHXZ0AkPyqQ==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/nanocolors": { "version": "0.2.13", @@ -15656,7 +15842,8 @@ "version": "2.0.18", "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.18.tgz", "integrity": "sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/non-layered-tidy-tree-layout": { "version": "2.0.2", @@ -15694,12 +15881,6 @@ "node": ">=0.10.0" } }, - "node_modules/not": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/not/-/not-0.1.0.tgz", - "integrity": "sha512-5PDmaAsVfnWUgTUbJ3ERwn7u79Z0dYxN9ErxCpVJJqe2RK0PJ3z+iFUxuqjwtlDDegXvtWoxD/3Fzxox7tFGWA==", - "dev": true - }, "node_modules/npm-run-all": { "version": "4.1.5", "resolved": "https://registry.npmjs.org/npm-run-all/-/npm-run-all-4.1.5.tgz", @@ -15865,6 +16046,7 @@ "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.1.1.tgz", "integrity": "sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { "boolbase": "^1.0.0" }, @@ -16035,16 +16217,16 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/oniguruma-to-js": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/oniguruma-to-js/-/oniguruma-to-js-0.4.3.tgz", - "integrity": "sha512-X0jWUcAlxORhOqqBREgPMgnshB7ZGYszBNspP+tS9hPD3l13CdaXcHbgImoHUHlrvGx/7AvFEkTRhAGYh+jzjQ==", + "node_modules/oniguruma-to-es": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/oniguruma-to-es/-/oniguruma-to-es-0.7.0.tgz", + "integrity": "sha512-HRaRh09cE0gRS3+wi2zxekB+I5L8C/gN60S+vb11eADHUaB/q4u8wGGOX3GvwvitG8ixaeycZfeoyruKQzUgNg==", "dev": true, + "license": "MIT", "dependencies": { - "regex": "^4.3.2" - }, - "funding": { - "url": "https://github.com/sponsors/antfu" + "emoji-regex-xs": "^1.0.0", + "regex": "^5.0.2", + "regex-recursion": "^4.3.0" } }, "node_modules/only": { @@ -16115,10 +16297,11 @@ } }, "node_modules/ora": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/ora/-/ora-8.1.0.tgz", - "integrity": "sha512-GQEkNkH/GHOhPFXcqZs3IDahXEQcQxsSjEkK4KvEEST4t7eNzoMjxTzef+EZ+JluDEV+Raoi3WQ2CflnRdSVnQ==", + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/ora/-/ora-8.1.1.tgz", + "integrity": "sha512-YWielGi1XzG1UTvOaCFaNgEnuhZVMSHYkW/FQ7UX8O26PtlpdM84c0f7wLPlkvx2RfiQmnzd61d/MGxmpQeJPw==", "dev": true, + "license": "MIT", "dependencies": { "chalk": "^5.3.0", "cli-cursor": "^5.0.0", @@ -16142,6 +16325,7 @@ "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-5.0.0.tgz", "integrity": "sha512-aCj4O5wKyszjMmDT4tZj93kxyydN/K5zPWSCe6/0AV/AA1pqe5ZBIw0a2ZfPQV7lL5/yb5HsUreJ6UFAF1tEQw==", "dev": true, + "license": "MIT", "dependencies": { "restore-cursor": "^5.0.0" }, @@ -16157,6 +16341,7 @@ "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-2.1.0.tgz", "integrity": "sha512-mE00Gnza5EEB3Ds0HfMyllZzbBrmLOX3vfWoj9A9PEnTfratQ/BcaJOuMhnkhjXvb2+FkY3VuHqtAGpTPmglFQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=18" }, @@ -16169,6 +16354,7 @@ "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-6.0.0.tgz", "integrity": "sha512-i24m8rpwhmPIS4zscNzK6MSEhk0DUWa/8iYQWxhffV8jkI4Phvs3F+quL5xvS0gdQR0FyTCMMH33Y78dDTzzIw==", "dev": true, + "license": "MIT", "dependencies": { "chalk": "^5.3.0", "is-unicode-supported": "^1.3.0" @@ -16185,6 +16371,7 @@ "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-1.3.0.tgz", "integrity": "sha512-43r2mRvz+8JRIKnWJ+3j8JtjRKZ6GmjzfaE/qiBJnikNnYv/6bagRJ1kUhNk8R5EX/GkobD+r+sfxCPJsiKBLQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=12" }, @@ -16197,6 +16384,7 @@ "resolved": "https://registry.npmjs.org/onetime/-/onetime-7.0.0.tgz", "integrity": "sha512-VXJjc87FScF88uafS3JllDgvAm+c/Slfz06lorj2uAY34rlUu0Nt+v8wreiImcrgAjjIHp1rXpTDlLOGw29WwQ==", "dev": true, + "license": "MIT", "dependencies": { "mimic-function": "^5.0.0" }, @@ -16212,6 +16400,7 @@ "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-5.1.0.tgz", "integrity": "sha512-oMA2dcrw6u0YfxJQXm342bFKX/E4sG9rbTzO9ptUcR/e8A33cHuvStiYOwH7fszkZlZ1z/ta9AAoPk2F4qIOHA==", "dev": true, + "license": "MIT", "dependencies": { "onetime": "^7.0.0", "signal-exit": "^4.1.0" @@ -16228,6 +16417,7 @@ "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", "dev": true, + "license": "ISC", "engines": { "node": ">=14" }, @@ -16758,7 +16948,8 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-1.0.1.tgz", "integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/path-exists": { "version": "4.0.0", @@ -16857,17 +17048,6 @@ "integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==", "dev": true }, - "node_modules/periscopic": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/periscopic/-/periscopic-3.1.0.tgz", - "integrity": "sha512-vKiQ8RRtkl9P+r/+oefh25C3fhybptkHKCZSPlcXiJux2tJF55GnEj3BVn4A5gKfq9NWWXXrxkHBwVPUfH0opw==", - "dev": true, - "dependencies": { - "@types/estree": "^1.0.0", - "estree-walker": "^3.0.0", - "is-reference": "^3.0.0" - } - }, "node_modules/picocolors": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.0.tgz", @@ -17071,29 +17251,37 @@ } }, "node_modules/postcss-nested": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/postcss-nested/-/postcss-nested-6.0.1.tgz", - "integrity": "sha512-mEp4xPMi5bSWiMbsgoPfcP74lsWLHkQbZc3sY+jWYd65CUwXrUaTp0fmNpa01ZcETKlIgUdFN/MpS2xZtqL9dQ==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/postcss-nested/-/postcss-nested-6.2.0.tgz", + "integrity": "sha512-HQbt28KulC5AJzG+cZtj9kvKB93CFCdLvog1WFLf1D+xmMvPGlBstkpTEZfK5+AN9hfJocyBFCNiqyS48bpgzQ==", "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", "dependencies": { - "postcss-selector-parser": "^6.0.11" + "postcss-selector-parser": "^6.1.1" }, "engines": { "node": ">=12.0" }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, "peerDependencies": { "postcss": "^8.2.14" } }, "node_modules/postcss-selector-parser": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.1.0.tgz", - "integrity": "sha512-UMz42UD0UY0EApS0ZL9o1XnLhSTtvvvLe5Dc2H2O56fvRZi+KulDyf5ctDhhtYJBGKStV2FL1fy6253cmLgqVQ==", + "version": "6.1.2", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.1.2.tgz", + "integrity": "sha512-Q8qQfPiZ+THO/3ZrOrO0cJJKfpYCagtMUkXbnEfmgUjwXg6z/WBeOyS9APBBPCTSiDV+s4SwQGu8yFsiMRIudg==", "dev": true, + "license": "MIT", "dependencies": { "cssesc": "^3.0.0", "util-deprecate": "^1.0.2" @@ -17694,6 +17882,74 @@ "node": ">=8.10.0" } }, + "node_modules/recma-build-jsx": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/recma-build-jsx/-/recma-build-jsx-1.0.0.tgz", + "integrity": "sha512-8GtdyqaBcDfva+GUKDr3nev3VpKAhup1+RvkMvUxURHpW7QyIvk9F5wz7Vzo06CEMSilw6uArgRqhpiUcWp8ew==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "^1.0.0", + "estree-util-build-jsx": "^3.0.0", + "vfile": "^6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/recma-jsx": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/recma-jsx/-/recma-jsx-1.0.0.tgz", + "integrity": "sha512-5vwkv65qWwYxg+Atz95acp8DMu1JDSqdGkA2Of1j6rCreyFUE/gp15fC8MnGEuG1W68UKjM6x6+YTWIh7hZM/Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "acorn-jsx": "^5.0.0", + "estree-util-to-js": "^2.0.0", + "recma-parse": "^1.0.0", + "recma-stringify": "^1.0.0", + "unified": "^11.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/recma-parse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/recma-parse/-/recma-parse-1.0.0.tgz", + "integrity": "sha512-OYLsIGBB5Y5wjnSnQW6t3Xg7q3fQ7FWbw/vcXtORTnyaSFscOtABg+7Pnz6YZ6c27fG1/aN8CjfwoUEUIdwqWQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "^1.0.0", + "esast-util-from-js": "^2.0.0", + "unified": "^11.0.0", + "vfile": "^6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/recma-stringify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/recma-stringify/-/recma-stringify-1.0.0.tgz", + "integrity": "sha512-cjwII1MdIIVloKvC9ErQ+OgAtwHBmcZ0Bg4ciz78FtbT8In39aAYbaA7zvxQ61xVMSPE8WxhLwLbhif4Js2C+g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "^1.0.0", + "estree-util-to-js": "^2.0.0", + "unified": "^11.0.0", + "vfile": "^6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/redent": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/redent/-/redent-3.0.0.tgz", @@ -17840,10 +18096,31 @@ "dev": true }, "node_modules/regex": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/regex/-/regex-4.3.3.tgz", - "integrity": "sha512-r/AadFO7owAq1QJVeZ/nq9jNS1vyZt+6t1p/E59B56Rn2GCya+gr1KSyOzNL/er+r+B7phv5jG2xU2Nz1YkmJg==", - "dev": true + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/regex/-/regex-5.0.2.tgz", + "integrity": "sha512-/pczGbKIQgfTMRV0XjABvc5RzLqQmwqxLHdQao2RTXPk+pmTXB2P0IaUHYdYyk412YLwUIkaeMd5T+RzVgTqnQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "regex-utilities": "^2.3.0" + } + }, + "node_modules/regex-recursion": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/regex-recursion/-/regex-recursion-4.3.0.tgz", + "integrity": "sha512-5LcLnizwjcQ2ALfOj95MjcatxyqF5RPySx9yT+PaXu3Gox2vyAtLDjHB8NTJLtMGkvyau6nI3CfpwFCjPUIs/A==", + "dev": true, + "license": "MIT", + "dependencies": { + "regex-utilities": "^2.3.0" + } + }, + "node_modules/regex-utilities": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/regex-utilities/-/regex-utilities-2.3.0.tgz", + "integrity": "sha512-8VhliFJAWRaUiVvREIiW2NXXTmHs4vMNnSzuJVhscgmGav3g9VDxLrQndI3dZZVVdp0ZO/5v0xmX516/7M9cng==", + "dev": true, + "license": "MIT" }, "node_modules/regexp.prototype.flags": { "version": "1.5.2", @@ -17880,12 +18157,13 @@ } }, "node_modules/rehype-expressive-code": { - "version": "0.35.3", - "resolved": "https://registry.npmjs.org/rehype-expressive-code/-/rehype-expressive-code-0.35.3.tgz", - "integrity": "sha512-kj43Rg+WzYUs8RRr6XyBr60pnrIZEgbmn9yJoV6qka1UDpcx7r8icn6Q2uSAgaLtlEUy+HCPgQJraOZrA53LOQ==", + "version": "0.38.3", + "resolved": "https://registry.npmjs.org/rehype-expressive-code/-/rehype-expressive-code-0.38.3.tgz", + "integrity": "sha512-RYSSDkMBikoTbycZPkcWp6ELneANT4eTpND1DSRJ6nI2eVFUwTBDCvE2vO6jOOTaavwnPiydi4i/87NRyjpdOA==", "dev": true, + "license": "MIT", "dependencies": { - "expressive-code": "^0.35.3" + "expressive-code": "^0.38.3" } }, "node_modules/rehype-format": { @@ -17955,6 +18233,22 @@ "url": "https://opencollective.com/unified" } }, + "node_modules/rehype-recma": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/rehype-recma/-/rehype-recma-1.0.0.tgz", + "integrity": "sha512-lqA4rGUf1JmacCNWWZx0Wv1dHqMwxzsDWYMTowuplHF3xH0N/MmrZ/G3BDZnzAkRmxDadujCjaKM2hqYdCBOGw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "^1.0.0", + "@types/hast": "^3.0.0", + "hast-util-to-estree": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/rehype-stringify": { "version": "10.0.1", "resolved": "https://registry.npmjs.org/rehype-stringify/-/rehype-stringify-10.0.1.tgz", @@ -18005,10 +18299,11 @@ } }, "node_modules/remark-mdx": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/remark-mdx/-/remark-mdx-3.0.1.tgz", - "integrity": "sha512-3Pz3yPQ5Rht2pM5R+0J2MrGoBSrzf+tJG94N+t/ilfdh8YLyyKYtidAYwTveB20BoHAcwIopOUqhcmh2F7hGYA==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/remark-mdx/-/remark-mdx-3.1.0.tgz", + "integrity": "sha512-Ngl/H3YXyBV9RcRNdlYsZujAmhsxwzxpDzpDEhFBVAGthS4GDgnctpDjgFl/ULx5UEDzqtW1cyBSNKqYYrqLBA==", "dev": true, + "license": "MIT", "dependencies": { "mdast-util-mdx": "^3.0.0", "micromark-extension-mdxjs": "^3.0.0" @@ -18085,7 +18380,8 @@ "version": "0.7.0", "resolved": "https://registry.npmjs.org/request-light/-/request-light-0.7.0.tgz", "integrity": "sha512-lMbBMrDoxgsyO+yB3sDcrDuX85yYt7sS8BfQd11jtbW/z5ZWgLZRcEGLsLoYw7I0WSUGQBs8CC8ScIxkTX1+6Q==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/require-directory": { "version": "2.1.1", @@ -18603,15 +18899,16 @@ } }, "node_modules/shiki": { - "version": "1.22.0", - "resolved": "https://registry.npmjs.org/shiki/-/shiki-1.22.0.tgz", - "integrity": "sha512-/t5LlhNs+UOKQCYBtl5ZsH/Vclz73GIqT2yQsCBygr8L/ppTdmpL4w3kPLoZJbMKVWtoG77Ue1feOjZfDxvMkw==", + "version": "1.24.0", + "resolved": "https://registry.npmjs.org/shiki/-/shiki-1.24.0.tgz", + "integrity": "sha512-qIneep7QRwxRd5oiHb8jaRzH15V/S8F3saCXOdjwRLgozZJr5x2yeBhQtqkO3FSzQDwYEFAYuifg4oHjpDghrg==", "dev": true, + "license": "MIT", "dependencies": { - "@shikijs/core": "1.22.0", - "@shikijs/engine-javascript": "1.22.0", - "@shikijs/engine-oniguruma": "1.22.0", - "@shikijs/types": "1.22.0", + "@shikijs/core": "1.24.0", + "@shikijs/engine-javascript": "1.24.0", + "@shikijs/engine-oniguruma": "1.24.0", + "@shikijs/types": "1.24.0", "@shikijs/vscode-textmate": "^9.3.0", "@types/hast": "^3.0.4" } @@ -18993,10 +19290,11 @@ "dev": true }, "node_modules/starlight-links-validator": { - "version": "0.12.1", - "resolved": "https://registry.npmjs.org/starlight-links-validator/-/starlight-links-validator-0.12.1.tgz", - "integrity": "sha512-LhRuGaI9Rp7c7ltwcG0BfCZuAN1d15oYbDB4jXblJ6zsiFcrSGHNlDnKXJHEJZ6XhJ+eOpd1IsHLFLh5Sq6uHg==", + "version": "0.13.3", + "resolved": "https://registry.npmjs.org/starlight-links-validator/-/starlight-links-validator-0.13.3.tgz", + "integrity": "sha512-bwTrEwTH9wL6OlP2rUtWrmkbQCbSa71L+n/7nVWYQ0u6k8wq020XSrcrzyni8ZSv1up0zKHm9DO0l2YoLpIF5A==", "dev": true, + "license": "MIT", "dependencies": { "@types/picomatch": "2.3.3", "github-slugger": "2.0.0", @@ -19042,6 +19340,7 @@ "resolved": "https://registry.npmjs.org/stdin-discarder/-/stdin-discarder-0.2.2.tgz", "integrity": "sha512-UhDfHmA92YAlNnCfhmq0VeNL5bDbiZGg7sZ2IvPsXubGkiNa9EC+tUTsjBRsYUAz87btI6/1wf4XoVvQ3uRnmQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=18" }, @@ -19416,12 +19715,13 @@ } }, "node_modules/style-to-object": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/style-to-object/-/style-to-object-0.4.4.tgz", - "integrity": "sha512-HYNoHZa2GorYNyqiCaBgsxvcJIn7OHq6inEga+E6Ke3m5JkoqpQbnFssk4jwe+K7AhGa2fcha4wSOf1Kn01dMg==", + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/style-to-object/-/style-to-object-1.0.8.tgz", + "integrity": "sha512-xT47I/Eo0rwJmaXC4oilDGDWLohVhR6o/xAQcPQN8q6QBuZVL8qMYL85kLmST5cPjAorwvqIA4qXTRQoYHaL6g==", "dev": true, + "license": "MIT", "dependencies": { - "inline-style-parser": "0.1.1" + "inline-style-parser": "0.2.4" } }, "node_modules/stylis": { @@ -19672,10 +19972,11 @@ "integrity": "sha512-XPaBkWQJdsf3pLKJV9p4qN/S+fm2Oj8AIPo1BTUhg5oxkvm9+SVEGFdhyOz7tTdUTfvxMiAs4sp6/eZO2Ew+pw==" }, "node_modules/tinyexec": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-0.3.0.tgz", - "integrity": "sha512-tVGE0mVJPGb0chKhqmsoosjsS+qUnJVGJpZgsHYQcGoPlG3B51R3PouqTgEGH2Dc9jjFyOqOpix6ZHNMXp1FZg==", - "dev": true + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-0.3.1.tgz", + "integrity": "sha512-WiCJLEECkO18gwqIp6+hJg0//p23HXp4S+gGtAKu3mI2F2/sXC4FvHvXvB0zJVVaTPhx1/tOwdbRsa1sOBIKqQ==", + "dev": true, + "license": "MIT" }, "node_modules/tmp": { "version": "0.0.33", @@ -19688,15 +19989,6 @@ "node": ">=0.6.0" } }, - "node_modules/to-fast-properties": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", - "dev": true, - "engines": { - "node": ">=4" - } - }, "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", @@ -19774,9 +20066,9 @@ } }, "node_modules/ts-api-utils": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.4.0.tgz", - "integrity": "sha512-032cPxaEKwM+GT3vA5JXNzIaizx388rhsSW79vGRNGXfRRAdEAn2mvk36PvK5HnOchyWZ7afLEXqYCvPCrzuzQ==", + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.4.3.tgz", + "integrity": "sha512-i3eMG77UTMD0hZhgRS562pv83RC6ukSAC2GMNWc+9dieh/+jDM5u5YG+NHX6VNDRHQcHwmsTHctP9LhbC3WxVw==", "dev": true, "license": "MIT", "engines": { @@ -19955,13 +20247,15 @@ "version": "0.2.2", "resolved": "https://registry.npmjs.org/typesafe-path/-/typesafe-path-0.2.2.tgz", "integrity": "sha512-OJabfkAg1WLZSqJAJ0Z6Sdt3utnbzr/jh+NAHoyWHJe8CMSy79Gm085094M9nvTPy22KzTVn5Zq5mbapCI/hPA==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/typescript": { - "version": "5.5.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.2.tgz", - "integrity": "sha512-NcRtPEOsPFFWjobJEtfihkLCZCXZt/os3zf8nTxjVH3RvTSxjrCamJpbExGvYOF+tFHc3pA65qpdwPbzjohhew==", + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.2.tgz", + "integrity": "sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg==", "dev": true, + "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -19971,19 +20265,21 @@ } }, "node_modules/typescript-auto-import-cache": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/typescript-auto-import-cache/-/typescript-auto-import-cache-0.3.3.tgz", - "integrity": "sha512-ojEC7+Ci1ij9eE6hp8Jl9VUNnsEKzztktP5gtYNRMrTmfXVwA1PITYYAkpxCvvupdSYa/Re51B6KMcv1CTZEUA==", + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/typescript-auto-import-cache/-/typescript-auto-import-cache-0.3.5.tgz", + "integrity": "sha512-fAIveQKsoYj55CozUiBoj4b/7WpN0i4o74wiGY5JVUEoD0XiqDk1tJqTEjgzL2/AizKQrXxyRosSebyDzBZKjw==", "dev": true, + "license": "MIT", "dependencies": { "semver": "^7.3.8" } }, "node_modules/typescript-auto-import-cache/node_modules/semver": { - "version": "7.6.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz", - "integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==", + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", "dev": true, + "license": "ISC", "bin": { "semver": "bin/semver.js" }, @@ -20158,6 +20454,7 @@ "resolved": "https://registry.npmjs.org/unist-util-position-from-estree/-/unist-util-position-from-estree-2.0.0.tgz", "integrity": "sha512-KaFVRjoqLyF6YXCbVLNad/eS4+OfPQQn2yOd7zF/h5T/CSL2v8NpN6a5TPvtbXthAGw5nG+PuTtq+DdIZr+cRQ==", "dev": true, + "license": "MIT", "dependencies": { "@types/unist": "^3.0.0" }, @@ -20271,6 +20568,7 @@ "url": "https://github.com/sponsors/ai" } ], + "license": "MIT", "dependencies": { "escalade": "^3.2.0", "picocolors": "^1.1.0" @@ -20436,10 +20734,11 @@ } }, "node_modules/vite": { - "version": "5.4.9", - "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.9.tgz", - "integrity": "sha512-20OVpJHh0PAM0oSOELa5GaZNWeDjcAvQjGXy2Uyr+Tp+/D2/Hdz6NLgpJLsarPTA2QJ6v8mX2P1ZfbsSKvdMkg==", + "version": "5.4.11", + "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.11.tgz", + "integrity": "sha512-c7jFQRklXua0mTzneGW9QVyxFjUgwcihC4bXEtujIo2ouWCe1Ajt/amn2PCxYnhYfd5k09JX3SB7OYWFKYqj8Q==", "dev": true, + "license": "MIT", "dependencies": { "esbuild": "^0.21.3", "postcss": "^8.4.43", @@ -20495,12 +20794,17 @@ } }, "node_modules/vitefu": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/vitefu/-/vitefu-1.0.3.tgz", - "integrity": "sha512-iKKfOMBHob2WxEJbqbJjHAkmYgvFDPhuqrO82om83S8RLk+17FtyMBfcyeH8GqD0ihShtkMW/zzJgiA51hCNCQ==", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/vitefu/-/vitefu-1.0.4.tgz", + "integrity": "sha512-y6zEE3PQf6uu/Mt6DTJ9ih+kyJLr4XcSgHR2zUkM8SWDhuixEJxfJ6CZGMHh1Ec3vPLoEA0IHU5oWzVqw8ulow==", "dev": true, + "license": "MIT", + "workspaces": [ + "tests/deps/*", + "tests/projects/*" + ], "peerDependencies": { - "vite": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0-beta.0" + "vite": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0" }, "peerDependenciesMeta": { "vite": { @@ -20509,17 +20813,18 @@ } }, "node_modules/volar-service-css": { - "version": "0.0.45", - "resolved": "https://registry.npmjs.org/volar-service-css/-/volar-service-css-0.0.45.tgz", - "integrity": "sha512-f+AlUI1+kESbcZSVaNJVAnK0c/9Da5StoxzPqA5/8VqUHJWNdubWNnwG5xpFVTfgh6pgTcey3UBhBfHytFaIOg==", + "version": "0.0.62", + "resolved": "https://registry.npmjs.org/volar-service-css/-/volar-service-css-0.0.62.tgz", + "integrity": "sha512-JwNyKsH3F8PuzZYuqPf+2e+4CTU8YoyUHEHVnoXNlrLe7wy9U3biomZ56llN69Ris7TTy/+DEX41yVxQpM4qvg==", "dev": true, + "license": "MIT", "dependencies": { - "vscode-css-languageservice": "^6.2.10", + "vscode-css-languageservice": "^6.3.0", "vscode-languageserver-textdocument": "^1.0.11", "vscode-uri": "^3.0.8" }, "peerDependencies": { - "@volar/language-service": "~2.2.3" + "@volar/language-service": "~2.4.0" }, "peerDependenciesMeta": { "@volar/language-service": { @@ -20528,17 +20833,19 @@ } }, "node_modules/volar-service-emmet": { - "version": "0.0.45", - "resolved": "https://registry.npmjs.org/volar-service-emmet/-/volar-service-emmet-0.0.45.tgz", - "integrity": "sha512-9nLXSDkR1vA/3fQkFEsSXAu3XovQxOpTkVG2jilQgfek/K1ZLkaA/WMhN/TtmPmQg4NxE9Ni6mA5udBQ5gVXIA==", + "version": "0.0.62", + "resolved": "https://registry.npmjs.org/volar-service-emmet/-/volar-service-emmet-0.0.62.tgz", + "integrity": "sha512-U4dxWDBWz7Pi4plpbXf4J4Z/ss6kBO3TYrACxWNsE29abu75QzVS0paxDDhI6bhqpbDFXlpsDhZ9aXVFpnfGRQ==", "dev": true, + "license": "MIT", "dependencies": { "@emmetio/css-parser": "^0.4.0", "@emmetio/html-matcher": "^1.3.0", - "@vscode/emmet-helper": "^2.9.2" + "@vscode/emmet-helper": "^2.9.3", + "vscode-uri": "^3.0.8" }, "peerDependencies": { - "@volar/language-service": "~2.2.3" + "@volar/language-service": "~2.4.0" }, "peerDependenciesMeta": { "@volar/language-service": { @@ -20547,17 +20854,18 @@ } }, "node_modules/volar-service-html": { - "version": "0.0.45", - "resolved": "https://registry.npmjs.org/volar-service-html/-/volar-service-html-0.0.45.tgz", - "integrity": "sha512-tLTJqfy1v5C4nmeAsfekFIKPl4r4qDMyL0L9MWywr/EApZzPCsbeUGxCqdzxSMC2q7PMCfX2i167txDo+J0LVA==", + "version": "0.0.62", + "resolved": "https://registry.npmjs.org/volar-service-html/-/volar-service-html-0.0.62.tgz", + "integrity": "sha512-Zw01aJsZRh4GTGUjveyfEzEqpULQUdQH79KNEiKVYHZyuGtdBRYCHlrus1sueSNMxwwkuF5WnOHfvBzafs8yyQ==", "dev": true, + "license": "MIT", "dependencies": { - "vscode-html-languageservice": "npm:@johnsoncodehk/vscode-html-languageservice@5.2.0-34a5462", + "vscode-html-languageservice": "^5.3.0", "vscode-languageserver-textdocument": "^1.0.11", "vscode-uri": "^3.0.8" }, "peerDependencies": { - "@volar/language-service": "~2.2.3" + "@volar/language-service": "~2.4.0" }, "peerDependenciesMeta": { "@volar/language-service": { @@ -20565,35 +20873,17 @@ } } }, - "node_modules/volar-service-html/node_modules/@vscode/l10n": { - "version": "0.0.18", - "resolved": "https://registry.npmjs.org/@vscode/l10n/-/l10n-0.0.18.tgz", - "integrity": "sha512-KYSIHVmslkaCDyw013pphY+d7x1qV8IZupYfeIfzNA+nsaWHbn5uPuQRvdRFsa9zFzGeudPuoGoZ1Op4jrJXIQ==", - "dev": true - }, - "node_modules/volar-service-html/node_modules/vscode-html-languageservice": { - "name": "@johnsoncodehk/vscode-html-languageservice", - "version": "5.2.0-34a5462", - "resolved": "https://registry.npmjs.org/@johnsoncodehk/vscode-html-languageservice/-/vscode-html-languageservice-5.2.0-34a5462.tgz", - "integrity": "sha512-etqLfpSJ5zaw76KUNF603be6d6QsiQPmaHr9FKEp4zhLZJzWCCMH6Icak7MtLUFLZLMpL761mZNImi/joBo1ZA==", - "dev": true, - "dependencies": { - "@vscode/l10n": "^0.0.18", - "vscode-languageserver-textdocument": "^1.0.11", - "vscode-languageserver-types": "^3.17.5", - "vscode-uri": "^3.0.8" - } - }, "node_modules/volar-service-prettier": { - "version": "0.0.45", - "resolved": "https://registry.npmjs.org/volar-service-prettier/-/volar-service-prettier-0.0.45.tgz", - "integrity": "sha512-+mBS2EsDgp/kunKEBnHvhBwIQm5v2ahw4NKpKdg4sTpXy3UxqHt+Fq/wRYQ7Z8LlNVNRVfp75ThjM+w2zaZBAw==", + "version": "0.0.62", + "resolved": "https://registry.npmjs.org/volar-service-prettier/-/volar-service-prettier-0.0.62.tgz", + "integrity": "sha512-h2yk1RqRTE+vkYZaI9KYuwpDfOQRrTEMvoHol0yW4GFKc75wWQRrb5n/5abDrzMPrkQbSip8JH2AXbvrRtYh4w==", "dev": true, + "license": "MIT", "dependencies": { "vscode-uri": "^3.0.8" }, "peerDependencies": { - "@volar/language-service": "~2.2.3", + "@volar/language-service": "~2.4.0", "prettier": "^2.2 || ^3.0" }, "peerDependenciesMeta": { @@ -20606,19 +20896,21 @@ } }, "node_modules/volar-service-typescript": { - "version": "0.0.45", - "resolved": "https://registry.npmjs.org/volar-service-typescript/-/volar-service-typescript-0.0.45.tgz", - "integrity": "sha512-i/mMIIAMastJ2kgPo3qvX0Rrl7NyxhIYZ0ug/B4ambZcLPI1vzBgS2fmvyWX3jhBYHh8NmbAotFj+0Y9JtN47A==", + "version": "0.0.62", + "resolved": "https://registry.npmjs.org/volar-service-typescript/-/volar-service-typescript-0.0.62.tgz", + "integrity": "sha512-p7MPi71q7KOsH0eAbZwPBiKPp9B2+qrdHAd6VY5oTo9BUXatsOAdakTm9Yf0DUj6uWBAaOT01BSeVOPwucMV1g==", "dev": true, + "license": "MIT", "dependencies": { "path-browserify": "^1.0.1", - "semver": "^7.5.4", - "typescript-auto-import-cache": "^0.3.1", + "semver": "^7.6.2", + "typescript-auto-import-cache": "^0.3.3", "vscode-languageserver-textdocument": "^1.0.11", - "vscode-nls": "^5.2.0" + "vscode-nls": "^5.2.0", + "vscode-uri": "^3.0.8" }, "peerDependencies": { - "@volar/language-service": "~2.2.3" + "@volar/language-service": "~2.4.0" }, "peerDependenciesMeta": { "@volar/language-service": { @@ -20627,12 +20919,16 @@ } }, "node_modules/volar-service-typescript-twoslash-queries": { - "version": "0.0.45", - "resolved": "https://registry.npmjs.org/volar-service-typescript-twoslash-queries/-/volar-service-typescript-twoslash-queries-0.0.45.tgz", - "integrity": "sha512-KrPUUvKggZgV9mrDpstCzmf20irgv0ooMv+FGDzIIQUkya+d2+nSS8Mx2h9FvsYgLccUVw5jU3Rhwhd3pv/7qg==", + "version": "0.0.62", + "resolved": "https://registry.npmjs.org/volar-service-typescript-twoslash-queries/-/volar-service-typescript-twoslash-queries-0.0.62.tgz", + "integrity": "sha512-KxFt4zydyJYYI0kFAcWPTh4u0Ha36TASPZkAnNY784GtgajerUqM80nX/W1d0wVhmcOFfAxkVsf/Ed+tiYU7ng==", "dev": true, + "license": "MIT", + "dependencies": { + "vscode-uri": "^3.0.8" + }, "peerDependencies": { - "@volar/language-service": "~2.2.3" + "@volar/language-service": "~2.4.0" }, "peerDependenciesMeta": { "@volar/language-service": { @@ -20641,10 +20937,11 @@ } }, "node_modules/volar-service-typescript/node_modules/semver": { - "version": "7.6.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz", - "integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==", + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", "dev": true, + "license": "ISC", "bin": { "semver": "bin/semver.js" }, @@ -20652,47 +20949,81 @@ "node": ">=10" } }, + "node_modules/volar-service-yaml": { + "version": "0.0.62", + "resolved": "https://registry.npmjs.org/volar-service-yaml/-/volar-service-yaml-0.0.62.tgz", + "integrity": "sha512-k7gvv7sk3wa+nGll3MaSKyjwQsJjIGCHFjVkl3wjaSP2nouKyn9aokGmqjrl39mi88Oy49giog2GkZH526wjig==", + "dev": true, + "license": "MIT", + "dependencies": { + "vscode-uri": "^3.0.8", + "yaml-language-server": "~1.15.0" + }, + "peerDependencies": { + "@volar/language-service": "~2.4.0" + }, + "peerDependenciesMeta": { + "@volar/language-service": { + "optional": true + } + } + }, "node_modules/vscode-css-languageservice": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/vscode-css-languageservice/-/vscode-css-languageservice-6.3.0.tgz", - "integrity": "sha512-nU92imtkgzpCL0xikrIb8WvedV553F2BENzgz23wFuok/HLN5BeQmroMy26pUwFxV2eV8oNRmYCUv8iO7kSMhw==", + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/vscode-css-languageservice/-/vscode-css-languageservice-6.3.1.tgz", + "integrity": "sha512-1BzTBuJfwMc3A0uX4JBdJgoxp74cjj4q2mDJdp49yD/GuAq4X0k5WtK6fNcMYr+FfJ9nqgR6lpfCSZDkARJ5qQ==", "dev": true, + "license": "MIT", "dependencies": { "@vscode/l10n": "^0.0.18", - "vscode-languageserver-textdocument": "^1.0.11", + "vscode-languageserver-textdocument": "^1.0.12", "vscode-languageserver-types": "3.17.5", "vscode-uri": "^3.0.8" } }, - "node_modules/vscode-css-languageservice/node_modules/@vscode/l10n": { - "version": "0.0.18", - "resolved": "https://registry.npmjs.org/@vscode/l10n/-/l10n-0.0.18.tgz", - "integrity": "sha512-KYSIHVmslkaCDyw013pphY+d7x1qV8IZupYfeIfzNA+nsaWHbn5uPuQRvdRFsa9zFzGeudPuoGoZ1Op4jrJXIQ==", - "dev": true - }, "node_modules/vscode-html-languageservice": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/vscode-html-languageservice/-/vscode-html-languageservice-5.3.0.tgz", - "integrity": "sha512-C4Z3KsP5Ih+fjHpiBc5jxmvCl+4iEwvXegIrzu2F5pktbWvQaBT3YkVPk8N+QlSSMk8oCG6PKtZ/Sq2YHb5e8g==", + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/vscode-html-languageservice/-/vscode-html-languageservice-5.3.1.tgz", + "integrity": "sha512-ysUh4hFeW/WOWz/TO9gm08xigiSsV/FOAZ+DolgJfeLftna54YdmZ4A+lIn46RbdO3/Qv5QHTn1ZGqmrXQhZyA==", "dev": true, + "license": "MIT", "dependencies": { "@vscode/l10n": "^0.0.18", - "vscode-languageserver-textdocument": "^1.0.11", + "vscode-languageserver-textdocument": "^1.0.12", "vscode-languageserver-types": "^3.17.5", "vscode-uri": "^3.0.8" } }, - "node_modules/vscode-html-languageservice/node_modules/@vscode/l10n": { - "version": "0.0.18", - "resolved": "https://registry.npmjs.org/@vscode/l10n/-/l10n-0.0.18.tgz", - "integrity": "sha512-KYSIHVmslkaCDyw013pphY+d7x1qV8IZupYfeIfzNA+nsaWHbn5uPuQRvdRFsa9zFzGeudPuoGoZ1Op4jrJXIQ==", - "dev": true + "node_modules/vscode-json-languageservice": { + "version": "4.1.8", + "resolved": "https://registry.npmjs.org/vscode-json-languageservice/-/vscode-json-languageservice-4.1.8.tgz", + "integrity": "sha512-0vSpg6Xd9hfV+eZAaYN63xVVMOTmJ4GgHxXnkLCh+9RsQBkWKIghzLhW2B9ebfG+LQQg8uLtsQ2aUKjTgE+QOg==", + "dev": true, + "license": "MIT", + "dependencies": { + "jsonc-parser": "^3.0.0", + "vscode-languageserver-textdocument": "^1.0.1", + "vscode-languageserver-types": "^3.16.0", + "vscode-nls": "^5.0.0", + "vscode-uri": "^3.0.2" + }, + "engines": { + "npm": ">=7.0.0" + } + }, + "node_modules/vscode-json-languageservice/node_modules/jsonc-parser": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.3.1.tgz", + "integrity": "sha512-HUgH65KyejrUFPvHFPbqOY0rsFip3Bo5wb4ngvdi1EpCYWUQDC5V+Y7mZws+DLkr4M//zQJoanu1SP+87Dv1oQ==", + "dev": true, + "license": "MIT" }, "node_modules/vscode-jsonrpc": { "version": "8.2.0", "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-8.2.0.tgz", "integrity": "sha512-C+r0eKJUIfiDIfwJhria30+TYWPtuHJXHtI7J0YlOmKAo7ogxP20T0zxB7HZQIFhIyvoBPwWskjxrvAtfjyZfA==", "dev": true, + "license": "MIT", "engines": { "node": ">=14.0.0" } @@ -20702,6 +21033,7 @@ "resolved": "https://registry.npmjs.org/vscode-languageserver/-/vscode-languageserver-9.0.1.tgz", "integrity": "sha512-woByF3PDpkHFUreUa7Hos7+pUWdeWMXRd26+ZX2A8cFx6v/JPTtd4/uN0/jB6XQHYaOlHbio03NTHCqrgG5n7g==", "dev": true, + "license": "MIT", "dependencies": { "vscode-languageserver-protocol": "3.17.5" }, @@ -20714,34 +21046,39 @@ "resolved": "https://registry.npmjs.org/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.17.5.tgz", "integrity": "sha512-mb1bvRJN8SVznADSGWM9u/b07H7Ecg0I3OgXDuLdn307rl/J3A9YD6/eYOssqhecL27hK1IPZAsaqh00i/Jljg==", "dev": true, + "license": "MIT", "dependencies": { "vscode-jsonrpc": "8.2.0", "vscode-languageserver-types": "3.17.5" } }, "node_modules/vscode-languageserver-textdocument": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/vscode-languageserver-textdocument/-/vscode-languageserver-textdocument-1.0.11.tgz", - "integrity": "sha512-X+8T3GoiwTVlJbicx/sIAF+yuJAqz8VvwJyoMVhwEMoEKE/fkDmrqUgDMyBECcM2A2frVZIUj5HI/ErRXCfOeA==", - "dev": true + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/vscode-languageserver-textdocument/-/vscode-languageserver-textdocument-1.0.12.tgz", + "integrity": "sha512-cxWNPesCnQCcMPeenjKKsOCKQZ/L6Tv19DTRIGuLWe32lyzWhihGVJ/rcckZXJxfdKCFvRLS3fpBIsV/ZGX4zA==", + "dev": true, + "license": "MIT" }, "node_modules/vscode-languageserver-types": { "version": "3.17.5", "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.17.5.tgz", "integrity": "sha512-Ld1VelNuX9pdF39h2Hgaeb5hEZM2Z3jUrrMgWQAu82jMtZp7p3vJT3BzToKtZI7NgQssZje5o0zryOrhQvzQAg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/vscode-nls": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/vscode-nls/-/vscode-nls-5.2.0.tgz", "integrity": "sha512-RAaHx7B14ZU04EU31pT+rKz2/zSl7xMsfIZuo8pd+KZO6PXtQmpevpq3vxvWNcrGbdmhM/rr5Uw5Mz+NBfhVng==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/vscode-uri": { "version": "3.0.8", "resolved": "https://registry.npmjs.org/vscode-uri/-/vscode-uri-3.0.8.tgz", "integrity": "sha512-AyFQ0EVmsOZOlAnxoFOGOq1SQDWAB7C6aqMGS23svWAllfOaxbuFvcT8D1i8z3Gyn8fraVeZNNmN6e9bxxXkKw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/walk-back": { "version": "5.1.0", @@ -21118,10 +21455,11 @@ "dev": true }, "node_modules/xxhash-wasm": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/xxhash-wasm/-/xxhash-wasm-1.0.2.tgz", - "integrity": "sha512-ibF0Or+FivM9lNrg+HGJfVX8WJqgo+kCLDc4vx6xMeTce7Aj+DLttKbxxRR/gNLSAelRc1omAPlJ77N/Jem07A==", - "dev": true + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/xxhash-wasm/-/xxhash-wasm-1.1.0.tgz", + "integrity": "sha512-147y/6YNh+tlp6nd/2pWq38i9h6mz/EuQ6njIrmW8D1BS5nCqs0P6DG+m6zTGnNz5I+uhZ0SHxBs9BsPrwcKDA==", + "dev": true, + "license": "MIT" }, "node_modules/y18n": { "version": "5.0.8", @@ -21136,12 +21474,14 @@ "version": "3.1.1", "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/yaml": { - "version": "2.4.5", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.4.5.tgz", - "integrity": "sha512-aBx2bnqDzVOyNKfsysjA2ms5ZlnjSAW2eG3/L5G/CSujfjLJTJsEw1bGw8kCf04KodQWk1pxlGnZ56CRxiawmg==", + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.6.1.tgz", + "integrity": "sha512-7r0XPzioN/Q9kXBro/XPnA6kznR73DHq+GXh5ON7ZozRO6aMjbmiBuKste2wslTFkC5d1dw0GooOCepZXJ2SAg==", + "license": "ISC", "bin": { "yaml": "bin.mjs" }, @@ -21149,6 +21489,106 @@ "node": ">= 14" } }, + "node_modules/yaml-language-server": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/yaml-language-server/-/yaml-language-server-1.15.0.tgz", + "integrity": "sha512-N47AqBDCMQmh6mBLmI6oqxryHRzi33aPFPsJhYy3VTUGCdLHYjGh4FZzpUjRlphaADBBkDmnkM/++KNIOHi5Rw==", + "dev": true, + "license": "MIT", + "dependencies": { + "ajv": "^8.11.0", + "lodash": "4.17.21", + "request-light": "^0.5.7", + "vscode-json-languageservice": "4.1.8", + "vscode-languageserver": "^7.0.0", + "vscode-languageserver-textdocument": "^1.0.1", + "vscode-languageserver-types": "^3.16.0", + "vscode-nls": "^5.0.0", + "vscode-uri": "^3.0.2", + "yaml": "2.2.2" + }, + "bin": { + "yaml-language-server": "bin/yaml-language-server" + }, + "optionalDependencies": { + "prettier": "2.8.7" + } + }, + "node_modules/yaml-language-server/node_modules/prettier": { + "version": "2.8.7", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.7.tgz", + "integrity": "sha512-yPngTo3aXUUmyuTjeTUT75txrf+aMh9FiD7q9ZE/i6r0bPb22g4FsE6Y338PQX1bmfy08i9QQCB7/rcUAVntfw==", + "dev": true, + "license": "MIT", + "optional": true, + "bin": { + "prettier": "bin-prettier.js" + }, + "engines": { + "node": ">=10.13.0" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, + "node_modules/yaml-language-server/node_modules/request-light": { + "version": "0.5.8", + "resolved": "https://registry.npmjs.org/request-light/-/request-light-0.5.8.tgz", + "integrity": "sha512-3Zjgh+8b5fhRJBQZoy+zbVKpAQGLyka0MPgW3zruTF4dFFJ8Fqcfu9YsAvi/rvdcaTeWG3MkbZv4WKxAn/84Lg==", + "dev": true, + "license": "MIT" + }, + "node_modules/yaml-language-server/node_modules/vscode-jsonrpc": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-6.0.0.tgz", + "integrity": "sha512-wnJA4BnEjOSyFMvjZdpiOwhSq9uDoK8e/kpRJDTaMYzwlkrhG1fwDIZI94CLsLzlCK5cIbMMtFlJlfR57Lavmg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.0.0 || >=10.0.0" + } + }, + "node_modules/yaml-language-server/node_modules/vscode-languageserver": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/vscode-languageserver/-/vscode-languageserver-7.0.0.tgz", + "integrity": "sha512-60HTx5ID+fLRcgdHfmz0LDZAXYEV68fzwG0JWwEPBode9NuMYTIxuYXPg4ngO8i8+Ou0lM7y6GzaYWbiDL0drw==", + "dev": true, + "license": "MIT", + "dependencies": { + "vscode-languageserver-protocol": "3.16.0" + }, + "bin": { + "installServerIntoExtension": "bin/installServerIntoExtension" + } + }, + "node_modules/yaml-language-server/node_modules/vscode-languageserver-protocol": { + "version": "3.16.0", + "resolved": "https://registry.npmjs.org/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.16.0.tgz", + "integrity": "sha512-sdeUoAawceQdgIfTI+sdcwkiK2KU+2cbEYA0agzM2uqaUy2UpnnGHtWTHVEtS0ES4zHU0eMFRGN+oQgDxlD66A==", + "dev": true, + "license": "MIT", + "dependencies": { + "vscode-jsonrpc": "6.0.0", + "vscode-languageserver-types": "3.16.0" + } + }, + "node_modules/yaml-language-server/node_modules/vscode-languageserver-types": { + "version": "3.16.0", + "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.16.0.tgz", + "integrity": "sha512-k8luDIWJWyenLc5ToFQQMaSrqCHiLwyKPHKPQZ5zz21vM+vIVUSvsRpcbiECH4WR88K2XZqc4ScRcZ7nk/jbeA==", + "dev": true, + "license": "MIT" + }, + "node_modules/yaml-language-server/node_modules/yaml": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.2.2.tgz", + "integrity": "sha512-CBKFWExMn46Foo4cldiChEzn7S7SRV+wqiluAb6xmueD/fGyRHIhX8m14vVGgeFWjN540nKCNVj6P21eQjgTuA==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">= 14" + } + }, "node_modules/yargs": { "version": "17.7.2", "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", @@ -21291,10 +21731,11 @@ } }, "node_modules/zod-to-json-schema": { - "version": "3.23.3", - "resolved": "https://registry.npmjs.org/zod-to-json-schema/-/zod-to-json-schema-3.23.3.tgz", - "integrity": "sha512-TYWChTxKQbRJp5ST22o/Irt9KC5nj7CdBKYB/AosCRdj/wxEMvv4NNaj9XVUHDOIp53ZxArGhnw5HMZziPFjog==", + "version": "3.23.5", + "resolved": "https://registry.npmjs.org/zod-to-json-schema/-/zod-to-json-schema-3.23.5.tgz", + "integrity": "sha512-5wlSS0bXfF/BrL4jPAbz9da5hDlDptdEppYfe+x4eIJ7jioqKG9uUxOwPzqof09u/XeVdrgFu29lZi+8XNDJtA==", "dev": true, + "license": "ISC", "peerDependencies": { "zod": "^3.23.3" } diff --git a/package.json b/package.json index e11073f96..660bbfdfc 100644 --- a/package.json +++ b/package.json @@ -117,8 +117,8 @@ "tinycolor2": "^1.6.0" }, "devDependencies": { - "@astrojs/check": "^0.5.10", - "@astrojs/starlight": "^0.23.1", + "@astrojs/check": "^0.9.4", + "@astrojs/starlight": "^0.29.2", "@babel/plugin-proposal-private-property-in-object": "^7.21.11", "@changesets/cli": "^2.27.1", "@commitlint/cli": "^18.4.3", @@ -130,12 +130,12 @@ "@types/chai": "^4.3.9", "@types/tinycolor2": "^1.4.6", "@types/uuid": "^9.0.8", - "@typescript-eslint/parser": "^8.13.0", + "@typescript-eslint/parser": "^8.16.0", "@web/test-runner": "^0.18.2", "@web/test-runner-commands": "^0.9.0", "@web/test-runner-playwright": "^0.11.0", "acorn": "^8.11.3", - "astro": "^4.3.5", + "astro": "^4.16.16", "chai": "^5.0.0-alpha.2", "eslint": "^9.14.0", "eslint-plugin-mocha": "^10.5.0", @@ -157,9 +157,9 @@ "npm-run-all": "^4.1.5", "sass": "^1.69.5", "sharp": "^0.32.5", - "starlight-links-validator": "^0.12.1", + "starlight-links-validator": "^0.13.3", "stylus": "^0.56.0", - "typescript": "^5.3.3", + "typescript": "^5.7.2", "unist-util-visit": "^5.0.0", "uuid": "^9.0.1", "yaml": "^2.3.4" diff --git a/patches/@astrojs+starlight+0.29.2.patch b/patches/@astrojs+starlight+0.29.2.patch new file mode 100644 index 000000000..1e7207c08 --- /dev/null +++ b/patches/@astrojs+starlight+0.29.2.patch @@ -0,0 +1,36 @@ +diff --git a/node_modules/@astrojs/starlight/utils/createTranslationSystem.ts b/node_modules/@astrojs/starlight/utils/createTranslationSystem.ts +index 540b74b..0a06296 100644 +--- a/node_modules/@astrojs/starlight/utils/createTranslationSystem.ts ++++ b/node_modules/@astrojs/starlight/utils/createTranslationSystem.ts +@@ -125,6 +125,7 @@ function buildResources>( + // strings. We let TypeScript merge them into a single union type so that plugins with a TypeScript + // configuration preventing `UserI18nKeys` to be properly inferred can still get auto-completion + // for built-in UI strings. ++// @ts-expect-error not imported, only in locals.d.ts + export type I18nKeys = keyof BuiltInStrings | UserI18nKeys | keyof StarlightApp.I18n; + + export type I18nT = TFunction<'starlight', undefined> & { +diff --git a/node_modules/@astrojs/starlight/utils/translations-fs.ts b/node_modules/@astrojs/starlight/utils/translations-fs.ts +index 4bcfcda..9b783a9 100644 +--- a/node_modules/@astrojs/starlight/utils/translations-fs.ts ++++ b/node_modules/@astrojs/starlight/utils/translations-fs.ts +@@ -1,6 +1,7 @@ + import fs from 'node:fs'; + import path from 'node:path'; + import { fileURLToPath } from 'node:url'; ++// @ts-expect-error @types/js-yaml not installed + import yaml from 'js-yaml'; + import type { i18nSchemaOutput } from '../schemas/i18n'; + import { createTranslationSystem } from './createTranslationSystem'; +diff --git a/node_modules/@astrojs/starlight/utils/translations.ts b/node_modules/@astrojs/starlight/utils/translations.ts +index 499ded2..87e0a1a 100644 +--- a/node_modules/@astrojs/starlight/utils/translations.ts ++++ b/node_modules/@astrojs/starlight/utils/translations.ts +@@ -1,5 +1,7 @@ + import { getCollection, type CollectionEntry, type DataCollectionKey } from 'astro:content'; ++// @ts-expect-error virtual imports not working in context of installed as dependency + import config from 'virtual:starlight/user-config'; ++// @ts-expect-error virtual imports not working in context of installed as dependency + import pluginTranslations from 'virtual:starlight/plugin-translations'; + import type { i18nSchemaOutput } from '../schemas/i18n'; + import { createTranslationSystem } from './createTranslationSystem'; diff --git a/patches/starlight-links-validator+0.13.3.patch b/patches/starlight-links-validator+0.13.3.patch new file mode 100644 index 000000000..61449a38b --- /dev/null +++ b/patches/starlight-links-validator+0.13.3.patch @@ -0,0 +1,18 @@ +diff --git a/node_modules/starlight-links-validator/libs/remark.ts b/node_modules/starlight-links-validator/libs/remark.ts +index b3239f3..a93aa26 100644 +--- a/node_modules/starlight-links-validator/libs/remark.ts ++++ b/node_modules/starlight-links-validator/libs/remark.ts +@@ -56,7 +56,12 @@ export const remarkStarlightLinksValidator: Plugin<[{ base: string; srcDir: URL + break + } + +- fileHeadings.push(slugger.slug(content)) ++ // Remove trailing -, given that a heading can contain trailing markup e.g. a deprecation ++ // GitHub Slugger considers it as content and adds a - ++ // Whereas Astro Markdown renderer removes this trailing - from the DOM node's id ++ // See: tests/markup-in-heading ++ const headingSlug = slugger.slug(content).replace(/-$/, '') ++ fileHeadings.push(headingSlug) + + break + } diff --git a/types/Config.ts b/types/Config.ts index da2afbfca..aa9557167 100644 --- a/types/Config.ts +++ b/types/Config.ts @@ -93,6 +93,7 @@ export interface PlatformConfig extends RegexOptions { transformGroup?: string; transforms?: string[] | Omit[]; expand?: ExpandConfig; + preprocessors?: string[]; prefix?: string; buildPath?: string; files?: File[]; diff --git a/types/DesignToken.ts b/types/DesignToken.ts index 8bafa069a..30dfe8f93 100644 --- a/types/DesignToken.ts +++ b/types/DesignToken.ts @@ -25,6 +25,10 @@ export interface DesignToken { comment?: string; themeable?: boolean; attributes?: Record; + /** + * When flattening tokens, DesignToken is given a key that matches the original ancestor tree e.g. `{colors.red.500}` + */ + key?: string; [key: string]: any; } @@ -71,6 +75,8 @@ export interface TransformedTokens { export interface Dictionary { tokens: TransformedTokens; allTokens: TransformedToken[]; + tokenMap: Map; unfilteredTokens?: TransformedTokens; unfilteredAllTokens?: TransformedToken[]; + unfilteredTokenMap?: Map; }