@universityofmaryland/web-model-library 1.0.7 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +5 -0
- package/README.md +1 -1
- package/dist/_types.d.ts +43 -0
- package/dist/_types.d.ts.map +1 -1
- package/dist/_virtual/index.js +1 -1
- package/dist/_virtual/postcss.js +1 -1
- package/dist/attributes/change-detection.d.ts +21 -0
- package/dist/attributes/change-detection.d.ts.map +1 -0
- package/dist/attributes/change-detection.js +60 -0
- package/dist/attributes/change-detection.js.map +1 -0
- package/dist/attributes/checks.d.ts.map +1 -1
- package/dist/attributes/checks.js +15 -8
- package/dist/attributes/checks.js.map +1 -1
- package/dist/attributes/config.d.ts +29 -0
- package/dist/attributes/config.d.ts.map +1 -0
- package/dist/attributes/config.js +57 -0
- package/dist/attributes/config.js.map +1 -0
- package/dist/attributes/converters.d.ts +14 -0
- package/dist/attributes/converters.d.ts.map +1 -0
- package/dist/attributes/converters.js +84 -0
- package/dist/attributes/converters.js.map +1 -0
- package/dist/attributes/errors.d.ts +16 -0
- package/dist/attributes/errors.d.ts.map +1 -0
- package/dist/attributes/errors.js +51 -0
- package/dist/attributes/errors.js.map +1 -0
- package/dist/attributes/index.d.ts +4 -0
- package/dist/attributes/index.d.ts.map +1 -1
- package/dist/attributes.js +18 -0
- package/dist/attributes.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/model/controllers.d.ts +22 -0
- package/dist/model/controllers.d.ts.map +1 -0
- package/dist/model/controllers.js +53 -0
- package/dist/model/controllers.js.map +1 -0
- package/dist/model/errors.d.ts +13 -0
- package/dist/model/errors.d.ts.map +1 -0
- package/dist/model/errors.js +23 -0
- package/dist/model/errors.js.map +1 -0
- package/dist/model/index.d.ts +54 -3
- package/dist/model/index.d.ts.map +1 -1
- package/dist/model/registration.d.ts +13 -0
- package/dist/model/registration.d.ts.map +1 -0
- package/dist/model/registration.js +83 -0
- package/dist/model/registration.js.map +1 -0
- package/dist/model/update-cycle.d.ts +12 -0
- package/dist/model/update-cycle.d.ts.map +1 -0
- package/dist/model/update-cycle.js +41 -0
- package/dist/model/update-cycle.js.map +1 -0
- package/dist/model.js +335 -55
- package/dist/model.js.map +1 -1
- package/dist/node_modules/.pnpm/nanoid@3.3.11/node_modules/nanoid/non-secure/index.js.map +1 -0
- package/dist/node_modules/{picocolors → .pnpm/picocolors@1.1.1/node_modules/picocolors}/picocolors.browser.js +1 -1
- package/dist/node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.browser.js.map +1 -0
- package/dist/node_modules/.pnpm/postcss-discard-duplicates@5.1.0_postcss@8.5.8/node_modules/postcss-discard-duplicates/src/index.js.map +1 -0
- package/dist/node_modules/.pnpm/postcss@8.5.8/node_modules/postcss/lib/at-rule.js.map +1 -0
- package/dist/node_modules/.pnpm/postcss@8.5.8/node_modules/postcss/lib/comment.js.map +1 -0
- package/dist/node_modules/.pnpm/postcss@8.5.8/node_modules/postcss/lib/container.js.map +1 -0
- package/dist/node_modules/{postcss → .pnpm/postcss@8.5.8/node_modules/postcss}/lib/css-syntax-error.js +2 -2
- package/dist/node_modules/.pnpm/postcss@8.5.8/node_modules/postcss/lib/css-syntax-error.js.map +1 -0
- package/dist/node_modules/.pnpm/postcss@8.5.8/node_modules/postcss/lib/declaration.js.map +1 -0
- package/dist/node_modules/.pnpm/postcss@8.5.8/node_modules/postcss/lib/document.js.map +1 -0
- package/dist/node_modules/.pnpm/postcss@8.5.8/node_modules/postcss/lib/fromJSON.js.map +1 -0
- package/dist/node_modules/{postcss → .pnpm/postcss@8.5.8/node_modules/postcss}/lib/input.js +2 -2
- package/dist/node_modules/.pnpm/postcss@8.5.8/node_modules/postcss/lib/input.js.map +1 -0
- package/dist/node_modules/.pnpm/postcss@8.5.8/node_modules/postcss/lib/lazy-result.js.map +1 -0
- package/dist/node_modules/.pnpm/postcss@8.5.8/node_modules/postcss/lib/list.js.map +1 -0
- package/dist/node_modules/{postcss → .pnpm/postcss@8.5.8/node_modules/postcss}/lib/map-generator.js +1 -1
- package/dist/node_modules/.pnpm/postcss@8.5.8/node_modules/postcss/lib/map-generator.js.map +1 -0
- package/dist/node_modules/.pnpm/postcss@8.5.8/node_modules/postcss/lib/no-work-result.js.map +1 -0
- package/dist/node_modules/.pnpm/postcss@8.5.8/node_modules/postcss/lib/node.js.map +1 -0
- package/dist/node_modules/.pnpm/postcss@8.5.8/node_modules/postcss/lib/parse.js.map +1 -0
- package/dist/node_modules/.pnpm/postcss@8.5.8/node_modules/postcss/lib/parser.js.map +1 -0
- package/dist/node_modules/{postcss → .pnpm/postcss@8.5.8/node_modules/postcss}/lib/postcss.js +1 -1
- package/dist/node_modules/.pnpm/postcss@8.5.8/node_modules/postcss/lib/postcss.js.map +1 -0
- package/dist/node_modules/.pnpm/postcss@8.5.8/node_modules/postcss/lib/postcss2.js.map +1 -0
- package/dist/node_modules/{postcss → .pnpm/postcss@8.5.8/node_modules/postcss}/lib/previous-map.js +1 -1
- package/dist/node_modules/.pnpm/postcss@8.5.8/node_modules/postcss/lib/previous-map.js.map +1 -0
- package/dist/node_modules/.pnpm/postcss@8.5.8/node_modules/postcss/lib/processor.js.map +1 -0
- package/dist/node_modules/.pnpm/postcss@8.5.8/node_modules/postcss/lib/result.js.map +1 -0
- package/dist/node_modules/.pnpm/postcss@8.5.8/node_modules/postcss/lib/root.js.map +1 -0
- package/dist/node_modules/.pnpm/postcss@8.5.8/node_modules/postcss/lib/rule.js.map +1 -0
- package/dist/node_modules/.pnpm/postcss@8.5.8/node_modules/postcss/lib/stringifier.js.map +1 -0
- package/dist/node_modules/.pnpm/postcss@8.5.8/node_modules/postcss/lib/stringify.js.map +1 -0
- package/dist/node_modules/{postcss → .pnpm/postcss@8.5.8/node_modules/postcss}/lib/symbols.js +1 -1
- package/dist/node_modules/.pnpm/postcss@8.5.8/node_modules/postcss/lib/symbols.js.map +1 -0
- package/dist/node_modules/.pnpm/postcss@8.5.8/node_modules/postcss/lib/tokenize.js.map +1 -0
- package/dist/node_modules/.pnpm/postcss@8.5.8/node_modules/postcss/lib/warning.js.map +1 -0
- package/dist/slots/index.d.ts +6 -0
- package/dist/slots/index.d.ts.map +1 -1
- package/dist/slots/slot-events.d.ts +32 -0
- package/dist/slots/slot-events.d.ts.map +1 -0
- package/dist/slots/slot-events.js +83 -0
- package/dist/slots/slot-events.js.map +1 -0
- package/dist/slots/slot-query.d.ts +18 -0
- package/dist/slots/slot-query.d.ts.map +1 -0
- package/dist/slots/slot-query.js +59 -0
- package/dist/slots/slot-query.js.map +1 -0
- package/dist/slots/slot-validation.d.ts +5 -0
- package/dist/slots/slot-validation.d.ts.map +1 -0
- package/dist/slots/slot-validation.js +89 -0
- package/dist/slots/slot-validation.js.map +1 -0
- package/dist/slots.js +15 -1
- package/dist/slots.js.map +1 -1
- package/dist/testing/console.d.ts +8 -0
- package/dist/testing/console.d.ts.map +1 -0
- package/dist/testing/console.js +39 -0
- package/dist/testing/console.js.map +1 -0
- package/dist/testing/events.d.ts +11 -0
- package/dist/testing/events.d.ts.map +1 -0
- package/dist/testing/events.js +47 -0
- package/dist/testing/events.js.map +1 -0
- package/dist/testing/fixture.d.ts +10 -0
- package/dist/testing/fixture.d.ts.map +1 -0
- package/dist/testing/fixture.js +36 -0
- package/dist/testing/fixture.js.map +1 -0
- package/dist/testing/index.d.ts +8 -0
- package/dist/testing/index.d.ts.map +1 -0
- package/dist/testing/shadow.d.ts +6 -0
- package/dist/testing/shadow.d.ts.map +1 -0
- package/dist/testing/shadow.js +27 -0
- package/dist/testing/shadow.js.map +1 -0
- package/dist/testing/slots.d.ts +10 -0
- package/dist/testing/slots.d.ts.map +1 -0
- package/dist/testing/slots.js +62 -0
- package/dist/testing/slots.js.map +1 -0
- package/dist/testing.d.ts +2 -0
- package/dist/testing.js +26 -0
- package/dist/testing.js.map +1 -0
- package/dist/utilities/debug.d.ts +365 -0
- package/dist/utilities/debug.d.ts.map +1 -0
- package/dist/utilities/debug.js +71 -0
- package/dist/utilities/debug.js.map +1 -0
- package/dist/utilities/dom.d.ts +11 -0
- package/dist/utilities/dom.d.ts.map +1 -0
- package/dist/utilities/dom.js +57 -0
- package/dist/utilities/dom.js.map +1 -0
- package/dist/utilities/events.d.ts +22 -0
- package/dist/utilities/events.d.ts.map +1 -0
- package/dist/utilities/events.js +49 -0
- package/dist/utilities/events.js.map +1 -0
- package/dist/utilities/index.d.ts +7 -0
- package/dist/utilities/index.d.ts.map +1 -1
- package/dist/utilities/register.d.ts.map +1 -1
- package/dist/utilities/register.js +16 -4
- package/dist/utilities/register.js.map +1 -1
- package/dist/utilities/styles.js +1 -1
- package/dist/utilities/types.d.ts +10 -0
- package/dist/utilities/types.d.ts.map +1 -0
- package/dist/utilities/types.js +45 -0
- package/dist/utilities/types.js.map +1 -0
- package/dist/utilities.js +27 -1
- package/dist/utilities.js.map +1 -1
- package/package.json +21 -15
- package/dist/node_modules/nanoid/non-secure/index.js.map +0 -1
- package/dist/node_modules/picocolors/picocolors.browser.js.map +0 -1
- package/dist/node_modules/postcss/lib/at-rule.js.map +0 -1
- package/dist/node_modules/postcss/lib/comment.js.map +0 -1
- package/dist/node_modules/postcss/lib/container.js.map +0 -1
- package/dist/node_modules/postcss/lib/css-syntax-error.js.map +0 -1
- package/dist/node_modules/postcss/lib/declaration.js.map +0 -1
- package/dist/node_modules/postcss/lib/document.js.map +0 -1
- package/dist/node_modules/postcss/lib/fromJSON.js.map +0 -1
- package/dist/node_modules/postcss/lib/input.js.map +0 -1
- package/dist/node_modules/postcss/lib/lazy-result.js.map +0 -1
- package/dist/node_modules/postcss/lib/list.js.map +0 -1
- package/dist/node_modules/postcss/lib/map-generator.js.map +0 -1
- package/dist/node_modules/postcss/lib/no-work-result.js.map +0 -1
- package/dist/node_modules/postcss/lib/node.js.map +0 -1
- package/dist/node_modules/postcss/lib/parse.js.map +0 -1
- package/dist/node_modules/postcss/lib/parser.js.map +0 -1
- package/dist/node_modules/postcss/lib/postcss.js.map +0 -1
- package/dist/node_modules/postcss/lib/postcss2.js.map +0 -1
- package/dist/node_modules/postcss/lib/previous-map.js.map +0 -1
- package/dist/node_modules/postcss/lib/processor.js.map +0 -1
- package/dist/node_modules/postcss/lib/result.js.map +0 -1
- package/dist/node_modules/postcss/lib/root.js.map +0 -1
- package/dist/node_modules/postcss/lib/rule.js.map +0 -1
- package/dist/node_modules/postcss/lib/stringifier.js.map +0 -1
- package/dist/node_modules/postcss/lib/stringify.js.map +0 -1
- package/dist/node_modules/postcss/lib/symbols.js.map +0 -1
- package/dist/node_modules/postcss/lib/tokenize.js.map +0 -1
- package/dist/node_modules/postcss/lib/warning.js.map +0 -1
- package/dist/packages/model/node_modules/postcss-discard-duplicates/src/index.js.map +0 -1
- /package/dist/node_modules/{nanoid → .pnpm/nanoid@3.3.11/node_modules/nanoid}/non-secure/index.js +0 -0
- /package/dist/{packages/model → node_modules/.pnpm/postcss-discard-duplicates@5.1.0_postcss@8.5.8}/node_modules/postcss-discard-duplicates/src/index.js +0 -0
- /package/dist/node_modules/{postcss → .pnpm/postcss@8.5.8/node_modules/postcss}/lib/at-rule.js +0 -0
- /package/dist/node_modules/{postcss → .pnpm/postcss@8.5.8/node_modules/postcss}/lib/comment.js +0 -0
- /package/dist/node_modules/{postcss → .pnpm/postcss@8.5.8/node_modules/postcss}/lib/container.js +0 -0
- /package/dist/node_modules/{postcss → .pnpm/postcss@8.5.8/node_modules/postcss}/lib/declaration.js +0 -0
- /package/dist/node_modules/{postcss → .pnpm/postcss@8.5.8/node_modules/postcss}/lib/document.js +0 -0
- /package/dist/node_modules/{postcss → .pnpm/postcss@8.5.8/node_modules/postcss}/lib/fromJSON.js +0 -0
- /package/dist/node_modules/{postcss → .pnpm/postcss@8.5.8/node_modules/postcss}/lib/lazy-result.js +0 -0
- /package/dist/node_modules/{postcss → .pnpm/postcss@8.5.8/node_modules/postcss}/lib/list.js +0 -0
- /package/dist/node_modules/{postcss → .pnpm/postcss@8.5.8/node_modules/postcss}/lib/no-work-result.js +0 -0
- /package/dist/node_modules/{postcss → .pnpm/postcss@8.5.8/node_modules/postcss}/lib/node.js +0 -0
- /package/dist/node_modules/{postcss → .pnpm/postcss@8.5.8/node_modules/postcss}/lib/parse.js +0 -0
- /package/dist/node_modules/{postcss → .pnpm/postcss@8.5.8/node_modules/postcss}/lib/parser.js +0 -0
- /package/dist/node_modules/{postcss → .pnpm/postcss@8.5.8/node_modules/postcss}/lib/postcss2.js +0 -0
- /package/dist/node_modules/{postcss → .pnpm/postcss@8.5.8/node_modules/postcss}/lib/processor.js +0 -0
- /package/dist/node_modules/{postcss → .pnpm/postcss@8.5.8/node_modules/postcss}/lib/result.js +0 -0
- /package/dist/node_modules/{postcss → .pnpm/postcss@8.5.8/node_modules/postcss}/lib/root.js +0 -0
- /package/dist/node_modules/{postcss → .pnpm/postcss@8.5.8/node_modules/postcss}/lib/rule.js +0 -0
- /package/dist/node_modules/{postcss → .pnpm/postcss@8.5.8/node_modules/postcss}/lib/stringifier.js +0 -0
- /package/dist/node_modules/{postcss → .pnpm/postcss@8.5.8/node_modules/postcss}/lib/stringify.js +0 -0
- /package/dist/node_modules/{postcss → .pnpm/postcss@8.5.8/node_modules/postcss}/lib/tokenize.js +0 -0
- /package/dist/node_modules/{postcss → .pnpm/postcss@8.5.8/node_modules/postcss}/lib/warning.js +0 -0
|
@@ -0,0 +1,365 @@
|
|
|
1
|
+
declare global {
|
|
2
|
+
interface Window {
|
|
3
|
+
__UMD_DEV__?: boolean;
|
|
4
|
+
}
|
|
5
|
+
}
|
|
6
|
+
export declare function isDev(): boolean;
|
|
7
|
+
export interface Logger {
|
|
8
|
+
debug: (...args: unknown[]) => void;
|
|
9
|
+
info: (...args: unknown[]) => void;
|
|
10
|
+
warn: (...args: unknown[]) => void;
|
|
11
|
+
error: (...args: unknown[]) => void;
|
|
12
|
+
group: (...args: unknown[]) => void;
|
|
13
|
+
groupEnd: () => void;
|
|
14
|
+
}
|
|
15
|
+
export declare function createLogger(componentName: string): Logger;
|
|
16
|
+
type Constructor<T = HTMLElement> = new (...args: any[]) => T;
|
|
17
|
+
declare const debugLoggerKey: unique symbol;
|
|
18
|
+
export declare function withLifecycleDebug<T extends Constructor>(Base: T): {
|
|
19
|
+
new (...args: any[]): {
|
|
20
|
+
connectedCallback(): void;
|
|
21
|
+
disconnectedCallback(): void;
|
|
22
|
+
attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
|
|
23
|
+
[debugLoggerKey]: Logger;
|
|
24
|
+
accessKey: string;
|
|
25
|
+
readonly accessKeyLabel: string;
|
|
26
|
+
autocapitalize: string;
|
|
27
|
+
dir: string;
|
|
28
|
+
draggable: boolean;
|
|
29
|
+
hidden: boolean;
|
|
30
|
+
inert: boolean;
|
|
31
|
+
innerText: string;
|
|
32
|
+
lang: string;
|
|
33
|
+
readonly offsetHeight: number;
|
|
34
|
+
readonly offsetLeft: number;
|
|
35
|
+
readonly offsetParent: Element | null;
|
|
36
|
+
readonly offsetTop: number;
|
|
37
|
+
readonly offsetWidth: number;
|
|
38
|
+
outerText: string;
|
|
39
|
+
popover: string | null;
|
|
40
|
+
spellcheck: boolean;
|
|
41
|
+
title: string;
|
|
42
|
+
translate: boolean;
|
|
43
|
+
writingSuggestions: string;
|
|
44
|
+
attachInternals(): ElementInternals;
|
|
45
|
+
click(): void;
|
|
46
|
+
hidePopover(): void;
|
|
47
|
+
showPopover(): void;
|
|
48
|
+
togglePopover(options?: boolean): boolean;
|
|
49
|
+
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
50
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
51
|
+
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
52
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
53
|
+
readonly attributes: NamedNodeMap;
|
|
54
|
+
get classList(): DOMTokenList;
|
|
55
|
+
set classList(value: string);
|
|
56
|
+
className: string;
|
|
57
|
+
readonly clientHeight: number;
|
|
58
|
+
readonly clientLeft: number;
|
|
59
|
+
readonly clientTop: number;
|
|
60
|
+
readonly clientWidth: number;
|
|
61
|
+
readonly currentCSSZoom: number;
|
|
62
|
+
id: string;
|
|
63
|
+
innerHTML: string;
|
|
64
|
+
readonly localName: string;
|
|
65
|
+
readonly namespaceURI: string | null;
|
|
66
|
+
onfullscreenchange: ((this: Element, ev: Event) => any) | null;
|
|
67
|
+
onfullscreenerror: ((this: Element, ev: Event) => any) | null;
|
|
68
|
+
outerHTML: string;
|
|
69
|
+
readonly ownerDocument: Document;
|
|
70
|
+
get part(): DOMTokenList;
|
|
71
|
+
set part(value: string);
|
|
72
|
+
readonly prefix: string | null;
|
|
73
|
+
readonly scrollHeight: number;
|
|
74
|
+
scrollLeft: number;
|
|
75
|
+
scrollTop: number;
|
|
76
|
+
readonly scrollWidth: number;
|
|
77
|
+
readonly shadowRoot: ShadowRoot | null;
|
|
78
|
+
slot: string;
|
|
79
|
+
readonly tagName: string;
|
|
80
|
+
attachShadow(init: ShadowRootInit): ShadowRoot;
|
|
81
|
+
checkVisibility(options?: CheckVisibilityOptions): boolean;
|
|
82
|
+
closest<K extends keyof HTMLElementTagNameMap>(selector: K): HTMLElementTagNameMap[K] | null;
|
|
83
|
+
closest<K extends keyof SVGElementTagNameMap>(selector: K): SVGElementTagNameMap[K] | null;
|
|
84
|
+
closest<K extends keyof MathMLElementTagNameMap>(selector: K): MathMLElementTagNameMap[K] | null;
|
|
85
|
+
closest<E extends Element = Element>(selectors: string): E | null;
|
|
86
|
+
computedStyleMap(): StylePropertyMapReadOnly;
|
|
87
|
+
getAttribute(qualifiedName: string): string | null;
|
|
88
|
+
getAttributeNS(namespace: string | null, localName: string): string | null;
|
|
89
|
+
getAttributeNames(): string[];
|
|
90
|
+
getAttributeNode(qualifiedName: string): Attr | null;
|
|
91
|
+
getAttributeNodeNS(namespace: string | null, localName: string): Attr | null;
|
|
92
|
+
getBoundingClientRect(): DOMRect;
|
|
93
|
+
getClientRects(): DOMRectList;
|
|
94
|
+
getElementsByClassName(classNames: string): HTMLCollectionOf<Element>;
|
|
95
|
+
getElementsByTagName<K extends keyof HTMLElementTagNameMap>(qualifiedName: K): HTMLCollectionOf<HTMLElementTagNameMap[K]>;
|
|
96
|
+
getElementsByTagName<K extends keyof SVGElementTagNameMap>(qualifiedName: K): HTMLCollectionOf<SVGElementTagNameMap[K]>;
|
|
97
|
+
getElementsByTagName<K extends keyof MathMLElementTagNameMap>(qualifiedName: K): HTMLCollectionOf<MathMLElementTagNameMap[K]>;
|
|
98
|
+
getElementsByTagName<K extends keyof HTMLElementDeprecatedTagNameMap>(qualifiedName: K): HTMLCollectionOf<HTMLElementDeprecatedTagNameMap[K]>;
|
|
99
|
+
getElementsByTagName(qualifiedName: string): HTMLCollectionOf<Element>;
|
|
100
|
+
getElementsByTagNameNS(namespaceURI: "http://www.w3.org/1999/xhtml", localName: string): HTMLCollectionOf<HTMLElement>;
|
|
101
|
+
getElementsByTagNameNS(namespaceURI: "http://www.w3.org/2000/svg", localName: string): HTMLCollectionOf<SVGElement>;
|
|
102
|
+
getElementsByTagNameNS(namespaceURI: "http://www.w3.org/1998/Math/MathML", localName: string): HTMLCollectionOf<MathMLElement>;
|
|
103
|
+
getElementsByTagNameNS(namespace: string | null, localName: string): HTMLCollectionOf<Element>;
|
|
104
|
+
getHTML(options?: GetHTMLOptions): string;
|
|
105
|
+
hasAttribute(qualifiedName: string): boolean;
|
|
106
|
+
hasAttributeNS(namespace: string | null, localName: string): boolean;
|
|
107
|
+
hasAttributes(): boolean;
|
|
108
|
+
hasPointerCapture(pointerId: number): boolean;
|
|
109
|
+
insertAdjacentElement(where: InsertPosition, element: Element): Element | null;
|
|
110
|
+
insertAdjacentHTML(position: InsertPosition, string: string): void;
|
|
111
|
+
insertAdjacentText(where: InsertPosition, data: string): void;
|
|
112
|
+
matches(selectors: string): boolean;
|
|
113
|
+
releasePointerCapture(pointerId: number): void;
|
|
114
|
+
removeAttribute(qualifiedName: string): void;
|
|
115
|
+
removeAttributeNS(namespace: string | null, localName: string): void;
|
|
116
|
+
removeAttributeNode(attr: Attr): Attr;
|
|
117
|
+
requestFullscreen(options?: FullscreenOptions): Promise<void>;
|
|
118
|
+
requestPointerLock(options?: PointerLockOptions): Promise<void>;
|
|
119
|
+
scroll(options?: ScrollToOptions): void;
|
|
120
|
+
scroll(x: number, y: number): void;
|
|
121
|
+
scrollBy(options?: ScrollToOptions): void;
|
|
122
|
+
scrollBy(x: number, y: number): void;
|
|
123
|
+
scrollIntoView(arg?: boolean | ScrollIntoViewOptions): void;
|
|
124
|
+
scrollTo(options?: ScrollToOptions): void;
|
|
125
|
+
scrollTo(x: number, y: number): void;
|
|
126
|
+
setAttribute(qualifiedName: string, value: string): void;
|
|
127
|
+
setAttributeNS(namespace: string | null, qualifiedName: string, value: string): void;
|
|
128
|
+
setAttributeNode(attr: Attr): Attr | null;
|
|
129
|
+
setAttributeNodeNS(attr: Attr): Attr | null;
|
|
130
|
+
setHTMLUnsafe(html: string): void;
|
|
131
|
+
setPointerCapture(pointerId: number): void;
|
|
132
|
+
toggleAttribute(qualifiedName: string, force?: boolean): boolean;
|
|
133
|
+
webkitMatchesSelector(selectors: string): boolean;
|
|
134
|
+
readonly baseURI: string;
|
|
135
|
+
readonly childNodes: NodeListOf<ChildNode>;
|
|
136
|
+
readonly firstChild: ChildNode | null;
|
|
137
|
+
readonly isConnected: boolean;
|
|
138
|
+
readonly lastChild: ChildNode | null;
|
|
139
|
+
readonly nextSibling: ChildNode | null;
|
|
140
|
+
readonly nodeName: string;
|
|
141
|
+
readonly nodeType: number;
|
|
142
|
+
nodeValue: string | null;
|
|
143
|
+
readonly parentElement: HTMLElement | null;
|
|
144
|
+
readonly parentNode: ParentNode | null;
|
|
145
|
+
readonly previousSibling: ChildNode | null;
|
|
146
|
+
textContent: string | null;
|
|
147
|
+
appendChild<T_1 extends Node>(node: T_1): T_1;
|
|
148
|
+
cloneNode(subtree?: boolean): Node;
|
|
149
|
+
compareDocumentPosition(other: Node): number;
|
|
150
|
+
contains(other: Node | null): boolean;
|
|
151
|
+
getRootNode(options?: GetRootNodeOptions): Node;
|
|
152
|
+
hasChildNodes(): boolean;
|
|
153
|
+
insertBefore<T_1 extends Node>(node: T_1, child: Node | null): T_1;
|
|
154
|
+
isDefaultNamespace(namespace: string | null): boolean;
|
|
155
|
+
isEqualNode(otherNode: Node | null): boolean;
|
|
156
|
+
isSameNode(otherNode: Node | null): boolean;
|
|
157
|
+
lookupNamespaceURI(prefix: string | null): string | null;
|
|
158
|
+
lookupPrefix(namespace: string | null): string | null;
|
|
159
|
+
normalize(): void;
|
|
160
|
+
removeChild<T_1 extends Node>(child: T_1): T_1;
|
|
161
|
+
replaceChild<T_1 extends Node>(node: Node, child: T_1): T_1;
|
|
162
|
+
readonly ELEMENT_NODE: 1;
|
|
163
|
+
readonly ATTRIBUTE_NODE: 2;
|
|
164
|
+
readonly TEXT_NODE: 3;
|
|
165
|
+
readonly CDATA_SECTION_NODE: 4;
|
|
166
|
+
readonly ENTITY_REFERENCE_NODE: 5;
|
|
167
|
+
readonly ENTITY_NODE: 6;
|
|
168
|
+
readonly PROCESSING_INSTRUCTION_NODE: 7;
|
|
169
|
+
readonly COMMENT_NODE: 8;
|
|
170
|
+
readonly DOCUMENT_NODE: 9;
|
|
171
|
+
readonly DOCUMENT_TYPE_NODE: 10;
|
|
172
|
+
readonly DOCUMENT_FRAGMENT_NODE: 11;
|
|
173
|
+
readonly NOTATION_NODE: 12;
|
|
174
|
+
readonly DOCUMENT_POSITION_DISCONNECTED: 1;
|
|
175
|
+
readonly DOCUMENT_POSITION_PRECEDING: 2;
|
|
176
|
+
readonly DOCUMENT_POSITION_FOLLOWING: 4;
|
|
177
|
+
readonly DOCUMENT_POSITION_CONTAINS: 8;
|
|
178
|
+
readonly DOCUMENT_POSITION_CONTAINED_BY: 16;
|
|
179
|
+
readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: 32;
|
|
180
|
+
dispatchEvent(event: Event): boolean;
|
|
181
|
+
ariaAtomic: string | null;
|
|
182
|
+
ariaAutoComplete: string | null;
|
|
183
|
+
ariaBrailleLabel: string | null;
|
|
184
|
+
ariaBrailleRoleDescription: string | null;
|
|
185
|
+
ariaBusy: string | null;
|
|
186
|
+
ariaChecked: string | null;
|
|
187
|
+
ariaColCount: string | null;
|
|
188
|
+
ariaColIndex: string | null;
|
|
189
|
+
ariaColIndexText: string | null;
|
|
190
|
+
ariaColSpan: string | null;
|
|
191
|
+
ariaCurrent: string | null;
|
|
192
|
+
ariaDescription: string | null;
|
|
193
|
+
ariaDisabled: string | null;
|
|
194
|
+
ariaExpanded: string | null;
|
|
195
|
+
ariaHasPopup: string | null;
|
|
196
|
+
ariaHidden: string | null;
|
|
197
|
+
ariaInvalid: string | null;
|
|
198
|
+
ariaKeyShortcuts: string | null;
|
|
199
|
+
ariaLabel: string | null;
|
|
200
|
+
ariaLevel: string | null;
|
|
201
|
+
ariaLive: string | null;
|
|
202
|
+
ariaModal: string | null;
|
|
203
|
+
ariaMultiLine: string | null;
|
|
204
|
+
ariaMultiSelectable: string | null;
|
|
205
|
+
ariaOrientation: string | null;
|
|
206
|
+
ariaPlaceholder: string | null;
|
|
207
|
+
ariaPosInSet: string | null;
|
|
208
|
+
ariaPressed: string | null;
|
|
209
|
+
ariaReadOnly: string | null;
|
|
210
|
+
ariaRelevant: string | null;
|
|
211
|
+
ariaRequired: string | null;
|
|
212
|
+
ariaRoleDescription: string | null;
|
|
213
|
+
ariaRowCount: string | null;
|
|
214
|
+
ariaRowIndex: string | null;
|
|
215
|
+
ariaRowIndexText: string | null;
|
|
216
|
+
ariaRowSpan: string | null;
|
|
217
|
+
ariaSelected: string | null;
|
|
218
|
+
ariaSetSize: string | null;
|
|
219
|
+
ariaSort: string | null;
|
|
220
|
+
ariaValueMax: string | null;
|
|
221
|
+
ariaValueMin: string | null;
|
|
222
|
+
ariaValueNow: string | null;
|
|
223
|
+
ariaValueText: string | null;
|
|
224
|
+
role: string | null;
|
|
225
|
+
animate(keyframes: Keyframe[] | PropertyIndexedKeyframes | null, options?: number | KeyframeAnimationOptions): Animation;
|
|
226
|
+
getAnimations(options?: GetAnimationsOptions): Animation[];
|
|
227
|
+
after(...nodes: (Node | string)[]): void;
|
|
228
|
+
before(...nodes: (Node | string)[]): void;
|
|
229
|
+
remove(): void;
|
|
230
|
+
replaceWith(...nodes: (Node | string)[]): void;
|
|
231
|
+
readonly nextElementSibling: Element | null;
|
|
232
|
+
readonly previousElementSibling: Element | null;
|
|
233
|
+
readonly childElementCount: number;
|
|
234
|
+
readonly children: HTMLCollection;
|
|
235
|
+
readonly firstElementChild: Element | null;
|
|
236
|
+
readonly lastElementChild: Element | null;
|
|
237
|
+
append(...nodes: (Node | string)[]): void;
|
|
238
|
+
prepend(...nodes: (Node | string)[]): void;
|
|
239
|
+
querySelector<K extends keyof HTMLElementTagNameMap>(selectors: K): HTMLElementTagNameMap[K] | null;
|
|
240
|
+
querySelector<K extends keyof SVGElementTagNameMap>(selectors: K): SVGElementTagNameMap[K] | null;
|
|
241
|
+
querySelector<K extends keyof MathMLElementTagNameMap>(selectors: K): MathMLElementTagNameMap[K] | null;
|
|
242
|
+
querySelector<K extends keyof HTMLElementDeprecatedTagNameMap>(selectors: K): HTMLElementDeprecatedTagNameMap[K] | null;
|
|
243
|
+
querySelector<E extends Element = Element>(selectors: string): E | null;
|
|
244
|
+
querySelectorAll<K extends keyof HTMLElementTagNameMap>(selectors: K): NodeListOf<HTMLElementTagNameMap[K]>;
|
|
245
|
+
querySelectorAll<K extends keyof SVGElementTagNameMap>(selectors: K): NodeListOf<SVGElementTagNameMap[K]>;
|
|
246
|
+
querySelectorAll<K extends keyof MathMLElementTagNameMap>(selectors: K): NodeListOf<MathMLElementTagNameMap[K]>;
|
|
247
|
+
querySelectorAll<K extends keyof HTMLElementDeprecatedTagNameMap>(selectors: K): NodeListOf<HTMLElementDeprecatedTagNameMap[K]>;
|
|
248
|
+
querySelectorAll<E extends Element = Element>(selectors: string): NodeListOf<E>;
|
|
249
|
+
replaceChildren(...nodes: (Node | string)[]): void;
|
|
250
|
+
readonly assignedSlot: HTMLSlotElement | null;
|
|
251
|
+
readonly attributeStyleMap: StylePropertyMap;
|
|
252
|
+
get style(): CSSStyleDeclaration;
|
|
253
|
+
set style(cssText: string);
|
|
254
|
+
contentEditable: string;
|
|
255
|
+
enterKeyHint: string;
|
|
256
|
+
inputMode: string;
|
|
257
|
+
readonly isContentEditable: boolean;
|
|
258
|
+
onabort: ((this: GlobalEventHandlers, ev: UIEvent) => any) | null;
|
|
259
|
+
onanimationcancel: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
|
|
260
|
+
onanimationend: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
|
|
261
|
+
onanimationiteration: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
|
|
262
|
+
onanimationstart: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
|
|
263
|
+
onauxclick: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
264
|
+
onbeforeinput: ((this: GlobalEventHandlers, ev: InputEvent) => any) | null;
|
|
265
|
+
onbeforetoggle: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
266
|
+
onblur: ((this: GlobalEventHandlers, ev: FocusEvent) => any) | null;
|
|
267
|
+
oncancel: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
268
|
+
oncanplay: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
269
|
+
oncanplaythrough: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
270
|
+
onchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
271
|
+
onclick: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
272
|
+
onclose: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
273
|
+
oncontextlost: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
274
|
+
oncontextmenu: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
275
|
+
oncontextrestored: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
276
|
+
oncopy: ((this: GlobalEventHandlers, ev: ClipboardEvent) => any) | null;
|
|
277
|
+
oncuechange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
278
|
+
oncut: ((this: GlobalEventHandlers, ev: ClipboardEvent) => any) | null;
|
|
279
|
+
ondblclick: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
280
|
+
ondrag: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
|
|
281
|
+
ondragend: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
|
|
282
|
+
ondragenter: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
|
|
283
|
+
ondragleave: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
|
|
284
|
+
ondragover: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
|
|
285
|
+
ondragstart: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
|
|
286
|
+
ondrop: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
|
|
287
|
+
ondurationchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
288
|
+
onemptied: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
289
|
+
onended: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
290
|
+
onerror: OnErrorEventHandler;
|
|
291
|
+
onfocus: ((this: GlobalEventHandlers, ev: FocusEvent) => any) | null;
|
|
292
|
+
onformdata: ((this: GlobalEventHandlers, ev: FormDataEvent) => any) | null;
|
|
293
|
+
ongotpointercapture: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
294
|
+
oninput: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
295
|
+
oninvalid: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
296
|
+
onkeydown: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null;
|
|
297
|
+
onkeypress: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null;
|
|
298
|
+
onkeyup: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null;
|
|
299
|
+
onload: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
300
|
+
onloadeddata: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
301
|
+
onloadedmetadata: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
302
|
+
onloadstart: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
303
|
+
onlostpointercapture: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
304
|
+
onmousedown: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
305
|
+
onmouseenter: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
306
|
+
onmouseleave: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
307
|
+
onmousemove: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
308
|
+
onmouseout: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
309
|
+
onmouseover: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
310
|
+
onmouseup: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
311
|
+
onpaste: ((this: GlobalEventHandlers, ev: ClipboardEvent) => any) | null;
|
|
312
|
+
onpause: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
313
|
+
onplay: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
314
|
+
onplaying: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
315
|
+
onpointercancel: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
316
|
+
onpointerdown: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
317
|
+
onpointerenter: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
318
|
+
onpointerleave: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
319
|
+
onpointermove: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
320
|
+
onpointerout: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
321
|
+
onpointerover: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
322
|
+
onpointerup: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
323
|
+
onprogress: ((this: GlobalEventHandlers, ev: ProgressEvent) => any) | null;
|
|
324
|
+
onratechange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
325
|
+
onreset: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
326
|
+
onresize: ((this: GlobalEventHandlers, ev: UIEvent) => any) | null;
|
|
327
|
+
onscroll: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
328
|
+
onscrollend: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
329
|
+
onsecuritypolicyviolation: ((this: GlobalEventHandlers, ev: SecurityPolicyViolationEvent) => any) | null;
|
|
330
|
+
onseeked: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
331
|
+
onseeking: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
332
|
+
onselect: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
333
|
+
onselectionchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
334
|
+
onselectstart: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
335
|
+
onslotchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
336
|
+
onstalled: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
337
|
+
onsubmit: ((this: GlobalEventHandlers, ev: SubmitEvent) => any) | null;
|
|
338
|
+
onsuspend: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
339
|
+
ontimeupdate: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
340
|
+
ontoggle: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
341
|
+
ontouchcancel?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
|
|
342
|
+
ontouchend?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
|
|
343
|
+
ontouchmove?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
|
|
344
|
+
ontouchstart?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
|
|
345
|
+
ontransitioncancel: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;
|
|
346
|
+
ontransitionend: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;
|
|
347
|
+
ontransitionrun: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;
|
|
348
|
+
ontransitionstart: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;
|
|
349
|
+
onvolumechange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
350
|
+
onwaiting: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
351
|
+
onwebkitanimationend: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
352
|
+
onwebkitanimationiteration: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
353
|
+
onwebkitanimationstart: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
354
|
+
onwebkittransitionend: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
355
|
+
onwheel: ((this: GlobalEventHandlers, ev: WheelEvent) => any) | null;
|
|
356
|
+
autofocus: boolean;
|
|
357
|
+
readonly dataset: DOMStringMap;
|
|
358
|
+
nonce?: string;
|
|
359
|
+
tabIndex: number;
|
|
360
|
+
blur(): void;
|
|
361
|
+
focus(options?: FocusOptions): void;
|
|
362
|
+
};
|
|
363
|
+
} & T;
|
|
364
|
+
export {};
|
|
365
|
+
//# sourceMappingURL=debug.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"debug.d.ts","sourceRoot":"","sources":["../../source/utilities/debug.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,WAAW,CAAC,EAAE,OAAO,CAAC;KACvB;CACF;AASD,wBAAgB,KAAK,IAAI,OAAO,CAc/B;AAED,MAAM,WAAW,MAAM;IACrB,KAAK,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,IAAI,CAAC;IACpC,IAAI,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,IAAI,CAAC;IACnC,IAAI,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,IAAI,CAAC;IACnC,KAAK,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,IAAI,CAAC;IACpC,KAAK,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,IAAI,CAAC;IACpC,QAAQ,EAAE,MAAM,IAAI,CAAC;CACtB;AAQD,wBAAgB,YAAY,CAAC,aAAa,EAAE,MAAM,GAAG,MAAM,CAuB1D;AAED,KAAK,WAAW,CAAC,CAAC,GAAG,WAAW,IAAI,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC;AAQ9D,QAAA,MAAM,cAAc,eAAwB,CAAC;AAE7C,wBAAgB,kBAAkB,CAAC,CAAC,SAAS,WAAW,EAAE,IAAI,EAAE,CAAC;kBAIxC,GAAG,EAAE;;;uCAsBK,MAAM,YAAY,MAAM,GAAG,IAAI,YAAY,MAAM,GAAG,IAAI;0BAxBrE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAgC3B"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
function isDev() {
|
|
2
|
+
if (typeof window !== "undefined" && window.__UMD_DEV__ === true) {
|
|
3
|
+
return true;
|
|
4
|
+
}
|
|
5
|
+
try {
|
|
6
|
+
if (typeof process !== "undefined" && false) ;
|
|
7
|
+
} catch {
|
|
8
|
+
}
|
|
9
|
+
return false;
|
|
10
|
+
}
|
|
11
|
+
function createLogger(componentName) {
|
|
12
|
+
const prefix = `[UMD-DS:${componentName}]`;
|
|
13
|
+
return {
|
|
14
|
+
debug: (...args) => {
|
|
15
|
+
if (isDev()) console.debug(prefix, ...args);
|
|
16
|
+
},
|
|
17
|
+
info: (...args) => {
|
|
18
|
+
if (isDev()) console.info(prefix, ...args);
|
|
19
|
+
},
|
|
20
|
+
warn: (...args) => {
|
|
21
|
+
console.warn(prefix, ...args);
|
|
22
|
+
},
|
|
23
|
+
error: (...args) => {
|
|
24
|
+
console.error(prefix, ...args);
|
|
25
|
+
},
|
|
26
|
+
group: (...args) => {
|
|
27
|
+
if (isDev()) console.group(prefix, ...args);
|
|
28
|
+
},
|
|
29
|
+
groupEnd: () => {
|
|
30
|
+
if (isDev()) console.groupEnd();
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
const debugLoggerKey = /* @__PURE__ */ Symbol("debugLogger");
|
|
35
|
+
function withLifecycleDebug(Base) {
|
|
36
|
+
var _a;
|
|
37
|
+
return class LifecycleDebug extends (_a = Base, _a) {
|
|
38
|
+
constructor(...args) {
|
|
39
|
+
super(...args);
|
|
40
|
+
const tag = this.tagName?.toLowerCase() ?? "unknown";
|
|
41
|
+
this[debugLoggerKey] = createLogger(tag);
|
|
42
|
+
}
|
|
43
|
+
connectedCallback() {
|
|
44
|
+
this[debugLoggerKey].debug("connectedCallback");
|
|
45
|
+
const superProto = Object.getPrototypeOf(Object.getPrototypeOf(this));
|
|
46
|
+
if (typeof superProto?.connectedCallback === "function") {
|
|
47
|
+
superProto.connectedCallback.call(this);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
disconnectedCallback() {
|
|
51
|
+
this[debugLoggerKey].debug("disconnectedCallback");
|
|
52
|
+
const superProto = Object.getPrototypeOf(Object.getPrototypeOf(this));
|
|
53
|
+
if (typeof superProto?.disconnectedCallback === "function") {
|
|
54
|
+
superProto.disconnectedCallback.call(this);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
attributeChangedCallback(name, oldValue, newValue) {
|
|
58
|
+
this[debugLoggerKey].debug("attributeChangedCallback", { name, oldValue, newValue });
|
|
59
|
+
const superProto = Object.getPrototypeOf(Object.getPrototypeOf(this));
|
|
60
|
+
if (typeof superProto?.attributeChangedCallback === "function") {
|
|
61
|
+
superProto.attributeChangedCallback.call(this, name, oldValue, newValue);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
export {
|
|
67
|
+
createLogger,
|
|
68
|
+
isDev,
|
|
69
|
+
withLifecycleDebug
|
|
70
|
+
};
|
|
71
|
+
//# sourceMappingURL=debug.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"debug.js","sources":["../../source/utilities/debug.ts"],"sourcesContent":["declare global {\n interface Window {\n __UMD_DEV__?: boolean;\n }\n}\n\n/**\n * Check if the current environment is development mode.\n *\n * - `window.__UMD_DEV__ === true` (strict boolean check)\n * - `process.env.NODE_ENV === 'development'` (replaced at build time by Vite)\n * - Returns `false` by default\n */\nexport function isDev(): boolean {\n if (typeof window !== 'undefined' && window.__UMD_DEV__ === true) {\n return true;\n }\n\n try {\n if (typeof process !== 'undefined' && process.env?.NODE_ENV === 'development') {\n return true;\n }\n } catch {\n // Bundler edge cases where process is defined but access throws\n }\n\n return false;\n}\n\nexport interface Logger {\n debug: (...args: unknown[]) => void;\n info: (...args: unknown[]) => void;\n warn: (...args: unknown[]) => void;\n error: (...args: unknown[]) => void;\n group: (...args: unknown[]) => void;\n groupEnd: () => void;\n}\n\n/**\n * Create a prefixed logger for a component.\n *\n * - `warn` / `error` always log\n * - `debug` / `info` / `group` / `groupEnd` are gated by `isDev()`\n */\nexport function createLogger(componentName: string): Logger {\n const prefix = `[UMD-DS:${componentName}]`;\n\n return {\n debug: (...args: unknown[]) => {\n if (isDev()) console.debug(prefix, ...args);\n },\n info: (...args: unknown[]) => {\n if (isDev()) console.info(prefix, ...args);\n },\n warn: (...args: unknown[]) => {\n console.warn(prefix, ...args);\n },\n error: (...args: unknown[]) => {\n console.error(prefix, ...args);\n },\n group: (...args: unknown[]) => {\n if (isDev()) console.group(prefix, ...args);\n },\n groupEnd: () => {\n if (isDev()) console.groupEnd();\n },\n };\n}\n\ntype Constructor<T = HTMLElement> = new (...args: any[]) => T;\n\n/**\n * Mixin that adds lifecycle debug logging to a custom element class.\n *\n * Wraps `connectedCallback`, `disconnectedCallback`, and `attributeChangedCallback`\n * with logger output. Logging is gated by `isDev()`.\n */\nconst debugLoggerKey = Symbol('debugLogger');\n\nexport function withLifecycleDebug<T extends Constructor>(Base: T) {\n return class LifecycleDebug extends Base {\n [debugLoggerKey]: Logger;\n\n constructor(...args: any[]) {\n super(...args);\n const tag = (this as unknown as HTMLElement).tagName?.toLowerCase() ?? 'unknown';\n this[debugLoggerKey] = createLogger(tag);\n }\n\n connectedCallback() {\n this[debugLoggerKey].debug('connectedCallback');\n const superProto = Object.getPrototypeOf(Object.getPrototypeOf(this));\n if (typeof superProto?.connectedCallback === 'function') {\n superProto.connectedCallback.call(this);\n }\n }\n\n disconnectedCallback() {\n this[debugLoggerKey].debug('disconnectedCallback');\n const superProto = Object.getPrototypeOf(Object.getPrototypeOf(this));\n if (typeof superProto?.disconnectedCallback === 'function') {\n superProto.disconnectedCallback.call(this);\n }\n }\n\n attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null) {\n this[debugLoggerKey].debug('attributeChangedCallback', { name, oldValue, newValue });\n const superProto = Object.getPrototypeOf(Object.getPrototypeOf(this));\n if (typeof superProto?.attributeChangedCallback === 'function') {\n superProto.attributeChangedCallback.call(this, name, oldValue, newValue);\n }\n }\n };\n}\n"],"names":[],"mappings":"AAaO,SAAS,QAAiB;AAC/B,MAAI,OAAO,WAAW,eAAe,OAAO,gBAAgB,MAAM;AAChE,WAAO;AAAA,EACT;AAEA,MAAI;AACF,QAAI,OAAO,YAAY,eAAe,MAAyC;AAAA,EAGjF,QAAQ;AAAA,EAER;AAEA,SAAO;AACT;AAiBO,SAAS,aAAa,eAA+B;AAC1D,QAAM,SAAS,WAAW,aAAa;AAEvC,SAAO;AAAA,IACL,OAAO,IAAI,SAAoB;AAC7B,UAAI,QAAS,SAAQ,MAAM,QAAQ,GAAG,IAAI;AAAA,IAC5C;AAAA,IACA,MAAM,IAAI,SAAoB;AAC5B,UAAI,QAAS,SAAQ,KAAK,QAAQ,GAAG,IAAI;AAAA,IAC3C;AAAA,IACA,MAAM,IAAI,SAAoB;AAC5B,cAAQ,KAAK,QAAQ,GAAG,IAAI;AAAA,IAC9B;AAAA,IACA,OAAO,IAAI,SAAoB;AAC7B,cAAQ,MAAM,QAAQ,GAAG,IAAI;AAAA,IAC/B;AAAA,IACA,OAAO,IAAI,SAAoB;AAC7B,UAAI,QAAS,SAAQ,MAAM,QAAQ,GAAG,IAAI;AAAA,IAC5C;AAAA,IACA,UAAU,MAAM;AACd,UAAI,MAAA,EAAS,SAAQ,SAAA;AAAA,IACvB;AAAA,EAAA;AAEJ;AAUA,MAAM,wCAAwB,aAAa;AAEpC,SAAS,mBAA0C,MAAS;AA/EnE,MAAA;AAgFE,SAAO,MAAM,wBAAuB,KAAA,MAAA,IAAK;AAAA,IAGvC,eAAe,MAAa;AAC1B,YAAM,GAAG,IAAI;AACb,YAAM,MAAO,KAAgC,SAAS,YAAA,KAAiB;AACvE,WAAK,cAAc,IAAI,aAAa,GAAG;AAAA,IACzC;AAAA,IAEA,oBAAoB;AAClB,WAAK,cAAc,EAAE,MAAM,mBAAmB;AAC9C,YAAM,aAAa,OAAO,eAAe,OAAO,eAAe,IAAI,CAAC;AACpE,UAAI,OAAO,YAAY,sBAAsB,YAAY;AACvD,mBAAW,kBAAkB,KAAK,IAAI;AAAA,MACxC;AAAA,IACF;AAAA,IAEA,uBAAuB;AACrB,WAAK,cAAc,EAAE,MAAM,sBAAsB;AACjD,YAAM,aAAa,OAAO,eAAe,OAAO,eAAe,IAAI,CAAC;AACpE,UAAI,OAAO,YAAY,yBAAyB,YAAY;AAC1D,mBAAW,qBAAqB,KAAK,IAAI;AAAA,MAC3C;AAAA,IACF;AAAA,IAEA,yBAAyB,MAAc,UAAyB,UAAyB;AACvF,WAAK,cAAc,EAAE,MAAM,4BAA4B,EAAE,MAAM,UAAU,UAAU;AACnF,YAAM,aAAa,OAAO,eAAe,OAAO,eAAe,IAAI,CAAC;AACpE,UAAI,OAAO,YAAY,6BAA6B,YAAY;AAC9D,mBAAW,yBAAyB,KAAK,MAAM,MAAM,UAAU,QAAQ;AAAA,MACzE;AAAA,IACF;AAAA,EAAA;AAEJ;"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export type MutationObserverOptions = MutationObserverInit;
|
|
2
|
+
export interface ResizeObserverOptionsConfig {
|
|
3
|
+
box?: ResizeObserverBoxOptions;
|
|
4
|
+
}
|
|
5
|
+
export type IntersectionObserverOptions = IntersectionObserverInit;
|
|
6
|
+
export declare function createMutationObserver(target: Node, callback: MutationCallback, options?: MutationObserverOptions): () => void;
|
|
7
|
+
export declare function createResizeObserver(target: Element, callback: ResizeObserverCallback, options?: ResizeObserverOptionsConfig): () => void;
|
|
8
|
+
export declare function createIntersectionObserver(target: Element, callback: IntersectionObserverCallback, options?: IntersectionObserverOptions): () => void;
|
|
9
|
+
export declare function querySlotted(slot: HTMLSlotElement, selector?: string): Element[];
|
|
10
|
+
export declare function closestAcrossShadow(element: Element, selector: string): Element | null;
|
|
11
|
+
//# sourceMappingURL=dom.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dom.d.ts","sourceRoot":"","sources":["../../source/utilities/dom.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,uBAAuB,GAAG,oBAAoB,CAAC;AAE3D,MAAM,WAAW,2BAA2B;IAC1C,GAAG,CAAC,EAAE,wBAAwB,CAAC;CAChC;AAED,MAAM,MAAM,2BAA2B,GAAG,wBAAwB,CAAC;AAEnE,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,IAAI,EACZ,QAAQ,EAAE,gBAAgB,EAC1B,OAAO,CAAC,EAAE,uBAAuB,GAChC,MAAM,IAAI,CAUZ;AAED,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,OAAO,EACf,QAAQ,EAAE,sBAAsB,EAChC,OAAO,CAAC,EAAE,2BAA2B,GACpC,MAAM,IAAI,CAUZ;AAED,wBAAgB,0BAA0B,CACxC,MAAM,EAAE,OAAO,EACf,QAAQ,EAAE,4BAA4B,EACtC,OAAO,CAAC,EAAE,2BAA2B,GACpC,MAAM,IAAI,CAUZ;AAED,wBAAgB,YAAY,CAC1B,IAAI,EAAE,eAAe,EACrB,QAAQ,CAAC,EAAE,MAAM,GAChB,OAAO,EAAE,CAIX;AAED,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,MAAM,GACf,OAAO,GAAG,IAAI,CAgBhB"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
function createMutationObserver(target, callback, options) {
|
|
2
|
+
const observer = new MutationObserver(callback);
|
|
3
|
+
observer.observe(target, options ?? { childList: true, subtree: true });
|
|
4
|
+
let disconnected = false;
|
|
5
|
+
return () => {
|
|
6
|
+
if (disconnected) return;
|
|
7
|
+
disconnected = true;
|
|
8
|
+
observer.disconnect();
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
function createResizeObserver(target, callback, options) {
|
|
12
|
+
const observer = new ResizeObserver(callback);
|
|
13
|
+
observer.observe(target, options);
|
|
14
|
+
let disconnected = false;
|
|
15
|
+
return () => {
|
|
16
|
+
if (disconnected) return;
|
|
17
|
+
disconnected = true;
|
|
18
|
+
observer.disconnect();
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
function createIntersectionObserver(target, callback, options) {
|
|
22
|
+
const observer = new IntersectionObserver(callback, options);
|
|
23
|
+
observer.observe(target);
|
|
24
|
+
let disconnected = false;
|
|
25
|
+
return () => {
|
|
26
|
+
if (disconnected) return;
|
|
27
|
+
disconnected = true;
|
|
28
|
+
observer.disconnect();
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
function querySlotted(slot, selector) {
|
|
32
|
+
const elements = slot.assignedElements({ flatten: true });
|
|
33
|
+
if (!selector) return elements;
|
|
34
|
+
return elements.filter((el) => el.matches(selector));
|
|
35
|
+
}
|
|
36
|
+
function closestAcrossShadow(element, selector) {
|
|
37
|
+
let current = element;
|
|
38
|
+
while (current) {
|
|
39
|
+
const match = current.closest(selector);
|
|
40
|
+
if (match) return match;
|
|
41
|
+
const root = current.getRootNode();
|
|
42
|
+
if (root instanceof ShadowRoot) {
|
|
43
|
+
current = root.host;
|
|
44
|
+
} else {
|
|
45
|
+
return null;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
return null;
|
|
49
|
+
}
|
|
50
|
+
export {
|
|
51
|
+
closestAcrossShadow,
|
|
52
|
+
createIntersectionObserver,
|
|
53
|
+
createMutationObserver,
|
|
54
|
+
createResizeObserver,
|
|
55
|
+
querySlotted
|
|
56
|
+
};
|
|
57
|
+
//# sourceMappingURL=dom.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dom.js","sources":["../../source/utilities/dom.ts"],"sourcesContent":["export type MutationObserverOptions = MutationObserverInit;\n\nexport interface ResizeObserverOptionsConfig {\n box?: ResizeObserverBoxOptions;\n}\n\nexport type IntersectionObserverOptions = IntersectionObserverInit;\n\nexport function createMutationObserver(\n target: Node,\n callback: MutationCallback,\n options?: MutationObserverOptions,\n): () => void {\n const observer = new MutationObserver(callback);\n observer.observe(target, options ?? { childList: true, subtree: true });\n\n let disconnected = false;\n return () => {\n if (disconnected) return;\n disconnected = true;\n observer.disconnect();\n };\n}\n\nexport function createResizeObserver(\n target: Element,\n callback: ResizeObserverCallback,\n options?: ResizeObserverOptionsConfig,\n): () => void {\n const observer = new ResizeObserver(callback);\n observer.observe(target, options);\n\n let disconnected = false;\n return () => {\n if (disconnected) return;\n disconnected = true;\n observer.disconnect();\n };\n}\n\nexport function createIntersectionObserver(\n target: Element,\n callback: IntersectionObserverCallback,\n options?: IntersectionObserverOptions,\n): () => void {\n const observer = new IntersectionObserver(callback, options);\n observer.observe(target);\n\n let disconnected = false;\n return () => {\n if (disconnected) return;\n disconnected = true;\n observer.disconnect();\n };\n}\n\nexport function querySlotted(\n slot: HTMLSlotElement,\n selector?: string,\n): Element[] {\n const elements = slot.assignedElements({ flatten: true });\n if (!selector) return elements;\n return elements.filter((el) => el.matches(selector));\n}\n\nexport function closestAcrossShadow(\n element: Element,\n selector: string,\n): Element | null {\n let current: Element | null = element;\n\n while (current) {\n const match = current.closest(selector);\n if (match) return match;\n\n const root = current.getRootNode();\n if (root instanceof ShadowRoot) {\n current = root.host;\n } else {\n return null;\n }\n }\n\n return null;\n}\n"],"names":[],"mappings":"AAQO,SAAS,uBACd,QACA,UACA,SACY;AACZ,QAAM,WAAW,IAAI,iBAAiB,QAAQ;AAC9C,WAAS,QAAQ,QAAQ,WAAW,EAAE,WAAW,MAAM,SAAS,MAAM;AAEtE,MAAI,eAAe;AACnB,SAAO,MAAM;AACX,QAAI,aAAc;AAClB,mBAAe;AACf,aAAS,WAAA;AAAA,EACX;AACF;AAEO,SAAS,qBACd,QACA,UACA,SACY;AACZ,QAAM,WAAW,IAAI,eAAe,QAAQ;AAC5C,WAAS,QAAQ,QAAQ,OAAO;AAEhC,MAAI,eAAe;AACnB,SAAO,MAAM;AACX,QAAI,aAAc;AAClB,mBAAe;AACf,aAAS,WAAA;AAAA,EACX;AACF;AAEO,SAAS,2BACd,QACA,UACA,SACY;AACZ,QAAM,WAAW,IAAI,qBAAqB,UAAU,OAAO;AAC3D,WAAS,QAAQ,MAAM;AAEvB,MAAI,eAAe;AACnB,SAAO,MAAM;AACX,QAAI,aAAc;AAClB,mBAAe;AACf,aAAS,WAAA;AAAA,EACX;AACF;AAEO,SAAS,aACd,MACA,UACW;AACX,QAAM,WAAW,KAAK,iBAAiB,EAAE,SAAS,MAAM;AACxD,MAAI,CAAC,SAAU,QAAO;AACtB,SAAO,SAAS,OAAO,CAAC,OAAO,GAAG,QAAQ,QAAQ,CAAC;AACrD;AAEO,SAAS,oBACd,SACA,UACgB;AAChB,MAAI,UAA0B;AAE9B,SAAO,SAAS;AACd,UAAM,QAAQ,QAAQ,QAAQ,QAAQ;AACtC,QAAI,MAAO,QAAO;AAElB,UAAM,OAAO,QAAQ,YAAA;AACrB,QAAI,gBAAgB,YAAY;AAC9B,gBAAU,KAAK;AAAA,IACjB,OAAO;AACL,aAAO;AAAA,IACT;AAAA,EACF;AAEA,SAAO;AACT;"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export interface CustomEventOptions<T = unknown> {
|
|
2
|
+
detail?: T;
|
|
3
|
+
bubbles?: boolean;
|
|
4
|
+
cancelable?: boolean;
|
|
5
|
+
composed?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare function createCustomEvent<T = unknown>(type: string, options?: CustomEventOptions<T>): CustomEvent<T>;
|
|
8
|
+
export declare function dispatchCustomEvent<T = unknown>(element: EventTarget, type: string, options?: CustomEventOptions<T>): boolean;
|
|
9
|
+
export interface DefineEvents<T extends {
|
|
10
|
+
[key: string]: unknown;
|
|
11
|
+
}> {
|
|
12
|
+
types: {
|
|
13
|
+
[K in keyof T]: K;
|
|
14
|
+
};
|
|
15
|
+
dispatch<K extends keyof T & string>(element: EventTarget, type: K, detail?: T[K]): boolean;
|
|
16
|
+
}
|
|
17
|
+
export declare function defineEvents<T extends {
|
|
18
|
+
[key: string]: unknown;
|
|
19
|
+
}>(): DefineEvents<T>;
|
|
20
|
+
export declare function createEventListener<T extends Event = Event>(element: EventTarget, type: string, handler: (event: T) => void, options?: AddEventListenerOptions): () => void;
|
|
21
|
+
export declare function delegate<T extends HTMLElement = HTMLElement>(container: HTMLElement, selector: string, eventType: string, handler: (event: Event, matched: T) => void, options?: AddEventListenerOptions): () => void;
|
|
22
|
+
//# sourceMappingURL=events.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../source/utilities/events.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,kBAAkB,CAAC,CAAC,GAAG,OAAO;IAC7C,MAAM,CAAC,EAAE,CAAC,CAAC;IACX,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,wBAAgB,iBAAiB,CAAC,CAAC,GAAG,OAAO,EAC3C,IAAI,EAAE,MAAM,EACZ,OAAO,CAAC,EAAE,kBAAkB,CAAC,CAAC,CAAC,GAC9B,WAAW,CAAC,CAAC,CAAC,CAOhB;AAED,wBAAgB,mBAAmB,CAAC,CAAC,GAAG,OAAO,EAC7C,OAAO,EAAE,WAAW,EACpB,IAAI,EAAE,MAAM,EACZ,OAAO,CAAC,EAAE,kBAAkB,CAAC,CAAC,CAAC,GAC9B,OAAO,CAET;AAED,MAAM,WAAW,YAAY,CAAC,CAAC,SAAS;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CAAE;IAChE,KAAK,EAAE;SAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC;KAAE,CAAC;IAC7B,QAAQ,CAAC,CAAC,SAAS,MAAM,CAAC,GAAG,MAAM,EACjC,OAAO,EAAE,WAAW,EACpB,IAAI,EAAE,CAAC,EACP,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,GACZ,OAAO,CAAC;CACZ;AAED,wBAAgB,YAAY,CAC1B,CAAC,SAAS;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CAAE,KACjC,YAAY,CAAC,CAAC,CAAC,CAgBnB;AAED,wBAAgB,mBAAmB,CAAC,CAAC,SAAS,KAAK,GAAG,KAAK,EACzD,OAAO,EAAE,WAAW,EACpB,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,EAC3B,OAAO,CAAC,EAAE,uBAAuB,GAChC,MAAM,IAAI,CASZ;AAED,wBAAgB,QAAQ,CAAC,CAAC,SAAS,WAAW,GAAG,WAAW,EAC1D,SAAS,EAAE,WAAW,EACtB,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,KAAK,IAAI,EAC3C,OAAO,CAAC,EAAE,uBAAuB,GAChC,MAAM,IAAI,CAYZ"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
function createCustomEvent(type, options) {
|
|
2
|
+
return new CustomEvent(type, {
|
|
3
|
+
detail: options?.detail,
|
|
4
|
+
bubbles: options?.bubbles ?? true,
|
|
5
|
+
cancelable: options?.cancelable ?? false,
|
|
6
|
+
composed: options?.composed ?? true
|
|
7
|
+
});
|
|
8
|
+
}
|
|
9
|
+
function dispatchCustomEvent(element, type, options) {
|
|
10
|
+
return element.dispatchEvent(createCustomEvent(type, options));
|
|
11
|
+
}
|
|
12
|
+
function defineEvents() {
|
|
13
|
+
const types = new Proxy({}, {
|
|
14
|
+
get(_target, prop) {
|
|
15
|
+
return prop;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
function dispatch(element, type, detail) {
|
|
19
|
+
return dispatchCustomEvent(element, type, { detail });
|
|
20
|
+
}
|
|
21
|
+
return { types, dispatch };
|
|
22
|
+
}
|
|
23
|
+
function createEventListener(element, type, handler, options) {
|
|
24
|
+
element.addEventListener(type, handler, options);
|
|
25
|
+
let removed = false;
|
|
26
|
+
return () => {
|
|
27
|
+
if (removed) return;
|
|
28
|
+
removed = true;
|
|
29
|
+
element.removeEventListener(type, handler, options);
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
function delegate(container, selector, eventType, handler, options) {
|
|
33
|
+
const listener = (event) => {
|
|
34
|
+
const target = event.target;
|
|
35
|
+
if (!target) return;
|
|
36
|
+
const matched = target.closest(selector);
|
|
37
|
+
if (!matched || !container.contains(matched)) return;
|
|
38
|
+
handler(event, matched);
|
|
39
|
+
};
|
|
40
|
+
return createEventListener(container, eventType, listener, options);
|
|
41
|
+
}
|
|
42
|
+
export {
|
|
43
|
+
createCustomEvent,
|
|
44
|
+
createEventListener,
|
|
45
|
+
defineEvents,
|
|
46
|
+
delegate,
|
|
47
|
+
dispatchCustomEvent
|
|
48
|
+
};
|
|
49
|
+
//# sourceMappingURL=events.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"events.js","sources":["../../source/utilities/events.ts"],"sourcesContent":["export interface CustomEventOptions<T = unknown> {\n detail?: T;\n bubbles?: boolean;\n cancelable?: boolean;\n composed?: boolean;\n}\n\nexport function createCustomEvent<T = unknown>(\n type: string,\n options?: CustomEventOptions<T>,\n): CustomEvent<T> {\n return new CustomEvent<T>(type, {\n detail: options?.detail as T,\n bubbles: options?.bubbles ?? true,\n cancelable: options?.cancelable ?? false,\n composed: options?.composed ?? true,\n });\n}\n\nexport function dispatchCustomEvent<T = unknown>(\n element: EventTarget,\n type: string,\n options?: CustomEventOptions<T>,\n): boolean {\n return element.dispatchEvent(createCustomEvent(type, options));\n}\n\nexport interface DefineEvents<T extends { [key: string]: unknown }> {\n types: { [K in keyof T]: K };\n dispatch<K extends keyof T & string>(\n element: EventTarget,\n type: K,\n detail?: T[K],\n ): boolean;\n}\n\nexport function defineEvents<\n T extends { [key: string]: unknown },\n>(): DefineEvents<T> {\n const types = new Proxy({} as { [K in keyof T]: K }, {\n get(_target, prop: string) {\n return prop;\n },\n });\n\n function dispatch<K extends keyof T & string>(\n element: EventTarget,\n type: K,\n detail?: T[K],\n ): boolean {\n return dispatchCustomEvent(element, type, { detail });\n }\n\n return { types, dispatch };\n}\n\nexport function createEventListener<T extends Event = Event>(\n element: EventTarget,\n type: string,\n handler: (event: T) => void,\n options?: AddEventListenerOptions,\n): () => void {\n element.addEventListener(type, handler as EventListener, options);\n\n let removed = false;\n return () => {\n if (removed) return;\n removed = true;\n element.removeEventListener(type, handler as EventListener, options);\n };\n}\n\nexport function delegate<T extends HTMLElement = HTMLElement>(\n container: HTMLElement,\n selector: string,\n eventType: string,\n handler: (event: Event, matched: T) => void,\n options?: AddEventListenerOptions,\n): () => void {\n const listener = (event: Event) => {\n const target = event.target as HTMLElement | null;\n if (!target) return;\n\n const matched = target.closest(selector) as T | null;\n if (!matched || !container.contains(matched)) return;\n\n handler(event, matched);\n };\n\n return createEventListener(container, eventType, listener, options);\n}\n"],"names":[],"mappings":"AAOO,SAAS,kBACd,MACA,SACgB;AAChB,SAAO,IAAI,YAAe,MAAM;AAAA,IAC9B,QAAQ,SAAS;AAAA,IACjB,SAAS,SAAS,WAAW;AAAA,IAC7B,YAAY,SAAS,cAAc;AAAA,IACnC,UAAU,SAAS,YAAY;AAAA,EAAA,CAChC;AACH;AAEO,SAAS,oBACd,SACA,MACA,SACS;AACT,SAAO,QAAQ,cAAc,kBAAkB,MAAM,OAAO,CAAC;AAC/D;AAWO,SAAS,eAEK;AACnB,QAAM,QAAQ,IAAI,MAAM,IAA6B;AAAA,IACnD,IAAI,SAAS,MAAc;AACzB,aAAO;AAAA,IACT;AAAA,EAAA,CACD;AAED,WAAS,SACP,SACA,MACA,QACS;AACT,WAAO,oBAAoB,SAAS,MAAM,EAAE,QAAQ;AAAA,EACtD;AAEA,SAAO,EAAE,OAAO,SAAA;AAClB;AAEO,SAAS,oBACd,SACA,MACA,SACA,SACY;AACZ,UAAQ,iBAAiB,MAAM,SAA0B,OAAO;AAEhE,MAAI,UAAU;AACd,SAAO,MAAM;AACX,QAAI,QAAS;AACb,cAAU;AACV,YAAQ,oBAAoB,MAAM,SAA0B,OAAO;AAAA,EACrE;AACF;AAEO,SAAS,SACd,WACA,UACA,WACA,SACA,SACY;AACZ,QAAM,WAAW,CAAC,UAAiB;AACjC,UAAM,SAAS,MAAM;AACrB,QAAI,CAAC,OAAQ;AAEb,UAAM,UAAU,OAAO,QAAQ,QAAQ;AACvC,QAAI,CAAC,WAAW,CAAC,UAAU,SAAS,OAAO,EAAG;AAE9C,YAAQ,OAAO,OAAO;AAAA,EACxB;AAEA,SAAO,oBAAoB,WAAW,WAAW,UAAU,OAAO;AACpE;"}
|
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
export { registerWebComponent, webComponent, type WebComponentConfig } from './register';
|
|
2
2
|
export { hooks, CommonLifecycleHooks } from './lifecycle';
|
|
3
3
|
export { stylesTemplate as StylesTemplate } from './styles';
|
|
4
|
+
export { isDev, createLogger, withLifecycleDebug } from './debug';
|
|
5
|
+
export type { Logger } from './debug';
|
|
6
|
+
export { createCustomEvent, dispatchCustomEvent, defineEvents, createEventListener, delegate, } from './events';
|
|
7
|
+
export type { CustomEventOptions, DefineEvents } from './events';
|
|
8
|
+
export { isElement, isHTMLElement, isCustomElement, isShadowRoot, isSlotElement, isTemplateElement, assertElement, assertHTMLElement, assertShadowRoot, } from './types';
|
|
9
|
+
export { createMutationObserver, createResizeObserver, createIntersectionObserver, querySlotted, closestAcrossShadow, } from './dom';
|
|
10
|
+
export type { MutationObserverOptions, ResizeObserverOptionsConfig, IntersectionObserverOptions, } from './dom';
|
|
4
11
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../source/utilities/index.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,oBAAoB,EAAE,YAAY,EAAE,KAAK,kBAAkB,EAAE,MAAM,YAAY,CAAC;AACzF,OAAO,EAAE,KAAK,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAC1D,OAAO,EAAE,cAAc,IAAI,cAAc,EAAE,MAAM,UAAU,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../source/utilities/index.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,oBAAoB,EAAE,YAAY,EAAE,KAAK,kBAAkB,EAAE,MAAM,YAAY,CAAC;AACzF,OAAO,EAAE,KAAK,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAC1D,OAAO,EAAE,cAAc,IAAI,cAAc,EAAE,MAAM,UAAU,CAAC;AAC5D,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAClE,YAAY,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACtC,OAAO,EACL,iBAAiB,EACjB,mBAAmB,EACnB,YAAY,EACZ,mBAAmB,EACnB,QAAQ,GACT,MAAM,UAAU,CAAC;AAClB,YAAY,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACjE,OAAO,EACL,SAAS,EACT,aAAa,EACb,eAAe,EACf,YAAY,EACZ,aAAa,EACb,iBAAiB,EACjB,aAAa,EACb,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,SAAS,CAAC;AACjB,OAAO,EACL,sBAAsB,EACtB,oBAAoB,EACpB,0BAA0B,EAC1B,YAAY,EACZ,mBAAmB,GACpB,MAAM,OAAO,CAAC;AACf,YAAY,EACV,uBAAuB,EACvB,2BAA2B,EAC3B,2BAA2B,GAC5B,MAAM,OAAO,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"register.d.ts","sourceRoot":"","sources":["../../source/utilities/register.ts"],"names":[],"mappings":"AAAA,UAAU,kBAAkB;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,wBAAwB,CAAC;CACnC;AAED,UAAU,oBAAoB;IAC5B,CAAC,GAAG,EAAE,MAAM,GAAG,wBAAwB,CAAC;CACzC;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,aAAa,EAAE,oBAAoB,CAAC;KACrC;CACF;
|
|
1
|
+
{"version":3,"file":"register.d.ts","sourceRoot":"","sources":["../../source/utilities/register.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAC;AAK/E,UAAU,kBAAkB;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,wBAAwB,CAAC;CACnC;AAED,UAAU,oBAAoB;IAC5B,CAAC,GAAG,EAAE,MAAM,GAAG,wBAAwB,CAAC;CACzC;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,aAAa,EAAE,oBAAoB,CAAC;KACrC;CACF;AASD,QAAA,MAAM,oBAAoB,GAAI,mBAAmB,kBAAkB,KAAG,IAgBrE,CAAC;AAqBF,wBAAgB,YAAY,CAC1B,MAAM,EAAE,sBAAsB,GAC7B,qBAAqB,CA8BvB;AAED,OAAO,EAAE,oBAAoB,EAAE,KAAK,kBAAkB,EAAE,CAAC"}
|