@genesislcap/foundation-utils 14.333.0 → 14.333.1-alpha-9833070.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.
@@ -185,6 +185,29 @@
|
|
185
185
|
}
|
186
186
|
]
|
187
187
|
},
|
188
|
+
{
|
189
|
+
"kind": "javascript-module",
|
190
|
+
"path": "src/directives/index.ts",
|
191
|
+
"declarations": [],
|
192
|
+
"exports": [
|
193
|
+
{
|
194
|
+
"kind": "js",
|
195
|
+
"name": "*",
|
196
|
+
"declaration": {
|
197
|
+
"name": "*",
|
198
|
+
"package": "./sync"
|
199
|
+
}
|
200
|
+
},
|
201
|
+
{
|
202
|
+
"kind": "js",
|
203
|
+
"name": "*",
|
204
|
+
"declaration": {
|
205
|
+
"name": "*",
|
206
|
+
"package": "./when-else"
|
207
|
+
}
|
208
|
+
}
|
209
|
+
]
|
210
|
+
},
|
188
211
|
{
|
189
212
|
"kind": "javascript-module",
|
190
213
|
"path": "src/data/inMemoryDatabase.ts",
|
@@ -383,82 +406,6 @@
|
|
383
406
|
}
|
384
407
|
]
|
385
408
|
},
|
386
|
-
{
|
387
|
-
"kind": "javascript-module",
|
388
|
-
"path": "src/decorators/index.ts",
|
389
|
-
"declarations": [],
|
390
|
-
"exports": [
|
391
|
-
{
|
392
|
-
"kind": "js",
|
393
|
-
"name": "*",
|
394
|
-
"declaration": {
|
395
|
-
"name": "*",
|
396
|
-
"package": "./renderOnChange"
|
397
|
-
}
|
398
|
-
}
|
399
|
-
]
|
400
|
-
},
|
401
|
-
{
|
402
|
-
"kind": "javascript-module",
|
403
|
-
"path": "src/decorators/renderOnChange.ts",
|
404
|
-
"declarations": [
|
405
|
-
{
|
406
|
-
"kind": "function",
|
407
|
-
"name": "renderOnChange",
|
408
|
-
"parameters": [
|
409
|
-
{
|
410
|
-
"name": "target",
|
411
|
-
"type": {
|
412
|
-
"text": "FASTElement & { render(): void }"
|
413
|
-
},
|
414
|
-
"description": "The target to define the property change handler on."
|
415
|
-
},
|
416
|
-
{
|
417
|
-
"name": "name",
|
418
|
-
"type": {
|
419
|
-
"text": "string"
|
420
|
-
},
|
421
|
-
"description": "The property name."
|
422
|
-
}
|
423
|
-
],
|
424
|
-
"description": "Defines a property changed handler that calls a render() method on the target as an internal observation enhancement.",
|
425
|
-
"privacy": "public"
|
426
|
-
}
|
427
|
-
],
|
428
|
-
"exports": [
|
429
|
-
{
|
430
|
-
"kind": "js",
|
431
|
-
"name": "renderOnChange",
|
432
|
-
"declaration": {
|
433
|
-
"name": "renderOnChange",
|
434
|
-
"module": "src/decorators/renderOnChange.ts"
|
435
|
-
}
|
436
|
-
}
|
437
|
-
]
|
438
|
-
},
|
439
|
-
{
|
440
|
-
"kind": "javascript-module",
|
441
|
-
"path": "src/directives/index.ts",
|
442
|
-
"declarations": [],
|
443
|
-
"exports": [
|
444
|
-
{
|
445
|
-
"kind": "js",
|
446
|
-
"name": "*",
|
447
|
-
"declaration": {
|
448
|
-
"name": "*",
|
449
|
-
"package": "./sync"
|
450
|
-
}
|
451
|
-
},
|
452
|
-
{
|
453
|
-
"kind": "js",
|
454
|
-
"name": "*",
|
455
|
-
"declaration": {
|
456
|
-
"name": "*",
|
457
|
-
"package": "./when-else"
|
458
|
-
}
|
459
|
-
}
|
460
|
-
]
|
461
|
-
},
|
462
409
|
{
|
463
410
|
"kind": "javascript-module",
|
464
411
|
"path": "src/encoding/index.ts",
|
@@ -1268,6 +1215,59 @@
|
|
1268
1215
|
}
|
1269
1216
|
]
|
1270
1217
|
},
|
1218
|
+
{
|
1219
|
+
"kind": "javascript-module",
|
1220
|
+
"path": "src/decorators/index.ts",
|
1221
|
+
"declarations": [],
|
1222
|
+
"exports": [
|
1223
|
+
{
|
1224
|
+
"kind": "js",
|
1225
|
+
"name": "*",
|
1226
|
+
"declaration": {
|
1227
|
+
"name": "*",
|
1228
|
+
"package": "./renderOnChange"
|
1229
|
+
}
|
1230
|
+
}
|
1231
|
+
]
|
1232
|
+
},
|
1233
|
+
{
|
1234
|
+
"kind": "javascript-module",
|
1235
|
+
"path": "src/decorators/renderOnChange.ts",
|
1236
|
+
"declarations": [
|
1237
|
+
{
|
1238
|
+
"kind": "function",
|
1239
|
+
"name": "renderOnChange",
|
1240
|
+
"parameters": [
|
1241
|
+
{
|
1242
|
+
"name": "target",
|
1243
|
+
"type": {
|
1244
|
+
"text": "FASTElement & { render(): void }"
|
1245
|
+
},
|
1246
|
+
"description": "The target to define the property change handler on."
|
1247
|
+
},
|
1248
|
+
{
|
1249
|
+
"name": "name",
|
1250
|
+
"type": {
|
1251
|
+
"text": "string"
|
1252
|
+
},
|
1253
|
+
"description": "The property name."
|
1254
|
+
}
|
1255
|
+
],
|
1256
|
+
"description": "Defines a property changed handler that calls a render() method on the target as an internal observation enhancement.",
|
1257
|
+
"privacy": "public"
|
1258
|
+
}
|
1259
|
+
],
|
1260
|
+
"exports": [
|
1261
|
+
{
|
1262
|
+
"kind": "js",
|
1263
|
+
"name": "renderOnChange",
|
1264
|
+
"declaration": {
|
1265
|
+
"name": "renderOnChange",
|
1266
|
+
"module": "src/decorators/renderOnChange.ts"
|
1267
|
+
}
|
1268
|
+
}
|
1269
|
+
]
|
1270
|
+
},
|
1271
1271
|
{
|
1272
1272
|
"kind": "javascript-module",
|
1273
1273
|
"path": "src/formatters/datetime.ts",
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"design-system.d.ts","sourceRoot":"","sources":["../../../src/design-system/design-system.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAG1D;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IACjC,mBAAmB,CACjB,OAAO,CAAC,EAAE,WAAW,EACrB,MAAM,CAAC,EAAE,MAAM,GACd,YAAY,GAAG,IAAI,CAAC,YAAY,EAAE,UAAU,CAAC,CAAC;IACjD,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;AAED;;;GAGG;AACH,M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E,WAAW,EAAE,cAAc,EAAE,MAAM,GAAG,MAAM,CAEjG"}
|
@@ -62,7 +62,6 @@ export function assureDesignSystem(module) {
|
|
62
62
|
* @public
|
63
63
|
*/
|
64
64
|
export function getCurrentDesignSystem(element, fallbackPrefix) {
|
65
|
-
// First try: Check element and its ancestors
|
66
65
|
let current = element;
|
67
66
|
while (current) {
|
68
67
|
const tagName = current.tagName.toLowerCase();
|
@@ -73,7 +72,6 @@ export function getCurrentDesignSystem(element, fallbackPrefix) {
|
|
73
72
|
return { element: current, prefix };
|
74
73
|
}
|
75
74
|
}
|
76
|
-
// Move up the DOM tree, handling shadow DOM boundaries
|
77
75
|
if (current.parentElement) {
|
78
76
|
current = current.parentElement;
|
79
77
|
}
|
@@ -84,10 +82,8 @@ export function getCurrentDesignSystem(element, fallbackPrefix) {
|
|
84
82
|
current = null;
|
85
83
|
}
|
86
84
|
}
|
87
|
-
// Second try: Document-wide search
|
88
85
|
const allProviders = document.querySelectorAll('[class*="-design-system-provider"],[id*="-design-system-provider"]');
|
89
86
|
const providerElements = Array.from(allProviders);
|
90
|
-
// Add shadow DOM providers
|
91
87
|
const shadowProviders = getAllElements(document).filter((el) => {
|
92
88
|
var _a;
|
93
89
|
const tagName = (_a = el.tagName) === null || _a === void 0 ? void 0 : _a.toLowerCase();
|
@@ -95,6 +91,17 @@ export function getCurrentDesignSystem(element, fallbackPrefix) {
|
|
95
91
|
});
|
96
92
|
providerElements.push(...shadowProviders);
|
97
93
|
if (providerElements.length > 0) {
|
94
|
+
const preferredProvider = providerElements.find((provider) => {
|
95
|
+
const providerTag = provider.tagName.toLowerCase();
|
96
|
+
const prefix = providerTag.split('-design-system-provider')[0];
|
97
|
+
return prefix === fallbackPrefix;
|
98
|
+
});
|
99
|
+
if (preferredProvider && preferredProvider.tagName) {
|
100
|
+
const providerTag = preferredProvider.tagName.toLowerCase();
|
101
|
+
const prefix = providerTag.split('-design-system-provider')[0];
|
102
|
+
logger.debug(`Found preferred provider: ${providerTag}, prefix: ${prefix}`);
|
103
|
+
return { element: preferredProvider, prefix };
|
104
|
+
}
|
98
105
|
const provider = providerElements[0];
|
99
106
|
const providerTag = provider.tagName.toLowerCase();
|
100
107
|
const prefix = providerTag.split('-design-system-provider')[0];
|
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.333.0",
|
4
|
+
"version": "14.333.1-alpha-9833070.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.333.0",
|
31
|
-
"@genesislcap/genx": "14.333.0",
|
32
|
-
"@genesislcap/rollup-builder": "14.333.0",
|
33
|
-
"@genesislcap/ts-builder": "14.333.0",
|
34
|
-
"@genesislcap/uvu-playwright-builder": "14.333.0",
|
35
|
-
"@genesislcap/vite-builder": "14.333.0",
|
36
|
-
"@genesislcap/webpack-builder": "14.333.0",
|
30
|
+
"@genesislcap/foundation-testing": "14.333.1-alpha-9833070.0",
|
31
|
+
"@genesislcap/genx": "14.333.1-alpha-9833070.0",
|
32
|
+
"@genesislcap/rollup-builder": "14.333.1-alpha-9833070.0",
|
33
|
+
"@genesislcap/ts-builder": "14.333.1-alpha-9833070.0",
|
34
|
+
"@genesislcap/uvu-playwright-builder": "14.333.1-alpha-9833070.0",
|
35
|
+
"@genesislcap/vite-builder": "14.333.1-alpha-9833070.0",
|
36
|
+
"@genesislcap/webpack-builder": "14.333.1-alpha-9833070.0",
|
37
37
|
"@types/json-schema": "^7.0.11"
|
38
38
|
},
|
39
39
|
"dependencies": {
|
40
|
-
"@genesislcap/expression-builder": "14.333.0",
|
41
|
-
"@genesislcap/foundation-logger": "14.333.0",
|
40
|
+
"@genesislcap/expression-builder": "14.333.1-alpha-9833070.0",
|
41
|
+
"@genesislcap/foundation-logger": "14.333.1-alpha-9833070.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": "
|
59
|
+
"gitHead": "959d9463a5616874018520a020d5ee95955ddffd"
|
60
60
|
}
|