@creopse/react 0.0.16 → 0.0.17
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/index.cjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const React = require("react");
|
|
4
4
|
const content = require("./content-yneKOQn5.cjs");
|
|
5
|
-
require("@inertiajs/react");
|
|
5
|
+
const react = require("@inertiajs/react");
|
|
6
6
|
const reactDom = require("react-dom");
|
|
7
7
|
function _interopNamespaceDefault(e) {
|
|
8
8
|
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
|
@@ -8184,7 +8184,7 @@ const resetStyles = "_reset-styles_1tka1_1";
|
|
|
8184
8184
|
const styles = {
|
|
8185
8185
|
resetStyles
|
|
8186
8186
|
};
|
|
8187
|
-
const RootContainer = () => {
|
|
8187
|
+
const RootContainer$1 = () => {
|
|
8188
8188
|
const { page } = content.useContent();
|
|
8189
8189
|
const props = content.useProps();
|
|
8190
8190
|
const manager = React.useContext(content.PropsContext);
|
|
@@ -8403,6 +8403,15 @@ const RootContainer = () => {
|
|
|
8403
8403
|
);
|
|
8404
8404
|
}) }, sectionsWrapperKey);
|
|
8405
8405
|
};
|
|
8406
|
+
function RootContainer() {
|
|
8407
|
+
const [key, setKey] = React.useState(() => v4());
|
|
8408
|
+
React.useEffect(() => {
|
|
8409
|
+
return react.router.on("navigate", () => {
|
|
8410
|
+
setKey(v4());
|
|
8411
|
+
});
|
|
8412
|
+
}, []);
|
|
8413
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(RootContainer$1, {}, key);
|
|
8414
|
+
}
|
|
8406
8415
|
function CreopseProvider({ children, options }) {
|
|
8407
8416
|
if (!options?.initialProps) {
|
|
8408
8417
|
throw new Error("[@creopse/react] initialProps is required");
|
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import React__default, { useState, useEffect, createContext, useRef, useLayoutEffect, useId, useContext, useInsertionEffect, useMemo, useCallback, Children, isValidElement, Fragment, createElement, forwardRef, Component } from "react";
|
|
3
3
|
import { u as useHelper, a as useContent, b as useProps, P as PropsContext, R as ResolveSectionsContext, c as cloneDeep, s as slideToId, E as EditorMessageType, d as RouterContext, C as ConfigContext } from "./content-CfIj9nZq.js";
|
|
4
|
-
import "@inertiajs/react";
|
|
4
|
+
import { router } from "@inertiajs/react";
|
|
5
5
|
import { createPortal } from "react-dom";
|
|
6
6
|
var jsxRuntime = { exports: {} };
|
|
7
7
|
var reactJsxRuntime_production = {};
|
|
@@ -8166,7 +8166,7 @@ const resetStyles = "_reset-styles_1tka1_1";
|
|
|
8166
8166
|
const styles = {
|
|
8167
8167
|
resetStyles
|
|
8168
8168
|
};
|
|
8169
|
-
const RootContainer = () => {
|
|
8169
|
+
const RootContainer$1 = () => {
|
|
8170
8170
|
const { page } = useContent();
|
|
8171
8171
|
const props = useProps();
|
|
8172
8172
|
const manager = useContext(PropsContext);
|
|
@@ -8385,6 +8385,15 @@ const RootContainer = () => {
|
|
|
8385
8385
|
);
|
|
8386
8386
|
}) }, sectionsWrapperKey);
|
|
8387
8387
|
};
|
|
8388
|
+
function RootContainer() {
|
|
8389
|
+
const [key, setKey] = useState(() => v4());
|
|
8390
|
+
useEffect(() => {
|
|
8391
|
+
return router.on("navigate", () => {
|
|
8392
|
+
setKey(v4());
|
|
8393
|
+
});
|
|
8394
|
+
}, []);
|
|
8395
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(RootContainer$1, {}, key);
|
|
8396
|
+
}
|
|
8388
8397
|
function CreopseProvider({ children, options }) {
|
|
8389
8398
|
if (!options?.initialProps) {
|
|
8390
8399
|
throw new Error("[@creopse/react] initialProps is required");
|
package/package.json
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export default RootContainer;
|
|
1
|
+
export default function RootContainer(): import("react/jsx-runtime").JSX.Element;
|