@xh/hoist 73.0.0-SNAPSHOT.1746798376611 → 73.0.0-SNAPSHOT.1746798986724

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.
package/CHANGELOG.md CHANGED
@@ -36,7 +36,6 @@
36
36
  * Fixed drag-and-drop usability issues with the mobile `ColChooser`.
37
37
  * Made `GridModel.defaultGroupSortFn` null-safe and improved type signature.
38
38
  * Disable `dashCanvasAddViewButton` if there are no `menuItems` to show.
39
- * Fixed `@persist` decorator.
40
39
 
41
40
  ### ⚙️ Typescript API Adjustments
42
41
 
@@ -4,8 +4,6 @@
4
4
  *
5
5
  * Copyright © 2025 Extremely Heavy Industries Inc.
6
6
  */
7
- import {wait} from '@xh/hoist/promise';
8
- import {observable} from 'mobx';
9
7
  import {logError, throwIf} from '../utils/js';
10
8
  import {HoistBaseClass, PersistableState, PersistenceProvider, PersistOptions} from './';
11
9
 
@@ -73,9 +71,7 @@ function createPersistDescriptor(
73
71
  );
74
72
  return descriptor;
75
73
  }
76
- const codeValue = descriptor.initializer,
77
- // True once the property is available on the instance (after other decorators have run).
78
- propertyAvailable = observable.box(false);
74
+ const codeValue = descriptor.initializer;
79
75
  let hasInitialized = false,
80
76
  ret;
81
77
  const initializer = function () {
@@ -94,7 +90,7 @@ function createPersistDescriptor(
94
90
  owner: this,
95
91
  target: {
96
92
  getPersistableState: () =>
97
- new PersistableState(propertyAvailable.get() ? this[property] : ret),
93
+ new PersistableState(hasInitialized ? this[property] : ret),
98
94
  setPersistableState: state => {
99
95
  if (!hasInitialized) {
100
96
  ret = state.value;
@@ -105,9 +101,6 @@ function createPersistDescriptor(
105
101
  }
106
102
  });
107
103
 
108
- // Wait for next tick to ensure property is available on the instance before observing.
109
- wait().then(() => propertyAvailable.set(true));
110
-
111
104
  hasInitialized = true;
112
105
  return ret;
113
106
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xh/hoist",
3
- "version": "73.0.0-SNAPSHOT.1746798376611",
3
+ "version": "73.0.0-SNAPSHOT.1746798986724",
4
4
  "description": "Hoist add-on for building and deploying React Applications.",
5
5
  "repository": "github:xh/hoist-react",
6
6
  "homepage": "https://xh.io",