vim-web 0.6.0-dev.5 → 0.6.0-dev.6

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/dist/vim-web.js CHANGED
@@ -73649,6 +73649,29 @@ function removePermission(settings2) {
73649
73649
  }
73650
73650
  return clone;
73651
73651
  }
73652
+ function createState(initial) {
73653
+ return new MutableState(initial);
73654
+ }
73655
+ class MutableState {
73656
+ constructor(initial) {
73657
+ __publicField(this, "_value");
73658
+ __publicField(this, "_onChange", new distExports.SimpleEventDispatcher());
73659
+ this._value = initial;
73660
+ }
73661
+ get() {
73662
+ return this._value;
73663
+ }
73664
+ set(value) {
73665
+ if (value === this._value) return;
73666
+ this._value = value;
73667
+ this._onChange.dispatch(value);
73668
+ }
73669
+ confirm() {
73670
+ }
73671
+ get onChange() {
73672
+ return this._onChange.asEvent();
73673
+ }
73674
+ }
73652
73675
  function useRefresher() {
73653
73676
  const [refresh, setRefresh] = useState(false);
73654
73677
  return {
@@ -76368,7 +76391,8 @@ const index = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePropert
76368
76391
  Settings: index$6,
76369
76392
  Ultra: index$4,
76370
76393
  Webgl: index$5,
76371
- createContainer
76394
+ createContainer,
76395
+ createState
76372
76396
  }, Symbol.toStringTag, { value: "Module" }));
76373
76397
  export {
76374
76398
  index$7 as Core,