aberdeen 1.3.0 → 1.3.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/README.md CHANGED
@@ -174,6 +174,18 @@ And you may want to study the examples above, of course!
174
174
 
175
175
  ## Changelog
176
176
 
177
+ ### 1.3.2 (2025-01-07)
178
+
179
+ **Enhancements:**
180
+ - It's now okay to first define a SELECT binding and then add its OPTIONs right after, while still allowing the binding to set the initial value. This used to throw an async error.
181
+
182
+ **Fixes:**
183
+ - Turns out some examples were still using old text content syntax.
184
+
185
+ ### 1.3.1 (2025-01-07)
186
+ **Fixes:**
187
+ - Argument types accepted by `$` were too restrictive, as something like `$('prop=', myVal)` should be able to accept any type for `myVal`.
188
+
177
189
  ### 1.3.0 (2025-12-03)
178
190
  **Breaking changes:**
179
191
  - The shortcut for setting inline CSS styles in now `$('div color:red')` instead of `$('div $color=red')`.
@@ -390,7 +390,7 @@ export declare function ref<T extends TargetType, K extends keyof T>(target: T,
390
390
  * });
391
391
  * ```
392
392
  */
393
- export declare function $(...args: (string | null | undefined | false | (() => void) | Record<string, any>)[]): undefined | Element;
393
+ export declare function $(...args: any[]): undefined | Element;
394
394
  /**
395
395
  * Inserts CSS rules into the document, optionally scoping them with a unique class name.
396
396
  *
package/dist/aberdeen.js CHANGED
@@ -165,6 +165,15 @@ class Scope {
165
165
  }
166
166
  }
167
167
 
168
+ class DelayedOneTimeRunner {
169
+ queueRun;
170
+ prio = --lastPrio;
171
+ constructor(queueRun) {
172
+ this.queueRun = queueRun;
173
+ queue(this);
174
+ }
175
+ }
176
+
168
177
  class ContentScope extends Scope {
169
178
  cleaners;
170
179
  constructor(cleaners = []) {
@@ -1111,8 +1120,9 @@ function applyBind(el, target) {
1111
1120
  onInputChange();
1112
1121
  onProxyChange = () => {
1113
1122
  el.value = target.value;
1114
- if (el.tagName === "SELECT" && el.value != target.value)
1115
- throw new Error(`SELECT has no '${target.value}' OPTION (yet)`);
1123
+ if (el.tagName === "SELECT" && el.value != target.value) {
1124
+ new DelayedOneTimeRunner(() => el.value = target.value);
1125
+ }
1116
1126
  };
1117
1127
  }
1118
1128
  derive(onProxyChange);
@@ -1485,5 +1495,5 @@ export {
1485
1495
  $
1486
1496
  };
1487
1497
 
1488
- //# debugId=C3082837141CF76064756E2164756E21
1498
+ //# debugId=FE7EA671EAA8B7E164756E2164756E21
1489
1499
  //# sourceMappingURL=aberdeen.js.map