@optionfactory/fml 8.0.0 → 8.0.2

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.
Files changed (48) hide show
  1. package/dist/client-errors.iife.js +11 -8
  2. package/dist/client-errors.iife.js.map +1 -1
  3. package/dist/client-errors.iife.min.js +1 -1
  4. package/dist/client-errors.iife.min.js.map +1 -1
  5. package/dist/custom-elements.json +1210 -0
  6. package/dist/fml.css +10 -1
  7. package/dist/fml.css.map +1 -1
  8. package/dist/fml.d.mts +73 -13
  9. package/dist/fml.iife.js +628 -209
  10. package/dist/fml.iife.js.map +1 -1
  11. package/dist/fml.iife.min.js +1 -1
  12. package/dist/fml.iife.min.js.map +1 -1
  13. package/dist/fml.min.mjs +1 -1
  14. package/dist/fml.min.mjs.map +1 -1
  15. package/dist/fml.mjs +628 -209
  16. package/dist/fml.mjs.map +1 -1
  17. package/dist/ftl.d.mts +2 -1
  18. package/dist/ftl.iife.js +90 -34
  19. package/dist/ftl.iife.js.map +1 -1
  20. package/dist/ftl.iife.min.js +1 -1
  21. package/dist/ftl.iife.min.js.map +1 -1
  22. package/dist/ftl.min.mjs +1 -1
  23. package/dist/ftl.min.mjs.map +1 -1
  24. package/dist/ftl.mjs +90 -34
  25. package/dist/ftl.mjs.map +1 -1
  26. package/dist/ful.css +10 -1
  27. package/dist/ful.css.map +1 -1
  28. package/dist/ful.d.mts +22 -6
  29. package/dist/ful.iife.js +496 -166
  30. package/dist/ful.iife.js.map +1 -1
  31. package/dist/ful.iife.min.js +1 -1
  32. package/dist/ful.iife.min.js.map +1 -1
  33. package/dist/ful.min.mjs +1 -1
  34. package/dist/ful.min.mjs.map +1 -1
  35. package/dist/ful.mjs +496 -166
  36. package/dist/ful.mjs.map +1 -1
  37. package/dist/httpc.d.mts +49 -6
  38. package/dist/httpc.iife.js +40 -9
  39. package/dist/httpc.iife.js.map +1 -1
  40. package/dist/httpc.iife.min.js +1 -1
  41. package/dist/httpc.iife.min.js.map +1 -1
  42. package/dist/httpc.min.mjs +1 -1
  43. package/dist/httpc.min.mjs.map +1 -1
  44. package/dist/httpc.mjs +40 -9
  45. package/dist/httpc.mjs.map +1 -1
  46. package/dist/vscode.html-custom-data.json +357 -0
  47. package/dist/web-types.json +1006 -0
  48. package/package.json +11 -9
@@ -1 +1 @@
1
- {"version":3,"file":"httpc.mjs","sources":["../src/httpc/failure.mjs","../src/httpc/encodings.mjs","../src/httpc/http-client.mjs"],"sourcesContent":["/**\n * @typedef {{ type: string; context: string?; reason: string; details: any?; }} Problem\n */\nclass Failure extends Error {\n /**\n *\n * @param {string} message\n * @param {Problem[]} problems\n * @param {*} cause\n */\n constructor(message, problems, cause) {\n super(message, { cause });\n this.name = 'Failure';\n this.problems = problems;\n }\n dropping(prefix) {\n return new Failure(this.message, Failure.dropProblemsContext(this.problems, prefix), this);\n }\n static dropProblemsContext(problems, prefix) {\n return problems.map(({ type, context, reason, details }) => {\n const nctx = context?.startsWith(prefix) ? context.substring(prefix.length) : context;\n return { type, context: nctx, reason, details };\n });\n }\n}\n\nexport { Failure };\n","class Base64 {\n static encode(arrayBuffer, dialect) {\n const d = dialect || Base64.URL_SAFE;\n const len = arrayBuffer.byteLength;\n const view = new Uint8Array(arrayBuffer);\n let res = '';\n for (let i = 0; i < len; i += 3) {\n const v1 = d[view[i] >> 2];\n const v2 = d[((view[i] & 3) << 4) | (view[i + 1] >> 4)];\n const v3 = d[((view[i + 1] & 15) << 2) | (view[i + 2] >> 6)];\n const v4 = d[view[i + 2] & 63];\n res += v1 + v2 + v3 + v4;\n }\n if (len % 3 === 2) {\n res = res.substring(0, res.length - 1);\n } else if (len % 3 === 1) {\n res = res.substring(0, res.length - 2);\n }\n return res;\n }\n static decode(str, dialect) {\n const d = dialect || Base64.URL_SAFE;\n let nbytes = Math.floor(str.length * 0.75);\n for (let i = 0; i !== str.length; ++i) {\n if (str[str.length - i - 1] !== '=') {\n break;\n }\n --nbytes;\n }\n const view = new Uint8Array(nbytes);\n\n let vi = 0;\n let si = 0;\n while (vi < str.length * 0.75) {\n const v1 = d.indexOf(str.charAt(si++));\n const v2 = d.indexOf(str.charAt(si++));\n const v3 = d.indexOf(str.charAt(si++));\n const v4 = d.indexOf(str.charAt(si++));\n view[vi++] = (v1 << 2) | (v2 >> 4);\n view[vi++] = ((v2 & 15) << 4) | (v3 >> 2);\n view[vi++] = ((v3 & 3) << 6) | v4;\n }\n\n return view.buffer;\n }\n}\n\nBase64.STANDARD = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\nBase64.URL_SAFE = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_';\n\nclass Hex {\n static decode(hex) {\n if (hex.length % 2 !== 0) {\n throw new Error('invalid length');\n }\n const lenInBytes = hex.length / 2;\n return new Uint8Array(lenInBytes).map((e, i) => {\n const offset = i * 2;\n const octet = hex.substring(offset, offset + 2);\n return parseInt(octet, 16);\n });\n }\n static encode(bytes, upper) {\n return Array.from(bytes)\n .map((b) => b.toString(16))\n .map((b) => (upper ? b.toUpperCase() : b))\n .map((o) => o.padStart(2, 0))\n .join('');\n }\n}\n\nexport { Base64, Hex };\n","import { Failure } from './failure.mjs';\n\nclass MediaType {\n #type;\n #subtype;\n constructor(type, subtype) {\n this.#type = type;\n this.#subtype = subtype;\n }\n get normalized() {\n return `${this.#type}/${this.#subtype}`;\n }\n get type() {\n return this.#type;\n }\n get subtype() {\n return this.#subtype;\n }\n /**\n *\n * @param {string|null|undefined} v\n * @returns\n */\n static parse(v) {\n if (!v) {\n return new MediaType('unknown', 'unknown');\n }\n const [prefix, _] = v.split(';');\n const [ptype, psubtype] = prefix.trim().split('/');\n return new MediaType(ptype.toLowerCase(), psubtype?.toLowerCase());\n }\n}\n\n/**\n * @typedef {Int8Array| Uint8Array| Uint8ClampedArray| Int16Array| Uint16Array| Int32Array| Uint32Array| Float32Array| Float64Array| BigInt64Array| BigUint64Array} TypedArray\n */\n/**\n * @typedef {object} HttpInterceptor\n * @property {(url: URL, init: RequestInit|undefined, chain: HttpInterceptorChain) => Promise<Response>} intercept\n */\n\nclass HttpClientError extends Failure {\n /**\n * @param {string} message\n * @param {number} status\n * @param {{ type: string; context: string?; reason: string; details: any?; }[]} problems\n * @param {Error|undefined} [cause]\n */\n constructor(message, status, problems, cause) {\n super(message, problems, cause);\n this.name = 'HttpClientError';\n this.status = status;\n }\n dropping(prefix) {\n return new HttpClientError(this.message, this.status, Failure.dropProblemsContext(this.problems, prefix), this);\n }\n /**\n *\n * @param {string} type\n * @param {any} cause\n * @returns\n */\n static of(type, cause) {\n return new HttpClientError(\n cause.message,\n 0,\n [\n {\n type,\n context: null,\n reason: cause.message,\n details: null,\n },\n ],\n cause,\n );\n }\n /**\n * Creates an HttpClientError from a Response.\n * @param {Response} response\n * @returns an HttpClientError\n */\n static async fromResponse(response) {\n switch (MediaType.parse(response.headers.get('Content-Type')).normalized) {\n case 'application/failures+json': {\n const data = await response.json();\n const message = `${response.status} ${response.statusText}: ${data.length} failures`;\n return new HttpClientError(message, response.status, data);\n }\n case 'application/problem+json': {\n const data = await response.json();\n const message = `${response.status} ${response.statusText}: ${data.title} ${data.detail}`;\n return new HttpClientError(\n message,\n response.status,\n data.problems || [\n {\n type: 'GENERIC_PROBLEM',\n context: null,\n reason: message,\n details: null,\n },\n ],\n );\n }\n default: {\n const text = await response.text();\n const message = `${response.status} ${response.statusText}: ${text}`;\n return new HttpClientError(message, response.status, [\n {\n type: 'GENERIC_PROBLEM',\n context: null,\n reason: message,\n details: null,\n },\n ]);\n }\n }\n }\n}\n\n/**\n * @implements {HttpInterceptor}\n */\nclass CsrfTokenInterceptor {\n #k;\n #v;\n constructor() {\n this.#k = document.querySelector(\"meta[name='_csrf_header']\")?.getAttribute('content');\n this.#v = document.querySelector(\"meta[name='_csrf']\")?.getAttribute('content');\n }\n async intercept(url, request, chain) {\n if (this.#k && this.#v) {\n request.headers.set(this.#k, this.#v);\n }\n return await chain.proceed(url, request);\n }\n}\n/**\n * @implements {HttpInterceptor}\n */\nclass RedirectOnUnauthorizedInterceptor {\n #redirectUri;\n /**\n * @param {string} redirectUri\n */\n constructor(redirectUri) {\n this.#redirectUri = redirectUri;\n }\n async intercept(url, request, chain) {\n const response = await chain.proceed(url, request);\n if (response.status === 401) {\n window.location.href = this.#redirectUri;\n return new Promise(() => {});\n }\n return response;\n }\n}\n\nclass HttpClientBuilder {\n /**\n * @type {HttpInterceptor[]}\n */\n #interceptors;\n constructor() {\n this.#interceptors = [];\n }\n withCsrfToken() {\n this.#interceptors.push(new CsrfTokenInterceptor());\n return this;\n }\n withRedirectOnUnauthorized(redirectUri) {\n this.#interceptors.push(new RedirectOnUnauthorizedInterceptor(redirectUri));\n return this;\n }\n /**\n * @param {...HttpInterceptor} interceptors\n */\n withInterceptors(...interceptors) {\n this.#interceptors.push(...interceptors);\n return this;\n }\n build() {\n return new HttpClient(this.#interceptors);\n }\n}\n\n/**\n * @implements {HttpInterceptor}\n */\nclass HttpCall {\n async intercept(url, request, chain) {\n return await fetch(url, request);\n }\n}\n\nclass HttpInterceptorChain {\n #interceptors;\n #current;\n /**\n *\n * @param {HttpInterceptor[]} interceptors\n * @param {number} current\n */\n constructor(interceptors, current) {\n this.#interceptors = interceptors;\n this.#current = current;\n }\n /**\n *\n * @param {URL} url\n * @param {RequestInit} request\n * @returns {Promise<Response>} the response\n */\n async proceed(url, request) {\n const interceptor = this.#interceptors[this.#current];\n return await interceptor.intercept(\n url,\n request,\n new HttpInterceptorChain(this.#interceptors, this.#current + 1),\n );\n }\n}\n\nclass HttpClient {\n #interceptors;\n /**\n * Creates a builder for an HttpClient.\n * @returns {HttpClientBuilder} the client builder\n */\n static builder() {\n return new HttpClientBuilder();\n }\n /**\n * Creates an HttpClient.\n * @param {HttpInterceptor[]|undefined} interceptors - a list of interceptors to be registered for every request performed by the created client.\n */\n constructor(interceptors) {\n this.#interceptors = interceptors || [];\n }\n /**\n * Performs an HTTP exchange.\n * @async\n * @param {string} uri - the (possibly relative) request url\n * @param {RequestInit|undefined} options - fetch options\n * @param {HttpInterceptor[]|undefined} interceptors - the HttpInterceptors to be registered for this exchange.\n * @returns {Promise<Response>} the response\n */\n async exchange(uri, options, interceptors) {\n const is = [...this.#interceptors, ...(interceptors || []), new HttpCall()];\n const chain = new HttpInterceptorChain(is, 0);\n const url = new URL(new Request(uri).url);\n return await chain.proceed(url, options ?? {});\n }\n /**\n * Creates a request builder.\n * @param {string} method - the HTTP method to be used\n * @param {string} uri - the (possibly relative) request url\n * @returns {HttpRequestBuilder} the request builder\n */\n request(method, uri) {\n return HttpRequestBuilder.create(this, method, uri);\n }\n /**\n * Creates a request builder.\n * @param {string} uri - the (possibly relative) request url\n * @returns {HttpRequestBuilder} the request builder\n */\n get(uri) {\n return HttpRequestBuilder.create(this, 'GET', uri);\n }\n /**\n * Creates a request builder.\n * @param {string} uri - the (possibly relative) request url\n * @returns {HttpRequestBuilder} the request builder\n */\n head(uri) {\n return HttpRequestBuilder.create(this, 'HEAD', uri);\n }\n /**\n * Creates a request builder.\n * @param {string} uri - the (possibly relative) request url\n * @returns {HttpRequestBuilder} the request builder\n */\n post(uri) {\n return HttpRequestBuilder.create(this, 'POST', uri);\n }\n /**\n * Creates a request builder.\n * @param {string} uri - the (possibly relative) request url\n * @returns {HttpRequestBuilder} the request builder\n */\n put(uri) {\n return HttpRequestBuilder.create(this, 'PUT', uri);\n }\n /**\n * Creates a request builder.\n * @param {string} uri - the (possibly relative) request url\n * @returns {HttpRequestBuilder} the request builder\n */\n patch(uri) {\n return HttpRequestBuilder.create(this, 'PATCH', uri);\n }\n /**\n * Creates a request builder.\n * @param {string} uri - the (possibly relative) request url\n * @returns {HttpRequestBuilder} the request builder\n */\n delete(uri) {\n return HttpRequestBuilder.create(this, 'DELETE', uri);\n }\n}\n\n/**\n *\n * @param {Response} response\n * @param {'text'|'json'|'blob'|'arrayBuffer'} type\n * @returns\n */\nconst unmarshal = async (response, type) => {\n try {\n return await response[type]();\n } catch (ex) {\n throw HttpClientError.of('UNMARSHALING_PROBLEM', ex);\n }\n};\n\nclass HttpRequestBuilder {\n #client;\n #method;\n #uri;\n #params;\n #headers;\n #body;\n #options;\n #interceptors;\n /**\n * Creates an HttpRequestBuilder.\n * @param {HttpClient} client\n * @param {string} method - the HTTP method to be used\n * @param {string} uri - the (possibly relative) request url\n * @returns {HttpRequestBuilder} the builder\n */\n static create(client, method, uri) {\n const [baseUri, queryString = ''] = uri.split('?');\n return new HttpRequestBuilder(\n client,\n method,\n baseUri,\n new URLSearchParams(queryString),\n new Headers(),\n undefined,\n {},\n [],\n );\n }\n /**\n * Creates an HttpRequestBuilder.\n * @param {HttpClient} client\n * @param {string} method - the HTTP method to be used\n * @param {string} uri - the (possibly relative) request url\n * @param {URLSearchParams} params\n * @param {Headers} headers\n * @param {any} body\n * @param {Omit<RequestInit,\"headers\"|\"method\"|\"body\">} options\n * @param {HttpInterceptor[]} interceptors\n */\n constructor(client, method, uri, params, headers, body, options, interceptors) {\n this.#client = client;\n this.#method = method;\n this.#uri = uri;\n this.#params = params;\n this.#body = body;\n this.#headers = headers;\n this.#options = options;\n this.#interceptors = interceptors;\n }\n /**\n * Add all passed headers to the request, overriding existing ones if that key already exists. Null and undefined values cause the key to be removed.\n * @param {HeadersInit} hs\n * @returns {HttpRequestBuilder} this builder\n */\n headers(hs) {\n for (const [k, v] of new Headers(hs).entries()) {\n if (v == null) {\n this.#headers.delete(k);\n } else {\n this.#headers.set(k, v);\n }\n }\n return this;\n }\n /**\n * Adds an header to the request, overriding it if it already exists. Null and undefined values cause the key to be removed\n * @param {string} k\n * @param {string} v\n * @returns {HttpRequestBuilder} this builder\n */\n header(k, v) {\n if (v == null) {\n this.#headers.delete(k);\n } else {\n this.#headers.set(k, v);\n }\n return this;\n }\n /**\n * Add all query parameters to the request, overriding existing ones if that key already exists. Null and undefined values cause the key to be removed\n * @param {URLSearchParams|Record<string,string>|string[][]|string} ps\n * @returns {HttpRequestBuilder} this builder\n */\n params(ps) {\n for (const [k, v] of new URLSearchParams(ps).entries()) {\n if (v == null) {\n this.#params.delete(k);\n } else {\n this.#params.set(k, v);\n }\n }\n return this;\n }\n /**\n * Adds a query parameter to the request, overriding it if it already exists. Empty vs, or a single null or undefined value cause the key to be removed.\n * @param {string} k\n * @param {...string} vs\n * @returns {HttpRequestBuilder} this builder\n */\n param(k, ...vs) {\n if (vs.length === 0 || vs[0] == null) {\n this.#params.delete(k);\n return this;\n }\n for (const v of vs) {\n this.#params.append(k, v);\n }\n return this;\n }\n /**\n * Sets the request body.\n * `Content-Type: multipart/form-data` header is automatically added by fetch when data is a FormData instance if not explicitly set.\n * `Content-Type: application/x-www-form-urlencoded` header is automatically added by fetch when data is an URLSearchParams instance if not explicitly set.\n * `Content-Type: text/plain` header is automatically added by fetch when data is a string instance if not explicitly set.\n * @param {string|ArrayBuffer|Blob|DataView|File|FormData|TypedArray|URLSearchParams|ReadableStream} data\n * @returns {HttpRequestBuilder} this builder\n */\n body(data) {\n this.#body = data;\n return this;\n }\n /**\n * Sets the request body that will be serialized as json. Calling this method adds the `Content-Type application/json` header for the request.\n * @param {any} body - the body to be serialized as json\n * @returns {HttpRequestBuilder} this builder\n */\n json(body) {\n this.#headers.set('Content-Type', 'application/json');\n this.#body = JSON.stringify(body);\n return this;\n }\n /**\n * Sets the request body as a FormData configured using the callback.\n * `Content-Type: multipart/form-data` header is automatically added by fetch if not explicitly set.\n * @param {function(HttpMultipartRequestCustomizer):void} callback\n */\n multipart(callback) {\n const formData = new FormData();\n const builder = new HttpMultipartRequestCustomizer(formData);\n callback(builder);\n this.#body = formData;\n return this;\n }\n /**\n * Sets a fetch options for the request.\n * @param {Omit<RequestInit,\"headers\"|\"method\"|\"body\">} kvs\n * @returns {HttpRequestBuilder} this builder\n */\n options(kvs) {\n for (const [k, v] of Object.entries(kvs)) {\n this.#options[k] = v;\n }\n return this;\n }\n /**\n * Sets a fetch option for the request.\n * @param {keyof Omit<RequestInit,\"headers\"|\"method\"|\"body\">} k\n * @param {*} v\n * @returns {HttpRequestBuilder} this builder\n */\n option(k, v) {\n this.#options[k] = v;\n return this;\n }\n /**\n * Adds interceptors to the request.\n * @param {[HttpInterceptor]} is - the interceptor to be regisered\n * @returns {HttpRequestBuilder} this builder\n */\n interceptors(is) {\n for (const i of is) {\n this.#interceptors.push(i);\n }\n return this;\n }\n /**\n * Adds an interceptor to the request.\n * @param {HttpInterceptor} i - the interceptor to be regisered\n * @returns {HttpRequestBuilder} this builder\n */\n interceptor(i) {\n this.#interceptors.push(i);\n return this;\n }\n /**\n * Performs an HTTP exchange using the configured client, request and interceptors.\n * @returns {Promise<Response>} the response\n */\n async exchange() {\n const uri = this.#params.size ? `${this.#uri}?${this.#params}` : this.#uri;\n const opts = {\n ...this.#options,\n headers: this.#headers,\n method: this.#method,\n body: this.#body,\n };\n return await this.#client.exchange(uri, opts, this.#interceptors);\n }\n /**\n * Performs an HTTP exchange using the configured client request, and interceptos throwing a failure when response status is not in the 200-299 range.\n * @returns {Promise<Response>} the response\n */\n async fetch() {\n const uri = this.#params.size ? `${this.#uri}?${this.#params}` : this.#uri;\n const opts = {\n ...this.#options,\n headers: this.#headers,\n method: this.#method,\n body: this.#body,\n };\n try {\n const response = await this.#client.exchange(uri, opts, this.#interceptors);\n if (!response.ok) {\n throw await HttpClientError.fromResponse(response);\n }\n return response;\n } catch (ex) {\n if (ex instanceof Failure) {\n throw ex;\n }\n throw HttpClientError.of('CONNECTION_PROBLEM', ex);\n }\n }\n /**\n * Performs an HTTP exchange using the configured client request, and interceptos throwing a failure when response status is not in the 200-299 range.\n * @returns {Promise<string>} the response body, as text\n */\n async fetchText() {\n const response = await this.fetch();\n return await unmarshal(response, 'text');\n }\n /**\n * Performs an HTTP exchange using the configured client request, and interceptos throwing a failure when response status is not in the 200-299 range.\n * @returns {Promise<any>} the response body, deserialized as JSON\n */\n async fetchJson() {\n const response = await this.fetch();\n return await unmarshal(response, 'json');\n }\n /**\n * Performs an HTTP exchange using the configured client request, and interceptos throwing a failure when response status is not in the 200-299 range.\n * @returns {Promise<Blob>} the response body, as a Blob\n */\n async fetchBlob() {\n const response = await this.fetch();\n return await unmarshal(response, 'blob');\n }\n /**\n * Performs an HTTP exchange using the configured client request, and interceptos throwing a failure when response status is not in the 200-299 range.\n * @returns {Promise<ArrayBuffer>} the response body, as an ArrayBuffer\n */\n async fetchArrayBuffer() {\n const response = await this.fetch();\n return await unmarshal(response, 'arrayBuffer');\n }\n}\n\nclass HttpMultipartRequestCustomizer {\n #formData;\n /**\n *\n * @param {FormData} formData\n */\n constructor(formData) {\n this.#formData = formData;\n }\n /**\n * Appends a value to the FormData.\n * @param {string} name\n * @param {*} value\n * @returns this builder\n */\n field(name, value) {\n this.#formData.append(name, value);\n return this;\n }\n /**\n * Appends a Blob to the FormData.\n * If `filename` is omitted, FormData defaults are applied:\n * The default filename for Blob objects is \"blob\";\n * The default filename for File objects is the file's filename.\n * @param {string} name\n * @param {Blob} value\n * @param {string|undefined} filename\n * @returns this builder\n */\n blob(name, value, filename) {\n this.#formData.append(name, value, filename);\n return this;\n }\n /**\n * Appends multiple Blobs to the FormData with the same name.\n * The default filename for Blob objects is \"blob\";\n * The default filename for File objects is the file's filename.\n * @param {string} name\n * @param {Blob[]} values\n * @returns this builder\n */\n blobs(name, values) {\n for (let v of values) {\n this.#formData.append(name, v);\n }\n return this;\n }\n /**\n * Appends a JSON serialized blob to the FormData.\n * @param {string} name\n * @param {any} value\n * @param {string|undefined} filename\n * @returns this builder\n */\n json(name, value, filename) {\n const blob = new Blob([JSON.stringify(value)], { type: 'application/json' });\n this.#formData.append(name, blob, filename);\n return this;\n }\n}\n\nexport { MediaType, HttpClient, HttpClientError };\n"],"names":[],"mappings":"AAAA;AACA;AACA;AACA,MAAM,OAAO,SAAS,KAAK,CAAC;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,WAAW,CAAC,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE;AAC1C,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,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,CAAC;AACnD,QAAQ,OAAO,IAAI;AACnB,IAAI;AACJ;;;;"}
1
+ {"version":3,"file":"httpc.mjs","sources":["../src/httpc/failure.mjs","../src/httpc/encodings.mjs","../src/httpc/http-client.mjs"],"sourcesContent":["/**\n * @typedef {{ type: string; context: string?; reason: string; details: any?; }} Problem\n */\nclass Failure extends Error {\n /**\n *\n * @param {string} message\n * @param {Problem[]} problems\n * @param {*} cause\n */\n constructor(message, problems, cause) {\n super(message, { cause });\n this.name = 'Failure';\n this.problems = problems;\n }\n dropping(prefix) {\n return new Failure(this.message, Failure.dropProblemsContext(this.problems, prefix), this);\n }\n static dropProblemsContext(problems, prefix) {\n return problems.map(({ type, context, reason, details }) => {\n const nctx = context?.startsWith(prefix) ? context.substring(prefix.length) : context;\n return { type, context: nctx, reason, details };\n });\n }\n}\n\nexport { Failure };\n","class Base64 {\n static encode(arrayBuffer, dialect) {\n const d = dialect || Base64.URL_SAFE;\n const len = arrayBuffer.byteLength;\n const view = new Uint8Array(arrayBuffer);\n let res = '';\n for (let i = 0; i < len; i += 3) {\n const v1 = d[view[i] >> 2];\n const v2 = d[((view[i] & 3) << 4) | (view[i + 1] >> 4)];\n const v3 = d[((view[i + 1] & 15) << 2) | (view[i + 2] >> 6)];\n const v4 = d[view[i + 2] & 63];\n res += v1 + v2 + v3 + v4;\n }\n if (len % 3 === 2) {\n res = res.substring(0, res.length - 1);\n } else if (len % 3 === 1) {\n res = res.substring(0, res.length - 2);\n }\n return res;\n }\n static decode(str, dialect) {\n const d = dialect || Base64.URL_SAFE;\n let nbytes = Math.floor(str.length * 0.75);\n for (let i = 0; i !== str.length; ++i) {\n if (str[str.length - i - 1] !== '=') {\n break;\n }\n --nbytes;\n }\n const view = new Uint8Array(nbytes);\n\n let vi = 0;\n let si = 0;\n //every group yields three bytes, but a padded input stops short of the last\n //one or two: writing them anyway would rely on typed arrays dropping writes\n //past their length\n while (vi < nbytes) {\n const v1 = d.indexOf(str.charAt(si++));\n const v2 = d.indexOf(str.charAt(si++));\n const v3 = d.indexOf(str.charAt(si++));\n const v4 = d.indexOf(str.charAt(si++));\n view[vi++] = (v1 << 2) | (v2 >> 4);\n if (vi === nbytes) {\n break;\n }\n view[vi++] = ((v2 & 15) << 4) | (v3 >> 2);\n if (vi === nbytes) {\n break;\n }\n view[vi++] = ((v3 & 3) << 6) | v4;\n }\n\n return view.buffer;\n }\n}\n\nBase64.STANDARD = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\nBase64.URL_SAFE = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_';\n\nclass Hex {\n static decode(hex) {\n if (hex.length % 2 !== 0) {\n throw new Error('invalid length');\n }\n const lenInBytes = hex.length / 2;\n return new Uint8Array(lenInBytes).map((e, i) => {\n const offset = i * 2;\n const octet = hex.substring(offset, offset + 2);\n return parseInt(octet, 16);\n });\n }\n static encode(bytes, upper) {\n return Array.from(bytes)\n .map((b) => b.toString(16))\n .map((b) => (upper ? b.toUpperCase() : b))\n .map((o) => o.padStart(2, '0'))\n .join('');\n }\n}\n\nexport { Base64, Hex };\n","import { Failure } from './failure.mjs';\n\nclass MediaType {\n #type;\n #subtype;\n constructor(type, subtype) {\n this.#type = type;\n this.#subtype = subtype;\n }\n get normalized() {\n return `${this.#type}/${this.#subtype}`;\n }\n get type() {\n return this.#type;\n }\n get subtype() {\n return this.#subtype;\n }\n /**\n *\n * @param {string|null|undefined} v\n * @returns\n */\n static parse(v) {\n if (!v) {\n return new MediaType('unknown', 'unknown');\n }\n const [prefix, _] = v.split(';');\n const [ptype, psubtype] = prefix.trim().split('/');\n return new MediaType(ptype.toLowerCase(), psubtype?.toLowerCase());\n }\n}\n\n/**\n * @typedef {Int8Array| Uint8Array| Uint8ClampedArray| Int16Array| Uint16Array| Int32Array| Uint32Array| Float32Array| Float64Array| BigInt64Array| BigUint64Array} TypedArray\n */\n/**\n * @typedef {object} HttpInterceptor\n * @property {(url: URL, init: RequestInit|undefined, chain: HttpInterceptorChain) => Promise<Response>} intercept\n */\n\nclass HttpClientError extends Failure {\n /**\n * @param {string} message\n * @param {number} status\n * @param {{ type: string; context: string?; reason: string; details: any?; }[]} problems\n * @param {Error|undefined} [cause]\n */\n constructor(message, status, problems, cause) {\n super(message, problems, cause);\n this.name = 'HttpClientError';\n this.status = status;\n }\n dropping(prefix) {\n return new HttpClientError(this.message, this.status, Failure.dropProblemsContext(this.problems, prefix), this);\n }\n /**\n *\n * @param {string} type\n * @param {any} cause\n * @returns\n */\n static of(type, cause) {\n return new HttpClientError(\n cause.message,\n 0,\n [\n {\n type,\n context: null,\n reason: cause.message,\n details: null,\n },\n ],\n cause,\n );\n }\n /**\n * Creates an HttpClientError from a Response.\n * @param {Response} response\n * @returns an HttpClientError\n */\n static async fromResponse(response) {\n switch (MediaType.parse(response.headers.get('Content-Type')).normalized) {\n case 'application/failures+json': {\n const data = await response.json();\n const message = `${response.status} ${response.statusText}: ${data.length} failures`;\n return new HttpClientError(message, response.status, data);\n }\n case 'application/problem+json': {\n const data = await response.json();\n const message = `${response.status} ${response.statusText}: ${data.title} ${data.detail}`;\n return new HttpClientError(\n message,\n response.status,\n data.problems || [\n {\n type: 'GENERIC_PROBLEM',\n context: null,\n reason: message,\n details: null,\n },\n ],\n );\n }\n default: {\n const text = await response.text();\n const message = `${response.status} ${response.statusText}: ${text}`;\n return new HttpClientError(message, response.status, [\n {\n type: 'GENERIC_PROBLEM',\n context: null,\n reason: message,\n details: null,\n },\n ]);\n }\n }\n }\n}\n\n/**\n * @implements {HttpInterceptor}\n */\nclass CsrfTokenInterceptor {\n #k;\n #v;\n constructor() {\n this.#k = document.querySelector(\"meta[name='_csrf_header']\")?.getAttribute('content');\n this.#v = document.querySelector(\"meta[name='_csrf']\")?.getAttribute('content');\n }\n async intercept(url, request, chain) {\n if (this.#k && this.#v) {\n request.headers.set(this.#k, this.#v);\n }\n return await chain.proceed(url, request);\n }\n}\n/**\n * @implements {HttpInterceptor}\n */\nclass RedirectOnUnauthorizedInterceptor {\n #redirectUri;\n /**\n * @param {string} redirectUri\n */\n constructor(redirectUri) {\n this.#redirectUri = redirectUri;\n }\n async intercept(url, request, chain) {\n const response = await chain.proceed(url, request);\n if (response.status === 401) {\n window.location.href = this.#redirectUri;\n return new Promise(() => {});\n }\n return response;\n }\n}\n\nclass HttpClientBuilder {\n /**\n * @type {HttpInterceptor[]}\n */\n #interceptors;\n constructor() {\n this.#interceptors = [];\n }\n withCsrfToken() {\n this.#interceptors.push(new CsrfTokenInterceptor());\n return this;\n }\n withRedirectOnUnauthorized(redirectUri) {\n this.#interceptors.push(new RedirectOnUnauthorizedInterceptor(redirectUri));\n return this;\n }\n /**\n * @param {...HttpInterceptor} interceptors\n */\n withInterceptors(...interceptors) {\n this.#interceptors.push(...interceptors);\n return this;\n }\n build() {\n return new HttpClient(this.#interceptors);\n }\n}\n\n/**\n * @implements {HttpInterceptor}\n */\nclass HttpCall {\n async intercept(url, request, chain) {\n return await fetch(url, request);\n }\n}\n\nclass HttpInterceptorChain {\n #interceptors;\n #current;\n /**\n *\n * @param {HttpInterceptor[]} interceptors\n * @param {number} current\n */\n constructor(interceptors, current) {\n this.#interceptors = interceptors;\n this.#current = current;\n }\n /**\n *\n * @param {URL} url\n * @param {RequestInit} request\n * @returns {Promise<Response>} the response\n */\n async proceed(url, request) {\n const interceptor = this.#interceptors[this.#current];\n return await interceptor.intercept(\n url,\n request,\n new HttpInterceptorChain(this.#interceptors, this.#current + 1),\n );\n }\n}\n\nclass HttpClient {\n #interceptors;\n /**\n * Creates a builder for an HttpClient.\n * @returns {HttpClientBuilder} the client builder\n */\n static builder() {\n return new HttpClientBuilder();\n }\n /**\n * Creates an HttpClient.\n * @param {HttpInterceptor[]|undefined} interceptors - a list of interceptors to be registered for every request performed by the created client.\n */\n constructor(interceptors) {\n this.#interceptors = interceptors || [];\n }\n /**\n * Performs an HTTP exchange.\n * @async\n * @param {string} uri - the (possibly relative) request url\n * @param {RequestInit|undefined} options - fetch options\n * @param {HttpInterceptor[]|undefined} interceptors - the HttpInterceptors to be registered for this exchange.\n * @returns {Promise<Response>} the response\n */\n async exchange(uri, options, interceptors) {\n const is = [...this.#interceptors, ...(interceptors || []), new HttpCall()];\n const chain = new HttpInterceptorChain(is, 0);\n const url = new URL(new Request(uri).url);\n return await chain.proceed(url, options ?? {});\n }\n /**\n * Creates a request builder.\n * @param {string} method - the HTTP method to be used\n * @param {string} uri - the (possibly relative) request url\n * @returns {HttpRequestBuilder} the request builder\n */\n request(method, uri) {\n return HttpRequestBuilder.create(this, method, uri);\n }\n /**\n * Creates a request builder.\n * @param {string} uri - the (possibly relative) request url\n * @returns {HttpRequestBuilder} the request builder\n */\n get(uri) {\n return HttpRequestBuilder.create(this, 'GET', uri);\n }\n /**\n * Creates a request builder.\n * @param {string} uri - the (possibly relative) request url\n * @returns {HttpRequestBuilder} the request builder\n */\n head(uri) {\n return HttpRequestBuilder.create(this, 'HEAD', uri);\n }\n /**\n * Creates a request builder.\n * @param {string} uri - the (possibly relative) request url\n * @returns {HttpRequestBuilder} the request builder\n */\n post(uri) {\n return HttpRequestBuilder.create(this, 'POST', uri);\n }\n /**\n * Creates a request builder.\n * @param {string} uri - the (possibly relative) request url\n * @returns {HttpRequestBuilder} the request builder\n */\n put(uri) {\n return HttpRequestBuilder.create(this, 'PUT', uri);\n }\n /**\n * Creates a request builder.\n * @param {string} uri - the (possibly relative) request url\n * @returns {HttpRequestBuilder} the request builder\n */\n patch(uri) {\n return HttpRequestBuilder.create(this, 'PATCH', uri);\n }\n /**\n * Creates a request builder.\n * @param {string} uri - the (possibly relative) request url\n * @returns {HttpRequestBuilder} the request builder\n */\n delete(uri) {\n return HttpRequestBuilder.create(this, 'DELETE', uri);\n }\n}\n\n/**\n *\n * @param {Response} response\n * @param {'text'|'json'|'blob'|'arrayBuffer'} type\n * @returns\n */\nconst unmarshal = async (response, type) => {\n try {\n return await response[type]();\n } catch (ex) {\n throw HttpClientError.of('UNMARSHALING_PROBLEM', ex);\n }\n};\n\n/**\n * Yields the entries of a headers or params initializer preserving nullish values:\n * normalizing through `Headers`/`URLSearchParams` first would stringify them to\n * \"null\"/\"undefined\" instead of removing the key.\n * @param {any} source\n * @returns {Iterable<[string, any]>}\n */\nconst rawEntries = (source) => {\n if (source == null) {\n return [];\n }\n if (typeof source === 'string') {\n return new URLSearchParams(source);\n }\n if (typeof source[Symbol.iterator] === 'function') {\n return source;\n }\n return Object.entries(source);\n};\n\nclass HttpRequestBuilder {\n #client;\n #method;\n #uri;\n #params;\n #headers;\n #body;\n #options;\n #interceptors;\n /**\n * Creates an HttpRequestBuilder.\n * @param {HttpClient} client\n * @param {string} method - the HTTP method to be used\n * @param {string} uri - the (possibly relative) request url\n * @returns {HttpRequestBuilder} the builder\n */\n static create(client, method, uri) {\n const [baseUri, queryString = ''] = uri.split('?');\n return new HttpRequestBuilder(\n client,\n method,\n baseUri,\n new URLSearchParams(queryString),\n new Headers(),\n undefined,\n {},\n [],\n );\n }\n /**\n * Creates an HttpRequestBuilder.\n * @param {HttpClient} client\n * @param {string} method - the HTTP method to be used\n * @param {string} uri - the (possibly relative) request url\n * @param {URLSearchParams} params\n * @param {Headers} headers\n * @param {any} body\n * @param {Omit<RequestInit,\"headers\"|\"method\"|\"body\">} options\n * @param {HttpInterceptor[]} interceptors\n */\n constructor(client, method, uri, params, headers, body, options, interceptors) {\n this.#client = client;\n this.#method = method;\n this.#uri = uri;\n this.#params = params;\n this.#body = body;\n this.#headers = headers;\n this.#options = options;\n this.#interceptors = interceptors;\n }\n /**\n * Add all passed headers to the request, overriding existing ones if that key already exists. Null and undefined values cause the key to be removed.\n * @param {HeadersInit|Record<string,string|null|undefined>} hs\n * @returns {HttpRequestBuilder} this builder\n */\n headers(hs) {\n for (const [k, v] of rawEntries(hs)) {\n if (v == null) {\n this.#headers.delete(k);\n } else {\n this.#headers.set(k, v);\n }\n }\n return this;\n }\n /**\n * Adds an header to the request, overriding it if it already exists. Null and undefined values cause the key to be removed\n * @param {string} k\n * @param {string} v\n * @returns {HttpRequestBuilder} this builder\n */\n header(k, v) {\n if (v == null) {\n this.#headers.delete(k);\n } else {\n this.#headers.set(k, v);\n }\n return this;\n }\n /**\n * Add all query parameters to the request, overriding existing ones if that key already exists. Null and undefined values cause the key to be removed\n * @param {URLSearchParams|Record<string,string|null|undefined>|string[][]|string} ps\n * @returns {HttpRequestBuilder} this builder\n */\n params(ps) {\n for (const [k, v] of rawEntries(ps)) {\n if (v == null) {\n this.#params.delete(k);\n } else {\n this.#params.set(k, v);\n }\n }\n return this;\n }\n /**\n * Adds a query parameter to the request, overriding it if it already exists. Empty vs, or a single null or undefined value cause the key to be removed.\n * @param {string} k\n * @param {...string} vs\n * @returns {HttpRequestBuilder} this builder\n */\n param(k, ...vs) {\n //overriding, as header, headers and params all do: pass every value in one\n //call to get a multi valued parameter\n this.#params.delete(k);\n if (vs.length === 0 || vs[0] == null) {\n return this;\n }\n for (const v of vs) {\n this.#params.append(k, v);\n }\n return this;\n }\n /**\n * Sets the request body.\n * `Content-Type: multipart/form-data` header is automatically added by fetch when data is a FormData instance if not explicitly set.\n * `Content-Type: application/x-www-form-urlencoded` header is automatically added by fetch when data is an URLSearchParams instance if not explicitly set.\n * `Content-Type: text/plain` header is automatically added by fetch when data is a string instance if not explicitly set.\n * @param {string|ArrayBuffer|Blob|DataView|File|FormData|TypedArray|URLSearchParams|ReadableStream} data\n * @returns {HttpRequestBuilder} this builder\n */\n body(data) {\n this.#body = data;\n return this;\n }\n /**\n * Sets the request body that will be serialized as json. Calling this method adds the `Content-Type application/json` header for the request.\n * @param {any} body - the body to be serialized as json\n * @returns {HttpRequestBuilder} this builder\n */\n json(body) {\n this.#headers.set('Content-Type', 'application/json');\n this.#body = JSON.stringify(body);\n return this;\n }\n /**\n * Sets the request body as a FormData configured using the callback.\n * `Content-Type: multipart/form-data` header is automatically added by fetch if not explicitly set.\n * @param {(c: HttpMultipartRequestCustomizer) => void} callback\n */\n multipart(callback) {\n const formData = new FormData();\n const builder = new HttpMultipartRequestCustomizer(formData);\n callback(builder);\n this.#body = formData;\n return this;\n }\n /**\n * Sets a fetch options for the request.\n * @param {Omit<RequestInit,\"headers\"|\"method\"|\"body\">} kvs\n * @returns {HttpRequestBuilder} this builder\n */\n options(kvs) {\n for (const [k, v] of Object.entries(kvs)) {\n this.#options[k] = v;\n }\n return this;\n }\n /**\n * Sets a fetch option for the request.\n * @param {keyof Omit<RequestInit,\"headers\"|\"method\"|\"body\">} k\n * @param {*} v\n * @returns {HttpRequestBuilder} this builder\n */\n option(k, v) {\n this.#options[k] = v;\n return this;\n }\n /**\n * Adds interceptors to the request.\n * @param {[HttpInterceptor]} is - the interceptor to be regisered\n * @returns {HttpRequestBuilder} this builder\n */\n interceptors(is) {\n for (const i of is) {\n this.#interceptors.push(i);\n }\n return this;\n }\n /**\n * Adds an interceptor to the request.\n * @param {HttpInterceptor} i - the interceptor to be regisered\n * @returns {HttpRequestBuilder} this builder\n */\n interceptor(i) {\n this.#interceptors.push(i);\n return this;\n }\n /**\n * Performs an HTTP exchange using the configured client, request and interceptors.\n * @returns {Promise<Response>} the response\n */\n async exchange() {\n const uri = this.#params.size ? `${this.#uri}?${this.#params}` : this.#uri;\n const opts = {\n ...this.#options,\n headers: this.#headers,\n method: this.#method,\n body: this.#body,\n };\n return await this.#client.exchange(uri, opts, this.#interceptors);\n }\n /**\n * Performs an HTTP exchange using the configured client request, and interceptos throwing a failure when response status is not in the 200-299 range.\n * @returns {Promise<Response>} the response\n */\n async fetch() {\n const uri = this.#params.size ? `${this.#uri}?${this.#params}` : this.#uri;\n const opts = {\n ...this.#options,\n headers: this.#headers,\n method: this.#method,\n body: this.#body,\n };\n try {\n const response = await this.#client.exchange(uri, opts, this.#interceptors);\n if (!response.ok) {\n throw await HttpClientError.fromResponse(response);\n }\n return response;\n } catch (ex) {\n if (ex instanceof Failure) {\n throw ex;\n }\n throw HttpClientError.of('CONNECTION_PROBLEM', ex);\n }\n }\n /**\n * Performs an HTTP exchange using the configured client request, and interceptos throwing a failure when response status is not in the 200-299 range.\n * @returns {Promise<string>} the response body, as text\n */\n async fetchText() {\n const response = await this.fetch();\n return await unmarshal(response, 'text');\n }\n /**\n * Performs an HTTP exchange using the configured client request, and interceptos throwing a failure when response status is not in the 200-299 range.\n * @returns {Promise<any>} the response body, deserialized as JSON\n */\n async fetchJson() {\n const response = await this.fetch();\n return await unmarshal(response, 'json');\n }\n /**\n * Performs an HTTP exchange using the configured client request, and interceptos throwing a failure when response status is not in the 200-299 range.\n * @returns {Promise<Blob>} the response body, as a Blob\n */\n async fetchBlob() {\n const response = await this.fetch();\n return await unmarshal(response, 'blob');\n }\n /**\n * Performs an HTTP exchange using the configured client request, and interceptos throwing a failure when response status is not in the 200-299 range.\n * @returns {Promise<ArrayBuffer>} the response body, as an ArrayBuffer\n */\n async fetchArrayBuffer() {\n const response = await this.fetch();\n return await unmarshal(response, 'arrayBuffer');\n }\n}\n\nclass HttpMultipartRequestCustomizer {\n #formData;\n /**\n *\n * @param {FormData} formData\n */\n constructor(formData) {\n this.#formData = formData;\n }\n /**\n * Appends a value to the FormData.\n * @param {string} name\n * @param {*} value\n * @returns this builder\n */\n field(name, value) {\n this.#formData.append(name, value);\n return this;\n }\n /**\n * Appends a Blob to the FormData.\n * If `filename` is omitted, FormData defaults are applied:\n * The default filename for Blob objects is \"blob\";\n * The default filename for File objects is the file's filename.\n * @param {string} name\n * @param {Blob} value\n * @param {string|undefined} filename\n * @returns this builder\n */\n blob(name, value, filename) {\n this.#formData.append(name, value, filename);\n return this;\n }\n /**\n * Appends multiple Blobs to the FormData with the same name.\n * The default filename for Blob objects is \"blob\";\n * The default filename for File objects is the file's filename.\n * @param {string} name\n * @param {Blob[]} values\n * @returns this builder\n */\n blobs(name, values) {\n for (const v of values) {\n this.#formData.append(name, v);\n }\n return this;\n }\n /**\n * Appends a JSON serialized blob to the FormData.\n * @param {string} name\n * @param {any} value\n * @param {string|undefined} filename\n * @returns this builder\n */\n json(name, value, filename) {\n const blob = new Blob([JSON.stringify(value)], { type: 'application/json' });\n this.#formData.append(name, blob, filename);\n return this;\n }\n}\n\nexport { MediaType, HttpClient, HttpClientError };\n"],"names":[],"mappings":"AAAA;AACA;AACA;AACA,MAAM,OAAO,SAAS,KAAK,CAAC;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,WAAW,CAAC,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE;AAC1C,QAAQ,KAAK,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE,CAAC;AACjC,QAAQ,IAAI,CAAC,IAAI,GAAG,SAAS;AAC7B,QAAQ,IAAI,CAAC,QAAQ,GAAG,QAAQ;AAChC,IAAI;AACJ,IAAI,QAAQ,CAAC,MAAM,EAAE;AACrB,QAAQ,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,mBAAmB,CAAC,IAAI,CAAC,QAAQ,EAAE,MAAM,CAAC,EAAE,IAAI,CAAC;AAClG,IAAI;AACJ,IAAI,OAAO,mBAAmB,CAAC,QAAQ,EAAE,MAAM,EAAE;AACjD,QAAQ,OAAO,QAAQ,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK;AACpE,YAAY,MAAM,IAAI,GAAG,OAAO,EAAE,UAAU,CAAC,MAAM,CAAC,GAAG,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,OAAO;AACjG,YAAY,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE;AAC3D,QAAQ,CAAC,CAAC;AACV,IAAI;AACJ;;ACxBA,MAAM,MAAM,CAAC;AACb,IAAI,OAAO,MAAM,CAAC,WAAW,EAAE,OAAO,EAAE;AACxC,QAAQ,MAAM,CAAC,GA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IAAI,EAAE,KAAK,EAAE;AACvB,QAAQ,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC;AAC1C,QAAQ,OAAO,IAAI;AACnB,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE;AAChC,QAAQ,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,EAAE,QAAQ,CAAC;AACpD,QAAQ,OAAO,IAAI;AACnB,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE;AACxB,QAAQ,KAAK,MAAM,CAAC,IAAI,MAAM,EAAE;AAChC,YAAY,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC;AAC1C,QAAQ;AACR,QAAQ,OAAO,IAAI;AACnB,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE;AAChC,QAAQ,MAAM,IAAI,GAAG,IAAI,IAAI,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,IAAI,EAAE,kBAAkB,EAAE,CAAC;AACpF,QAAQ,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,CAAC;AACnD,QAAQ,OAAO,IAAI;AACnB,IAAI;AACJ;;"}
@@ -0,0 +1,357 @@
1
+ {
2
+ "version": 1.1,
3
+ "tags": [
4
+ {
5
+ "name": "ful-spinner",
6
+ "description": "A busy indicator. ful-form shows and hides the ones it contains while submitting.",
7
+ "attributes": []
8
+ },
9
+ {
10
+ "name": "ful-form",
11
+ "description": "Wraps its content in a form, collects the values of the fields it contains and hands them to a loader on submit.",
12
+ "attributes": []
13
+ },
14
+ {
15
+ "name": "ful-checkbox",
16
+ "description": "A checkbox, or a switch with type=\"switch\".",
17
+ "attributes": [
18
+ {
19
+ "name": "value",
20
+ "description": "Checked when the attribute is the string true. (boolean)"
21
+ },
22
+ {
23
+ "name": "readonly",
24
+ "description": "Renders the control but does not let it be edited. A readonly field still contributes its value to the form. (boolean)"
25
+ },
26
+ {
27
+ "name": "required",
28
+ "description": "Marks the field as required for assistive technologies and shows the required marker on its label. (boolean)"
29
+ }
30
+ ]
31
+ },
32
+ {
33
+ "name": "ful-input",
34
+ "description": "A labelled text input. Use type to pick any native input type, or textarea.",
35
+ "attributes": [
36
+ {
37
+ "name": "value",
38
+ "description": "The current value. (string)"
39
+ },
40
+ {
41
+ "name": "readonly",
42
+ "description": "Renders the control but does not let it be edited. A readonly field still contributes its value to the form. (boolean)"
43
+ },
44
+ {
45
+ "name": "required",
46
+ "description": "Marks the field as required for assistive technologies and shows the required marker on its label. (boolean)"
47
+ },
48
+ {
49
+ "name": "placeholder",
50
+ "description": "Placeholder shown while the field is empty. (string)"
51
+ }
52
+ ]
53
+ },
54
+ {
55
+ "name": "ful-input-file",
56
+ "description": "A file input with an optional dropzone and a list of the selected files, enforcing the size and count limits it declares.",
57
+ "attributes": [
58
+ {
59
+ "name": "value",
60
+ "description": "Only an empty value is honoured, to clear the selection: file inputs cannot be filled programmatically. (string)"
61
+ },
62
+ {
63
+ "name": "readonly",
64
+ "description": "Renders the control but does not let it be edited. A readonly field still contributes its value to the form. (boolean)"
65
+ },
66
+ {
67
+ "name": "required",
68
+ "description": "Marks the field as required for assistive technologies and shows the required marker on its label. (boolean)"
69
+ },
70
+ {
71
+ "name": "placeholder",
72
+ "description": "Placeholder shown while the field is empty. (string)"
73
+ },
74
+ {
75
+ "name": "accept",
76
+ "description": "Comma separated list of accepted extensions. Files that do not match are dropped with a warning. (string)"
77
+ },
78
+ {
79
+ "name": "multiple",
80
+ "description": "Allows selecting more than one file. (boolean)"
81
+ },
82
+ {
83
+ "name": "itemlist",
84
+ "description": "Shows the list of selected files. (boolean)"
85
+ },
86
+ {
87
+ "name": "dropzone",
88
+ "description": "Shows the dropzone. (boolean)"
89
+ },
90
+ {
91
+ "name": "maxfiles",
92
+ "description": "Maximum number of files. Exceeding it clears the selection. (number)"
93
+ },
94
+ {
95
+ "name": "maxfilesize",
96
+ "description": "Maximum size of a single file, in bytes. Larger files are dropped. (number)"
97
+ },
98
+ {
99
+ "name": "maxtotalsize",
100
+ "description": "Maximum size of all the selected files, in bytes. Exceeding it clears the selection. (number)"
101
+ }
102
+ ]
103
+ },
104
+ {
105
+ "name": "ful-local-date",
106
+ "description": "Formats the date in its content, written as yyyy-mm-dd, in the locale of the page.",
107
+ "attributes": []
108
+ },
109
+ {
110
+ "name": "ful-instant",
111
+ "description": "Formats the ISO instant in its content in the locale and timezone of the page.",
112
+ "attributes": []
113
+ },
114
+ {
115
+ "name": "ful-input-local-date",
116
+ "description": "A date input. Its bounds accept a date, now, or an offset such as +1d, -2m or +3y.",
117
+ "attributes": [
118
+ {
119
+ "name": "value",
120
+ "description": "The current value. (string)"
121
+ },
122
+ {
123
+ "name": "readonly",
124
+ "description": "Renders the control but does not let it be edited. A readonly field still contributes its value to the form. (boolean)"
125
+ },
126
+ {
127
+ "name": "required",
128
+ "description": "Marks the field as required for assistive technologies and shows the required marker on its label. (boolean)"
129
+ },
130
+ {
131
+ "name": "placeholder",
132
+ "description": "Placeholder shown while the field is empty. (string)"
133
+ },
134
+ {
135
+ "name": "min",
136
+ "description": "Earliest selectable date. Accepts a date, now, or a day, month or year offset. (string)"
137
+ },
138
+ {
139
+ "name": "max",
140
+ "description": "Latest selectable date. Accepts a date, now, or a day, month or year offset. (string)"
141
+ },
142
+ {
143
+ "name": "step",
144
+ "description": "Step between selectable dates, in days. (string)"
145
+ }
146
+ ]
147
+ },
148
+ {
149
+ "name": "ful-input-local-time",
150
+ "description": "A time input. Its bounds accept a time, now, or an hour or minute offset, snapped to the step grid.",
151
+ "attributes": [
152
+ {
153
+ "name": "value",
154
+ "description": "The current value. (string)"
155
+ },
156
+ {
157
+ "name": "readonly",
158
+ "description": "Renders the control but does not let it be edited. A readonly field still contributes its value to the form. (boolean)"
159
+ },
160
+ {
161
+ "name": "required",
162
+ "description": "Marks the field as required for assistive technologies and shows the required marker on its label. (boolean)"
163
+ },
164
+ {
165
+ "name": "placeholder",
166
+ "description": "Placeholder shown while the field is empty. (string)"
167
+ },
168
+ {
169
+ "name": "min",
170
+ "description": "Earliest selectable time. Accepts a time, now, or an offset such as +2h or -30m. (string)"
171
+ },
172
+ {
173
+ "name": "max",
174
+ "description": "Latest selectable time. Accepts a time, now, or an offset such as +2h or -30m. (string)"
175
+ },
176
+ {
177
+ "name": "step",
178
+ "description": "Step between selectable times, in seconds. The bounds are truncated to this grid. (string)"
179
+ }
180
+ ]
181
+ },
182
+ {
183
+ "name": "ful-input-instant",
184
+ "description": "A datetime input whose value is read and written as an ISO instant.",
185
+ "attributes": [
186
+ {
187
+ "name": "value",
188
+ "description": "The current value. (string)"
189
+ },
190
+ {
191
+ "name": "readonly",
192
+ "description": "Renders the control but does not let it be edited. A readonly field still contributes its value to the form. (boolean)"
193
+ },
194
+ {
195
+ "name": "required",
196
+ "description": "Marks the field as required for assistive technologies and shows the required marker on its label. (boolean)"
197
+ },
198
+ {
199
+ "name": "placeholder",
200
+ "description": "Placeholder shown while the field is empty. (string)"
201
+ },
202
+ {
203
+ "name": "min",
204
+ "description": "Earliest selectable instant, as an ISO instant. (string)"
205
+ },
206
+ {
207
+ "name": "max",
208
+ "description": "Latest selectable instant, as an ISO instant. (string)"
209
+ },
210
+ {
211
+ "name": "step",
212
+ "description": "Step between selectable instants, in seconds. (string)"
213
+ }
214
+ ]
215
+ },
216
+ {
217
+ "name": "ful-radio-group",
218
+ "description": "A group of radios, declared as ful-radio children. With type=\"boolean\" the value is a real boolean.",
219
+ "attributes": [
220
+ {
221
+ "name": "value",
222
+ "description": "The value of the selected radio. (string)"
223
+ },
224
+ {
225
+ "name": "readonly",
226
+ "description": "Renders the control but does not let it be edited. A readonly field still contributes its value to the form. (boolean)"
227
+ },
228
+ {
229
+ "name": "required",
230
+ "description": "Marks the field as required for assistive technologies and shows the required marker on its label. (boolean)"
231
+ }
232
+ ]
233
+ },
234
+ {
235
+ "name": "ful-table",
236
+ "description": "A table that loads its rows from a loader, with sorting, pagination and an optional filter form. Its columns are declared in a schema slot.",
237
+ "attributes": []
238
+ },
239
+ {
240
+ "name": "ful-pagination",
241
+ "description": "The pager of a ful-table. Rarely used on its own.",
242
+ "attributes": [
243
+ {
244
+ "name": "total",
245
+ "description": "Number of pages. (number)"
246
+ },
247
+ {
248
+ "name": "current",
249
+ "description": "Zero based index of the page being shown. (number)"
250
+ }
251
+ ]
252
+ },
253
+ {
254
+ "name": "ful-sorter",
255
+ "description": "The sort control rendered in a ful-table header. Rarely used on its own.",
256
+ "attributes": [
257
+ {
258
+ "name": "order",
259
+ "description": "The sort currently applied, asc or desc, or absent when unsorted. (string)"
260
+ }
261
+ ]
262
+ },
263
+ {
264
+ "name": "ful-filter-instant",
265
+ "description": "A ful-table filter over an instant, with an operator and one or two bounds.",
266
+ "attributes": [
267
+ {
268
+ "name": "value",
269
+ "description": "JSON tuple of the operator and its bounds, for example [\"BETWEEN\", from, to]. (string)"
270
+ },
271
+ {
272
+ "name": "readonly",
273
+ "description": "Renders the control but does not let it be edited. A readonly field still contributes its value to the form. (boolean)"
274
+ },
275
+ {
276
+ "name": "required",
277
+ "description": "Marks the field as required for assistive technologies and shows the required marker on its label. (boolean)"
278
+ },
279
+ {
280
+ "name": "placeholder",
281
+ "description": "Placeholder shown while the field is empty. (string)"
282
+ }
283
+ ]
284
+ },
285
+ {
286
+ "name": "ful-filter-local-date",
287
+ "description": "A ful-table filter over a date, with an operator and one or two bounds.",
288
+ "attributes": [
289
+ {
290
+ "name": "value",
291
+ "description": "JSON tuple of the operator and its bounds, for example [\"BETWEEN\", from, to]. (string)"
292
+ },
293
+ {
294
+ "name": "readonly",
295
+ "description": "Renders the control but does not let it be edited. A readonly field still contributes its value to the form. (boolean)"
296
+ },
297
+ {
298
+ "name": "required",
299
+ "description": "Marks the field as required for assistive technologies and shows the required marker on its label. (boolean)"
300
+ },
301
+ {
302
+ "name": "placeholder",
303
+ "description": "Placeholder shown while the field is empty. (string)"
304
+ }
305
+ ]
306
+ },
307
+ {
308
+ "name": "ful-filter-text",
309
+ "description": "A ful-table filter over text, with an operator such as CONTAINS or STARTS_WITH.",
310
+ "attributes": [
311
+ {
312
+ "name": "value",
313
+ "description": "JSON tuple of the operator, the sensitivity and the text. (string)"
314
+ },
315
+ {
316
+ "name": "readonly",
317
+ "description": "Renders the control but does not let it be edited. A readonly field still contributes its value to the form. (boolean)"
318
+ },
319
+ {
320
+ "name": "required",
321
+ "description": "Marks the field as required for assistive technologies and shows the required marker on its label. (boolean)"
322
+ },
323
+ {
324
+ "name": "placeholder",
325
+ "description": "Placeholder shown while the field is empty. (string)"
326
+ }
327
+ ]
328
+ },
329
+ {
330
+ "name": "ful-select",
331
+ "description": "A combobox backed by a loader, with badges for the current selection.",
332
+ "attributes": [
333
+ {
334
+ "name": "value",
335
+ "description": "The selected key, or a comma separated list of keys when multiple. (string)"
336
+ },
337
+ {
338
+ "name": "readonly",
339
+ "description": "Renders the control but does not let it be edited. A readonly field still contributes its value to the form. (boolean)"
340
+ },
341
+ {
342
+ "name": "required",
343
+ "description": "Marks the field as required for assistive technologies and shows the required marker on its label. (boolean)"
344
+ },
345
+ {
346
+ "name": "itemlist",
347
+ "description": "Shows the selection as a list under the control as well as badges. (boolean)"
348
+ }
349
+ ]
350
+ },
351
+ {
352
+ "name": "ful-dropdown",
353
+ "description": "The options popup of a ful-select. Rarely used on its own.",
354
+ "attributes": []
355
+ }
356
+ ]
357
+ }