tetrons 2.3.59 → 2.3.60
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/components/tetrons/EditorContent.tsx +19 -2
- package/dist/index.browser.js +10 -1
- package/dist/index.node.cjs +13 -1
- package/dist/index.node.mjs +13 -1
- package/package.json +1 -1
|
@@ -75,8 +75,25 @@ export default function EditorContent({ apiKey }: EditorContentProps) {
|
|
|
75
75
|
|
|
76
76
|
const wrapperRef = useRef<HTMLDivElement>(null);
|
|
77
77
|
|
|
78
|
-
|
|
79
|
-
|
|
78
|
+
function getApiBaseUrl(): string {
|
|
79
|
+
if (
|
|
80
|
+
typeof import.meta !== "undefined" &&
|
|
81
|
+
import.meta.env?.VITE_TETRONS_API_URL
|
|
82
|
+
) {
|
|
83
|
+
return import.meta.env.VITE_TETRONS_API_URL;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
if (
|
|
87
|
+
typeof process !== "undefined" &&
|
|
88
|
+
process.env?.NEXT_PUBLIC_TETRONS_API_URL
|
|
89
|
+
) {
|
|
90
|
+
return process.env.NEXT_PUBLIC_TETRONS_API_URL;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
return "https://staging.tetrons.com";
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
const API_BASE_URL = getApiBaseUrl();
|
|
80
97
|
|
|
81
98
|
useEffect(() => {
|
|
82
99
|
const validateKey = async () => {
|
package/dist/index.browser.js
CHANGED
|
@@ -16829,7 +16829,16 @@ function EditorContent({ apiKey }) {
|
|
|
16829
16829
|
null
|
|
16830
16830
|
);
|
|
16831
16831
|
const wrapperRef = useRef7(null);
|
|
16832
|
-
|
|
16832
|
+
function getApiBaseUrl() {
|
|
16833
|
+
if (typeof import.meta !== "undefined" && import.meta.env?.VITE_TETRONS_API_URL) {
|
|
16834
|
+
return import.meta.env.VITE_TETRONS_API_URL;
|
|
16835
|
+
}
|
|
16836
|
+
if (typeof process !== "undefined" && process.env?.NEXT_PUBLIC_TETRONS_API_URL) {
|
|
16837
|
+
return process.env.NEXT_PUBLIC_TETRONS_API_URL;
|
|
16838
|
+
}
|
|
16839
|
+
return "https://staging.tetrons.com";
|
|
16840
|
+
}
|
|
16841
|
+
const API_BASE_URL = getApiBaseUrl();
|
|
16833
16842
|
useEffect8(() => {
|
|
16834
16843
|
const validateKey = async () => {
|
|
16835
16844
|
try {
|
package/dist/index.node.cjs
CHANGED
|
@@ -39,6 +39,9 @@ __export(index_exports, {
|
|
|
39
39
|
});
|
|
40
40
|
module.exports = __toCommonJS(index_exports);
|
|
41
41
|
|
|
42
|
+
// <define:import.meta>
|
|
43
|
+
var define_import_meta_default = { env: { VITE_TETRONS_API_URL: "https://staging.tetrons.com" } };
|
|
44
|
+
|
|
42
45
|
// src/components/tetrons/EditorContent.tsx
|
|
43
46
|
var import_react20 = __toESM(require("react"));
|
|
44
47
|
var import_react21 = require("@tiptap/react");
|
|
@@ -16822,7 +16825,16 @@ function EditorContent({ apiKey }) {
|
|
|
16822
16825
|
null
|
|
16823
16826
|
);
|
|
16824
16827
|
const wrapperRef = (0, import_react20.useRef)(null);
|
|
16825
|
-
|
|
16828
|
+
function getApiBaseUrl() {
|
|
16829
|
+
if (typeof define_import_meta_default !== "undefined" && define_import_meta_default.env?.VITE_TETRONS_API_URL) {
|
|
16830
|
+
return define_import_meta_default.env.VITE_TETRONS_API_URL;
|
|
16831
|
+
}
|
|
16832
|
+
if (typeof process !== "undefined" && process.env?.NEXT_PUBLIC_TETRONS_API_URL) {
|
|
16833
|
+
return process.env.NEXT_PUBLIC_TETRONS_API_URL;
|
|
16834
|
+
}
|
|
16835
|
+
return "https://staging.tetrons.com";
|
|
16836
|
+
}
|
|
16837
|
+
const API_BASE_URL = getApiBaseUrl();
|
|
16826
16838
|
(0, import_react20.useEffect)(() => {
|
|
16827
16839
|
const validateKey = async () => {
|
|
16828
16840
|
try {
|
package/dist/index.node.mjs
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
// <define:import.meta>
|
|
2
|
+
var define_import_meta_default = { env: { VITE_TETRONS_API_URL: "https://staging.tetrons.com" } };
|
|
3
|
+
|
|
1
4
|
// src/components/tetrons/EditorContent.tsx
|
|
2
5
|
import React14, { useEffect as useEffect8, useRef as useRef7, useState as useState9 } from "react";
|
|
3
6
|
import {
|
|
@@ -16829,7 +16832,16 @@ function EditorContent({ apiKey }) {
|
|
|
16829
16832
|
null
|
|
16830
16833
|
);
|
|
16831
16834
|
const wrapperRef = useRef7(null);
|
|
16832
|
-
|
|
16835
|
+
function getApiBaseUrl() {
|
|
16836
|
+
if (typeof define_import_meta_default !== "undefined" && define_import_meta_default.env?.VITE_TETRONS_API_URL) {
|
|
16837
|
+
return define_import_meta_default.env.VITE_TETRONS_API_URL;
|
|
16838
|
+
}
|
|
16839
|
+
if (typeof process !== "undefined" && process.env?.NEXT_PUBLIC_TETRONS_API_URL) {
|
|
16840
|
+
return process.env.NEXT_PUBLIC_TETRONS_API_URL;
|
|
16841
|
+
}
|
|
16842
|
+
return "https://staging.tetrons.com";
|
|
16843
|
+
}
|
|
16844
|
+
const API_BASE_URL = getApiBaseUrl();
|
|
16833
16845
|
useEffect8(() => {
|
|
16834
16846
|
const validateKey = async () => {
|
|
16835
16847
|
try {
|