@spotpatch/runtime 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 +21 -0
- package/README.md +9 -0
- package/dist/index.cjs +5041 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +32 -0
- package/dist/index.d.ts +32 -0
- package/dist/index.js +5039 -0
- package/dist/index.js.map +1 -0
- package/package.json +57 -0
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { SPOTPATCH_API_BASE, RuntimeAiConfig, ContextBudget, SpotPatchLocalePreference } from '@spotpatch/shared';
|
|
2
|
+
|
|
3
|
+
interface RuntimeConfig {
|
|
4
|
+
readonly apiBase: typeof SPOTPATCH_API_BASE;
|
|
5
|
+
readonly ai: RuntimeAiConfig;
|
|
6
|
+
readonly budget: Readonly<ContextBudget>;
|
|
7
|
+
readonly debug: boolean;
|
|
8
|
+
readonly locale: SpotPatchLocalePreference;
|
|
9
|
+
readonly maxTargets: number;
|
|
10
|
+
readonly redact: boolean;
|
|
11
|
+
readonly sessionToken: string;
|
|
12
|
+
readonly shortcut: string;
|
|
13
|
+
readonly spotPatchVersion: string;
|
|
14
|
+
readonly viteVersion: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
declare function bootstrapSpotPatch(config: RuntimeConfig): void;
|
|
18
|
+
|
|
19
|
+
type RuntimeStatus = "idle" | "inspecting" | "selected" | "previewing";
|
|
20
|
+
interface RuntimeState {
|
|
21
|
+
readonly status: RuntimeStatus;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
interface SpotPatchController {
|
|
25
|
+
readonly dispose: () => void;
|
|
26
|
+
readonly getState: () => RuntimeState;
|
|
27
|
+
readonly mount: () => void;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
declare const UI_MARKER_ATTRIBUTE: "data-spotpatch-ui";
|
|
31
|
+
|
|
32
|
+
export { type RuntimeConfig, type SpotPatchController, UI_MARKER_ATTRIBUTE, bootstrapSpotPatch };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { SPOTPATCH_API_BASE, RuntimeAiConfig, ContextBudget, SpotPatchLocalePreference } from '@spotpatch/shared';
|
|
2
|
+
|
|
3
|
+
interface RuntimeConfig {
|
|
4
|
+
readonly apiBase: typeof SPOTPATCH_API_BASE;
|
|
5
|
+
readonly ai: RuntimeAiConfig;
|
|
6
|
+
readonly budget: Readonly<ContextBudget>;
|
|
7
|
+
readonly debug: boolean;
|
|
8
|
+
readonly locale: SpotPatchLocalePreference;
|
|
9
|
+
readonly maxTargets: number;
|
|
10
|
+
readonly redact: boolean;
|
|
11
|
+
readonly sessionToken: string;
|
|
12
|
+
readonly shortcut: string;
|
|
13
|
+
readonly spotPatchVersion: string;
|
|
14
|
+
readonly viteVersion: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
declare function bootstrapSpotPatch(config: RuntimeConfig): void;
|
|
18
|
+
|
|
19
|
+
type RuntimeStatus = "idle" | "inspecting" | "selected" | "previewing";
|
|
20
|
+
interface RuntimeState {
|
|
21
|
+
readonly status: RuntimeStatus;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
interface SpotPatchController {
|
|
25
|
+
readonly dispose: () => void;
|
|
26
|
+
readonly getState: () => RuntimeState;
|
|
27
|
+
readonly mount: () => void;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
declare const UI_MARKER_ATTRIBUTE: "data-spotpatch-ui";
|
|
31
|
+
|
|
32
|
+
export { type RuntimeConfig, type SpotPatchController, UI_MARKER_ATTRIBUTE, bootstrapSpotPatch };
|