
Research
/Security News
9 Malicious NuGet Packages Deliver Time-Delayed Destructive Payloads
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.
@coveo/atomic
Advanced tools
A web-component library for building modern UIs interfacing with the Coveo platform
A web-component library for building modern UIs interfacing with the Coveo platform. Atomic web-components are built with Stencil. They are self-encapsulated, composable, and light-weight.
Using the library: Coveo Atomic Library Official Documentation.
The @coveo/atomic package exposes the following entry points:
@coveo/atomic: exports various types and utilities used by Coveo Atomic.@coveo/atomic/loader: exports the Coveo Atomic components types, as well as the defineCustomElements and setNonce utilities.@coveo/atomic/themes: exports the sample Coveo Atomic themes.@coveo/atomic/assets: exports the SVG icons used by Coveo Atomic.@coveo/atomic/lang: exports the localization files used by Coveo Atomic.Once you have cloned the repo, follow the instructions in the top-level README.md to install dependencies and link packages.
To start the project in development mode, run:
pnpm run start
To build the library for production, run:
pnpm run build
To run the unit tests for the components, run:
pnpm test
To open cypress, run:
pnpm run e2e:watch
To run all the test, run:
pnpm run e2e
To run all the test in Firefox:
pnpm run e2e:firefox
When building Atomic components, a series of decorators are used to make development faster.
InitializeBindings is a utility that automatically fetches the bindings from the parent atomic-search-interface or atomic-external component. This decorator has to be applied to a property named bindings.
Important In order for a component using this decorator to render properly, it should have an internal state bound to one of the properties from bindings. This is possible by using the BindStateToController decorator along with a State decorator.
Here is a complete example:
import {
InitializeBindings,
InitializableComponent,
BindStateToController,
Bindings,
} from '@coveo/atomic';
import {ControllerState, Controller, buildController} from '@coveo/headless';
import {Component, State} from '@stencil/core';
@Component({
tag: 'atomic-component',
})
export class AtomicComponent implements InitializableComponent {
@InitializeBindings() public bindings!: Bindings;
private controller!: Controller;
// Automatically subscribes the `controllerState` to the state of the `controller`
@BindStateToController('controller')
@State()
private controllerState!: ControllerState;
// Method called after bindings are defined, where controllers should be initialized
public initialize() {
this.controller = buildController(this.bindings.engine);
}
render() {
return [this.strings.value(), this.controllerState.value];
}
}
ResultContext is a utility that automatically fetches the result from the parent component's rendered atomic-result. This utility is used inside of custom result template components.
import {ResultContext} from '@coveo/atomic';
import {Component, State} from '@stencil/core';
@Component({
tag: 'atomic-result-component',
})
export class AtomicResultComponent {
@ResultContext() private result!: Result;
@State() public error!: Error;
public render() {
return this.result.title;
}
}
To generate a new component, use the following command:
pnpm turbo generate-component --filter=@coveo/atomic -- --name=<component-name> --output=<path-to-output-directory>
The output argument is optional. If not provided, it will default to src/components/commerce.
For example, to generate a component named atomic-ball, run:
pnpm turbo generate-component --filter=@coveo/atomic -- --name=ball
This will create the necessary component files under the default path src/components/commerce/atomic-ball.
If you'd like to specify a different path, you can use the --output flag. For example, to generate the component under src/components/search, run:
pnpm turbo generate-component --filter=@coveo/atomic -- --name=ball --output=src/components/search
You can also use --name=atomic-ball if you'd like, but the script will automatically add the "atomic" prefix if necessary.
This will create the component in the specified directory (src/components/search/atomic-ball in this case), or use the default src/components/commerce/atomic-ball if no output is provided.
FAQs
A web-component library for building modern UIs interfacing with the Coveo platform
The npm package @coveo/atomic receives a total of 41,065 weekly downloads. As such, @coveo/atomic popularity was classified as popular.
We found that @coveo/atomic demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 15 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.