MCPcopy Index your code
hub / github.com/Ecodev/natural-gallery-js

github.com/Ecodev/natural-gallery-js @11.1.3

Chat with this repo
repository ↗ · DeepWiki ↗ · release 11.1.3 ↗ · + Follow
569 symbols 1,666 edges 32 files 29 documented · 5%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Natural Gallery JS

Build Status Coverage

A library that allows you to display images with with natural layouts, infinite scroll, lazy loading, lightbox and interactivity in a developer friendly by exposing an usefull api.

See the demo

screenshot

Documentation

Install with NPM or Yarn

npm i @ecodev/natural-gallery-js
yarn add @ecodev/natural-gallery-js

Contributing

All contributions are welcome, but keep in mind that the gallery will stay simple : too generalist or too specific features that could be done from your controllers won't be added.

Found a bug ?

Create an issue where you report what you observe, what you expect to observe, and the context of usage, as well as your browser and it's version.

Want a new feature ?

Consider a pull request, but create an issue before to expose your idea. Maybe the feature you would like to add is already on the pipeline or is intentionally not included for good reasons.

Development

The most useful commands for development are:

  • yarn dev to start a development server
  • yarn build to build the lib and the docs locally (it will be published automatically by GitHub Actions deploy job)
  • git tag -am 1.2.3 1.2.3 && git push to publish the lib to npm (via GitHub Actions release job)

Licence

Developed by Ecodev under MIT licence, the app is free of use, even for commercial usage. Even if it's not required, a credit would be much appreciated.

Credits

This gallery uses Photoswipe !

Extension points exported contracts — how you extend this code

ImageRatioInfo (Interface)
(no doc)
src/js/Utility.ts
GalleryExpectation (Interface)
(no doc)
tests/unit/abstract-gallery.ts
RatioLimits (Interface)
(no doc)
src/js/Utility.ts
ColumnOptions (Interface)
(no doc)
src/js/Column.ts
ItemOptions (Interface)
(no doc)
src/js/Item.ts
SquareGalleryOptions (Interface)
(no doc)
src/js/galleries/Square.ts

Core symbols most depended-on inside this repo

dispatch
called by 87
docs/assets/natural-gallery-js/natural-gallery.js
add
called by 60
docs/assets/natural-gallery-js/natural-gallery.js
addEventListener
called by 53
docs/assets/natural-gallery-js/natural-gallery.js
sanitizeHtml
called by 30
src/js/Utility.ts
addItems
called by 29
docs/assets/natural-gallery-js/natural-gallery.js
applyFilters
called by 25
docs/assets/natural-gallery-js/natural-gallery.js
dispatchEvent
called by 23
docs/assets/natural-gallery-js/natural-gallery.js
expectItemsCount
called by 22
tests/unit/abstract-gallery.ts

Shape

Method 315
Function 222
Class 18
Interface 13
Enum 1

Languages

TypeScript100%

Modules by API surface

docs/assets/natural-gallery-js/natural-gallery.js313 symbols
docs/assets/photoswipe/photoswipe.min.js74 symbols
src/js/galleries/AbstractGallery.ts38 symbols
src/js/Item.ts34 symbols
docs/assets/photoswipe/photoswipe-ui-default.min.js20 symbols
src/js/galleries/Masonry.ts19 symbols
src/js/galleries/Natural.ts15 symbols
src/js/galleries/Square.ts9 symbols
tests/unit/utils.ts7 symbols
src/js/Column.ts7 symbols
src/js/galleries/AbstractRowGallery.ts6 symbols
src/js/Utility.ts6 symbols

For agents

$ claude mcp add natural-gallery-js \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact