@design.estate/dees-domtools 2.0.44 → 2.0.46

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.
@@ -14785,7 +14785,7 @@ var SmartRouter = class {
14785
14785
  }
14786
14786
  };
14787
14787
 
14788
- // node_modules/.pnpm/@push.rocks+smartstate@2.0.10/node_modules/@push.rocks/smartstate/dist_ts/index.js
14788
+ // node_modules/.pnpm/@push.rocks+smartstate@2.0.13/node_modules/@push.rocks/smartstate/dist_ts/index.js
14789
14789
  var dist_ts_exports19 = {};
14790
14790
  __export(dist_ts_exports19, {
14791
14791
  Smartstate: () => Smartstate,
@@ -14955,7 +14955,7 @@ var sha256FromString = async (stringArg) => {
14955
14955
  }
14956
14956
  };
14957
14957
 
14958
- // node_modules/.pnpm/@push.rocks+smartstate@2.0.10/node_modules/@push.rocks/smartstate/dist_ts/smartstate.classes.stateaction.js
14958
+ // node_modules/.pnpm/@push.rocks+smartstate@2.0.13/node_modules/@push.rocks/smartstate/dist_ts/smartstate.classes.stateaction.js
14959
14959
  var StateAction = class {
14960
14960
  constructor(statePartRef, actionDef) {
14961
14961
  this.statePartRef = statePartRef;
@@ -14966,7 +14966,7 @@ var StateAction = class {
14966
14966
  }
14967
14967
  };
14968
14968
 
14969
- // node_modules/.pnpm/@push.rocks+smartstate@2.0.10/node_modules/@push.rocks/smartstate/dist_ts/smartstate.classes.statepart.js
14969
+ // node_modules/.pnpm/@push.rocks+smartstate@2.0.13/node_modules/@push.rocks/smartstate/dist_ts/smartstate.classes.statepart.js
14970
14970
  var StatePart = class {
14971
14971
  constructor(nameArg, webStoreOptions) {
14972
14972
  this.state = new dist_ts_exports4.rxjs.Subject();
@@ -15055,7 +15055,8 @@ var StatePart = class {
15055
15055
  async dispatchAction(stateAction, actionPayload) {
15056
15056
  await this.cumulativeDeferred.promise;
15057
15057
  const newState = await stateAction.actionDef(this, actionPayload);
15058
- this.setState(newState);
15058
+ await this.setState(newState);
15059
+ return this.getState();
15059
15060
  }
15060
15061
  /**
15061
15062
  * waits until a certain part of the state becomes available
@@ -15083,7 +15084,7 @@ var StatePart = class {
15083
15084
  }
15084
15085
  };
15085
15086
 
15086
- // node_modules/.pnpm/@push.rocks+smartstate@2.0.10/node_modules/@push.rocks/smartstate/dist_ts/smartstate.classes.smartstate.js
15087
+ // node_modules/.pnpm/@push.rocks+smartstate@2.0.13/node_modules/@push.rocks/smartstate/dist_ts/smartstate.classes.smartstate.js
15087
15088
  var Smartstate = class {
15088
15089
  constructor() {
15089
15090
  this.statePartMap = {};
@@ -15107,7 +15108,7 @@ var Smartstate = class {
15107
15108
  if (!initialArg) {
15108
15109
  throw new Error(`${statePartNameArg} does not yet exist, yet you don't provide an initial state`);
15109
15110
  }
15110
- return this.createStatePart(statePartNameArg, initialArg);
15111
+ return this.createStatePart(statePartNameArg, initialArg, initMode);
15111
15112
  }
15112
15113
  }
15113
15114
  /**
@@ -15115,8 +15116,11 @@ var Smartstate = class {
15115
15116
  * @param statePartName
15116
15117
  * @param initialPayloadArg
15117
15118
  */
15118
- createStatePart(statePartName, initialPayloadArg) {
15119
- const newState = new StatePart(statePartName);
15119
+ createStatePart(statePartName, initialPayloadArg, initMode) {
15120
+ const newState = new StatePart(statePartName, initMode === "persistent" ? {
15121
+ dbName: "smartstate",
15122
+ storeName: statePartName
15123
+ } : null);
15120
15124
  newState.setState(initialPayloadArg);
15121
15125
  this.statePartMap[statePartName] = newState;
15122
15126
  return newState;