@logludo/sdk 0.0.0-stage → 1.0.0

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/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2026 LogLudo. All rights reserved.
2
+
3
+ This software and its associated documentation files (the "Software") are the
4
+ proprietary property of LogLudo. All rights, title, and interest in and to the
5
+ Software are and shall remain exclusively with LogLudo.
6
+
7
+ Permission is granted to integrate and bundle the Software into your own game
8
+ projects solely for the purpose of sending telemetry to and using the LogLudo
9
+ platform.
10
+
11
+ Except as expressly permitted above, you may not copy, modify, publish,
12
+ distribute, sublicense, sell, or create derivative works from the Software, in
13
+ whole or in part, without prior written permission from LogLudo.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
22
+
package/README.md CHANGED
@@ -1,3 +1,277 @@
1
- # Temporary Holding Version
1
+ # LogLudo JavaScript SDK (`@logludo/sdk`)
2
+
3
+ <p align="center">
4
+ <b>Zero-dependency telemetry for HTML5, Canvas, WebGL, and JavaScript web game frameworks.</b><br />
5
+ Vanilla JS · Phaser 3 · PixiJS · Three.js · Babylon.js · KAPLAY (Kaboom) · Excalibur · PlayCanvas · TypeScript · Electron · Capacitor
6
+ </p>
7
+
8
+ - **Zero dependencies**, no `postinstall` scripts, works in every modern browser.
9
+ - **Session lifecycle** (`session_start` / `session_end`), device cohorts, and retention masks entirely on-device.
10
+ - **Automatic crash capture** for `window.onerror` and `unhandledrejection`, replayed on the next boot.
11
+ - **SceneLytics™ spatial telemetry**: movement trails, spatial events, and full-canvas room captures.
12
+ - **Progression funnels**, A/B experiment flags, and in-memory aggregators.
13
+ - **Batching, deduplication, offline queue, exponential backoff, and loop-spam protection** out of the box.
14
+
15
+ ---
16
+
17
+ ## Installation
18
+
19
+ ### Option 1 — npm / ES Modules (Vite, Webpack, Rollup, Phaser, TypeScript)
20
+
21
+ ```bash
22
+ npm install @logludo/sdk
23
+ ```
24
+
25
+ ```js
26
+ import LOGLUDO from "@logludo/sdk";
27
+
28
+ LOGLUDO.init({
29
+ gameId: "YOUR_GAME_ID_HERE",
30
+ gameVersion: "1.0.0",
31
+ });
32
+ ```
33
+
34
+ ### Option 2 — Classic `<script>` tag (CDN, drop-in, `file://`)
35
+
36
+ ```html
37
+ <script src="https://cdn.jsdelivr.net/npm/@logludo/sdk/dist/logludo.iife.js"></script>
38
+ <script>
39
+ // window.LOGLUDO is available immediately (also aliased as window.LogLudo).
40
+ LOGLUDO.init({
41
+ gameId: "YOUR_GAME_ID_HERE",
42
+ gameVersion: "1.0.0",
43
+ });
44
+ </script>
45
+ ```
46
+
47
+ > **Automatic init:** when the SDK file has a pre-injected Game ID (this is what the
48
+ > LogLudo Autolytics integration pull request does), the IIFE build initializes itself on
49
+ > `DOMContentLoaded`. Set `window.LOGLUDO_MANUAL_INIT = true` **before** the script tag if
50
+ > you would rather call `LOGLUDO.init()` yourself.
51
+
52
+ ### Option 3 — Direct file drop-in (no bundler, no network)
53
+
54
+ Copy `dist/logludo.esm.js` (ESM) or `dist/logludo.iife.js` (classic script) into your project:
55
+
56
+ ```js
57
+ import LOGLUDO from "./lib/logludo.js"; // ESM build
58
+ ```
59
+
60
+ ```html
61
+ <script src="./logludo.js"></script> <!-- IIFE build -->
62
+ ```
63
+
64
+ ---
65
+
66
+ ## Framework integrations
67
+
68
+ ### Phaser 3
69
+
70
+ ```js
71
+ import Phaser from "phaser";
72
+ import LOGLUDO from "@logludo/sdk";
73
+
74
+ const game = new Phaser.Game({
75
+ /* ... */
76
+ callbacks: {
77
+ postBoot: (game) => LOGLUDO.attachPhaser(game),
78
+ },
79
+ });
80
+ ```
81
+
82
+ `attachPhaser(game)` automatically:
83
+
84
+ - registers `game.canvas` so `captureScene()` works without extra config,
85
+ - hooks every `Phaser.Scene` `start` / `wake` event into `LOGLUDO.enterScene(sceneKey)`,
86
+ - reports `framework: "Phaser"` and the Phaser `gameVersion` when available.
87
+
88
+ It returns a cleanup function that detaches every listener.
89
+
90
+ ### PixiJS
91
+
92
+ ```js
93
+ import { Application } from "pixi.js";
94
+ import LOGLUDO from "@logludo/sdk";
95
+
96
+ const app = new Application();
97
+ await app.init({ width: 1280, height: 720 });
98
+ document.body.appendChild(app.canvas);
99
+
100
+ LOGLUDO.init({ gameId: "YOUR_GAME_ID_HERE", canvas: app.canvas, framework: "PixiJS" });
101
+ LOGLUDO.enterScene("menu");
102
+ ```
103
+
104
+ ### Three.js
105
+
106
+ ```js
107
+ import * as THREE from "three";
108
+ import LOGLUDO from "@logludo/sdk";
109
+
110
+ const renderer = new THREE.WebGLRenderer();
111
+ LOGLUDO.init({ gameId: "YOUR_GAME_ID_HERE", canvas: renderer.domElement, framework: "Three.js" });
112
+ ```
113
+
114
+ ### KAPLAY / Kaboom
115
+
116
+ ```js
117
+ import kaplay from "kaplay";
118
+ import LOGLUDO from "@logludo/sdk";
119
+
120
+ LOGLUDO.init({ gameId: "YOUR_GAME_ID_HERE", framework: "KAPLAY" });
121
+ const k = kaplay();
122
+
123
+ k.scene("level-1", () => {
124
+ LOGLUDO.enterScene("level-1");
125
+ // ...
126
+ });
127
+ ```
128
+
129
+ ### Vanilla HTML5 Canvas / `requestAnimationFrame`
130
+
131
+ ```js
132
+ LOGLUDO.init({ gameId: "YOUR_GAME_ID_HERE" });
133
+
134
+ function loop() {
135
+ // High-frequency counters belong in aggregators, never in sendEvent().
136
+ LOGLUDO.aggregateAdd("frames_rendered", 1, "sum");
137
+ requestAnimationFrame(loop);
138
+ }
139
+ requestAnimationFrame(loop);
140
+ ```
141
+
142
+ ---
143
+
144
+ ## What is captured automatically
145
+
146
+ | Event | Trigger | Key fields |
147
+ | :--- | :--- | :--- |
148
+ | `session_start` | `init()` | `app_version`, `sdk_version`, `framework`, `platform`, `client_type`, `os_info`, `device_model`, `domain`, `url`, `days_since_install`, `session_count`, `active_mask`, `test_bucket`, `is_first_session_today` |
149
+ | `session_end` | `pagehide` / `beforeunload` / `destroy()` | `duration_seconds`, `exit_state`, `last_scene`, plus every popped aggregate |
150
+ | `gameplay` (`scene_exit`) | `enterScene()` or session end (≥ 0.2 s in scene) | `room_name`, `scene_name`, `next_scene`, `duration_seconds`, `is_session_exit` |
151
+ | `performance` (`ping`) | 10 s after a scene starts (configurable) | `average_fps`, `min_fps`, `max_fps`, `current_scene`, `memory_mb` when available |
152
+ | `error` (`fatal_crash` / `unhandled_exception`) | Uncaught errors & rejections | `severity`, `message`, `stack_trace`, `current_scene` (persisted and replayed on next boot) |
153
+
154
+ ---
155
+
156
+ ## Core API
157
+
158
+ ```js
159
+ LOGLUDO.init({ gameId, gameVersion?, framework?, canvas?, ... });
160
+ LOGLUDO.sendEvent("gameplay", { action: "jump", height: 220 });
161
+ LOGLUDO.enterScene("level_2");
162
+ LOGLUDO.funnelStep("tutorial_complete");
163
+ LOGLUDO.funnelDropoff("level_1_complete", "quit");
164
+ LOGLUDO.aggregateAdd("coins", 25, "sum");
165
+ LOGLUDO.experiment("new_shop_ui", false);
166
+ LOGLUDO.trackPath(player, 60);
167
+ LOGLUDO.captureScene("level_1");
168
+ await LOGLUDO.flush(true);
169
+ ```
170
+
171
+ Allowed event categories: `session_start`, `session_end`, `error`, `progression`,
172
+ `monetization`, `gameplay`, `design`, `performance`.
173
+
174
+ > Every `snake_case` API has a `camelCase` alias (and vice versa), so
175
+ > `sendEvent` / `send_event`, `enterScene` / `enter_scene`, `trackPath` / `track_path`,
176
+ > `funnelStep` / `funnel_step`, `aggregateAdd` / `aggregate_add` all work identically.
177
+
178
+ ### `init(options)`
179
+
180
+ | Option | Default | Description |
181
+ | :--- | :--- | :--- |
182
+ | `gameId` (`game_ID`) | — | **Required.** Your LogLudo project identifier. |
183
+ | `gameVersion` (`appVersion`) | `"1.0.0"` | Release version string. |
184
+ | `apiUrl` (`api_url`) | `https://api.logludo.com/v0` | Ingestion base URL. |
185
+ | `framework` | auto-detected | Explicit framework label. |
186
+ | `canvas` | largest `<canvas>` | Element, CSS selector, or resolver used by `captureScene()`. |
187
+ | `logLevel` (`log_level`) | `"info"` in dev, `"errors"` in prod | `silent` \| `errors` \| `info` \| `verbose`. |
188
+ | `debug` / `buildType` | auto-detected | Force `"run"` (dev) or `"build"` (release) tagging. |
189
+ | `captureCrashes` (`capture_crashes`) | `true` | Attach global error / rejection handlers. |
190
+ | `autoPerformance` | `true` | Sample FPS via `requestAnimationFrame`. |
191
+ | `performanceDelayMs` | `10000` | Delay before the first scene performance ping. |
192
+ | `performanceIntervalMs` | `0` | Repeat the ping every N ms (`0` = once per scene). |
193
+ | `captureHotkeysEnabled` | `true` | `Ctrl/Cmd + Shift + F9` SceneLytics capture in dev builds. |
194
+ | `autoFlush` | `true` | Flush on interval, on critical events, and on unload. |
195
+ | `batchLimit` | `4` (browser) / `10` (Node) | Buffer size before an automatic flush. |
196
+ | `flushIntervalMs` | `2000` dev / `5000` prod | Periodic flush cadence. |
197
+ | `dedupWindowMs` | `2000` | Suppress identical event + payload pairs. |
198
+ | `autoFlushOnSceneChange` | `false` | Flush when `enterScene()` switches scenes. |
199
+ | `defaultExperimentPercentage` | `50` | Local bucketing % before server flags load. |
200
+ | `sessionStartPayload` | — | Extra fields merged into `session_start`. |
201
+ | `userId` | — | Explicit player identifier (see `identify()`). |
202
+ | `storagePrefix` | `"logludo"` | `localStorage` key prefix. |
203
+ | `anchorX` / `anchorY` | `0` | Spatial origin offset for reported coordinates. |
204
+
205
+ ### SceneLytics™ spatial telemetry
206
+
207
+ ```js
208
+ // Once, at player spawn — never inside update()/requestAnimationFrame().
209
+ LOGLUDO.trackPath(player, 60);
210
+
211
+ // Or sample primitive coordinates from your own loop.
212
+ LOGLUDO.samplePath("player", playerX, playerY);
213
+
214
+ // Link a cause to a spatial outcome.
215
+ LOGLUDO.startLink("shot");
216
+ LOGLUDO.sendEvent("gameplay", {
217
+ action: "boss_hit",
218
+ link_id: LOGLUDO.getLink("shot"),
219
+ x: boss.x,
220
+ y: boss.y,
221
+ direction: 180,
222
+ });
223
+
224
+ // Upload the rendered canvas as SceneLytics tiles.
225
+ await LOGLUDO.captureScene("level_1");
226
+ ```
227
+
228
+ ### Funnels, experiments, aggregators
229
+
230
+ ```js
231
+ LOGLUDO.funnelStep("run_start");
232
+ LOGLUDO.whenExperimentsReady(() => {
233
+ if (LOGLUDO.experiment("double_coins", false)) enableDoubleCoins();
234
+ });
235
+
236
+ LOGLUDO.aggregateAdd("damage_taken", 35, "sum");
237
+ LOGLUDO.aggregateAdd("frame_time_ms", 16.4, "average");
238
+ LOGLUDO.aggregateAdd("weapon_used", "bow", "frequency");
239
+ ```
240
+
241
+ ### Built-in safeguards
242
+
243
+ - **Loop-spam guard** — events fired 4+ consecutive frames (or > 12/s) are blocked and purged with a dev warning; use `aggregateAdd()` inside loops instead.
244
+ - **Rate limiting** — 20 events/sec for non-critical categories. Critical events (`session_start`, `session_end`, `error`, `monetization`, and funnel steps) bypass the cap.
245
+ - **Canonical deduplication** — identical event + payload pairs inside `dedupWindowMs` (or the last 20 buffered events) are dropped before volatile path breadcrumbs are attached.
246
+ - **Non-mutating payloads** — the object you pass to `sendEvent()` is cloned and never modified.
247
+ - **Offline persistence & backoff** — unsent events persist to `localStorage` (max 400), flush failures back off exponentially from 2 s to 30 s, and permanent 4xx errors (except `429`) are discarded instead of retried forever.
248
+ - **`pagehide` reliability** — session end uses `navigator.sendBeacon()` when available so the final batch survives a tab close.
249
+
250
+ ---
251
+
252
+ ## Build & test
253
+
254
+ ```bash
255
+ npm run build # typecheck + emit ESM, CJS, IIFE and .d.ts into dist/
256
+ npm run typecheck # typecheck only
257
+ npm test # node:test suite against dist/
258
+ ```
259
+
260
+ Artifacts produced in `dist/`:
261
+
262
+ | File | Purpose |
263
+ | :--- | :--- |
264
+ | `index.mjs` / `index.cjs` | Bundler and Node entry points. |
265
+ | `logludo.esm.js` | Single-file ESM drop-in (used by Autolytics for ESM projects). |
266
+ | `logludo.iife.js` | Minified classic `<script>` build exposing `window.LOGLUDO`. |
267
+ | `logludo.d.ts` | Standalone single-file TypeScript declarations. |
268
+
269
+ > The `dist/` folder is committed to this repository so CDN consumers, Autolytics, and
270
+ > one-click dashboard SDK updates never require a build step. Re-run `npm run build` and
271
+ > commit the result before tagging a release.
272
+
273
+ ## License
274
+
275
+ See [LICENSE](./LICENSE).
276
+
2
277
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
@@ -0,0 +1,24 @@
1
+ export interface CapturePayload {
2
+ game_id: string;
3
+ game_version: string;
4
+ room_name: string;
5
+ image_base64?: string;
6
+ tile_x?: number;
7
+ tile_y?: number;
8
+ manifest?: {
9
+ width: number;
10
+ height: number;
11
+ tileSize: number;
12
+ columns: number;
13
+ rows: number;
14
+ };
15
+ }
16
+ export declare function resolveTargetCanvas(explicit?: HTMLCanvasElement | string | (() => HTMLCanvasElement | null)): HTMLCanvasElement | null;
17
+ export declare function captureAndUploadCanvas(params: {
18
+ canvas: HTMLCanvasElement;
19
+ apiUrl: string;
20
+ gameId: string;
21
+ gameVersion: string;
22
+ sceneName: string;
23
+ tileSize?: number;
24
+ }): Promise<boolean>;
@@ -0,0 +1,166 @@
1
+ import type { AggregateType, AggregateValue, CaptureSceneOptions, EventCategory, EventPayload, LogLudoOptions, PhaserAttachOptions, TrackTarget } from "./types";
2
+ export declare const SDK_VERSION = "js-1.0.0";
3
+ export declare const DEFAULT_API_URL = "https://api.logludo.com/v0";
4
+ export declare const GAME_ID_PLACEHOLDER = "__LOGLUDO_INJECT_GAME_ID_HERE__";
5
+ export declare class LogLudoClient {
6
+ initialized: boolean;
7
+ sessionId: string;
8
+ deviceId: string;
9
+ bucket: number;
10
+ daysSinceInstall: number;
11
+ sessionCount: number;
12
+ activeMask: number;
13
+ firstOpenDate: number;
14
+ installTime: number;
15
+ isFirstSessionToday: boolean;
16
+ isDev: boolean;
17
+ framework: string;
18
+ private _options;
19
+ private _storage;
20
+ private _completedFunnelSteps;
21
+ private _completedFunnelDropoffs;
22
+ private _eventBuffer;
23
+ private _bufferRaws;
24
+ private _inFlightBatchCount;
25
+ private _isFlushing;
26
+ private _flushQueued;
27
+ private _flushQueuedForce;
28
+ private _offlineDirty;
29
+ private _retryAfterTime;
30
+ private _retryBackoffMs;
31
+ private _recentEventHistory;
32
+ private _dedupHistoryLimit;
33
+ private _dedupWarnedAt;
34
+ private _frame;
35
+ private _spamTracker;
36
+ private _pathCallTracker;
37
+ private _rateWarnedAt;
38
+ private _eventsThisSecond;
39
+ private _lastEventSecond;
40
+ private _lastFlushTime;
41
+ private _gameIdWarned;
42
+ private _activeExperiments;
43
+ private _experimentFlags;
44
+ private _experimentsLoaded;
45
+ private _experimentReadyCallbacks;
46
+ private _experimentWarned;
47
+ private _expTimeoutHandle;
48
+ private _trackedPaths;
49
+ private _targetKeyMap;
50
+ private _targetKeySeq;
51
+ private _activeLinks;
52
+ private _linkSeq;
53
+ private _aggregates;
54
+ private _sessionStartTimeMs;
55
+ private _currentSceneName;
56
+ private _sceneEnterTimeMs;
57
+ private _scenePingSent;
58
+ private _lastScenePingMs;
59
+ private _sessionEnded;
60
+ private _fpsSamples;
61
+ private _lastRafTime;
62
+ private _rafId;
63
+ private _flushTimer;
64
+ private _offlineSaveTimer;
65
+ private _cleanupListeners;
66
+ private _userTraits;
67
+ private _explicitFlushInterval;
68
+ constructor(initialOptions?: LogLudoOptions);
69
+ private _logRank;
70
+ private _log;
71
+ private _storageKey;
72
+ private _applyOptions;
73
+ configure(options: LogLudoOptions): this;
74
+ init(options?: LogLudoOptions): this;
75
+ private _loadOfflineBuffer;
76
+ private _loadOrCreateDeviceData;
77
+ private _generateDeviceId;
78
+ saveDeviceData(): void;
79
+ saveOffline(): void;
80
+ private _loadCachedExperiments;
81
+ private _flushPendingCrashFromStorage;
82
+ private _attachBrowserListeners;
83
+ private _detachListeners;
84
+ private _startTimers;
85
+ private _stopTimers;
86
+ private _ensureRafLoop;
87
+ private _emitPerformancePing;
88
+ enterScene(sceneName: string): this;
89
+ enter_scene(sceneName: string): this;
90
+ setScene(sceneName: string): this;
91
+ set_scene(sceneName: string): this;
92
+ identify(userId: string, traits?: Record<string, unknown>): this;
93
+ isExperimentsReady(): boolean;
94
+ is_experiments_ready(): boolean;
95
+ private _hashExperimentBucket;
96
+ private _flushExperimentCallbacks;
97
+ whenExperimentsReady(callback: () => void, timeoutMs?: number): void;
98
+ when_experiments_ready(callback: () => void, timeoutMs?: number): void;
99
+ experiment(name: string, defaultOrPct?: boolean | number, fallbackPct?: number): boolean;
100
+ fetchExperiments(): Promise<void>;
101
+ private _retroactivelyTagBufferedExperiments;
102
+ private _attachExperimentContext;
103
+ private _resolveTrackKey;
104
+ trackPath(target: TrackTarget, maxLength?: number): this;
105
+ track_path(target: TrackTarget, maxLength?: number): this;
106
+ samplePath(target: TrackTarget, x: number, y: number): this;
107
+ sample_path(target: TrackTarget, x: number, y: number): this;
108
+ stopTrackingPath(target: TrackTarget): this;
109
+ stop_tracking_path(target: TrackTarget): this;
110
+ startLink(scope?: string): string;
111
+ start_link(scope?: string): string;
112
+ getLink(scope?: string): string | undefined;
113
+ get_link(scope?: string): string | undefined;
114
+ clearLink(scope?: string): void;
115
+ clear_link(scope?: string): void;
116
+ private _formatAggregate;
117
+ aggregateAdd(name: string, value: number | string, type?: AggregateType): this;
118
+ aggregate_add(name: string, value: number | string, type?: AggregateType): this;
119
+ aggregatePop(name: string): AggregateValue | undefined;
120
+ aggregate_pop(name: string): AggregateValue | undefined;
121
+ aggregateGetAll(pop?: boolean): Record<string, AggregateValue>;
122
+ aggregate_get_all(pop?: boolean): Record<string, AggregateValue>;
123
+ funnelStep(stepId: string, payload?: EventPayload): boolean;
124
+ funnel_step(stepId: string, payload?: EventPayload): boolean;
125
+ funnelDropoff(stepId: string, reason?: string, payload?: EventPayload): boolean;
126
+ funnel_dropoff(stepId: string, reason?: string, payload?: EventPayload): boolean;
127
+ private _purgeUnflushedSpam;
128
+ private _checkStepSpam;
129
+ sendEvent(name: EventCategory | (string & {}), payload?: EventPayload): boolean;
130
+ send_event(name: EventCategory | (string & {}), payload?: EventPayload): boolean;
131
+ flush(force?: boolean, useKeepalive?: boolean): Promise<boolean>;
132
+ flushEvents(force?: boolean): Promise<boolean>;
133
+ flush_events(force?: boolean): Promise<boolean>;
134
+ private _markFlushFailed;
135
+ private _clearPending;
136
+ handleException(err: {
137
+ message?: string;
138
+ stack?: string;
139
+ } | Error | unknown, extra?: {
140
+ action?: string;
141
+ severity?: string;
142
+ currentScene?: string;
143
+ }): void;
144
+ handle_exception(err: {
145
+ message?: string;
146
+ stack?: string;
147
+ } | Error | unknown, extra?: {
148
+ action?: string;
149
+ severity?: string;
150
+ currentScene?: string;
151
+ }): void;
152
+ private _endSession;
153
+ captureScene(sceneNameOrOptions?: string | CaptureSceneOptions, maybeOptions?: CaptureSceneOptions): Promise<boolean>;
154
+ capture_room(sceneNameOrOptions?: string | CaptureSceneOptions, maybeOptions?: CaptureSceneOptions): Promise<boolean>;
155
+ /**
156
+ * Zero-dependency adapter for Phaser 3 (`Phaser.Game`).
157
+ * Automatically attaches canvas capture, version metadata, and Phaser scene transitions.
158
+ */
159
+ attachPhaser(phaserGame: any, options?: PhaserAttachOptions): () => void;
160
+ attach_phaser(phaserGame: any, options?: PhaserAttachOptions): () => void;
161
+ getQueuedEventCount(): number;
162
+ /** Current periodic flush cadence in milliseconds. */
163
+ getFlushIntervalMs(): number;
164
+ destroy(): void;
165
+ }
166
+ export declare const LOGLUDO: LogLudoClient;
@@ -0,0 +1,11 @@
1
+ export interface EnvironmentInfo {
2
+ platform: string;
3
+ clientType: string;
4
+ osInfo: string;
5
+ deviceModel: string;
6
+ domain: string;
7
+ url: string;
8
+ }
9
+ export declare function detectDevMode(explicitDebug?: boolean, explicitBuildType?: "run" | "build"): boolean;
10
+ export declare function detectEnvironment(): EnvironmentInfo;
11
+ export declare function detectFramework(explicitFramework?: string): string;