tencil 0.0.0-stage → 0.3.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.
@@ -0,0 +1,17 @@
1
+ //#region src/integrations/react.d.ts
2
+ /**
3
+ * Loads the Tencil overlay in development from the daemon on the machine
4
+ * serving the page (`npx tencil start`). Renders nothing in production;
5
+ * without a running daemon the script simply doesn't load.
6
+ *
7
+ * <body>{children}<Tencil /></body>
8
+ */
9
+ export declare function Tencil({ port }: {
10
+ port?: number;
11
+ }): import("react").DetailedReactHTMLElement<{
12
+ id: string;
13
+ dangerouslySetInnerHTML: {
14
+ __html: string;
15
+ };
16
+ }, HTMLElement> | null;
17
+ //#endregion
package/dist/react.mjs ADDED
@@ -0,0 +1,19 @@
1
+ import { n as overlayLoader, t as DEFAULT_DAEMON_PORT } from "./loader-BevujQ44.mjs";
2
+ import { createElement } from "react";
3
+ //#region src/integrations/react.ts
4
+ /**
5
+ * Loads the Tencil overlay in development from the daemon on the machine
6
+ * serving the page (`npx tencil start`). Renders nothing in production;
7
+ * without a running daemon the script simply doesn't load.
8
+ *
9
+ * <body>{children}<Tencil /></body>
10
+ */
11
+ function Tencil({ port = DEFAULT_DAEMON_PORT }) {
12
+ if (process.env.NODE_ENV !== "development") return null;
13
+ return createElement("script", {
14
+ id: "tencil-loader",
15
+ dangerouslySetInnerHTML: { __html: overlayLoader(port) }
16
+ });
17
+ }
18
+ //#endregion
19
+ export { Tencil };