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

@myrmidon/cadmus-mat-physical-grid

v8.0.0

Published

Cadmus - material description: physical grid.

Downloads

76

Readme

CadmusMatPhysicalGrid

📦 @myrmidon/cadmus-mat-physical-grid

This project was generated using Angular CLI version 19.0.0.

This library contains a component representing a physical grid location (PhysicalGridLocation), i.e. a bounding rectangle ideally overlaid on top of a 2D physical surface. The surface of the rectangle is covered by a grid, where columns are labeled with letters, like in an Excel spreadsheet, and rows are numbered.

So, each cell in the grid can be identified by the combination of column label and row number, just like a cell in a spreadsheet.

This representation is typically used to roughly divide a surface into grid cells, and approximately locate parts of it via cell coordinates. This approach for labelling parts of a surface is used in many scenarios where it is necessary to provide a location strategy for its fragments; for instance this happens for fragments from inscriptions or manuscripts.

For example, a typical 3x3 grid allows to tell whether a fragment belongs to any of the edges or corners, or rather belongs to an inner portion of a fragmentary object.

x | Column 1 | Column 2 | Column 3 ------|----------|----------|--------- Row 1 | A1 | B1 | C1 Row 2 | A2 | B2 | C2 Row 3 | A3 | B3 | C3

For instance, in this grid a fragment could cover A1 B1 B2 C3. The order in which you select the cells is preserved as usually it is meaningful: when there is a text, the order usually reflects the reading order.

The component allows you to specify the location of 1 or more cells, according to different modes:

  • single: you can select only 1 cell at a time. Use this for a simplified location.
  • multiple: you can select as many cells as you want. Use this when dealing with multiple fragments.
  • contiguous (default): you can select 1 or more cells as far as they are contiguous.

Component

  • 🚩 cadmus-mat-physical-grid-location
  • 🔑 PhysicalGridLocationComponent
  • 📚 thesauri: none, but you can have a thesaurus for your component using this brick and map it to the presets property. This is useful when you want to provide a set of grid sizes to pick from.
  • ▶️ input:
    • location (PhysicalGridLocation | undefined)
    • required (boolean): true if selecting at least 1 cell is required.
    • presets (string[]): presets sizes for the grid. Each preset is a string like 'name: 3x4' where name is the preset's name, 3 is the columns count, and 4 the rows count.
    • allowResize (boolean): true to allow resizing the grid.
    • allowCustomSize (boolean): to allow custom sizes also when presets is specified.
    • noGrid (boolean): true to hide the interactive grid.
    • collapsedGrid (boolean): true to collapse the interactive grid.
    • mode (PhysicalGridMode): the mode of selection in the grid: single allows to select a single cell, multiple allows to select multiple cells wherever they are, contiguous allows to select only contiguous cells.
  • 🔥 output:
    • locationChange (PhysicalGridLocation): emitted when the location changes.
    • collapsedGridChange (boolean): emitted when the grid is collapsed.