This commit is contained in:
nik
2025-10-03 22:27:28 +03:00
parent 829fad0e17
commit 871cf7e792
16520 changed files with 2967597 additions and 3 deletions

View File

@@ -0,0 +1 @@
export declare let history: (HTMLOrSVGElement & Element)[];

View File

@@ -0,0 +1 @@
import{onDocumentReady as d}from'./document-ready.js';import*as u from'./dom.js';import{focusableSelector as i}from'./focus-management.js';let n=[];d(()=>{function e(t){if(!u.isHTMLorSVGElement(t.target)||t.target===document.body||n[0]===t.target)return;let r=t.target;r=r.closest(i),n.unshift(r!=null?r:t.target),n=n.filter(o=>o!=null&&o.isConnected),n.splice(10)}window.addEventListener("click",e,{capture:!0}),window.addEventListener("mousedown",e,{capture:!0}),window.addEventListener("focus",e,{capture:!0}),document.body.addEventListener("click",e,{capture:!0}),document.body.addEventListener("mousedown",e,{capture:!0}),document.body.addEventListener("focus",e,{capture:!0})});export{n as history};

1
node_modules/@headlessui/react/dist/utils/bugs.d.ts generated vendored Normal file
View File

@@ -0,0 +1 @@
export declare function isDisabledReactIssue7711(element: Element): boolean;

1
node_modules/@headlessui/react/dist/utils/bugs.js generated vendored Normal file
View File

@@ -0,0 +1 @@
import*as n from'./dom.js';function s(l){let e=l.parentElement,t=null;for(;e&&!n.isHTMLFieldSetElement(e);)n.isHTMLLegendElement(e)&&(t=e),e=e.parentElement;let i=(e==null?void 0:e.getAttribute("disabled"))==="";return i&&r(t)?!1:i}function r(l){if(!l)return!1;let e=l.previousElementSibling;for(;e!==null;){if(n.isHTMLLegendElement(e))return!1;e=e.previousElementSibling}return!0}export{s as isDisabledReactIssue7711};

View File

@@ -0,0 +1,25 @@
export declare enum Focus {
/** Focus the first non-disabled item. */
First = 0,
/** Focus the previous non-disabled item. */
Previous = 1,
/** Focus the next non-disabled item. */
Next = 2,
/** Focus the last non-disabled item. */
Last = 3,
/** Focus a specific item based on the `id` of the item. */
Specific = 4,
/** Focus no items at all. */
Nothing = 5
}
export declare function calculateActiveIndex<TItem>(action: {
focus: Focus.Specific;
id: string;
} | {
focus: Exclude<Focus, Focus.Specific>;
}, resolvers: {
resolveItems(): TItem[];
resolveActiveIndex(): number | null;
resolveId(item: TItem, index: number, items: TItem[]): string;
resolveDisabled(item: TItem, index: number, items: TItem[]): boolean;
}): number | null;

View File

@@ -0,0 +1 @@
function u(l){throw new Error("Unexpected object: "+l)}var c=(i=>(i[i.First=0]="First",i[i.Previous=1]="Previous",i[i.Next=2]="Next",i[i.Last=3]="Last",i[i.Specific=4]="Specific",i[i.Nothing=5]="Nothing",i))(c||{});function f(l,n){let t=n.resolveItems();if(t.length<=0)return null;let r=n.resolveActiveIndex(),s=r!=null?r:-1;switch(l.focus){case 0:{for(let e=0;e<t.length;++e)if(!n.resolveDisabled(t[e],e,t))return e;return r}case 1:{s===-1&&(s=t.length);for(let e=s-1;e>=0;--e)if(!n.resolveDisabled(t[e],e,t))return e;return r}case 2:{for(let e=s+1;e<t.length;++e)if(!n.resolveDisabled(t[e],e,t))return e;return r}case 3:{for(let e=t.length-1;e>=0;--e)if(!n.resolveDisabled(t[e],e,t))return e;return r}case 4:{for(let e=0;e<t.length;++e)if(n.resolveId(t[e],e,t)===l.id)return e;return r}case 5:return null;default:u(l)}}export{c as Focus,f as calculateActiveIndex};

View File

@@ -0,0 +1 @@
export declare function classNames(...classes: (false | null | undefined | string)[]): string;

View File

@@ -0,0 +1 @@
function t(...r){return Array.from(new Set(r.flatMap(n=>typeof n=="string"?n.split(" "):[]))).filter(Boolean).join(" ")}export{t as classNames};

View File

@@ -0,0 +1,5 @@
export declare class DefaultMap<T = string, V = any> extends Map<T, V> {
private factory;
constructor(factory: (key: T) => V);
get(key: T): V;
}

View File

@@ -0,0 +1 @@
class a extends Map{constructor(t){super();this.factory=t}get(t){let e=super.get(t);return e===void 0&&(e=this.factory(t),this.set(t,e)),e}}export{a as DefaultMap};

View File

@@ -0,0 +1,24 @@
export type Disposables = ReturnType<typeof disposables>;
/**
* Disposables are a way to manage event handlers and functions like
* `setTimeout` and `requestAnimationFrame` that need to be cleaned up when they
* are no longer needed.
*
*
* When you register a disposable function, it is added to a collection of
* disposables. Each disposable in the collection provides a `dispose` clean up
* function that can be called when it's no longer needed. There is also a
* `dispose` function on the collection itself that can be used to clean up all
* pending disposables in that collection.
*/
export declare function disposables(): {
addEventListener<TEventName extends keyof WindowEventMap>(element: HTMLElement | Window | Document, name: TEventName, listener: (event: WindowEventMap[TEventName]) => any, options?: boolean | AddEventListenerOptions): () => void;
requestAnimationFrame(callback: FrameRequestCallback): () => void;
nextFrame(callback: FrameRequestCallback): () => void;
setTimeout(callback: (...args: any[]) => void, ms?: number | undefined, ...args: any[]): () => void;
microTask(cb: () => void): () => void;
style(node: ElementCSSInlineStyle, property: string, value: string): () => void;
group(cb: (d: typeof this) => void): () => void;
add(cb: () => void): () => void;
dispose(): void;
};

View File

@@ -0,0 +1 @@
import{microTask as a}from'./micro-task.js';function o(){let s=[],r={addEventListener(e,t,n,i){return e.addEventListener(t,n,i),r.add(()=>e.removeEventListener(t,n,i))},requestAnimationFrame(...e){let t=requestAnimationFrame(...e);return r.add(()=>cancelAnimationFrame(t))},nextFrame(...e){return r.requestAnimationFrame(()=>r.requestAnimationFrame(...e))},setTimeout(...e){let t=setTimeout(...e);return r.add(()=>clearTimeout(t))},microTask(...e){let t={current:!0};return a(()=>{t.current&&e[0]()}),r.add(()=>{t.current=!1})},style(e,t,n){let i=e.style.getPropertyValue(t);return Object.assign(e.style,{[t]:n}),this.add(()=>{Object.assign(e.style,{[t]:i})})},group(e){let t=o();return e(t),this.add(()=>t.dispose())},add(e){return s.includes(e)||s.push(e),()=>{let t=s.indexOf(e);if(t>=0)for(let n of s.splice(t,1))n()}},dispose(){for(let e of s.splice(0))e()}};return r}export{o as disposables};

View File

@@ -0,0 +1 @@
export declare function onDocumentReady(cb: () => void): void;

View File

@@ -0,0 +1 @@
function t(n){function e(){document.readyState!=="loading"&&(n(),document.removeEventListener("DOMContentLoaded",e))}typeof window!="undefined"&&typeof document!="undefined"&&(document.addEventListener("DOMContentLoaded",e),e())}export{t as onDocumentReady};

12
node_modules/@headlessui/react/dist/utils/dom.d.ts generated vendored Normal file
View File

@@ -0,0 +1,12 @@
export declare function isNode(element: unknown): element is Node;
export declare function isElement(element: unknown): element is Element;
export declare function isHTMLElement(element: unknown): element is HTMLElement;
export declare function isHTMLorSVGElement(element: unknown): element is HTMLOrSVGElement & Element;
export declare function hasInlineStyle(element: unknown): element is ElementCSSInlineStyle;
export declare function isHTMLIframeElement(element: unknown): element is HTMLIFrameElement;
export declare function isHTMLInputElement(element: unknown): element is HTMLInputElement;
export declare function isHTMLTextAreaElement(element: unknown): element is HTMLTextAreaElement;
export declare function isHTMLLabelElement(element: unknown): element is HTMLLabelElement;
export declare function isHTMLFieldSetElement(element: unknown): element is HTMLFieldSetElement;
export declare function isHTMLLegendElement(element: unknown): element is HTMLLegendElement;
export declare function isInteractiveElement(element: unknown): element is Element;

1
node_modules/@headlessui/react/dist/utils/dom.js generated vendored Normal file
View File

@@ -0,0 +1 @@
function o(e){return typeof e!="object"||e===null?!1:"nodeType"in e}function t(e){return o(e)&&"tagName"in e}function n(e){return t(e)&&"accessKey"in e}function i(e){return t(e)&&"tabIndex"in e}function r(e){return t(e)&&"style"in e}function u(e){return n(e)&&e.nodeName==="IFRAME"}function l(e){return n(e)&&e.nodeName==="INPUT"}function s(e){return n(e)&&e.nodeName==="TEXTAREA"}function m(e){return n(e)&&e.nodeName==="LABEL"}function a(e){return n(e)&&e.nodeName==="FIELDSET"}function E(e){return n(e)&&e.nodeName==="LEGEND"}function L(e){return t(e)?e.matches('a[href],audio[controls],button,details,embed,iframe,img[usemap],input:not([type="hidden"]),label,select,textarea,video[controls]'):!1}export{r as hasInlineStyle,t as isElement,n as isHTMLElement,a as isHTMLFieldSetElement,u as isHTMLIframeElement,l as isHTMLInputElement,m as isHTMLLabelElement,E as isHTMLLegendElement,s as isHTMLTextAreaElement,i as isHTMLorSVGElement,L as isInteractiveElement,o as isNode};

View File

@@ -0,0 +1,19 @@
export declare const ElementPositionState: {
Idle: {
kind: "Idle";
};
Tracked: (position: string) => {
kind: "Tracked";
position: string;
};
Moved: {
kind: "Moved";
};
};
type ResolvedStates<T extends Record<string, any>> = {
[K in keyof T]: T[K] extends (...args: any[]) => infer R ? R : T[K];
}[keyof T];
export type ElementPositionState = ResolvedStates<typeof ElementPositionState>;
export declare function computeVisualPosition(element: HTMLElement): string;
export declare function detectMovement(target: HTMLElement, state: ResolvedStates<typeof ElementPositionState>, onMove: () => void): () => void;
export {};

View File

@@ -0,0 +1 @@
import{disposables as r}from'./disposables.js';const c={Idle:{kind:"Idle"},Tracked:e=>({kind:"Tracked",position:e}),Moved:{kind:"Moved"}};function a(e){let t=e.getBoundingClientRect();return`${t.x},${t.y}`}function p(e,t,i){let n=r();if(t.kind==="Tracked"){let o=function(){d!==a(e)&&(n.dispose(),i())};var f=o;let{position:d}=t,s=new ResizeObserver(o);s.observe(e),n.add(()=>s.disconnect()),n.addEventListener(window,"scroll",o,{passive:!0}),n.addEventListener(window,"resize",o)}return()=>n.dispose()}export{c as ElementPositionState,a as computeVisualPosition,p as detectMovement};

17
node_modules/@headlessui/react/dist/utils/env.d.ts generated vendored Normal file
View File

@@ -0,0 +1,17 @@
type RenderEnv = 'client' | 'server';
type HandoffState = 'pending' | 'complete';
declare class Env {
current: RenderEnv;
handoffState: HandoffState;
currentId: number;
set(env: RenderEnv): void;
reset(): void;
nextId(): number;
get isServer(): boolean;
get isClient(): boolean;
private detect;
handoff(): void;
get isHandoffComplete(): boolean;
}
export declare let env: Env;
export {};

1
node_modules/@headlessui/react/dist/utils/env.js generated vendored Normal file
View File

@@ -0,0 +1 @@
var i=Object.defineProperty;var d=(t,e,n)=>e in t?i(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var r=(t,e,n)=>(d(t,typeof e!="symbol"?e+"":e,n),n);class o{constructor(){r(this,"current",this.detect());r(this,"handoffState","pending");r(this,"currentId",0)}set(e){this.current!==e&&(this.handoffState="pending",this.currentId=0,this.current=e)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window=="undefined"||typeof document=="undefined"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}}let s=new o;export{s as env};

View File

@@ -0,0 +1,50 @@
import type { MutableRefObject } from 'react';
export declare let focusableSelector: string;
export declare enum Focus {
/** Focus the first non-disabled element */
First = 1,
/** Focus the previous non-disabled element */
Previous = 2,
/** Focus the next non-disabled element */
Next = 4,
/** Focus the last non-disabled element */
Last = 8,
/** Wrap tab around */
WrapAround = 16,
/** Prevent scrolling the focusable elements into view */
NoScroll = 32,
/** Focus the first focusable element with the `data-autofocus` attribute. */
AutoFocus = 64
}
export declare enum FocusResult {
/** Something went wrong while trying to focus. */
Error = 0,
/** When `Focus.WrapAround` is enabled, going from position `N` to `N+1` where `N` is the last index in the array, then we overflow. */
Overflow = 1,
/** Focus was successful. */
Success = 2,
/** When `Focus.WrapAround` is enabled, going from position `N` to `N-1` where `N` is the first index in the array, then we underflow. */
Underflow = 3
}
interface QuerySelectorAll {
querySelectorAll<E extends Element = Element>(selectors: string): NodeListOf<E>;
}
export declare function getFocusableElements(container?: QuerySelectorAll | null): HTMLElement[];
export declare function getAutoFocusableElements(container?: HTMLElement | null): HTMLElement[];
export declare enum FocusableMode {
/** The element itself must be focusable. */
Strict = 0,
/** The element should be inside of a focusable element. */
Loose = 1
}
export declare function isFocusableElement(element: HTMLOrSVGElement & Element, mode?: FocusableMode): boolean;
export declare function restoreFocusIfNecessary(element: HTMLElement | null): void;
export declare function focusElement(element: HTMLOrSVGElement | null): void;
export declare function sortByDomNode<T>(nodes: T[], resolveKey?: (item: T) => HTMLElement | null): T[];
export declare function focusFrom(current: HTMLElement | null, focus: Focus, container?: Document | ShadowRoot | HTMLElement | null): FocusResult;
export declare function focusIn(container: HTMLElement | HTMLElement[], focus: Focus, { sorted, relativeTo, skipElements, }?: Partial<{
sorted: boolean;
relativeTo: HTMLElement | null;
skipElements: (HTMLElement | MutableRefObject<HTMLElement | null>)[];
}>): FocusResult;
export {};

View File

@@ -0,0 +1 @@
import{disposables as p}from'./disposables.js';import*as y from'./dom.js';import{match as L}from'./match.js';import{getActiveElement as b,getOwnerDocument as F,getRootNode as f}from'./owner.js';let E=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","details>summary","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(","),S=["[data-autofocus]"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var T=(o=>(o[o.First=1]="First",o[o.Previous=2]="Previous",o[o.Next=4]="Next",o[o.Last=8]="Last",o[o.WrapAround=16]="WrapAround",o[o.NoScroll=32]="NoScroll",o[o.AutoFocus=64]="AutoFocus",o))(T||{}),A=(n=>(n[n.Error=0]="Error",n[n.Overflow=1]="Overflow",n[n.Success=2]="Success",n[n.Underflow=3]="Underflow",n))(A||{}),O=(t=>(t[t.Previous=-1]="Previous",t[t.Next=1]="Next",t))(O||{});function x(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(E)).sort((r,t)=>Math.sign((r.tabIndex||Number.MAX_SAFE_INTEGER)-(t.tabIndex||Number.MAX_SAFE_INTEGER)))}function h(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(S)).sort((r,t)=>Math.sign((r.tabIndex||Number.MAX_SAFE_INTEGER)-(t.tabIndex||Number.MAX_SAFE_INTEGER)))}var I=(t=>(t[t.Strict=0]="Strict",t[t.Loose=1]="Loose",t))(I||{});function H(e,r=0){var t;return e===((t=F(e))==null?void 0:t.body)?!1:L(r,{[0](){return e.matches(E)},[1](){let l=e;for(;l!==null;){if(l.matches(E))return!0;l=l.parentElement}return!1}})}function K(e){p().nextFrame(()=>{let r=b(e);r&&y.isHTMLorSVGElement(r)&&!H(r,0)&&w(e)})}var g=(t=>(t[t.Keyboard=0]="Keyboard",t[t.Mouse=1]="Mouse",t))(g||{});typeof window!="undefined"&&typeof document!="undefined"&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{e.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:e.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function w(e){e==null||e.focus({preventScroll:!0})}let _=["textarea","input"].join(",");function P(e){var r,t;return(t=(r=e==null?void 0:e.matches)==null?void 0:r.call(e,_))!=null?t:!1}function G(e,r=t=>t){return e.slice().sort((t,l)=>{let n=r(t),a=r(l);if(n===null||a===null)return 0;let u=n.compareDocumentPosition(a);return u&Node.DOCUMENT_POSITION_FOLLOWING?-1:u&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function R(e,r,t=e===null?document.body:f(e)){return v(x(t),r,{relativeTo:e})}function v(e,r,{sorted:t=!0,relativeTo:l=null,skipElements:n=[]}={}){let a=Array.isArray(e)?e.length>0?f(e[0]):document:f(e),u=Array.isArray(e)?t?G(e):e:r&64?h(e):x(e);n.length>0&&u.length>1&&(u=u.filter(i=>!n.some(d=>d!=null&&"current"in d?(d==null?void 0:d.current)===i:d===i))),l=l!=null?l:a==null?void 0:a.activeElement;let o=(()=>{if(r&5)return 1;if(r&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),M=(()=>{if(r&1)return 0;if(r&2)return Math.max(0,u.indexOf(l))-1;if(r&4)return Math.max(0,u.indexOf(l))+1;if(r&8)return u.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),N=r&32?{preventScroll:!0}:{},m=0,c=u.length,s;do{if(m>=c||m+c<=0)return 0;let i=M+m;if(r&16)i=(i+c)%c;else{if(i<0)return 3;if(i>=c)return 1}s=u[i],s==null||s.focus(N),m+=o}while(s!==b(s));return r&6&&P(s)&&s.select(),2}export{T as Focus,A as FocusResult,I as FocusableMode,w as focusElement,R as focusFrom,v as focusIn,E as focusableSelector,h as getAutoFocusableElements,x as getFocusableElements,H as isFocusableElement,K as restoreFocusIfNecessary,G as sortByDomNode};

4
node_modules/@headlessui/react/dist/utils/form.d.ts generated vendored Normal file
View File

@@ -0,0 +1,4 @@
type Entries = [string, string][];
export declare function objectToFormEntries(source?: Record<string, any>, parentKey?: string | null, entries?: Entries): Entries;
export declare function attemptSubmit(elementInForm: HTMLElement): void;
export {};

1
node_modules/@headlessui/react/dist/utils/form.js generated vendored Normal file
View File

@@ -0,0 +1 @@
import{isValidElement as f}from"react";function p(t={},i=null,n=[]){for(let[e,o]of Object.entries(t))s(n,r(i,e),o);return n}function r(t,i){return t?t+"["+i+"]":i}function s(t,i,n){if(Array.isArray(n))for(let[e,o]of n.entries())s(t,r(i,e.toString()),o);else n instanceof Date?t.push([i,n.toISOString()]):typeof n=="boolean"?t.push([i,n?"1":"0"]):typeof n=="string"?t.push([i,n]):typeof n=="number"?t.push([i,`${n}`]):n==null?t.push([i,""]):c(n)&&!f(n)&&p(n,i,t)}function g(t){var n,e;let i=(n=t==null?void 0:t.form)!=null?n:t.closest("form");if(i){for(let o of i.elements)if(o!==t&&(o.tagName==="INPUT"&&o.type==="submit"||o.tagName==="BUTTON"&&o.type==="submit"||o.nodeName==="INPUT"&&o.type==="image")){o.click();return}(e=i.requestSubmit)==null||e.call(i)}}function c(t){if(Object.prototype.toString.call(t)!=="[object Object]")return!1;let i=Object.getPrototypeOf(t);return i===null||Object.getPrototypeOf(i)===null}export{g as attemptSubmit,p as objectToFormEntries};

View File

@@ -0,0 +1 @@
export declare function getTextValue(element: HTMLElement): string;

View File

@@ -0,0 +1 @@
import*as g from'./dom.js';let a=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function o(e){var l,n;let i=(l=e.innerText)!=null?l:"",t=e.cloneNode(!0);if(!g.isHTMLElement(t))return i;let u=!1;for(let f of t.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))f.remove(),u=!0;let r=u?(n=t.innerText)!=null?n:"":i;return a.test(r)&&(r=r.replace(a,"")),r}function F(e){let i=e.getAttribute("aria-label");if(typeof i=="string")return i.trim();let t=e.getAttribute("aria-labelledby");if(t){let u=t.split(" ").map(r=>{let l=document.getElementById(r);if(l){let n=l.getAttribute("aria-label");return typeof n=="string"?n.trim():o(l).trim()}return null}).filter(Boolean);if(u.length>0)return u.join(", ")}return o(e).trim()}export{F as getTextValue};

1
node_modules/@headlessui/react/dist/utils/match.d.ts generated vendored Normal file
View File

@@ -0,0 +1 @@
export declare function match<TValue extends string | number = string, TReturnValue = unknown>(value: TValue, lookup: Record<TValue, TReturnValue | ((...args: any[]) => TReturnValue)>, ...args: any[]): TReturnValue;

1
node_modules/@headlessui/react/dist/utils/match.js generated vendored Normal file
View File

@@ -0,0 +1 @@
function u(r,n,...a){if(r in n){let e=n[r];return typeof e=="function"?e(...a):e}let t=new Error(`Tried to handle "${r}" but there is no handler defined. Only defined handlers are: ${Object.keys(n).map(e=>`"${e}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,u),t}export{u as match};

View File

@@ -0,0 +1 @@
export declare function microTask(cb: () => void): void;

View File

@@ -0,0 +1 @@
function t(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(o=>setTimeout(()=>{throw o}))}export{t as microTask};

1
node_modules/@headlessui/react/dist/utils/once.d.ts generated vendored Normal file
View File

@@ -0,0 +1 @@
export declare function once<T>(cb: (...args: T[]) => void): (...args: T[]) => void;

1
node_modules/@headlessui/react/dist/utils/once.js generated vendored Normal file
View File

@@ -0,0 +1 @@
function l(r){let e={called:!1};return(...t)=>{if(!e.called)return e.called=!0,r(...t)}}export{l as once};

4
node_modules/@headlessui/react/dist/utils/owner.d.ts generated vendored Normal file
View File

@@ -0,0 +1,4 @@
export declare function getOwnerDocument<T extends Element>(element: T | null | undefined): Document | null;
export declare function getRootNode<T extends Element>(element: T | null | undefined): Document | ShadowRoot | null;
export declare function getActiveElement(element: Element | null | undefined): Element | null;
export declare function isActiveElement(element: Element | null | undefined): boolean;

1
node_modules/@headlessui/react/dist/utils/owner.js generated vendored Normal file
View File

@@ -0,0 +1 @@
import{env as t}from'./env.js';function l(n){var u;return t.isServer?null:n==null?document:(u=n==null?void 0:n.ownerDocument)!=null?u:document}function r(n){var u,o;return t.isServer?null:n==null?document:(o=(u=n==null?void 0:n.getRootNode)==null?void 0:u.call(n))!=null?o:document}function e(n){var u,o;return(o=(u=r(n))==null?void 0:u.activeElement)!=null?o:null}function d(n){return e(n)===n}export{e as getActiveElement,l as getOwnerDocument,r as getRootNode,d as isActiveElement};

View File

@@ -0,0 +1,3 @@
export declare function isIOS(): boolean;
export declare function isAndroid(): boolean;
export declare function isMobile(): boolean;

View File

@@ -0,0 +1 @@
function t(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function i(){return/Android/gi.test(window.navigator.userAgent)}function n(){return t()||i()}export{i as isAndroid,t as isIOS,n as isMobile};

81
node_modules/@headlessui/react/dist/utils/render.d.ts generated vendored Normal file
View File

@@ -0,0 +1,81 @@
import React, { Fragment, type ElementType, type Ref } from 'react';
import type { Expand, Props } from '../types.js';
export declare enum RenderFeatures {
/** No features at all */
None = 0,
/**
* When used, this will allow us to use one of the render strategies.
*
* **The render strategies are:**
* - **Unmount** _(Will unmount the component.)_
* - **Hidden** _(Will hide the component using the [hidden] attribute.)_
*/
RenderStrategy = 1,
/**
* When used, this will allow the user of our component to be in control. This can be used when
* you want to transition based on some state.
*/
Static = 2
}
export declare enum RenderStrategy {
Unmount = 0,
Hidden = 1
}
type UnionToIntersection<T> = (T extends any ? (x: T) => any : never) extends (x: infer R) => any ? R : never;
type PropsForFeature<TPassedInFeatures extends RenderFeatures, TForFeature extends RenderFeatures, TProps> = TPassedInFeatures extends TForFeature ? TProps : {};
export type PropsForFeatures<T extends RenderFeatures> = Expand<UnionToIntersection<PropsForFeature<T, RenderFeatures.Static, {
static?: boolean;
}> | PropsForFeature<T, RenderFeatures.RenderStrategy, {
unmount?: boolean;
}>>>;
export declare function useRender(): typeof render;
declare function render<TFeature extends RenderFeatures, TTag extends ElementType, TSlot>({ ourProps, theirProps, slot, defaultTag, features, visible, name, mergeRefs, }: {
ourProps: Expand<Props<TTag, TSlot, any> & PropsForFeatures<TFeature>> & {
ref?: Ref<HTMLElement | ElementType>;
};
theirProps: Expand<Props<TTag, TSlot, any>>;
slot?: TSlot;
defaultTag: ElementType;
features?: TFeature;
visible?: boolean;
name: string;
mergeRefs?: ReturnType<typeof useMergeRefsFn>;
}): ReturnType<typeof _render> | null;
declare function _render<TTag extends ElementType, TSlot>(props: Props<TTag, TSlot> & {
ref?: unknown;
}, slot: TSlot | undefined, tag: ElementType, name: string, mergeRefs: ReturnType<typeof useMergeRefsFn>): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
/**
* This is a singleton hook. **You can ONLY call the returned
* function *once* to produce expected results.** If you need
* to call `mergeRefs()` multiple times you need to create a
* separate function for each invocation. This happens as we
* store the list of `refs` to update and always return the
* same function that refers to that list of refs.
*
* You shouldn't normally read refs during render but this
* should actually be okay because React itself is calling
* the `function` that updates these refs and can only do
* so once the ref that contains the list is updated.
*/
declare function useMergeRefsFn(): (...refs: any[]) => ((value: any) => void) | undefined;
export type HasDisplayName = {
displayName: string;
};
export type RefProp<T extends Function> = T extends (props: any, ref: Ref<infer RefType>) => any ? {
ref?: Ref<RefType>;
} : never;
export declare function mergeProps<T extends Props<any, any>[]>(...listOfProps: T): Props<any, any>;
/**
* This is a hack, but basically we want to keep the full 'API' of the component, but we do want to
* wrap it in a forwardRef so that we _can_ passthrough the ref
*/
export declare function forwardRefWithAs<T extends {
name: string;
displayName?: string;
}>(component: T): T & {
displayName: string;
};
export declare function compact<T extends Record<any, any>>(object: T): {} & T;
export declare function isFragment(element: any): element is typeof Fragment;
export declare function isFragmentInstance(element: React.ReactElement): boolean;
export {};

4
node_modules/@headlessui/react/dist/utils/render.js generated vendored Normal file
View File

@@ -0,0 +1,4 @@
import E,{Fragment as j,cloneElement as v,createElement as S,forwardRef as w,isValidElement as k,useCallback as x,useRef as M}from"react";import{classNames as N}from'./class-names.js';import{match as O}from'./match.js';var A=(a=>(a[a.None=0]="None",a[a.RenderStrategy=1]="RenderStrategy",a[a.Static=2]="Static",a))(A||{}),C=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(C||{});function K(){let n=$();return x(r=>U({mergeRefs:n,...r}),[n])}function U({ourProps:n,theirProps:r,slot:e,defaultTag:a,features:s,visible:t=!0,name:l,mergeRefs:i}){i=i!=null?i:I;let o=P(r,n);if(t)return F(o,e,a,l,i);let y=s!=null?s:0;if(y&2){let{static:f=!1,...u}=o;if(f)return F(u,e,a,l,i)}if(y&1){let{unmount:f=!0,...u}=o;return O(f?0:1,{[0](){return null},[1](){return F({...u,hidden:!0,style:{display:"none"}},e,a,l,i)}})}return F(o,e,a,l,i)}function F(n,r={},e,a,s){let{as:t=e,children:l,refName:i="ref",...o}=h(n,["unmount","static"]),y=n.ref!==void 0?{[i]:n.ref}:{},f=typeof l=="function"?l(r):l;"className"in o&&o.className&&typeof o.className=="function"&&(o.className=o.className(r)),o["aria-labelledby"]&&o["aria-labelledby"]===o.id&&(o["aria-labelledby"]=void 0);let u={};if(r){let d=!1,p=[];for(let[c,T]of Object.entries(r))typeof T=="boolean"&&(d=!0),T===!0&&p.push(c.replace(/([A-Z])/g,g=>`-${g.toLowerCase()}`));if(d){u["data-headlessui-state"]=p.join(" ");for(let c of p)u[`data-${c}`]=""}}if(b(t)&&(Object.keys(m(o)).length>0||Object.keys(m(u)).length>0))if(!k(f)||Array.isArray(f)&&f.length>1||D(f)){if(Object.keys(m(o)).length>0)throw new Error(['Passing props on "Fragment"!',"",`The current component <${a} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(m(o)).concat(Object.keys(m(u))).map(d=>` - ${d}`).join(`
`),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(d=>` - ${d}`).join(`
`)].join(`
`))}else{let d=f.props,p=d==null?void 0:d.className,c=typeof p=="function"?(...R)=>N(p(...R),o.className):N(p,o.className),T=c?{className:c}:{},g=P(f.props,m(h(o,["ref"])));for(let R in u)R in g&&delete u[R];return v(f,Object.assign({},g,u,y,{ref:s(H(f),y.ref)},T))}return S(t,Object.assign({},h(o,["ref"]),!b(t)&&y,!b(t)&&u),f)}function $(){let n=M([]),r=x(e=>{for(let a of n.current)a!=null&&(typeof a=="function"?a(e):a.current=e)},[]);return(...e)=>{if(!e.every(a=>a==null))return n.current=e,r}}function I(...n){return n.every(r=>r==null)?void 0:r=>{for(let e of n)e!=null&&(typeof e=="function"?e(r):e.current=r)}}function P(...n){var a;if(n.length===0)return{};if(n.length===1)return n[0];let r={},e={};for(let s of n)for(let t in s)t.startsWith("on")&&typeof s[t]=="function"?((a=e[t])!=null||(e[t]=[]),e[t].push(s[t])):r[t]=s[t];if(r.disabled||r["aria-disabled"])for(let s in e)/^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(s)&&(e[s]=[t=>{var l;return(l=t==null?void 0:t.preventDefault)==null?void 0:l.call(t)}]);for(let s in e)Object.assign(r,{[s](t,...l){let i=e[s];for(let o of i){if((t instanceof Event||(t==null?void 0:t.nativeEvent)instanceof Event)&&t.defaultPrevented)return;o(t,...l)}}});return r}function V(...n){var a;if(n.length===0)return{};if(n.length===1)return n[0];let r={},e={};for(let s of n)for(let t in s)t.startsWith("on")&&typeof s[t]=="function"?((a=e[t])!=null||(e[t]=[]),e[t].push(s[t])):r[t]=s[t];for(let s in e)Object.assign(r,{[s](...t){let l=e[s];for(let i of l)i==null||i(...t)}});return r}function Y(n){var r;return Object.assign(w(n),{displayName:(r=n.displayName)!=null?r:n.name})}function m(n){let r=Object.assign({},n);for(let e in r)r[e]===void 0&&delete r[e];return r}function h(n,r=[]){let e=Object.assign({},n);for(let a of r)a in e&&delete e[a];return e}function H(n){return E.version.split(".")[0]>="19"?n.props.ref:n.ref}function b(n){return n===j||n===Symbol.for("react.fragment")}function D(n){return b(n.type)}export{A as RenderFeatures,C as RenderStrategy,m as compact,Y as forwardRefWithAs,b as isFragment,D as isFragmentInstance,V as mergeProps,K as useRender};

View File

@@ -0,0 +1,5 @@
import * as React from 'react';
export declare function StableCollection({ children }: {
children: React.ReactNode | React.ReactNode[];
}): React.JSX.Element;
export declare function useStableCollectionIndex(group: string): number;

View File

@@ -0,0 +1 @@
import*as l from"react";const s=l.createContext(null);function a(){return{groups:new Map,get(o,e){var i;let t=this.groups.get(o);t||(t=new Map,this.groups.set(o,t));let n=(i=t.get(e))!=null?i:0;t.set(e,n+1);let r=Array.from(t.keys()).indexOf(e);function u(){let c=t.get(e);c>1?t.set(e,c-1):t.delete(e)}return[r,u]}}}function f({children:o}){let e=l.useRef(a());return l.createElement(s.Provider,{value:e},o)}function C(o){let e=l.useContext(s);if(!e)throw new Error("You must wrap your component in a <StableCollection>");let t=l.useId(),[n,r]=e.current.get(o,t);return l.useEffect(()=>r,[]),n}export{f as StableCollection,C as useStableCollectionIndex};

View File

@@ -0,0 +1,2 @@
import React from 'react';
export declare let startTransition: typeof React.startTransition;

View File

@@ -0,0 +1 @@
var t;import r from"react";let a=(t=r.startTransition)!=null?t:function(i){i()};export{a as startTransition};

11
node_modules/@headlessui/react/dist/utils/store.d.ts generated vendored Normal file
View File

@@ -0,0 +1,11 @@
type ChangeFn = () => void;
type UnsubscribeFn = () => void;
type ActionFn<T> = (this: T, ...args: any[]) => T | void;
type StoreActions<Key extends string, T> = Record<Key, ActionFn<T>>;
export interface Store<T, ActionKey extends string> {
getSnapshot(): T;
subscribe(onChange: ChangeFn): UnsubscribeFn;
dispatch(action: ActionKey, ...args: any[]): void;
}
export declare function createStore<T, ActionKey extends string>(initial: () => T, actions: StoreActions<ActionKey, T>): Store<T, ActionKey>;
export {};

1
node_modules/@headlessui/react/dist/utils/store.js generated vendored Normal file
View File

@@ -0,0 +1 @@
function a(o,r){let t=o(),n=new Set;return{getSnapshot(){return t},subscribe(e){return n.add(e),()=>n.delete(e)},dispatch(e,...s){let i=r[e].call(t,...s);i&&(t=i,n.forEach(c=>c()))}}}export{a as createStore};