tetrons 2.3.65 → 2.3.67

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,18 @@
1
+ // src/index.browserimpl.ts
2
+ function getInstallDateKey() {
3
+ return "tetrons_installed_at";
4
+ }
5
+ async function getOrCreateInstallDate() {
6
+ const key = getInstallDateKey();
7
+ const saved = localStorage.getItem(key);
8
+ if (saved) {
9
+ const parsed = new Date(saved);
10
+ if (!isNaN(parsed.getTime())) return parsed;
11
+ }
12
+ const now = (/* @__PURE__ */ new Date()).toISOString();
13
+ localStorage.setItem(key, now);
14
+ return new Date(now);
15
+ }
16
+ export {
17
+ getOrCreateInstallDate
18
+ };
package/dist/index.d.mts CHANGED
@@ -6,7 +6,7 @@ type EditorContentProps = {
6
6
  declare function EditorContent({ apiKey }: EditorContentProps): React.JSX.Element;
7
7
 
8
8
  declare function initializeTetrons(apiKey: string): Promise<void>;
9
- declare function getTetronsVersion(): "" | "free" | "pro" | "premium" | "platinum";
9
+ declare function getTetronsVersion(): string;
10
10
  declare function isApiKeyValid(): boolean;
11
11
  declare function getTetronsRemainingDays(): Promise<number | null>;
12
12