add all frontend files

This commit is contained in:
2026-01-17 15:16:36 -05:00
parent ff16ae7858
commit e40287e4aa
25704 changed files with 1935289 additions and 0 deletions

View File

@@ -0,0 +1 @@
"use strict";var t=require("compute-scroll-into-view");const o=t=>!1===t?{block:"end",inline:"nearest"}:(t=>t===Object(t)&&0!==Object.keys(t).length)(t)?t:{block:"start",inline:"nearest"};module.exports=function(e,r){if(!e.isConnected||!(t=>{let o=t;for(;o&&o.parentNode;){if(o.parentNode===document)return!0;o=o.parentNode instanceof ShadowRoot?o.parentNode.host:o.parentNode}return!1})(e))return;const n=(t=>{const o=window.getComputedStyle(t);return{top:parseFloat(o.scrollMarginTop)||0,right:parseFloat(o.scrollMarginRight)||0,bottom:parseFloat(o.scrollMarginBottom)||0,left:parseFloat(o.scrollMarginLeft)||0}})(e);if((t=>"object"==typeof t&&"function"==typeof t.behavior)(r))return r.behavior(t.compute(e,r));const l="boolean"==typeof r||null==r?void 0:r.behavior;for(const{el:a,top:i,left:c}of t.compute(e,o(r))){const t=i-n.top+n.bottom,o=c-n.left+n.right;a.scroll({top:t,left:o,behavior:l})}};//# sourceMappingURL=index.cjs.map

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,79 @@
import type { Options as Options_2 } from 'compute-scroll-into-view'
import type { ScrollAction } from 'compute-scroll-into-view'
/** @public */
export declare interface CustomBehaviorOptions<T = unknown> extends Options_2 {
behavior: CustomScrollBehaviorCallback<T>
}
/** @public */
export declare type CustomScrollBehaviorCallback<T = unknown> = (
actions: ScrollAction[]
) => T
/** @public */
export declare type Options<T = unknown> =
| StandardBehaviorOptions
| CustomBehaviorOptions<T>
/**
* Scrolls the given element into view, with options for when, and how.
* Supports the same `options` as [`Element.prototype.scrollIntoView`](https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView) with additions such as `scrollMode`, `behavior: Function` and `skipOverflowHiddenElements`.
* @public
*/
declare function scrollIntoView(
target: Element,
options?: StandardBehaviorOptions | boolean
): void
/**
* Scrolls the given element into view, with options for when, and how.
* Supports the same `options` as [`Element.prototype.scrollIntoView`](https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView) with additions such as `scrollMode`, `behavior: Function` and `skipOverflowHiddenElements`.
*
* You can set the expected return type for `behavior: Function`:
* ```ts
* await scrollIntoView<Promise<boolean[]>>(node, {
* behavior: async actions => {
* return Promise.all(actions.map(
* // animate() resolves to `true` if anything was animated, `false` if the element already were in the end state
* ({ el, left, top }) => animate(el, {scroll: {left, top}})
* ))
* }
* })
* ```
* @public
*/
declare function scrollIntoView<T>(
target: Element,
options: CustomBehaviorOptions<T>
): T
export default scrollIntoView
/**
* Only scrolls if the `node` is partially out of view:
* ```ts
* scrollIntoView(node, { scrollMode: 'if-needed' })
* ```
* Skips scrolling `overflow: hidden` elements:
* ```ts
* scrollIntoView(node, { skipOverflowHiddenElements: true })
* ```
* When scrolling is needed do the least and smoothest scrolling possible:
* ```ts
* scrollIntoView(node, {
* behavior: 'smooth',
* scrollMode: 'if-needed',
* block: 'nearest',
* inline: 'nearest',
* })
* ```
* @public
*/
export declare interface StandardBehaviorOptions extends Options_2 {
/**
* @defaultValue 'auto
*/
behavior?: ScrollBehavior
}
export {}

View File

@@ -0,0 +1 @@
import{compute as t}from"compute-scroll-into-view";const o=t=>!1===t?{block:"end",inline:"nearest"}:(t=>t===Object(t)&&0!==Object.keys(t).length)(t)?t:{block:"start",inline:"nearest"};function e(e,r){if(!e.isConnected||!(t=>{let o=t;for(;o&&o.parentNode;){if(o.parentNode===document)return!0;o=o.parentNode instanceof ShadowRoot?o.parentNode.host:o.parentNode}return!1})(e))return;const n=(t=>{const o=window.getComputedStyle(t);return{top:parseFloat(o.scrollMarginTop)||0,right:parseFloat(o.scrollMarginRight)||0,bottom:parseFloat(o.scrollMarginBottom)||0,left:parseFloat(o.scrollMarginLeft)||0}})(e);if((t=>"object"==typeof t&&"function"==typeof t.behavior)(r))return r.behavior(t(e,r));const l="boolean"==typeof r||null==r?void 0:r.behavior;for(const{el:a,top:i,left:s}of t(e,o(r))){const t=i-n.top+n.bottom,o=s-n.left+n.right;a.scroll({top:t,left:o,behavior:l})}}export{e as default};//# sourceMappingURL=index.js.map

File diff suppressed because one or more lines are too long