solid-js 1.9.3 → 1.9.5

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/solid.cjs CHANGED
@@ -144,6 +144,7 @@ function nextHydrateContext() {
144
144
  };
145
145
  }
146
146
 
147
+ const IS_DEV = false;
147
148
  const equalFn = (a, b) => a === b;
148
149
  const $PROXY = Symbol("solid-proxy");
149
150
  const SUPPORTS_PROXY = typeof Proxy === "function";
@@ -257,14 +258,14 @@ function createResource(pSource, pFetcher, pOptions) {
257
258
  let source;
258
259
  let fetcher;
259
260
  let options;
260
- if (arguments.length === 2 && typeof pFetcher === "object" || arguments.length === 1) {
261
- source = true;
262
- fetcher = pSource;
263
- options = pFetcher || {};
264
- } else {
261
+ if (typeof pFetcher === "function") {
265
262
  source = pSource;
266
263
  fetcher = pFetcher;
267
264
  options = pOptions || {};
265
+ } else {
266
+ source = true;
267
+ fetcher = pSource;
268
+ options = pFetcher || {};
268
269
  }
269
270
  let pr = null,
270
271
  initP = NO_INIT,
@@ -651,7 +652,7 @@ function writeSignal(node, value, isComp) {
651
652
  }
652
653
  if (Updates.length > 10e5) {
653
654
  Updates = [];
654
- if (false) ;
655
+ if (IS_DEV) ;
655
656
  throw new Error();
656
657
  }
657
658
  }, false);
@@ -1054,8 +1055,8 @@ function observable(input) {
1054
1055
  }
1055
1056
  };
1056
1057
  }
1057
- function from(producer) {
1058
- const [s, set] = createSignal(undefined, {
1058
+ function from(producer, initalValue = undefined) {
1059
+ const [s, set] = createSignal(initalValue, {
1059
1060
  equals: false
1060
1061
  });
1061
1062
  if ("subscribe" in producer) {
@@ -1415,7 +1416,7 @@ function lazy(fn) {
1415
1416
  }
1416
1417
  let Comp;
1417
1418
  return createMemo(() => (Comp = comp()) ? untrack(() => {
1418
- if (false) ;
1419
+ if (IS_DEV) ;
1419
1420
  if (!ctx || sharedConfig.done) return Comp(props);
1420
1421
  const c = sharedConfig.context;
1421
1422
  setHydrateContext(ctx);
@@ -1448,8 +1449,9 @@ function Index(props) {
1448
1449
  }
1449
1450
  function Show(props) {
1450
1451
  const keyed = props.keyed;
1451
- const condition = createMemo(() => props.when, undefined, {
1452
- equals: (a, b) => keyed ? a === b : !a === !b
1452
+ const conditionValue = createMemo(() => props.when, undefined, undefined);
1453
+ const condition = keyed ? conditionValue : createMemo(conditionValue, undefined, {
1454
+ equals: (a, b) => !a === !b
1453
1455
  });
1454
1456
  return createMemo(() => {
1455
1457
  const c = condition();
@@ -1458,39 +1460,40 @@ function Show(props) {
1458
1460
  const fn = typeof child === "function" && child.length > 0;
1459
1461
  return fn ? untrack(() => child(keyed ? c : () => {
1460
1462
  if (!untrack(condition)) throw narrowedError("Show");
1461
- return props.when;
1463
+ return conditionValue();
1462
1464
  })) : child;
1463
1465
  }
1464
1466
  return props.fallback;
1465
1467
  }, undefined, undefined);
1466
1468
  }
1467
1469
  function Switch(props) {
1468
- let keyed = false;
1469
- const equals = (a, b) => (keyed ? a[1] === b[1] : !a[1] === !b[1]) && a[2] === b[2];
1470
- const conditions = children(() => props.children),
1471
- evalConditions = createMemo(() => {
1472
- let conds = conditions();
1473
- if (!Array.isArray(conds)) conds = [conds];
1474
- for (let i = 0; i < conds.length; i++) {
1475
- const c = conds[i].when;
1476
- if (c) {
1477
- keyed = !!conds[i].keyed;
1478
- return [i, c, conds[i]];
1479
- }
1480
- }
1481
- return [-1];
1482
- }, undefined, {
1483
- equals
1484
- });
1470
+ const chs = children(() => props.children);
1471
+ const switchFunc = createMemo(() => {
1472
+ const ch = chs();
1473
+ const mps = Array.isArray(ch) ? ch : [ch];
1474
+ let func = () => undefined;
1475
+ for (let i = 0; i < mps.length; i++) {
1476
+ const index = i;
1477
+ const mp = mps[i];
1478
+ const prevFunc = func;
1479
+ const conditionValue = createMemo(() => prevFunc() ? undefined : mp.when, undefined, undefined);
1480
+ const condition = mp.keyed ? conditionValue : createMemo(conditionValue, undefined, {
1481
+ equals: (a, b) => !a === !b
1482
+ });
1483
+ func = () => prevFunc() || (condition() ? [index, conditionValue, mp] : undefined);
1484
+ }
1485
+ return func;
1486
+ });
1485
1487
  return createMemo(() => {
1486
- const [index, when, cond] = evalConditions();
1487
- if (index < 0) return props.fallback;
1488
- const c = cond.children;
1489
- const fn = typeof c === "function" && c.length > 0;
1490
- return fn ? untrack(() => c(keyed ? when : () => {
1491
- if (untrack(evalConditions)[0] !== index) throw narrowedError("Match");
1492
- return cond.when;
1493
- })) : c;
1488
+ const sel = switchFunc()();
1489
+ if (!sel) return props.fallback;
1490
+ const [index, conditionValue, mp] = sel;
1491
+ const child = mp.children;
1492
+ const fn = typeof child === "function" && child.length > 0;
1493
+ return fn ? untrack(() => child(mp.keyed ? conditionValue() : () => {
1494
+ if (untrack(switchFunc)()?.[0] !== index) throw narrowedError("Match");
1495
+ return conditionValue();
1496
+ })) : child;
1494
1497
  }, undefined, undefined);
1495
1498
  }
1496
1499
  function Match(props) {
package/dist/solid.js CHANGED
@@ -144,6 +144,7 @@ function nextHydrateContext() {
144
144
  };
145
145
  }
146
146
 
147
+ const IS_DEV = false;
147
148
  const equalFn = (a, b) => a === b;
148
149
  const $PROXY = Symbol("solid-proxy");
149
150
  const SUPPORTS_PROXY = typeof Proxy === "function";
@@ -267,14 +268,14 @@ function createResource(pSource, pFetcher, pOptions) {
267
268
  let source;
268
269
  let fetcher;
269
270
  let options;
270
- if ((arguments.length === 2 && typeof pFetcher === "object") || arguments.length === 1) {
271
- source = true;
272
- fetcher = pSource;
273
- options = pFetcher || {};
274
- } else {
271
+ if (typeof pFetcher === "function") {
275
272
  source = pSource;
276
273
  fetcher = pFetcher;
277
274
  options = pOptions || {};
275
+ } else {
276
+ source = true;
277
+ fetcher = pSource;
278
+ options = pFetcher || {};
278
279
  }
279
280
  let pr = null,
280
281
  initP = NO_INIT,
@@ -712,7 +713,7 @@ function writeSignal(node, value, isComp) {
712
713
  }
713
714
  if (Updates.length > 10e5) {
714
715
  Updates = [];
715
- if (false);
716
+ if (IS_DEV);
716
717
  throw new Error();
717
718
  }
718
719
  }, false);
@@ -1138,8 +1139,8 @@ function observable(input) {
1138
1139
  }
1139
1140
  };
1140
1141
  }
1141
- function from(producer) {
1142
- const [s, set] = createSignal(undefined, {
1142
+ function from(producer, initalValue = undefined) {
1143
+ const [s, set] = createSignal(initalValue, {
1143
1144
  equals: false
1144
1145
  });
1145
1146
  if ("subscribe" in producer) {
@@ -1531,7 +1532,7 @@ function lazy(fn) {
1531
1532
  return createMemo(() =>
1532
1533
  (Comp = comp())
1533
1534
  ? untrack(() => {
1534
- if (false);
1535
+ if (IS_DEV);
1535
1536
  if (!ctx || sharedConfig.done) return Comp(props);
1536
1537
  const c = sharedConfig.context;
1537
1538
  setHydrateContext(ctx);
@@ -1566,9 +1567,12 @@ function Index(props) {
1566
1567
  }
1567
1568
  function Show(props) {
1568
1569
  const keyed = props.keyed;
1569
- const condition = createMemo(() => props.when, undefined, {
1570
- equals: (a, b) => (keyed ? a === b : !a === !b)
1571
- });
1570
+ const conditionValue = createMemo(() => props.when, undefined, undefined);
1571
+ const condition = keyed
1572
+ ? conditionValue
1573
+ : createMemo(conditionValue, undefined, {
1574
+ equals: (a, b) => !a === !b
1575
+ });
1572
1576
  return createMemo(
1573
1577
  () => {
1574
1578
  const c = condition();
@@ -1582,7 +1586,7 @@ function Show(props) {
1582
1586
  ? c
1583
1587
  : () => {
1584
1588
  if (!untrack(condition)) throw narrowedError("Show");
1585
- return props.when;
1589
+ return conditionValue();
1586
1590
  }
1587
1591
  )
1588
1592
  )
@@ -1595,45 +1599,48 @@ function Show(props) {
1595
1599
  );
1596
1600
  }
1597
1601
  function Switch(props) {
1598
- let keyed = false;
1599
- const equals = (a, b) => (keyed ? a[1] === b[1] : !a[1] === !b[1]) && a[2] === b[2];
1600
- const conditions = children(() => props.children),
1601
- evalConditions = createMemo(
1602
- () => {
1603
- let conds = conditions();
1604
- if (!Array.isArray(conds)) conds = [conds];
1605
- for (let i = 0; i < conds.length; i++) {
1606
- const c = conds[i].when;
1607
- if (c) {
1608
- keyed = !!conds[i].keyed;
1609
- return [i, c, conds[i]];
1610
- }
1611
- }
1612
- return [-1];
1613
- },
1614
- undefined,
1615
- {
1616
- equals
1617
- }
1618
- );
1602
+ const chs = children(() => props.children);
1603
+ const switchFunc = createMemo(() => {
1604
+ const ch = chs();
1605
+ const mps = Array.isArray(ch) ? ch : [ch];
1606
+ let func = () => undefined;
1607
+ for (let i = 0; i < mps.length; i++) {
1608
+ const index = i;
1609
+ const mp = mps[i];
1610
+ const prevFunc = func;
1611
+ const conditionValue = createMemo(
1612
+ () => (prevFunc() ? undefined : mp.when),
1613
+ undefined,
1614
+ undefined
1615
+ );
1616
+ const condition = mp.keyed
1617
+ ? conditionValue
1618
+ : createMemo(conditionValue, undefined, {
1619
+ equals: (a, b) => !a === !b
1620
+ });
1621
+ func = () => prevFunc() || (condition() ? [index, conditionValue, mp] : undefined);
1622
+ }
1623
+ return func;
1624
+ });
1619
1625
  return createMemo(
1620
1626
  () => {
1621
- const [index, when, cond] = evalConditions();
1622
- if (index < 0) return props.fallback;
1623
- const c = cond.children;
1624
- const fn = typeof c === "function" && c.length > 0;
1627
+ const sel = switchFunc()();
1628
+ if (!sel) return props.fallback;
1629
+ const [index, conditionValue, mp] = sel;
1630
+ const child = mp.children;
1631
+ const fn = typeof child === "function" && child.length > 0;
1625
1632
  return fn
1626
1633
  ? untrack(() =>
1627
- c(
1628
- keyed
1629
- ? when
1634
+ child(
1635
+ mp.keyed
1636
+ ? conditionValue()
1630
1637
  : () => {
1631
- if (untrack(evalConditions)[0] !== index) throw narrowedError("Match");
1632
- return cond.when;
1638
+ if (untrack(switchFunc)()?.[0] !== index) throw narrowedError("Match");
1639
+ return conditionValue();
1633
1640
  }
1634
1641
  )
1635
1642
  )
1636
- : c;
1643
+ : child;
1637
1644
  },
1638
1645
  undefined,
1639
1646
  undefined
@@ -868,7 +868,7 @@ export namespace JSX {
868
868
  ping?: FunctionMaybe<string>;
869
869
  referrerpolicy?: FunctionMaybe<HTMLReferrerPolicy>;
870
870
  rel?: FunctionMaybe<string>;
871
- target?: FunctionMaybe<string>;
871
+ target?: FunctionMaybe<"_self" | "_blank" | "_parent" | "_top" | (string & {})>;
872
872
  type?: FunctionMaybe<string>;
873
873
  referrerPolicy?: FunctionMaybe<HTMLReferrerPolicy>;
874
874
  }
@@ -1022,7 +1022,31 @@ export namespace JSX {
1022
1022
  size?: FunctionMaybe<number | string>;
1023
1023
  src?: FunctionMaybe<string>;
1024
1024
  step?: FunctionMaybe<number | string>;
1025
- type?: FunctionMaybe<string>;
1025
+ type?: FunctionMaybe<
1026
+ | "button"
1027
+ | "checkbox"
1028
+ | "color"
1029
+ | "date"
1030
+ | "datetime-local"
1031
+ | "email"
1032
+ | "file"
1033
+ | "hidden"
1034
+ | "image"
1035
+ | "month"
1036
+ | "number"
1037
+ | "password"
1038
+ | "radio"
1039
+ | "range"
1040
+ | "reset"
1041
+ | "search"
1042
+ | "submit"
1043
+ | "tel"
1044
+ | "text"
1045
+ | "time"
1046
+ | "url"
1047
+ | "week"
1048
+ | (string & {})
1049
+ >;
1026
1050
  value?: FunctionMaybe<string | string[] | number>;
1027
1051
  width?: FunctionMaybe<number | string>;
1028
1052
  crossOrigin?: FunctionMaybe<HTMLCrossorigin>;
@@ -1079,6 +1103,9 @@ export namespace JSX {
1079
1103
  interface MediaHTMLAttributes<T> extends HTMLAttributes<T> {
1080
1104
  autoplay?: FunctionMaybe<boolean>;
1081
1105
  controls?: FunctionMaybe<boolean>;
1106
+ controlslist?: FunctionMaybe<
1107
+ "nodownload" | "nofullscreen" | "noplaybackrate" | "noremoteplayback" | (string & {})
1108
+ >;
1082
1109
  crossorigin?: FunctionMaybe<HTMLCrossorigin>;
1083
1110
  loop?: FunctionMaybe<boolean>;
1084
1111
  mediagroup?: FunctionMaybe<string>;
@@ -1248,6 +1275,7 @@ export namespace JSX {
1248
1275
  poster?: FunctionMaybe<string>;
1249
1276
  width?: FunctionMaybe<number | string>;
1250
1277
  disablepictureinpicture?: FunctionMaybe<boolean>;
1278
+ disableremoteplayback?: FunctionMaybe<boolean>;
1251
1279
  }
1252
1280
  type SVGPreserveAspectRatio =
1253
1281
  | "none"
@@ -64,7 +64,7 @@ function parseTag(tag) {
64
64
  }
65
65
  function pushTextNode(list, html, start) {
66
66
  const end = html.indexOf('<', start);
67
- const content = html.slice(start, end === -1 ? void 0 : end);
67
+ const content = html.slice(start, end === -1 ? undefined : end);
68
68
  if (!/^\s*$/.test(content)) {
69
69
  list.push({
70
70
  type: 'text',
@@ -83,7 +83,7 @@ function pushCommentNode(list, tag) {
83
83
  }
84
84
  function parse(html) {
85
85
  const result = [];
86
- let current = void 0;
86
+ let current = undefined;
87
87
  let level = -1;
88
88
  const arr = [];
89
89
  const byTag = {};
@@ -92,7 +92,7 @@ function parse(html) {
92
92
  const isComment = tag.slice(0, 4) === '<!--';
93
93
  const start = index + tag.length;
94
94
  const nextChar = html.charAt(start);
95
- let parent = void 0;
95
+ let parent = undefined;
96
96
  if (isOpen && !isComment) {
97
97
  level++;
98
98
  current = parseTag(tag);
package/html/dist/html.js CHANGED
@@ -84,7 +84,7 @@ function parseTag(tag) {
84
84
  }
85
85
  function pushTextNode(list, html, start) {
86
86
  const end = html.indexOf("<", start);
87
- const content = html.slice(start, end === -1 ? void 0 : end);
87
+ const content = html.slice(start, end === -1 ? undefined : end);
88
88
  if (!/^\s*$/.test(content)) {
89
89
  list.push({
90
90
  type: "text",
@@ -103,7 +103,7 @@ function pushCommentNode(list, tag) {
103
103
  }
104
104
  function parse(html) {
105
105
  const result = [];
106
- let current = void 0;
106
+ let current = undefined;
107
107
  let level = -1;
108
108
  const arr = [];
109
109
  const byTag = {};
@@ -112,7 +112,7 @@ function parse(html) {
112
112
  const isComment = tag.slice(0, 4) === "<!--";
113
113
  const start = index + tag.length;
114
114
  const nextChar = html.charAt(start);
115
- let parent = void 0;
115
+ let parent = undefined;
116
116
  if (isOpen && !isComment) {
117
117
  level++;
118
118
  current = parseTag(tag);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "solid-js",
3
3
  "description": "A declarative JavaScript library for building user interfaces.",
4
- "version": "1.9.3",
4
+ "version": "1.9.5",
5
5
  "author": "Ryan Carniato",
6
6
  "license": "MIT",
7
7
  "homepage": "https://solidjs.com",
@@ -341,7 +341,7 @@ function applyState(target, parent, property, merge, key) {
341
341
  }
342
342
  const temp = new Array(target.length),
343
343
  newIndices = new Map();
344
- for (end = previous.length - 1, newEnd = target.length - 1; end >= start && newEnd >= start && (previous[end] === target[newEnd] || key && previous[start] && target[start] && previous[end][key] === target[newEnd][key]); end--, newEnd--) {
344
+ for (end = previous.length - 1, newEnd = target.length - 1; end >= start && newEnd >= start && (previous[end] === target[newEnd] || key && previous[end] && target[newEnd] && previous[end][key] === target[newEnd][key]); end--, newEnd--) {
345
345
  temp[newEnd] = previous[end];
346
346
  }
347
347
  if (start > newEnd || start > end) {
package/store/dist/dev.js CHANGED
@@ -411,7 +411,7 @@ function applyState(target, parent, property, merge, key) {
411
411
  end >= start &&
412
412
  newEnd >= start &&
413
413
  (previous[end] === target[newEnd] ||
414
- (key && previous[start] && target[start] && previous[end][key] === target[newEnd][key]));
414
+ (key && previous[end] && target[newEnd] && previous[end][key] === target[newEnd][key]));
415
415
  end--, newEnd--
416
416
  ) {
417
417
  temp[newEnd] = previous[end];
@@ -325,7 +325,7 @@ function applyState(target, parent, property, merge, key) {
325
325
  }
326
326
  const temp = new Array(target.length),
327
327
  newIndices = new Map();
328
- for (end = previous.length - 1, newEnd = target.length - 1; end >= start && newEnd >= start && (previous[end] === target[newEnd] || key && previous[start] && target[start] && previous[end][key] === target[newEnd][key]); end--, newEnd--) {
328
+ for (end = previous.length - 1, newEnd = target.length - 1; end >= start && newEnd >= start && (previous[end] === target[newEnd] || key && previous[end] && target[newEnd] && previous[end][key] === target[newEnd][key]); end--, newEnd--) {
329
329
  temp[newEnd] = previous[end];
330
330
  }
331
331
  if (start > newEnd || start > end) {
@@ -389,7 +389,7 @@ function applyState(target, parent, property, merge, key) {
389
389
  end >= start &&
390
390
  newEnd >= start &&
391
391
  (previous[end] === target[newEnd] ||
392
- (key && previous[start] && target[start] && previous[end][key] === target[newEnd][key]));
392
+ (key && previous[end] && target[newEnd] && previous[end][key] === target[newEnd][key]));
393
393
  end--, newEnd--
394
394
  ) {
395
395
  temp[newEnd] = previous[end];
@@ -1,3 +1,4 @@
1
+ export declare const IS_DEV: string | boolean;
1
2
  export declare const $RAW: unique symbol,
2
3
  $NODE: unique symbol,
3
4
  $HAS: unique symbol,
package/types/index.d.ts CHANGED
@@ -77,6 +77,9 @@ export declare const DEV:
77
77
  afterCreateSignal:
78
78
  | ((signal: import("./reactive/signal.js").SignalState<any>) => void)
79
79
  | null;
80
+ afterRegisterGraph:
81
+ | ((sourceMapValue: import("./reactive/signal.js").SourceMapValue) => void)
82
+ | null;
80
83
  };
81
84
  readonly writeSignal: typeof writeSignal;
82
85
  readonly registerGraph: typeof registerGraph;
package/types/jsx.d.ts CHANGED
@@ -963,7 +963,7 @@ export namespace JSX {
963
963
  ping?: string | undefined;
964
964
  referrerpolicy?: HTMLReferrerPolicy | undefined;
965
965
  rel?: string | undefined;
966
- target?: string | undefined;
966
+ target?: "_self" | "_blank" | "_parent" | "_top" | (string & {}) | undefined;
967
967
  type?: string | undefined;
968
968
  referrerPolicy?: HTMLReferrerPolicy | undefined;
969
969
  }
@@ -1125,7 +1125,31 @@ export namespace JSX {
1125
1125
  size?: number | string | undefined;
1126
1126
  src?: string | undefined;
1127
1127
  step?: number | string | undefined;
1128
- type?: string | undefined;
1128
+ type?:
1129
+ | "button"
1130
+ | "checkbox"
1131
+ | "color"
1132
+ | "date"
1133
+ | "datetime-local"
1134
+ | "email"
1135
+ | "file"
1136
+ | "hidden"
1137
+ | "image"
1138
+ | "month"
1139
+ | "number"
1140
+ | "password"
1141
+ | "radio"
1142
+ | "range"
1143
+ | "reset"
1144
+ | "search"
1145
+ | "submit"
1146
+ | "tel"
1147
+ | "text"
1148
+ | "time"
1149
+ | "url"
1150
+ | "week"
1151
+ | (string & {})
1152
+ | undefined;
1129
1153
  value?: string | string[] | number | undefined;
1130
1154
  width?: number | string | undefined;
1131
1155
  crossOrigin?: HTMLCrossorigin | undefined;
@@ -1182,6 +1206,13 @@ export namespace JSX {
1182
1206
  interface MediaHTMLAttributes<T> extends HTMLAttributes<T> {
1183
1207
  autoplay?: boolean | undefined;
1184
1208
  controls?: boolean | undefined;
1209
+ controlslist?:
1210
+ | "nodownload"
1211
+ | "nofullscreen"
1212
+ | "noplaybackrate"
1213
+ | "noremoteplayback"
1214
+ | (string & {})
1215
+ | undefined;
1185
1216
  crossorigin?: HTMLCrossorigin | undefined;
1186
1217
  loop?: boolean | undefined;
1187
1218
  mediagroup?: string | undefined;
@@ -1352,6 +1383,7 @@ export namespace JSX {
1352
1383
  poster?: string | undefined;
1353
1384
  width?: number | string | undefined;
1354
1385
  disablepictureinpicture?: boolean;
1386
+ disableremoteplayback?: boolean;
1355
1387
  }
1356
1388
  type SVGPreserveAspectRatio =
1357
1389
  | "none"
@@ -28,15 +28,15 @@ export type ObservableObserver<T> =
28
28
  * description https://docs.solidjs.com/reference/reactive-utilities/observable
29
29
  */
30
30
  export declare function observable<T>(input: Accessor<T>): Observable<T>;
31
- export declare function from<T>(
32
- producer:
33
- | ((setter: Setter<T | undefined>) => () => void)
34
- | {
35
- subscribe: (fn: (v: T) => void) =>
36
- | (() => void)
37
- | {
38
- unsubscribe: () => void;
39
- };
40
- }
41
- ): Accessor<T | undefined>;
31
+ type Producer<T> =
32
+ | ((setter: Setter<T>) => () => void)
33
+ | {
34
+ subscribe: (fn: (v: T) => void) =>
35
+ | (() => void)
36
+ | {
37
+ unsubscribe: () => void;
38
+ };
39
+ };
40
+ export declare function from<T>(producer: Producer<T>, initalValue: T): Accessor<T>;
41
+ export declare function from<T>(producer: Producer<T | undefined>): Accessor<T | undefined>;
42
42
  export {};
@@ -24,6 +24,7 @@ SOFTWARE.
24
24
  import { requestCallback } from "./scheduler.js";
25
25
  import type { JSX } from "../jsx.js";
26
26
  import type { FlowComponent } from "../render/index.js";
27
+ export declare const IS_DEV: string | boolean;
27
28
  export declare const equalFn: <T>(a: T, b: T) => boolean;
28
29
  export declare const $PROXY: unique symbol;
29
30
  export declare const SUPPORTS_PROXY: boolean;
@@ -35,7 +36,9 @@ export declare let Transition: TransitionState | null;
35
36
  export declare const DevHooks: {
36
37
  afterUpdate: (() => void) | null;
37
38
  afterCreateOwner: ((owner: Owner) => void) | null;
39
+ /** @deprecated use `afterRegisterGraph` */
38
40
  afterCreateSignal: ((signal: SignalState<any>) => void) | null;
41
+ afterRegisterGraph: ((sourceMapValue: SourceMapValue) => void) | null;
39
42
  };
40
43
  export type ComputationState = 0 | 1 | 2;
41
44
  export interface SourceMapValue {
@@ -49,6 +52,7 @@ export interface SignalState<T> extends SourceMapValue {
49
52
  observerSlots: number[] | null;
50
53
  tValue?: T;
51
54
  comparator?: (prev: T, next: T) => boolean;
55
+ internal?: true;
52
56
  }
53
57
  export interface Owner {
54
58
  owned: Computation<any>[] | null;
@@ -103,7 +103,12 @@ export declare function observable<T>(input: Accessor<T>): {
103
103
  subscribe(observer: ObservableObserver<T>): {
104
104
  unsubscribe(): void;
105
105
  };
106
- [Symbol.observable](): any;
106
+ [Symbol.observable](): {
107
+ subscribe(observer: ObservableObserver<T>): {
108
+ unsubscribe(): void;
109
+ };
110
+ [Symbol.observable](): /*elided*/ any;
111
+ };
107
112
  };
108
113
  export declare function from<T>(
109
114
  producer: