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

@learnblocks/core

v1.0.0-alpha.16

Published

Composable react components for the creation and display of digital learing content.

Downloads

18

Readme

Learnblocks

Composable react components for the creation and display of digital learing content.

Goals

  • simplify and accelerate the development of learning applications and authoring tools
  • provide accessible, customizable and easy to use components
  • provide a concept/framework for building further components
  • provide great UX and DX

Installation

Currently the project is in alpha. API changes are extremly likely.

$ yarn add @learnblocks/core
# or
$ npm i @learnblocks/core

Example

Concept

Entities (naming)

Block (Data)

The whole concept of this library revolves around Blocks. A Block is a datastructure which describes an element.

Example:

{
  "type": "choice",
  "hideCorrectCount": false,
  "options": [
    { "content": "yes", "isCorrect": true },
    { "content": "no", "isCorrect": true },
    { "content": "maybe", "isCorrect": false },
  ],
}

Editor

An Editor is a react component that takes a block of a certain type as an input and renders a UI which allows a user to modify the block.

Presenter

An Presenter is a react component that takes a block of a certain type as an input and renders a UI that allows to interact with the Block (e.g. answering a multiple-choice question).

 * (user is answering)       (show solution, state may be altered)    (interaction is completed)
 *    [interaction]       -->              [staged]               -->         [committed]
 *                        <--                 ⮠

A Presenter has three callbacks: onChange, onStage and onCommit. Each take the presenter state as an argument. The presenter state contains all the information to reinitialize the presenter and to determine if an interaction is completed (committed).

How to contribute

  • Fix Bugs
  • Fix TODOs and FIXMEs (see Code)
  • Write tests
  • Implement more Blocks
    • Fill in the Blanks
    • Feedback
    • (static) Blocks like Text, Images, Video, Embeds
    • Think about the components you need or draw inspiration from H5P
  • Improve default Atoms
  • Create new atoms (Maybe with Tailwind?)

Start Developing

Run yarn start to open a storybook containing the currently implemented learnblocks.

Add a new component


FIXME: Template is not up-to-date. Do not use.

Run yarn gen:pkg and enter a name (lowercase) and a description for the component you'd like to implement. Run yarn start to start if it was not already started storybook. You should see your component in the storybook. Edit the files generated at packages/{{componentName}}/src to implement your component.

Attribution

Parts of this repositories structure are inspired by the chakra-ui project.