solid-js 1.7.0 → 1.7.1

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/dev.cjs CHANGED
@@ -1666,12 +1666,11 @@ function Suspense(props) {
1666
1666
  });
1667
1667
  }
1668
1668
 
1669
- exports.DEV = void 0;
1670
- exports.DEV = {
1669
+ const DEV = {
1671
1670
  hooks: DevHooks,
1672
1671
  writeSignal,
1673
1672
  registerGraph
1674
- };
1673
+ } ;
1675
1674
  if (globalThis) {
1676
1675
  if (!globalThis.Solid$$) globalThis.Solid$$ = true;else console.warn("You appear to have multiple instances of Solid. This can lead to unexpected behavior.");
1677
1676
  }
@@ -1679,6 +1678,7 @@ if (globalThis) {
1679
1678
  exports.$DEVCOMP = $DEVCOMP;
1680
1679
  exports.$PROXY = $PROXY;
1681
1680
  exports.$TRACK = $TRACK;
1681
+ exports.DEV = DEV;
1682
1682
  exports.ErrorBoundary = ErrorBoundary;
1683
1683
  exports.For = For;
1684
1684
  exports.Index = Index;
package/dist/dev.js CHANGED
@@ -1664,12 +1664,11 @@ function Suspense(props) {
1664
1664
  });
1665
1665
  }
1666
1666
 
1667
- let DEV;
1668
- DEV = {
1667
+ const DEV = {
1669
1668
  hooks: DevHooks,
1670
1669
  writeSignal,
1671
1670
  registerGraph
1672
- };
1671
+ } ;
1673
1672
  if (globalThis) {
1674
1673
  if (!globalThis.Solid$$) globalThis.Solid$$ = true;else console.warn("You appear to have multiple instances of Solid. This can lead to unexpected behavior.");
1675
1674
  }
package/dist/solid.cjs CHANGED
@@ -1604,7 +1604,7 @@ function Suspense(props) {
1604
1604
  });
1605
1605
  }
1606
1606
 
1607
- let DEV;
1607
+ const DEV = undefined;
1608
1608
 
1609
1609
  exports.$DEVCOMP = $DEVCOMP;
1610
1610
  exports.$PROXY = $PROXY;
package/dist/solid.js CHANGED
@@ -1602,6 +1602,6 @@ function Suspense(props) {
1602
1602
  });
1603
1603
  }
1604
1604
 
1605
- let DEV;
1605
+ const DEV = undefined;
1606
1606
 
1607
1607
  export { $DEVCOMP, $PROXY, $TRACK, DEV, ErrorBoundary, For, Index, Match, Show, Suspense, SuspenseList, Switch, batch, cancelCallback, catchError, children, createComponent, createComputed, createContext, createDeferred, createEffect, createMemo, createReaction, createRenderEffect, createResource, createRoot, createSelector, createSignal, createUniqueId, enableExternalSource, enableHydration, enableScheduling, equalFn, from, getListener, getOwner, indexArray, lazy, mapArray, mergeProps, observable, on, onCleanup, onError, onMount, requestCallback, resetErrorBoundaries, runWithOwner, sharedConfig, splitProps, startTransition, untrack, useContext, useTransition };
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.7.0",
4
+ "version": "1.7.1",
5
5
  "author": "Ryan Carniato",
6
6
  "license": "MIT",
7
7
  "homepage": "https://solidjs.com",
package/types/index.d.ts CHANGED
@@ -8,7 +8,7 @@ import type { JSX } from "./jsx.js";
8
8
  type JSXElement = JSX.Element;
9
9
  export type { JSXElement, JSX };
10
10
  import { registerGraph, writeSignal, DevHooks } from "./reactive/signal.js";
11
- declare let DEV: {
11
+ declare const DEV: {
12
12
  readonly hooks: typeof DevHooks;
13
13
  readonly writeSignal: typeof writeSignal;
14
14
  readonly registerGraph: typeof registerGraph;
package/web/dist/dev.cjs CHANGED
@@ -573,20 +573,15 @@ function Portal(props) {
573
573
  } = props,
574
574
  marker = document.createTextNode(""),
575
575
  mount = () => props.mount || document.body,
576
- content = solidJs.createMemo(renderPortal());
577
- function renderPortal() {
578
- if (solidJs.sharedConfig.context) {
579
- const [s, set] = solidJs.createSignal(false);
580
- solidJs.onMount(() => set(true));
581
- return () => s() && props.children;
582
- } else return () => props.children;
583
- }
576
+ owner = solidJs.getOwner();
577
+ let content;
584
578
  solidJs.createEffect(() => {
579
+ content || (content = solidJs.runWithOwner(owner, () => props.children));
585
580
  const el = mount();
586
581
  if (el instanceof HTMLHeadElement) {
587
582
  const [clean, setClean] = solidJs.createSignal(false);
588
583
  const cleanup = () => setClean(true);
589
- solidJs.createRoot(dispose => insert(el, () => !clean() ? content() : dispose(), null));
584
+ solidJs.createRoot(dispose => insert(el, () => !clean() ? content : dispose(), null));
590
585
  solidJs.onCleanup(cleanup);
591
586
  } else {
592
587
  const container = createElement(props.isSVG ? "g" : "div", props.isSVG),
package/web/dist/dev.js CHANGED
@@ -1,4 +1,4 @@
1
- import { createRoot, createRenderEffect, sharedConfig, untrack, enableHydration, createMemo, createSignal, onMount, createEffect, onCleanup, splitProps, $DEVCOMP } from 'solid-js';
1
+ import { createRoot, createRenderEffect, sharedConfig, untrack, enableHydration, getOwner, createEffect, runWithOwner, createSignal, onCleanup, splitProps, createMemo, $DEVCOMP } from 'solid-js';
2
2
  export { ErrorBoundary, For, Index, Match, Show, Suspense, SuspenseList, Switch, createComponent, createRenderEffect as effect, getOwner, createMemo as memo, mergeProps, untrack } from 'solid-js';
3
3
 
4
4
  const booleans = ["allowfullscreen", "async", "autofocus", "autoplay", "checked", "controls", "default", "disabled", "formnovalidate", "hidden", "indeterminate", "ismap", "loop", "multiple", "muted", "nomodule", "novalidate", "open", "playsinline", "readonly", "required", "reversed", "seamless", "selected"];
@@ -572,20 +572,15 @@ function Portal(props) {
572
572
  } = props,
573
573
  marker = document.createTextNode(""),
574
574
  mount = () => props.mount || document.body,
575
- content = createMemo(renderPortal());
576
- function renderPortal() {
577
- if (sharedConfig.context) {
578
- const [s, set] = createSignal(false);
579
- onMount(() => set(true));
580
- return () => s() && props.children;
581
- } else return () => props.children;
582
- }
575
+ owner = getOwner();
576
+ let content;
583
577
  createEffect(() => {
578
+ content || (content = runWithOwner(owner, () => props.children));
584
579
  const el = mount();
585
580
  if (el instanceof HTMLHeadElement) {
586
581
  const [clean, setClean] = createSignal(false);
587
582
  const cleanup = () => setClean(true);
588
- createRoot(dispose => insert(el, () => !clean() ? content() : dispose(), null));
583
+ createRoot(dispose => insert(el, () => !clean() ? content : dispose(), null));
589
584
  onCleanup(cleanup);
590
585
  } else {
591
586
  const container = createElement(props.isSVG ? "g" : "div", props.isSVG),
package/web/dist/web.cjs CHANGED
@@ -573,20 +573,15 @@ function Portal(props) {
573
573
  } = props,
574
574
  marker = document.createTextNode(""),
575
575
  mount = () => props.mount || document.body,
576
- content = solidJs.createMemo(renderPortal());
577
- function renderPortal() {
578
- if (solidJs.sharedConfig.context) {
579
- const [s, set] = solidJs.createSignal(false);
580
- solidJs.onMount(() => set(true));
581
- return () => s() && props.children;
582
- } else return () => props.children;
583
- }
576
+ owner = solidJs.getOwner();
577
+ let content;
584
578
  solidJs.createEffect(() => {
579
+ content || (content = solidJs.runWithOwner(owner, () => props.children));
585
580
  const el = mount();
586
581
  if (el instanceof HTMLHeadElement) {
587
582
  const [clean, setClean] = solidJs.createSignal(false);
588
583
  const cleanup = () => setClean(true);
589
- solidJs.createRoot(dispose => insert(el, () => !clean() ? content() : dispose(), null));
584
+ solidJs.createRoot(dispose => insert(el, () => !clean() ? content : dispose(), null));
590
585
  solidJs.onCleanup(cleanup);
591
586
  } else {
592
587
  const container = createElement(props.isSVG ? "g" : "div", props.isSVG),
package/web/dist/web.js CHANGED
@@ -1,4 +1,4 @@
1
- import { createRoot, createRenderEffect, sharedConfig, untrack, enableHydration, createMemo, createSignal, onMount, createEffect, onCleanup, splitProps, $DEVCOMP } from 'solid-js';
1
+ import { createRoot, createRenderEffect, sharedConfig, untrack, enableHydration, getOwner, createEffect, runWithOwner, createSignal, onCleanup, splitProps, createMemo, $DEVCOMP } from 'solid-js';
2
2
  export { ErrorBoundary, For, Index, Match, Show, Suspense, SuspenseList, Switch, createComponent, createRenderEffect as effect, getOwner, createMemo as memo, mergeProps, untrack } from 'solid-js';
3
3
 
4
4
  const booleans = ["allowfullscreen", "async", "autofocus", "autoplay", "checked", "controls", "default", "disabled", "formnovalidate", "hidden", "indeterminate", "ismap", "loop", "multiple", "muted", "nomodule", "novalidate", "open", "playsinline", "readonly", "required", "reversed", "seamless", "selected"];
@@ -572,20 +572,15 @@ function Portal(props) {
572
572
  } = props,
573
573
  marker = document.createTextNode(""),
574
574
  mount = () => props.mount || document.body,
575
- content = createMemo(renderPortal());
576
- function renderPortal() {
577
- if (sharedConfig.context) {
578
- const [s, set] = createSignal(false);
579
- onMount(() => set(true));
580
- return () => s() && props.children;
581
- } else return () => props.children;
582
- }
575
+ owner = getOwner();
576
+ let content;
583
577
  createEffect(() => {
578
+ content || (content = runWithOwner(owner, () => props.children));
584
579
  const el = mount();
585
580
  if (el instanceof HTMLHeadElement) {
586
581
  const [clean, setClean] = createSignal(false);
587
582
  const cleanup = () => setClean(true);
588
- createRoot(dispose => insert(el, () => !clean() ? content() : dispose(), null));
583
+ createRoot(dispose => insert(el, () => !clean() ? content : dispose(), null));
589
584
  onCleanup(cleanup);
590
585
  } else {
591
586
  const container = createElement(props.isSVG ? "g" : "div", props.isSVG),