├── .editorconfig ├── .eslintrc-src.js ├── .eslintrc.json ├── .github └── workflows │ └── ci.yaml ├── .gitignore ├── HISTORY.md ├── LICENSE.md ├── README.md ├── app ├── body-overflow │ └── page.tsx ├── fail │ └── page.tsx ├── layout.tsx ├── page.tsx ├── point │ └── page.tsx ├── shadow-dom │ └── page.tsx └── simple │ └── page.tsx ├── cypress.config.ts ├── cypress ├── component │ ├── basic.cy.tsx │ └── point.cy.tsx ├── fixtures │ └── example.json └── support │ ├── commands.ts │ ├── component-index.html │ └── component.ts ├── examples ├── body-overflow.html ├── body-overflow.js ├── fail.html ├── fail.js ├── point.html ├── point.js ├── shadow-dom.html ├── shadow-dom.js ├── simple.html └── simple.js ├── next-env.d.ts ├── next.config.js ├── package.json ├── pnpm-lock.yaml ├── prettier.config.js ├── scripts ├── build.js ├── node-swc.json └── web-swc.json ├── src ├── adjustForViewport.js ├── align │ ├── align.js │ ├── alignElement.js │ └── alignPoint.js ├── getAlignOffset.js ├── getElFuturePos.js ├── getOffsetParent.js ├── getRegion.js ├── getVisibleRectForElement.js ├── index.js ├── isAncestorFixed.js ├── propertyUtils.js └── utils.js └── tsconfig.json /.editorconfig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiminghe/dom-align/HEAD/.editorconfig -------------------------------------------------------------------------------- /.eslintrc-src.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiminghe/dom-align/HEAD/.eslintrc-src.js -------------------------------------------------------------------------------- /.eslintrc.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiminghe/dom-align/HEAD/.eslintrc.json -------------------------------------------------------------------------------- /.github/workflows/ci.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiminghe/dom-align/HEAD/.github/workflows/ci.yaml -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiminghe/dom-align/HEAD/.gitignore -------------------------------------------------------------------------------- /HISTORY.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiminghe/dom-align/HEAD/HISTORY.md -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiminghe/dom-align/HEAD/LICENSE.md -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiminghe/dom-align/HEAD/README.md -------------------------------------------------------------------------------- /app/body-overflow/page.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiminghe/dom-align/HEAD/app/body-overflow/page.tsx -------------------------------------------------------------------------------- /app/fail/page.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiminghe/dom-align/HEAD/app/fail/page.tsx -------------------------------------------------------------------------------- /app/layout.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiminghe/dom-align/HEAD/app/layout.tsx -------------------------------------------------------------------------------- /app/page.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiminghe/dom-align/HEAD/app/page.tsx -------------------------------------------------------------------------------- /app/point/page.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiminghe/dom-align/HEAD/app/point/page.tsx -------------------------------------------------------------------------------- /app/shadow-dom/page.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiminghe/dom-align/HEAD/app/shadow-dom/page.tsx -------------------------------------------------------------------------------- /app/simple/page.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiminghe/dom-align/HEAD/app/simple/page.tsx -------------------------------------------------------------------------------- /cypress.config.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiminghe/dom-align/HEAD/cypress.config.ts -------------------------------------------------------------------------------- /cypress/component/basic.cy.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiminghe/dom-align/HEAD/cypress/component/basic.cy.tsx -------------------------------------------------------------------------------- /cypress/component/point.cy.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiminghe/dom-align/HEAD/cypress/component/point.cy.tsx -------------------------------------------------------------------------------- /cypress/fixtures/example.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiminghe/dom-align/HEAD/cypress/fixtures/example.json -------------------------------------------------------------------------------- /cypress/support/commands.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiminghe/dom-align/HEAD/cypress/support/commands.ts -------------------------------------------------------------------------------- /cypress/support/component-index.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiminghe/dom-align/HEAD/cypress/support/component-index.html -------------------------------------------------------------------------------- /cypress/support/component.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiminghe/dom-align/HEAD/cypress/support/component.ts -------------------------------------------------------------------------------- /examples/body-overflow.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /examples/body-overflow.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiminghe/dom-align/HEAD/examples/body-overflow.js -------------------------------------------------------------------------------- /examples/fail.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /examples/fail.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiminghe/dom-align/HEAD/examples/fail.js -------------------------------------------------------------------------------- /examples/point.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /examples/point.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiminghe/dom-align/HEAD/examples/point.js -------------------------------------------------------------------------------- /examples/shadow-dom.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /examples/shadow-dom.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiminghe/dom-align/HEAD/examples/shadow-dom.js -------------------------------------------------------------------------------- /examples/simple.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /examples/simple.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiminghe/dom-align/HEAD/examples/simple.js -------------------------------------------------------------------------------- /next-env.d.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiminghe/dom-align/HEAD/next-env.d.ts -------------------------------------------------------------------------------- /next.config.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiminghe/dom-align/HEAD/next.config.js -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiminghe/dom-align/HEAD/package.json -------------------------------------------------------------------------------- /pnpm-lock.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiminghe/dom-align/HEAD/pnpm-lock.yaml -------------------------------------------------------------------------------- /prettier.config.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiminghe/dom-align/HEAD/prettier.config.js -------------------------------------------------------------------------------- /scripts/build.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiminghe/dom-align/HEAD/scripts/build.js -------------------------------------------------------------------------------- /scripts/node-swc.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiminghe/dom-align/HEAD/scripts/node-swc.json -------------------------------------------------------------------------------- /scripts/web-swc.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiminghe/dom-align/HEAD/scripts/web-swc.json -------------------------------------------------------------------------------- /src/adjustForViewport.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiminghe/dom-align/HEAD/src/adjustForViewport.js -------------------------------------------------------------------------------- /src/align/align.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiminghe/dom-align/HEAD/src/align/align.js -------------------------------------------------------------------------------- /src/align/alignElement.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiminghe/dom-align/HEAD/src/align/alignElement.js -------------------------------------------------------------------------------- /src/align/alignPoint.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiminghe/dom-align/HEAD/src/align/alignPoint.js -------------------------------------------------------------------------------- /src/getAlignOffset.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiminghe/dom-align/HEAD/src/getAlignOffset.js -------------------------------------------------------------------------------- /src/getElFuturePos.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiminghe/dom-align/HEAD/src/getElFuturePos.js -------------------------------------------------------------------------------- /src/getOffsetParent.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiminghe/dom-align/HEAD/src/getOffsetParent.js -------------------------------------------------------------------------------- /src/getRegion.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiminghe/dom-align/HEAD/src/getRegion.js -------------------------------------------------------------------------------- /src/getVisibleRectForElement.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiminghe/dom-align/HEAD/src/getVisibleRectForElement.js -------------------------------------------------------------------------------- /src/index.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiminghe/dom-align/HEAD/src/index.js -------------------------------------------------------------------------------- /src/isAncestorFixed.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiminghe/dom-align/HEAD/src/isAncestorFixed.js -------------------------------------------------------------------------------- /src/propertyUtils.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiminghe/dom-align/HEAD/src/propertyUtils.js -------------------------------------------------------------------------------- /src/utils.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiminghe/dom-align/HEAD/src/utils.js -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiminghe/dom-align/HEAD/tsconfig.json --------------------------------------------------------------------------------