@homebound/beam 3.0.0 → 3.0.2

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.cjs CHANGED
@@ -4169,6 +4169,10 @@ var CssBuilder = class _CssBuilder {
4169
4169
  }
4170
4170
  return new _CssBuilder({ ...this.opts, enabled: !this.enabled, elseApplied: true });
4171
4171
  }
4172
+ /** Reset active conditional modifiers for subsequent styles. */
4173
+ get end() {
4174
+ return this.newCss({ selector: void 0, elseApplied: false });
4175
+ }
4172
4176
  add(propOrStyles, value) {
4173
4177
  if (!this.enabled) {
4174
4178
  return this;
@@ -4186,6 +4190,11 @@ var CssBuilder = class _CssBuilder {
4186
4190
  void className;
4187
4191
  return this.unsupportedRuntime("className() cannot be used in RuntimeStyle css expressions.");
4188
4192
  }
4193
+ /** Marker for the build-time transform to append raw inline styles. */
4194
+ style(inlineStyle) {
4195
+ void inlineStyle;
4196
+ return this.unsupportedRuntime("style() cannot be used in RuntimeStyle css expressions.");
4197
+ }
4189
4198
  /** Convert a style hash into `{ className, style }` props for manual spreading into non-`css=` contexts. */
4190
4199
  props(styles) {
4191
4200
  return (0, import_runtime.trussProps)(styles);
@@ -12963,6 +12972,7 @@ function NumberField(props) {
12963
12972
  wip: false
12964
12973
  });
12965
12974
  const lastSentRef = (0, import_react54.useRef)(void 0);
12975
+ const [, forceRender] = (0, import_react54.useState)(0);
12966
12976
  const propValue = value === void 0 ? Number.NaN : value / factor;
12967
12977
  if (valueRef.current.wip && !Object.is(valueRef.current.value, propValue)) {
12968
12978
  const lastSentInternal = lastSentRef.current === void 0 ? Number.NaN : lastSentRef.current / factor;
@@ -12976,7 +12986,9 @@ function NumberField(props) {
12976
12986
  value: valueRef.current.wip ? valueRef.current.value : value === void 0 ? Number.NaN : value / factor,
12977
12987
  // // This is called on blur with the final/committed value.
12978
12988
  onChange: (value2) => {
12979
- onChange(formatValue(value2, factor, numFractionDigits, numIntegerDigits, positiveOnly));
12989
+ const formatted = formatValue(value2, factor, numFractionDigits, numIntegerDigits, positiveOnly);
12990
+ if (formatted !== lastSentRef.current) return;
12991
+ onChange(formatted);
12980
12992
  },
12981
12993
  onFocus: () => {
12982
12994
  valueRef.current = {
@@ -12990,6 +13002,7 @@ function NumberField(props) {
12990
13002
  wip: false
12991
13003
  };
12992
13004
  lastSentRef.current = void 0;
13005
+ forceRender((c) => c + 1);
12993
13006
  },
12994
13007
  onKeyDown: (e) => {
12995
13008
  if (e.key === "Enter") {