🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

@solidjs/web

Package Overview
Dependencies
Maintainers
2
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@solidjs/web - npm Package Compare versions

Comparing version
2.0.0-beta.9
to
2.0.0-beta.10
+29
storage/types-cjs/src/jsx.d.cts
import type { ArrayElement as SolidArrayElement, Element as SolidElement } from "solid-js";
import type { JSX as DOMJSX } from "dom-expressions/src/jsx.js";
export declare namespace JSX {
type WithSolidChildren<T> = Omit<T, "children"> & {
children?: Element;
};
export type Element = SolidElement;
export interface ArrayElement extends SolidArrayElement {
}
export interface ElementClass extends DOMJSX.ElementClass {
}
export interface ElementAttributesProperty extends DOMJSX.ElementAttributesProperty {
}
export interface ElementChildrenAttribute extends DOMJSX.ElementChildrenAttribute {
}
export interface IntrinsicAttributes extends DOMJSX.IntrinsicAttributes {
}
export type IntrinsicElements = {
[K in keyof DOMJSX.IntrinsicElements]: WithSolidChildren<DOMJSX.IntrinsicElements[K]>;
};
export type HTMLAttributes<T> = WithSolidChildren<DOMJSX.HTMLAttributes<T>>;
export type SVGAttributes<T> = WithSolidChildren<DOMJSX.SVGAttributes<T>>;
export type MathMLAttributes<T> = WithSolidChildren<DOMJSX.MathMLAttributes<T>>;
export interface CustomEvents extends DOMJSX.CustomEvents {
}
export type EventHandler<T, E extends Event> = DOMJSX.EventHandler<T, E>;
export type EventHandlerUnion<T, E extends Event> = DOMJSX.EventHandlerUnion<T, E>;
export {};
}
import type { ArrayElement as SolidArrayElement, Element as SolidElement } from "solid-js";
import type { JSX as DOMJSX } from "dom-expressions/src/jsx.js";
export declare namespace JSX {
type WithSolidChildren<T> = Omit<T, "children"> & {
children?: Element;
};
export type Element = SolidElement;
export interface ArrayElement extends SolidArrayElement {
}
export interface ElementClass extends DOMJSX.ElementClass {
}
export interface ElementAttributesProperty extends DOMJSX.ElementAttributesProperty {
}
export interface ElementChildrenAttribute extends DOMJSX.ElementChildrenAttribute {
}
export interface IntrinsicAttributes extends DOMJSX.IntrinsicAttributes {
}
export type IntrinsicElements = {
[K in keyof DOMJSX.IntrinsicElements]: WithSolidChildren<DOMJSX.IntrinsicElements[K]>;
};
export type HTMLAttributes<T> = WithSolidChildren<DOMJSX.HTMLAttributes<T>>;
export type SVGAttributes<T> = WithSolidChildren<DOMJSX.SVGAttributes<T>>;
export type MathMLAttributes<T> = WithSolidChildren<DOMJSX.MathMLAttributes<T>>;
export interface CustomEvents extends DOMJSX.CustomEvents {
}
export type EventHandler<T, E extends Event> = DOMJSX.EventHandler<T, E>;
export type EventHandlerUnion<T, E extends Event> = DOMJSX.EventHandlerUnion<T, E>;
export {};
}
/**
* Shared type-level helpers used to derive `prop:*` attribute typings from
* DOM element interfaces (e.g. `HTMLInputElement`, `HTMLButtonElement`).
*
* The wrapping of each value (`FunctionMaybe<T>` in `jsx-h.d.ts` vs. the
* raw value in `jsx.d.ts`) is applied by each consumer when composing its
* own `Properties<T>` mapped type. That way this file stays identical in
* both reactive and non-reactive contexts and only needs to exist once.
*
* originally from
* @url https://github.com/potahtml/pota
*/
/** Base-class properties shared by all elements — skipped from `prop:*`. */
export type SkipPropsFrom = HTMLUnknownElement & HTMLElement & Element & Node;
/**
* Value types allowed on a `prop:*`. Primitives plus the writable
* non-primitive DOM-object props worth exposing:
*
* - `HTMLMediaElement.srcObject`
* - `HTMLButtonElement.popoverTargetElement` / `commandForElement` (and the same via
* `PopoverTargetAttributes` mixin on `HTMLInputElement`)
*/
export type PropValue =
| string
| number
| boolean
| null
| MediaStream
| MediaSource
| Blob
| File
| Element;
/**
* Ergonomics widening for emitted `prop:*` value types:
*
* - general `string` → `string | number` (HTML coerces numbers)
* - string literal unions (`'on' | 'off'`) stay exact, so users still get autocomplete /
* narrowing
* - other types pass through unchanged
*/
type WidenString<V> = string extends V ? string | number : V;
export type WidenPropValue<V> = [V] extends [string] ? WidenString<V> : V;
/**
* Structurally identical → `Y`; distinct → `N`. Used by `IsReadonlyKey` to detect
* readonly keys by comparing `Pick<T, K>` with `Readonly<Pick<T, K>>`.
*/
export type IfEquals<A, B, Y = unknown, N = never> =
(<T>() => T extends A ? 1 : 2) extends <T>() => T extends B ? 1 : 2 ? Y : N;
/**
* True when `K` is readonly on `T`. Singleton-constant properties (e.g.
* `tagName: "INPUT"`, `nodeType: 1`) are always `readonly` in `lib.dom.d.ts`, so this
* single check covers both readonly and singleton-literal cases.
*/
export type IsReadonlyKey<T, K extends keyof T> = IfEquals<
Pick<T, K>,
Readonly<Pick<T, K>>,
true,
false
>;
/**
* Resolves to the `prop:K` string literal when `K` is a writable, element-specific
* property suitable for a `prop:*` attribute; otherwise resolves to `never` so the
* key is filtered out of the resulting mapped type.
*
* Filters out:
*
* - base-class keys (via `SkipPropsFrom`)
* - aria-* keys (already typed via `AriaAttributes`)
* - readonly keys
* - keys whose value types fall outside `PropValue`
* - the generic `string` index signature (e.g. `HTMLFormElement[name: string]: any`),
* which would otherwise shadow every key with an `any`-typed `prop:*`
*/
export type PropKey<T, K extends keyof T> = K extends keyof SkipPropsFrom
? never
: K extends string
? string extends K
? never
: K extends `aria${string}`
? never
: T[K] extends PropValue
? IsReadonlyKey<T, K> extends true
? never
: `prop:${K}`
: never
: never;
/**
* Shared type-level helpers used to derive `prop:*` attribute typings from
* DOM element interfaces (e.g. `HTMLInputElement`, `HTMLButtonElement`).
*
* The wrapping of each value (`FunctionMaybe<T>` in `jsx-h.d.ts` vs. the
* raw value in `jsx.d.ts`) is applied by each consumer when composing its
* own `Properties<T>` mapped type. That way this file stays identical in
* both reactive and non-reactive contexts and only needs to exist once.
*
* originally from
* @url https://github.com/potahtml/pota
*/
/** Base-class properties shared by all elements — skipped from `prop:*`. */
export type SkipPropsFrom = HTMLUnknownElement & HTMLElement & Element & Node;
/**
* Value types allowed on a `prop:*`. Primitives plus the writable
* non-primitive DOM-object props worth exposing:
*
* - `HTMLMediaElement.srcObject`
* - `HTMLButtonElement.popoverTargetElement` / `commandForElement` (and the same via
* `PopoverTargetAttributes` mixin on `HTMLInputElement`)
*/
export type PropValue =
| string
| number
| boolean
| null
| MediaStream
| MediaSource
| Blob
| File
| Element;
/**
* Ergonomics widening for emitted `prop:*` value types:
*
* - general `string` → `string | number` (HTML coerces numbers)
* - string literal unions (`'on' | 'off'`) stay exact, so users still get autocomplete /
* narrowing
* - other types pass through unchanged
*/
type WidenString<V> = string extends V ? string | number : V;
export type WidenPropValue<V> = [V] extends [string] ? WidenString<V> : V;
/**
* Structurally identical → `Y`; distinct → `N`. Used by `IsReadonlyKey` to detect
* readonly keys by comparing `Pick<T, K>` with `Readonly<Pick<T, K>>`.
*/
export type IfEquals<A, B, Y = unknown, N = never> =
(<T>() => T extends A ? 1 : 2) extends <T>() => T extends B ? 1 : 2 ? Y : N;
/**
* True when `K` is readonly on `T`. Singleton-constant properties (e.g.
* `tagName: "INPUT"`, `nodeType: 1`) are always `readonly` in `lib.dom.d.ts`, so this
* single check covers both readonly and singleton-literal cases.
*/
export type IsReadonlyKey<T, K extends keyof T> = IfEquals<
Pick<T, K>,
Readonly<Pick<T, K>>,
true,
false
>;
/**
* Resolves to the `prop:K` string literal when `K` is a writable, element-specific
* property suitable for a `prop:*` attribute; otherwise resolves to `never` so the
* key is filtered out of the resulting mapped type.
*
* Filters out:
*
* - base-class keys (via `SkipPropsFrom`)
* - aria-* keys (already typed via `AriaAttributes`)
* - readonly keys
* - keys whose value types fall outside `PropValue`
* - the generic `string` index signature (e.g. `HTMLFormElement[name: string]: any`),
* which would otherwise shadow every key with an `any`-typed `prop:*`
*/
export type PropKey<T, K extends keyof T> = K extends keyof SkipPropsFrom
? never
: K extends string
? string extends K
? never
: K extends `aria${string}`
? never
: T[K] extends PropValue
? IsReadonlyKey<T, K> extends true
? never
: `prop:${K}`
: never
: never;
+4
-5

@@ -130,3 +130,4 @@ 'use strict';

if (element === document) {
solidJs.flatten(code);
const tree = code();
effect(() => solidJs.flatten(tree), () => {});
} else {

@@ -735,2 +736,3 @@ const tree = code();

const mergeProps = solidJs.merge;
const isServer = false;

@@ -873,6 +875,2 @@ const isDev = true;

});
Object.defineProperty(exports, "mergeProps", {
enumerable: true,
get: function () { return solidJs.merge; }
});
Object.defineProperty(exports, "untrack", {

@@ -920,2 +918,3 @@ enumerable: true,

exports.memo = memo;
exports.mergeProps = mergeProps;
exports.ref = ref;

@@ -922,0 +921,0 @@ exports.render = render;

@@ -1,3 +0,3 @@

import { createRenderEffect, createMemo, sharedConfig, untrack, runWithOwner, flatten, createRoot, createComponent, omit, $DEVCOMP, enableHydration, enforceLoadingBoundary, flush } from 'solid-js';
export { Errored, For, Hydration, Loading, Match, NoHydration, Repeat, Reveal, Show, Switch, createComponent, getOwner, merge as mergeProps, untrack } from 'solid-js';
import { createRenderEffect, createMemo, sharedConfig, untrack, runWithOwner, flatten, createRoot, merge, createComponent, omit, $DEVCOMP, enableHydration, enforceLoadingBoundary, flush } from 'solid-js';
export { Errored, For, Hydration, Loading, Match, NoHydration, Repeat, Reveal, Show, Switch, createComponent, getOwner, untrack } from 'solid-js';

@@ -129,3 +129,4 @@ const DOMWithState = {

if (element === document) {
flatten(code);
const tree = code();
effect(() => flatten(tree), () => {});
} else {

@@ -734,2 +735,3 @@ const tree = code();

const mergeProps = merge;
const isServer = false;

@@ -824,2 +826,2 @@ const isDev = true;

export { voidFn as Assets, ChildProperties, DOMElements, DOMWithState, DelegatedEvents, Dynamic, voidFn as HydrationScript, MathMLElements, Namespaces, Portal, RawTextElements, RequestContext, SVGElements, VoidElements, addEventListener, applyRef, assign, className, clearDelegatedEvents, delegateEvents, dynamic, dynamicProperty, effect, escape, voidFn as generateHydrationScript, voidFn as getAssets, getFirstChild, getHydrationKey, getNextElement, getNextMarker, getNextMatch, getNextSibling, voidFn as getRequestEvent, hydrate, insert, isDev, isServer, memo, ref, render, renderToStream, renderToString, renderToStringAsync, resolveSSRNode, runHydrationEvents, setAttribute, setAttributeNS, setProperty, setStyleProperty, spread, ssr, ssrAttribute, ssrClassList, ssrElement, ssrHydrationKey, ssrStyle, style, template, voidFn as useAssets };
export { voidFn as Assets, ChildProperties, DOMElements, DOMWithState, DelegatedEvents, Dynamic, voidFn as HydrationScript, MathMLElements, Namespaces, Portal, RawTextElements, RequestContext, SVGElements, VoidElements, addEventListener, applyRef, assign, className, clearDelegatedEvents, delegateEvents, dynamic, dynamicProperty, effect, escape, voidFn as generateHydrationScript, voidFn as getAssets, getFirstChild, getHydrationKey, getNextElement, getNextMarker, getNextMatch, getNextSibling, voidFn as getRequestEvent, hydrate, insert, isDev, isServer, memo, mergeProps, ref, render, renderToStream, renderToString, renderToStringAsync, resolveSSRNode, runHydrationEvents, setAttribute, setAttributeNS, setProperty, setStyleProperty, spread, ssr, ssrAttribute, ssrClassList, ssrElement, ssrHydrationKey, ssrStyle, style, template, voidFn as useAssets };

@@ -127,3 +127,4 @@ 'use strict';

if (element === document) {
solidJs.flatten(code);
const tree = code();
effect(() => solidJs.flatten(tree), () => {});
} else {

@@ -678,2 +679,3 @@ const tree = code();

const mergeProps = solidJs.merge;
const isServer = false;

@@ -811,6 +813,2 @@ const isDev = false;

});
Object.defineProperty(exports, "mergeProps", {
enumerable: true,
get: function () { return solidJs.merge; }
});
Object.defineProperty(exports, "untrack", {

@@ -858,2 +856,3 @@ enumerable: true,

exports.memo = memo;
exports.mergeProps = mergeProps;
exports.ref = ref;

@@ -860,0 +859,0 @@ exports.render = render;

@@ -1,3 +0,3 @@

import { createRenderEffect, createMemo, sharedConfig, untrack, runWithOwner, flatten, createRoot, createComponent, omit, enableHydration, flush } from 'solid-js';
export { Errored, For, Hydration, Loading, Match, NoHydration, Repeat, Reveal, Show, Switch, createComponent, getOwner, merge as mergeProps, untrack } from 'solid-js';
import { createRenderEffect, createMemo, sharedConfig, untrack, runWithOwner, flatten, createRoot, merge, createComponent, omit, enableHydration, flush } from 'solid-js';
export { Errored, For, Hydration, Loading, Match, NoHydration, Repeat, Reveal, Show, Switch, createComponent, getOwner, untrack } from 'solid-js';

@@ -126,3 +126,4 @@ const DOMWithState = {

if (element === document) {
flatten(code);
const tree = code();
effect(() => flatten(tree), () => {});
} else {

@@ -677,2 +678,3 @@ const tree = code();

const mergeProps = merge;
const isServer = false;

@@ -762,2 +764,2 @@ const isDev = false;

export { voidFn as Assets, ChildProperties, DOMElements, DOMWithState, DelegatedEvents, Dynamic, voidFn as HydrationScript, MathMLElements, Namespaces, Portal, RawTextElements, RequestContext, SVGElements, VoidElements, addEventListener, applyRef, assign, className, clearDelegatedEvents, delegateEvents, dynamic, dynamicProperty, effect, escape, voidFn as generateHydrationScript, voidFn as getAssets, getFirstChild, getHydrationKey, getNextElement, getNextMarker, getNextMatch, getNextSibling, voidFn as getRequestEvent, hydrate, insert, isDev, isServer, memo, ref, render, renderToStream, renderToString, renderToStringAsync, resolveSSRNode, runHydrationEvents, setAttribute, setAttributeNS, setProperty, setStyleProperty, spread, ssr, ssrAttribute, ssrClassList, ssrElement, ssrHydrationKey, ssrStyle, style, template, voidFn as useAssets };
export { voidFn as Assets, ChildProperties, DOMElements, DOMWithState, DelegatedEvents, Dynamic, voidFn as HydrationScript, MathMLElements, Namespaces, Portal, RawTextElements, RequestContext, SVGElements, VoidElements, addEventListener, applyRef, assign, className, clearDelegatedEvents, delegateEvents, dynamic, dynamicProperty, effect, escape, voidFn as generateHydrationScript, voidFn as getAssets, getFirstChild, getHydrationKey, getNextElement, getNextMarker, getNextMatch, getNextSibling, voidFn as getRequestEvent, hydrate, insert, isDev, isServer, memo, mergeProps, ref, render, renderToStream, renderToString, renderToStringAsync, resolveSSRNode, runHydrationEvents, setAttribute, setAttributeNS, setProperty, setStyleProperty, spread, ssr, ssrAttribute, ssrClassList, ssrElement, ssrHydrationKey, ssrStyle, style, template, voidFn as useAssets };
{
"name": "@solidjs/web",
"description": "Solid's web runtime: client rendering, hydration, SSR, and DOM-specific control flow (Portal, Dynamic).",
"version": "2.0.0-beta.9",
"version": "2.0.0-beta.10",
"author": "Ryan Carniato",

@@ -103,2 +103,22 @@ "license": "MIT",

},
"./jsx-runtime": {
"import": {
"types": "./types/jsx.d.ts",
"default": "./dist/web.js"
},
"require": {
"types": "./types-cjs/jsx.d.cts",
"default": "./dist/web.cjs"
}
},
"./jsx-dev-runtime": {
"import": {
"types": "./types/jsx.d.ts",
"default": "./dist/dev.js"
},
"require": {
"types": "./types-cjs/jsx.d.cts",
"default": "./dist/dev.cjs"
}
},
"./storage": {

@@ -121,16 +141,17 @@ "import": {

"peerDependencies": {
"solid-js": "^2.0.0-beta.9"
"solid-js": "^2.0.0-beta.10"
},
"devDependencies": {
"solid-js": "2.0.0-beta.9"
"solid-js": "2.0.0-beta.10"
},
"scripts": {
"build": "npm-run-all -nl build:*",
"build": "npm-run-all -nl build:clean types:copy-jsx build:js",
"build:clean": "rimraf dist/",
"build:js": "rollup -c",
"link": "symlink-dir . node_modules/@solidjs/web",
"types": "npm-run-all -nl types:clean types:web types:copy-web types:web-storage types:cjs",
"types": "npm-run-all -nl types:clean types:copy-jsx types:web types:copy-web types:web-storage types:cjs",
"types:clean": "rimraf types/ types-cjs/ storage/types-cjs/",
"types:copy-jsx": "ncp ../../node_modules/dom-expressions/src/jsx.d.ts ./src/jsx.d.ts && ncp ../../node_modules/dom-expressions/src/jsx-properties.d.ts ./src/jsx-properties.d.ts && dom-expressions-jsx-types --input ./src/jsx.d.ts --element \"SolidElement | Node | ArrayElement\" --import 'import type { Element as SolidElement } from \"solid-js\";'",
"types:web": "tsc --project ./tsconfig.build.json",
"types:copy-web": "ncp ../../node_modules/dom-expressions/src/client.d.ts ./types/client.d.ts && ncp ../../node_modules/dom-expressions/src/server.d.ts ./types/server.d.ts",
"types:copy-web": "ncp ../../node_modules/dom-expressions/src/client.d.ts ./types/client.d.ts && ncp ../../node_modules/dom-expressions/src/server.d.ts ./types/server.d.ts && ncp ./src/jsx.d.ts ./types/jsx.d.ts && ncp ./src/jsx-properties.d.ts ./types/jsx-properties.d.ts",
"types:web-storage": "tsc --project ./storage/tsconfig.build.json",

@@ -141,4 +162,5 @@ "types:cjs": "node ../../scripts/sync-dual-types.mjs ./types ./types-cjs ./storage/types ./storage/types-cjs",

"coverage": "vitest run --coverage",
"test-types": "tsc --project tsconfig.test.json"
"test-types": "npm-run-all -nl types test-types:tsc",
"test-types:tsc": "tsc --project tsconfig.test.json"
}
}
import { hydrate as hydrateCore } from "./client.cjs";
import { JSX, Component, ComponentProps, ValidComponent } from "solid-js";
import { Component } from "solid-js";
import type { JSX } from "./jsx.cjs";
export * from "./client.cjs";
export * from "./server-mock.cjs";
export { For, Show, Switch, Match, Errored, Loading, Repeat, Reveal, NoHydration, Hydration, merge as mergeProps } from "solid-js";
export type { JSX } from "./jsx.cjs";
export { For, Show, Switch, Match, Errored, Loading, Repeat, Reveal, NoHydration, Hydration } from "solid-js";
import { merge } from "solid-js";
/**
* Compiler-emitted prop-spread helper. The JSX transform (in
* `dom-expressions`) emits `mergeProps(...)` calls when compiling prop
* spreads on components — it is *not* a user-facing API. Application code
* should import `merge` from `solid-js` directly.
*
* @internal
*/
export declare const mergeProps: typeof merge;
/**
* Build-time constant indicating whether code is running on the server. This
* client entry sets it to `false`; the matching server entry (`@solidjs/web`
* resolved through the `solid` server export condition) sets it to `true`.
*
* Bundlers can dead-code-eliminate branches gated on `isServer`, so guarding
* browser-only code with `if (!isServer) {…}` keeps it out of the SSR bundle
* entirely.
*
* @example
* ```ts
* import { isServer } from "@solidjs/web";
*
* if (!isServer) {
* // Browser-only: tree-shaken out of the SSR bundle.
* window.addEventListener("resize", onResize);
* }
* ```
*/
export declare const isServer: boolean;
/**
* Build-time constant indicating whether code is running in a dev build.
* Replaced statically (`_SOLID_DEV_`) by the bundler integration, so guards
* like `if (isDev) {…}` are stripped from production builds.
*
* Use this to gate dev-only diagnostics, warnings, or expensive invariants
* that should never ship to production.
*
* @example
* ```ts
* import { isDev } from "@solidjs/web";
*
* if (isDev) {
* console.warn("debug-only path");
* }
* ```
*/
export declare const isDev: boolean;
type MountableElement = Element | Document | ShadowRoot | DocumentFragment | Node;
export type IntrinsicElement = Extract<keyof JSX.IntrinsicElements, string>;
export type ValidComponent = IntrinsicElement | Component<any> | (string & {});
export type ComponentProps<T extends ValidComponent> = T extends Component<infer P> ? P : T extends keyof JSX.IntrinsicElements ? JSX.IntrinsicElements[T] : Record<string, unknown>;
export type DynamicProps<T extends ValidComponent, P = ComponentProps<T>> = {

@@ -82,3 +133,3 @@ [K in keyof P]: P[K];

children: JSX.Element;
}): Text;
}): JSX.Element;
/**

@@ -92,8 +143,11 @@ * Returns a stable `Component` whose identity is driven by a reactive (and

* propagates as `NotReadyError` through the surrounding reactive scope, so
* async swaps compose with `Loading`/Suspense boundaries the same way as
* `lazy`.
* async swaps compose with `<Loading>` boundaries the same way as `lazy`.
*
* ```typescript
* const User = dynamic(() => getUserComp(props.id));
* return <User>client content</User>;
* @example
* ```tsx
* // `source` can return either a custom Component or a native tag
* // name — they're interchangeable, and the returned reference is a
* // stable Component you can use anywhere a normal one would go.
* const Field = dynamic(() => multiline() ? RichTextEditor : "input");
* return <Field value={value()} onInput={onInput} />;
* ```

@@ -105,8 +159,16 @@ *

/**
* Renders an arbitrary custom or native component and passes the other props
* ```typescript
* <Dynamic component={multiline() ? 'textarea' : 'input'} value={value()} />
* Renders an arbitrary custom or native component and forwards the other
* props. JSX form of `dynamic()` — same primitive, picked at the JSX site.
*
* @example
* ```tsx
* <Dynamic
* component={multiline() ? RichTextEditor : "input"}
* value={value()}
* onInput={onInput}
* />
* ```
*
* @description https://docs.solidjs.com/reference/components/dynamic
*/
export declare function Dynamic<T extends ValidComponent>(props: DynamicProps<T>): JSX.Element;

@@ -106,25 +106,57 @@ /**

};
/** Compiler primitive — emitted by JSX-DOM-Expressions for tagged-template SSR output. Not meant for hand-written code. */
/**
* Compiler primitive — emitted by JSX-DOM-Expressions for tagged-template
* SSR output. Not meant for hand-written code.
* @internal
*/
export declare function ssr(template: string[] | string, ...nodes: any[]): {
t: string;
};
/** Compiler primitive — emitted by JSX-DOM-Expressions for SSR element output. Not meant for hand-written code. */
/**
* Compiler primitive — emitted by JSX-DOM-Expressions for SSR element
* output. Not meant for hand-written code.
* @internal
*/
export declare function ssrElement(name: string, props: any, children: any, needsId: boolean): {
t: string;
};
/** Compiler primitive — serializes a classList object for SSR output. Not meant for hand-written code. */
/**
* Compiler primitive — serializes a classList object for SSR output. Not
* meant for hand-written code.
* @internal
*/
export declare function ssrClassList(value: {
[k: string]: boolean;
}): string;
/** Compiler primitive — serializes a style object for SSR output. Not meant for hand-written code. */
/**
* Compiler primitive — serializes a style object for SSR output. Not meant
* for hand-written code.
* @internal
*/
export declare function ssrStyle(value: {
[k: string]: string;
}): string;
/** Compiler primitive — serializes a boolean attribute for SSR output. Not meant for hand-written code. */
/**
* Compiler primitive — serializes a boolean attribute for SSR output. Not
* meant for hand-written code.
* @internal
*/
export declare function ssrAttribute(key: string, value: boolean): string;
/** Compiler primitive — generates the hydration-key attribute for SSR output. Not meant for hand-written code. */
/**
* Compiler primitive — generates the hydration-key attribute for SSR
* output. Not meant for hand-written code.
* @internal
*/
export declare function ssrHydrationKey(): string;
/** Compiler primitive — collapses an SSR-shaped node into its HTML string. Not meant for hand-written code. */
/**
* Compiler primitive — collapses an SSR-shaped node into its HTML string.
* Not meant for hand-written code.
* @internal
*/
export declare function resolveSSRNode(node: any): string;
/** Escapes a string for safe inclusion in HTML output. Useful when constructing SSR fragments by hand. */
/**
* Escapes a string for safe inclusion in HTML output. Used by the SSR
* runtime; not generally part of user code.
* @internal
*/
export declare function escape(html: string): string;
import { hydrate as hydrateCore } from "./client.js";
import { JSX, Component, ComponentProps, ValidComponent } from "solid-js";
import { Component } from "solid-js";
import type { JSX } from "./jsx.js";
export * from "./client.js";
export * from "./server-mock.js";
export { For, Show, Switch, Match, Errored, Loading, Repeat, Reveal, NoHydration, Hydration, merge as mergeProps } from "solid-js";
export type { JSX } from "./jsx.js";
export { For, Show, Switch, Match, Errored, Loading, Repeat, Reveal, NoHydration, Hydration } from "solid-js";
import { merge } from "solid-js";
/**
* Compiler-emitted prop-spread helper. The JSX transform (in
* `dom-expressions`) emits `mergeProps(...)` calls when compiling prop
* spreads on components — it is *not* a user-facing API. Application code
* should import `merge` from `solid-js` directly.
*
* @internal
*/
export declare const mergeProps: typeof merge;
/**
* Build-time constant indicating whether code is running on the server. This
* client entry sets it to `false`; the matching server entry (`@solidjs/web`
* resolved through the `solid` server export condition) sets it to `true`.
*
* Bundlers can dead-code-eliminate branches gated on `isServer`, so guarding
* browser-only code with `if (!isServer) {…}` keeps it out of the SSR bundle
* entirely.
*
* @example
* ```ts
* import { isServer } from "@solidjs/web";
*
* if (!isServer) {
* // Browser-only: tree-shaken out of the SSR bundle.
* window.addEventListener("resize", onResize);
* }
* ```
*/
export declare const isServer: boolean;
/**
* Build-time constant indicating whether code is running in a dev build.
* Replaced statically (`_SOLID_DEV_`) by the bundler integration, so guards
* like `if (isDev) {…}` are stripped from production builds.
*
* Use this to gate dev-only diagnostics, warnings, or expensive invariants
* that should never ship to production.
*
* @example
* ```ts
* import { isDev } from "@solidjs/web";
*
* if (isDev) {
* console.warn("debug-only path");
* }
* ```
*/
export declare const isDev: boolean;
type MountableElement = Element | Document | ShadowRoot | DocumentFragment | Node;
export type IntrinsicElement = Extract<keyof JSX.IntrinsicElements, string>;
export type ValidComponent = IntrinsicElement | Component<any> | (string & {});
export type ComponentProps<T extends ValidComponent> = T extends Component<infer P> ? P : T extends keyof JSX.IntrinsicElements ? JSX.IntrinsicElements[T] : Record<string, unknown>;
export type DynamicProps<T extends ValidComponent, P = ComponentProps<T>> = {

@@ -82,3 +133,3 @@ [K in keyof P]: P[K];

children: JSX.Element;
}): Text;
}): JSX.Element;
/**

@@ -92,8 +143,11 @@ * Returns a stable `Component` whose identity is driven by a reactive (and

* propagates as `NotReadyError` through the surrounding reactive scope, so
* async swaps compose with `Loading`/Suspense boundaries the same way as
* `lazy`.
* async swaps compose with `<Loading>` boundaries the same way as `lazy`.
*
* ```typescript
* const User = dynamic(() => getUserComp(props.id));
* return <User>client content</User>;
* @example
* ```tsx
* // `source` can return either a custom Component or a native tag
* // name — they're interchangeable, and the returned reference is a
* // stable Component you can use anywhere a normal one would go.
* const Field = dynamic(() => multiline() ? RichTextEditor : "input");
* return <Field value={value()} onInput={onInput} />;
* ```

@@ -105,8 +159,16 @@ *

/**
* Renders an arbitrary custom or native component and passes the other props
* ```typescript
* <Dynamic component={multiline() ? 'textarea' : 'input'} value={value()} />
* Renders an arbitrary custom or native component and forwards the other
* props. JSX form of `dynamic()` — same primitive, picked at the JSX site.
*
* @example
* ```tsx
* <Dynamic
* component={multiline() ? RichTextEditor : "input"}
* value={value()}
* onInput={onInput}
* />
* ```
*
* @description https://docs.solidjs.com/reference/components/dynamic
*/
export declare function Dynamic<T extends ValidComponent>(props: DynamicProps<T>): JSX.Element;

@@ -106,25 +106,57 @@ /**

};
/** Compiler primitive — emitted by JSX-DOM-Expressions for tagged-template SSR output. Not meant for hand-written code. */
/**
* Compiler primitive — emitted by JSX-DOM-Expressions for tagged-template
* SSR output. Not meant for hand-written code.
* @internal
*/
export declare function ssr(template: string[] | string, ...nodes: any[]): {
t: string;
};
/** Compiler primitive — emitted by JSX-DOM-Expressions for SSR element output. Not meant for hand-written code. */
/**
* Compiler primitive — emitted by JSX-DOM-Expressions for SSR element
* output. Not meant for hand-written code.
* @internal
*/
export declare function ssrElement(name: string, props: any, children: any, needsId: boolean): {
t: string;
};
/** Compiler primitive — serializes a classList object for SSR output. Not meant for hand-written code. */
/**
* Compiler primitive — serializes a classList object for SSR output. Not
* meant for hand-written code.
* @internal
*/
export declare function ssrClassList(value: {
[k: string]: boolean;
}): string;
/** Compiler primitive — serializes a style object for SSR output. Not meant for hand-written code. */
/**
* Compiler primitive — serializes a style object for SSR output. Not meant
* for hand-written code.
* @internal
*/
export declare function ssrStyle(value: {
[k: string]: string;
}): string;
/** Compiler primitive — serializes a boolean attribute for SSR output. Not meant for hand-written code. */
/**
* Compiler primitive — serializes a boolean attribute for SSR output. Not
* meant for hand-written code.
* @internal
*/
export declare function ssrAttribute(key: string, value: boolean): string;
/** Compiler primitive — generates the hydration-key attribute for SSR output. Not meant for hand-written code. */
/**
* Compiler primitive — generates the hydration-key attribute for SSR
* output. Not meant for hand-written code.
* @internal
*/
export declare function ssrHydrationKey(): string;
/** Compiler primitive — collapses an SSR-shaped node into its HTML string. Not meant for hand-written code. */
/**
* Compiler primitive — collapses an SSR-shaped node into its HTML string.
* Not meant for hand-written code.
* @internal
*/
export declare function resolveSSRNode(node: any): string;
/** Escapes a string for safe inclusion in HTML output. Useful when constructing SSR fragments by hand. */
/**
* Escapes a string for safe inclusion in HTML output. Used by the SSR
* runtime; not generally part of user code.
* @internal
*/
export declare function escape(html: string): string;
import { hydrate as hydrateCore } from "./client.cjs";
import { JSX, Component, ComponentProps, ValidComponent } from "solid-js";
import { Component } from "solid-js";
import type { JSX } from "./jsx.cjs";
export * from "./client.cjs";
export * from "./server-mock.cjs";
export { For, Show, Switch, Match, Errored, Loading, Repeat, Reveal, NoHydration, Hydration, merge as mergeProps } from "solid-js";
export type { JSX } from "./jsx.cjs";
export { For, Show, Switch, Match, Errored, Loading, Repeat, Reveal, NoHydration, Hydration } from "solid-js";
import { merge } from "solid-js";
/**
* Compiler-emitted prop-spread helper. The JSX transform (in
* `dom-expressions`) emits `mergeProps(...)` calls when compiling prop
* spreads on components — it is *not* a user-facing API. Application code
* should import `merge` from `solid-js` directly.
*
* @internal
*/
export declare const mergeProps: typeof merge;
/**
* Build-time constant indicating whether code is running on the server. This
* client entry sets it to `false`; the matching server entry (`@solidjs/web`
* resolved through the `solid` server export condition) sets it to `true`.
*
* Bundlers can dead-code-eliminate branches gated on `isServer`, so guarding
* browser-only code with `if (!isServer) {…}` keeps it out of the SSR bundle
* entirely.
*
* @example
* ```ts
* import { isServer } from "@solidjs/web";
*
* if (!isServer) {
* // Browser-only: tree-shaken out of the SSR bundle.
* window.addEventListener("resize", onResize);
* }
* ```
*/
export declare const isServer: boolean;
/**
* Build-time constant indicating whether code is running in a dev build.
* Replaced statically (`_SOLID_DEV_`) by the bundler integration, so guards
* like `if (isDev) {…}` are stripped from production builds.
*
* Use this to gate dev-only diagnostics, warnings, or expensive invariants
* that should never ship to production.
*
* @example
* ```ts
* import { isDev } from "@solidjs/web";
*
* if (isDev) {
* console.warn("debug-only path");
* }
* ```
*/
export declare const isDev: boolean;
type MountableElement = Element | Document | ShadowRoot | DocumentFragment | Node;
export type IntrinsicElement = Extract<keyof JSX.IntrinsicElements, string>;
export type ValidComponent = IntrinsicElement | Component<any> | (string & {});
export type ComponentProps<T extends ValidComponent> = T extends Component<infer P> ? P : T extends keyof JSX.IntrinsicElements ? JSX.IntrinsicElements[T] : Record<string, unknown>;
export type DynamicProps<T extends ValidComponent, P = ComponentProps<T>> = {

@@ -82,3 +133,3 @@ [K in keyof P]: P[K];

children: JSX.Element;
}): Text;
}): JSX.Element;
/**

@@ -92,8 +143,11 @@ * Returns a stable `Component` whose identity is driven by a reactive (and

* propagates as `NotReadyError` through the surrounding reactive scope, so
* async swaps compose with `Loading`/Suspense boundaries the same way as
* `lazy`.
* async swaps compose with `<Loading>` boundaries the same way as `lazy`.
*
* ```typescript
* const User = dynamic(() => getUserComp(props.id));
* return <User>client content</User>;
* @example
* ```tsx
* // `source` can return either a custom Component or a native tag
* // name — they're interchangeable, and the returned reference is a
* // stable Component you can use anywhere a normal one would go.
* const Field = dynamic(() => multiline() ? RichTextEditor : "input");
* return <Field value={value()} onInput={onInput} />;
* ```

@@ -105,8 +159,16 @@ *

/**
* Renders an arbitrary custom or native component and passes the other props
* ```typescript
* <Dynamic component={multiline() ? 'textarea' : 'input'} value={value()} />
* Renders an arbitrary custom or native component and forwards the other
* props. JSX form of `dynamic()` — same primitive, picked at the JSX site.
*
* @example
* ```tsx
* <Dynamic
* component={multiline() ? RichTextEditor : "input"}
* value={value()}
* onInput={onInput}
* />
* ```
*
* @description https://docs.solidjs.com/reference/components/dynamic
*/
export declare function Dynamic<T extends ValidComponent>(props: DynamicProps<T>): JSX.Element;

@@ -106,25 +106,57 @@ /**

};
/** Compiler primitive — emitted by JSX-DOM-Expressions for tagged-template SSR output. Not meant for hand-written code. */
/**
* Compiler primitive — emitted by JSX-DOM-Expressions for tagged-template
* SSR output. Not meant for hand-written code.
* @internal
*/
export declare function ssr(template: string[] | string, ...nodes: any[]): {
t: string;
};
/** Compiler primitive — emitted by JSX-DOM-Expressions for SSR element output. Not meant for hand-written code. */
/**
* Compiler primitive — emitted by JSX-DOM-Expressions for SSR element
* output. Not meant for hand-written code.
* @internal
*/
export declare function ssrElement(name: string, props: any, children: any, needsId: boolean): {
t: string;
};
/** Compiler primitive — serializes a classList object for SSR output. Not meant for hand-written code. */
/**
* Compiler primitive — serializes a classList object for SSR output. Not
* meant for hand-written code.
* @internal
*/
export declare function ssrClassList(value: {
[k: string]: boolean;
}): string;
/** Compiler primitive — serializes a style object for SSR output. Not meant for hand-written code. */
/**
* Compiler primitive — serializes a style object for SSR output. Not meant
* for hand-written code.
* @internal
*/
export declare function ssrStyle(value: {
[k: string]: string;
}): string;
/** Compiler primitive — serializes a boolean attribute for SSR output. Not meant for hand-written code. */
/**
* Compiler primitive — serializes a boolean attribute for SSR output. Not
* meant for hand-written code.
* @internal
*/
export declare function ssrAttribute(key: string, value: boolean): string;
/** Compiler primitive — generates the hydration-key attribute for SSR output. Not meant for hand-written code. */
/**
* Compiler primitive — generates the hydration-key attribute for SSR
* output. Not meant for hand-written code.
* @internal
*/
export declare function ssrHydrationKey(): string;
/** Compiler primitive — collapses an SSR-shaped node into its HTML string. Not meant for hand-written code. */
/**
* Compiler primitive — collapses an SSR-shaped node into its HTML string.
* Not meant for hand-written code.
* @internal
*/
export declare function resolveSSRNode(node: any): string;
/** Escapes a string for safe inclusion in HTML output. Useful when constructing SSR fragments by hand. */
/**
* Escapes a string for safe inclusion in HTML output. Used by the SSR
* runtime; not generally part of user code.
* @internal
*/
export declare function escape(html: string): string;
import { hydrate as hydrateCore } from "./client.js";
import { JSX, Component, ComponentProps, ValidComponent } from "solid-js";
import { Component } from "solid-js";
import type { JSX } from "./jsx.js";
export * from "./client.js";
export * from "./server-mock.js";
export { For, Show, Switch, Match, Errored, Loading, Repeat, Reveal, NoHydration, Hydration, merge as mergeProps } from "solid-js";
export type { JSX } from "./jsx.js";
export { For, Show, Switch, Match, Errored, Loading, Repeat, Reveal, NoHydration, Hydration } from "solid-js";
import { merge } from "solid-js";
/**
* Compiler-emitted prop-spread helper. The JSX transform (in
* `dom-expressions`) emits `mergeProps(...)` calls when compiling prop
* spreads on components — it is *not* a user-facing API. Application code
* should import `merge` from `solid-js` directly.
*
* @internal
*/
export declare const mergeProps: typeof merge;
/**
* Build-time constant indicating whether code is running on the server. This
* client entry sets it to `false`; the matching server entry (`@solidjs/web`
* resolved through the `solid` server export condition) sets it to `true`.
*
* Bundlers can dead-code-eliminate branches gated on `isServer`, so guarding
* browser-only code with `if (!isServer) {…}` keeps it out of the SSR bundle
* entirely.
*
* @example
* ```ts
* import { isServer } from "@solidjs/web";
*
* if (!isServer) {
* // Browser-only: tree-shaken out of the SSR bundle.
* window.addEventListener("resize", onResize);
* }
* ```
*/
export declare const isServer: boolean;
/**
* Build-time constant indicating whether code is running in a dev build.
* Replaced statically (`_SOLID_DEV_`) by the bundler integration, so guards
* like `if (isDev) {…}` are stripped from production builds.
*
* Use this to gate dev-only diagnostics, warnings, or expensive invariants
* that should never ship to production.
*
* @example
* ```ts
* import { isDev } from "@solidjs/web";
*
* if (isDev) {
* console.warn("debug-only path");
* }
* ```
*/
export declare const isDev: boolean;
type MountableElement = Element | Document | ShadowRoot | DocumentFragment | Node;
export type IntrinsicElement = Extract<keyof JSX.IntrinsicElements, string>;
export type ValidComponent = IntrinsicElement | Component<any> | (string & {});
export type ComponentProps<T extends ValidComponent> = T extends Component<infer P> ? P : T extends keyof JSX.IntrinsicElements ? JSX.IntrinsicElements[T] : Record<string, unknown>;
export type DynamicProps<T extends ValidComponent, P = ComponentProps<T>> = {

@@ -82,3 +133,3 @@ [K in keyof P]: P[K];

children: JSX.Element;
}): Text;
}): JSX.Element;
/**

@@ -92,8 +143,11 @@ * Returns a stable `Component` whose identity is driven by a reactive (and

* propagates as `NotReadyError` through the surrounding reactive scope, so
* async swaps compose with `Loading`/Suspense boundaries the same way as
* `lazy`.
* async swaps compose with `<Loading>` boundaries the same way as `lazy`.
*
* ```typescript
* const User = dynamic(() => getUserComp(props.id));
* return <User>client content</User>;
* @example
* ```tsx
* // `source` can return either a custom Component or a native tag
* // name — they're interchangeable, and the returned reference is a
* // stable Component you can use anywhere a normal one would go.
* const Field = dynamic(() => multiline() ? RichTextEditor : "input");
* return <Field value={value()} onInput={onInput} />;
* ```

@@ -105,8 +159,16 @@ *

/**
* Renders an arbitrary custom or native component and passes the other props
* ```typescript
* <Dynamic component={multiline() ? 'textarea' : 'input'} value={value()} />
* Renders an arbitrary custom or native component and forwards the other
* props. JSX form of `dynamic()` — same primitive, picked at the JSX site.
*
* @example
* ```tsx
* <Dynamic
* component={multiline() ? RichTextEditor : "input"}
* value={value()}
* onInput={onInput}
* />
* ```
*
* @description https://docs.solidjs.com/reference/components/dynamic
*/
export declare function Dynamic<T extends ValidComponent>(props: DynamicProps<T>): JSX.Element;

@@ -106,25 +106,57 @@ /**

};
/** Compiler primitive — emitted by JSX-DOM-Expressions for tagged-template SSR output. Not meant for hand-written code. */
/**
* Compiler primitive — emitted by JSX-DOM-Expressions for tagged-template
* SSR output. Not meant for hand-written code.
* @internal
*/
export declare function ssr(template: string[] | string, ...nodes: any[]): {
t: string;
};
/** Compiler primitive — emitted by JSX-DOM-Expressions for SSR element output. Not meant for hand-written code. */
/**
* Compiler primitive — emitted by JSX-DOM-Expressions for SSR element
* output. Not meant for hand-written code.
* @internal
*/
export declare function ssrElement(name: string, props: any, children: any, needsId: boolean): {
t: string;
};
/** Compiler primitive — serializes a classList object for SSR output. Not meant for hand-written code. */
/**
* Compiler primitive — serializes a classList object for SSR output. Not
* meant for hand-written code.
* @internal
*/
export declare function ssrClassList(value: {
[k: string]: boolean;
}): string;
/** Compiler primitive — serializes a style object for SSR output. Not meant for hand-written code. */
/**
* Compiler primitive — serializes a style object for SSR output. Not meant
* for hand-written code.
* @internal
*/
export declare function ssrStyle(value: {
[k: string]: string;
}): string;
/** Compiler primitive — serializes a boolean attribute for SSR output. Not meant for hand-written code. */
/**
* Compiler primitive — serializes a boolean attribute for SSR output. Not
* meant for hand-written code.
* @internal
*/
export declare function ssrAttribute(key: string, value: boolean): string;
/** Compiler primitive — generates the hydration-key attribute for SSR output. Not meant for hand-written code. */
/**
* Compiler primitive — generates the hydration-key attribute for SSR
* output. Not meant for hand-written code.
* @internal
*/
export declare function ssrHydrationKey(): string;
/** Compiler primitive — collapses an SSR-shaped node into its HTML string. Not meant for hand-written code. */
/**
* Compiler primitive — collapses an SSR-shaped node into its HTML string.
* Not meant for hand-written code.
* @internal
*/
export declare function resolveSSRNode(node: any): string;
/** Escapes a string for safe inclusion in HTML output. Useful when constructing SSR fragments by hand. */
/**
* Escapes a string for safe inclusion in HTML output. Used by the SSR
* runtime; not generally part of user code.
* @internal
*/
export declare function escape(html: string): string;

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display