diff --git a/.agents/prompts/deploy-me.mdc b/.agents/prompts/deploy-me.mdc new file mode 100644 index 0000000..be14dee --- /dev/null +++ b/.agents/prompts/deploy-me.mdc @@ -0,0 +1,16 @@ +--- +alwaysApply: false +--- + +Solve the CI bugs, like lint, typecheck and tests. +You must not change the functionality — only change the code to make it compile. If there is a business logic problem, do not change it; ask the user what to do instead. + +Run the same validation steps as `.github/workflows/pr.yml` (excluding build, package, and artifact upload): + +```bash +npm ci +npm run lint +npm test +``` + +Fix every failure before finishing. Do not skip lint or tests. diff --git a/README.md b/README.md index 0af5286..807496d 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,83 @@ -# grid-systems-overlay -Browser extension that overlays configurable column and row grids on any page. +

+ another-grid-plugin icon +

+ +

another-grid-plugin

+ +

+ A browser extension that overlays configurable grid systems on any webpage. +

+ +

+ Inspired by the discipline and clarity of Grid Systems in Graphic Design by Josef Müller-Brockmann — structure, rhythm, and alignment without visual noise. +

+ +## Samples + +Square grid overlay with the in-page controls: + +

+ Square grid overlay on a Swiss Grid editorial page +

+ +Column grid overlay: + +

+ Vertical column grid overlay on a webpage +

+ +## Features + +- **Column, row, and square grids** — switch layout type from the floating toolbar +- **Presets and versions** — built-in defaults plus per-site custom variations +- **Measurements** — count, size, margin, gutter, color, and opacity (simplified controls in square-grid mode) +- **Per-site memory** — patterns and settings persist for each hostname +- **Lightweight overlay** — draggable toolbar, minimal UI, no page takeover + +## Install + +### From source + +```bash +git clone https://github.com/IvanCCO/another-grid-plugin.git +cd another-grid-plugin +npm install +npm run build +``` + +1. Open `chrome://extensions` (or `edge://extensions`) +2. Enable **Developer mode** +3. Click **Load unpacked** +4. Select the `dist/` folder + +### From a release + +Download `another-grid-plugin.zip` from the [latest GitHub release](https://github.com/IvanCCO/another-grid-plugin/releases), unzip it, and load the folder as an unpacked extension. + +After code changes, run `npm run build` again, then reload the extension and refresh the page. + +## Development + +```bash +npm run test # unit tests +npm run lint # ESLint +npm run build # type-check, bundle, and copy assets → dist/ +npm run watch # rebuild on file changes +npm run package:extension # zip dist/ for distribution +``` + +Pull requests run lint, tests, build, and packaging in GitHub Actions. See [CONTRIBUTING.md](./CONTRIBUTING.md) for commit conventions and release flow. + +## Project structure + +| Path | Role | +| --- | --- | +| `src/content.ts` | Overlay UI, settings, and messaging | +| `src/content/grid-render.ts` | Grid drawing (columns, rows, line grid) | +| `src/site-patterns.ts` | Per-site presets and variations | +| `public/content.css` | Overlay and popover styles | +| `dist/` | Built extension (load this in the browser) | + +## License + +See repository license terms. diff --git a/assets/readme/icon-128.png b/assets/readme/icon-128.png new file mode 100644 index 0000000..ab3415d Binary files /dev/null and b/assets/readme/icon-128.png differ diff --git a/assets/readme/sample-grid.png b/assets/readme/sample-grid.png new file mode 100644 index 0000000..44d8313 Binary files /dev/null and b/assets/readme/sample-grid.png differ diff --git a/assets/readme/sample-vertical.png b/assets/readme/sample-vertical.png new file mode 100644 index 0000000..90fc426 Binary files /dev/null and b/assets/readme/sample-vertical.png differ diff --git a/src/content.ts b/src/content.ts index ad229ab..134198e 100644 --- a/src/content.ts +++ b/src/content.ts @@ -15,7 +15,6 @@ import { ensureAxisPattern, getActivePattern, getPatternsByKind, - getPatternsForAxis, getSiteState, getSiteStorageKey, normalizeGridStorage, diff --git a/src/site-patterns.test.ts b/src/site-patterns.test.ts index adb9ff0..123bccb 100644 --- a/src/site-patterns.test.ts +++ b/src/site-patterns.test.ts @@ -1,5 +1,5 @@ import { describe, expect, it } from 'vitest'; -import { DEFAULT_SETTINGS, type GridAxis } from './utils'; +import { DEFAULT_SETTINGS } from './utils'; import { applyPatternSelection, createVariation,