{"id":19312187,"url":"https://github.com/bigcommerce/themes-lib-squid","last_synced_at":"2026-05-12T12:34:34.441Z","repository":{"id":44495235,"uuid":"373508662","full_name":"bigcommerce/themes-lib-squid","owner":"bigcommerce","description":null,"archived":false,"fork":false,"pushed_at":"2023-10-10T13:53:11.000Z","size":392,"stargazers_count":0,"open_issues_count":12,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2026-04-18T00:38:28.385Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bigcommerce.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-06-03T13:00:46.000Z","updated_at":"2023-10-06T10:19:26.000Z","dependencies_parsed_at":"2024-11-10T00:33:36.765Z","dependency_job_id":"71dd833e-7ca9-49d2-9d19-82d2801bbbba","html_url":"https://github.com/bigcommerce/themes-lib-squid","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bigcommerce/themes-lib-squid","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bigcommerce%2Fthemes-lib-squid","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bigcommerce%2Fthemes-lib-squid/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bigcommerce%2Fthemes-lib-squid/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bigcommerce%2Fthemes-lib-squid/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bigcommerce","download_url":"https://codeload.github.com/bigcommerce/themes-lib-squid/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bigcommerce%2Fthemes-lib-squid/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32939632,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-12T09:19:52.626Z","status":"ssl_error","status_checked_at":"2026-05-12T09:17:33.438Z","response_time":102,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-10T00:33:28.228Z","updated_at":"2026-05-12T12:34:34.413Z","avatar_url":"https://github.com/bigcommerce.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Squid, the friendly squared-grid layout engine!\n\nSquid arranges elements into a grid, but makes sure that the bottom is flush.\n\n## Example\n\n```\n// Initialize grid\nconst squid = new Squid($('.grid'), {\n  columns: 2,\n  gutter: 10,\n});\n\n// Add items\nsquid.add(...$('.grid-item'));\n\n// Remove items\nsquid.remove($('.grid-item').get(0));\n\n// Render grid\nsquid.layout();\n```\n\n\n## Options\n\n### `columns`\n\nThe number of columns in the grid.\n\n### `gutter`\n\nThe size of the gutter, in pixels. If the number is between 0 and 1, it will act\nas a percentage of the grid's width.\n\n### `getSize` (optional)\n\nA function to calculate the natural size of your elements. Defaults to the\nnatural size of the first img element. Expects an object with `width` and\n`height` properties.\n\n### `getGravity` (optional)\n\nA function to calculate the \"gravity\" of your elements. This affects the\nposition items are inserted into a column. Items with a lower gravity are placed\nabove items with a higher gravity. Expects a number between `-1` and `1`.\n\n### `getResistance` (optional)\n\nA function to calculate the \"resistance\" of your elements. Elements with a\nhigher resistance will be compressed less when trying to resize a column.\nExpects a number between `0` and `1`.\n\nCurrently, the layout engine only takes into account a resistance of `1`, which\nwill lock that element's height. All other elements will be compressed equally.\n\n### `getVisibility` (optional)\n\nA function to calculate the visibility of your elements. Expects either `true`\nor `false`. If this function returns `false` for an item, that item will not be\nlayed-out.\n\n### `firstRenderClassname` (optional)\n\nThe class name to add to the grid after it is rendered for the first time.\n\n### `resizingClassname` (optional)\n\nClass name to add to the grid while it is being resized.\n\n\n## Methods\n\n### `update(options, layout = true)`\n\nChange the grid's options, and optionally re-render it. Any options the\nconstructor can take can be set here.\n\n### `add(...items)`\n\nAdd items to the grid.\n\nSince jQuery wraps DOM elements, we can't compare them directly:\n`$('#item-1') !== $('#item-1')`. It's recommended to add bare DOM elements\ninstead.\n\n### `remove(...items)`\n\nRemove items from the grid.\n\n### `removeAll()`\n\nRemove all items from the grid.\n\n### `layout()`\n\nRe-render the grid.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbigcommerce%2Fthemes-lib-squid","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbigcommerce%2Fthemes-lib-squid","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbigcommerce%2Fthemes-lib-squid/lists"}