@yahoo/uds 3.134.0 → 3.134.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/dist/cli/dist/lib/args.cjs +7 -3
  2. package/dist/cli/dist/lib/args.js +7 -3
  3. package/dist/components/client/Menu/Menu.ItemCheckbox.d.cts +1 -1
  4. package/dist/components/client/Menu/Menu.ItemCheckbox.d.ts +1 -1
  5. package/dist/styles/styler.d.cts +26 -26
  6. package/dist/styles/styler.d.ts +26 -26
  7. package/dist/tailwind/dist/commands/css.cjs +1 -0
  8. package/dist/tailwind/dist/commands/css.d.cts.map +1 -1
  9. package/dist/tailwind/dist/commands/css.d.ts.map +1 -1
  10. package/dist/tailwind/dist/commands/css.helpers.cjs +8 -1
  11. package/dist/tailwind/dist/commands/css.helpers.js +8 -1
  12. package/dist/tailwind/dist/commands/css.helpers.js.map +1 -1
  13. package/dist/tailwind/dist/commands/css.js +1 -0
  14. package/dist/tailwind/dist/commands/css.js.map +1 -1
  15. package/dist/tailwind/dist/css/generate.cjs +7 -4
  16. package/dist/tailwind/dist/css/generate.d.cts.map +1 -1
  17. package/dist/tailwind/dist/css/generate.d.ts.map +1 -1
  18. package/dist/tailwind/dist/css/generate.js +7 -4
  19. package/dist/tailwind/dist/css/generate.js.map +1 -1
  20. package/dist/tailwind/dist/css/nodeUtils.cjs +19 -8
  21. package/dist/tailwind/dist/css/nodeUtils.js +19 -8
  22. package/dist/tailwind/dist/css/nodeUtils.js.map +1 -1
  23. package/dist/tailwind/dist/css/perf.cjs +92 -0
  24. package/dist/tailwind/dist/css/perf.js +89 -0
  25. package/dist/tailwind/dist/css/perf.js.map +1 -0
  26. package/dist/tailwind/dist/css/purgeWorker.cjs +47 -0
  27. package/dist/tailwind/dist/css/purgeWorker.d.cts +2 -0
  28. package/dist/tailwind/dist/css/purgeWorker.d.ts +2 -0
  29. package/dist/tailwind/dist/css/purgeWorker.js +48 -0
  30. package/dist/tailwind/dist/css/purgeWorker.js.map +1 -0
  31. package/dist/tailwind/dist/css/runner.cjs +158 -145
  32. package/dist/tailwind/dist/css/runner.js +158 -145
  33. package/dist/tailwind/dist/css/runner.js.map +1 -1
  34. package/dist/tailwind/dist/css/workerPool.cjs +89 -0
  35. package/dist/tailwind/dist/css/workerPool.js +90 -0
  36. package/dist/tailwind/dist/css/workerPool.js.map +1 -0
  37. package/dist/tailwind/dist/purger/optimized/ast/expressions.cjs +95 -15
  38. package/dist/tailwind/dist/purger/optimized/ast/expressions.js +95 -15
  39. package/dist/tailwind/dist/purger/optimized/ast/expressions.js.map +1 -1
  40. package/dist/tailwind/dist/purger/optimized/purgeFromCode.cjs +38 -14
  41. package/dist/tailwind/dist/purger/optimized/purgeFromCode.d.cts.map +1 -1
  42. package/dist/tailwind/dist/purger/optimized/purgeFromCode.d.ts.map +1 -1
  43. package/dist/tailwind/dist/purger/optimized/purgeFromCode.js +39 -15
  44. package/dist/tailwind/dist/purger/optimized/purgeFromCode.js.map +1 -1
  45. package/dist/tailwind/dist/purger/optimized/types.d.cts +10 -0
  46. package/dist/tailwind/dist/purger/optimized/types.d.cts.map +1 -1
  47. package/dist/tailwind/dist/purger/optimized/types.d.ts +10 -0
  48. package/dist/tailwind/dist/purger/optimized/types.d.ts.map +1 -1
  49. package/dist/uds/generated/componentData.cjs +557 -557
  50. package/dist/uds/generated/componentData.js +557 -557
  51. package/generated/componentData.json +915 -915
  52. package/package.json +1 -1
  53. package/dist/tailwind/dist/purger/optimized/ast/jsx.cjs +0 -16
  54. package/dist/tailwind/dist/purger/optimized/ast/jsx.js +0 -17
  55. package/dist/tailwind/dist/purger/optimized/ast/jsx.js.map +0 -1
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@yahoo/uds",
3
3
  "description": "Yahoo Universal System",
4
- "version": "3.134.0",
4
+ "version": "3.134.1",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
7
7
  "module": "./dist/index.js",
@@ -1,16 +0,0 @@
1
- /*! © 2026 Yahoo, Inc. UDS Tailwind and Purger v0.0.0-development */
2
- require("../../../_virtual/_rolldown/runtime.cjs");
3
- let ts_morph = require("ts-morph");
4
- //#region src/purger/optimized/ast/jsx.ts
5
- /**
6
- * Find all JSX usages of a component from its identifier
7
- */
8
- const findJsxReferences = (identifier) => {
9
- try {
10
- return identifier.findReferencesAsNodes().map((reference) => reference.getFirstAncestor((n) => ts_morph.Node.isJsxOpeningElement(n) || ts_morph.Node.isJsxSelfClosingElement(n))).filter((node) => Boolean(node) && (ts_morph.Node.isJsxOpeningElement(node) || ts_morph.Node.isJsxSelfClosingElement(node)));
11
- } catch {
12
- return [];
13
- }
14
- };
15
- //#endregion
16
- exports.findJsxReferences = findJsxReferences;
@@ -1,17 +0,0 @@
1
- /*! © 2026 Yahoo, Inc. UDS Tailwind and Purger v0.0.0-development */
2
- import { Node } from "ts-morph";
3
- //#region src/purger/optimized/ast/jsx.ts
4
- /**
5
- * Find all JSX usages of a component from its identifier
6
- */
7
- const findJsxReferences = (identifier) => {
8
- try {
9
- return identifier.findReferencesAsNodes().map((reference) => reference.getFirstAncestor((n) => Node.isJsxOpeningElement(n) || Node.isJsxSelfClosingElement(n))).filter((node) => Boolean(node) && (Node.isJsxOpeningElement(node) || Node.isJsxSelfClosingElement(node)));
10
- } catch {
11
- return [];
12
- }
13
- };
14
- //#endregion
15
- export { findJsxReferences };
16
-
17
- //# sourceMappingURL=jsx.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"jsx.js","names":[],"sources":["../../../../src/purger/optimized/ast/jsx.ts"],"sourcesContent":["import type {\n ArrowFunction,\n CallExpression,\n FunctionDeclaration,\n FunctionExpression,\n Identifier,\n JsxElement,\n JsxSelfClosingElement,\n VariableDeclaration,\n} from 'ts-morph';\nimport { Node, SyntaxKind } from 'ts-morph';\n\nimport type { JsxElementWithAttributes, ParentComponentInfo } from '../types';\n\n/**\n * Check if an expression is using React.forwardRef\n */\nexport const isForwardRefExpression = (node: Node): node is CallExpression => {\n if (!Node.isCallExpression(node)) {\n return false;\n }\n\n const expression = node.getExpression();\n\n if (Node.isIdentifier(expression) && expression.getText() === 'forwardRef') {\n return true;\n }\n\n if (Node.isPropertyAccessExpression(expression) && expression.getText() === 'React.forwardRef') {\n return true;\n }\n\n return false;\n};\n\n/**\n * Check if a node is a JSX component (PascalCase name)\n */\nexport const isJsxComponent = (\n node: Node,\n): node is VariableDeclaration | FunctionDeclaration | FunctionExpression | ArrowFunction => {\n let name: string | undefined;\n\n if (\n Node.isVariableDeclaration(node) ||\n Node.isFunctionDeclaration(node) ||\n Node.isClassDeclaration(node)\n ) {\n name = node.getName();\n } else if (Node.isFunctionExpression(node) || Node.isArrowFunction(node)) {\n const variableDeclaration = node.getFirstAncestorByKind(SyntaxKind.VariableDeclaration);\n name = variableDeclaration?.getName();\n }\n\n return name ? /^[A-Z]/.test(name) : false;\n};\n\n/**\n * Get the function declaration from a component, unwrapping forwardRef if needed\n */\nexport const getReactFunctionDeclaration = (\n declaration: Node,\n): ArrowFunction | FunctionDeclaration | FunctionExpression | null => {\n if (!isJsxComponent(declaration)) {\n return null;\n }\n\n if (Node.isFunctionDeclaration(declaration)) {\n return declaration;\n }\n\n if (Node.isVariableDeclaration(declaration)) {\n const initializer = declaration.getInitializer();\n if (!initializer) {\n return null;\n }\n\n if (isForwardRefExpression(initializer)) {\n const [arg] = initializer.getArguments();\n if (\n Node.isFunctionDeclaration(arg) ||\n Node.isFunctionExpression(arg) ||\n Node.isArrowFunction(arg)\n ) {\n return arg;\n }\n } else if (\n Node.isFunctionDeclaration(initializer) ||\n Node.isFunctionExpression(initializer) ||\n Node.isArrowFunction(initializer)\n ) {\n return initializer;\n }\n }\n\n return null;\n};\n\n/**\n * Get all JSX elements from a node\n */\nexport const getJsxElements = (node: Node): (JsxElement | JsxSelfClosingElement)[] => {\n return node\n .getDescendants()\n .filter((n) => Node.isJsxElement(n) || Node.isJsxSelfClosingElement(n)) as (\n | JsxElement\n | JsxSelfClosingElement\n )[];\n};\n\n/**\n * Find all JSX usages of a component from its identifier\n */\nexport const findJsxReferences = (identifier: Identifier): JsxElementWithAttributes[] => {\n try {\n return identifier\n .findReferencesAsNodes()\n .map((reference) =>\n reference.getFirstAncestor(\n (n) => Node.isJsxOpeningElement(n) || Node.isJsxSelfClosingElement(n),\n ),\n )\n .filter(\n (node): node is JsxElementWithAttributes =>\n Boolean(node) && (Node.isJsxOpeningElement(node) || Node.isJsxSelfClosingElement(node)),\n );\n } catch {\n return [];\n }\n};\n\n/**\n * Get the parent component that contains a JSX reference.\n * Returns information about the component including spread rest identifier.\n */\nexport const getParentComponentInfo = (\n reference: JsxElementWithAttributes,\n): ParentComponentInfo | undefined => {\n // Walk up to find the parent component\n const block = reference.getParentWhile((parent) => !getReactFunctionDeclaration(parent));\n if (!block) {\n return undefined;\n }\n\n const blockParent = block.getParent();\n if (!blockParent) {\n return undefined;\n }\n\n const reactComponent = getReactFunctionDeclaration(blockParent);\n if (!reactComponent) {\n return undefined;\n }\n\n // Get component name\n let componentName: string | undefined;\n const variableDeclaration = reactComponent.getFirstAncestorByKind(SyntaxKind.VariableDeclaration);\n if (variableDeclaration) {\n componentName = variableDeclaration.getName();\n } else if (Node.isFunctionDeclaration(reactComponent)) {\n componentName = reactComponent.getName();\n }\n\n if (!componentName) {\n return undefined;\n }\n\n // Extract parameter info\n let spreadRestIdentifier: string | undefined;\n let paramIdentifier: string | undefined;\n\n reactComponent.getParameters().forEach((parameter) => {\n const objectBindingPattern = parameter.getChildrenOfKind(SyntaxKind.ObjectBindingPattern)[0];\n const identifier = parameter.getChildrenOfKind(SyntaxKind.Identifier)[0];\n\n if (objectBindingPattern) {\n const dotDotToken = objectBindingPattern.getFirstDescendantByKind(SyntaxKind.DotDotDotToken);\n if (dotDotToken) {\n spreadRestIdentifier = dotDotToken\n .getParent()\n ?.getFirstChildByKindOrThrow(SyntaxKind.Identifier)\n .getText();\n }\n } else if (identifier) {\n paramIdentifier = identifier.getText();\n }\n });\n\n return { componentName, spreadRestIdentifier, paramIdentifier };\n};\n"],"mappings":";;;;;;AAiHA,MAAa,qBAAqB,eAAuD;AACvF,KAAI;AACF,SAAO,WACJ,uBAAuB,CACvB,KAAK,cACJ,UAAU,kBACP,MAAM,KAAK,oBAAoB,EAAE,IAAI,KAAK,wBAAwB,EAAE,CACtE,CACF,CACA,QACE,SACC,QAAQ,KAAK,KAAK,KAAK,oBAAoB,KAAK,IAAI,KAAK,wBAAwB,KAAK,EACzF;SACG;AACN,SAAO,EAAE"}