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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@atlassian/confluence-web-components

v0.0.14

Published

Web components used to render common Confluence components in Connect add-ons.

Downloads

10

Readme

Coverage Status

Installation

npm install @atlassian/confluence-web-components

Usage

<!doctype html>
<head>
    <title>My connect add-on</title>
    <script src="node_modules/@atlassian/confluence-web-components/dist/confluence-web-components.js"></script>
</head>
<body>
    ...
    <confluence-quick-search placeholder="Search..."></confluence-quick-search>
    ...
</body>
</html>

Bundles

The Confluence web components are provided as 4 different bundles, which contain all components:

File | Size (gzipped) | Description ---------------------------------------------- | -------------- | ------------------------------------------------------ dist/confluence-web-components-flatpack.js | 156kb | This is the unminified bundle with all dependencies included. This is the best option forgetting up and running and for use in your development environment. dist/confluence-web-components-flatpack.min.js | 44kb | The minified version of the bundle above. This is what you should use in production. dist/confluence-web-components.js | 11.4kb | This is the unminified bundle with React and ReactDOM excluded. You should use this bundle if you use React for your own components and would like to use a shared/CDN copy. The bundle assumes that React and ReactDOM are available as global variables. dist/confluence-web-components.min.js | 6.6kb | The minified version of the previous version. This is the best option for a production environment using a CDN copy of React and ReactDOM.

NOTE: It is not currently supported to consume individual web components or create your own custom bundle.

Quick search

<confluence-quick-search
    container-class={string}
    placeholder={string}
></confluence-quick-search>

Allows users to easily navigate to recently visited pages, perform a search without leaving the current page, or performance a site-wide search.

container-class {string} - A CSS class name that will be applied to the root DOM node. Use this to help target styles in your theme. placeholder {bool} - Placeholder text to show in the search input field.

Content body

<confluence-content-body
    content-id={number}
></confluence-quick-search>

Renders the HTML content for a piece of content (e.g. page or blogpost). This does not include the content title or comments.

content-id {number} - The ID of the content to render. This parameter is required.

Content list

Displays a list of content items based on a CQL query.

<confluence-content-list
    cql={string}
></confluence-content-list>

cql {string} - The CQL used to retrieve content. tag-name {ul|ol=ol} - The tag of the containing element. Default is "ol". limit {number=25} - The maximum number of items to fetch and display. Default is 25. container-class - Will be applied to the root element. item-class - Will be applied to each item in the list.

Running the Connect add-on locally

Setup this repo locally

git clone https://bitbucket.org/atlassian/confluence-web-components.git
nvm install v4.2.2             # switch to node 4.2.2
npm install                    # install dependencies

Start Confluence on port 1990

Start the add-on on port 3000

npm start

When the add-on starts, it will automatically register itself with the local Confluence instance.

Potential roadmap

v1.0

  • Will include the following components:
    • Comment list
    • Content body
    • Content list
    • Content title
    • Quick search
    • Space title
    • Space list
  • Will use React 0.14.5

v1.0.x

  • Will only include bug fixes or backwards compatible changes to components from 1.0 release.

v1.x

  • Will include new components, potential deprecation of existing components, or minor React version updates.