@genesislcap/foundation-utils 14.387.1 → 14.388.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.
@@ -193,6 +193,59 @@
193
193
  }
194
194
  ]
195
195
  },
196
+ {
197
+ "kind": "javascript-module",
198
+ "path": "src/decorators/index.ts",
199
+ "declarations": [],
200
+ "exports": [
201
+ {
202
+ "kind": "js",
203
+ "name": "*",
204
+ "declaration": {
205
+ "name": "*",
206
+ "package": "./renderOnChange"
207
+ }
208
+ }
209
+ ]
210
+ },
211
+ {
212
+ "kind": "javascript-module",
213
+ "path": "src/decorators/renderOnChange.ts",
214
+ "declarations": [
215
+ {
216
+ "kind": "function",
217
+ "name": "renderOnChange",
218
+ "parameters": [
219
+ {
220
+ "name": "target",
221
+ "type": {
222
+ "text": "FASTElement & { render(): void }"
223
+ },
224
+ "description": "The target to define the property change handler on."
225
+ },
226
+ {
227
+ "name": "name",
228
+ "type": {
229
+ "text": "string"
230
+ },
231
+ "description": "The property name."
232
+ }
233
+ ],
234
+ "description": "Defines a property changed handler that calls a render() method on the target as an internal observation enhancement.",
235
+ "privacy": "public"
236
+ }
237
+ ],
238
+ "exports": [
239
+ {
240
+ "kind": "js",
241
+ "name": "renderOnChange",
242
+ "declaration": {
243
+ "name": "renderOnChange",
244
+ "module": "src/decorators/renderOnChange.ts"
245
+ }
246
+ }
247
+ ]
248
+ },
196
249
  {
197
250
  "kind": "javascript-module",
198
251
  "path": "src/data/inMemoryDatabase.ts",
@@ -393,60 +446,112 @@
393
446
  },
394
447
  {
395
448
  "kind": "javascript-module",
396
- "path": "src/decorators/index.ts",
397
- "declarations": [],
398
- "exports": [
399
- {
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",
449
+ "path": "src/design-system/design-system.ts",
412
450
  "declarations": [
413
451
  {
414
452
  "kind": "function",
415
- "name": "renderOnChange",
453
+ "name": "assureDesignSystem",
454
+ "return": {
455
+ "type": {
456
+ "text": "DesignSystemModule"
457
+ }
458
+ },
416
459
  "parameters": [
417
460
  {
418
- "name": "target",
461
+ "name": "module",
419
462
  "type": {
420
- "text": "FASTElement & { render(): void }"
463
+ "text": "DesignSystemModule"
464
+ }
465
+ }
466
+ ],
467
+ "description": "assureDesignSystem.",
468
+ "privacy": "public"
469
+ },
470
+ {
471
+ "kind": "function",
472
+ "name": "getCurrentDesignSystem",
473
+ "return": {
474
+ "type": {
475
+ "text": ""
476
+ }
477
+ },
478
+ "parameters": [
479
+ {
480
+ "name": "element",
481
+ "type": {
482
+ "text": "HTMLElement"
421
483
  },
422
- "description": "The target to define the property change handler on."
484
+ "description": "The starting HTML element"
423
485
  },
424
486
  {
425
- "name": "name",
487
+ "name": "fallbackPrefix",
426
488
  "type": {
427
489
  "text": "string"
428
490
  },
429
- "description": "The property name."
491
+ "description": "The prefix to fallback to if the provider is not available"
430
492
  }
431
493
  ],
432
- "description": "Defines a property changed handler that calls a render() method on the target as an internal observation enhancement.",
494
+ "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.",
495
+ "privacy": "public"
496
+ },
497
+ {
498
+ "kind": "function",
499
+ "name": "getCurrentDesignSystemPrefix",
500
+ "return": {
501
+ "type": {
502
+ "text": ""
503
+ }
504
+ },
505
+ "parameters": [
506
+ {
507
+ "name": "element",
508
+ "type": {
509
+ "text": "HTMLElement"
510
+ },
511
+ "description": "The starting HTML element"
512
+ },
513
+ {
514
+ "name": "fallbackPrefix",
515
+ "type": {
516
+ "text": "string"
517
+ },
518
+ "description": "The prefix to fallback to if the provider is not available"
519
+ }
520
+ ],
521
+ "description": "Get the current design system prefix by checking available providers.\nIf no provider is found, falls back to the provided prefix.",
433
522
  "privacy": "public"
434
523
  }
435
524
  ],
436
525
  "exports": [
437
526
  {
438
527
  "kind": "js",
439
- "name": "renderOnChange",
528
+ "name": "assureDesignSystem",
440
529
  "declaration": {
441
- "name": "renderOnChange",
442
- "module": "src/decorators/renderOnChange.ts"
530
+ "name": "assureDesignSystem",
531
+ "module": "src/design-system/design-system.ts"
532
+ }
533
+ },
534
+ {
535
+ "kind": "js",
536
+ "name": "getCurrentDesignSystem",
537
+ "declaration": {
538
+ "name": "getCurrentDesignSystem",
539
+ "module": "src/design-system/design-system.ts"
540
+ }
541
+ },
542
+ {
543
+ "kind": "js",
544
+ "name": "getCurrentDesignSystemPrefix",
545
+ "declaration": {
546
+ "name": "getCurrentDesignSystemPrefix",
547
+ "module": "src/design-system/design-system.ts"
443
548
  }
444
549
  }
445
550
  ]
446
551
  },
447
552
  {
448
553
  "kind": "javascript-module",
449
- "path": "src/directives/index.ts",
554
+ "path": "src/design-system/index.ts",
450
555
  "declarations": [],
451
556
  "exports": [
452
557
  {
@@ -454,15 +559,7 @@
454
559
  "name": "*",
455
560
  "declaration": {
456
561
  "name": "*",
457
- "package": "./sync"
458
- }
459
- },
460
- {
461
- "kind": "js",
462
- "name": "*",
463
- "declaration": {
464
- "name": "*",
465
- "package": "./when-else"
562
+ "package": "./design-system"
466
563
  }
467
564
  }
468
565
  ]
@@ -959,154 +1056,34 @@
959
1056
  },
960
1057
  {
961
1058
  "kind": "javascript-module",
962
- "path": "src/design-system/design-system.ts",
1059
+ "path": "src/error/errorMap.ts",
963
1060
  "declarations": [
964
1061
  {
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": [
1062
+ "kind": "class",
1063
+ "description": "",
1064
+ "name": "DefaultErrorMap",
1065
+ "members": [
992
1066
  {
993
- "name": "element",
994
- "type": {
995
- "text": "HTMLElement"
996
- },
997
- "description": "The starting HTML element"
1067
+ "kind": "field",
1068
+ "name": "map",
1069
+ "privacy": "private",
1070
+ "default": "new Map<keyof TErrorDetailMap, Error>()"
998
1071
  },
999
1072
  {
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",
1073
+ "kind": "field",
1074
+ "name": "lastError",
1021
1075
  "type": {
1022
- "text": "HTMLElement"
1076
+ "text": "Error"
1023
1077
  },
1024
- "description": "The starting HTML element"
1078
+ "description": "{@inheritDoc ErrorMap.lastError}"
1025
1079
  },
1026
1080
  {
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
- },
1080
- {
1081
- "kind": "javascript-module",
1082
- "path": "src/error/errorMap.ts",
1083
- "declarations": [
1084
- {
1085
- "kind": "class",
1086
- "description": "",
1087
- "name": "DefaultErrorMap",
1088
- "members": [
1089
- {
1090
- "kind": "field",
1091
- "name": "map",
1092
- "privacy": "private",
1093
- "default": "new Map<keyof TErrorDetailMap, Error>()"
1094
- },
1095
- {
1096
- "kind": "field",
1097
- "name": "lastError",
1098
- "type": {
1099
- "text": "Error"
1100
- },
1101
- "description": "{@inheritDoc ErrorMap.lastError}"
1102
- },
1103
- {
1104
- "kind": "method",
1105
- "name": "set",
1106
- "return": {
1107
- "type": {
1108
- "text": "void"
1109
- }
1081
+ "kind": "method",
1082
+ "name": "set",
1083
+ "return": {
1084
+ "type": {
1085
+ "text": "void"
1086
+ }
1110
1087
  },
1111
1088
  "parameters": [
1112
1089
  {
@@ -1276,6 +1253,29 @@
1276
1253
  }
1277
1254
  ]
1278
1255
  },
1256
+ {
1257
+ "kind": "javascript-module",
1258
+ "path": "src/directives/index.ts",
1259
+ "declarations": [],
1260
+ "exports": [
1261
+ {
1262
+ "kind": "js",
1263
+ "name": "*",
1264
+ "declaration": {
1265
+ "name": "*",
1266
+ "package": "./sync"
1267
+ }
1268
+ },
1269
+ {
1270
+ "kind": "js",
1271
+ "name": "*",
1272
+ "declaration": {
1273
+ "name": "*",
1274
+ "package": "./when-else"
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",
@@ -4062,160 +4138,6 @@
4062
4138
  }
4063
4139
  ]
4064
4140
  },
4065
- {
4066
- "kind": "javascript-module",
4067
- "path": "src/directives/sync/index.ts",
4068
- "declarations": [],
4069
- "exports": [
4070
- {
4071
- "kind": "js",
4072
- "name": "*",
4073
- "declaration": {
4074
- "name": "*",
4075
- "package": "./sync"
4076
- }
4077
- }
4078
- ]
4079
- },
4080
- {
4081
- "kind": "javascript-module",
4082
- "path": "src/directives/sync/sync.ts",
4083
- "declarations": [
4084
- {
4085
- "kind": "variable",
4086
- "name": "defaultEventMap",
4087
- "type": {
4088
- "text": "Map<string, EventName>"
4089
- },
4090
- "default": "new Map([\n ['FAST-TEXT-AREA', 'input'],\n ['FAST-TEXT-FIELD', 'input'],\n ['FOUNDATION-TEXT-AREA', 'input'],\n ['FOUNDATION-TEXT-FIELD', 'input'],\n ['INPUT', 'input'],\n ['ZERO-TEXT-FIELD', 'input'],\n])",
4091
- "description": "A map that associates specific HTML element tags with their corresponding default event names.",
4092
- "privacy": "public"
4093
- },
4094
- {
4095
- "kind": "function",
4096
- "name": "sync",
4097
- "return": {
4098
- "type": {
4099
- "text": "CaptureType<TSource>"
4100
- }
4101
- },
4102
- "parameters": [
4103
- {
4104
- "name": "binding",
4105
- "type": {
4106
- "text": "Binding<TSource, TReturn>"
4107
- }
4108
- },
4109
- {
4110
- "name": "conversionType",
4111
- "default": "'string'",
4112
- "type": {
4113
- "text": "ConversionType"
4114
- }
4115
- },
4116
- {
4117
- "name": "eventName",
4118
- "default": "'default'",
4119
- "type": {
4120
- "text": "EventName"
4121
- }
4122
- },
4123
- {
4124
- "name": "keyAttr",
4125
- "optional": true,
4126
- "type": {
4127
- "text": "string"
4128
- }
4129
- }
4130
- ],
4131
- "description": "Creates a synchronization directive that binds a data source to an HTML element,",
4132
- "privacy": "public"
4133
- }
4134
- ],
4135
- "exports": [
4136
- {
4137
- "kind": "js",
4138
- "name": "defaultEventMap",
4139
- "declaration": {
4140
- "name": "defaultEventMap",
4141
- "module": "src/directives/sync/sync.ts"
4142
- }
4143
- },
4144
- {
4145
- "kind": "js",
4146
- "name": "sync",
4147
- "declaration": {
4148
- "name": "sync",
4149
- "module": "src/directives/sync/sync.ts"
4150
- }
4151
- }
4152
- ]
4153
- },
4154
- {
4155
- "kind": "javascript-module",
4156
- "path": "src/directives/when-else/index.ts",
4157
- "declarations": [],
4158
- "exports": [
4159
- {
4160
- "kind": "js",
4161
- "name": "*",
4162
- "declaration": {
4163
- "name": "*",
4164
- "package": "./when-else"
4165
- }
4166
- }
4167
- ]
4168
- },
4169
- {
4170
- "kind": "javascript-module",
4171
- "path": "src/directives/when-else/when-else.ts",
4172
- "declarations": [
4173
- {
4174
- "kind": "function",
4175
- "name": "whenElse",
4176
- "return": {
4177
- "type": {
4178
- "text": "CaptureType<TSource>"
4179
- }
4180
- },
4181
- "parameters": [
4182
- {
4183
- "name": "binding",
4184
- "type": {
4185
- "text": "Binding<TSource, TReturn>"
4186
- },
4187
- "description": "The condition to test for rendering."
4188
- },
4189
- {
4190
- "name": "trueTemplateOrTemplateBinding",
4191
- "type": {
4192
- "text": "WhenTemplate<TSource>"
4193
- },
4194
- "description": "The template or a binding that gets the template to render when the condition is true."
4195
- },
4196
- {
4197
- "name": "falseTemplateOrTemplateBinding",
4198
- "type": {
4199
- "text": "WhenTemplate<TSource>"
4200
- },
4201
- "description": "The template or a binding that gets the template to render when the condition is false."
4202
- }
4203
- ],
4204
- "description": "Directive that allows supplying an \"else\" template to the traditional https://www.fast.design/docs/api/fast-element.when/#when-function directive",
4205
- "privacy": "public"
4206
- }
4207
- ],
4208
- "exports": [
4209
- {
4210
- "kind": "js",
4211
- "name": "whenElse",
4212
- "declaration": {
4213
- "name": "whenElse",
4214
- "module": "src/directives/when-else/when-else.ts"
4215
- }
4216
- }
4217
- ]
4218
- },
4219
4141
  {
4220
4142
  "kind": "javascript-module",
4221
4143
  "path": "src/encoding/base64/decode.ts",
@@ -4370,6 +4292,160 @@
4370
4292
  }
4371
4293
  ]
4372
4294
  },
4295
+ {
4296
+ "kind": "javascript-module",
4297
+ "path": "src/directives/sync/index.ts",
4298
+ "declarations": [],
4299
+ "exports": [
4300
+ {
4301
+ "kind": "js",
4302
+ "name": "*",
4303
+ "declaration": {
4304
+ "name": "*",
4305
+ "package": "./sync"
4306
+ }
4307
+ }
4308
+ ]
4309
+ },
4310
+ {
4311
+ "kind": "javascript-module",
4312
+ "path": "src/directives/sync/sync.ts",
4313
+ "declarations": [
4314
+ {
4315
+ "kind": "variable",
4316
+ "name": "defaultEventMap",
4317
+ "type": {
4318
+ "text": "Map<string, EventName>"
4319
+ },
4320
+ "default": "new Map([\n ['FAST-TEXT-AREA', 'input'],\n ['FAST-TEXT-FIELD', 'input'],\n ['FOUNDATION-TEXT-AREA', 'input'],\n ['FOUNDATION-TEXT-FIELD', 'input'],\n ['INPUT', 'input'],\n ['ZERO-TEXT-FIELD', 'input'],\n])",
4321
+ "description": "A map that associates specific HTML element tags with their corresponding default event names.",
4322
+ "privacy": "public"
4323
+ },
4324
+ {
4325
+ "kind": "function",
4326
+ "name": "sync",
4327
+ "return": {
4328
+ "type": {
4329
+ "text": "CaptureType<TSource>"
4330
+ }
4331
+ },
4332
+ "parameters": [
4333
+ {
4334
+ "name": "binding",
4335
+ "type": {
4336
+ "text": "Binding<TSource, TReturn>"
4337
+ }
4338
+ },
4339
+ {
4340
+ "name": "conversionType",
4341
+ "default": "'string'",
4342
+ "type": {
4343
+ "text": "ConversionType"
4344
+ }
4345
+ },
4346
+ {
4347
+ "name": "eventName",
4348
+ "default": "'default'",
4349
+ "type": {
4350
+ "text": "EventName"
4351
+ }
4352
+ },
4353
+ {
4354
+ "name": "keyAttr",
4355
+ "optional": true,
4356
+ "type": {
4357
+ "text": "string"
4358
+ }
4359
+ }
4360
+ ],
4361
+ "description": "Creates a synchronization directive that binds a data source to an HTML element,",
4362
+ "privacy": "public"
4363
+ }
4364
+ ],
4365
+ "exports": [
4366
+ {
4367
+ "kind": "js",
4368
+ "name": "defaultEventMap",
4369
+ "declaration": {
4370
+ "name": "defaultEventMap",
4371
+ "module": "src/directives/sync/sync.ts"
4372
+ }
4373
+ },
4374
+ {
4375
+ "kind": "js",
4376
+ "name": "sync",
4377
+ "declaration": {
4378
+ "name": "sync",
4379
+ "module": "src/directives/sync/sync.ts"
4380
+ }
4381
+ }
4382
+ ]
4383
+ },
4384
+ {
4385
+ "kind": "javascript-module",
4386
+ "path": "src/directives/when-else/index.ts",
4387
+ "declarations": [],
4388
+ "exports": [
4389
+ {
4390
+ "kind": "js",
4391
+ "name": "*",
4392
+ "declaration": {
4393
+ "name": "*",
4394
+ "package": "./when-else"
4395
+ }
4396
+ }
4397
+ ]
4398
+ },
4399
+ {
4400
+ "kind": "javascript-module",
4401
+ "path": "src/directives/when-else/when-else.ts",
4402
+ "declarations": [
4403
+ {
4404
+ "kind": "function",
4405
+ "name": "whenElse",
4406
+ "return": {
4407
+ "type": {
4408
+ "text": "CaptureType<TSource>"
4409
+ }
4410
+ },
4411
+ "parameters": [
4412
+ {
4413
+ "name": "binding",
4414
+ "type": {
4415
+ "text": "Binding<TSource, TReturn>"
4416
+ },
4417
+ "description": "The condition to test for rendering."
4418
+ },
4419
+ {
4420
+ "name": "trueTemplateOrTemplateBinding",
4421
+ "type": {
4422
+ "text": "WhenTemplate<TSource>"
4423
+ },
4424
+ "description": "The template or a binding that gets the template to render when the condition is true."
4425
+ },
4426
+ {
4427
+ "name": "falseTemplateOrTemplateBinding",
4428
+ "type": {
4429
+ "text": "WhenTemplate<TSource>"
4430
+ },
4431
+ "description": "The template or a binding that gets the template to render when the condition is false."
4432
+ }
4433
+ ],
4434
+ "description": "Directive that allows supplying an \"else\" template to the traditional https://www.fast.design/docs/api/fast-element.when/#when-function directive",
4435
+ "privacy": "public"
4436
+ }
4437
+ ],
4438
+ "exports": [
4439
+ {
4440
+ "kind": "js",
4441
+ "name": "whenElse",
4442
+ "declaration": {
4443
+ "name": "whenElse",
4444
+ "module": "src/directives/when-else/when-else.ts"
4445
+ }
4446
+ }
4447
+ ]
4448
+ },
4373
4449
  {
4374
4450
  "kind": "javascript-module",
4375
4451
  "path": "src/mappers/dto/index.ts",
@@ -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.1",
4
+ "version": "14.388.0",
5
5
  "sideEffects": false,
6
6
  "license": "SEE LICENSE IN license.txt",
7
7
  "main": "dist/esm/index.js",
@@ -27,18 +27,18 @@
27
27
  }
28
28
  },
29
29
  "devDependencies": {
30
- "@genesislcap/foundation-testing": "14.387.1",
31
- "@genesislcap/genx": "14.387.1",
32
- "@genesislcap/rollup-builder": "14.387.1",
33
- "@genesislcap/ts-builder": "14.387.1",
34
- "@genesislcap/uvu-playwright-builder": "14.387.1",
35
- "@genesislcap/vite-builder": "14.387.1",
36
- "@genesislcap/webpack-builder": "14.387.1",
30
+ "@genesislcap/foundation-testing": "14.388.0",
31
+ "@genesislcap/genx": "14.388.0",
32
+ "@genesislcap/rollup-builder": "14.388.0",
33
+ "@genesislcap/ts-builder": "14.388.0",
34
+ "@genesislcap/uvu-playwright-builder": "14.388.0",
35
+ "@genesislcap/vite-builder": "14.388.0",
36
+ "@genesislcap/webpack-builder": "14.388.0",
37
37
  "@types/json-schema": "^7.0.11"
38
38
  },
39
39
  "dependencies": {
40
- "@genesislcap/expression-builder": "14.387.1",
41
- "@genesislcap/foundation-logger": "14.387.1",
40
+ "@genesislcap/expression-builder": "14.388.0",
41
+ "@genesislcap/foundation-logger": "14.388.0",
42
42
  "@microsoft/fast-components": "2.30.6",
43
43
  "@microsoft/fast-element": "1.14.0",
44
44
  "@microsoft/fast-foundation": "2.49.6",
@@ -56,5 +56,5 @@
56
56
  "access": "public"
57
57
  },
58
58
  "customElements": "dist/custom-elements.json",
59
- "gitHead": "754f423962e6ff9eec79df7c3cab4df32bcbbeef"
59
+ "gitHead": "f89254b450f163535a403149dd4c0631641115d3"
60
60
  }