From a8b3f6a500a1731a78fab45de93745bbb57415d8 Mon Sep 17 00:00:00 2001 From: Aviv Keller Date: Wed, 19 Nov 2025 16:35:02 -0500 Subject: [PATCH 1/2] chore(ui-components): add README --- packages/ui-components/README.md | 10 ++++++++ packages/ui-components/package.json | 2 +- packages/ui-components/scripts/publish.mjs | 4 +++- .../ui-components/src/Common/Search/README.md | 23 +++++++++++++++++++ 4 files changed, 37 insertions(+), 2 deletions(-) create mode 100644 packages/ui-components/README.md create mode 100644 packages/ui-components/src/Common/Search/README.md diff --git a/packages/ui-components/README.md b/packages/ui-components/README.md new file mode 100644 index 0000000000000..c4bebc1de3d83 --- /dev/null +++ b/packages/ui-components/README.md @@ -0,0 +1,10 @@ +# Node.js UI Components + +This package is compromised of UI components for use in the Node.js website, documentation, +and other aspects of the project. + +The components are based on [this design file](https://www.figma.com/design/a10cjjw3MzvRQMPT9FP3xz/Node.js). + +Most components in this package are available on [Chromatic](https://www.chromatic.com/library?appId=64c7d71358830e9105808652). + +For additional details regarding specific components, refer to the [nodejs/nodejs.org](https://github.com/nodejs/nodejs.org) repository. diff --git a/packages/ui-components/package.json b/packages/ui-components/package.json index 8c51a373a3a9f..331502438805d 100644 --- a/packages/ui-components/package.json +++ b/packages/ui-components/package.json @@ -1,6 +1,6 @@ { "name": "@node-core/ui-components", - "version": "1.3.0", + "version": "1.4.0", "type": "module", "exports": { "./*": [ diff --git a/packages/ui-components/scripts/publish.mjs b/packages/ui-components/scripts/publish.mjs index 095b0d07ce48c..7834b7126be0f 100644 --- a/packages/ui-components/scripts/publish.mjs +++ b/packages/ui-components/scripts/publish.mjs @@ -1,5 +1,5 @@ import { spawnSync } from 'node:child_process'; -import { writeFile } from 'node:fs/promises'; +import { writeFile, copyFile } from 'node:fs/promises'; import pkg from '../package.json' with { type: 'json' }; @@ -17,6 +17,8 @@ await writeFile( 'utf8' ); +await copyFile('README.md', 'dist/README.md'); + // Now, publish the generated `dist` folder const { status, error } = spawnSync('pnpm', ['publish', '--no-git-checks'], { cwd: 'dist', diff --git a/packages/ui-components/src/Common/Search/README.md b/packages/ui-components/src/Common/Search/README.md new file mode 100644 index 0000000000000..7939460b3f961 --- /dev/null +++ b/packages/ui-components/src/Common/Search/README.md @@ -0,0 +1,23 @@ +# Orama Search Components + +This directory contains components for creating a Node.js-styled Orama Search Box. + +A search modal is constructed using the following format, but additional components can also be used. + +```jsx + + } + > + {/* If you want to include search suggestions, there's a SearchSuggestions + component */} + + + +``` + +(For this example, `myOramaClient` and `MySearchItemComponent` refer to the Orama client, and search item component, respectively. These variables **are not** included in @node-core/ui-components at this time) From fb58e9b6c919ec531a54e9786442e8607e4dd0cf Mon Sep 17 00:00:00 2001 From: Brian Muenzenmeyer Date: Thu, 20 Nov 2025 19:24:53 -0600 Subject: [PATCH 2/2] Apply suggestion from @Copilot Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Brian Muenzenmeyer --- packages/ui-components/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/ui-components/README.md b/packages/ui-components/README.md index c4bebc1de3d83..f701e050751b7 100644 --- a/packages/ui-components/README.md +++ b/packages/ui-components/README.md @@ -1,6 +1,6 @@ # Node.js UI Components -This package is compromised of UI components for use in the Node.js website, documentation, +This package is comprised of UI components for use in the Node.js website, documentation, and other aspects of the project. The components are based on [this design file](https://www.figma.com/design/a10cjjw3MzvRQMPT9FP3xz/Node.js).