An open source design system that's fully customizable and agent ready
TypeScript
docs: update stale facebookexperimental/xds links to facebook/astryx (#3202)
Durvesh Pilankar7b3804912cdc
diff --git a/.changeset/stale-org-doc-links.md b/.changeset/stale-org-doc-links.mdnew file mode 100644index 0000000000..97b2420900--- /dev/null+++ b/.changeset/stale-org-doc-links.md@@ -0,0 +1,6 @@+---+'@astryxdesign/core': patch+---++[docs] Update stale `facebookexperimental/xds` doc/JSDoc links to the current `facebook/astryx` namespace in source comments (theme/syntax `@see` references). The old org 301-redirects, so these weren't broken — just stale — and this matches the canonical org used elsewhere+@durvesh1992diff --git a/internal/eslint-plugin-astryx/no-react-introspection.js b/internal/eslint-plugin-astryx/no-react-introspection.jsindex 483919b92f..ae9a5a70d7 100644--- a/internal/eslint-plugin-astryx/no-react-introspection.js+++ b/internal/eslint-plugin-astryx/no-react-introspection.js@@ -19,7 +19,7 @@* - Data-driven APIs (array of config objects)* - CSS-based solutions (grid, flexbox, :nth-child, etc.)*- * @see https://github.com/facebookexperimental/xds/wiki/API-Conventions+ * @see https://github.com/facebook/astryx/wiki/API-Conventions*/// React.Children methods that introspect the children tree@@ -39,7 +39,7 @@ const noReactIntrospectionRule = {'Ban React child introspection (Children.map, cloneElement, child.props, child.type)',category: 'Astryx Architecture',recommended: true,- url: 'https://github.com/facebookexperimental/xds/wiki/API-Conventions',+ url: 'https://github.com/facebook/astryx/wiki/API-Conventions',},messages: {childrenMethod:diff --git a/internal/eslint-plugin-astryx/presentational-component.js b/internal/eslint-plugin-astryx/presentational-component.jsindex 1ad3fd05d1..6e65913143 100644--- a/internal/eslint-plugin-astryx/presentational-component.js+++ b/internal/eslint-plugin-astryx/presentational-component.js@@ -12,7 +12,7 @@* Applied to components listed in PRESENTATIONAL_COMPONENTS.* useId, useMemo, useCallback, useContext (read-only) are allowed.*- * See: https://github.com/facebookexperimental/xds/issues/493+ * See: https://github.com/facebook/astryx/issues/493*//**@@ -98,7 +98,7 @@ const presentationalComponentRule = {'Prevent presentational components from remembering, watching, or coordinating',category: 'Astryx Architecture',recommended: true,- url: 'https://github.com/facebookexperimental/xds/issues/493',+ url: 'https://github.com/facebook/astryx/issues/493',},messages: {remembers:diff --git a/packages/core/src/theme/syntax/SyntaxTheme.tsx b/packages/core/src/theme/syntax/SyntaxTheme.tsxindex a335d30ee4..35a491b58a 100644--- a/packages/core/src/theme/syntax/SyntaxTheme.tsx+++ b/packages/core/src/theme/syntax/SyntaxTheme.tsx@@ -8,7 +8,7 @@* @output SyntaxTheme provider, useSyntaxTheme hook* @position Provider component; wraps code surfaces to apply syntax coloring*- * @see https://github.com/facebookexperimental/xds/issues/1148+ * @see https://github.com/facebook/astryx/issues/1148*/import React, {createContext, use, useMemo} from 'react';diff --git a/packages/core/src/theme/syntax/defineSyntaxTheme.ts b/packages/core/src/theme/syntax/defineSyntaxTheme.tsindex 6c74e21c94..036f954221 100644--- a/packages/core/src/theme/syntax/defineSyntaxTheme.ts+++ b/packages/core/src/theme/syntax/defineSyntaxTheme.ts@@ -1,6 +1,6 @@// Copyright (c) Meta Platforms, Inc. and affiliates.-"use strict";+'use strict';/*** @file defineSyntaxTheme.ts@@ -8,7 +8,7 @@* @output defineSyntaxTheme, SyntaxTheme, syntaxThemeStyle* @position Syntax theme definition API; consumed by presets, SyntaxTheme, defineTheme*- * @see https://github.com/facebookexperimental/xds/issues/1148+ * @see https://github.com/facebook/astryx/issues/1148*/import {syntaxTokenDefaults, type SyntaxTokenName} from './tokens';@@ -41,7 +41,10 @@ export type SyntaxThemeTokenKey =export type SyntaxTokenValue = string | [light: string, dark: string];/** Token map for defineSyntaxTheme input — values can be strings or tuples. */-export type SyntaxThemeTokenInput = Record<SyntaxThemeTokenKey, SyntaxTokenValue>;+export type SyntaxThemeTokenInput = Record<+ SyntaxThemeTokenKey,+ SyntaxTokenValue+>;/** Resolved token map — all values are CSS strings (tuples resolved to light-dark()). */export type SyntaxThemeTokenMap = Record<SyntaxThemeTokenKey, string>;@@ -73,8 +76,9 @@ function toCSSProperty(key: SyntaxThemeTokenKey): SyntaxTokenName {}/** All valid human-readable token keys, derived from the defaults. */-export const ALL_SYNTAX_KEYS: SyntaxThemeTokenKey[] = Object.keys(syntaxTokenDefaults)- .map(k => k.replace(CSS_PREFIX, '') as SyntaxThemeTokenKey);+export const ALL_SYNTAX_KEYS: SyntaxThemeTokenKey[] = Object.keys(+ syntaxTokenDefaults,+).map(k => k.replace(CSS_PREFIX, '') as SyntaxThemeTokenKey);// =============================================================================// Helpers@@ -130,12 +134,17 @@ export function resolveSyntaxTokenForMode(* },* });*/-export function defineSyntaxTheme(input: SyntaxThemeInput): SyntaxThemeDefinition {+export function defineSyntaxTheme(+ input: SyntaxThemeInput,+): SyntaxThemeDefinition {const missing = ALL_SYNTAX_KEYS.filter(key => !(key in input.tokens));if (missing.length > 0) {console.warn(- '[Astryx] defineSyntaxTheme("' + input.name + '"): missing tokens: ' +- missing.join(', ') + '. All 14 syntax tokens are required.',+ '[Astryx] defineSyntaxTheme("' ++ input.name ++ '"): missing tokens: ' ++ missing.join(', ') ++ '. All 14 syntax tokens are required.',);}@@ -169,7 +178,7 @@ export function syntaxThemeStyle(/** Convert a syntax theme to CSS declarations (no selector wrapper). */export function syntaxThemeToCSS(theme: SyntaxThemeDefinition): string {- return ALL_SYNTAX_KEYS- .map(key => toCSSProperty(key) + ': ' + theme.tokens[key] + ';')- .join('\n ');+ return ALL_SYNTAX_KEYS.map(+ key => toCSSProperty(key) + ': ' + theme.tokens[key] + ';',+ ).join('\n ');}diff --git a/packages/core/src/theme/syntax/presets.ts b/packages/core/src/theme/syntax/presets.tsindex 496a6a0e52..0a998bd911 100644--- a/packages/core/src/theme/syntax/presets.ts+++ b/packages/core/src/theme/syntax/presets.ts@@ -8,10 +8,13 @@* All original themes are MIT licensed. Only color values are extracted.* See THIRD_PARTY_LICENSES.md for full attribution.*- * @see https://github.com/facebookexperimental/xds/issues/1148+ * @see https://github.com/facebook/astryx/issues/1148*/-import {defineSyntaxTheme, type SyntaxThemeDefinition} from './defineSyntaxTheme';+import {+ defineSyntaxTheme,+ type SyntaxThemeDefinition,+} from './defineSyntaxTheme';/** One Dark Pro (Binaryify) — MIT */export const oneDarkPro: SyntaxThemeDefinition = defineSyntaxTheme({diff --git a/packages/core/src/theme/syntax/tokens.ts b/packages/core/src/theme/syntax/tokens.tsindex fd247008bd..45c6c5bc0c 100644--- a/packages/core/src/theme/syntax/tokens.ts+++ b/packages/core/src/theme/syntax/tokens.ts@@ -16,7 +16,7 @@* 14-token architecture validated against 11 community code themes.* All themes map cleanly to these 14 slots.*- * @see https://github.com/facebookexperimental/xds/issues/1148+ * @see https://github.com/facebook/astryx/issues/1148*/export const syntaxTokenDefaults = {diff --git a/scripts/sync-exports.js b/scripts/sync-exports.jsindex 4d984d4e3f..60ac8a9695 100644--- a/scripts/sync-exports.js+++ b/scripts/sync-exports.js@@ -95,7 +95,7 @@ const STATIC_EXPORTS = {* Server Components. Each entry points to a `utils.ts` file that* re-exports only the server-safe subset of a component's utilities.*- * See: https://github.com/facebookexperimental/xds/issues/1977+ * See: https://github.com/facebook/astryx/issues/1977*/const UTIL_SUBPATH_DIRS = ['Calendar',