@genesislcap/foundation-utils 14.71.1-auth-mf.19 → 14.71.1-auth-mf.21

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.
@@ -341,6 +341,55 @@
341
341
  }
342
342
  ]
343
343
  },
344
+ {
345
+ "kind": "javascript-module",
346
+ "path": "src/design-system/design-system.ts",
347
+ "declarations": [
348
+ {
349
+ "kind": "function",
350
+ "name": "assureDesignSystem",
351
+ "return": {
352
+ "type": {
353
+ "text": "DesignSystemModule"
354
+ }
355
+ },
356
+ "parameters": [
357
+ {
358
+ "name": "module",
359
+ "type": {
360
+ "text": "DesignSystemModule"
361
+ }
362
+ }
363
+ ],
364
+ "privacy": "public"
365
+ }
366
+ ],
367
+ "exports": [
368
+ {
369
+ "kind": "js",
370
+ "name": "assureDesignSystem",
371
+ "declaration": {
372
+ "name": "assureDesignSystem",
373
+ "module": "src/design-system/design-system.ts"
374
+ }
375
+ }
376
+ ]
377
+ },
378
+ {
379
+ "kind": "javascript-module",
380
+ "path": "src/design-system/index.ts",
381
+ "declarations": [],
382
+ "exports": [
383
+ {
384
+ "kind": "js",
385
+ "name": "*",
386
+ "declaration": {
387
+ "name": "*",
388
+ "package": "./design-system"
389
+ }
390
+ }
391
+ ]
392
+ },
344
393
  {
345
394
  "kind": "javascript-module",
346
395
  "path": "src/decorators/index.ts",
@@ -394,55 +443,6 @@
394
443
  }
395
444
  ]
396
445
  },
397
- {
398
- "kind": "javascript-module",
399
- "path": "src/design-system/design-system.ts",
400
- "declarations": [
401
- {
402
- "kind": "function",
403
- "name": "assureDesignSystem",
404
- "return": {
405
- "type": {
406
- "text": "DesignSystemModule"
407
- }
408
- },
409
- "parameters": [
410
- {
411
- "name": "module",
412
- "type": {
413
- "text": "DesignSystemModule"
414
- }
415
- }
416
- ],
417
- "privacy": "public"
418
- }
419
- ],
420
- "exports": [
421
- {
422
- "kind": "js",
423
- "name": "assureDesignSystem",
424
- "declaration": {
425
- "name": "assureDesignSystem",
426
- "module": "src/design-system/design-system.ts"
427
- }
428
- }
429
- ]
430
- },
431
- {
432
- "kind": "javascript-module",
433
- "path": "src/design-system/index.ts",
434
- "declarations": [],
435
- "exports": [
436
- {
437
- "kind": "js",
438
- "name": "*",
439
- "declaration": {
440
- "name": "*",
441
- "package": "./design-system"
442
- }
443
- }
444
- ]
445
- },
446
446
  {
447
447
  "kind": "javascript-module",
448
448
  "path": "src/directives/index.ts",
@@ -1470,6 +1470,14 @@
1470
1470
  "name": "*",
1471
1471
  "package": "./typography"
1472
1472
  }
1473
+ },
1474
+ {
1475
+ "kind": "js",
1476
+ "name": "*",
1477
+ "declaration": {
1478
+ "name": "*",
1479
+ "package": "./toElementStyles"
1480
+ }
1473
1481
  }
1474
1482
  ]
1475
1483
  },
@@ -1544,6 +1552,42 @@
1544
1552
  }
1545
1553
  ]
1546
1554
  },
1555
+ {
1556
+ "kind": "javascript-module",
1557
+ "path": "src/styles/toElementStyles.ts",
1558
+ "declarations": [
1559
+ {
1560
+ "kind": "function",
1561
+ "name": "toElementStyles",
1562
+ "return": {
1563
+ "type": {
1564
+ "text": "ElementStyles"
1565
+ }
1566
+ },
1567
+ "parameters": [
1568
+ {
1569
+ "name": "styles",
1570
+ "type": {
1571
+ "text": "ComposableStyles | ComposableStyles[]"
1572
+ },
1573
+ "description": "ComposableStyles or a ComposableStyles array."
1574
+ }
1575
+ ],
1576
+ "description": "toElementStyles.",
1577
+ "privacy": "public"
1578
+ }
1579
+ ],
1580
+ "exports": [
1581
+ {
1582
+ "kind": "js",
1583
+ "name": "toElementStyles",
1584
+ "declaration": {
1585
+ "name": "toElementStyles",
1586
+ "module": "src/styles/toElementStyles.ts"
1587
+ }
1588
+ }
1589
+ ]
1590
+ },
1547
1591
  {
1548
1592
  "kind": "javascript-module",
1549
1593
  "path": "src/styles/typography.ts",
@@ -2,4 +2,5 @@ export * from './color';
2
2
  export * from './dom';
3
3
  export * from './slotted-styles';
4
4
  export * from './typography';
5
+ export * from './toElementStyles';
5
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/styles/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,OAAO,CAAC;AACtB,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/styles/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,OAAO,CAAC;AACtB,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { ComposableStyles, ElementStyles } from '@microsoft/fast-element';
2
+ /**
3
+ * toElementStyles.
4
+ * @remarks
5
+ * Converts {@link @microsoft/fast-element#ComposableStyles} or a ComposableStyles array to {@link @microsoft/fast-element#ElementStyles}.
6
+ * @param styles - ComposableStyles or a ComposableStyles array.
7
+ * @public
8
+ */
9
+ export declare function toElementStyles(styles: ComposableStyles | ComposableStyles[]): ElementStyles;
10
+ //# sourceMappingURL=toElementStyles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toElementStyles.d.ts","sourceRoot":"","sources":["../../../src/styles/toElementStyles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAE1E;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,gBAAgB,GAAG,gBAAgB,EAAE,GAAG,aAAa,CAW5F"}
@@ -2,3 +2,4 @@ export * from './color';
2
2
  export * from './dom';
3
3
  export * from './slotted-styles';
4
4
  export * from './typography';
5
+ export * from './toElementStyles';
@@ -0,0 +1,20 @@
1
+ import { ElementStyles } from '@microsoft/fast-element';
2
+ /**
3
+ * toElementStyles.
4
+ * @remarks
5
+ * Converts {@link @microsoft/fast-element#ComposableStyles} or a ComposableStyles array to {@link @microsoft/fast-element#ElementStyles}.
6
+ * @param styles - ComposableStyles or a ComposableStyles array.
7
+ * @public
8
+ */
9
+ export function toElementStyles(styles) {
10
+ if (!styles) {
11
+ return;
12
+ }
13
+ if (Array.isArray(styles)) {
14
+ return ElementStyles.create(styles);
15
+ }
16
+ if (styles instanceof ElementStyles) {
17
+ return styles;
18
+ }
19
+ return ElementStyles.create([styles]);
20
+ }
@@ -11656,6 +11656,66 @@
11656
11656
  ],
11657
11657
  "name": "sync"
11658
11658
  },
11659
+ {
11660
+ "kind": "Function",
11661
+ "canonicalReference": "@genesislcap/foundation-utils!toElementStyles:function(1)",
11662
+ "docComment": "/**\n * toElementStyles.\n *\n * @remarks\n *\n * Converts {@link @microsoft/fast-element#ComposableStyles} or a ComposableStyles array to {@link @microsoft/fast-element#ElementStyles}.\n *\n * @param styles - ComposableStyles or a ComposableStyles array.\n *\n * @public\n */\n",
11663
+ "excerptTokens": [
11664
+ {
11665
+ "kind": "Content",
11666
+ "text": "export declare function toElementStyles(styles: "
11667
+ },
11668
+ {
11669
+ "kind": "Reference",
11670
+ "text": "ComposableStyles",
11671
+ "canonicalReference": "@microsoft/fast-element!ComposableStyles:type"
11672
+ },
11673
+ {
11674
+ "kind": "Content",
11675
+ "text": " | "
11676
+ },
11677
+ {
11678
+ "kind": "Reference",
11679
+ "text": "ComposableStyles",
11680
+ "canonicalReference": "@microsoft/fast-element!ComposableStyles:type"
11681
+ },
11682
+ {
11683
+ "kind": "Content",
11684
+ "text": "[]"
11685
+ },
11686
+ {
11687
+ "kind": "Content",
11688
+ "text": "): "
11689
+ },
11690
+ {
11691
+ "kind": "Reference",
11692
+ "text": "ElementStyles",
11693
+ "canonicalReference": "@microsoft/fast-element!ElementStyles:class"
11694
+ },
11695
+ {
11696
+ "kind": "Content",
11697
+ "text": ";"
11698
+ }
11699
+ ],
11700
+ "fileUrlPath": "src/styles/toElementStyles.ts",
11701
+ "returnTypeTokenRange": {
11702
+ "startIndex": 6,
11703
+ "endIndex": 7
11704
+ },
11705
+ "releaseTag": "Public",
11706
+ "overloadIndex": 1,
11707
+ "parameters": [
11708
+ {
11709
+ "parameterName": "styles",
11710
+ "parameterTypeTokenRange": {
11711
+ "startIndex": 1,
11712
+ "endIndex": 5
11713
+ },
11714
+ "isOptional": false
11715
+ }
11716
+ ],
11717
+ "name": "toElementStyles"
11718
+ },
11659
11719
  {
11660
11720
  "kind": "Variable",
11661
11721
  "canonicalReference": "@genesislcap/foundation-utils!TypeRampValues:var",
@@ -1,5 +1,6 @@
1
1
  import { Binding } from '@microsoft/fast-element';
2
2
  import { CaptureType } from '@microsoft/fast-element';
3
+ import { ComposableStyles } from '@microsoft/fast-element';
3
4
  import { Consola } from 'consola';
4
5
  import { ConsolaOptions } from 'consola';
5
6
  import { Constructable } from '@microsoft/fast-element';
@@ -1536,6 +1537,15 @@ export declare type Subscribe<EventType> = (listener: Listener<EventType>) => ()
1536
1537
  */
1537
1538
  export declare function sync<TSource = any, TReturn = any>(binding: Binding<TSource, TReturn>, conversionType?: ConversionType, eventName?: EventName, keyAttr?: string): CaptureType<TSource>;
1538
1539
 
1540
+ /**
1541
+ * toElementStyles.
1542
+ * @remarks
1543
+ * Converts {@link @microsoft/fast-element#ComposableStyles} or a ComposableStyles array to {@link @microsoft/fast-element#ElementStyles}.
1544
+ * @param styles - ComposableStyles or a ComposableStyles array.
1545
+ * @public
1546
+ */
1547
+ export declare function toElementStyles(styles: ComposableStyles | ComposableStyles[]): ElementStyles;
1548
+
1539
1549
  /**
1540
1550
  * An object containing type ramp values.
1541
1551
  * @public
@@ -35,6 +35,7 @@
35
35
  | [JSONReviver(key, value)](./foundation-utils.jsonreviver.md) | JSON reviver function. |
36
36
  | [renderOnChange(target, name)](./foundation-utils.renderonchange.md) | Defines a property changed handler that calls a render() method on the target as an internal observation enhancement. |
37
37
  | [sync(binding, conversionType, eventName, keyAttr)](./foundation-utils.sync.md) | Creates a synchronization directive that binds a data source to an HTML element, |
38
+ | [toElementStyles(styles)](./foundation-utils.toelementstyles.md) | toElementStyles. |
38
39
  | [whenElse(binding, trueTemplateOrTemplateBinding, falseTemplateOrTemplateBinding)](./foundation-utils.whenelse.md) | Directive that allows supplying an "else" template to the traditional [https://www.fast.design/docs/api/fast-element.when/\#when-function](https://www.fast.design/docs/api/fast-element.when/#when-function) directive |
39
40
 
40
41
  ## Interfaces
@@ -0,0 +1,28 @@
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; [toElementStyles](./foundation-utils.toelementstyles.md)
4
+
5
+ ## toElementStyles() function
6
+
7
+ toElementStyles.
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ export declare function toElementStyles(styles: ComposableStyles | ComposableStyles[]): ElementStyles;
13
+ ```
14
+
15
+ ## Parameters
16
+
17
+ | Parameter | Type | Description |
18
+ | --- | --- | --- |
19
+ | styles | ComposableStyles \| ComposableStyles\[\] | ComposableStyles or a ComposableStyles array. |
20
+
21
+ **Returns:**
22
+
23
+ ElementStyles
24
+
25
+ ## Remarks
26
+
27
+ Converts or a ComposableStyles array to .
28
+
@@ -6,6 +6,7 @@
6
6
 
7
7
  import { Binding } from '@microsoft/fast-element';
8
8
  import { CaptureType } from '@microsoft/fast-element';
9
+ import { ComposableStyles } from '@microsoft/fast-element';
9
10
  import { Consola } from 'consola';
10
11
  import { ConsolaOptions } from 'consola';
11
12
  import { Constructable } from '@microsoft/fast-element';
@@ -1078,6 +1079,9 @@ export type Subscribe<EventType> = (listener: Listener<EventType>) => () => void
1078
1079
  // @public
1079
1080
  export function sync<TSource = any, TReturn = any>(binding: Binding<TSource, TReturn>, conversionType?: ConversionType, eventName?: EventName, keyAttr?: string): CaptureType<TSource>;
1080
1081
 
1082
+ // @public
1083
+ export function toElementStyles(styles: ComposableStyles | ComposableStyles[]): ElementStyles;
1084
+
1081
1085
  // @public
1082
1086
  export const TypeRampValues: {
1083
1087
  readonly minusOne: -1;
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.71.1-auth-mf.19",
4
+ "version": "14.71.1-auth-mf.21",
5
5
  "sideEffects": false,
6
6
  "license": "SEE LICENSE IN license.txt",
7
7
  "main": "dist/esm/index.js",
@@ -41,5 +41,5 @@
41
41
  "access": "public"
42
42
  },
43
43
  "customElements": "dist/custom-elements.json",
44
- "gitHead": "d7ad1f72865d86daa6d656075225cdae4537d5bf"
44
+ "gitHead": "58a5860a945b1f1c770ec1e6d1187faf1df2d453"
45
45
  }