@agnos-ui/core 0.0.1-alpha.0 → 0.0.1-alpha.1
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/README.md +4 -4
- package/{dist/lib/accordion.d.ts → accordion.d.ts} +3 -8
- package/{dist/lib/accordion.js → accordion.js} +1 -1
- package/{dist/lib/alert.d.ts → alert.d.ts} +2 -1
- package/{dist/lib/alert.js → alert.js} +1 -0
- package/commonProps.d.ts +6 -0
- package/commonProps.js +1 -0
- package/{dist/lib/index.d.ts → index.d.ts} +1 -0
- package/{dist/lib/index.js → index.js} +1 -0
- package/{dist/lib/modal → modal}/modal.d.ts +3 -9
- package/{dist/lib/modal → modal}/modal.js +1 -1
- package/package.json +13 -27
- package/{dist/lib/pagination.d.ts → pagination.d.ts} +4 -12
- package/{dist/lib/pagination.js → pagination.js} +1 -1
- package/{dist/lib/rating.d.ts → rating.d.ts} +3 -9
- package/{dist/lib/select.d.ts → select.d.ts} +2 -5
- package/{dist/lib/services → services}/index.d.ts +1 -0
- package/{dist/lib/services → services}/index.js +1 -0
- package/services/intersection.d.ts +26 -0
- package/services/intersection.js +47 -0
- package/dist/lib/tsdoc-metadata.json +0 -11
- /package/{dist/lib/config.d.ts → config.d.ts} +0 -0
- /package/{dist/lib/config.js → config.js} +0 -0
- /package/{dist/lib/modal → modal}/scrollbars.d.ts +0 -0
- /package/{dist/lib/modal → modal}/scrollbars.js +0 -0
- /package/{dist/lib/pagination.utils.d.ts → pagination.utils.d.ts} +0 -0
- /package/{dist/lib/pagination.utils.js → pagination.utils.js} +0 -0
- /package/{dist/lib/rating.js → rating.js} +0 -0
- /package/{dist/lib/select.js → select.js} +0 -0
- /package/{dist/lib/services → services}/checks.d.ts +0 -0
- /package/{dist/lib/services → services}/checks.js +0 -0
- /package/{dist/lib/services → services}/directiveUtils.d.ts +0 -0
- /package/{dist/lib/services → services}/directiveUtils.js +0 -0
- /package/{dist/lib/services → services}/focustrack.d.ts +0 -0
- /package/{dist/lib/services → services}/focustrack.js +0 -0
- /package/{dist/lib/services → services}/portal.d.ts +0 -0
- /package/{dist/lib/services → services}/portal.js +0 -0
- /package/{dist/lib/services → services}/siblingsInert.d.ts +0 -0
- /package/{dist/lib/services → services}/siblingsInert.js +0 -0
- /package/{dist/lib/services → services}/stores.d.ts +0 -0
- /package/{dist/lib/services → services}/stores.js +0 -0
- /package/{dist/lib/services → services}/writables.d.ts +0 -0
- /package/{dist/lib/services → services}/writables.js +0 -0
- /package/{dist/lib/transitions → transitions}/baseTransitions.d.ts +0 -0
- /package/{dist/lib/transitions → transitions}/baseTransitions.js +0 -0
- /package/{dist/lib/transitions → transitions}/bootstrap/collapse.d.ts +0 -0
- /package/{dist/lib/transitions → transitions}/bootstrap/collapse.js +0 -0
- /package/{dist/lib/transitions → transitions}/bootstrap/fade.d.ts +0 -0
- /package/{dist/lib/transitions → transitions}/bootstrap/fade.js +0 -0
- /package/{dist/lib/transitions → transitions}/bootstrap/index.d.ts +0 -0
- /package/{dist/lib/transitions → transitions}/bootstrap/index.js +0 -0
- /package/{dist/lib/transitions → transitions}/collapse.d.ts +0 -0
- /package/{dist/lib/transitions → transitions}/collapse.js +0 -0
- /package/{dist/lib/transitions → transitions}/cssTransitions.d.ts +0 -0
- /package/{dist/lib/transitions → transitions}/cssTransitions.js +0 -0
- /package/{dist/lib/transitions → transitions}/index.d.ts +0 -0
- /package/{dist/lib/transitions → transitions}/index.js +0 -0
- /package/{dist/lib/transitions → transitions}/simpleClassTransition.d.ts +0 -0
- /package/{dist/lib/transitions → transitions}/simpleClassTransition.js +0 -0
- /package/{dist/lib/transitions → transitions}/utils.d.ts +0 -0
- /package/{dist/lib/transitions → transitions}/utils.js +0 -0
- /package/{dist/lib/types.d.ts → types.d.ts} +0 -0
- /package/{dist/lib/types.js → types.js} +0 -0
- /package/{dist/lib/utils.d.ts → utils.d.ts} +0 -0
- /package/{dist/lib/utils.js → utils.js} +0 -0
package/README.md
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/@agnos-ui/core)
|
|
4
4
|
|
|
5
|
-
[AgnosUI](https://amadeusitgroup.github.io/AgnosUI/latest/) is a framework-agnostic widget library with adapters for multiple frameworks:
|
|
5
|
+
[AgnosUI](https://amadeusitgroup.github.io/AgnosUI/latest/) is a framework-agnostic widget library with adapters for multiple frameworks, either [Bootstrap](https://getbootstrap.com/)-based or headless:
|
|
6
6
|
|
|
7
|
-
- [Angular](https://www.npmjs.com/package/@agnos-ui/angular)
|
|
8
|
-
- [React](https://www.npmjs.com/package/@agnos-ui/react)
|
|
9
|
-
- [Svelte](https://www.npmjs.com/package/@agnos-ui/svelte)
|
|
7
|
+
- [Angular](https://www.npmjs.com/package/@agnos-ui/angular), [Angular headless](https://www.npmjs.com/package/@agnos-ui/angular-headless)
|
|
8
|
+
- [React](https://www.npmjs.com/package/@agnos-ui/react), [React headless](https://www.npmjs.com/package/@agnos-ui/react-headless)
|
|
9
|
+
- [Svelte](https://www.npmjs.com/package/@agnos-ui/svelte), [Svelte headless](https://www.npmjs.com/package/@agnos-ui/svelte-headless)
|
|
10
10
|
|
|
11
11
|
This `@agnos-ui/core` package contains the framework-agnostic common code used by the above framework adapters.
|
|
12
12
|
|
|
@@ -1,13 +1,8 @@
|
|
|
1
1
|
import type { PropsConfig } from './services';
|
|
2
2
|
import type { TransitionFn } from './transitions';
|
|
3
3
|
import type { Directive, SlotContent, Widget, WidgetSlotContext } from './types';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
* Classes to add on the accordion DOM element.
|
|
7
|
-
*/
|
|
8
|
-
accordionClass: string;
|
|
9
|
-
}
|
|
10
|
-
export interface AccordionProps extends AccordionCommonPropsAndState {
|
|
4
|
+
import type { WidgetsCommonPropsAndState } from './commonProps';
|
|
5
|
+
export interface AccordionProps extends WidgetsCommonPropsAndState {
|
|
11
6
|
/**
|
|
12
7
|
* If `true`, only one item at the time can stay open.
|
|
13
8
|
*/
|
|
@@ -132,7 +127,7 @@ export interface AccordionProps extends AccordionCommonPropsAndState {
|
|
|
132
127
|
*/
|
|
133
128
|
itemBodyClass: string;
|
|
134
129
|
}
|
|
135
|
-
export interface AccordionState extends
|
|
130
|
+
export interface AccordionState extends WidgetsCommonPropsAndState {
|
|
136
131
|
/**
|
|
137
132
|
* Array containing all the accordion-items contained in the accordion.
|
|
138
133
|
*/
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import type { WidgetsCommonPropsAndState } from './commonProps';
|
|
1
2
|
import type { PropsConfig } from './services';
|
|
2
3
|
import type { TransitionFn } from './transitions';
|
|
3
4
|
import type { Directive, SlotContent, Widget, WidgetSlotContext } from './types';
|
|
4
5
|
export type AlertContext = WidgetSlotContext<AlertWidget>;
|
|
5
|
-
export interface AlertCommonPropsAndState {
|
|
6
|
+
export interface AlertCommonPropsAndState extends WidgetsCommonPropsAndState {
|
|
6
7
|
/**
|
|
7
8
|
* If `true`, alert can be dismissed by the user.
|
|
8
9
|
* The close button (×) will be displayed and you can be notified of the event with the (close) output.
|
package/commonProps.d.ts
ADDED
package/commonProps.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { PropsConfig } from '../services';
|
|
2
2
|
import type { TransitionFn } from '../transitions';
|
|
3
3
|
import type { Widget, Directive, SlotContent, WidgetSlotContext } from '../types';
|
|
4
|
+
import type { WidgetsCommonPropsAndState } from '../commonProps';
|
|
4
5
|
/**
|
|
5
6
|
* Value present in the {@link ModalBeforeCloseEvent.result|result} property of the {@link ModalProps.onBeforeClose|onBeforeClose} event
|
|
6
7
|
* and returned by the {@link ModalApi.open|open} method, when the modal is closed by a click inside the viewport but outside the modal.
|
|
@@ -18,7 +19,7 @@ export type ModalContext = WidgetSlotContext<ModalWidget>;
|
|
|
18
19
|
/**
|
|
19
20
|
* Properties of the modal widget that are also in the state of the modal.
|
|
20
21
|
*/
|
|
21
|
-
export interface ModalCommonPropsAndState {
|
|
22
|
+
export interface ModalCommonPropsAndState extends WidgetsCommonPropsAndState {
|
|
22
23
|
/**
|
|
23
24
|
* Value of the aria-label attribute to put on the close button.
|
|
24
25
|
*/
|
|
@@ -37,10 +38,6 @@ export interface ModalCommonPropsAndState {
|
|
|
37
38
|
* Otherwise, they stay where the widget is located.
|
|
38
39
|
*/
|
|
39
40
|
container: HTMLElement | null;
|
|
40
|
-
/**
|
|
41
|
-
* Classes to add on the modal DOM element.
|
|
42
|
-
*/
|
|
43
|
-
modalClass: string;
|
|
44
41
|
/**
|
|
45
42
|
* Body of the modal.
|
|
46
43
|
*/
|
|
@@ -280,10 +277,6 @@ export declare function getModalDefaultConfig(): {
|
|
|
280
277
|
* Otherwise, they stay where the widget is located.
|
|
281
278
|
*/
|
|
282
279
|
container: HTMLElement | null;
|
|
283
|
-
/**
|
|
284
|
-
* Classes to add on the modal DOM element.
|
|
285
|
-
*/
|
|
286
|
-
modalClass: string;
|
|
287
280
|
/**
|
|
288
281
|
* Body of the modal.
|
|
289
282
|
*/
|
|
@@ -309,6 +302,7 @@ export declare function getModalDefaultConfig(): {
|
|
|
309
302
|
* Whether the modal should be visible when the transition is completed.
|
|
310
303
|
*/
|
|
311
304
|
visible: boolean;
|
|
305
|
+
className: string;
|
|
312
306
|
};
|
|
313
307
|
/**
|
|
314
308
|
* Creates a new modal widget instance.
|
|
@@ -24,7 +24,7 @@ const defaultConfig = {
|
|
|
24
24
|
closeButton: true,
|
|
25
25
|
closeOnOutsideClick: true,
|
|
26
26
|
container: typeof window !== 'undefined' ? document.body : null,
|
|
27
|
-
|
|
27
|
+
className: '',
|
|
28
28
|
modalTransition: fadeTransition,
|
|
29
29
|
onBeforeClose: noop,
|
|
30
30
|
onVisibleChange: noop,
|
package/package.json
CHANGED
|
@@ -1,52 +1,38 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agnos-ui/core",
|
|
3
3
|
"description": "Framework-agnostic headless widget library.",
|
|
4
|
-
"homepage": "https://amadeusitgroup.github.io/AgnosUI/latest/",
|
|
5
4
|
"keywords": [
|
|
6
5
|
"headless",
|
|
7
6
|
"agnostic",
|
|
8
7
|
"components",
|
|
9
8
|
"widgets",
|
|
9
|
+
"accordion",
|
|
10
10
|
"alert",
|
|
11
11
|
"modal",
|
|
12
12
|
"pagination",
|
|
13
13
|
"rating"
|
|
14
14
|
],
|
|
15
15
|
"type": "module",
|
|
16
|
-
"main": "./
|
|
17
|
-
"module": "./
|
|
18
|
-
"types": "./
|
|
16
|
+
"main": "./index.js",
|
|
17
|
+
"module": "./index.js",
|
|
18
|
+
"types": "./index.d.ts",
|
|
19
19
|
"exports": {
|
|
20
20
|
".": {
|
|
21
|
-
"types": "./
|
|
22
|
-
"default": "./
|
|
21
|
+
"types": "./index.d.ts",
|
|
22
|
+
"default": "./index.js"
|
|
23
23
|
}
|
|
24
24
|
},
|
|
25
|
-
"scripts": {
|
|
26
|
-
"build": "npm run build:lib && npm run build:tsc && npm run build:api-extractor",
|
|
27
|
-
"build:lib": "node ../scripts/rm.js dist/lib && tsc -p tsconfig.lib.json",
|
|
28
|
-
"build:tsc": "tsc",
|
|
29
|
-
"build:api-extractor": "api-extractor run",
|
|
30
|
-
"test": "vitest run",
|
|
31
|
-
"tdd": "vitest",
|
|
32
|
-
"tdd:ui": "vitest --ui",
|
|
33
|
-
"test:coverage": "vitest run --coverage"
|
|
34
|
-
},
|
|
35
25
|
"dependencies": {
|
|
36
26
|
"@amadeus-it-group/tansu": "0.0.22"
|
|
37
27
|
},
|
|
38
|
-
"
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
"license": "MIT",
|
|
28
|
+
"sideEffects": false,
|
|
29
|
+
"version": "0.0.1-alpha.1",
|
|
30
|
+
"homepage": "https://amadeusitgroup.github.io/AgnosUI/latest/",
|
|
42
31
|
"bugs": "https://github.com/AmadeusITGroup/AgnosUI/issues",
|
|
32
|
+
"license": "MIT",
|
|
43
33
|
"repository": {
|
|
44
34
|
"type": "git",
|
|
45
35
|
"url": "https://github.com/AmadeusITGroup/AgnosUI.git",
|
|
46
|
-
"directory": "core"
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
"eslint-plugin-jsdoc": "^46.4.6"
|
|
50
|
-
},
|
|
51
|
-
"version": "0.0.1-alpha.0"
|
|
52
|
-
}
|
|
36
|
+
"directory": "core/lib"
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { PropsConfig } from './services';
|
|
2
2
|
import type { Widget, SlotContent, WidgetSlotContext } from './types';
|
|
3
|
+
import type { WidgetsCommonPropsAndState } from './commonProps';
|
|
3
4
|
/**
|
|
4
5
|
* A type for the slot context of the pagination widget
|
|
5
6
|
*/
|
|
@@ -13,7 +14,7 @@ export interface PaginationNumberContext extends PaginationContext {
|
|
|
13
14
|
*/
|
|
14
15
|
displayedPage: number;
|
|
15
16
|
}
|
|
16
|
-
export interface PaginationCommonPropsAndState {
|
|
17
|
+
export interface PaginationCommonPropsAndState extends WidgetsCommonPropsAndState {
|
|
17
18
|
/**
|
|
18
19
|
* The current page.
|
|
19
20
|
*
|
|
@@ -86,11 +87,6 @@ export interface PaginationCommonPropsAndState {
|
|
|
86
87
|
* @defaultValue false
|
|
87
88
|
*/
|
|
88
89
|
boundaryLinks: boolean;
|
|
89
|
-
/**
|
|
90
|
-
* An input to add a custom class to the UL
|
|
91
|
-
* @defaultValue ''
|
|
92
|
-
*/
|
|
93
|
-
className: string;
|
|
94
90
|
/**
|
|
95
91
|
* The template to use for the ellipsis slot
|
|
96
92
|
* for I18n, we suggest to use the global configuration
|
|
@@ -398,11 +394,6 @@ export declare function getPaginationDefaultConfig(): {
|
|
|
398
394
|
* @defaultValue false
|
|
399
395
|
*/
|
|
400
396
|
boundaryLinks: boolean;
|
|
401
|
-
/**
|
|
402
|
-
* An input to add a custom class to the UL
|
|
403
|
-
* @defaultValue ''
|
|
404
|
-
*/
|
|
405
|
-
className: string;
|
|
406
397
|
/**
|
|
407
398
|
* The template to use for the ellipsis slot
|
|
408
399
|
* for I18n, we suggest to use the global configuration
|
|
@@ -455,10 +446,11 @@ export declare function getPaginationDefaultConfig(): {
|
|
|
455
446
|
* @param displayedPage - The current page number
|
|
456
447
|
*/
|
|
457
448
|
slotNumberLabel: SlotContent<PaginationNumberContext>;
|
|
449
|
+
className: string;
|
|
458
450
|
};
|
|
459
451
|
/**
|
|
460
452
|
* Create a PaginationWidget with given config props
|
|
461
|
-
* @param config - an optional
|
|
453
|
+
* @param config - an optional pagination config
|
|
462
454
|
* @returns a PaginationWidget
|
|
463
455
|
*/
|
|
464
456
|
export declare function createPagination(config?: PropsConfig<PaginationProps>): PaginationWidget;
|
|
@@ -64,7 +64,7 @@ const configValidator = {
|
|
|
64
64
|
};
|
|
65
65
|
/**
|
|
66
66
|
* Create a PaginationWidget with given config props
|
|
67
|
-
* @param config - an optional
|
|
67
|
+
* @param config - an optional pagination config
|
|
68
68
|
* @returns a PaginationWidget
|
|
69
69
|
*/
|
|
70
70
|
export function createPagination(config) {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { PropsConfig } from './services';
|
|
2
2
|
import type { SlotContent, Widget } from './types';
|
|
3
|
+
import type { WidgetsCommonPropsAndState } from './commonProps';
|
|
3
4
|
export interface StarContext {
|
|
4
5
|
/**
|
|
5
6
|
* indicates how much the current star is filled, from 0 to 100
|
|
@@ -10,7 +11,7 @@ export interface StarContext {
|
|
|
10
11
|
*/
|
|
11
12
|
index: number;
|
|
12
13
|
}
|
|
13
|
-
export interface RatingCommonPropsAndState {
|
|
14
|
+
export interface RatingCommonPropsAndState extends WidgetsCommonPropsAndState {
|
|
14
15
|
/**
|
|
15
16
|
* The current rating. Could be a decimal value like `3.75`.
|
|
16
17
|
*/
|
|
@@ -38,10 +39,6 @@ export interface RatingCommonPropsAndState {
|
|
|
38
39
|
* If the component is disabled, `tabindex` will still be set to `-1`.
|
|
39
40
|
*/
|
|
40
41
|
tabindex: number;
|
|
41
|
-
/**
|
|
42
|
-
* Classname to be applied on the rating container
|
|
43
|
-
*/
|
|
44
|
-
className: string;
|
|
45
42
|
/**
|
|
46
43
|
* The template to override the way each star is displayed.
|
|
47
44
|
*/
|
|
@@ -184,10 +181,6 @@ export declare function getRatingDefaultConfig(): {
|
|
|
184
181
|
* If the component is disabled, `tabindex` will still be set to `-1`.
|
|
185
182
|
*/
|
|
186
183
|
tabindex: number;
|
|
187
|
-
/**
|
|
188
|
-
* Classname to be applied on the rating container
|
|
189
|
-
*/
|
|
190
|
-
className: string;
|
|
191
184
|
/**
|
|
192
185
|
* The template to override the way each star is displayed.
|
|
193
186
|
*/
|
|
@@ -200,6 +193,7 @@ export declare function getRatingDefaultConfig(): {
|
|
|
200
193
|
* The aria labelled by
|
|
201
194
|
*/
|
|
202
195
|
ariaLabelledBy: string;
|
|
196
|
+
className: string;
|
|
203
197
|
};
|
|
204
198
|
/**
|
|
205
199
|
* Create a RatingWidget with given config props
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import type { HasFocus } from './services/focustrack';
|
|
2
2
|
import type { PropsConfig } from './services/stores';
|
|
3
3
|
import type { Widget } from './types';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
* the class to attach to the select DOM element
|
|
7
|
-
*/
|
|
8
|
-
className: string;
|
|
4
|
+
import type { WidgetsCommonPropsAndState } from './commonProps';
|
|
5
|
+
export interface SelectCommonPropsAndState<Item> extends WidgetsCommonPropsAndState {
|
|
9
6
|
/**
|
|
10
7
|
* List of selected items
|
|
11
8
|
*/
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { PropsConfig } from './stores';
|
|
2
|
+
export interface IntersectionProps {
|
|
3
|
+
/**
|
|
4
|
+
* elements to observe
|
|
5
|
+
*/
|
|
6
|
+
elements: HTMLElement[];
|
|
7
|
+
/**
|
|
8
|
+
* IntersectionObserverInit used in the IntersectionObserver
|
|
9
|
+
*
|
|
10
|
+
* See the [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserver/IntersectionObserver#options)
|
|
11
|
+
*/
|
|
12
|
+
options: Partial<IntersectionObserverInit> | undefined;
|
|
13
|
+
}
|
|
14
|
+
export declare const createIntersection: (config?: PropsConfig<IntersectionProps>) => {
|
|
15
|
+
/**
|
|
16
|
+
* Readable of observed elements
|
|
17
|
+
*/
|
|
18
|
+
elements$: import("@amadeus-it-group/tansu").ReadableSignal<HTMLElement[]>;
|
|
19
|
+
/**
|
|
20
|
+
* Store of map that contains the visible elements (for the key) and the corresponding entries
|
|
21
|
+
*
|
|
22
|
+
* See the [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserverEntry)
|
|
23
|
+
*/
|
|
24
|
+
visibleElements$: import("@amadeus-it-group/tansu").ReadableSignal<Map<Element, IntersectionObserverEntry>>;
|
|
25
|
+
patch: <U extends Partial<IntersectionProps>>(storesValues?: void | U | undefined) => void;
|
|
26
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { asReadable, derived } from '@amadeus-it-group/tansu';
|
|
2
|
+
import { noop } from '../utils';
|
|
3
|
+
import { writablesForProps } from './stores';
|
|
4
|
+
const defaultValues = {
|
|
5
|
+
elements: [],
|
|
6
|
+
options: undefined,
|
|
7
|
+
};
|
|
8
|
+
export const createIntersection = (config) => {
|
|
9
|
+
const [{ elements$, options$ }, patch] = writablesForProps(defaultValues, config);
|
|
10
|
+
const visibleElements$ = derived([elements$, options$], ([elements, options], set) => {
|
|
11
|
+
if (elements.length) {
|
|
12
|
+
const visibleElements = new Map();
|
|
13
|
+
const observer = new IntersectionObserver((entries) => {
|
|
14
|
+
for (const entry of entries) {
|
|
15
|
+
const { target, isIntersecting } = entry;
|
|
16
|
+
if (isIntersecting) {
|
|
17
|
+
visibleElements.set(target, entry);
|
|
18
|
+
}
|
|
19
|
+
else {
|
|
20
|
+
visibleElements.delete(target);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
set(visibleElements);
|
|
24
|
+
}, options);
|
|
25
|
+
for (const element of elements) {
|
|
26
|
+
observer.observe(element);
|
|
27
|
+
}
|
|
28
|
+
return () => {
|
|
29
|
+
observer.disconnect();
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
return noop;
|
|
33
|
+
}, new Map());
|
|
34
|
+
return {
|
|
35
|
+
/**
|
|
36
|
+
* Readable of observed elements
|
|
37
|
+
*/
|
|
38
|
+
elements$: asReadable(elements$),
|
|
39
|
+
/**
|
|
40
|
+
* Store of map that contains the visible elements (for the key) and the corresponding entries
|
|
41
|
+
*
|
|
42
|
+
* See the [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserverEntry)
|
|
43
|
+
*/
|
|
44
|
+
visibleElements$: asReadable(visibleElements$),
|
|
45
|
+
patch,
|
|
46
|
+
};
|
|
47
|
+
};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
// This file is read by tools that parse documentation comments conforming to the TSDoc standard.
|
|
2
|
-
// It should be published with your NPM package. It should not be tracked by Git.
|
|
3
|
-
{
|
|
4
|
-
"tsdocVersion": "0.12",
|
|
5
|
-
"toolPackages": [
|
|
6
|
-
{
|
|
7
|
-
"packageName": "@microsoft/api-extractor",
|
|
8
|
-
"packageVersion": "7.36.4"
|
|
9
|
-
}
|
|
10
|
-
]
|
|
11
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|