@genesislcap/foundation-utils 14.496.2-alpha-438fb6e.0 → 14.496.2-alpha-da9ccbd.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.
@@ -250,59 +250,6 @@
250
250
  }
251
251
  ]
252
252
  },
253
- {
254
- "kind": "javascript-module",
255
- "path": "src/decorators/index.ts",
256
- "declarations": [],
257
- "exports": [
258
- {
259
- "kind": "js",
260
- "name": "*",
261
- "declaration": {
262
- "name": "*",
263
- "package": "./renderOnChange"
264
- }
265
- }
266
- ]
267
- },
268
- {
269
- "kind": "javascript-module",
270
- "path": "src/decorators/renderOnChange.ts",
271
- "declarations": [
272
- {
273
- "kind": "function",
274
- "name": "renderOnChange",
275
- "parameters": [
276
- {
277
- "name": "target",
278
- "type": {
279
- "text": "FASTElement & { render(): void }"
280
- },
281
- "description": "The target to define the property change handler on."
282
- },
283
- {
284
- "name": "name",
285
- "type": {
286
- "text": "string"
287
- },
288
- "description": "The property name."
289
- }
290
- ],
291
- "description": "Defines a property changed handler that calls a render() method on the target as an internal observation enhancement.",
292
- "privacy": "public"
293
- }
294
- ],
295
- "exports": [
296
- {
297
- "kind": "js",
298
- "name": "renderOnChange",
299
- "declaration": {
300
- "name": "renderOnChange",
301
- "module": "src/decorators/renderOnChange.ts"
302
- }
303
- }
304
- ]
305
- },
306
253
  {
307
254
  "kind": "javascript-module",
308
255
  "path": "src/data/inMemoryDatabase.ts",
@@ -501,6 +448,29 @@
501
448
  }
502
449
  ]
503
450
  },
451
+ {
452
+ "kind": "javascript-module",
453
+ "path": "src/directives/index.ts",
454
+ "declarations": [],
455
+ "exports": [
456
+ {
457
+ "kind": "js",
458
+ "name": "*",
459
+ "declaration": {
460
+ "name": "*",
461
+ "package": "./sync"
462
+ }
463
+ },
464
+ {
465
+ "kind": "js",
466
+ "name": "*",
467
+ "declaration": {
468
+ "name": "*",
469
+ "package": "./when-else"
470
+ }
471
+ }
472
+ ]
473
+ },
504
474
  {
505
475
  "kind": "javascript-module",
506
476
  "path": "src/design-system/design-system.ts",
@@ -703,29 +673,6 @@
703
673
  }
704
674
  ]
705
675
  },
706
- {
707
- "kind": "javascript-module",
708
- "path": "src/directives/index.ts",
709
- "declarations": [],
710
- "exports": [
711
- {
712
- "kind": "js",
713
- "name": "*",
714
- "declaration": {
715
- "name": "*",
716
- "package": "./sync"
717
- }
718
- },
719
- {
720
- "kind": "js",
721
- "name": "*",
722
- "declaration": {
723
- "name": "*",
724
- "package": "./when-else"
725
- }
726
- }
727
- ]
728
- },
729
676
  {
730
677
  "kind": "javascript-module",
731
678
  "path": "src/encoding/index.ts",
@@ -1216,6 +1163,59 @@
1216
1163
  }
1217
1164
  ]
1218
1165
  },
1166
+ {
1167
+ "kind": "javascript-module",
1168
+ "path": "src/decorators/index.ts",
1169
+ "declarations": [],
1170
+ "exports": [
1171
+ {
1172
+ "kind": "js",
1173
+ "name": "*",
1174
+ "declaration": {
1175
+ "name": "*",
1176
+ "package": "./renderOnChange"
1177
+ }
1178
+ }
1179
+ ]
1180
+ },
1181
+ {
1182
+ "kind": "javascript-module",
1183
+ "path": "src/decorators/renderOnChange.ts",
1184
+ "declarations": [
1185
+ {
1186
+ "kind": "function",
1187
+ "name": "renderOnChange",
1188
+ "parameters": [
1189
+ {
1190
+ "name": "target",
1191
+ "type": {
1192
+ "text": "FASTElement & { render(): void }"
1193
+ },
1194
+ "description": "The target to define the property change handler on."
1195
+ },
1196
+ {
1197
+ "name": "name",
1198
+ "type": {
1199
+ "text": "string"
1200
+ },
1201
+ "description": "The property name."
1202
+ }
1203
+ ],
1204
+ "description": "Defines a property changed handler that calls a render() method on the target as an internal observation enhancement.",
1205
+ "privacy": "public"
1206
+ }
1207
+ ],
1208
+ "exports": [
1209
+ {
1210
+ "kind": "js",
1211
+ "name": "renderOnChange",
1212
+ "declaration": {
1213
+ "name": "renderOnChange",
1214
+ "module": "src/decorators/renderOnChange.ts"
1215
+ }
1216
+ }
1217
+ ]
1218
+ },
1219
1219
  {
1220
1220
  "kind": "javascript-module",
1221
1221
  "path": "src/error/errorMap.ts",
@@ -71,16 +71,16 @@ export declare const LifecycleMixin: <T extends ConstructableLifecycleHandler>(B
71
71
  **/
72
72
  #_shouldForceLifecycle: boolean;
73
73
  /**
74
- * Set once a microtask has elapsed since a blocked ('reflow') disconnect. A blocked disconnect
75
- * promises the consumer "you'll reconnect imminently, don't tear anything down" - but some
76
- * consumers (e.g. a grid wrapper) don't fully trust that promise and run their own defensive
77
- * cleanup on a microtask if they're still disconnected by then, bypassing `shouldRunDisconnect`
78
- * entirely. Once that window has passed we can no longer assume nothing was torn down, so the
79
- * paired reconnect must not stay blocked either, or the consumer never gets a chance to
80
- * re-initialize what it already destroyed.
74
+ * Set once a short grace period has elapsed since a blocked ('reflow') disconnect. Some
75
+ * consumers run defensive cleanup shortly after despite the block - and don't necessarily use
76
+ * a plain microtask to do it (e.g. FAST's `DOM.queueUpdate` scheduler, which a consumer's own
77
+ * reconnect logic may also be deferred through, can resolve after our microtask has already
78
+ * fired, making a same-microtask check unreliable). A macrotask-scale grace period via
79
+ * `setTimeout` is cheap here and outlasts any such scheduler, so once it has passed the paired
80
+ * reconnect must not stay blocked, or the consumer never re-initializes.
81
81
  * @internal
82
82
  **/
83
- #_blockedDisconnectSurvivedMicrotask: boolean;
83
+ #_blockedDisconnectSurvivedGracePeriod: boolean;
84
84
  /**
85
85
  * @privateRemarks
86
86
  * Rather than using the basic implementation of cloning we run a copy constructor (deepClone)
@@ -1 +1 @@
1
- {"version":3,"file":"lifecycle.d.ts","sourceRoot":"","sources":["../../../../src/mixins/lifecycle/lifecycle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAErE;;GAEG;AACH,MAAM,MAAM,6BAA6B,GAAG,aAAa,CAAC,WAAW,GAAG,WAAW,CAAC,CAAC;AAErF;;;;GAIG;AACH,MAAM,MAAM,yBAAyB,GAAG;IACtC,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;;YASI;gDACoC,OAAO;QAM/C;;;;;WAKG;yBACuB,OAAO,GAAG,IAAI;QAUxC;;;;;;WAMG;qBACU,IAAI;QAMjB;;;WAGG;;QAmBH;;;;;WAKG;;wDAwB6C,aAAa,GAAG,OAAO;QAyCvE;;;;;;WAMG;qCAC0B,OAAO,GAAG,SAAS;6BA4B3B,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAM1B,CAAC;AAEJ;;;GAGG;AACH,eAAO,MAAM,mBAAmB,eAAkC,CAAC"}
@@ -11,7 +11,7 @@ const CLEANUP_TIMEOUT_MS = 10000;
11
11
  * #_ syntax is used for a javascript private method/variable
12
12
  * we can't use private/protected from typescript in an anonymous class like this
13
13
  */
14
- export const LifecycleMixin = (Base) => { var _instances, __container, __latestTokenCode, __hasFirstLoaded, __cleanupTimeout, __shouldForceLifecycle, __blockedDisconnectSurvivedMicrotask, __blockLifecycleDueToTokenChange, __tryFindContainingLayout, _a; return _a = class extends Base {
14
+ export const LifecycleMixin = (Base) => { var _instances, __container, __latestTokenCode, __hasFirstLoaded, __cleanupTimeout, __shouldForceLifecycle, __blockedDisconnectSurvivedGracePeriod, __blockLifecycleDueToTokenChange, __tryFindContainingLayout, _a; return _a = class extends Base {
15
15
  constructor(...args) {
16
16
  super(args);
17
17
  _instances.add(this);
@@ -43,16 +43,16 @@ export const LifecycleMixin = (Base) => { var _instances, __container, __latestT
43
43
  **/
44
44
  __shouldForceLifecycle.set(this, false);
45
45
  /**
46
- * Set once a microtask has elapsed since a blocked ('reflow') disconnect. A blocked disconnect
47
- * promises the consumer "you'll reconnect imminently, don't tear anything down" - but some
48
- * consumers (e.g. a grid wrapper) don't fully trust that promise and run their own defensive
49
- * cleanup on a microtask if they're still disconnected by then, bypassing `shouldRunDisconnect`
50
- * entirely. Once that window has passed we can no longer assume nothing was torn down, so the
51
- * paired reconnect must not stay blocked either, or the consumer never gets a chance to
52
- * re-initialize what it already destroyed.
46
+ * Set once a short grace period has elapsed since a blocked ('reflow') disconnect. Some
47
+ * consumers run defensive cleanup shortly after despite the block - and don't necessarily use
48
+ * a plain microtask to do it (e.g. FAST's `DOM.queueUpdate` scheduler, which a consumer's own
49
+ * reconnect logic may also be deferred through, can resolve after our microtask has already
50
+ * fired, making a same-microtask check unreliable). A macrotask-scale grace period via
51
+ * `setTimeout` is cheap here and outlasts any such scheduler, so once it has passed the paired
52
+ * reconnect must not stay blocked, or the consumer never re-initializes.
53
53
  * @internal
54
54
  **/
55
- __blockedDisconnectSurvivedMicrotask.set(this, false);
55
+ __blockedDisconnectSurvivedGracePeriod.set(this, false);
56
56
  }
57
57
  /**
58
58
  * @privateRemarks
@@ -138,7 +138,7 @@ export const LifecycleMixin = (Base) => { var _instances, __container, __latestT
138
138
  __hasFirstLoaded = new WeakMap(),
139
139
  __cleanupTimeout = new WeakMap(),
140
140
  __shouldForceLifecycle = new WeakMap(),
141
- __blockedDisconnectSurvivedMicrotask = new WeakMap(),
141
+ __blockedDisconnectSurvivedGracePeriod = new WeakMap(),
142
142
  _instances = new WeakSet(),
143
143
  __blockLifecycleDueToTokenChange = function __blockLifecycleDueToTokenChange(lifecycleType) {
144
144
  var _b, _c;
@@ -159,12 +159,12 @@ export const LifecycleMixin = (Base) => { var _instances, __container, __latestT
159
159
  __classPrivateFieldSet(this, __hasFirstLoaded, false, "f");
160
160
  }
161
161
  else {
162
- // Blocked disconnect: track whether a microtask elapses before the paired reconnect
163
- // arrives. See `#_blockedDisconnectSurvivedMicrotask` for why this matters.
164
- __classPrivateFieldSet(this, __blockedDisconnectSurvivedMicrotask, false, "f");
165
- queueMicrotask(() => {
166
- __classPrivateFieldSet(this, __blockedDisconnectSurvivedMicrotask, true, "f");
167
- });
162
+ // Blocked disconnect: track whether a grace period elapses before the paired reconnect
163
+ // arrives. See `#_blockedDisconnectSurvivedGracePeriod` for why this matters.
164
+ __classPrivateFieldSet(this, __blockedDisconnectSurvivedGracePeriod, false, "f");
165
+ setTimeout(() => {
166
+ __classPrivateFieldSet(this, __blockedDisconnectSurvivedGracePeriod, true, "f");
167
+ }, 0);
168
168
  }
169
169
  __classPrivateFieldSet(this, __cleanupTimeout, setTimeout(() => {
170
170
  __classPrivateFieldSet(this, __shouldForceLifecycle, result, "f");
@@ -174,7 +174,7 @@ export const LifecycleMixin = (Base) => { var _instances, __container, __latestT
174
174
  }, CLEANUP_TIMEOUT_MS), "f");
175
175
  }
176
176
  else if (lifecycleType === 'reconnect') {
177
- result = tokensDifferent && !__classPrivateFieldGet(this, __blockedDisconnectSurvivedMicrotask, "f");
177
+ result = tokensDifferent && !__classPrivateFieldGet(this, __blockedDisconnectSurvivedGracePeriod, "f");
178
178
  __classPrivateFieldSet(this, __latestTokenCode, (_c = __classPrivateFieldGet(this, __container, "f").lifecycleUpdateToken) !== null && _c !== void 0 ? _c : '', "f");
179
179
  clearTimeout(__classPrivateFieldGet(this, __cleanupTimeout, "f"));
180
180
  }
@@ -9094,7 +9094,7 @@
9094
9094
  },
9095
9095
  {
9096
9096
  "kind": "Content",
9097
- "text": ";\n #_shouldForceLifecycle: boolean;\n #_blockedDisconnectSurvivedMicrotask: boolean;\n cloneNode(deep?: boolean): "
9097
+ "text": ";\n #_shouldForceLifecycle: boolean;\n #_blockedDisconnectSurvivedGracePeriod: boolean;\n cloneNode(deep?: boolean): "
9098
9098
  },
9099
9099
  {
9100
9100
  "kind": "Reference",
@@ -1019,16 +1019,16 @@ export declare const LifecycleMixin: <T extends ConstructableLifecycleHandler>(B
1019
1019
  **/
1020
1020
  #_shouldForceLifecycle: boolean;
1021
1021
  /**
1022
- * Set once a microtask has elapsed since a blocked ('reflow') disconnect. A blocked disconnect
1023
- * promises the consumer "you'll reconnect imminently, don't tear anything down" - but some
1024
- * consumers (e.g. a grid wrapper) don't fully trust that promise and run their own defensive
1025
- * cleanup on a microtask if they're still disconnected by then, bypassing `shouldRunDisconnect`
1026
- * entirely. Once that window has passed we can no longer assume nothing was torn down, so the
1027
- * paired reconnect must not stay blocked either, or the consumer never gets a chance to
1028
- * re-initialize what it already destroyed.
1022
+ * Set once a short grace period has elapsed since a blocked ('reflow') disconnect. Some
1023
+ * consumers run defensive cleanup shortly after despite the block - and don't necessarily use
1024
+ * a plain microtask to do it (e.g. FAST's `DOM.queueUpdate` scheduler, which a consumer's own
1025
+ * reconnect logic may also be deferred through, can resolve after our microtask has already
1026
+ * fired, making a same-microtask check unreliable). A macrotask-scale grace period via
1027
+ * `setTimeout` is cheap here and outlasts any such scheduler, so once it has passed the paired
1028
+ * reconnect must not stay blocked, or the consumer never re-initializes.
1029
1029
  * @internal
1030
1030
  **/
1031
- #_blockedDisconnectSurvivedMicrotask: boolean;
1031
+ #_blockedDisconnectSurvivedGracePeriod: boolean;
1032
1032
  /**
1033
1033
  * @privateRemarks
1034
1034
  * Rather than using the basic implementation of cloning we run a copy constructor (deepClone)
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.496.2-alpha-438fb6e.0",
4
+ "version": "14.496.2-alpha-da9ccbd.0",
5
5
  "sideEffects": false,
6
6
  "license": "SEE LICENSE IN license.txt",
7
7
  "main": "dist/esm/index.js",
@@ -29,18 +29,18 @@
29
29
  }
30
30
  },
31
31
  "devDependencies": {
32
- "@genesislcap/foundation-testing": "14.496.2-alpha-438fb6e.0",
33
- "@genesislcap/genx": "14.496.2-alpha-438fb6e.0",
34
- "@genesislcap/rollup-builder": "14.496.2-alpha-438fb6e.0",
35
- "@genesislcap/ts-builder": "14.496.2-alpha-438fb6e.0",
36
- "@genesislcap/uvu-playwright-builder": "14.496.2-alpha-438fb6e.0",
37
- "@genesislcap/vite-builder": "14.496.2-alpha-438fb6e.0",
38
- "@genesislcap/webpack-builder": "14.496.2-alpha-438fb6e.0",
32
+ "@genesislcap/foundation-testing": "14.496.2-alpha-da9ccbd.0",
33
+ "@genesislcap/genx": "14.496.2-alpha-da9ccbd.0",
34
+ "@genesislcap/rollup-builder": "14.496.2-alpha-da9ccbd.0",
35
+ "@genesislcap/ts-builder": "14.496.2-alpha-da9ccbd.0",
36
+ "@genesislcap/uvu-playwright-builder": "14.496.2-alpha-da9ccbd.0",
37
+ "@genesislcap/vite-builder": "14.496.2-alpha-da9ccbd.0",
38
+ "@genesislcap/webpack-builder": "14.496.2-alpha-da9ccbd.0",
39
39
  "@types/json-schema": "^7.0.11"
40
40
  },
41
41
  "dependencies": {
42
- "@genesislcap/expression-builder": "14.496.2-alpha-438fb6e.0",
43
- "@genesislcap/foundation-logger": "14.496.2-alpha-438fb6e.0",
42
+ "@genesislcap/expression-builder": "14.496.2-alpha-da9ccbd.0",
43
+ "@genesislcap/foundation-logger": "14.496.2-alpha-da9ccbd.0",
44
44
  "@microsoft/fast-components": "2.30.6",
45
45
  "@microsoft/fast-element": "1.14.0",
46
46
  "@microsoft/fast-foundation": "2.50.0",
@@ -58,5 +58,5 @@
58
58
  "access": "public"
59
59
  },
60
60
  "customElements": "dist/custom-elements.json",
61
- "gitHead": "6dc7bbda02ba69207921891ffbd1f39b582ac780"
61
+ "gitHead": "daac29f621ee844cc6e269c0b8bd52c56bff8cf0"
62
62
  }