@genesislcap/foundation-utils 14.387.2 → 14.388.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.
@@ -393,120 +393,53 @@
393
393
  },
394
394
  {
395
395
  "kind": "javascript-module",
396
- "path": "src/design-system/design-system.ts",
397
- "declarations": [
398
- {
399
- "kind": "function",
400
- "name": "assureDesignSystem",
401
- "return": {
402
- "type": {
403
- "text": "DesignSystemModule"
404
- }
405
- },
406
- "parameters": [
407
- {
408
- "name": "module",
409
- "type": {
410
- "text": "DesignSystemModule"
411
- }
412
- }
413
- ],
414
- "description": "assureDesignSystem.",
415
- "privacy": "public"
416
- },
396
+ "path": "src/decorators/index.ts",
397
+ "declarations": [],
398
+ "exports": [
417
399
  {
418
- "kind": "function",
419
- "name": "getCurrentDesignSystem",
420
- "return": {
421
- "type": {
422
- "text": ""
423
- }
424
- },
425
- "parameters": [
426
- {
427
- "name": "element",
428
- "type": {
429
- "text": "HTMLElement"
430
- },
431
- "description": "The starting HTML element"
432
- },
433
- {
434
- "name": "fallbackPrefix",
435
- "type": {
436
- "text": "string"
437
- },
438
- "description": "The prefix to fallback to if the provider is not available"
439
- }
440
- ],
441
- "description": "Get the current design system provider element and prefix by checking available providers.\nIf no provider is found, falls back to the provided prefix.",
442
- "privacy": "public"
443
- },
400
+ "kind": "js",
401
+ "name": "*",
402
+ "declaration": {
403
+ "name": "*",
404
+ "package": "./renderOnChange"
405
+ }
406
+ }
407
+ ]
408
+ },
409
+ {
410
+ "kind": "javascript-module",
411
+ "path": "src/decorators/renderOnChange.ts",
412
+ "declarations": [
444
413
  {
445
414
  "kind": "function",
446
- "name": "getCurrentDesignSystemPrefix",
447
- "return": {
448
- "type": {
449
- "text": ""
450
- }
451
- },
415
+ "name": "renderOnChange",
452
416
  "parameters": [
453
417
  {
454
- "name": "element",
418
+ "name": "target",
455
419
  "type": {
456
- "text": "HTMLElement"
420
+ "text": "FASTElement & { render(): void }"
457
421
  },
458
- "description": "The starting HTML element"
422
+ "description": "The target to define the property change handler on."
459
423
  },
460
424
  {
461
- "name": "fallbackPrefix",
425
+ "name": "name",
462
426
  "type": {
463
427
  "text": "string"
464
428
  },
465
- "description": "The prefix to fallback to if the provider is not available"
429
+ "description": "The property name."
466
430
  }
467
431
  ],
468
- "description": "Get the current design system prefix by checking available providers.\nIf no provider is found, falls back to the provided prefix.",
432
+ "description": "Defines a property changed handler that calls a render() method on the target as an internal observation enhancement.",
469
433
  "privacy": "public"
470
434
  }
471
435
  ],
472
436
  "exports": [
473
437
  {
474
438
  "kind": "js",
475
- "name": "assureDesignSystem",
476
- "declaration": {
477
- "name": "assureDesignSystem",
478
- "module": "src/design-system/design-system.ts"
479
- }
480
- },
481
- {
482
- "kind": "js",
483
- "name": "getCurrentDesignSystem",
484
- "declaration": {
485
- "name": "getCurrentDesignSystem",
486
- "module": "src/design-system/design-system.ts"
487
- }
488
- },
489
- {
490
- "kind": "js",
491
- "name": "getCurrentDesignSystemPrefix",
492
- "declaration": {
493
- "name": "getCurrentDesignSystemPrefix",
494
- "module": "src/design-system/design-system.ts"
495
- }
496
- }
497
- ]
498
- },
499
- {
500
- "kind": "javascript-module",
501
- "path": "src/design-system/index.ts",
502
- "declarations": [],
503
- "exports": [
504
- {
505
- "kind": "js",
506
- "name": "*",
439
+ "name": "renderOnChange",
507
440
  "declaration": {
508
- "name": "*",
509
- "package": "./design-system"
441
+ "name": "renderOnChange",
442
+ "module": "src/decorators/renderOnChange.ts"
510
443
  }
511
444
  }
512
445
  ]
@@ -536,7 +469,7 @@
536
469
  },
537
470
  {
538
471
  "kind": "javascript-module",
539
- "path": "src/decorators/index.ts",
472
+ "path": "src/encoding/index.ts",
540
473
  "declarations": [],
541
474
  "exports": [
542
475
  {
@@ -544,45 +477,7 @@
544
477
  "name": "*",
545
478
  "declaration": {
546
479
  "name": "*",
547
- "package": "./renderOnChange"
548
- }
549
- }
550
- ]
551
- },
552
- {
553
- "kind": "javascript-module",
554
- "path": "src/decorators/renderOnChange.ts",
555
- "declarations": [
556
- {
557
- "kind": "function",
558
- "name": "renderOnChange",
559
- "parameters": [
560
- {
561
- "name": "target",
562
- "type": {
563
- "text": "FASTElement & { render(): void }"
564
- },
565
- "description": "The target to define the property change handler on."
566
- },
567
- {
568
- "name": "name",
569
- "type": {
570
- "text": "string"
571
- },
572
- "description": "The property name."
573
- }
574
- ],
575
- "description": "Defines a property changed handler that calls a render() method on the target as an internal observation enhancement.",
576
- "privacy": "public"
577
- }
578
- ],
579
- "exports": [
580
- {
581
- "kind": "js",
582
- "name": "renderOnChange",
583
- "declaration": {
584
- "name": "renderOnChange",
585
- "module": "src/decorators/renderOnChange.ts"
480
+ "package": "./base64"
586
481
  }
587
482
  }
588
483
  ]
@@ -1062,6 +957,126 @@
1062
957
  }
1063
958
  ]
1064
959
  },
960
+ {
961
+ "kind": "javascript-module",
962
+ "path": "src/design-system/design-system.ts",
963
+ "declarations": [
964
+ {
965
+ "kind": "function",
966
+ "name": "assureDesignSystem",
967
+ "return": {
968
+ "type": {
969
+ "text": "DesignSystemModule"
970
+ }
971
+ },
972
+ "parameters": [
973
+ {
974
+ "name": "module",
975
+ "type": {
976
+ "text": "DesignSystemModule"
977
+ }
978
+ }
979
+ ],
980
+ "description": "assureDesignSystem.",
981
+ "privacy": "public"
982
+ },
983
+ {
984
+ "kind": "function",
985
+ "name": "getCurrentDesignSystem",
986
+ "return": {
987
+ "type": {
988
+ "text": ""
989
+ }
990
+ },
991
+ "parameters": [
992
+ {
993
+ "name": "element",
994
+ "type": {
995
+ "text": "HTMLElement"
996
+ },
997
+ "description": "The starting HTML element"
998
+ },
999
+ {
1000
+ "name": "fallbackPrefix",
1001
+ "type": {
1002
+ "text": "string"
1003
+ },
1004
+ "description": "The prefix to fallback to if the provider is not available"
1005
+ }
1006
+ ],
1007
+ "description": "Get the current design system provider element and prefix by checking available providers.\nIf no provider is found, falls back to the provided prefix.",
1008
+ "privacy": "public"
1009
+ },
1010
+ {
1011
+ "kind": "function",
1012
+ "name": "getCurrentDesignSystemPrefix",
1013
+ "return": {
1014
+ "type": {
1015
+ "text": ""
1016
+ }
1017
+ },
1018
+ "parameters": [
1019
+ {
1020
+ "name": "element",
1021
+ "type": {
1022
+ "text": "HTMLElement"
1023
+ },
1024
+ "description": "The starting HTML element"
1025
+ },
1026
+ {
1027
+ "name": "fallbackPrefix",
1028
+ "type": {
1029
+ "text": "string"
1030
+ },
1031
+ "description": "The prefix to fallback to if the provider is not available"
1032
+ }
1033
+ ],
1034
+ "description": "Get the current design system prefix by checking available providers.\nIf no provider is found, falls back to the provided prefix.",
1035
+ "privacy": "public"
1036
+ }
1037
+ ],
1038
+ "exports": [
1039
+ {
1040
+ "kind": "js",
1041
+ "name": "assureDesignSystem",
1042
+ "declaration": {
1043
+ "name": "assureDesignSystem",
1044
+ "module": "src/design-system/design-system.ts"
1045
+ }
1046
+ },
1047
+ {
1048
+ "kind": "js",
1049
+ "name": "getCurrentDesignSystem",
1050
+ "declaration": {
1051
+ "name": "getCurrentDesignSystem",
1052
+ "module": "src/design-system/design-system.ts"
1053
+ }
1054
+ },
1055
+ {
1056
+ "kind": "js",
1057
+ "name": "getCurrentDesignSystemPrefix",
1058
+ "declaration": {
1059
+ "name": "getCurrentDesignSystemPrefix",
1060
+ "module": "src/design-system/design-system.ts"
1061
+ }
1062
+ }
1063
+ ]
1064
+ },
1065
+ {
1066
+ "kind": "javascript-module",
1067
+ "path": "src/design-system/index.ts",
1068
+ "declarations": [],
1069
+ "exports": [
1070
+ {
1071
+ "kind": "js",
1072
+ "name": "*",
1073
+ "declaration": {
1074
+ "name": "*",
1075
+ "package": "./design-system"
1076
+ }
1077
+ }
1078
+ ]
1079
+ },
1065
1080
  {
1066
1081
  "kind": "javascript-module",
1067
1082
  "path": "src/error/errorMap.ts",
@@ -1261,21 +1276,6 @@
1261
1276
  }
1262
1277
  ]
1263
1278
  },
1264
- {
1265
- "kind": "javascript-module",
1266
- "path": "src/encoding/index.ts",
1267
- "declarations": [],
1268
- "exports": [
1269
- {
1270
- "kind": "js",
1271
- "name": "*",
1272
- "declaration": {
1273
- "name": "*",
1274
- "package": "./base64"
1275
- }
1276
- }
1277
- ]
1278
- },
1279
1279
  {
1280
1280
  "kind": "javascript-module",
1281
1281
  "path": "src/feature-flags/featureFlags.ts",
@@ -3753,6 +3753,14 @@
3753
3753
  "name": "*",
3754
3754
  "package": "./logger"
3755
3755
  }
3756
+ },
3757
+ {
3758
+ "kind": "js",
3759
+ "name": "*",
3760
+ "declaration": {
3761
+ "name": "*",
3762
+ "package": "./noop"
3763
+ }
3756
3764
  }
3757
3765
  ]
3758
3766
  },
@@ -3778,6 +3786,74 @@
3778
3786
  }
3779
3787
  ]
3780
3788
  },
3789
+ {
3790
+ "kind": "javascript-module",
3791
+ "path": "src/utils/noop.ts",
3792
+ "declarations": [
3793
+ {
3794
+ "kind": "function",
3795
+ "name": "noop",
3796
+ "return": {
3797
+ "type": {
3798
+ "text": "void"
3799
+ }
3800
+ },
3801
+ "parameters": [
3802
+ {
3803
+ "name": "fn",
3804
+ "optional": true,
3805
+ "type": {
3806
+ "text": "() => void"
3807
+ }
3808
+ },
3809
+ {
3810
+ "description": "An optional function to execute for its side effects.",
3811
+ "name": "callback"
3812
+ }
3813
+ ],
3814
+ "description": "A no-operation function that executes an optional callback.\n\nThis is a lower-level utility function. For preventing tree-shaking of custom elements,\nprefer using avoidTreeShaking which provides a more explicit API.",
3815
+ "privacy": "public"
3816
+ },
3817
+ {
3818
+ "kind": "function",
3819
+ "name": "avoidTreeShaking",
3820
+ "return": {
3821
+ "type": {
3822
+ "text": "void"
3823
+ }
3824
+ },
3825
+ "parameters": [
3826
+ {
3827
+ "name": "classes",
3828
+ "type": {
3829
+ "text": "unknown[]"
3830
+ },
3831
+ "description": "One or more custom element classes that should not be tree-shaken."
3832
+ }
3833
+ ],
3834
+ "description": "Explicitly prevents tree-shaking of custom element classes by referencing them.\n\nBundlers may incorrectly remove code that it thinks has no side effects,\nsuch as custom element definitions that are only referenced in templates.\nBy passing these classes to `avoidTreeShaking`, we create a side effect\nthat signals to the bundler to preserve the code.",
3835
+ "privacy": "public"
3836
+ }
3837
+ ],
3838
+ "exports": [
3839
+ {
3840
+ "kind": "js",
3841
+ "name": "noop",
3842
+ "declaration": {
3843
+ "name": "noop",
3844
+ "module": "src/utils/noop.ts"
3845
+ }
3846
+ },
3847
+ {
3848
+ "kind": "js",
3849
+ "name": "avoidTreeShaking",
3850
+ "declaration": {
3851
+ "name": "avoidTreeShaking",
3852
+ "module": "src/utils/noop.ts"
3853
+ }
3854
+ }
3855
+ ]
3856
+ },
3781
3857
  {
3782
3858
  "kind": "javascript-module",
3783
3859
  "path": "src/utils/os-platform.ts",
@@ -1 +1 @@
1
- {"version":3,"file":"errorMap.d.ts","sourceRoot":"","sources":["../../../src/error/errorMap.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAErD;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,CAAC;AAEtD;;GAEG;AACH,MAAM,WAAW,QAAQ,CAAC,eAAe,SAAS,cAAc,CAC9D,SAAQ,IAAI,CACV,GAAG,CAAC,MAAM,eAAe,EAAE,KAAK,CAAC,EACjC,KAAK,GAAG,KAAK,GAAG,QAAQ,GAAG,OAAO,GAAG,MAAM,GAAG,QAAQ,CACvD;IACD;;;;;OAKG;IACH,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAE1B;;;;;;OAMG;IACH,GAAG,CAAC,GAAG,EAAE,MAAM,eAAe,EAAE,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;IAEpD;;;;;OAKG;IACH,QAAQ,CAAC,SAAS,EAAE,KAAK,CAAC;CAC3B;AAED;;GAEG;AACH,qBAAa,eAAe,CAAC,eAAe,SAAS,cAAc,CACjE,YAAW,QAAQ,CAAC,eAAe,CAAC;IAUxB,OAAO,CAAC,MAAM;IARd,OAAO,CAAC,GAAG,CAA2C;IAElE,uCAAuC;IAC3B,SAAS,EAAE,KAAK,CAAC;IAE7B;;OAEG;gBACiB,MAAM,EAAE,cAAc;IAE1C,iCAAiC;IACjC,GAAG,CAAC,GAAG,EAAE,MAAM,eAAe,EAAE,KAAK,EAAE,KAAK,GAAG,IAAI;IAMnD;;;;;;OAMG;IACH,GAAG,CAAC,GAAG,EAAE,MAAM,eAAe,GAAG,KAAK,GAAG,SAAS;IAIlD;;;;;;OAMG;IACH,GAAG,CAAC,GAAG,EAAE,MAAM,eAAe,GAAG,OAAO;IAIxC;;;;;;OAMG;IACH,MAAM,CAAC,GAAG,EAAE,MAAM,eAAe,GAAG,OAAO;IAa3C;;;OAGG;IACH,KAAK;IAKL;;;;;OAKG;IACH,IAAI,IAAI,IAAI,MAAM,CAEjB;IAED;;OAEG;IACH,MAAM;IAIN,sCAAsC;IACtC,IAAI,QAAQ,IAAI,MAAM,CAUrB;CACF;AAED;;;;;;GAMG;AACH,eAAO,MAAM,cAAc,GAAI,eAAe,SAAS,cAAc,EACnE,QAAQ,cAAc,KACrB,QAAQ,CAAC,eAAe,CAAiD,CAAC"}
1
+ {"version":3,"file":"errorMap.d.ts","sourceRoot":"","sources":["../../../src/error/errorMap.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAErD;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,CAAC;AAEtD;;GAEG;AACH,MAAM,WAAW,QAAQ,CAAC,eAAe,SAAS,cAAc,CAAE,SAAQ,IAAI,CAC5E,GAAG,CAAC,MAAM,eAAe,EAAE,KAAK,CAAC,EACjC,KAAK,GAAG,KAAK,GAAG,QAAQ,GAAG,OAAO,GAAG,MAAM,GAAG,QAAQ,CACvD;IACC;;;;;OAKG;IACH,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAE1B;;;;;;OAMG;IACH,GAAG,CAAC,GAAG,EAAE,MAAM,eAAe,EAAE,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;IAEpD;;;;;OAKG;IACH,QAAQ,CAAC,SAAS,EAAE,KAAK,CAAC;CAC3B;AAED;;GAEG;AACH,qBAAa,eAAe,CAC1B,eAAe,SAAS,cAAc,CACtC,YAAW,QAAQ,CAAC,eAAe,CAAC;IASxB,OAAO,CAAC,MAAM;IARd,OAAO,CAAC,GAAG,CAA2C;IAElE,uCAAuC;IAC3B,SAAS,EAAE,KAAK,CAAC;IAE7B;;OAEG;gBACiB,MAAM,EAAE,cAAc;IAE1C,iCAAiC;IACjC,GAAG,CAAC,GAAG,EAAE,MAAM,eAAe,EAAE,KAAK,EAAE,KAAK,GAAG,IAAI;IAMnD;;;;;;OAMG;IACH,GAAG,CAAC,GAAG,EAAE,MAAM,eAAe,GAAG,KAAK,GAAG,SAAS;IAIlD;;;;;;OAMG;IACH,GAAG,CAAC,GAAG,EAAE,MAAM,eAAe,GAAG,OAAO;IAIxC;;;;;;OAMG;IACH,MAAM,CAAC,GAAG,EAAE,MAAM,eAAe,GAAG,OAAO;IAa3C;;;OAGG;IACH,KAAK;IAKL;;;;;OAKG;IACH,IAAI,IAAI,IAAI,MAAM,CAEjB;IAED;;OAEG;IACH,MAAM;IAIN,sCAAsC;IACtC,IAAI,QAAQ,IAAI,MAAM,CAUrB;CACF;AAED;;;;;;GAMG;AACH,eAAO,MAAM,cAAc,GAAI,eAAe,SAAS,cAAc,EACnE,QAAQ,cAAc,KACrB,QAAQ,CAAC,eAAe,CAAiD,CAAC"}
@@ -2,4 +2,5 @@ export * from './deepMerge';
2
2
  export * from './delay';
3
3
  export * from './dom';
4
4
  export * from './logger';
5
+ export * from './noop';
5
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC"}
@@ -0,0 +1,23 @@
1
+ /**
2
+ * A no-operation function that executes an optional callback.
3
+ *
4
+ * This is a lower-level utility function. For preventing tree-shaking of custom elements,
5
+ * prefer using {@link avoidTreeShaking} which provides a more explicit API.
6
+ *
7
+ * @param callback - An optional function to execute for its side effects.
8
+ * @public
9
+ */
10
+ export declare const noop: (fn?: () => void) => void;
11
+ /**
12
+ * Explicitly prevents tree-shaking of custom element classes by referencing them.
13
+ *
14
+ * Bundlers may incorrectly remove code that it thinks has no side effects,
15
+ * such as custom element definitions that are only referenced in templates.
16
+ * By passing these classes to `avoidTreeShaking`, we create a side effect
17
+ * that signals to the bundler to preserve the code.
18
+ *
19
+ * @param classes - One or more custom element classes that should not be tree-shaken.
20
+ * @public
21
+ */
22
+ export declare const avoidTreeShaking: (...classes: unknown[]) => void;
23
+ //# sourceMappingURL=noop.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"noop.d.ts","sourceRoot":"","sources":["../../../src/utils/noop.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,eAAO,MAAM,IAAI,GAAI,KAAK,MAAM,IAAI,KAAG,IAEtC,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,gBAAgB,GAAI,GAAG,SAAS,OAAO,EAAE,KAAG,IAOxD,CAAC"}
@@ -2,3 +2,4 @@ export * from './deepMerge';
2
2
  export * from './delay';
3
3
  export * from './dom';
4
4
  export * from './logger';
5
+ export * from './noop';
@@ -0,0 +1,31 @@
1
+ /**
2
+ * A no-operation function that executes an optional callback.
3
+ *
4
+ * This is a lower-level utility function. For preventing tree-shaking of custom elements,
5
+ * prefer using {@link avoidTreeShaking} which provides a more explicit API.
6
+ *
7
+ * @param callback - An optional function to execute for its side effects.
8
+ * @public
9
+ */
10
+ export const noop = (fn) => {
11
+ fn === null || fn === void 0 ? void 0 : fn();
12
+ };
13
+ /**
14
+ * Explicitly prevents tree-shaking of custom element classes by referencing them.
15
+ *
16
+ * Bundlers may incorrectly remove code that it thinks has no side effects,
17
+ * such as custom element definitions that are only referenced in templates.
18
+ * By passing these classes to `avoidTreeShaking`, we create a side effect
19
+ * that signals to the bundler to preserve the code.
20
+ *
21
+ * @param classes - One or more custom element classes that should not be tree-shaken.
22
+ * @public
23
+ */
24
+ export const avoidTreeShaking = (...classes) => {
25
+ noop(() => {
26
+ // Reference each class to prevent tree-shaking
27
+ classes.forEach((cls) => {
28
+ void cls;
29
+ });
30
+ });
31
+ };
@@ -297,6 +297,47 @@
297
297
  ],
298
298
  "name": "assureDesignSystem"
299
299
  },
300
+ {
301
+ "kind": "Function",
302
+ "canonicalReference": "@genesislcap/foundation-utils!avoidTreeShaking:function(1)",
303
+ "docComment": "/**\n * Explicitly prevents tree-shaking of custom element classes by referencing them.\n *\n * Bundlers may incorrectly remove code that it thinks has no side effects, such as custom element definitions that are only referenced in templates. By passing these classes to `avoidTreeShaking`, we create a side effect that signals to the bundler to preserve the code.\n *\n * @param classes - One or more custom element classes that should not be tree-shaken.\n *\n * @public\n */\n",
304
+ "excerptTokens": [
305
+ {
306
+ "kind": "Content",
307
+ "text": "avoidTreeShaking: (...classes: "
308
+ },
309
+ {
310
+ "kind": "Content",
311
+ "text": "unknown[]"
312
+ },
313
+ {
314
+ "kind": "Content",
315
+ "text": ") => "
316
+ },
317
+ {
318
+ "kind": "Content",
319
+ "text": "void"
320
+ }
321
+ ],
322
+ "fileUrlPath": "src/utils/noop.ts",
323
+ "returnTypeTokenRange": {
324
+ "startIndex": 3,
325
+ "endIndex": 4
326
+ },
327
+ "releaseTag": "Public",
328
+ "overloadIndex": 1,
329
+ "parameters": [
330
+ {
331
+ "parameterName": "classes",
332
+ "parameterTypeTokenRange": {
333
+ "startIndex": 1,
334
+ "endIndex": 2
335
+ },
336
+ "isOptional": false
337
+ }
338
+ ],
339
+ "name": "avoidTreeShaking"
340
+ },
300
341
  {
301
342
  "kind": "Variable",
302
343
  "canonicalReference": "@genesislcap/foundation-utils!BUILDER:var",
@@ -12257,6 +12298,47 @@
12257
12298
  ],
12258
12299
  "name": "mapJsonSchemaFieldToExprBuilderField"
12259
12300
  },
12301
+ {
12302
+ "kind": "Function",
12303
+ "canonicalReference": "@genesislcap/foundation-utils!noop:function(1)",
12304
+ "docComment": "/**\n * A no-operation function that executes an optional callback.\n *\n * This is a lower-level utility function. For preventing tree-shaking of custom elements, prefer using {@link avoidTreeShaking} which provides a more explicit API.\n *\n * @param callback - An optional function to execute for its side effects.\n *\n * @public\n */\n",
12305
+ "excerptTokens": [
12306
+ {
12307
+ "kind": "Content",
12308
+ "text": "noop: (fn?: "
12309
+ },
12310
+ {
12311
+ "kind": "Content",
12312
+ "text": "() => void"
12313
+ },
12314
+ {
12315
+ "kind": "Content",
12316
+ "text": ") => "
12317
+ },
12318
+ {
12319
+ "kind": "Content",
12320
+ "text": "void"
12321
+ }
12322
+ ],
12323
+ "fileUrlPath": "src/utils/noop.ts",
12324
+ "returnTypeTokenRange": {
12325
+ "startIndex": 3,
12326
+ "endIndex": 4
12327
+ },
12328
+ "releaseTag": "Public",
12329
+ "overloadIndex": 1,
12330
+ "parameters": [
12331
+ {
12332
+ "parameterName": "fn",
12333
+ "parameterTypeTokenRange": {
12334
+ "startIndex": 1,
12335
+ "endIndex": 2
12336
+ },
12337
+ "isOptional": true
12338
+ }
12339
+ ],
12340
+ "name": "noop"
12341
+ },
12260
12342
  {
12261
12343
  "kind": "Class",
12262
12344
  "canonicalReference": "@genesislcap/foundation-utils!NumberParser:class",
@@ -77,6 +77,19 @@ export declare let API_HOST: string;
77
77
  */
78
78
  export declare function assureDesignSystem(module: DesignSystemModule): DesignSystemModule;
79
79
 
80
+ /**
81
+ * Explicitly prevents tree-shaking of custom element classes by referencing them.
82
+ *
83
+ * Bundlers may incorrectly remove code that it thinks has no side effects,
84
+ * such as custom element definitions that are only referenced in templates.
85
+ * By passing these classes to `avoidTreeShaking`, we create a side effect
86
+ * that signals to the bundler to preserve the code.
87
+ *
88
+ * @param classes - One or more custom element classes that should not be tree-shaken.
89
+ * @public
90
+ */
91
+ export declare const avoidTreeShaking: (...classes: unknown[]) => void;
92
+
80
93
  /**
81
94
  * @internal
82
95
  */
@@ -1479,6 +1492,17 @@ string,
1479
1492
  Genesis.FieldJsonSchema
1480
1493
  ]): Types.Field | null;
1481
1494
 
1495
+ /**
1496
+ * A no-operation function that executes an optional callback.
1497
+ *
1498
+ * This is a lower-level utility function. For preventing tree-shaking of custom elements,
1499
+ * prefer using {@link avoidTreeShaking} which provides a more explicit API.
1500
+ *
1501
+ * @param callback - An optional function to execute for its side effects.
1502
+ * @public
1503
+ */
1504
+ export declare const noop: (fn?: () => void) => void;
1505
+
1482
1506
  /**
1483
1507
  * @public
1484
1508
  */
@@ -0,0 +1,56 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [@genesislcap/foundation-utils](./foundation-utils.md) &gt; [avoidTreeShaking](./foundation-utils.avoidtreeshaking.md)
4
+
5
+ ## avoidTreeShaking() function
6
+
7
+ Explicitly prevents tree-shaking of custom element classes by referencing them.
8
+
9
+ Bundlers may incorrectly remove code that it thinks has no side effects, such as custom element definitions that are only referenced in templates. By passing these classes to `avoidTreeShaking`<!-- -->, we create a side effect that signals to the bundler to preserve the code.
10
+
11
+ **Signature:**
12
+
13
+ ```typescript
14
+ avoidTreeShaking: (...classes: unknown[]) => void
15
+ ```
16
+
17
+ ## Parameters
18
+
19
+ <table><thead><tr><th>
20
+
21
+ Parameter
22
+
23
+
24
+ </th><th>
25
+
26
+ Type
27
+
28
+
29
+ </th><th>
30
+
31
+ Description
32
+
33
+
34
+ </th></tr></thead>
35
+ <tbody><tr><td>
36
+
37
+ classes
38
+
39
+
40
+ </td><td>
41
+
42
+ unknown\[\]
43
+
44
+
45
+ </td><td>
46
+
47
+ One or more custom element classes that should not be tree-shaken.
48
+
49
+
50
+ </td></tr>
51
+ </tbody></table>
52
+
53
+ **Returns:**
54
+
55
+ void
56
+
@@ -192,6 +192,19 @@ Description
192
192
  assureDesignSystem.
193
193
 
194
194
 
195
+ </td></tr>
196
+ <tr><td>
197
+
198
+ [avoidTreeShaking(classes)](./foundation-utils.avoidtreeshaking.md)
199
+
200
+
201
+ </td><td>
202
+
203
+ Explicitly prevents tree-shaking of custom element classes by referencing them.
204
+
205
+ Bundlers may incorrectly remove code that it thinks has no side effects, such as custom element definitions that are only referenced in templates. By passing these classes to `avoidTreeShaking`<!-- -->, we create a side effect that signals to the bundler to preserve the code.
206
+
207
+
195
208
  </td></tr>
196
209
  <tr><td>
197
210
 
@@ -542,6 +555,19 @@ Maps fields contained in a JSON schema block enhanced with genesisType metadata
542
555
  Only sets the properties that are \*required\*. Optional properties, such as `defaultValue`<!-- -->, must be explicitly set by the user separately.
543
556
 
544
557
 
558
+ </td></tr>
559
+ <tr><td>
560
+
561
+ [noop(fn)](./foundation-utils.noop.md)
562
+
563
+
564
+ </td><td>
565
+
566
+ A no-operation function that executes an optional callback.
567
+
568
+ This is a lower-level utility function. For preventing tree-shaking of custom elements, prefer using [avoidTreeShaking()](./foundation-utils.avoidtreeshaking.md) which provides a more explicit API.
569
+
570
+
545
571
  </td></tr>
546
572
  <tr><td>
547
573
 
@@ -0,0 +1,56 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [@genesislcap/foundation-utils](./foundation-utils.md) &gt; [noop](./foundation-utils.noop.md)
4
+
5
+ ## noop() function
6
+
7
+ A no-operation function that executes an optional callback.
8
+
9
+ This is a lower-level utility function. For preventing tree-shaking of custom elements, prefer using [avoidTreeShaking()](./foundation-utils.avoidtreeshaking.md) which provides a more explicit API.
10
+
11
+ **Signature:**
12
+
13
+ ```typescript
14
+ noop: (fn?: () => void) => void
15
+ ```
16
+
17
+ ## Parameters
18
+
19
+ <table><thead><tr><th>
20
+
21
+ Parameter
22
+
23
+
24
+ </th><th>
25
+
26
+ Type
27
+
28
+
29
+ </th><th>
30
+
31
+ Description
32
+
33
+
34
+ </th></tr></thead>
35
+ <tbody><tr><td>
36
+
37
+ fn
38
+
39
+
40
+ </td><td>
41
+
42
+ () =&gt; void
43
+
44
+
45
+ </td><td>
46
+
47
+ _(Optional)_
48
+
49
+
50
+ </td></tr>
51
+ </tbody></table>
52
+
53
+ **Returns:**
54
+
55
+ void
56
+
@@ -35,6 +35,9 @@ export let API_HOST: string;
35
35
  // @public
36
36
  export function assureDesignSystem(module: DesignSystemModule): DesignSystemModule;
37
37
 
38
+ // @public
39
+ export const avoidTreeShaking: (...classes: unknown[]) => void;
40
+
38
41
  // Warning: (ae-internal-missing-underscore) The name "BIG_INT_64_BITS" should be prefixed with an underscore because the declaration is marked as @internal
39
42
  //
40
43
  // @internal (undocumented)
@@ -973,6 +976,9 @@ string,
973
976
  Genesis.FieldJsonSchema
974
977
  ]): Types.Field | null;
975
978
 
979
+ // @public
980
+ export const noop: (fn?: () => void) => void;
981
+
976
982
  // @public (undocumented)
977
983
  export class NumberParser {
978
984
  constructor(locale: string);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@genesislcap/foundation-utils",
3
3
  "description": "Genesis Foundation Utils",
4
- "version": "14.387.2",
4
+ "version": "14.388.1",
5
5
  "sideEffects": false,
6
6
  "license": "SEE LICENSE IN license.txt",
7
7
  "main": "dist/esm/index.js",
@@ -17,7 +17,9 @@
17
17
  "circular": "npx -y madge --extensions ts --circular ./src",
18
18
  "clean": "rimraf dist temp tsconfig.tsbuildinfo",
19
19
  "dev": "genx dev -b ts",
20
- "test": "genx test"
20
+ "test": "genx test",
21
+ "lint": "genx lint --profile",
22
+ "lint:fix": "genx lint --fix"
21
23
  },
22
24
  "madge": {
23
25
  "detectiveOptions": {
@@ -27,18 +29,18 @@
27
29
  }
28
30
  },
29
31
  "devDependencies": {
30
- "@genesislcap/foundation-testing": "14.387.2",
31
- "@genesislcap/genx": "14.387.2",
32
- "@genesislcap/rollup-builder": "14.387.2",
33
- "@genesislcap/ts-builder": "14.387.2",
34
- "@genesislcap/uvu-playwright-builder": "14.387.2",
35
- "@genesislcap/vite-builder": "14.387.2",
36
- "@genesislcap/webpack-builder": "14.387.2",
32
+ "@genesislcap/foundation-testing": "14.388.1",
33
+ "@genesislcap/genx": "14.388.1",
34
+ "@genesislcap/rollup-builder": "14.388.1",
35
+ "@genesislcap/ts-builder": "14.388.1",
36
+ "@genesislcap/uvu-playwright-builder": "14.388.1",
37
+ "@genesislcap/vite-builder": "14.388.1",
38
+ "@genesislcap/webpack-builder": "14.388.1",
37
39
  "@types/json-schema": "^7.0.11"
38
40
  },
39
41
  "dependencies": {
40
- "@genesislcap/expression-builder": "14.387.2",
41
- "@genesislcap/foundation-logger": "14.387.2",
42
+ "@genesislcap/expression-builder": "14.388.1",
43
+ "@genesislcap/foundation-logger": "14.388.1",
42
44
  "@microsoft/fast-components": "2.30.6",
43
45
  "@microsoft/fast-element": "1.14.0",
44
46
  "@microsoft/fast-foundation": "2.49.6",
@@ -56,5 +58,5 @@
56
58
  "access": "public"
57
59
  },
58
60
  "customElements": "dist/custom-elements.json",
59
- "gitHead": "336bd409fe7e65df555d415fc90f28e239106d12"
61
+ "gitHead": "576c66a3549832786971673c3b78d5cdd6b08902"
60
62
  }