@kitlangton/knobs 0.4.0-next.16 → 0.4.0-next.17

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/index.js CHANGED
@@ -447,6 +447,7 @@ function mutatePoints(points, range, random, share) {
447
447
  // src/core/schema.ts
448
448
  var META_KEYS = [
449
449
  "label",
450
+ "description",
450
451
  "group",
451
452
  "groupLabel",
452
453
  "section",
@@ -2008,11 +2009,12 @@ function defineControls(id, input, options = {}) {
2008
2009
  ...setOpts?.base ? { base: !0 } : {}
2009
2010
  });
2010
2011
  }
2011
- function step(to, source) {
2012
- let before = load(), left = { values: before, base: activeBase() }, diff = changes(before, to.values);
2012
+ function step(to, source, into) {
2013
+ let before = load();
2014
+ into.push({ values: before, base: activeBase() });
2015
+ let diff = changes(before, to.values);
2013
2016
  if (base = validBase(to.base), markChanged(diff), commit(to.values), Object.keys(diff).length)
2014
2017
  options.onChange?.(diff, to.values, { source });
2015
- return left;
2016
2018
  }
2017
2019
  function place(values, replace, land) {
2018
2020
  let previous = load(), applied = applyPatch(replace ? locked : previous, previous, values);
@@ -2348,7 +2350,7 @@ function defineControls(id, input, options = {}) {
2348
2350
  let previous = past.pop();
2349
2351
  if (!previous)
2350
2352
  return;
2351
- future.push(step(previous, "undo"));
2353
+ step(previous, "undo", future);
2352
2354
  },
2353
2355
  redo() {
2354
2356
  if (release(), hostHistory)
@@ -2356,7 +2358,7 @@ function defineControls(id, input, options = {}) {
2356
2358
  let next = future.pop();
2357
2359
  if (!next)
2358
2360
  return;
2359
- past.push(step(next, "redo"));
2361
+ step(next, "redo", past);
2360
2362
  },
2361
2363
  getServerSnapshot: () => locked,
2362
2364
  subscribe(cb) {