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 🙏

© 2026 – Pkg Stats / Ryan Hefner

adacad-drafting-lib

v1.3.8

Published

a library for creating and manipulating weaving drafts

Downloads

405

Readme

AdaCAD Drafting Library

The AdaCAD Drafting Library contains the core functionality of AdaCAD without of the UI implementation. Thus, you can access and import the library to work directly in typescript, without having to touch the complex and overwhelming angular code that is used to manage the UI. This goal is to enable better testing, documentation, and integration of our data structures, operations and functions into broader projects.

Code Structure

The library is organized into several core directories, each handling a specific aspect of drafting functionality:

  • draft: Contains the data structures, types, and helper functions for managing drafts and warp/weft systems. This includes the Draft interface, Cell operations, drawdown manipulation, and system management.

  • loom: Contains the data structures, types, and helper functions for managing looms. Supports different loom types (jacquard, frame/shaft-treadle, direct-tie/dobby) with type-specific computation functions and conversion utilities.

  • material: Contains the material representation and management logic. Materials represent yarns/threads with visual properties (color, diameter) and physical properties (stretch, thickness) used in rendering and simulation.

  • media: Contains type definitions and interfaces for handling images and color data. Supports image analysis, color extraction, and rendering color definitions for draft visualization.

  • operations: Contains all the operations available in AdaCAD. Operations are the building blocks of the dataflow system - they take drafts as inputs, apply transformations or generate new patterns, and output drafts. Includes both regular operations (fixed inlets) and dynamic operations (variable inlets).

  • sequence: Contains the Sequence namespace with classes for manipulating 1D and 2D sequences of interlacement values. Provides a fluent API for pattern manipulation, transformation, and system mapping operations.

  • simulation: Contains the simulation engine for generating 3D visualizations of woven cloth. Uses material properties and draft information to predict how the woven cloth will look and behave.

  • utils: Contains utility functions, default values, and helper functions used throughout AdaCAD. Includes draft analysis functions, mathematical operations (LCM, GCD), comparison functions, string parsing, and configuration defaults.

Installation (Global via NPM)

Use this if you need only to use the existing library. The library is available via the NPM registry. The current version represents the existing core functionality (e.g. data-structures, types, operations, and utilities) that control AdaCAD.

You can download it using:

npm i adacad-drafting-lib

To import it into your project use

import * from 'adacad-drafting-lib'

or select the specific features and functions you will import

import {Draft} from 'adacad-drafting-lib/draft'

Installation (Local)

Use this if you want to develop new features in teh library and use these local changes as the backbone in the AdaCAD UI.

create a symlink in this directory:

npm link

make sure that the package.json file in /projects/adacad/ui/ links to the local library:

npm link adacad-drafting-lib --save --legacy-peer-deps

Documentation

Automated TypeDoc documentation for each file has been generated in the docs folder.

Related Links

Public Facing: