browserclaw 0.11.2 → 0.11.3

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/index.d.cts CHANGED
@@ -1739,6 +1739,31 @@ declare function assertBrowserNavigationRedirectChainAllowed(opts: {
1739
1739
  */
1740
1740
  declare function requiresInspectableBrowserNavigationRedirects(ssrfPolicy?: SsrfPolicy): boolean;
1741
1741
 
1742
+ declare function ensureContextState(context: BrowserContext): ContextState;
1743
+
1744
+ /**
1745
+ * Parse a role ref string (e.g. "e1", "@e1", "ref=e1") to a normalized ref ID.
1746
+ * Returns null if the string is not a valid role ref.
1747
+ */
1748
+ declare function parseRoleRef(raw: string): string | null;
1749
+ /**
1750
+ * Require a ref string, normalizing and validating it.
1751
+ * Throws if the ref is empty.
1752
+ */
1753
+ declare function requireRef(value: string | undefined): string;
1754
+ /**
1755
+ * Require either a ref or selector, returning whichever is provided.
1756
+ * Throws if neither is provided.
1757
+ */
1758
+ declare function requireRefOrSelector(ref?: string, selector?: string): {
1759
+ ref?: string;
1760
+ selector?: string;
1761
+ };
1762
+ /** Clamp interaction timeout to [500, 60000]ms range, defaulting to 8000ms. */
1763
+ declare function resolveInteractionTimeoutMs(timeoutMs?: number): number;
1764
+ /** Bounded delay validator for animation/interaction delays. */
1765
+ declare function resolveBoundedDelayMs(value: number | undefined, label: string, maxMs: number): number;
1766
+
1742
1767
  declare class BrowserTabNotFoundError extends Error {
1743
1768
  constructor(message?: string);
1744
1769
  }
@@ -1755,7 +1780,6 @@ declare function withPageScopedCdpClient<T>(opts: {
1755
1780
  targetId?: string;
1756
1781
  fn: (send: (method: string, params?: Record<string, unknown>) => Promise<unknown>) => Promise<T>;
1757
1782
  }): Promise<T>;
1758
- declare function ensureContextState(context: BrowserContext): ContextState;
1759
1783
  /**
1760
1784
  * Set or clear a persistent dialog handler for a page.
1761
1785
  * When set, this handler is called for every dialog that is not covered by armDialog().
@@ -1783,28 +1807,6 @@ declare function resolvePageByTargetIdOrThrow(opts: {
1783
1807
  cdpUrl: string;
1784
1808
  targetId: string;
1785
1809
  }): Promise<Page>;
1786
- /**
1787
- * Parse a role ref string (e.g. "e1", "@e1", "ref=e1") to a normalized ref ID.
1788
- * Returns null if the string is not a valid role ref.
1789
- */
1790
- declare function parseRoleRef(raw: string): string | null;
1791
- /**
1792
- * Require a ref string, normalizing and validating it.
1793
- * Throws if the ref is empty.
1794
- */
1795
- declare function requireRef(value: string | undefined): string;
1796
- /**
1797
- * Require either a ref or selector, returning whichever is provided.
1798
- * Throws if neither is provided.
1799
- */
1800
- declare function requireRefOrSelector(ref?: string, selector?: string): {
1801
- ref?: string;
1802
- selector?: string;
1803
- };
1804
- /** Clamp interaction timeout to [500, 60000]ms range, defaulting to 8000ms. */
1805
- declare function resolveInteractionTimeoutMs(timeoutMs?: number): number;
1806
- /** Bounded delay validator for animation/interaction delays. */
1807
- declare function resolveBoundedDelayMs(value: number | undefined, label: string, maxMs: number): number;
1808
1810
  /**
1809
1811
  * Get a page for a target, ensuring page state is initialized and role refs are restored.
1810
1812
  */
package/dist/index.d.ts CHANGED
@@ -1739,6 +1739,31 @@ declare function assertBrowserNavigationRedirectChainAllowed(opts: {
1739
1739
  */
1740
1740
  declare function requiresInspectableBrowserNavigationRedirects(ssrfPolicy?: SsrfPolicy): boolean;
1741
1741
 
1742
+ declare function ensureContextState(context: BrowserContext): ContextState;
1743
+
1744
+ /**
1745
+ * Parse a role ref string (e.g. "e1", "@e1", "ref=e1") to a normalized ref ID.
1746
+ * Returns null if the string is not a valid role ref.
1747
+ */
1748
+ declare function parseRoleRef(raw: string): string | null;
1749
+ /**
1750
+ * Require a ref string, normalizing and validating it.
1751
+ * Throws if the ref is empty.
1752
+ */
1753
+ declare function requireRef(value: string | undefined): string;
1754
+ /**
1755
+ * Require either a ref or selector, returning whichever is provided.
1756
+ * Throws if neither is provided.
1757
+ */
1758
+ declare function requireRefOrSelector(ref?: string, selector?: string): {
1759
+ ref?: string;
1760
+ selector?: string;
1761
+ };
1762
+ /** Clamp interaction timeout to [500, 60000]ms range, defaulting to 8000ms. */
1763
+ declare function resolveInteractionTimeoutMs(timeoutMs?: number): number;
1764
+ /** Bounded delay validator for animation/interaction delays. */
1765
+ declare function resolveBoundedDelayMs(value: number | undefined, label: string, maxMs: number): number;
1766
+
1742
1767
  declare class BrowserTabNotFoundError extends Error {
1743
1768
  constructor(message?: string);
1744
1769
  }
@@ -1755,7 +1780,6 @@ declare function withPageScopedCdpClient<T>(opts: {
1755
1780
  targetId?: string;
1756
1781
  fn: (send: (method: string, params?: Record<string, unknown>) => Promise<unknown>) => Promise<T>;
1757
1782
  }): Promise<T>;
1758
- declare function ensureContextState(context: BrowserContext): ContextState;
1759
1783
  /**
1760
1784
  * Set or clear a persistent dialog handler for a page.
1761
1785
  * When set, this handler is called for every dialog that is not covered by armDialog().
@@ -1783,28 +1807,6 @@ declare function resolvePageByTargetIdOrThrow(opts: {
1783
1807
  cdpUrl: string;
1784
1808
  targetId: string;
1785
1809
  }): Promise<Page>;
1786
- /**
1787
- * Parse a role ref string (e.g. "e1", "@e1", "ref=e1") to a normalized ref ID.
1788
- * Returns null if the string is not a valid role ref.
1789
- */
1790
- declare function parseRoleRef(raw: string): string | null;
1791
- /**
1792
- * Require a ref string, normalizing and validating it.
1793
- * Throws if the ref is empty.
1794
- */
1795
- declare function requireRef(value: string | undefined): string;
1796
- /**
1797
- * Require either a ref or selector, returning whichever is provided.
1798
- * Throws if neither is provided.
1799
- */
1800
- declare function requireRefOrSelector(ref?: string, selector?: string): {
1801
- ref?: string;
1802
- selector?: string;
1803
- };
1804
- /** Clamp interaction timeout to [500, 60000]ms range, defaulting to 8000ms. */
1805
- declare function resolveInteractionTimeoutMs(timeoutMs?: number): number;
1806
- /** Bounded delay validator for animation/interaction delays. */
1807
- declare function resolveBoundedDelayMs(value: number | undefined, label: string, maxMs: number): number;
1808
1810
  /**
1809
1811
  * Get a page for a target, ensuring page state is initialized and role refs are restored.
1810
1812
  */