npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@incrowd/article-rendering-engine

v2.10.9

Published

A component for rendering article from the CMS.

Readme

InCrowd Article Rendering Engine (ICARE)

A component for rendering article from the CMS.

Motivation

To reuse this component across all web apps.

Getting Started

npm i @incrowd/article-rendering-engine

Then import @incrowd/article-rendering-engine/public/icare_example.css in global scope.

/* .icare {} */
.icare * {
	box-sizing: border-box;
}
.icare-body {
	padding: 0 1rem 1rem;
}
.icare h1 {
	font-size: 2rem;
	font-weight: bold;
	margin-bottom: 1.5rem;
}
.icare h2 {
	font-size: 1.5rem;
	font-weight: 500;
	margin-bottom: 1rem;
}
.icare-metadata {
	display: flex;
	margin-bottom: 1rem;
}
.icare-metadata img {
	width: 3.5rem;
	height: 3.5rem;
	margin-right: 0.5rem;
	border-radius: 9999px;
}
.icare-metadata p {
	margin: 0.25rem 0;
}
.icare-content-block {
	margin-bottom: 1rem;
}
.icare-content-block-sponsor {
	display: flex;
}
.icare-content-block-sponsor span {
	font-size: 0.875rem;
	margin-top: auto;
	margin-bottom: auto;
	margin-right: 0.5rem;
}
.icare-content-block-sponsor img {
	height: 2rem;
}
/* .icare-image {} */
/* .icare-video-youtube {} */
/* .icare-video-media {} */
.icare-text * {
	margin-bottom: 1rem;
}
.icare-text iframe {
	width: 100%;
	display: block;
}
/* .icare-gallery {} */
.icare-quote {
	margin: 0 auto;
	padding: 1.5rem 0 0 2rem;
	font-weight: 700;
}
.icare-quote-text::before {
	content: '\201C';
	font-size: 4rem;
	position: absolute;
	left: -2rem;
	top: -2rem;
}
.icare-quote-text {
	position: relative;
	font-size: 1.25rem;
	text-align: center;
	margin: 0;
}
.icare-quote-footer {
	text-transform: uppercase;
	text-align: right;
	margin-top: 0.5rem;
}
.icare-quote-author::before {
	content: "\2013\00A0";
}
.icare-quote-author {
	margin: 0;
}
.icare-quote-title {
	margin: 0;
	font-size: 0.5rem;
	opacity: 0.5;
}
.icare-cm {
	display: grid;
	grid-gap: 0.5rem;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}
.icare-cm-video-column {
	grid-column: auto / span 2;
	display: flex;
}
.icare-cm-playlist-column {
	display: flex;
	margin-bottom: 1rem;
}
.icare-cm-playlist-container {
	width: 100%;
	outline: 1px solid grey;
	display: flex;
	flex-direction: column;
}
.icare-cm-playlist-title {
	margin: 0.5rem;
	font-size: 1.25rem;
	font-weight: 500;
}
.icare-cm-playlist {
	outline: 1px solid grey;
	flex: 1 1 0%;
	max-height: 400px;
	overflow-y: auto;

}
.icare-cm-playlist-item {
	display: flex;
	padding: 0.25rem 0.5rem;
	cursor: pointer;
}
.icare-cm-playlist-item img {
	width: 100px;
	height: auto;
	margin: 0 0.5rem;
}
.icare-cm-playlist-item p {
	margin: auto 0;
	font-size: 0.875rem;
}
.icare-cm-playlist-item-active {
	background-color: lightgrey;
}
.icare-related-content-list {
	margin: 0
}
.icare-related-content-list-item {
	cursor: pointer;
	margin-bottom: 1rem;
}
.icare-footer-author {
	border-top: 1px solid lightgray;
	padding-top: 1rem;
	display: flex;
}
.icare-footer-author-image {
	width: 5rem;
	height: 5rem;
	margin-right: 1rem;
	border-radius: 9999px;
}
.icare-footer-author-name {
	margin: 0 0 0.25rem;
	font-size: 1.25rem;
	font-weight: bold;
}
.icare-footer-author-title {
	margin: 0 0 0.25rem;
}
.icare-social-icon {
	display: block;
	width: 1.5rem;
	height: 1.5rem;
	margin-right: 0.25rem;
}

Or copy the class names and customize them.

Usage

In Svelte.js

<Icare {article} {accessToken} {apiUrl} {campaignApiUrl} {onRelatedContentClick}/>

<script>
import Icare from '@incrowd/article-rendering-engine'
</script>

In all other environment

<div id="icare"/>

<script>
import Icare from '@incrowd/article-rendering-engine'
const icareInstance = new Icare({
	target: document.getElementById("icare"),
	props: { article, accessToken, apiUrl, campaignApiUrl, onRelatedContentClick }
})
</script>

accessToken is optional. It is used for executing campaign (PROMO block) and fetching KSession for stream videos.

apiUrl is set to https://article-cms-api.incrowdsports.com/v2/articles by default.

campaignApiUrl is set to https://promoblocks-cms-api.incrowdsports.com/v1 by default.

onRelatedContentClick should be a function that has content as the first argument which will be called when a related content is clicked. For example:

const onRelatedContentClick = content => {
	console.log(JSON.stringify(content, null, 4))
}

Can call icareInstance.$destroy() to destroy the element. For more information, please read the Svelte.js documentation.