thi.ng/umbrella

Travis status Code Climate Become a patron Discord chat Twitter Follow

About

"A collection of functional programming libraries that can be composed together. Unlike a framework, thi.ng is a suite of instruments and you (the user) must be the composer of. Geared towards versatility, not any specific type of music." ā€” @loganpowell via Twitter

Mono-repository for ~135 thi.ng TypeScript/ES6 projects, a wide collection of largely data transformation oriented packages and building blocks for:

  • Functional programming (composition, memoization, transducers, multi-methods)
  • Data driven UI component toolkits (multiple approaches)
  • ES6 iterators/generators
  • Reactive programming, stream / transducer based dataflow graphs / pipelines
  • WebWorker workflow abstractions
  • Data structures & data transformations for wide range of use cases (list, sets, maps, joins, spatial indexing)
  • Immutable data handling, state containers, transacted state updates, Undo-Redo history
  • Vector & matrix implementations with optional support for strided layouts, SIMD etc.
  • Value-based equivalence
  • PEG-style parser combinators, FSM primitives
  • Forth-style pointfree DSL for functional composition
  • S-expression parser & runtime infrastructure for custom DSL creation
  • DSL for shader functions defined in TypeScript and cross-compilation to GLSL, JS, VEX etc.
  • 2D geometry generation, shape primitives, processing, conversion & visualization
  • Multi-format pixel buffers, conversions, Porter-Duff alpha-blending operators
  • Color space/format conversions, matrix based color manipulation, cosine gradients
  • Canvas abstraction & SVG conversion
  • Canvas-based Immediate mode GUI components
  • Declarative WebGL 1/2 abstraction layer
  • Low-level tooling for binary data, shared memory/WASM/WebGL interop
  • etc. (see package overview below)

...all with a keen eye on simplicity, re-use & minimalism without sacrificing flexibility.

This project is NOT a framework, provides no turn-key, one-size-fits-all approach and instead encourages a mix & match philosophy for various key aspects of application design (in & outside the browser). Most customization points only expect certain interfaces/type signatures rather than concrete implementations.

Most packages:

  • have detailed, individual README files w/ small usage examples
  • are versioned independently
  • distributed in ES2017 syntax and multiple formats (ESM, CommonJS, UMD) with TypeScript typings & changelogs
  • highly modular with largely only a few closely related functions or single function / class per file to help w/ tree shaking
  • provide re-exports of all their publics for full library imports
  • have either none or only @thi.ng internal runtime dependencies
  • have been used in production
  • declare public interfaces, enums & types in an api.ts and/or constants.ts file (larger packages only)
  • have auto-generated online documentation at docs.thi.ng
  • licensed under Apache Software License 2.0

Examples

There's a steadily growing number (~85) of standalone examples (different complexities, often combining functionality from several packages) in the examples directory.

Example screenshots (small selection)

Blog posts

Community & contributing

Join our little community on our Discord server or get in touch via Twitter or the issue tracker. If you'd like to contribute, please first read this document.

In general, we welcome contributions of all kinds (docs, examples, bug fixes, feature requests, financial contributions etc.). You can find a fairly detailed overview for contributors here: CONTRIBUTING.md.

Projects

Fundamentals

Project Version Changelog Description
@thi.ng/api version changelog Common types, decorators, mixins
@thi.ng/bench version changelog Basic benchmarking helpers
@thi.ng/checks version changelog Type & value checks
@thi.ng/compare version changelog Comparator
@thi.ng/compose version changelog Functional composition helpers
@thi.ng/defmulti version changelog Dynamic multiple dispatch
@thi.ng/dsp version changelog DSP utils, oscillators
@thi.ng/ecs version changelog Entity-Component System
@thi.ng/equiv version changelog Deep value equivalence checking
@thi.ng/errors version changelog Custom error types
@thi.ng/math version changelog Assorted common math functions & utilities
@thi.ng/memoize version changelog Function memoization w/ customizable caching
@thi.ng/mime version changelog File extension to MIME type mappings
@thi.ng/oquery version changelog Pattern based query engine for JS objects
@thi.ng/parse version changelog Parser combinators & AST generator/transformer
@thi.ng/paths version changelog Immutable nested object accessors
@thi.ng/prefixes version changelog Linked Data & xmlns prefixes/URLs
@thi.ng/random version changelog Seedable PRNG implementations w/ unified API
@thi.ng/strings version changelog Higher-order string formatting utils
@thi.ng/system version changelog Minimal life cycle container for stateful app components

Iterator, stream & sequence processing

Project Version Changelog Description
@thi.ng/csp version changelog Channel based async ops
@thi.ng/fsm version changelog FSM / parser primitives
@thi.ng/grid-iterators version changelog 2D grid iterator strategies
@thi.ng/iterators version changelog ES6 generators / iterators
@thi.ng/sax version changelog SAX-like XML parser / transducer
@thi.ng/seq version changelog Lisp/Clojure-style sequence abstraction
@thi.ng/transducers version changelog Composable data transformations
@thi.ng/transducers-binary version changelog Binary data related transducers
@thi.ng/transducers-fsm version changelog Finite state transducer
@thi.ng/transducers-hdom version changelog Transducer based hdom UI updates
@thi.ng/transducers-patch version changelog Patch-based, array & object editing
@thi.ng/transducers-stats version changelog Technical / statistical analysis

Reactive programming

Project Version Changelog Description
@thi.ng/rstream version changelog Push-based, reactive event stream primitves
@thi.ng/rstream-csp version changelog Adapter bridge CSP -> rstream
@thi.ng/rstream-dot version changelog Graphviz visualization of rstream topologies
@thi.ng/rstream-gestures version changelog Mouse & touch event stream abstraction
@thi.ng/rstream-graph version changelog Declarative dataflow graph construction
@thi.ng/rstream-log version changelog Hierarchical structured data logging
@thi.ng/rstream-log-file version changelog Log-file output handler
@thi.ng/rstream-query version changelog Triple store & query engine

Data structures

Project Version Changelog Description
@thi.ng/adjacency version changelog Adjacency matrices & graph algorithms
@thi.ng/arrays version changelog Array utilities
@thi.ng/associative version changelog Alt Set & Map implementations
@thi.ng/atom version changelog Immutable value wrappers, views, history
@thi.ng/bitfield version changelog 1D/2D bit field implementations
@thi.ng/cache version changelog In-memory caches / strategies
@thi.ng/dcons version changelog Doubly-linked list
@thi.ng/diff version changelog Array & object diffing
@thi.ng/dgraph version changelog Dependency graph
@thi.ng/gp version changelog Genetic programming helpers / AST gen
@thi.ng/heaps version changelog Binary & d-ary heap impls
@thi.ng/idgen version changelog Versioned ID generation / free-list
@thi.ng/intervals version changelog Open/closed intervals, queries, set ops
@thi.ng/ramp version changelog Parametric, interpolated lookup tables
@thi.ng/quad-edge version changelog Quad-edge, dual-graph data structure
@thi.ng/resolve-map version changelog DAG computations & value resolution
@thi.ng/sparse version changelog Sparse matrix & vector impls
@thi.ng/zipper version changelog Immutable tree editing / navigation

Frontend / UI

Project Version Changelog Description
@thi.ng/adapt-dpi version changelog HDPI canvas adaptation / styling util
@thi.ng/dl-asset version changelog Asset download trigger helper
@thi.ng/hdiff version changelog String diffing w/ hiccup output (includes CLI)
@thi.ng/hdom version changelog Hiccup based VDOM & diffing
@thi.ng/hdom-canvas version changelog hdom adapter for hiccup-canvas
@thi.ng/hdom-components version changelog hdom based UI components
@thi.ng/hdom-mock version changelog hdom mock implementation (testing / prototyping)
@thi.ng/hiccup version changelog S-expression based HTML/XML serialization
@thi.ng/hiccup-canvas version changelog hiccup interpreter for canvas api
@thi.ng/hiccup-carbon-icons version changelog IBM Carbon icons in hiccup format
@thi.ng/hiccup-css version changelog CSS from nested JS data structures
@thi.ng/hiccup-html version changelog Type-checked HTML5 element wrappers for hiccup
@thi.ng/hiccup-markdown version changelog Hiccup-to-Markdown serialization
@thi.ng/hiccup-svg version changelog hiccup based SVG vocab
@thi.ng/imgui version changelog Immediate mode GUI
@thi.ng/interceptors version changelog Composable event handlers & processor
@thi.ng/rdom version changelog Reactive, diff-less, async UI components
@thi.ng/rdom-canvas version changelog rdom component wrapper for thi.ng/hiccup-canvas
@thi.ng/rdom-components version changelog Unstyled, customizable component collection
@thi.ng/router version changelog Customizable browser & non-browser router
@thi.ng/text-canvas version changelog Text-mode canvas, drawing, tables, charts

Geometry & visualization

Project Version Changelog Description
@thi.ng/color version changelog Color conversions, gradients
@thi.ng/dgraph-dot version changelog Dependency graph -> Graphviz
@thi.ng/dot version changelog Graphviz DOM & export
@thi.ng/geom version changelog 2D only geometry types & ops
@thi.ng/geom-accel version changelog Spatial indexing data structures
@thi.ng/geom-api version changelog Shared types & interfaces
@thi.ng/geom-arc version changelog 2D elliptic arc utils
@thi.ng/geom-clip-line version changelog 2D line clipping
@thi.ng/geom-clip-poly version changelog 2D convex polygon clipping
@thi.ng/geom-closest-point version changelog Closest point helpers
@thi.ng/geom-fuzz version changelog Fuzzy 2D shape drawing / filling
@thi.ng/geom-hull version changelog 2D convex hull (Graham scan)
@thi.ng/geom-io-obj version changelog Wavefront OBJ model parser
@thi.ng/geom-isec version change

Last updated Popular

v0.2.29

Install

npm install @thi.ng/imgui
yarn add @thi.ng/imgui

BUNDLE SIZE

Not Available

DOWNLOAD TIME

Not Available

CDNs

extras

Contributors

  • thi-ng