solid-js 1.5.0-beta.0 → 1.5.0-beta.3

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 (53) hide show
  1. package/dist/dev.cjs +143 -132
  2. package/dist/dev.js +143 -132
  3. package/dist/server.cjs +86 -35
  4. package/dist/server.js +86 -35
  5. package/dist/solid.cjs +143 -132
  6. package/dist/solid.js +143 -132
  7. package/h/jsx-runtime/types/jsx.d.ts +3 -1
  8. package/h/types/hyperscript.d.ts +17 -0
  9. package/html/types/lit.d.ts +37 -0
  10. package/package.json +103 -41
  11. package/store/dist/dev.js +1 -1
  12. package/store/types/index.d.ts +4 -4
  13. package/store/types/mutable.d.ts +1 -1
  14. package/store/types/server.d.ts +1 -1
  15. package/types/index.d.ts +8 -8
  16. package/types/jsx.d.ts +4 -2
  17. package/types/reactive/array.d.ts +1 -1
  18. package/types/reactive/observable.d.ts +1 -1
  19. package/types/reactive/signal.d.ts +40 -33
  20. package/types/render/Suspense.d.ts +1 -1
  21. package/types/render/component.d.ts +1 -1
  22. package/types/render/flow.d.ts +20 -3
  23. package/types/render/index.d.ts +4 -4
  24. package/types/server/index.d.ts +3 -3
  25. package/types/server/reactive.d.ts +7 -3
  26. package/types/server/rendering.d.ts +15 -6
  27. package/universal/dist/dev.cjs +4 -1
  28. package/universal/dist/dev.js +5 -2
  29. package/universal/dist/universal.cjs +4 -1
  30. package/universal/dist/universal.js +5 -2
  31. package/universal/types/index.d.ts +1 -1
  32. package/web/dist/dev.cjs +5 -0
  33. package/web/dist/dev.js +6 -2
  34. package/web/dist/server.cjs +275 -234
  35. package/web/dist/server.js +275 -234
  36. package/web/dist/web.cjs +5 -0
  37. package/web/dist/web.js +6 -2
  38. package/web/types/client.d.ts +1 -1
  39. package/web/types/core.d.ts +3 -3
  40. package/web/types/index.d.ts +5 -5
  41. package/web/types/jsx.d.ts +1 -1
  42. package/web/types/server.d.ts +70 -0
  43. package/h/README.md +0 -99
  44. package/h/jsx-runtime/package.json +0 -8
  45. package/h/package.json +0 -8
  46. package/html/README.md +0 -84
  47. package/html/package.json +0 -8
  48. package/store/README.md +0 -23
  49. package/store/package.json +0 -35
  50. package/universal/README.md +0 -102
  51. package/universal/package.json +0 -18
  52. package/web/README.md +0 -7
  53. package/web/package.json +0 -35
package/web/dist/web.cjs CHANGED
@@ -206,6 +206,9 @@ function dynamicProperty(props, key) {
206
206
  function innerHTML(parent, content) {
207
207
  !solidJs.sharedConfig.context && (parent.innerHTML = content);
208
208
  }
209
+ function use(fn, element, arg) {
210
+ return solidJs.untrack(() => fn(element, arg));
211
+ }
209
212
  function insert(parent, accessor, marker, initial) {
210
213
  if (marker !== undefined && !initial) initial = [];
211
214
  if (typeof accessor !== "function") return insertExpression(parent, accessor, initial, marker);
@@ -413,6 +416,7 @@ function insertExpression(parent, value, current, marker, unwrapArray) {
413
416
  return () => current;
414
417
  }
415
418
  if (solidJs.sharedConfig.context) {
419
+ if (!array.length) return current;
416
420
  for (let i = 0; i < array.length; i++) {
417
421
  if (array[i].parentNode) return current = array;
418
422
  }
@@ -686,3 +690,4 @@ exports.ssrHydrationKey = ssrHydrationKey;
686
690
  exports.ssrStyle = ssrStyle;
687
691
  exports.style = style;
688
692
  exports.template = template;
693
+ exports.use = use;
package/web/dist/web.js CHANGED
@@ -1,4 +1,4 @@
1
- import { createMemo, createRoot, createRenderEffect, sharedConfig, enableHydration, createSignal, onCleanup, splitProps, untrack } from 'solid-js';
1
+ import { createMemo, createRoot, createRenderEffect, sharedConfig, untrack, enableHydration, createSignal, onCleanup, splitProps } from 'solid-js';
2
2
  export { ErrorBoundary, For, Index, Match, Show, Suspense, SuspenseList, Switch, createComponent, createRenderEffect as effect, getOwner, mergeProps } 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"];
@@ -203,6 +203,9 @@ function dynamicProperty(props, key) {
203
203
  function innerHTML(parent, content) {
204
204
  !sharedConfig.context && (parent.innerHTML = content);
205
205
  }
206
+ function use(fn, element, arg) {
207
+ return untrack(() => fn(element, arg));
208
+ }
206
209
  function insert(parent, accessor, marker, initial) {
207
210
  if (marker !== undefined && !initial) initial = [];
208
211
  if (typeof accessor !== "function") return insertExpression(parent, accessor, initial, marker);
@@ -410,6 +413,7 @@ function insertExpression(parent, value, current, marker, unwrapArray) {
410
413
  return () => current;
411
414
  }
412
415
  if (sharedConfig.context) {
416
+ if (!array.length) return current;
413
417
  for (let i = 0; i < array.length; i++) {
414
418
  if (array[i].parentNode) return current = array;
415
419
  }
@@ -587,4 +591,4 @@ function Dynamic(props) {
587
591
  });
588
592
  }
589
593
 
590
- export { Aliases, Assets, ChildProperties, DOMElements, DelegatedEvents, Dynamic, Assets as HydrationScript, NoHydration, Portal, PropAliases, Properties, SVGElements, SVGNamespace, addEventListener, assign, classList, className, clearDelegatedEvents, delegateEvents, dynamicProperty, escape, generateHydrationScript, getHydrationKey, getNextElement, getNextMarker, getNextMatch, hydrate, innerHTML, insert, isServer, memo, render, renderToStream, renderToString, renderToStringAsync, resolveSSRNode, runHydrationEvents, setAttribute, setAttributeNS, spread, ssr, ssrAttribute, ssrClassList, ssrElement, ssrHydrationKey, ssrStyle, style, template };
594
+ export { Aliases, Assets, ChildProperties, DOMElements, DelegatedEvents, Dynamic, Assets as HydrationScript, NoHydration, Portal, PropAliases, Properties, SVGElements, SVGNamespace, addEventListener, assign, classList, className, clearDelegatedEvents, delegateEvents, dynamicProperty, escape, generateHydrationScript, getHydrationKey, getNextElement, getNextMarker, getNextMatch, hydrate, innerHTML, insert, isServer, memo, render, renderToStream, renderToString, renderToStringAsync, resolveSSRNode, runHydrationEvents, setAttribute, setAttributeNS, spread, ssr, ssrAttribute, ssrClassList, ssrElement, ssrHydrationKey, ssrStyle, style, template, use };
@@ -1,4 +1,4 @@
1
- import { JSX } from "./jsx";
1
+ import { JSX } from "./jsx.js";
2
2
  export const Aliases: Record<string, string>;
3
3
  export const PropAliases: Record<string, string>;
4
4
  export const Properties: Set<string>;
@@ -1,3 +1,3 @@
1
- import { createRoot, createRenderEffect, createComponent, getOwner, sharedConfig } from "../..";
2
- declare function memo<T>(fn: () => T, equals: boolean): import("../..").Accessor<T>;
3
- export { getOwner, createComponent, createRoot as root, createRenderEffect as effect, memo, sharedConfig };
1
+ import { createRoot, createRenderEffect, createComponent, getOwner, sharedConfig, untrack } from "solid-js";
2
+ declare function memo<T>(fn: () => T, equals: boolean): import("solid-js").Accessor<T>;
3
+ export { getOwner, createComponent, createRoot as root, createRenderEffect as effect, memo, sharedConfig, untrack };
@@ -1,8 +1,8 @@
1
- import { hydrate as hydrateCore } from "./client";
2
- import { JSX, Accessor, ComponentProps, ValidComponent } from "../..";
3
- export * from "./client";
4
- export { For, Show, Suspense, SuspenseList, Switch, Match, Index, ErrorBoundary, mergeProps } from "../..";
5
- export * from "./server-mock";
1
+ import { hydrate as hydrateCore } from "./client.js";
2
+ import { JSX, Accessor, ComponentProps, ValidComponent } from "solid-js";
3
+ export * from "./client.js";
4
+ export { For, Show, Suspense, SuspenseList, Switch, Match, Index, ErrorBoundary, mergeProps } from "solid-js";
5
+ export * from "./server-mock.js";
6
6
  export declare const isServer = false;
7
7
  export declare const hydrate: typeof hydrateCore;
8
8
  /**
@@ -1 +1 @@
1
- export { JSX } from "../..";
1
+ export type { JSX } from "../../types/jsx.js";
@@ -0,0 +1,70 @@
1
+ export function renderToString<T>(
2
+ fn: () => T,
3
+ options?: {
4
+ nonce?: string;
5
+ renderId?: string;
6
+ }
7
+ ): string;
8
+ export function renderToStringAsync<T>(
9
+ fn: () => T,
10
+ options?: {
11
+ timeoutMs?: number;
12
+ nonce?: string;
13
+ renderId?: string;
14
+ }
15
+ ): Promise<string>;
16
+ export function renderToStream<T>(
17
+ fn: () => T,
18
+ options?: {
19
+ nonce?: string;
20
+ renderId?: string;
21
+ onCompleteShell?: (info: { write: (v: string) => void }) => void;
22
+ onCompleteAll?: (info: { write: (v: string) => void }) => void;
23
+ }
24
+ ): {
25
+ pipe: (writable: { write: (v: string) => void }) => void;
26
+ pipeTo: (writable: WritableStream) => void;
27
+ };
28
+
29
+ export function Assets(props: { children?: JSX.Element }): JSX.Element;
30
+ export function HydrationScript(props: { nonce?: string; eventNames?: string[] }): JSX.Element;
31
+ export function NoHydration(props: { children?: JSX.Element }): JSX.Element;
32
+ export function ssr(template: string[] | string, ...nodes: any[]): { t: string };
33
+ export function ssrElement(name: string, props: any, children: any, needsId: boolean): { t: string };
34
+ export function ssrClassList(value: { [k: string]: boolean }): string;
35
+ export function ssrStyle(value: { [k: string]: string }): string;
36
+ export function ssrAttribute(key: string, value: any, isBoolean: boolean): string;
37
+ export function ssrHydrationKey(): string;
38
+ export function resolveSSRNode(node: any): string;
39
+ export function escape(html: string): string;
40
+ export function getHydrationKey(): string;
41
+ export function effect<T>(fn: (prev?: T) => T, init?: T): void;
42
+ export function memo<T>(fn: () => T, equal: boolean): () => T;
43
+ export function createComponent<T>(Comp: (props: T) => JSX.Element, props: T): JSX.Element;
44
+ export function mergeProps(...sources: unknown[]): unknown;
45
+ export function getOwner(): unknown;
46
+ export function generateHydrationScript(options: { nonce?: string; eventNames?: string[] }): string;
47
+
48
+ // deprecated
49
+ export type LegacyResults = {
50
+ write: (text: string) => void;
51
+ startWriting: () => void;
52
+ };
53
+ export function pipeToWritable<T>(
54
+ fn: () => T,
55
+ writable: WritableStream,
56
+ options?: {
57
+ nonce?: string;
58
+ onReady?: (res: LegacyResults) => void;
59
+ onCompleteAll?: () => void;
60
+ }
61
+ ): void;
62
+ export function pipeToNodeWritable<T>(
63
+ fn: () => T,
64
+ writable: { write: (v: string) => void },
65
+ options?: {
66
+ nonce?: string;
67
+ onReady?: (res: LegacyResults) => void;
68
+ onCompleteAll?: () => void;
69
+ }
70
+ ): void;
package/h/README.md DELETED
@@ -1,99 +0,0 @@
1
- # Solid HyperScript
2
-
3
- This sub module provides a HyperScript method for Solid. This is useful to use Solid in non-compiled environments or in some environments where you can only use a standard JSX transform. This method can be used as the JSX factory function.
4
-
5
- HyperScript function takes a few forms. The 2nd props argument is optional. Children may be passed as either an array to the 2nd/3rd argument or as every argument past the 2nd.
6
-
7
- ```js
8
- // create an element with a title attribute
9
- h("button", { title: "My button" }, "Click Me")
10
-
11
- // create a component with a title prop
12
- h(Button, { title: "My button" }, "Click Me")
13
-
14
- // create an element with many children
15
- h("div", { title: "My button" }, h("span", "1"), h("span", "2"), h("span", "3"))
16
- ```
17
-
18
- This is the least efficient way to use Solid as it requires a slightly larger runtime that isn't treeshakebable, and cannot leverage anything in the way of analysis, so it requires manual wrapping of expressions and has a few other caveats (see below).
19
-
20
- ## Example
21
-
22
- ```js
23
- import { render } from "solid-js/web";
24
- import h from "solid-js/h";
25
- import { createSignal } from "solid-js";
26
-
27
- function Button(props) {
28
- return h("button.btn-primary", props)
29
- }
30
-
31
- function Counter() {
32
- const [count, setCount] = createSignal(0);
33
- const increment = (e) => setCount(c => c + 1);
34
-
35
- return h(Button, { type: "button", onClick: increment }, count);
36
- }
37
-
38
- render(Counter, document.getElementById("app"));
39
- ```
40
-
41
- ## Differences from JSX
42
-
43
- There are a few differences from Solid's JSX that are important to note. And also apply when attempting use any transformation that would compile to HyperScript.
44
-
45
- 1. Reactive expression must be manually wrapped in functions to be reactive.
46
-
47
- ```js
48
- // jsx
49
- <div id={props.id}>{firstName() + lastName()}</div>
50
-
51
- // hyperscript
52
- h("div", { id: () => props.id }, () => firstName() + lastName())
53
- ```
54
-
55
- 2. Merging spreads requires using the merge props helper to keep reactivity
56
-
57
- ```js
58
- // jsx
59
- <div class={selectedClass()} {...props} />
60
-
61
- // hyperscript
62
- import { mergeProps } from "solid-js"
63
-
64
- h("div", mergeProps({ class: selectedClass }, props))
65
- ```
66
-
67
- 3. Events on components require explicit event in the arguments
68
-
69
- Solid's HyperScript automatically wraps functions passed to props of components with no arguments in getters so you need to provide one to prevent this. The same applies to render props like in the `<For>` component.
70
-
71
- ```js
72
- // good
73
- h(Button, { onClick: (e) => console.log("Hi")});
74
-
75
- // bad
76
- h(Button, { onClick: () => console.log("Hi")})
77
- ```
78
-
79
- 4. All refs are callback form
80
-
81
- We can't do the compiled assigment trick so only the callback form is supported.
82
-
83
- ```js
84
- let myEl;
85
-
86
- h(div, { ref: (el) => myEl = el });
87
- ```
88
-
89
- 5. There is a shorthand for static id and classes
90
-
91
- ```js
92
- h("div#some-id.my-class")
93
- ```
94
-
95
- 6. Fragments are just arrays
96
-
97
- ```js
98
- [h("span", "1"), h("span", "2")]
99
- ```
@@ -1,8 +0,0 @@
1
- {
2
- "name": "solid-js/h/jsx-runtime",
3
- "main": "./dist/jsx.cjs",
4
- "module": "./dist/jsx.js",
5
- "types": "./types/index.d.ts",
6
- "type": "module",
7
- "sideEffects": false
8
- }
package/h/package.json DELETED
@@ -1,8 +0,0 @@
1
- {
2
- "name": "solid-js/h",
3
- "main": "./dist/h.cjs",
4
- "module": "./dist/h.js",
5
- "types": "./types/index.d.ts",
6
- "type": "module",
7
- "sideEffects": false
8
- }
package/html/README.md DELETED
@@ -1,84 +0,0 @@
1
- # Solid Tagged Template Literals
2
-
3
- This sub module provides a Tagged Template Literal `html` method for Solid. This is useful to use Solid in non-compiled environments. This method can be used as replacement for JSX.
4
-
5
- `html` uses `${}` to escape into JavaScript expressions. Components are closed with `<//>`
6
-
7
- ```js
8
- // create an element with a title attribute
9
- html`<button title="My button">Click Me</button>`
10
-
11
- // create a component with a title prop
12
- html`<${Button} title="My button">Click me<//>`
13
-
14
- // create an element with dynamic attribute and spread
15
- html`<div title=${() => selectedClass()} ...${props} />`
16
- ```
17
-
18
- Using `html` is slightly less efficient than JSX(but more than HyperScript), requires a larger runtime that isn't treeshakebable, and cannot leverage expression analysis, so it requires manual wrapping of expressions and has a few other caveats (see below).
19
-
20
- ## Example
21
-
22
- ```js
23
- import { render } from "solid-js/web";
24
- import html from "solid-js/html";
25
- import { createSignal } from "solid-js";
26
-
27
- function Button(props) {
28
- return html`<button class="btn-primary" ...${props} />`;
29
- }
30
-
31
- function Counter() {
32
- const [count, setCount] = createSignal(0);
33
- const increment = (e) => setCount((c) => c + 1);
34
-
35
- return html`<${Button} type="button" onClick=${increment}>${count}<//>`;
36
- }
37
-
38
- render(Counter, document.getElementById("app"));
39
- ```
40
-
41
- ## Differences from JSX
42
-
43
- There are a few differences from Solid's JSX that are important to note.
44
-
45
- 1. Reactive expression must be manually wrapped in functions to be reactive.
46
-
47
- ```js
48
- // jsx
49
- <div id={props.id}>{firstName() + lastName()}</div>
50
-
51
- // hyperscript
52
- html`<div id=${() => props.id}>${() => firstName() + lastName()}</div>`
53
- ```
54
-
55
- 2. Events on components require explicit event in the arguments
56
-
57
- Solid's Tagged Template Literals automatically wraps functions passed to props of components with no arguments in getters so you need to provide one to prevent this. The same applies to render props like in the `<For>` component.
58
-
59
- ```js
60
- // good
61
- html`<${Button} onClick=${(e) => console.log("Hi")} />`;
62
-
63
- // bad
64
- html`<${Button} onClick=${() => console.log("Hi")} />`;
65
- ```
66
-
67
- 4. All refs are callback form
68
-
69
- We can't do the compiled assigment trick so only the callback form is supported.
70
-
71
- ```js
72
- let myEl;
73
- html`<div ref=${(el) => myEl = el} />`;
74
- ```
75
-
76
- 5. There can be multiple top level elements
77
-
78
- No need for fragments just:
79
- ```js
80
- html`
81
- <div>1</div>
82
- <div>2</div>
83
- `
84
- ```
package/html/package.json DELETED
@@ -1,8 +0,0 @@
1
- {
2
- "name": "solid-js/html",
3
- "main": "./dist/html.cjs",
4
- "module": "./dist/html.js",
5
- "types": "./types/index.d.ts",
6
- "type": "module",
7
- "sideEffects": false
8
- }
package/store/README.md DELETED
@@ -1,23 +0,0 @@
1
- # Solid Store
2
-
3
- This submodules contains the means for handling deeps nested reactivity. It provides 2 main primitives `createStore` and `createMutable` which leverage proxies to create dynamic nested reactive structures.
4
-
5
- This also contains helper methods `produce` and `reconcile` which augment the behavior of the store setter method to allow for localized mutation and data diffing.
6
-
7
- For full documentation, check out the [website](https://www.solidjs.com/docs/latest/api).
8
-
9
- ## Example
10
-
11
- ```js
12
- import { createStore } from "solid-js/store";
13
-
14
- const [store, setStore] = createStore({
15
- user: {
16
- firstName: "John",
17
- lastName: "Smith"
18
- }
19
- });
20
-
21
- // update store.user.firstName
22
- setStore("user", "firstName", "Will");
23
- ```
@@ -1,35 +0,0 @@
1
- {
2
- "name": "solid-js/store",
3
- "main": "./dist/server.cjs",
4
- "module": "./dist/server.js",
5
- "browser": {
6
- "./dist/server.cjs": "./dist/store.cjs",
7
- "./dist/server.js": "./dist/store.js"
8
- },
9
- "unpkg": "./dist/store.cjs",
10
- "types": "./types/index.d.ts",
11
- "type": "module",
12
- "sideEffects": false,
13
- "exports": {
14
- ".": {
15
- "browser": {
16
- "development": {
17
- "import": "./dist/dev.js",
18
- "require": "./dist/dev.cjs"
19
- },
20
- "import": "./dist/store.js",
21
- "require": "./dist/store.cjs"
22
- },
23
- "node": {
24
- "import": "./dist/server.js",
25
- "require": "./dist/server.cjs"
26
- },
27
- "development": {
28
- "import": "./dist/dev.js",
29
- "require": "./dist/dev.cjs"
30
- },
31
- "import": "./dist/store.js",
32
- "require": "./dist/store.cjs"
33
- }
34
- }
35
- }
@@ -1,102 +0,0 @@
1
- # Solid Universal
2
-
3
- This contains the means to create the runtime for a custom renderer for Solid. This can enable using Solid to render to different platforms like native mobile and desktop, canvas or WebGL, or even the terminal. It relies on custom compilation from `babel-preset-solid` and exporting the result of `createRenderer` at a referenceable location.
4
-
5
- ## Example
6
-
7
- To use a custom renderer available in the (fictional) `solid-custom-dom` package you'd configure your babelrc as:
8
- ```json
9
- {
10
- "presets": [
11
- [
12
- "babel-preset-solid",
13
- {
14
- "moduleName": "solid-custom-dom",
15
- "generate": "universal"
16
- }
17
- ]
18
- ]
19
- }
20
- ```
21
-
22
- To create a custom renderer you must implement certain methods and export (as named exports) the results. You may also want to forward `solid-js` control flow to allow them to be auto imported as well.
23
-
24
- ```js
25
- // example custom dom renderer
26
- import { createRenderer } from "solid-js/universal";
27
-
28
- const PROPERTIES = new Set(["className", "textContent"]);
29
-
30
- export const {
31
- render,
32
- effect,
33
- memo,
34
- createComponent,
35
- createElement,
36
- createTextNode,
37
- insertNode,
38
- insert,
39
- spread,
40
- setProp,
41
- mergeProps
42
- } = createRenderer({
43
- createElement(string) {
44
- return document.createElement(string);
45
- },
46
- createTextNode(value) {
47
- return document.createTextNode(value);
48
- },
49
- replaceText(textNode, value) {
50
- textNode.data = value;
51
- },
52
- setProperty(node, name, value) {
53
- if (name === "style") Object.assign(node.style, value);
54
- else if (name.startsWith("on")) node[name.toLowerCase()] = value;
55
- else if (PROPERTIES.has(name)) node[name] = value;
56
- else node.setAttribute(name, value);
57
- },
58
- insertNode(parent, node, anchor) {
59
- parent.insertBefore(node, anchor);
60
- },
61
- isTextNode(node) {
62
- return node.type === 3;
63
- },
64
- removeNode(parent, node) {
65
- parent.removeChild(node);
66
- },
67
- getParentNode(node) {
68
- return node.parentNode;
69
- },
70
- getFirstChild(node) {
71
- return node.firstChild;
72
- },
73
- getNextSibling(node) {
74
- return node.nextSibling;
75
- }
76
- });
77
-
78
- // Forward Solid control flow
79
- export {
80
- For,
81
- Show,
82
- Suspense,
83
- SuspenseList,
84
- Switch,
85
- Match,
86
- Index,
87
- ErrorBoundary
88
- } from "solid-js";
89
- ```
90
-
91
- Then to consume:
92
- ```js
93
- import { render } from "solid-custom-dom";
94
-
95
- function App() {
96
- // the skies the limits
97
- }
98
-
99
- render(() => <App />, mountNode)
100
- ```
101
-
102
- > Note: For TypeScript support of non-standard JSX you will need to provide your own types at a jsx-runtime entry on your package so that it can be set as the `jsxImportSource`. If mixing and matching different JSX implementations you will need use the per file pragmas.
@@ -1,18 +0,0 @@
1
- {
2
- "name": "solid-js/universal",
3
- "main": "./dist/universal.cjs",
4
- "module": "./dist/universal.js",
5
- "types": "./types/index.d.ts",
6
- "type": "module",
7
- "sideEffects": false,
8
- "exports": {
9
- ".": {
10
- "development": {
11
- "import": "./dist/dev.js",
12
- "require": "./dist/dev.cjs"
13
- },
14
- "import": "./dist/universal.js",
15
- "require": "./dist/universal.cjs"
16
- }
17
- }
18
- }
package/web/README.md DELETED
@@ -1,7 +0,0 @@
1
- # Solid Web
2
-
3
- This submodule contains the web specific APIs for Solid that are mostly internal methods imported during compilation. It has all the code to render for the web on the server and the browser.
4
-
5
- In addition this modules provides the primary entry point methods `render`, `hydrate`, `renderToString`, `renderToStringAsync`, `pipeToNodeWritable`, and `pipeToWritable`. As well as a few web specific control flow components `<Portal>` and `<Dynamic>`.
6
-
7
- Refer to the [website](https://www.solidjs.com/docs/latest/api) for documentation.
package/web/package.json DELETED
@@ -1,35 +0,0 @@
1
- {
2
- "name": "solid-js/web",
3
- "main": "./dist/server.cjs",
4
- "module": "./dist/server.js",
5
- "browser": {
6
- "./dist/server.cjs": "./dist/web.cjs",
7
- "./dist/server.js": "./dist/web.js"
8
- },
9
- "unpkg": "./dist/web.cjs",
10
- "types": "./types/index.d.ts",
11
- "type": "module",
12
- "sideEffects": false,
13
- "exports": {
14
- ".": {
15
- "browser": {
16
- "development": {
17
- "import": "./dist/dev.js",
18
- "require": "./dist/dev.cjs"
19
- },
20
- "import": "./dist/web.js",
21
- "require": "./dist/web.cjs"
22
- },
23
- "node": {
24
- "import": "./dist/server.js",
25
- "require": "./dist/server.cjs"
26
- },
27
- "development": {
28
- "import": "./dist/dev.js",
29
- "require": "./dist/dev.cjs"
30
- },
31
- "import": "./dist/web.js",
32
- "require": "./dist/web.cjs"
33
- }
34
- }
35
- }