sibujs 3.0.0 → 3.1.0

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.
Files changed (47) hide show
  1. package/dist/browser.js +4 -4
  2. package/dist/build.cjs +43 -5
  3. package/dist/build.js +10 -10
  4. package/dist/cdn.global.js +7 -7
  5. package/dist/{chunk-VSNLICTS.js → chunk-2HAGQWDV.js} +1 -1
  6. package/dist/{chunk-L52H775O.js → chunk-2N2UL7O4.js} +4 -4
  7. package/dist/{chunk-UKMXT5T6.js → chunk-2ZJ7TSW4.js} +4 -5
  8. package/dist/{chunk-NEWH4O5U.js → chunk-3DJH25UO.js} +1 -1
  9. package/dist/{chunk-XDKP4T7G.js → chunk-3DYB5B3S.js} +2 -2
  10. package/dist/{chunk-L4DAT4WU.js → chunk-3U4ZVXVD.js} +24 -1
  11. package/dist/{chunk-INBOWHQ3.js → chunk-CR4MXPHB.js} +9 -9
  12. package/dist/{chunk-YMOIAHWA.js → chunk-EFOAE5NC.js} +1 -1
  13. package/dist/{chunk-4YTVESDX.js → chunk-GQ7RRFPU.js} +1 -1
  14. package/dist/{chunk-2KM2724A.js → chunk-IVOUCSZL.js} +2 -2
  15. package/dist/{chunk-KZA7ANXP.js → chunk-KB3BA2XK.js} +3 -3
  16. package/dist/{chunk-2JQUV4Y3.js → chunk-PMSDFTK3.js} +4 -4
  17. package/dist/{chunk-KH4OE6WY.js → chunk-QNQY5DUS.js} +5 -5
  18. package/dist/{chunk-6QZO7MMG.js → chunk-RK4BQG25.js} +1 -1
  19. package/dist/{chunk-DF3GTP4Q.js → chunk-SC437AMI.js} +1 -1
  20. package/dist/{chunk-XVYB3J6C.js → chunk-SVVAUX7J.js} +3 -3
  21. package/dist/{chunk-V65KTDZW.js → chunk-UYX2NDOH.js} +3 -3
  22. package/dist/{chunk-STFTTMO2.js → chunk-WKUXSE7V.js} +21 -3
  23. package/dist/{chunk-RJIRT46U.js → chunk-WYU7CYJ3.js} +4 -4
  24. package/dist/{chunk-5WD7BYTZ.js → chunk-ZIBE2SAT.js} +1 -1
  25. package/dist/data.cjs +23 -1
  26. package/dist/data.js +6 -6
  27. package/dist/devtools.js +4 -4
  28. package/dist/ecosystem.cjs +42 -4
  29. package/dist/ecosystem.js +7 -7
  30. package/dist/extras.cjs +42 -4
  31. package/dist/extras.js +19 -19
  32. package/dist/index.cjs +43 -5
  33. package/dist/index.js +10 -10
  34. package/dist/motion.js +3 -3
  35. package/dist/patterns.cjs +23 -1
  36. package/dist/patterns.js +5 -5
  37. package/dist/performance.js +4 -4
  38. package/dist/plugins.cjs +42 -4
  39. package/dist/plugins.js +6 -6
  40. package/dist/ssr.cjs +42 -4
  41. package/dist/ssr.js +7 -7
  42. package/dist/testing.js +2 -2
  43. package/dist/ui.cjs +24 -3
  44. package/dist/ui.js +6 -6
  45. package/dist/widgets.cjs +23 -1
  46. package/dist/widgets.js +6 -6
  47. package/package.json +1 -1
@@ -139,28 +139,28 @@ import {
139
139
  use,
140
140
  var_,
141
141
  video
142
- } from "./chunk-VSNLICTS.js";
142
+ } from "./chunk-2HAGQWDV.js";
143
143
  import {
144
144
  watch
145
- } from "./chunk-NEWH4O5U.js";
145
+ } from "./chunk-3DJH25UO.js";
146
146
  import {
147
147
  trustHTML
148
148
  } from "./chunk-JYD2PWXH.js";
149
149
  import {
150
150
  context
151
- } from "./chunk-YMOIAHWA.js";
151
+ } from "./chunk-EFOAE5NC.js";
152
152
  import {
153
153
  SVG_NS,
154
154
  bindChildNode,
155
155
  tagFactory
156
- } from "./chunk-STFTTMO2.js";
156
+ } from "./chunk-WKUXSE7V.js";
157
157
  import {
158
158
  bindAttribute,
159
159
  bindDynamic
160
- } from "./chunk-UKMXT5T6.js";
160
+ } from "./chunk-2ZJ7TSW4.js";
161
161
  import {
162
162
  derived
163
- } from "./chunk-DF3GTP4Q.js";
163
+ } from "./chunk-SC437AMI.js";
164
164
  import {
165
165
  checkLeaks,
166
166
  dispose,
@@ -174,7 +174,7 @@ import {
174
174
  import {
175
175
  effect,
176
176
  on
177
- } from "./chunk-5WD7BYTZ.js";
177
+ } from "./chunk-ZIBE2SAT.js";
178
178
  import {
179
179
  disableSSR,
180
180
  enableSSR,
@@ -188,7 +188,7 @@ import {
188
188
  enqueueBatchedSignal,
189
189
  isBatching,
190
190
  signal
191
- } from "./chunk-6QZO7MMG.js";
191
+ } from "./chunk-RK4BQG25.js";
192
192
  import {
193
193
  notifySubscribers,
194
194
  recordDependency,
@@ -196,7 +196,7 @@ import {
196
196
  setMaxDrainIterations,
197
197
  track,
198
198
  untracked
199
- } from "./chunk-L4DAT4WU.js";
199
+ } from "./chunk-3U4ZVXVD.js";
200
200
  import {
201
201
  __export,
202
202
  devAssert,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  signal
3
- } from "./chunk-6QZO7MMG.js";
3
+ } from "./chunk-RK4BQG25.js";
4
4
 
5
5
  // src/core/rendering/context.ts
6
6
  function context(defaultValue) {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  signal
3
- } from "./chunk-6QZO7MMG.js";
3
+ } from "./chunk-RK4BQG25.js";
4
4
 
5
5
  // src/ui/transition.ts
6
6
  function transition(element, options = {}) {
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  effect
3
- } from "./chunk-5WD7BYTZ.js";
3
+ } from "./chunk-ZIBE2SAT.js";
4
4
  import {
5
5
  batch,
6
6
  signal
7
- } from "./chunk-6QZO7MMG.js";
7
+ } from "./chunk-RK4BQG25.js";
8
8
 
9
9
  // src/browser/media.ts
10
10
  function media(query) {
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  derived
3
- } from "./chunk-DF3GTP4Q.js";
3
+ } from "./chunk-SC437AMI.js";
4
4
  import {
5
5
  effect
6
- } from "./chunk-5WD7BYTZ.js";
6
+ } from "./chunk-ZIBE2SAT.js";
7
7
  import {
8
8
  batch,
9
9
  signal
10
- } from "./chunk-6QZO7MMG.js";
10
+ } from "./chunk-RK4BQG25.js";
11
11
 
12
12
  // src/patterns/machine.ts
13
13
  function machine(config) {
@@ -1,19 +1,19 @@
1
1
  import {
2
2
  context
3
- } from "./chunk-YMOIAHWA.js";
3
+ } from "./chunk-EFOAE5NC.js";
4
4
  import {
5
5
  derived
6
- } from "./chunk-DF3GTP4Q.js";
6
+ } from "./chunk-SC437AMI.js";
7
7
  import {
8
8
  sanitizeUrl
9
9
  } from "./chunk-UCS6AMJ7.js";
10
10
  import {
11
11
  effect
12
- } from "./chunk-5WD7BYTZ.js";
12
+ } from "./chunk-ZIBE2SAT.js";
13
13
  import {
14
14
  batch,
15
15
  signal
16
- } from "./chunk-6QZO7MMG.js";
16
+ } from "./chunk-RK4BQG25.js";
17
17
 
18
18
  // src/data/retry.ts
19
19
  function calculateDelay(attempt, strategy, baseDelay, maxDelay, jitter) {
@@ -1,22 +1,22 @@
1
1
  import {
2
2
  bindAttribute
3
- } from "./chunk-UKMXT5T6.js";
3
+ } from "./chunk-2ZJ7TSW4.js";
4
4
  import {
5
5
  derived
6
- } from "./chunk-DF3GTP4Q.js";
6
+ } from "./chunk-SC437AMI.js";
7
7
  import {
8
8
  dispose,
9
9
  registerDisposer
10
10
  } from "./chunk-2UPRY23K.js";
11
11
  import {
12
12
  effect
13
- } from "./chunk-5WD7BYTZ.js";
13
+ } from "./chunk-ZIBE2SAT.js";
14
14
  import {
15
15
  signal
16
- } from "./chunk-6QZO7MMG.js";
16
+ } from "./chunk-RK4BQG25.js";
17
17
  import {
18
18
  track
19
- } from "./chunk-L4DAT4WU.js";
19
+ } from "./chunk-3U4ZVXVD.js";
20
20
 
21
21
  // src/ui/form.ts
22
22
  function required(message = "This field is required") {
@@ -3,7 +3,7 @@ import {
3
3
  notifySubscribers,
4
4
  queueSignalNotification,
5
5
  recordDependency
6
- } from "./chunk-L4DAT4WU.js";
6
+ } from "./chunk-3U4ZVXVD.js";
7
7
  import {
8
8
  isDev
9
9
  } from "./chunk-LMLD24FC.js";
@@ -3,7 +3,7 @@ import {
3
3
  retrack,
4
4
  track,
5
5
  trackingSuspended
6
- } from "./chunk-L4DAT4WU.js";
6
+ } from "./chunk-3U4ZVXVD.js";
7
7
  import {
8
8
  devAssert
9
9
  } from "./chunk-LMLD24FC.js";
@@ -6,15 +6,15 @@ import {
6
6
  } from "./chunk-UCS6AMJ7.js";
7
7
  import {
8
8
  effect
9
- } from "./chunk-5WD7BYTZ.js";
9
+ } from "./chunk-ZIBE2SAT.js";
10
10
  import {
11
11
  signal
12
- } from "./chunk-6QZO7MMG.js";
12
+ } from "./chunk-RK4BQG25.js";
13
13
  import {
14
14
  forEachSubscriber,
15
15
  getSubscriberCount,
16
16
  getSubscriberDeps
17
- } from "./chunk-L4DAT4WU.js";
17
+ } from "./chunk-3U4ZVXVD.js";
18
18
  import {
19
19
  isDev
20
20
  } from "./chunk-LMLD24FC.js";
@@ -1,17 +1,17 @@
1
1
  import {
2
2
  div,
3
3
  span
4
- } from "./chunk-VSNLICTS.js";
4
+ } from "./chunk-2HAGQWDV.js";
5
5
  import {
6
6
  sanitizeUrl
7
7
  } from "./chunk-UCS6AMJ7.js";
8
8
  import {
9
9
  effect
10
- } from "./chunk-5WD7BYTZ.js";
10
+ } from "./chunk-ZIBE2SAT.js";
11
11
  import {
12
12
  batch,
13
13
  signal
14
- } from "./chunk-6QZO7MMG.js";
14
+ } from "./chunk-RK4BQG25.js";
15
15
 
16
16
  // src/platform/head.ts
17
17
  var HEAD_URL_ATTRS = /* @__PURE__ */ new Set(["href", "src"]);
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  bindAttribute
3
- } from "./chunk-UKMXT5T6.js";
3
+ } from "./chunk-2ZJ7TSW4.js";
4
4
  import {
5
5
  registerDisposer
6
6
  } from "./chunk-2UPRY23K.js";
@@ -11,8 +11,9 @@ import {
11
11
  sanitizeUrl
12
12
  } from "./chunk-UCS6AMJ7.js";
13
13
  import {
14
+ reactiveBinding,
14
15
  track
15
- } from "./chunk-L4DAT4WU.js";
16
+ } from "./chunk-3U4ZVXVD.js";
16
17
  import {
17
18
  devWarn,
18
19
  isDev
@@ -89,7 +90,7 @@ function bindChildNode(placeholder, getter) {
89
90
  }
90
91
  lastNodes = newNodes;
91
92
  }
92
- return track(commit);
93
+ return reactiveBinding(commit);
93
94
  }
94
95
 
95
96
  // src/core/rendering/tagFactory.ts
@@ -118,6 +119,18 @@ var CLOBBER_RISKY_IDS = /* @__PURE__ */ new Set([
118
119
  function setProp(el, key, val) {
119
120
  el[key] = val;
120
121
  }
122
+ function looksLikeClassList(s) {
123
+ const t = s.trim();
124
+ if (!t) return false;
125
+ const tokens = t.split(/\s+/);
126
+ let sawClassish = false;
127
+ for (let i = 0; i < tokens.length; i++) {
128
+ const tok = tokens[i];
129
+ if (!/^-?[A-Za-z_][A-Za-z0-9_:/.-]*$/.test(tok)) return false;
130
+ if (/[-:/0-9]/.test(tok)) sawClassish = true;
131
+ }
132
+ return sawClassish;
133
+ }
121
134
  var kebabCache = /* @__PURE__ */ new Map();
122
135
  function toKebab(prop) {
123
136
  let cached = kebabCache.get(prop);
@@ -253,6 +266,11 @@ var tagFactory = (tag, ns) => {
253
266
  appendChildren(el, second);
254
267
  return el;
255
268
  }
269
+ if (_isDev2 && looksLikeClassList(first)) {
270
+ devWarn(
271
+ `tagFactory: lone string "${first}" looks like a class list but is being rendered as TEXT. For a class, use ${tag}({ class: "${first}" }) \u2014 or ${tag}("${first}", children) to set the class AND add children.`
272
+ );
273
+ }
256
274
  el.textContent = first;
257
275
  return el;
258
276
  }
@@ -1,19 +1,19 @@
1
1
  import {
2
2
  watch
3
- } from "./chunk-NEWH4O5U.js";
3
+ } from "./chunk-3DJH25UO.js";
4
4
  import {
5
5
  derived
6
- } from "./chunk-DF3GTP4Q.js";
6
+ } from "./chunk-SC437AMI.js";
7
7
  import {
8
8
  stripHtml
9
9
  } from "./chunk-UCS6AMJ7.js";
10
10
  import {
11
11
  effect
12
- } from "./chunk-5WD7BYTZ.js";
12
+ } from "./chunk-ZIBE2SAT.js";
13
13
  import {
14
14
  batch,
15
15
  signal
16
- } from "./chunk-6QZO7MMG.js";
16
+ } from "./chunk-RK4BQG25.js";
17
17
 
18
18
  // src/widgets/Combobox.ts
19
19
  var comboboxIdCounter = 0;
@@ -5,7 +5,7 @@ import {
5
5
  cleanup,
6
6
  retrack,
7
7
  untracked
8
- } from "./chunk-L4DAT4WU.js";
8
+ } from "./chunk-3U4ZVXVD.js";
9
9
  import {
10
10
  devAssert
11
11
  } from "./chunk-LMLD24FC.js";
package/dist/data.cjs CHANGED
@@ -189,7 +189,7 @@ function retrack(effectFn, subscriber) {
189
189
  }
190
190
  }
191
191
  function track(effectFn, subscriber) {
192
- if (!subscriber) subscriber = effectFn;
192
+ if (!subscriber) return reactiveBinding(effectFn);
193
193
  cleanup(subscriber);
194
194
  const prev = currentSubscriber;
195
195
  currentSubscriber = subscriber;
@@ -207,6 +207,28 @@ function track(effectFn, subscriber) {
207
207
  const sub = subscriber;
208
208
  return sub._dispose ?? (sub._dispose = () => cleanup(subscriber));
209
209
  }
210
+ function reactiveBinding(commit) {
211
+ const run = () => {
212
+ const s = subscriber;
213
+ if (s._reentrant) return;
214
+ s._reentrant = true;
215
+ try {
216
+ retrack(commit, subscriber);
217
+ } finally {
218
+ s._reentrant = false;
219
+ }
220
+ };
221
+ const subscriber = run;
222
+ subscriber.depsHead = null;
223
+ subscriber.depsTail = null;
224
+ subscriber._epoch = 0;
225
+ subscriber._structDirty = false;
226
+ subscriber._runEpoch = 0;
227
+ subscriber._runs = 0;
228
+ subscriber._reentrant = false;
229
+ run();
230
+ return subscriber._dispose ?? (subscriber._dispose = () => cleanup(subscriber));
231
+ }
210
232
  function recordDependency(signal2) {
211
233
  if (!currentSubscriber) return;
212
234
  const sub = currentSubscriber;
package/dist/data.js CHANGED
@@ -20,14 +20,14 @@ import {
20
20
  syncAdapter,
21
21
  throttle,
22
22
  withRetry
23
- } from "./chunk-2JQUV4Y3.js";
24
- import "./chunk-YMOIAHWA.js";
25
- import "./chunk-DF3GTP4Q.js";
23
+ } from "./chunk-PMSDFTK3.js";
24
+ import "./chunk-EFOAE5NC.js";
25
+ import "./chunk-SC437AMI.js";
26
26
  import "./chunk-UCS6AMJ7.js";
27
- import "./chunk-5WD7BYTZ.js";
27
+ import "./chunk-ZIBE2SAT.js";
28
28
  import "./chunk-2RA7SHDA.js";
29
- import "./chunk-6QZO7MMG.js";
30
- import "./chunk-L4DAT4WU.js";
29
+ import "./chunk-RK4BQG25.js";
30
+ import "./chunk-3U4ZVXVD.js";
31
31
  import "./chunk-LMLD24FC.js";
32
32
  export {
33
33
  __resetQueryCache,
package/dist/devtools.js CHANGED
@@ -35,13 +35,13 @@ import {
35
35
  trackCleanup,
36
36
  walkDependencyGraph,
37
37
  withErrorTracking
38
- } from "./chunk-XVYB3J6C.js";
38
+ } from "./chunk-SVVAUX7J.js";
39
39
  import "./chunk-2UPRY23K.js";
40
40
  import "./chunk-UCS6AMJ7.js";
41
- import "./chunk-5WD7BYTZ.js";
41
+ import "./chunk-ZIBE2SAT.js";
42
42
  import "./chunk-2RA7SHDA.js";
43
- import "./chunk-6QZO7MMG.js";
44
- import "./chunk-L4DAT4WU.js";
43
+ import "./chunk-RK4BQG25.js";
44
+ import "./chunk-3U4ZVXVD.js";
45
45
  import {
46
46
  isDev
47
47
  } from "./chunk-LMLD24FC.js";
@@ -176,7 +176,7 @@ function retrack(effectFn, subscriber) {
176
176
  }
177
177
  }
178
178
  function track(effectFn, subscriber) {
179
- if (!subscriber) subscriber = effectFn;
179
+ if (!subscriber) return reactiveBinding(effectFn);
180
180
  cleanup(subscriber);
181
181
  const prev = currentSubscriber;
182
182
  currentSubscriber = subscriber;
@@ -194,6 +194,28 @@ function track(effectFn, subscriber) {
194
194
  const sub = subscriber;
195
195
  return sub._dispose ?? (sub._dispose = () => cleanup(subscriber));
196
196
  }
197
+ function reactiveBinding(commit) {
198
+ const run = () => {
199
+ const s = subscriber;
200
+ if (s._reentrant) return;
201
+ s._reentrant = true;
202
+ try {
203
+ retrack(commit, subscriber);
204
+ } finally {
205
+ s._reentrant = false;
206
+ }
207
+ };
208
+ const subscriber = run;
209
+ subscriber.depsHead = null;
210
+ subscriber.depsTail = null;
211
+ subscriber._epoch = 0;
212
+ subscriber._structDirty = false;
213
+ subscriber._runEpoch = 0;
214
+ subscriber._runs = 0;
215
+ subscriber._reentrant = false;
216
+ run();
217
+ return subscriber._dispose ?? (subscriber._dispose = () => cleanup(subscriber));
218
+ }
197
219
  function recordDependency(signal2) {
198
220
  if (!currentSubscriber) return;
199
221
  const sub = currentSubscriber;
@@ -990,8 +1012,7 @@ function bindAttribute(el, attr, getter) {
990
1012
  el.setAttribute(attr, isUrlAttribute(attr) ? sanitizeUrl(str) : str);
991
1013
  }
992
1014
  }
993
- const teardown = track(commit);
994
- return teardown;
1015
+ return reactiveBinding(commit);
995
1016
  }
996
1017
 
997
1018
  // src/reactivity/bindChildNode.ts
@@ -1065,7 +1086,7 @@ function bindChildNode(placeholder, getter) {
1065
1086
  }
1066
1087
  lastNodes = newNodes;
1067
1088
  }
1068
- return track(commit);
1089
+ return reactiveBinding(commit);
1069
1090
  }
1070
1091
 
1071
1092
  // src/core/rendering/dispose.ts
@@ -1107,6 +1128,18 @@ var CLOBBER_RISKY_IDS = /* @__PURE__ */ new Set([
1107
1128
  function setProp2(el, key, val) {
1108
1129
  el[key] = val;
1109
1130
  }
1131
+ function looksLikeClassList(s) {
1132
+ const t = s.trim();
1133
+ if (!t) return false;
1134
+ const tokens = t.split(/\s+/);
1135
+ let sawClassish = false;
1136
+ for (let i = 0; i < tokens.length; i++) {
1137
+ const tok = tokens[i];
1138
+ if (!/^-?[A-Za-z_][A-Za-z0-9_:/.-]*$/.test(tok)) return false;
1139
+ if (/[-:/0-9]/.test(tok)) sawClassish = true;
1140
+ }
1141
+ return sawClassish;
1142
+ }
1110
1143
  var kebabCache = /* @__PURE__ */ new Map();
1111
1144
  function toKebab(prop) {
1112
1145
  let cached = kebabCache.get(prop);
@@ -1242,6 +1275,11 @@ var tagFactory = (tag, ns) => {
1242
1275
  appendChildren(el, second);
1243
1276
  return el;
1244
1277
  }
1278
+ if (_isDev7 && looksLikeClassList(first)) {
1279
+ devWarn(
1280
+ `tagFactory: lone string "${first}" looks like a class list but is being rendered as TEXT. For a class, use ${tag}({ class: "${first}" }) \u2014 or ${tag}("${first}", children) to set the class AND add children.`
1281
+ );
1282
+ }
1245
1283
  el.textContent = first;
1246
1284
  return el;
1247
1285
  }
package/dist/ecosystem.js CHANGED
@@ -7,17 +7,17 @@ import {
7
7
  mobXAdapter,
8
8
  reduxAdapter,
9
9
  zustandAdapter
10
- } from "./chunk-L52H775O.js";
10
+ } from "./chunk-2N2UL7O4.js";
11
11
  import "./chunk-3JHCYHWN.js";
12
- import "./chunk-STFTTMO2.js";
13
- import "./chunk-UKMXT5T6.js";
14
- import "./chunk-DF3GTP4Q.js";
12
+ import "./chunk-WKUXSE7V.js";
13
+ import "./chunk-2ZJ7TSW4.js";
14
+ import "./chunk-SC437AMI.js";
15
15
  import "./chunk-2UPRY23K.js";
16
16
  import "./chunk-UCS6AMJ7.js";
17
- import "./chunk-5WD7BYTZ.js";
17
+ import "./chunk-ZIBE2SAT.js";
18
18
  import "./chunk-2RA7SHDA.js";
19
- import "./chunk-6QZO7MMG.js";
20
- import "./chunk-L4DAT4WU.js";
19
+ import "./chunk-RK4BQG25.js";
20
+ import "./chunk-3U4ZVXVD.js";
21
21
  import "./chunk-LMLD24FC.js";
22
22
  export {
23
23
  antdAdapter,
package/dist/extras.cjs CHANGED
@@ -459,7 +459,7 @@ function retrack(effectFn, subscriber) {
459
459
  }
460
460
  }
461
461
  function track(effectFn, subscriber) {
462
- if (!subscriber) subscriber = effectFn;
462
+ if (!subscriber) return reactiveBinding(effectFn);
463
463
  cleanup(subscriber);
464
464
  const prev = currentSubscriber;
465
465
  currentSubscriber = subscriber;
@@ -477,6 +477,28 @@ function track(effectFn, subscriber) {
477
477
  const sub2 = subscriber;
478
478
  return sub2._dispose ?? (sub2._dispose = () => cleanup(subscriber));
479
479
  }
480
+ function reactiveBinding(commit) {
481
+ const run = () => {
482
+ const s2 = subscriber;
483
+ if (s2._reentrant) return;
484
+ s2._reentrant = true;
485
+ try {
486
+ retrack(commit, subscriber);
487
+ } finally {
488
+ s2._reentrant = false;
489
+ }
490
+ };
491
+ const subscriber = run;
492
+ subscriber.depsHead = null;
493
+ subscriber.depsTail = null;
494
+ subscriber._epoch = 0;
495
+ subscriber._structDirty = false;
496
+ subscriber._runEpoch = 0;
497
+ subscriber._runs = 0;
498
+ subscriber._reentrant = false;
499
+ run();
500
+ return subscriber._dispose ?? (subscriber._dispose = () => cleanup(subscriber));
501
+ }
480
502
  function recordDependency(signal2) {
481
503
  if (!currentSubscriber) return;
482
504
  const sub2 = currentSubscriber;
@@ -5301,8 +5323,7 @@ function bindAttribute(el, attr, getter) {
5301
5323
  el.setAttribute(attr, isUrlAttribute(attr) ? sanitizeUrl(str) : str);
5302
5324
  }
5303
5325
  }
5304
- const teardown = track(commit);
5305
- return teardown;
5326
+ return reactiveBinding(commit);
5306
5327
  }
5307
5328
 
5308
5329
  // src/ui/reactiveAttr.ts
@@ -7435,7 +7456,7 @@ function bindChildNode(placeholder, getter) {
7435
7456
  }
7436
7457
  lastNodes = newNodes;
7437
7458
  }
7438
- return track(commit);
7459
+ return reactiveBinding(commit);
7439
7460
  }
7440
7461
 
7441
7462
  // src/core/rendering/tagFactory.ts
@@ -7464,6 +7485,18 @@ var CLOBBER_RISKY_IDS = /* @__PURE__ */ new Set([
7464
7485
  function setProp2(el, key, val) {
7465
7486
  el[key] = val;
7466
7487
  }
7488
+ function looksLikeClassList(s2) {
7489
+ const t = s2.trim();
7490
+ if (!t) return false;
7491
+ const tokens = t.split(/\s+/);
7492
+ let sawClassish = false;
7493
+ for (let i2 = 0; i2 < tokens.length; i2++) {
7494
+ const tok = tokens[i2];
7495
+ if (!/^-?[A-Za-z_][A-Za-z0-9_:/.-]*$/.test(tok)) return false;
7496
+ if (/[-:/0-9]/.test(tok)) sawClassish = true;
7497
+ }
7498
+ return sawClassish;
7499
+ }
7467
7500
  var kebabCache = /* @__PURE__ */ new Map();
7468
7501
  function toKebab(prop) {
7469
7502
  let cached = kebabCache.get(prop);
@@ -7599,6 +7632,11 @@ var tagFactory = (tag, ns) => {
7599
7632
  appendChildren(el, second);
7600
7633
  return el;
7601
7634
  }
7635
+ if (_isDev9 && looksLikeClassList(first)) {
7636
+ devWarn(
7637
+ `tagFactory: lone string "${first}" looks like a class list but is being rendered as TEXT. For a class, use ${tag}({ class: "${first}" }) \u2014 or ${tag}("${first}", children) to set the class AND add children.`
7638
+ );
7639
+ }
7602
7640
  el.textContent = first;
7603
7641
  return el;
7604
7642
  }