{
  "definitions": {
    "events": {
      "$ref": "#/definitions/Events",
      "$schema": "http://json-schema.org/draft-07/schema#",
      "definitions": {
        "Events": {
          "additionalProperties": false,
          "properties": {
            "modalShow": {
              "additionalProperties": false,
              "properties": {
                "id": {
                  "type": "string"
                },
                "show": {
                  "type": "boolean"
                }
              },
              "required": [
                "id",
                "show"
              ],
              "type": "object"
            },
            "uploadComplete": {
              "additionalProperties": false,
              "properties": {
                "downloaded": {
                  "type": "boolean"
                },
                "id": {
                  "type": "string"
                }
              },
              "required": [
                "downloaded",
                "id"
              ],
              "type": "object"
            },
            "uploadError": {
              "additionalProperties": false,
              "properties": {
                "downloaded": {
                  "type": "boolean"
                },
                "error": {
                  "additionalProperties": false,
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "stack": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "name",
                    "message"
                  ],
                  "type": "object"
                },
                "id": {
                  "type": "string"
                }
              },
              "required": [
                "downloaded",
                "id",
                "error"
              ],
              "type": "object"
            }
          },
          "required": [
            "uploadError",
            "uploadComplete",
            "modalShow"
          ],
          "type": "object"
        }
      }
    },
    "component": {
      "$ref": "#/definitions/Component",
      "$schema": "http://json-schema.org/draft-07/schema#",
      "definitions": {
        "Component": {
          "additionalProperties": false,
          "properties": {
            "fetch_data": {
              "$ref": "#/definitions/Fetch"
            },
            "id": {
              "type": "string"
            },
            "style": {
              "type": "string"
            },
            "upload_id": {
              "type": "string"
            }
          },
          "type": "object"
        },
        "Fetch": {
          "additionalProperties": false,
          "properties": {
            "data": {},
            "headers": {
              "additionalProperties": {
                "type": "string"
              },
              "type": "object"
            },
            "method": {
              "type": "string"
            },
            "url": {
              "type": "string"
            }
          },
          "required": [
            "data",
            "url"
          ],
          "type": "object"
        }
      }
    }
  },
  "description": "Upload progress in `hb-dialog` driven by `fetch_data` (`url`, `data`, optional `method`, `headers`): Bulma `progress` (indeterminate then value) and optional `upload_id`. Forwards `modalShow`; emits `uploadComplete` / `uploadError`.",
  "storybookArgs": {
    "fetch_data": {
      "control": {
        "type": "object"
      }
    },
    "upload_id": {
      "control": {
        "type": "text"
      }
    },
    "total": {
      "control": {
        "type": "number"
      }
    },
    "loaded": {
      "control": {
        "type": "number"
      }
    },
    "downloadError": {
      "action": "downloadError"
    },
    "downloadComplete": {
      "action": "downloadComplete"
    },
    "modalShow": {
      "action": "modalShow"
    }
  },
  "styleSetup": {
    "vars": [],
    "parts": []
  },
  "contributors": [],
  "htmlSlots": [
    {
      "name": "title",
      "description": ""
    }
  ],
  "i18n": [],
  "examples": [
    {
      "name": "default",
      "data": {
        "fetch_data": {
          "url": "",
          "data": ""
        }
      }
    },
    {
      "name": "postWithHeaders",
      "description": "POST upload with custom headers.",
      "data": {
        "upload_id": "job-post-1",
        "fetch_data": {
          "url": "https://httpbin.org/post",
          "method": "POST",
          "data": {
            "file": "binary-placeholder"
          },
          "headers": {
            "X-Upload-Client": "storybook"
          }
        }
      }
    },
    {
      "name": "putMinimal",
      "description": "PUT with empty path (dialog wiring only).",
      "data": {
        "fetch_data": {
          "url": "",
          "method": "PUT",
          "data": {}
        }
      }
    },
    {
      "name": "withUploadId",
      "description": "Correlates progress with upload_id.",
      "data": {
        "upload_id": "trace-42",
        "fetch_data": {
          "url": "",
          "data": {
            "batch": "2026-03-30"
          }
        }
      }
    }
  ],
  "iifeIntegrity": "sha384-NPL0SlWFrEfmeMSmlL0h8hOelVlGIFmIFb+534xIy9rdhFmf6D9UqpoDsf8CJdKC",
  "dependencies": [
    {
      "name": "hb-dialog",
      "dependencies": []
    }
  ],
  "screenshots": [],
  "licenses": [
    {
      "type": "Apache-2.0",
      "path": "LICENSE.md",
      "cost": 0,
      "currency": "EUR"
    }
  ],
  "readmePath": "README.md",
  "name": "hb-uploader",
  "category": "utilities",
  "tags": [
    "utilities",
    "files"
  ],
  "size": {},
  "iifePath": "main.iife.js",
  "repoName": "@htmlbricks/hb-uploader",
  "version": "0.71.32"
}