@genesislcap/foundation-utils 14.387.1-alpha-b46a98f.0 → 14.387.1-alpha-8fa3775.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.
@@ -391,97 +391,6 @@
391
391
  }
392
392
  ]
393
393
  },
394
- {
395
- "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",
412
- "declarations": [
413
- {
414
- "kind": "function",
415
- "name": "renderOnChange",
416
- "parameters": [
417
- {
418
- "name": "target",
419
- "type": {
420
- "text": "FASTElement & { render(): void }"
421
- },
422
- "description": "The target to define the property change handler on."
423
- },
424
- {
425
- "name": "name",
426
- "type": {
427
- "text": "string"
428
- },
429
- "description": "The property name."
430
- }
431
- ],
432
- "description": "Defines a property changed handler that calls a render() method on the target as an internal observation enhancement.",
433
- "privacy": "public"
434
- }
435
- ],
436
- "exports": [
437
- {
438
- "kind": "js",
439
- "name": "renderOnChange",
440
- "declaration": {
441
- "name": "renderOnChange",
442
- "module": "src/decorators/renderOnChange.ts"
443
- }
444
- }
445
- ]
446
- },
447
- {
448
- "kind": "javascript-module",
449
- "path": "src/directives/index.ts",
450
- "declarations": [],
451
- "exports": [
452
- {
453
- "kind": "js",
454
- "name": "*",
455
- "declaration": {
456
- "name": "*",
457
- "package": "./sync"
458
- }
459
- },
460
- {
461
- "kind": "js",
462
- "name": "*",
463
- "declaration": {
464
- "name": "*",
465
- "package": "./when-else"
466
- }
467
- }
468
- ]
469
- },
470
- {
471
- "kind": "javascript-module",
472
- "path": "src/encoding/index.ts",
473
- "declarations": [],
474
- "exports": [
475
- {
476
- "kind": "js",
477
- "name": "*",
478
- "declaration": {
479
- "name": "*",
480
- "package": "./base64"
481
- }
482
- }
483
- ]
484
- },
485
394
  {
486
395
  "kind": "javascript-module",
487
396
  "path": "src/design-system/design-system.ts",
@@ -602,6 +511,82 @@
602
511
  }
603
512
  ]
604
513
  },
514
+ {
515
+ "kind": "javascript-module",
516
+ "path": "src/decorators/index.ts",
517
+ "declarations": [],
518
+ "exports": [
519
+ {
520
+ "kind": "js",
521
+ "name": "*",
522
+ "declaration": {
523
+ "name": "*",
524
+ "package": "./renderOnChange"
525
+ }
526
+ }
527
+ ]
528
+ },
529
+ {
530
+ "kind": "javascript-module",
531
+ "path": "src/decorators/renderOnChange.ts",
532
+ "declarations": [
533
+ {
534
+ "kind": "function",
535
+ "name": "renderOnChange",
536
+ "parameters": [
537
+ {
538
+ "name": "target",
539
+ "type": {
540
+ "text": "FASTElement & { render(): void }"
541
+ },
542
+ "description": "The target to define the property change handler on."
543
+ },
544
+ {
545
+ "name": "name",
546
+ "type": {
547
+ "text": "string"
548
+ },
549
+ "description": "The property name."
550
+ }
551
+ ],
552
+ "description": "Defines a property changed handler that calls a render() method on the target as an internal observation enhancement.",
553
+ "privacy": "public"
554
+ }
555
+ ],
556
+ "exports": [
557
+ {
558
+ "kind": "js",
559
+ "name": "renderOnChange",
560
+ "declaration": {
561
+ "name": "renderOnChange",
562
+ "module": "src/decorators/renderOnChange.ts"
563
+ }
564
+ }
565
+ ]
566
+ },
567
+ {
568
+ "kind": "javascript-module",
569
+ "path": "src/directives/index.ts",
570
+ "declarations": [],
571
+ "exports": [
572
+ {
573
+ "kind": "js",
574
+ "name": "*",
575
+ "declaration": {
576
+ "name": "*",
577
+ "package": "./sync"
578
+ }
579
+ },
580
+ {
581
+ "kind": "js",
582
+ "name": "*",
583
+ "declaration": {
584
+ "name": "*",
585
+ "package": "./when-else"
586
+ }
587
+ }
588
+ ]
589
+ },
605
590
  {
606
591
  "kind": "javascript-module",
607
592
  "path": "src/env/index.ts",
@@ -1276,6 +1261,21 @@
1276
1261
  }
1277
1262
  ]
1278
1263
  },
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",
@@ -3824,14 +3824,14 @@
3824
3824
  },
3825
3825
  "parameters": [
3826
3826
  {
3827
- "name": "callback",
3827
+ "name": "classes",
3828
3828
  "type": {
3829
- "text": "() => void"
3829
+ "text": "unknown[]"
3830
3830
  },
3831
- "description": "A function containing code that should not be tree-shaken."
3831
+ "description": "One or more custom element classes that should not be tree-shaken."
3832
3832
  }
3833
3833
  ],
3834
- "description": "Explicitly prevents tree-shaking of code by wrapping it in a function call.\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 wrapping these references in an `avoidTreeShaking` call, we create a side effect\nthat signals to the bundler to preserve the code.",
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
3835
  "privacy": "public"
3836
3836
  }
3837
3837
  ],
@@ -9,15 +9,15 @@
9
9
  */
10
10
  export declare const noop: (fn?: () => void) => void;
11
11
  /**
12
- * Explicitly prevents tree-shaking of code by wrapping it in a function call.
12
+ * Explicitly prevents tree-shaking of custom element classes by referencing them.
13
13
  *
14
14
  * Bundlers may incorrectly remove code that it thinks has no side effects,
15
15
  * such as custom element definitions that are only referenced in templates.
16
- * By wrapping these references in an `avoidTreeShaking` call, we create a side effect
16
+ * By passing these classes to `avoidTreeShaking`, we create a side effect
17
17
  * that signals to the bundler to preserve the code.
18
18
  *
19
- * @param callback - A function containing code that should not be tree-shaken.
19
+ * @param classes - One or more custom element classes that should not be tree-shaken.
20
20
  * @public
21
21
  */
22
- export declare const avoidTreeShaking: (callback: () => void) => void;
22
+ export declare const avoidTreeShaking: (...classes: unknown[]) => void;
23
23
  //# sourceMappingURL=noop.d.ts.map
@@ -1 +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,UAAU,MAAM,IAAI,KAAG,IAEvD,CAAC"}
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"}
@@ -11,16 +11,21 @@ export const noop = (fn) => {
11
11
  fn === null || fn === void 0 ? void 0 : fn();
12
12
  };
13
13
  /**
14
- * Explicitly prevents tree-shaking of code by wrapping it in a function call.
14
+ * Explicitly prevents tree-shaking of custom element classes by referencing them.
15
15
  *
16
16
  * Bundlers may incorrectly remove code that it thinks has no side effects,
17
17
  * such as custom element definitions that are only referenced in templates.
18
- * By wrapping these references in an `avoidTreeShaking` call, we create a side effect
18
+ * By passing these classes to `avoidTreeShaking`, we create a side effect
19
19
  * that signals to the bundler to preserve the code.
20
20
  *
21
- * @param callback - A function containing code that should not be tree-shaken.
21
+ * @param classes - One or more custom element classes that should not be tree-shaken.
22
22
  * @public
23
23
  */
24
- export const avoidTreeShaking = (callback) => {
25
- noop(callback);
24
+ export const avoidTreeShaking = (...classes) => {
25
+ noop(() => {
26
+ // Reference each class to prevent tree-shaking
27
+ classes.forEach((cls) => {
28
+ void cls;
29
+ });
30
+ });
26
31
  };
@@ -300,15 +300,15 @@
300
300
  {
301
301
  "kind": "Function",
302
302
  "canonicalReference": "@genesislcap/foundation-utils!avoidTreeShaking:function(1)",
303
- "docComment": "/**\n * Explicitly prevents tree-shaking of code by wrapping it in a function call.\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 wrapping these references in an `avoidTreeShaking` call, we create a side effect that signals to the bundler to preserve the code.\n *\n * @param callback - A function containing code that should not be tree-shaken.\n *\n * @public\n */\n",
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
304
  "excerptTokens": [
305
305
  {
306
306
  "kind": "Content",
307
- "text": "avoidTreeShaking: (callback: "
307
+ "text": "avoidTreeShaking: (...classes: "
308
308
  },
309
309
  {
310
310
  "kind": "Content",
311
- "text": "() => void"
311
+ "text": "unknown[]"
312
312
  },
313
313
  {
314
314
  "kind": "Content",
@@ -328,7 +328,7 @@
328
328
  "overloadIndex": 1,
329
329
  "parameters": [
330
330
  {
331
- "parameterName": "callback",
331
+ "parameterName": "classes",
332
332
  "parameterTypeTokenRange": {
333
333
  "startIndex": 1,
334
334
  "endIndex": 2
@@ -78,17 +78,17 @@ export declare let API_HOST: string;
78
78
  export declare function assureDesignSystem(module: DesignSystemModule): DesignSystemModule;
79
79
 
80
80
  /**
81
- * Explicitly prevents tree-shaking of code by wrapping it in a function call.
81
+ * Explicitly prevents tree-shaking of custom element classes by referencing them.
82
82
  *
83
83
  * Bundlers may incorrectly remove code that it thinks has no side effects,
84
84
  * such as custom element definitions that are only referenced in templates.
85
- * By wrapping these references in an `avoidTreeShaking` call, we create a side effect
85
+ * By passing these classes to `avoidTreeShaking`, we create a side effect
86
86
  * that signals to the bundler to preserve the code.
87
87
  *
88
- * @param callback - A function containing code that should not be tree-shaken.
88
+ * @param classes - One or more custom element classes that should not be tree-shaken.
89
89
  * @public
90
90
  */
91
- export declare const avoidTreeShaking: (callback: () => void) => void;
91
+ export declare const avoidTreeShaking: (...classes: unknown[]) => void;
92
92
 
93
93
  /**
94
94
  * @internal
@@ -4,14 +4,14 @@
4
4
 
5
5
  ## avoidTreeShaking() function
6
6
 
7
- Explicitly prevents tree-shaking of code by wrapping it in a function call.
7
+ Explicitly prevents tree-shaking of custom element classes by referencing them.
8
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 wrapping these references in an `avoidTreeShaking` call, we create a side effect that signals to the bundler to preserve the code.
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
10
 
11
11
  **Signature:**
12
12
 
13
13
  ```typescript
14
- avoidTreeShaking: (callback: () => void) => void
14
+ avoidTreeShaking: (...classes: unknown[]) => void
15
15
  ```
16
16
 
17
17
  ## Parameters
@@ -34,17 +34,17 @@ Description
34
34
  </th></tr></thead>
35
35
  <tbody><tr><td>
36
36
 
37
- callback
37
+ classes
38
38
 
39
39
 
40
40
  </td><td>
41
41
 
42
- () =&gt; void
42
+ unknown\[\]
43
43
 
44
44
 
45
45
  </td><td>
46
46
 
47
- A function containing code that should not be tree-shaken.
47
+ One or more custom element classes that should not be tree-shaken.
48
48
 
49
49
 
50
50
  </td></tr>
@@ -195,14 +195,14 @@ assureDesignSystem.
195
195
  </td></tr>
196
196
  <tr><td>
197
197
 
198
- [avoidTreeShaking(callback)](./foundation-utils.avoidtreeshaking.md)
198
+ [avoidTreeShaking(classes)](./foundation-utils.avoidtreeshaking.md)
199
199
 
200
200
 
201
201
  </td><td>
202
202
 
203
- Explicitly prevents tree-shaking of code by wrapping it in a function call.
203
+ Explicitly prevents tree-shaking of custom element classes by referencing them.
204
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 wrapping these references in an `avoidTreeShaking` call, we create a side effect that signals to the bundler to preserve the code.
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
206
 
207
207
 
208
208
  </td></tr>
@@ -36,7 +36,7 @@ export let API_HOST: string;
36
36
  export function assureDesignSystem(module: DesignSystemModule): DesignSystemModule;
37
37
 
38
38
  // @public
39
- export const avoidTreeShaking: (callback: () => void) => void;
39
+ export const avoidTreeShaking: (...classes: unknown[]) => void;
40
40
 
41
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
42
42
  //
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-alpha-b46a98f.0",
4
+ "version": "14.387.1-alpha-8fa3775.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-alpha-b46a98f.0",
31
- "@genesislcap/genx": "14.387.1-alpha-b46a98f.0",
32
- "@genesislcap/rollup-builder": "14.387.1-alpha-b46a98f.0",
33
- "@genesislcap/ts-builder": "14.387.1-alpha-b46a98f.0",
34
- "@genesislcap/uvu-playwright-builder": "14.387.1-alpha-b46a98f.0",
35
- "@genesislcap/vite-builder": "14.387.1-alpha-b46a98f.0",
36
- "@genesislcap/webpack-builder": "14.387.1-alpha-b46a98f.0",
30
+ "@genesislcap/foundation-testing": "14.387.1-alpha-8fa3775.0",
31
+ "@genesislcap/genx": "14.387.1-alpha-8fa3775.0",
32
+ "@genesislcap/rollup-builder": "14.387.1-alpha-8fa3775.0",
33
+ "@genesislcap/ts-builder": "14.387.1-alpha-8fa3775.0",
34
+ "@genesislcap/uvu-playwright-builder": "14.387.1-alpha-8fa3775.0",
35
+ "@genesislcap/vite-builder": "14.387.1-alpha-8fa3775.0",
36
+ "@genesislcap/webpack-builder": "14.387.1-alpha-8fa3775.0",
37
37
  "@types/json-schema": "^7.0.11"
38
38
  },
39
39
  "dependencies": {
40
- "@genesislcap/expression-builder": "14.387.1-alpha-b46a98f.0",
41
- "@genesislcap/foundation-logger": "14.387.1-alpha-b46a98f.0",
40
+ "@genesislcap/expression-builder": "14.387.1-alpha-8fa3775.0",
41
+ "@genesislcap/foundation-logger": "14.387.1-alpha-8fa3775.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": "848ef141b421a6d0a0ac9f1af813493c101d24ba"
59
+ "gitHead": "307a3526456233d9c9d1a4c034701b5e45233bb2"
60
60
  }