@archie/devtools 0.0.9 → 0.0.11

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.
@@ -1,7 +0,0 @@
1
- import {
2
- injectInspector
3
- } from "../../chunk-6HHNPJXA.mjs";
4
- import "../../chunk-D5EA6RR5.mjs";
5
-
6
- // src/client/inject-inspector/auto.ts
7
- injectInspector();
@@ -1,38 +0,0 @@
1
- /** Only configured domains (Archie host origins) and optionally localhost in dev. "*" is never used. */
2
- type InjectOptions = {
3
- id?: string;
4
- /**
5
- * Origin(s) allowed to send postMessage commands to the inspector.
6
- * If not set, uses Archie host origins + localhost when dev is true.
7
- * "*" is not allowed; pass an array of concrete origins.
8
- */
9
- allowedOrigins?: string | string[];
10
- /**
11
- * Origin to which the inspector sends postMessage replies (the parent window).
12
- * If not set and in an iframe, uses document.referrer origin — except when the page
13
- * is a preview iframe (*.previews.staging.archie-platform.com), in which case you
14
- * must pass the parent app origin (e.g. https://app.dev.archie-platform.com).
15
- * "*" is not allowed.
16
- */
17
- targetOrigin?: string;
18
- /**
19
- * When true, allowedOrigins default includes localhost for local testing.
20
- * When undefined, inferred from document.referrer (localhost or missing = dev).
21
- */
22
- dev?: boolean;
23
- };
24
- /**
25
- * Loads and runs the Archie inspector script (dynamic import).
26
- * Safe to call multiple times: avoids duplicate execution by id.
27
- * No-op when run outside the browser (e.g. SSR).
28
- *
29
- * Security: Origin restrictions are always set (never "*"). We do not inject
30
- * script via eval/Function or write HTML (innerHTML/insertAdjacentHTML).
31
- * The inspector only accepts postMessage from allowlisted origins and
32
- * sanitizes style values before applying to the DOM.
33
- *
34
- * @returns Promise that resolves to the marker script element, or null if not in browser / already present
35
- */
36
- declare function injectInspector(opts?: InjectOptions): Promise<HTMLScriptElement | null> | null;
37
-
38
- export { type InjectOptions, injectInspector };
@@ -1,38 +0,0 @@
1
- /** Only configured domains (Archie host origins) and optionally localhost in dev. "*" is never used. */
2
- type InjectOptions = {
3
- id?: string;
4
- /**
5
- * Origin(s) allowed to send postMessage commands to the inspector.
6
- * If not set, uses Archie host origins + localhost when dev is true.
7
- * "*" is not allowed; pass an array of concrete origins.
8
- */
9
- allowedOrigins?: string | string[];
10
- /**
11
- * Origin to which the inspector sends postMessage replies (the parent window).
12
- * If not set and in an iframe, uses document.referrer origin — except when the page
13
- * is a preview iframe (*.previews.staging.archie-platform.com), in which case you
14
- * must pass the parent app origin (e.g. https://app.dev.archie-platform.com).
15
- * "*" is not allowed.
16
- */
17
- targetOrigin?: string;
18
- /**
19
- * When true, allowedOrigins default includes localhost for local testing.
20
- * When undefined, inferred from document.referrer (localhost or missing = dev).
21
- */
22
- dev?: boolean;
23
- };
24
- /**
25
- * Loads and runs the Archie inspector script (dynamic import).
26
- * Safe to call multiple times: avoids duplicate execution by id.
27
- * No-op when run outside the browser (e.g. SSR).
28
- *
29
- * Security: Origin restrictions are always set (never "*"). We do not inject
30
- * script via eval/Function or write HTML (innerHTML/insertAdjacentHTML).
31
- * The inspector only accepts postMessage from allowlisted origins and
32
- * sanitizes style values before applying to the DOM.
33
- *
34
- * @returns Promise that resolves to the marker script element, or null if not in browser / already present
35
- */
36
- declare function injectInspector(opts?: InjectOptions): Promise<HTMLScriptElement | null> | null;
37
-
38
- export { type InjectOptions, injectInspector };