@qwik.dev/react 2.0.0-alpha.3 → 2.0.0-alpha.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/lib/index.qwik.cjs +5 -6
- package/lib/index.qwik.mjs +1 -2
- package/package.json +3 -3
package/lib/index.qwik.cjs
CHANGED
|
@@ -5,7 +5,6 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
5
5
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
6
6
|
const jsxRuntime = require("@qwik.dev/core/jsx-runtime");
|
|
7
7
|
const core = require("@qwik.dev/core");
|
|
8
|
-
const build = require("@qwik.dev/core/build");
|
|
9
8
|
const client = require("react-dom/client");
|
|
10
9
|
const reactDom = require("react-dom");
|
|
11
10
|
const internal = require("@qwik.dev/core/internal");
|
|
@@ -92,7 +91,7 @@ const useWakeupSignal = (props, opts = {}) => {
|
|
|
92
91
|
const clientLoad = props["client:load"] || props["qwik:load"] || clientOnly || opts?.eagerness === "load";
|
|
93
92
|
const clientHover = props["client:hover"] || props["qwik:hover"] || opts?.eagerness === "hover";
|
|
94
93
|
const clientEvent = props["client:event"] || props["qwik:event"];
|
|
95
|
-
if (
|
|
94
|
+
if (core.isServer) {
|
|
96
95
|
if (clientVisible) {
|
|
97
96
|
core.useOn("qvisible", activate);
|
|
98
97
|
}
|
|
@@ -120,7 +119,7 @@ const useWakeupSignal = (props, opts = {}) => {
|
|
|
120
119
|
};
|
|
121
120
|
const HOST_PREFIX = "host:";
|
|
122
121
|
async function renderFromServer(Host, reactCmp$, scopeId, props, ref, slotRef, hydrationProps) {
|
|
123
|
-
if (
|
|
122
|
+
if (core.isServer) {
|
|
124
123
|
const Cmp = await reactCmp$.resolve();
|
|
125
124
|
const newProps = getReactProps(props);
|
|
126
125
|
Object.assign(hydrationProps, newProps);
|
|
@@ -198,7 +197,7 @@ function qwikifyQrl(reactCmp$, opts) {
|
|
|
198
197
|
...props
|
|
199
198
|
}));
|
|
200
199
|
track(signal);
|
|
201
|
-
if (!
|
|
200
|
+
if (!core.isBrowser) {
|
|
202
201
|
return;
|
|
203
202
|
}
|
|
204
203
|
if (internalState.value) {
|
|
@@ -227,7 +226,7 @@ function qwikifyQrl(reactCmp$, opts) {
|
|
|
227
226
|
});
|
|
228
227
|
}
|
|
229
228
|
});
|
|
230
|
-
if (
|
|
229
|
+
if (core.isServer && !isClientOnly) {
|
|
231
230
|
const jsx = renderFromServer(TagName, reactCmp$, scopeId, props, hostRef, slotRef, hydrationKeys);
|
|
232
231
|
return /* @__PURE__ */ jsxRuntime.jsx(core.RenderOnce, {
|
|
233
232
|
children: jsx
|
|
@@ -238,7 +237,7 @@ function qwikifyQrl(reactCmp$, opts) {
|
|
|
238
237
|
/* @__PURE__ */ jsxRuntime.jsx(TagName, {
|
|
239
238
|
...getHostProps(props),
|
|
240
239
|
ref: (el) => {
|
|
241
|
-
if (
|
|
240
|
+
if (core.isBrowser) {
|
|
242
241
|
queueMicrotask(() => {
|
|
243
242
|
const internalData = internalState.value;
|
|
244
243
|
if (internalData && !internalData.root) {
|
package/lib/index.qwik.mjs
CHANGED
|
@@ -2,8 +2,7 @@ var __defProp = Object.defineProperty;
|
|
|
2
2
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
3
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4
4
|
import { jsx, jsxs, Fragment } from "@qwik.dev/core/jsx-runtime";
|
|
5
|
-
import { useSignal, $, useOn, useOnDocument, Slot, component$, useStylesScoped$, useStore, useTask$, noSerialize, RenderOnce, SkipRender, implicit$FirstArg } from "@qwik.dev/core";
|
|
6
|
-
import { isServer, isBrowser } from "@qwik.dev/core/build";
|
|
5
|
+
import { useSignal, $, isServer, useOn, useOnDocument, Slot, component$, useStylesScoped$, useStore, useTask$, isBrowser, noSerialize, RenderOnce, SkipRender, implicit$FirstArg } from "@qwik.dev/core";
|
|
7
6
|
import { createRoot, hydrateRoot } from "react-dom/client";
|
|
8
7
|
import { flushSync } from "react-dom";
|
|
9
8
|
import { SSRStream, SSRComment, SSRRaw } from "@qwik.dev/core/internal";
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qwik.dev/react",
|
|
3
3
|
"description": "Qwik React allows adding React components into existing Qwik application",
|
|
4
|
-
"version": "2.0.0-alpha.
|
|
4
|
+
"version": "2.0.0-alpha.5",
|
|
5
5
|
"bugs": "https://github.com/QwikDev/qwik/issues",
|
|
6
6
|
"devDependencies": {
|
|
7
7
|
"@types/react": "18.3.3",
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"react-dom": "18.3.1",
|
|
11
11
|
"typescript": "5.4.5",
|
|
12
12
|
"vite": "5.4.10",
|
|
13
|
-
"@qwik.dev/core": "2.0.0-alpha.
|
|
13
|
+
"@qwik.dev/core": "2.0.0-alpha.5"
|
|
14
14
|
},
|
|
15
15
|
"engines": {
|
|
16
16
|
"node": "^18.17.0 || ^20.3.0 || >=21.0.0"
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"react": "^18",
|
|
41
41
|
"react-dom": "^18",
|
|
42
42
|
"vite": "^5",
|
|
43
|
-
"@qwik.dev/core": "^2.0.0-alpha.
|
|
43
|
+
"@qwik.dev/core": "^2.0.0-alpha.5"
|
|
44
44
|
},
|
|
45
45
|
"qwik": "./lib/index.qwik.mjs",
|
|
46
46
|
"publishConfig": {
|