@genesislcap/foundation-utils 15.89.0-canary.1 → 15.90.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.
|
@@ -258,59 +258,6 @@
|
|
|
258
258
|
}
|
|
259
259
|
]
|
|
260
260
|
},
|
|
261
|
-
{
|
|
262
|
-
"kind": "javascript-module",
|
|
263
|
-
"path": "src/decorators/index.ts",
|
|
264
|
-
"declarations": [],
|
|
265
|
-
"exports": [
|
|
266
|
-
{
|
|
267
|
-
"kind": "js",
|
|
268
|
-
"name": "*",
|
|
269
|
-
"declaration": {
|
|
270
|
-
"name": "*",
|
|
271
|
-
"package": "./renderOnChange"
|
|
272
|
-
}
|
|
273
|
-
}
|
|
274
|
-
]
|
|
275
|
-
},
|
|
276
|
-
{
|
|
277
|
-
"kind": "javascript-module",
|
|
278
|
-
"path": "src/decorators/renderOnChange.ts",
|
|
279
|
-
"declarations": [
|
|
280
|
-
{
|
|
281
|
-
"kind": "function",
|
|
282
|
-
"name": "renderOnChange",
|
|
283
|
-
"parameters": [
|
|
284
|
-
{
|
|
285
|
-
"name": "target",
|
|
286
|
-
"type": {
|
|
287
|
-
"text": "FASTElement & { render(): void }"
|
|
288
|
-
},
|
|
289
|
-
"description": "The target to define the property change handler on."
|
|
290
|
-
},
|
|
291
|
-
{
|
|
292
|
-
"name": "name",
|
|
293
|
-
"type": {
|
|
294
|
-
"text": "string"
|
|
295
|
-
},
|
|
296
|
-
"description": "The property name."
|
|
297
|
-
}
|
|
298
|
-
],
|
|
299
|
-
"description": "Defines a property changed handler that calls a render() method on the target as an internal observation enhancement.",
|
|
300
|
-
"privacy": "public"
|
|
301
|
-
}
|
|
302
|
-
],
|
|
303
|
-
"exports": [
|
|
304
|
-
{
|
|
305
|
-
"kind": "js",
|
|
306
|
-
"name": "renderOnChange",
|
|
307
|
-
"declaration": {
|
|
308
|
-
"name": "renderOnChange",
|
|
309
|
-
"module": "src/decorators/renderOnChange.ts"
|
|
310
|
-
}
|
|
311
|
-
}
|
|
312
|
-
]
|
|
313
|
-
},
|
|
314
261
|
{
|
|
315
262
|
"kind": "javascript-module",
|
|
316
263
|
"path": "src/data/inMemoryDatabase.ts",
|
|
@@ -509,44 +456,6 @@
|
|
|
509
456
|
}
|
|
510
457
|
]
|
|
511
458
|
},
|
|
512
|
-
{
|
|
513
|
-
"kind": "javascript-module",
|
|
514
|
-
"path": "src/directives/index.ts",
|
|
515
|
-
"declarations": [],
|
|
516
|
-
"exports": [
|
|
517
|
-
{
|
|
518
|
-
"kind": "js",
|
|
519
|
-
"name": "*",
|
|
520
|
-
"declaration": {
|
|
521
|
-
"name": "*",
|
|
522
|
-
"package": "./sync"
|
|
523
|
-
}
|
|
524
|
-
},
|
|
525
|
-
{
|
|
526
|
-
"kind": "js",
|
|
527
|
-
"name": "*",
|
|
528
|
-
"declaration": {
|
|
529
|
-
"name": "*",
|
|
530
|
-
"package": "./when-else"
|
|
531
|
-
}
|
|
532
|
-
}
|
|
533
|
-
]
|
|
534
|
-
},
|
|
535
|
-
{
|
|
536
|
-
"kind": "javascript-module",
|
|
537
|
-
"path": "src/encoding/index.ts",
|
|
538
|
-
"declarations": [],
|
|
539
|
-
"exports": [
|
|
540
|
-
{
|
|
541
|
-
"kind": "js",
|
|
542
|
-
"name": "*",
|
|
543
|
-
"declaration": {
|
|
544
|
-
"name": "*",
|
|
545
|
-
"package": "./base64"
|
|
546
|
-
}
|
|
547
|
-
}
|
|
548
|
-
]
|
|
549
|
-
},
|
|
550
459
|
{
|
|
551
460
|
"kind": "javascript-module",
|
|
552
461
|
"path": "src/design-system/design-system.ts",
|
|
@@ -785,6 +694,97 @@
|
|
|
785
694
|
}
|
|
786
695
|
]
|
|
787
696
|
},
|
|
697
|
+
{
|
|
698
|
+
"kind": "javascript-module",
|
|
699
|
+
"path": "src/directives/index.ts",
|
|
700
|
+
"declarations": [],
|
|
701
|
+
"exports": [
|
|
702
|
+
{
|
|
703
|
+
"kind": "js",
|
|
704
|
+
"name": "*",
|
|
705
|
+
"declaration": {
|
|
706
|
+
"name": "*",
|
|
707
|
+
"package": "./sync"
|
|
708
|
+
}
|
|
709
|
+
},
|
|
710
|
+
{
|
|
711
|
+
"kind": "js",
|
|
712
|
+
"name": "*",
|
|
713
|
+
"declaration": {
|
|
714
|
+
"name": "*",
|
|
715
|
+
"package": "./when-else"
|
|
716
|
+
}
|
|
717
|
+
}
|
|
718
|
+
]
|
|
719
|
+
},
|
|
720
|
+
{
|
|
721
|
+
"kind": "javascript-module",
|
|
722
|
+
"path": "src/decorators/index.ts",
|
|
723
|
+
"declarations": [],
|
|
724
|
+
"exports": [
|
|
725
|
+
{
|
|
726
|
+
"kind": "js",
|
|
727
|
+
"name": "*",
|
|
728
|
+
"declaration": {
|
|
729
|
+
"name": "*",
|
|
730
|
+
"package": "./renderOnChange"
|
|
731
|
+
}
|
|
732
|
+
}
|
|
733
|
+
]
|
|
734
|
+
},
|
|
735
|
+
{
|
|
736
|
+
"kind": "javascript-module",
|
|
737
|
+
"path": "src/decorators/renderOnChange.ts",
|
|
738
|
+
"declarations": [
|
|
739
|
+
{
|
|
740
|
+
"kind": "function",
|
|
741
|
+
"name": "renderOnChange",
|
|
742
|
+
"parameters": [
|
|
743
|
+
{
|
|
744
|
+
"name": "target",
|
|
745
|
+
"type": {
|
|
746
|
+
"text": "FASTElement & { render(): void }"
|
|
747
|
+
},
|
|
748
|
+
"description": "The target to define the property change handler on."
|
|
749
|
+
},
|
|
750
|
+
{
|
|
751
|
+
"name": "name",
|
|
752
|
+
"type": {
|
|
753
|
+
"text": "string"
|
|
754
|
+
},
|
|
755
|
+
"description": "The property name."
|
|
756
|
+
}
|
|
757
|
+
],
|
|
758
|
+
"description": "Defines a property changed handler that calls a render() method on the target as an internal observation enhancement.",
|
|
759
|
+
"privacy": "public"
|
|
760
|
+
}
|
|
761
|
+
],
|
|
762
|
+
"exports": [
|
|
763
|
+
{
|
|
764
|
+
"kind": "js",
|
|
765
|
+
"name": "renderOnChange",
|
|
766
|
+
"declaration": {
|
|
767
|
+
"name": "renderOnChange",
|
|
768
|
+
"module": "src/decorators/renderOnChange.ts"
|
|
769
|
+
}
|
|
770
|
+
}
|
|
771
|
+
]
|
|
772
|
+
},
|
|
773
|
+
{
|
|
774
|
+
"kind": "javascript-module",
|
|
775
|
+
"path": "src/encoding/index.ts",
|
|
776
|
+
"declarations": [],
|
|
777
|
+
"exports": [
|
|
778
|
+
{
|
|
779
|
+
"kind": "js",
|
|
780
|
+
"name": "*",
|
|
781
|
+
"declaration": {
|
|
782
|
+
"name": "*",
|
|
783
|
+
"package": "./base64"
|
|
784
|
+
}
|
|
785
|
+
}
|
|
786
|
+
]
|
|
787
|
+
},
|
|
788
788
|
{
|
|
789
789
|
"kind": "javascript-module",
|
|
790
790
|
"path": "src/env/index.ts",
|
|
@@ -32,11 +32,6 @@ export declare const createObserver: <EventType>() => Observer<EventType>;
|
|
|
32
32
|
* @param element - HTMLElement to observe
|
|
33
33
|
* @param callback - any function called when the visibility changes
|
|
34
34
|
* @returns A cleanup function to disconnect the observer
|
|
35
|
-
* @remarks
|
|
36
|
-
* The observer uses the default (implicit) root, i.e. the top-level viewport. An explicit
|
|
37
|
-
* `root: document.documentElement` reports elements outside its containing block chain as never
|
|
38
|
-
* intersecting, which includes content of an open modal (a `<dialog>` opened with `showModal()` in
|
|
39
|
-
* the top layer, or a `position: fixed` overlay), so the callback stayed at `false` there.
|
|
40
35
|
* @public
|
|
41
36
|
*/
|
|
42
37
|
export declare const respondToVisibility: (element: HTMLElement, callback: (arg0: boolean) => any) => (() => void);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"observer.d.ts","sourceRoot":"","sources":["../../../src/observer/observer.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,MAAM,QAAQ,CAAC,SAAS,IAAI,CAAC,EAAE,EAAE,SAAS,KAAK,IAAI,CAAC;AAC1D;;;;GAIG;AACH,MAAM,MAAM,SAAS,CAAC,SAA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 +19,17 @@ export const createObserver = () => {
|
|
|
19
19
|
* @param element - HTMLElement to observe
|
|
20
20
|
* @param callback - any function called when the visibility changes
|
|
21
21
|
* @returns A cleanup function to disconnect the observer
|
|
22
|
-
* @remarks
|
|
23
|
-
* The observer uses the default (implicit) root, i.e. the top-level viewport. An explicit
|
|
24
|
-
* `root: document.documentElement` reports elements outside its containing block chain as never
|
|
25
|
-
* intersecting, which includes content of an open modal (a `<dialog>` opened with `showModal()` in
|
|
26
|
-
* the top layer, or a `position: fixed` overlay), so the callback stayed at `false` there.
|
|
27
22
|
* @public
|
|
28
23
|
*/
|
|
29
24
|
export const respondToVisibility = (element, callback) => {
|
|
25
|
+
const options = {
|
|
26
|
+
root: document.documentElement,
|
|
27
|
+
};
|
|
30
28
|
const observer = new IntersectionObserver((entries) => {
|
|
31
29
|
entries.forEach((entry) => {
|
|
32
30
|
callback(entry.intersectionRatio > 0);
|
|
33
31
|
});
|
|
34
|
-
});
|
|
32
|
+
}, options);
|
|
35
33
|
observer.observe(element);
|
|
36
34
|
return () => {
|
|
37
35
|
observer.disconnect();
|
|
@@ -19589,7 +19589,7 @@
|
|
|
19589
19589
|
{
|
|
19590
19590
|
"kind": "Function",
|
|
19591
19591
|
"canonicalReference": "@genesislcap/foundation-utils!respondToVisibility:function(1)",
|
|
19592
|
-
"docComment": "/**\n * Setup an `IntersectionObserver` which will activate a callback function when an element becomes visible on screen\n *\n * @
|
|
19592
|
+
"docComment": "/**\n * Setup an `IntersectionObserver` which will activate a callback function when an element becomes visible on screen\n *\n * @param element - HTMLElement to observe\n *\n * @param callback - any function called when the visibility changes\n *\n * @returns A cleanup function to disconnect the observer\n *\n * @public\n */\n",
|
|
19593
19593
|
"excerptTokens": [
|
|
19594
19594
|
{
|
|
19595
19595
|
"kind": "Content",
|
|
@@ -2463,11 +2463,6 @@ export declare type ResourceType = (typeof ResourceType)[keyof typeof ResourceTy
|
|
|
2463
2463
|
* @param element - HTMLElement to observe
|
|
2464
2464
|
* @param callback - any function called when the visibility changes
|
|
2465
2465
|
* @returns A cleanup function to disconnect the observer
|
|
2466
|
-
* @remarks
|
|
2467
|
-
* The observer uses the default (implicit) root, i.e. the top-level viewport. An explicit
|
|
2468
|
-
* `root: document.documentElement` reports elements outside its containing block chain as never
|
|
2469
|
-
* intersecting, which includes content of an open modal (a `<dialog>` opened with `showModal()` in
|
|
2470
|
-
* the top layer, or a `position: fixed` overlay), so the callback stayed at `false` there.
|
|
2471
2466
|
* @public
|
|
2472
2467
|
*/
|
|
2473
2468
|
export declare const respondToVisibility: (element: HTMLElement, callback: (arg0: boolean) => any) => (() => void);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@genesislcap/foundation-utils",
|
|
3
3
|
"description": "Genesis Foundation Utils",
|
|
4
|
-
"version": "15.
|
|
4
|
+
"version": "15.90.0",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"license": "SEE LICENSE IN license.txt",
|
|
7
7
|
"main": "dist/esm/index.js",
|
|
@@ -29,17 +29,17 @@
|
|
|
29
29
|
}
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@genesislcap/foundation-testing": "15.
|
|
33
|
-
"@genesislcap/genx": "15.
|
|
34
|
-
"@genesislcap/ts-builder": "15.
|
|
35
|
-
"@genesislcap/uvu-playwright-builder": "15.
|
|
36
|
-
"@genesislcap/vite-builder": "15.
|
|
37
|
-
"@genesislcap/webpack-builder": "15.
|
|
32
|
+
"@genesislcap/foundation-testing": "15.90.0",
|
|
33
|
+
"@genesislcap/genx": "15.90.0",
|
|
34
|
+
"@genesislcap/ts-builder": "15.90.0",
|
|
35
|
+
"@genesislcap/uvu-playwright-builder": "15.90.0",
|
|
36
|
+
"@genesislcap/vite-builder": "15.90.0",
|
|
37
|
+
"@genesislcap/webpack-builder": "15.90.0",
|
|
38
38
|
"@types/json-schema": "^7.0.11"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@genesislcap/expression-builder": "15.
|
|
42
|
-
"@genesislcap/foundation-logger": "15.
|
|
41
|
+
"@genesislcap/expression-builder": "15.90.0",
|
|
42
|
+
"@genesislcap/foundation-logger": "15.90.0",
|
|
43
43
|
"@microsoft/fast-components": "2.30.6",
|
|
44
44
|
"@microsoft/fast-element": "1.14.0",
|
|
45
45
|
"@microsoft/fast-foundation": "2.50.0",
|