{
  "classes": [
    {
      "constants": [],
      "types": [
        {
          "lua_type": "type WebViewOptions = {\n    title: string?,\n    width: number?,\n    height: number?,\n    url: string?,\n    borderless: boolean?,\n    resizable: boolean?,\n    hidden: boolean?,\n    transparent: boolean?,\n}",
          "name": "WebViewOptions",
          "tags": [],
          "source": {
            "path": "",
            "line": 4
          },
          "fields": [
            {
              "lua_type": "title: string?",
              "name": "title",
              "desc": "Window title. Defaults to `\"WebView\"`."
            },
            {
              "lua_type": "width: number?",
              "name": "width",
              "desc": "Window width in pixels. Defaults to `1200`."
            },
            {
              "lua_type": "height: number?",
              "name": "height",
              "desc": "Window height in pixels. Defaults to `900`."
            },
            {
              "lua_type": "url: string?",
              "name": "url",
              "desc": "Initial URL to navigate to."
            },
            {
              "lua_type": "borderless: boolean?",
              "name": "borderless",
              "desc": "If `true`, the window has no title bar or borders (`WS_POPUP` style). Defaults to `false`."
            },
            {
              "lua_type": "resizable: boolean?",
              "name": "resizable",
              "desc": "If `false`, the window cannot be resized by the user. Defaults to `true`."
            },
            {
              "lua_type": "hidden: boolean?",
              "name": "hidden",
              "desc": "If `true`, the window is not shown after creation. Call `handle:show()` to reveal it. Defaults to `false`."
            },
            {
              "lua_type": "transparent: boolean?",
              "name": "transparent",
              "desc": "If `true`, enables per-pixel window transparency. Areas with no CSS background\n(or semi-transparent backgrounds) will show through to whatever is underneath.\nAutomatically implies `borderless = true` (the DWM title bar is always opaque).\nDefaults to `false`."
            }
          ],
          "desc": "Options table for creating a new WebView window."
        }
      ],
      "name": "@eryx/webview",
      "tags": [],
      "functions": [
        {
          "source": {
            "path": "",
            "line": 106
          },
          "is_method": false,
          "signature": "webview.create(\n    options: WebViewOptions?  -- -- Optional configuration for the window.\n) → (\n    WebViewHandle  -- A handle to control the created window.\n)",
          "owner": "webview",
          "desc": "Creates a new WebView2 window. Yields until the WebView2 runtime is fully initialised.",
          "tags": [
            "Yields"
          ],
          "name": "create",
          "return_str": "WebViewHandle",
          "function_type": "Function",
          "returns": [
            {
              "lua_type": "WebViewHandle",
              "desc": "A handle to control the created window."
            }
          ],
          "params": [
            {
              "lua_type": "WebViewOptions?",
              "name": "options",
              "desc": "-- Optional configuration for the window."
            }
          ]
        }
      ],
      "properties": [],
      "source": {
        "path": "",
        "line": 0
      },
      "desc": ""
    },
    {
      "is_primary_export": false,
      "source": {
        "path": "",
        "line": 27
      },
      "tags": [],
      "properties": [],
      "desc": "A handle to a WebView2 window.",
      "name": "WebViewHandle",
      "functions": [
        {
          "source": {
            "path": "",
            "line": 30
          },
          "is_method": true,
          "signature": "WebViewHandle:navigate(\n    url: string  -- -- The URL to navigate to.\n) → ()",
          "desc": "Navigates the webview to a URL.",
          "tags": [],
          "name": "navigate",
          "return_str": "()",
          "function_type": "Method",
          "returns": [],
          "params": [
            {
              "lua_type": "string",
              "name": "url",
              "desc": "-- The URL to navigate to."
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 34
          },
          "is_method": true,
          "signature": "WebViewHandle:navigateToString(\n    html: string  -- -- The HTML string to display.\n) → ()",
          "desc": "Renders raw HTML content in the webview.",
          "tags": [],
          "name": "navigateToString",
          "return_str": "()",
          "function_type": "Method",
          "returns": [],
          "params": [
            {
              "lua_type": "string",
              "name": "html",
              "desc": "-- The HTML string to display."
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 39
          },
          "is_method": true,
          "signature": "WebViewHandle:postMessage(\n    event: string,  -- -- The event category.\n    data: { [any]: any }  -- -- The data to send.\n) → ()",
          "desc": "Sends data to the web content. Received via `window.chrome.webview.addEventListener('message', ...)` in JavaScript.",
          "tags": [],
          "name": "postMessage",
          "return_str": "()",
          "function_type": "Method",
          "returns": [],
          "params": [
            {
              "lua_type": "string",
              "name": "event",
              "desc": "-- The event category."
            },
            {
              "lua_type": "{ [any]: any }",
              "name": "data",
              "desc": "-- The data to send."
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 43
          },
          "is_method": true,
          "signature": "WebViewHandle:executeScript(\n    script: string  -- -- The JavaScript code to execute.\n) → ()",
          "desc": "Executes a JavaScript snippet inside the webview. Fire-and-forget; does not return a result.",
          "tags": [],
          "name": "executeScript",
          "return_str": "()",
          "function_type": "Method",
          "returns": [],
          "params": [
            {
              "lua_type": "string",
              "name": "script",
              "desc": "-- The JavaScript code to execute."
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 47
          },
          "is_method": true,
          "signature": "WebViewHandle:addInitScript(\n    script: string  -- -- The JavaScript code to execute.\n) → ()",
          "desc": "Add a JavaScript snippet to run before any page loads",
          "tags": [],
          "name": "addInitScript",
          "return_str": "()",
          "function_type": "Method",
          "returns": [],
          "params": [
            {
              "lua_type": "string",
              "name": "script",
              "desc": "-- The JavaScript code to execute."
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 51
          },
          "is_method": true,
          "signature": "WebViewHandle:setTitle(\n    title: string  -- -- The new window title.\n) → ()",
          "desc": "Changes the window title.",
          "tags": [],
          "name": "setTitle",
          "return_str": "()",
          "function_type": "Method",
          "returns": [],
          "params": [
            {
              "lua_type": "string",
              "name": "title",
              "desc": "-- The new window title."
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 54
          },
          "is_method": true,
          "signature": "WebViewHandle:show() → ()",
          "desc": "Shows the window (e.g. after creating with `hidden = true`).",
          "tags": [],
          "name": "show",
          "return_str": "()",
          "function_type": "Method",
          "returns": [],
          "params": []
        },
        {
          "source": {
            "path": "",
            "line": 57
          },
          "is_method": true,
          "signature": "WebViewHandle:hide() → ()",
          "desc": "Hides the window without destroying it.",
          "tags": [],
          "name": "hide",
          "return_str": "()",
          "function_type": "Method",
          "returns": [],
          "params": []
        },
        {
          "source": {
            "path": "",
            "line": 62
          },
          "is_method": true,
          "signature": "WebViewHandle:resize(\n    width: number,  -- -- New width in pixels.\n    height: number  -- -- New height in pixels.\n) → ()",
          "desc": "Resizes the window.",
          "tags": [],
          "name": "resize",
          "return_str": "()",
          "function_type": "Method",
          "returns": [],
          "params": [
            {
              "lua_type": "number",
              "name": "width",
              "desc": "-- New width in pixels."
            },
            {
              "lua_type": "number",
              "name": "height",
              "desc": "-- New height in pixels."
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 67
          },
          "is_method": true,
          "signature": "WebViewHandle:move(\n    x: number,  -- -- X coordinate in pixels.\n    y: number  -- -- Y coordinate in pixels.\n) → ()",
          "desc": "Moves the window to an absolute screen position.",
          "tags": [],
          "name": "move",
          "return_str": "()",
          "function_type": "Method",
          "returns": [],
          "params": [
            {
              "lua_type": "number",
              "name": "x",
              "desc": "-- X coordinate in pixels."
            },
            {
              "lua_type": "number",
              "name": "y",
              "desc": "-- Y coordinate in pixels."
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 70
          },
          "is_method": true,
          "signature": "WebViewHandle:center() → ()",
          "desc": "Centers the window on the monitor it currently occupies.",
          "tags": [],
          "name": "center",
          "return_str": "()",
          "function_type": "Method",
          "returns": [],
          "params": []
        },
        {
          "source": {
            "path": "",
            "line": 74
          },
          "is_method": true,
          "signature": "WebViewHandle:onMessage(\n    callback: ((event: string, data: { [any]: any }) → ())  -- -- Called with the message string each time a message is received.\n) → ()",
          "desc": "Registers a callback for messages sent from web content via `window.chrome.webview.postMessage(...)`.",
          "tags": [],
          "name": "onMessage",
          "return_str": "()",
          "function_type": "Method",
          "returns": [],
          "params": [
            {
              "lua_type": "((event: string, data: { [any]: any }) → ())",
              "name": "callback",
              "desc": "-- Called with the message string each time a message is received."
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 79
          },
          "is_method": true,
          "signature": "WebViewHandle:onClose(\n    callback: (() → ())  -- -- Called when a close is requested.\n) → ()",
          "desc": "Registers a callback invoked when the user attempts to close the window (e.g. clicks the X button).\nWhile a callback is set, the default close is suppressed; call `handle:destroy()` from the callback to actually close the window.",
          "tags": [],
          "name": "onClose",
          "return_str": "()",
          "function_type": "Method",
          "returns": [],
          "params": [
            {
              "lua_type": "(() → ())",
              "name": "callback",
              "desc": "-- Called when a close is requested."
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 83
          },
          "is_method": true,
          "signature": "WebViewHandle:setResizable(\n    resizable: boolean  -- -- `true` to allow resizing, `false` to prevent it.\n) → ()",
          "desc": "Toggles whether the window can be resized by the user.",
          "tags": [],
          "name": "setResizable",
          "return_str": "()",
          "function_type": "Method",
          "returns": [],
          "params": [
            {
              "lua_type": "boolean",
              "name": "resizable",
              "desc": "-- `true` to allow resizing, `false` to prevent it."
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 87
          },
          "is_method": true,
          "signature": "WebViewHandle:setBorderless(\n    borderless: boolean  -- -- `true` for borderless, `false` to restore the standard window frame.\n) → ()",
          "desc": "Toggles borderless mode. When borderless, the window has no title bar or borders (`WS_POPUP` style).",
          "tags": [],
          "name": "setBorderless",
          "return_str": "()",
          "function_type": "Method",
          "returns": [],
          "params": [
            {
              "lua_type": "boolean",
              "name": "borderless",
              "desc": "-- `true` for borderless, `false` to restore the standard window frame."
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 92
          },
          "is_method": true,
          "signature": "WebViewHandle:setTransparent(\n    transparent: boolean  -- -- `true` for transparent, `false` for opaque.\n) → ()",
          "desc": "Toggles per-pixel window transparency at runtime. When enabled, any area without\na CSS background (or with a semi-transparent one) will show through to windows beneath.",
          "tags": [],
          "name": "setTransparent",
          "return_str": "()",
          "function_type": "Method",
          "returns": [],
          "params": [
            {
              "lua_type": "boolean",
              "name": "transparent",
              "desc": "-- `true` for transparent, `false` for opaque."
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 96
          },
          "is_method": true,
          "signature": "WebViewHandle:setOpacity(\n    alpha: number  -- -- Opacity from `0.0` (fully transparent) to `1.0` (fully opaque).\n) → ()",
          "desc": "Sets the overall window opacity using a layered window.",
          "tags": [],
          "name": "setOpacity",
          "return_str": "()",
          "function_type": "Method",
          "returns": [],
          "params": [
            {
              "lua_type": "number",
              "name": "alpha",
              "desc": "-- Opacity from `0.0` (fully transparent) to `1.0` (fully opaque)."
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 99
          },
          "is_method": true,
          "signature": "WebViewHandle:destroy() → ()",
          "desc": "Destroys the window and releases all resources. The handle becomes invalid after this call.",
          "tags": [],
          "name": "destroy",
          "return_str": "()",
          "function_type": "Method",
          "returns": [],
          "params": []
        }
      ],
      "metamethods": [],
      "types": []
    }
  ]
}