@patternfly/pfe-core 2.0.0-next.13 → 2.0.0-next.14
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/controllers/logger.js.map +1 -7
- package/controllers/roving-tabindex-controller.d.ts +44 -0
- package/controllers/roving-tabindex-controller.js +2 -0
- package/controllers/roving-tabindex-controller.js.map +7 -0
- package/controllers/scroll-spy-controller.d.ts +37 -0
- package/controllers/scroll-spy-controller.js +2 -0
- package/controllers/scroll-spy-controller.js.map +7 -0
- package/package.json +5 -3
|
@@ -1,7 +1 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["logger.ts"],
|
|
4
|
-
"sourcesContent": ["import type { ReactiveController, ReactiveElement } from 'lit';\n\nexport class Logger implements ReactiveController {\n private static logDebug: boolean;\n\n private static instances: WeakMap<HTMLElement, Logger> = new WeakMap();\n\n private get prefix() {\n return `[${this.host.localName}${this.host.id ? `#${this.host.id}` : ''}]`;\n }\n\n /**\n * A boolean value that indicates if the logging should be printed to the console; used for debugging.\n * For use in a JS file or script tag; can also be added in the constructor of a component during development.\n * @example Logger.debugLog(true);\n * @tags debug\n */\n static debugLog(preference = null) {\n // wrap localStorage references in a try/catch; merely referencing it can\n // throw errors in some locked down environments\n try {\n if (preference !== null) {\n Logger.logDebug = !!preference;\n localStorage.pfeLog = !!preference;\n }\n return localStorage.pfeLog === 'true';\n } catch (e) {\n return Logger.logDebug;\n }\n }\n\n /**\n * A logging wrapper which checks the debugLog boolean and prints to the console if true.\n *\n * @example Logger.log(\"Hello\");\n */\n static log(...msgs: unknown[]) {\n if (Logger.debugLog()) {\n // eslint-disable-next-line no-console\n console.log(...msgs);\n }\n }\n\n /**\n * A console warning wrapper which formats your output with useful debugging information.\n *\n * @example Logger.warn(\"Hello\");\n */\n static warn(...msgs: unknown[]) {\n console.warn(...msgs); // eslint-disable-line no-console\n }\n\n /**\n * A console error wrapper which formats your output with useful debugging information.\n * For use inside a component's function.\n * @example Logger.error(\"Hello\");\n */\n static error(...msgs: unknown[]) {\n console.error([...msgs].join(' ')); // eslint-disable-line no-console\n }\n\n /**\n * Local logging that outputs the tag name as a prefix automatically\n *\n * @example this.logger.log(\"Hello\");\n */\n log(...msgs: unknown[]) {\n Logger.log(this.prefix, ...msgs);\n }\n\n /**\n * Local warning wrapper that outputs the tag name as a prefix automatically.\n * For use inside a component's function.\n * @example this.logger.warn(\"Hello\");\n */\n warn(...msgs: unknown[]) {\n Logger.warn(this.prefix, ...msgs);\n }\n\n /**\n * Local error wrapper that outputs the tag name as a prefix automatically.\n * For use inside a component's function.\n * @example this.logger.error(\"Hello\");\n */\n error(...msgs: unknown[]) {\n Logger.error(this.prefix, ...msgs);\n }\n\n constructor(private host: ReactiveElement) {\n // We only need one logger instance per host\n if (Logger.instances.get(host)) {\n return Logger.instances.get(host) as Logger;\n }\n host.addController(this);\n Logger.instances.set(host, this);\n }\n\n hostConnected() {\n this.log('connected');\n }\n}\n"],
|
|
5
|
-
"mappings": "AAEO,IAAMA,EAAN,KAA2C,CAsFhD,YAAoBC,EAAuB,CAAvB,UAAAA,EAElB,GAAID,EAAO,UAAU,IAAIC,CAAI,EAC3B,OAAOD,EAAO,UAAU,IAAIC,CAAI,EAElCA,EAAK,cAAc,IAAI,EACvBD,EAAO,UAAU,IAAIC,EAAM,IAAI,CACjC,CAxFA,IAAY,QAAS,CACnB,MAAO,IAAI,KAAK,KAAK,YAAY,KAAK,KAAK,GAAK,IAAI,KAAK,KAAK,KAAO,KACvE,CAQA,OAAO,SAASC,EAAa,KAAM,CAGjC,GAAI,CACF,OAAIA,IAAe,OACjBF,EAAO,SAAW,CAAC,CAACE,EACpB,aAAa,OAAS,CAAC,CAACA,GAEnB,aAAa,SAAW,MACjC,MAAE,CACA,OAAOF,EAAO,QAChB,CACF,CAOA,OAAO,OAAOG,EAAiB,CACzBH,EAAO,SAAS,GAElB,QAAQ,IAAI,GAAGG,CAAI,CAEvB,CAOA,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I,EAAE,IAAI,CAAC,CAAC;IACnC,CAAC;IAED,aAAa;QACX,IAAI,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;IACxB,CAAC","sourcesContent":["import type { ReactiveController, ReactiveElement } from 'lit';\n\nexport class Logger implements ReactiveController {\n private static logDebug: boolean;\n\n private static instances: WeakMap<HTMLElement, Logger> = new WeakMap();\n\n private get prefix() {\n return `[${this.host.localName}${this.host.id ? `#${this.host.id}` : ''}]`;\n }\n\n /**\n * A boolean value that indicates if the logging should be printed to the console; used for debugging.\n * For use in a JS file or script tag; can also be added in the constructor of a component during development.\n * @example Logger.debugLog(true);\n * @tags debug\n */\n static debugLog(preference = null) {\n // wrap localStorage references in a try/catch; merely referencing it can\n // throw errors in some locked down environments\n try {\n if (preference !== null) {\n Logger.logDebug = !!preference;\n localStorage.pfeLog = !!preference;\n }\n return localStorage.pfeLog === 'true';\n } catch (e) {\n return Logger.logDebug;\n }\n }\n\n /**\n * A logging wrapper which checks the debugLog boolean and prints to the console if true.\n *\n * @example Logger.log(\"Hello\");\n */\n static log(...msgs: unknown[]) {\n if (Logger.debugLog()) {\n // eslint-disable-next-line no-console\n console.log(...msgs);\n }\n }\n\n /**\n * A console warning wrapper which formats your output with useful debugging information.\n *\n * @example Logger.warn(\"Hello\");\n */\n static warn(...msgs: unknown[]) {\n console.warn(...msgs); // eslint-disable-line no-console\n }\n\n /**\n * A console error wrapper which formats your output with useful debugging information.\n * For use inside a component's function.\n * @example Logger.error(\"Hello\");\n */\n static error(...msgs: unknown[]) {\n console.error([...msgs].join(' ')); // eslint-disable-line no-console\n }\n\n /**\n * Local logging that outputs the tag name as a prefix automatically\n *\n * @example this.logger.log(\"Hello\");\n */\n log(...msgs: unknown[]) {\n Logger.log(this.prefix, ...msgs);\n }\n\n /**\n * Local warning wrapper that outputs the tag name as a prefix automatically.\n * For use inside a component's function.\n * @example this.logger.warn(\"Hello\");\n */\n warn(...msgs: unknown[]) {\n Logger.warn(this.prefix, ...msgs);\n }\n\n /**\n * Local error wrapper that outputs the tag name as a prefix automatically.\n * For use inside a component's function.\n * @example this.logger.error(\"Hello\");\n */\n error(...msgs: unknown[]) {\n Logger.error(this.prefix, ...msgs);\n }\n\n constructor(private host: ReactiveElement) {\n // We only need one logger instance per host\n if (Logger.instances.get(host)) {\n return Logger.instances.get(host) as Logger;\n }\n host.addController(this);\n Logger.instances.set(host, this);\n }\n\n hostConnected() {\n this.log('connected');\n }\n}\n"]}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { ReactiveController, ReactiveControllerHost } from 'lit';
|
|
2
|
+
/**
|
|
3
|
+
* Implements roving tabindex, as described in WAI-ARIA practices, [Managing Focus Within
|
|
4
|
+
* Components Using a Roving
|
|
5
|
+
* tabindex](https://www.w3.org/WAI/ARIA/apg/practices/keyboard-interface/#kbd_roving_tabindex)
|
|
6
|
+
*/
|
|
7
|
+
export declare class RovingTabindexController implements ReactiveController {
|
|
8
|
+
#private;
|
|
9
|
+
host: ReactiveControllerHost & HTMLElement;
|
|
10
|
+
/**
|
|
11
|
+
* active item of array of items
|
|
12
|
+
*/
|
|
13
|
+
get activeItem(): HTMLElement | undefined;
|
|
14
|
+
/**
|
|
15
|
+
* first item in array of focusable items
|
|
16
|
+
*/
|
|
17
|
+
get firstItem(): HTMLElement | undefined;
|
|
18
|
+
/**
|
|
19
|
+
* last item in array of focusable items
|
|
20
|
+
*/
|
|
21
|
+
get lastItem(): HTMLElement | undefined;
|
|
22
|
+
/**
|
|
23
|
+
* next item after active item in array of focusable items
|
|
24
|
+
*/
|
|
25
|
+
get nextItem(): HTMLElement | undefined;
|
|
26
|
+
/**
|
|
27
|
+
* previous item after active item in array of focusable items
|
|
28
|
+
*/
|
|
29
|
+
get prevItem(): HTMLElement | undefined;
|
|
30
|
+
constructor(host: ReactiveControllerHost & HTMLElement);
|
|
31
|
+
/**
|
|
32
|
+
* focuses on an item and sets it as active
|
|
33
|
+
*/
|
|
34
|
+
focusOnItem(item?: HTMLElement): void;
|
|
35
|
+
/**
|
|
36
|
+
* Focuses next focusable item
|
|
37
|
+
*/
|
|
38
|
+
updateItems(items: HTMLElement[]): void;
|
|
39
|
+
/**
|
|
40
|
+
* from array of HTML items, and sets active items
|
|
41
|
+
*/
|
|
42
|
+
initItems(items: HTMLElement[]): void;
|
|
43
|
+
hostConnected(): void;
|
|
44
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var E=(s,t,i)=>{if(!t.has(s))throw TypeError("Cannot "+i)};var e=(s,t,i)=>(E(s,t,"read from private field"),i?i.call(s):t.get(s)),m=(s,t,i)=>{if(t.has(s))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(s):t.set(s,i)},I=(s,t,i,n)=>(E(s,t,"write to private field"),n?n.call(s,i):t.set(s,i),i);var H=(s,t,i)=>(E(s,t,"access private method"),i);var M=s=>!!s&&!s.hasAttribute("disabled")&&!s.ariaHidden&&!s.hasAttribute("hidden"),a,c,r,h,u,l,f,p,d,L,b,g,v=class{constructor(t){this.host=t;m(this,r);m(this,u);m(this,f);m(this,d);m(this,b);m(this,a,void 0);m(this,c,[]);this.host.addController(this)}get activeItem(){return e(this,a)}get firstItem(){return e(this,r,h)[0]}get lastItem(){return e(this,r,h).at(-1)}get nextItem(){return e(this,u,l)<e(this,r,h).length-1?e(this,r,h)[e(this,u,l)+1]:this.firstItem}get prevItem(){return e(this,u,l)>0?e(this,r,h)[e(this,u,l)-1]:this.lastItem}focusOnItem(t){H(this,b,g).call(this,t||this.firstItem),e(this,a)?.focus()}updateItems(t){let n=[...t.slice(e(this,f,p)),...t.slice(0,e(this,f,p))].find(o=>e(this,r,h).includes(o));this.focusOnItem(n||this.firstItem)}initItems(t){I(this,c,t??[]);let i=e(this,r,h),[n]=i;I(this,a,n);for(let o of i)o.tabIndex=e(this,a)===o?0:-1}hostConnected(){this.host.addEventListener("keydown",H(this,d,L).bind(this))}};a=new WeakMap,c=new WeakMap,r=new WeakSet,h=function(){return e(this,c).filter(M)},u=new WeakSet,l=function(){return!!e(this,r,h)&&!!this.activeItem?e(this,r,h).indexOf(this.activeItem):-1},f=new WeakSet,p=function(){return this.activeItem?e(this,c).indexOf(this.activeItem):-1},d=new WeakSet,L=function(t){if(t.ctrlKey||t.altKey||t.metaKey||e(this,r,h).length<1)return;let i=this.activeItem,n=!1,o=i?i.tagName==="SELECT"||i.getAttribute("aria-expanded")==="true"||i.getAttribute("role")==="spinbutton":!1;switch(t.key){case"ArrowLeft":this.focusOnItem(this.prevItem),n=!0;break;case"ArrowRight":this.focusOnItem(this.nextItem),n=!0;break;case"ArrowDown":if(o)return;this.focusOnItem(this.prevItem),n=!0;break;case"ArrowUp":if(o)return;this.focusOnItem(this.nextItem),n=!0;break;case"Home":this.focusOnItem(this.firstItem),n=!0;break;case"PageUp":if(o)return;this.focusOnItem(this.firstItem),n=!0;break;case"End":this.focusOnItem(this.lastItem),n=!0;break;case"PageDown":if(o)return;this.focusOnItem(this.lastItem),n=!0;break;default:break}n&&(t.stopPropagation(),t.preventDefault())},b=new WeakSet,g=function(t){t&&(!!e(this,a)&&t!==e(this,a)&&(e(this,a).tabIndex=-1),t.tabIndex=0,I(this,a,t))};export{v as RovingTabindexController};
|
|
2
|
+
//# sourceMappingURL=roving-tabindex-controller.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["roving-tabindex-controller.ts"],
|
|
4
|
+
"sourcesContent": ["import type { ReactiveController, ReactiveControllerHost } from 'lit';\n\nconst isFocusableElement = (el: Element): el is HTMLElement =>\n !!el &&\n !el.hasAttribute('disabled') &&\n !el.ariaHidden &&\n !el.hasAttribute('hidden');\n\n/**\n * Implements roving tabindex, as described in WAI-ARIA practices, [Managing Focus Within\n * Components Using a Roving\n * tabindex](https://www.w3.org/WAI/ARIA/apg/practices/keyboard-interface/#kbd_roving_tabindex)\n */\nexport class RovingTabindexController implements ReactiveController {\n /** active focusable element */\n #activeItem?: HTMLElement;\n\n /** array of all focusable elements */\n #items: HTMLElement[] = [];\n\n /**\n * finds focusable items from a group of items\n */\n get #focusableItems(): HTMLElement[] {\n return this.#items.filter(isFocusableElement);\n }\n\n /**\n * index of active item in array of focusable items\n */\n get #activeIndex(): number {\n return !!this.#focusableItems && !!this.activeItem ? this.#focusableItems.indexOf(this.activeItem) : -1;\n }\n\n /**\n * index of active item in array of items\n */\n get #itemIndex(): number {\n return this.activeItem ? this.#items.indexOf(this.activeItem) : -1;\n }\n\n /**\n * active item of array of items\n */\n get activeItem(): HTMLElement | undefined {\n return this.#activeItem;\n }\n\n /**\n * first item in array of focusable items\n */\n get firstItem(): HTMLElement | undefined {\n return this.#focusableItems[0];\n }\n\n /**\n * last item in array of focusable items\n */\n get lastItem(): HTMLElement | undefined {\n return this.#focusableItems.at(-1);\n }\n\n /**\n * next item after active item in array of focusable items\n */\n get nextItem(): HTMLElement | undefined {\n return (\n this.#activeIndex < this.#focusableItems.length - 1 ? this.#focusableItems[this.#activeIndex + 1]\n : this.firstItem\n );\n }\n\n /**\n * previous item after active item in array of focusable items\n */\n get prevItem(): HTMLElement | undefined {\n return (\n this.#activeIndex > 0 ? this.#focusableItems[this.#activeIndex - 1]\n : this.lastItem\n );\n }\n\n constructor(public host: ReactiveControllerHost & HTMLElement) {\n this.host.addController(this);\n }\n\n /**\n * handles keyboard navigation\n */\n #onKeydown(event: KeyboardEvent):void {\n if (event.ctrlKey || event.altKey || event.metaKey || this.#focusableItems.length < 1) {\n return;\n }\n\n const item = this.activeItem;\n let shouldPreventDefault = false;\n const horizontalOnly =\n !item ? false\n : item.tagName === 'SELECT' ||\n item.getAttribute('aria-expanded') === 'true' ||\n item.getAttribute('role') === 'spinbutton';\n\n switch (event.key) {\n case 'ArrowLeft':\n this.focusOnItem(this.prevItem);\n shouldPreventDefault = true;\n break;\n case 'ArrowRight':\n this.focusOnItem(this.nextItem);\n shouldPreventDefault = true;\n break;\n case 'ArrowDown':\n if (horizontalOnly) {\n return;\n }\n this.focusOnItem(this.prevItem);\n shouldPreventDefault = true;\n break;\n case 'ArrowUp':\n if (horizontalOnly) {\n return;\n }\n this.focusOnItem(this.nextItem);\n shouldPreventDefault = true;\n break;\n case 'Home':\n this.focusOnItem(this.firstItem);\n shouldPreventDefault = true;\n break;\n case 'PageUp':\n if (horizontalOnly) {\n return;\n }\n this.focusOnItem(this.firstItem);\n shouldPreventDefault = true;\n break;\n case 'End':\n this.focusOnItem(this.lastItem);\n shouldPreventDefault = true;\n break;\n case 'PageDown':\n if (horizontalOnly) {\n return;\n }\n this.focusOnItem(this.lastItem);\n shouldPreventDefault = true;\n break;\n default:\n break;\n }\n\n if (shouldPreventDefault) {\n event.stopPropagation();\n event.preventDefault();\n }\n }\n\n /**\n * sets tabindex of item based on whether or not it is active\n */\n #updateActiveItem(item?: HTMLElement):void {\n if (item) {\n if (!!this.#activeItem && item !== this.#activeItem) {\n this.#activeItem.tabIndex = -1;\n }\n item.tabIndex = 0;\n this.#activeItem = item;\n }\n }\n\n /**\n * focuses on an item and sets it as active\n */\n focusOnItem(item?: HTMLElement):void {\n this.#updateActiveItem(item || this.firstItem);\n this.#activeItem?.focus();\n }\n\n /**\n * Focuses next focusable item\n */\n updateItems(items: HTMLElement[]) {\n const sequence = [...items.slice(this.#itemIndex), ...items.slice(0, this.#itemIndex)];\n const first = sequence.find(item => this.#focusableItems.includes(item));\n this.focusOnItem(first || this.firstItem);\n }\n\n /**\n * from array of HTML items, and sets active items\n */\n initItems(items: HTMLElement[]) {\n this.#items = items ?? [];\n const focusableItems = this.#focusableItems;\n const [focusableItem] = focusableItems;\n this.#activeItem = focusableItem;\n for (const item of focusableItems) {\n item.tabIndex = this.#activeItem === item ? 0 : -1;\n }\n }\n\n hostConnected() {\n this.host.addEventListener('keydown', this.#onKeydown.bind(this));\n }\n}\n"],
|
|
5
|
+
"mappings": "qYAEA,IAAMA,EAAsBC,GAC1B,CAAC,CAACA,GACF,CAACA,EAAG,aAAa,UAAU,GAC3B,CAACA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AK,YACH,GAAIC,EACF,OAEF,KAAK,YAAY,KAAK,QAAQ,EAC9BD,EAAuB,GACvB,MACF,IAAK,UACH,GAAIC,EACF,OAEF,KAAK,YAAY,KAAK,QAAQ,EAC9BD,EAAuB,GACvB,MACF,IAAK,OACH,KAAK,YAAY,KAAK,SAAS,EAC/BA,EAAuB,GACvB,MACF,IAAK,SACH,GAAIC,EACF,OAEF,KAAK,YAAY,KAAK,SAAS,EAC/BD,EAAuB,GACvB,MACF,IAAK,MACH,KAAK,YAAY,KAAK,QAAQ,EAC9BA,EAAuB,GACvB,MACF,IAAK,WACH,GAAIC,EACF,OAEF,KAAK,YAAY,KAAK,QAAQ,EAC9BD,EAAuB,GACvB,MACF,QACE,KACJ,CAEIA,IACFD,EAAM,gBAAgB,EACtBA,EAAM,eAAe,EAEzB,EAKAb,EAAA,YAAAC,EAAiB,SAACK,EAAyB,CACrCA,IACE,CAAC,CAACD,EAAA,KAAKf,IAAegB,IAASD,EAAA,KAAKf,KACtCe,EAAA,KAAKf,GAAY,SAAW,IAE9BgB,EAAK,SAAW,EAChBI,EAAA,KAAKpB,EAAcgB,GAEvB",
|
|
6
|
+
"names": ["isFocusableElement", "el", "_activeItem", "_items", "_focusableItems", "focusableItems_get", "_activeIndex", "activeIndex_get", "_itemIndex", "itemIndex_get", "_onKeydown", "onKeydown_fn", "_updateActiveItem", "updateActiveItem_fn", "RovingTabindexController", "host", "__privateAdd", "__privateGet", "item", "__privateMethod", "items", "first", "__privateSet", "focusableItems", "focusableItem", "event", "shouldPreventDefault", "horizontalOnly"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { ReactiveController, ReactiveControllerHost } from 'lit';
|
|
2
|
+
export interface ScrollSpyControllerOptions extends IntersectionObserverInit {
|
|
3
|
+
/**
|
|
4
|
+
* Tag names of legal link children.
|
|
5
|
+
* Legal children must have an `href` property/attribute pair, like `<a>`.
|
|
6
|
+
*/
|
|
7
|
+
tagNames: string[];
|
|
8
|
+
/**
|
|
9
|
+
* Attribute to set on the active link element.
|
|
10
|
+
* @default 'active'
|
|
11
|
+
*/
|
|
12
|
+
activeAttribute?: string;
|
|
13
|
+
/**
|
|
14
|
+
* The root node to query content for
|
|
15
|
+
* @default the host's root node
|
|
16
|
+
*/
|
|
17
|
+
rootNode?: Node;
|
|
18
|
+
/**
|
|
19
|
+
* function to call on link children to get their URL hash (i.e. id to scroll to)
|
|
20
|
+
* @default el => el.getAttribute('href');
|
|
21
|
+
*/
|
|
22
|
+
getHash?: (el: Element) => string | null;
|
|
23
|
+
}
|
|
24
|
+
export declare class ScrollSpyController implements ReactiveController {
|
|
25
|
+
#private;
|
|
26
|
+
private host;
|
|
27
|
+
get root(): Element | Document | null | undefined;
|
|
28
|
+
set root(v: Element | Document | null | undefined);
|
|
29
|
+
get rootMargin(): string | undefined;
|
|
30
|
+
set rootMargin(v: string | undefined);
|
|
31
|
+
get threshold(): number | number[];
|
|
32
|
+
set threshold(v: number | number[]);
|
|
33
|
+
constructor(host: ReactiveControllerHost & HTMLElement, options: ScrollSpyControllerOptions);
|
|
34
|
+
hostConnected(): void;
|
|
35
|
+
/** Explicitly set the active item */
|
|
36
|
+
setActive(link: EventTarget | null): Promise<void>;
|
|
37
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var M=(o,t,e)=>{if(!t.has(o))throw TypeError("Cannot "+e)};var s=(o,t,e)=>(M(o,t,"read from private field"),e?e.call(o):t.get(o)),i=(o,t,e)=>{if(t.has(o))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(o):t.set(o,e)},r=(o,t,e,h)=>(M(o,t,"write to private field"),h?h.call(o,e):t.set(o,e),e);var l=(o,t,e)=>(M(o,t,"access private method"),e);var f,C,a,m,u,c,v,b,E,N,p,d,y,g,A,I,O,w,x,R,q,S,L,k=class{constructor(t,e){this.host=t;i(this,d);i(this,g);i(this,I);i(this,w);i(this,R);i(this,S);i(this,f,void 0);i(this,C,void 0);i(this,a,void 0);i(this,m,new Set);i(this,u,!1);i(this,c,!1);i(this,v,void 0);i(this,b,void 0);i(this,E,void 0);i(this,N,void 0);i(this,p,void 0);t.addController(this),r(this,f,e.tagNames),r(this,v,e.root),r(this,b,e.rootMargin),r(this,C,e.activeAttribute??"active"),r(this,E,e.threshold??.85),r(this,N,e.rootNode??t.getRootNode()),r(this,p,e?.getHash??(h=>h.getAttribute("href")))}get root(){return s(this,v)}set root(t){r(this,v,t),s(this,a)?.disconnect(),l(this,g,A).call(this)}get rootMargin(){return s(this,b)}set rootMargin(t){r(this,b,t),s(this,a)?.disconnect(),l(this,g,A).call(this)}get threshold(){return s(this,E)}set threshold(t){r(this,E,t),s(this,a)?.disconnect(),l(this,g,A).call(this)}hostConnected(){l(this,g,A).call(this)}async setActive(t){r(this,u,!0),l(this,w,x).call(this,t);let e=!1;for(let h of s(this,d,y))l(this,I,O).call(this,h,!e),h===t&&(e=!0);await l(this,R,q).call(this),r(this,u,!1)}};f=new WeakMap,C=new WeakMap,a=new WeakMap,m=new WeakMap,u=new WeakMap,c=new WeakMap,v=new WeakMap,b=new WeakMap,E=new WeakMap,N=new WeakMap,p=new WeakMap,d=new WeakSet,y=function(){return Array.from(this.host.querySelectorAll(s(this,f).join(","))).filter(s(this,p))},g=new WeakSet,A=function(){let t=s(this,N);if(t instanceof Document||t instanceof ShadowRoot){let{rootMargin:e,threshold:h,root:H}=this;r(this,a,new IntersectionObserver(n=>l(this,S,L).call(this,n),{root:H,rootMargin:e,threshold:h})),s(this,d,y).map(n=>s(this,p).call(this,n)).filter(n=>!!n).map(n=>t.getElementById(n.replace("#",""))).filter(n=>!!n).forEach(n=>s(this,a)?.observe(n))}},I=new WeakSet,O=function(t,e){e?s(this,m).add(t):s(this,m).delete(t)},w=new WeakSet,x=function(t){for(let e of s(this,d,y))e.toggleAttribute(s(this,C),e===t)},R=new WeakSet,q=async function(){for(r(this,c,!1),setTimeout(()=>r(this,c,!1),3e3);!s(this,c);)await new Promise(requestAnimationFrame)},S=new WeakSet,L=async function(t){if(!s(this,u)){for(let{target:H,boundingClientRect:n,intersectionRect:j}of t){let P=`:is(${s(this,f).join(",")})[href="#${H.id}"]`,T=this.host.querySelector(P);T&&l(this,I,O).call(this,T,n.top<j.top)}let h=[...s(this,m)].at(-1);l(this,w,x).call(this,h??s(this,d,y).at(0))}r(this,c,!0)};export{k as ScrollSpyController};
|
|
2
|
+
//# sourceMappingURL=scroll-spy-controller.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["scroll-spy-controller.ts"],
|
|
4
|
+
"sourcesContent": ["import type { ReactiveController, ReactiveControllerHost } from 'lit';\n\nexport interface ScrollSpyControllerOptions extends IntersectionObserverInit {\n /**\n * Tag names of legal link children.\n * Legal children must have an `href` property/attribute pair, like `<a>`.\n */\n tagNames: string[];\n\n /**\n * Attribute to set on the active link element.\n * @default 'active'\n */\n activeAttribute?: string;\n\n /**\n * The root node to query content for\n * @default the host's root node\n */\n rootNode?: Node;\n /**\n * function to call on link children to get their URL hash (i.e. id to scroll to)\n * @default el => el.getAttribute('href');\n */\n getHash?: (el: Element) => string|null;\n}\n\nexport class ScrollSpyController implements ReactiveController {\n #tagNames: string[];\n #activeAttribute: string;\n\n #io?: IntersectionObserver;\n\n /** Which link's targets have already scrolled past? */\n #passedLinks = new Set<Element>();\n\n /** Ignore intersections? */\n #force = false;\n\n /** Has the intersection observer found an element? */\n #intersected = false;\n\n #root: ScrollSpyControllerOptions['root'];\n #rootMargin?: string;\n #threshold: number|number[];\n\n #rootNode: Node;\n #getHash: (el: Element) => string|null;\n\n get #linkChildren(): Element[] {\n return Array.from(this.host.querySelectorAll(this.#tagNames.join(',')))\n .filter(this.#getHash);\n }\n\n get root() {\n return this.#root;\n }\n\n set root(v) {\n this.#root = v;\n this.#io?.disconnect();\n this.#initIo();\n }\n\n get rootMargin() {\n return this.#rootMargin;\n }\n\n set rootMargin(v) {\n this.#rootMargin = v;\n this.#io?.disconnect();\n this.#initIo();\n }\n\n get threshold() {\n return this.#threshold;\n }\n\n set threshold(v) {\n this.#threshold = v;\n this.#io?.disconnect();\n this.#initIo();\n }\n\n constructor(\n private host: ReactiveControllerHost & HTMLElement,\n options: ScrollSpyControllerOptions,\n ) {\n host.addController(this);\n this.#tagNames = options.tagNames;\n this.#root = options.root;\n this.#rootMargin = options.rootMargin;\n this.#activeAttribute = options.activeAttribute ?? 'active';\n this.#threshold = options.threshold ?? 0.85;\n this.#rootNode = options.rootNode ?? host.getRootNode();\n this.#getHash = options?.getHash ?? ((el: Element) => el.getAttribute('href'));\n }\n\n hostConnected() {\n this.#initIo();\n }\n\n #initIo() {\n const rootNode = this.#rootNode;\n if (rootNode instanceof Document || rootNode instanceof ShadowRoot) {\n const { rootMargin, threshold, root } = this;\n this.#io = new IntersectionObserver(r => this.#onIo(r), { root, rootMargin, threshold });\n this.#linkChildren\n .map(x => this.#getHash(x))\n .filter((x): x is string => !!x)\n .map(x => rootNode.getElementById(x.replace('#', '')))\n .filter((x): x is HTMLElement => !!x)\n .forEach(target => this.#io?.observe(target));\n }\n }\n\n #markPassed(link: Element, force: boolean) {\n if (force) {\n this.#passedLinks.add(link);\n } else {\n this.#passedLinks.delete(link);\n }\n }\n\n #setActive(link?: EventTarget|null) {\n for (const child of this.#linkChildren) {\n child.toggleAttribute(this.#activeAttribute, child === link);\n }\n }\n\n async #nextIntersection() {\n this.#intersected = false;\n // safeguard the loop\n setTimeout(() => this.#intersected = false, 3000);\n while (!this.#intersected) {\n await new Promise(requestAnimationFrame);\n }\n }\n\n async #onIo(entries: IntersectionObserverEntry[]) {\n if (!this.#force) {\n for (const { target, boundingClientRect, intersectionRect } of entries) {\n const selector = `:is(${this.#tagNames.join(',')})[href=\"#${target.id}\"]`;\n const link = this.host.querySelector(selector);\n if (link) {\n this.#markPassed(link, boundingClientRect.top < intersectionRect.top);\n }\n }\n const link = [...this.#passedLinks];\n const last = link.at(-1);\n this.#setActive(last ?? this.#linkChildren.at(0));\n }\n this.#intersected = true;\n }\n\n /** Explicitly set the active item */\n public async setActive(link: EventTarget|null) {\n this.#force = true;\n this.#setActive(link);\n let sawActive = false;\n for (const child of this.#linkChildren) {\n this.#markPassed(child, !sawActive);\n if (child === link) {\n sawActive = true;\n }\n }\n await this.#nextIntersection();\n this.#force = false;\n }\n}\n"],
|
|
5
|
+
"mappings": "qYAAA,IAAAA,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EA2BaC,EAAN,KAAwD,CAyD7D,YACUC,EACRC,EACA,CAFQ,UAAAD,EApCVE,EAAA,KAAIf,GAqDJe,EAAA,KAAAb,GAcAa,EAAA,KAAAX,GAQAW,EAAA,KAAAT,GAMAS,EAAA,KAAMP,GASNO,EAAA,KAAML,GA/GNK,EAAA,KAAA1B,EAAA,QACA0B,EAAA,KAAAzB,EAAA,QAEAyB,EAAA,KAAAxB,EAAA,QAGAwB,EAAA,KAAAvB,EAAe,IAAI,KAGnBuB,EAAA,KAAAtB,EAAS,IAGTsB,EAAA,KAAArB,EAAe,IAEfqB,EAAA,KAAApB,EAAA,QACAoB,EAAA,KAAAnB,EAAA,QACAmB,EAAA,KAAAlB,EAAA,QAEAkB,EAAA,KAAAjB,EAAA,QACAiB,EAAA,KAAAhB,EAAA,QAyCEc,EAAK,cAAc,IAAI,EACvBG,EAAA,KAAK3B,EAAYyB,EAAQ,UACzBE,EAAA,KAAKrB,EAAQmB,EAAQ,MACrBE,EAAA,KAAKpB,EAAckB,EAAQ,YAC3BE,EAAA,KAAK1B,EAAmBwB,EAAQ,iBAAmB,UACnDE,EAAA,KAAKnB,EAAaiB,EAAQ,WAAa,KACvCE,EAAA,KAAKlB,EAAYgB,EAAQ,UAAYD,EAAK,YAAY,GACtDG,EAAA,KAAKjB,E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zB,GAAQ,CAChB,OAAW,CAAE,OAAAqC,EAAQ,mBAAAG,EAAoB,iBAAAC,CAAiB,IAAKF,EAAS,CACtE,IAAMG,EAAW,OAAOjB,EAAA,KAAK7B,GAAU,KAAK,GAAG,aAAayC,EAAO,OAC7DT,EAAO,KAAK,KAAK,cAAcc,CAAQ,EACzCd,GACFD,EAAA,KAAKhB,EAAAC,GAAL,UAAiBgB,EAAMY,EAAmB,IAAMC,EAAiB,IAErE,CAEA,IAAME,EADO,CAAC,GAAGlB,EAAA,KAAK1B,EAAY,EAChB,GAAG,EAAE,EACvB4B,EAAA,KAAKd,EAAAC,GAAL,UAAgB6B,GAAQlB,EAAA,KAAKlB,EAAAC,GAAc,GAAG,CAAC,EACjD,CACAe,EAAA,KAAKtB,EAAe,GACtB",
|
|
6
|
+
"names": ["_tagNames", "_activeAttribute", "_io", "_passedLinks", "_force", "_intersected", "_root", "_rootMargin", "_threshold", "_rootNode", "_getHash", "_linkChildren", "linkChildren_get", "_initIo", "initIo_fn", "_markPassed", "markPassed_fn", "_setActive", "setActive_fn", "_nextIntersection", "nextIntersection_fn", "_onIo", "onIo_fn", "ScrollSpyController", "host", "options", "__privateAdd", "__privateSet", "el", "__privateGet", "v", "__privateMethod", "link", "sawActive", "child", "rootNode", "rootMargin", "threshold", "root", "r", "x", "target", "force", "entries", "boundingClientRect", "intersectionRect", "selector", "last"]
|
|
7
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@patternfly/pfe-core",
|
|
3
|
-
"version": "2.0.0-next.
|
|
3
|
+
"version": "2.0.0-next.14",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "PatternFly Elements Core Library",
|
|
6
6
|
"customElements": "custom-elements.json",
|
|
@@ -16,13 +16,15 @@
|
|
|
16
16
|
"./controllers/cascade-controller.js": "./controllers/cascade-controller.js",
|
|
17
17
|
"./controllers/color-context.js": "./controllers/color-context.js",
|
|
18
18
|
"./controllers/css-variable-controller.js": "./controllers/css-variable-controller.js",
|
|
19
|
+
"./controllers/floating-dom-controller.js": "./controllers/floating-dom-controller.js",
|
|
20
|
+
"./controllers/internals-controller.js": "./controllers/internals-controller.js",
|
|
19
21
|
"./controllers/light-dom-controller.js": "./controllers/light-dom-controller.js",
|
|
20
22
|
"./controllers/logger.js": "./controllers/logger.js",
|
|
21
|
-
"./controllers/internals-controller.js": "./controllers/internals-controller.js",
|
|
22
23
|
"./controllers/perf-controller.js": "./controllers/perf-controller.js",
|
|
23
24
|
"./controllers/property-observer-controller.js": "./controllers/property-observer-controller.js",
|
|
25
|
+
"./controllers/roving-tabindex-controller.js": "./controllers/roving-tabindex-controller.js",
|
|
26
|
+
"./controllers/scroll-spy-controller.js": "./controllers/scroll-spy-controller.js",
|
|
24
27
|
"./controllers/slot-controller.js": "./controllers/slot-controller.js",
|
|
25
|
-
"./controllers/floating-dom-controller.js": "./controllers/floating-dom-controller.js",
|
|
26
28
|
"./controllers/style-controller.js": "./controllers/style-controller.js",
|
|
27
29
|
"./decorators/bound.js": "./decorators/bound.js",
|
|
28
30
|
"./decorators/cascades.js": "./decorators/cascades.js",
|