Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@canopycanopycanopy/b-ber-reader

triplecanopy267GPL-3.0-or-later3.1.0

The b-ber-reader package is used to render a horizontally scrolling HTML view in a browser. It includes a user-interface to navigate through a published project, display a project metadata, and to download related project assets. This package contains t

readme

b-ber

npm Version CircleCI Maintained with Lerna

b-ber is both a method and an application for producing publications in a variety of formats—EPUB 3, Mobi/KF8, static website, PDF, and XML file, which can be imported into InDesign for print layouts—from a single source that consists of plain-text files and other assets. b-ber also functions as a browser-based EPUB reader, which explains the name.

To begin using b-ber, please visit the Getting started page. For more on the rationale behind b-ber, read “Working on Our Thoughts,” by Triple Canopy’s creative director, Caleb Waldorf. To see example projects produced with b-ber, please visit our b-ber demo repository or view projects online at Triple Canopy.

While there are other frameworks for exporting content to different formats, b-ber introduces a unique paradigm for writing and marking up a text. The ability to produce multiple formats and to style each accordingly is made possible by the source of b-ber projects, which is composed of plaintext files, SCSS and JavaScript files, media, and other configuration files that are written in YAML. These plaintext files, the main text (and instructions) of a b-ber project, are written in Markdown with custom directives. b-ber extends the Markdown with custom directives that are derived from the EPUB 3 Structural Semantic Vocabulary. We selected a subset of terms from that vocabulary that allows for a rich markup language that is still easily readable for writers and editors, but contains the majority of structural elements required for a published work. In addition to the directives based off the EPUB 3 Structural Semantic Vocabulary and following the same principles of readability, we developed an additional set of directives for handling different media layouts and interactive paradigms.

b-ber facilitates control of the design of publications on the level of individual formats by accounting for the specific characteristics of EPUBs, websites, PDFs, etc. b-ber’s architecture allows for the styles included in each theme to be “scoped” to different build types. In other words, the text and media treatments for an EPUB can differ from those for a browser-based version of the same publication. Existing themes, developed by Triple Canopy, include combinations of styles, typefaces, and media layouts. Alternatively, publishers can design and develop their own themes for b-ber. They can also override any of these styles at the level of the individual publication in order to craft a layout that conforms to the needs of the work. By offering high-level design flexibility and format-specific customization, b-ber enables authors, editors, designers, and technologists to simultaneously consider the ideal manifestation of a publication and the multiplicity of scenarios in which it will be encountered.

The b-ber framework is written in JavaScript, with themes written in SCSS, and distributed on npm. b-ber can be run on a personal computer or on a server. The documentation in the wiki is written for both beginners who would like to author projects as well as developers who would like to contribute to the codebase. In addition to the wiki, the repository includes further documentation and the code is heavily commented.

Find out more in the b-ber wiki.

Summary of Features

  • Builds EPUBs, Mobi/KF8s, PDFs, static websites in both horizontal and vertical orientation, and XML files that can be imported into desktop publishing software;
  • Generated output follows the EPUB 3.0 specification;
  • Creates and links metadata that conforms to the webpub specification for web-based publications;
  • Can be styled through overrides or custom themes.

Reporting Bugs

Issues should be reported in the b-ber project repository. Please use the template when creating a new issue. Issues should be tagged with the appropriately scoped label (b-ber/create, b-ber/theme, etc.) if it's clear where the issue originates. Other labels (bug, enhancement, etc.) should also be used when applicable.

Contribution Guidelines

Pull requests are welcome. If you plan to contribute to b-ber's development, please send an email to b-ber@canopycanopycanopy.com or find us on our Discord channel, so that we are aware of any contributions you plan on making. There is no explicit style-guide, but a style of coding that's consistent with the existing codebase should be maintained.

Code of Conduct

We ask people to respect the code of conduct which can be read here.

License

GNU General Public License v3.0 or later.

changelog

3.0.6 (2023-03-03)

Bug Fixes

Features

3.0.5 (2022-11-30)

Features

  • adjusts responsive nav spacing (a12910a)
  • media controls attribute follows spec (099c619)

3.0.4 (2022-10-17)

Bug Fixes

3.0.3 (2022-10-17)

Bug Fixes

3.0.2 (2022-10-17)

3.0.1 (2022-10-17)

Features

  • adds project paths to module.paths (c7d92b7)
  • adds to module.paths for themes (20dedec)

3.0.0 (2022-09-22)

Bug Fixes

  • adds classname to button (442b59b)
  • adjust vertical padding for scrolling layouts (ff2a158)
  • missing method (1060608)
  • node support (0b997f8)
  • theme-serif: rename conflicting script name (9611984)
  • un-scope caption class names (c44d562)
  • updates column css values for Chrome behaviour (75bc577)
  • updates media player styles (f313eca)
  • updates tests (f82afca)

Features

  • adds additional SCSS media queries (223d4ed)
  • adds min-aspect-ratio and viewport method (8337e4b)
  • adds publish script (d3b07ae)
  • disable style cache (64546a3)
  • reader-react: adds responsive font sizing (22e6961)
  • reader-react: allow multiple context class names (4612573)
  • reader-react: refactor reader scss (b084dda)
  • reader-react: updates responsive font sizes (0c03aec)
  • reader-react: wip responsive updates ui (8d0277f)
  • reader-react: wip updates media queries (2f760f0)
  • reader-react: wip updates media queries (442201c)
  • reader-react: wip updates media queries (6fa0b6e)
  • reader-react: wip updates media queries (27d9214)
  • replaces axios with fetch; adds terser webpack plugin (2f1922b)
  • theme-sans: updates styles for media queries and mixins (b2010fa)
  • theme-serif: updates styles for media queries and mixins (4c74964)
  • updates responsive styles (3951514)
  • wip media queries (1114aaf)

2.0.0 (2022-09-21)

Bug Fixes

  • adds classname to button (fd6ec2d)
  • adjust spread calculations for font size (8c72aa4)
  • disables linting from root (ec8d0c9)
  • node support (19b4dfa)
  • react-reader: remove inline spread css declaration to prevent whitespace at the top of projects (d46c087)
  • reader-react: fix query param updates (51bd8a8)
  • reader-react: fixes location type (1797ec1)
  • reader-react: fixes prop definitions (361adf2)
  • reader-react: load api/book.json from manifestURL (b110213)
  • reader-react: update spinner position (1747ec6)
  • reader-react: updates tests (34bcaae)
  • reader-react: updates types (a5d080b)
  • reader-react: updates webpack config (93ff305)
  • reader-react: use callback when setting opf state (b278fc0)
  • un-scope caption class names (06ba90c)
  • updates link behaviour for remote hosting (2c9bef6)
  • updates media player styles (dc177db)

Features

  • adds conventional commits (2b147a2)
  • adds support for pagination on scrolling layouts (e04d2b4)
  • cli: adds configuration options to build command (b2fdc97)
  • cli: adds help text for base_url option (562dca6)
  • cli: adds support for config file flag for bber build (e7d3e3d)
  • export additional type information (544eeb7)
  • lib: handle url errors (9866626)
  • reader-react: accepts style and className props (2c97558)
  • reader-react: adds configurable query parameters (49c23ef)
  • reader-react: adds development env (d71654b)
  • reader-react: adds disableBodyStyles prop (dcca018)
  • reader-react: adds fonts (e78255a)
  • reader-react: adds props for navigation components (7d5cd02)
  • reader-react: adds provisional context__scroll class name (72b94e6)
  • reader-react: adds React 17 support (57a4ee6)
  • reader-react: disable css cache (b3ae07b)
  • reader-react: do not overwrite query string params (ea0af4c)
  • reader-react: ensure currentSpineItemIndex is a number (d970854)
  • reader-react: layout and sidebar props are unions (ff99b23)
  • reader-react: load options from books.json (f81c7a9)
  • reader-react: moves user-interface to redux; breaks up Reader methods (4bc7b58)
  • reader-react: namespace elements (6c3b29b)
  • reader-react: preserve query string parameters (358d75c)
  • reader-react: refactor query param handling (527d8e7)
  • reader-react: renames queryParams prop to searchParams (12369ba)
  • reader-react: simplifies methods passed into footer (2abb3eb)
  • reader-react: updates fonts and icons (1bfdf12)
  • reader-react: updates reader ui styles (32cf1cc)
  • reader-react: wip responsive updates ui (5950ab7)
  • reader-react: wip responsive updates ui (d4d8788)
  • reader-react: wip responsive updates ui (a7ae7a8)
  • reader-react: wip scope CSS (0338eac)
  • reader-react: wip scope CSS (1b23c23)
  • reader-react: wip updates ui (ff62296)
  • reader-react: wip updates ui (560940c)
  • reader-react: wip updates ui (31ac38c)
  • reader-react: wip updates ui (d1339ba)
  • reader-react: wip updates ui (6428da2)
  • replaces axios with fetch; adds terser webpack plugin (33eb968)
  • updates browserlist defaults (6b6bb5f)
  • updates caption class names (b97a5c4)
  • updates dependencies and optimize bundle size (6405dfd)
  • updates dependencies at root (1d22056)
  • updates webpack (71d7e96)
  • wip scope CSS (4d7242b)

1.2.16 (2022-04-07)

1.2.15 (2022-04-04)

1.2.14 (2022-04-02)

1.2.13 (2022-03-11)

1.2.12 (2022-02-24)

1.2.11 (2022-01-21)

1.2.10 (2021-12-22)

1.2.9 (2021-07-22)

1.2.8 (2021-06-17)

1.2.7 (2021-06-08)

1.2.6 (2021-06-04)

1.2.5 (2021-06-04)

1.2.4 (2021-06-01)

1.2.3 (2021-05-25)

1.2.2 (2021-04-24)

1.2.1 (2021-04-22)

1.2.0 (2021-04-22)

1.1.16 (2021-04-22)

1.1.15 (2021-03-15)

1.1.14 (2021-02-21)

1.1.13 (2021-01-21)

1.1.12 (2020-10-28)

1.1.11 (2020-09-08)

1.1.10 (2020-08-05)

1.1.9 (2020-07-17)

1.1.8 (2020-07-15)

1.1.7 (2020-05-28)

1.1.6 (2020-05-19)

1.1.5 (2020-05-07)

1.1.4 (2020-05-04)

1.1.3 (2020-05-01)

1.1.2 (2020-04-30)

1.1.1 (2020-04-29)

1.0.24-alpha.2 (2020-04-28)

1.0.24-alpha.1 (2020-04-28)

1.0.24-alpha.0 (2020-04-25)

1.0.23-alpha.0 (2020-04-23)

1.1.0 (2020-04-29)

1.0.23 (2020-03-11)

1.0.24-alpha.2 (2020-04-28)

1.0.24-alpha.1 (2020-04-28)

1.0.24-alpha.0 (2020-04-25)

1.0.23-alpha.0 (2020-04-23)

Reverts

  • Revert "Fix for Chrome 81" (8609d8a)

1.0.23 (2020-03-11)

1.0.22 (2020-03-05)

1.0.21 (2020-03-05)

1.0.20 (2020-03-05)

1.0.19 (2020-01-31)

1.0.18 (2020-01-31)

1.0.17 (2020-01-09)

1.0.16 (2020-01-08)

1.0.15 (2020-01-08)

1.0.14 (2020-01-08)

1.0.13 (2020-01-08)

1.0.12 (2019-12-13)

1.0.11 (2019-12-13)

1.0.10 (2019-11-27)

1.0.9 (2019-11-07)

1.0.8 (2019-10-30)

1.0.7 (2019-10-23)

1.0.6 (2019-10-23)

1.0.5 (2019-09-26)

1.0.4 (2019-09-20)

0.1.9 (2019-08-01)

0.1.8 (2019-08-01)

1.0.3 (2019-09-11)

1.0.2 (2019-09-11)

1.0.1 (2019-08-13)

1.0.0 (2019-08-13)

0.1.9 (2019-08-01)

0.1.8 (2019-08-01)

0.1.7 (2019-07-16)

0.1.6 (2019-06-17)

0.1.6-alpha.0 (2019-06-17)

0.1.5-alpha.0 (2019-05-09)

0.1.4-alpha.0 (2019-05-09)

0.1.3-alpha.0 (2019-05-09)

0.1.2-alpha.0 (2019-04-17)

0.1.1-alpha.0 (2019-04-04)

0.1.0-alpha.17 (2018-05-10)

0.1.0-alpha.16 (2018-05-08)

0.1.0-alpha.15 (2018-03-30)

Reverts

  • Revert "First pass navigation structure" (3d648e4)
  • Revert "Adjust template SCSS for reader view, re #18" (9e23c02), closes #18