@optionfactory/fml 9.0.0-rc14 → 9.0.0-rc16

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 (43) hide show
  1. package/README.md +16 -88
  2. package/dist/client-errors.iife.js +17 -26
  3. package/dist/client-errors.iife.js.map +1 -1
  4. package/dist/client-errors.iife.min.js.map +1 -1
  5. package/dist/custom-elements.json +70 -30
  6. package/dist/fml.css +20 -16
  7. package/dist/fml.css.map +1 -1
  8. package/dist/fml.iife.js +3612 -2138
  9. package/dist/fml.iife.js.map +1 -1
  10. package/dist/fml.iife.min.js +1 -1
  11. package/dist/fml.iife.min.js.map +1 -1
  12. package/dist/ftl.d.mts +395 -224
  13. package/dist/ftl.iife.js +400 -330
  14. package/dist/ftl.iife.js.map +1 -1
  15. package/dist/ftl.iife.min.js +1 -1
  16. package/dist/ftl.iife.min.js.map +1 -1
  17. package/dist/ftl.min.mjs +1 -1
  18. package/dist/ftl.min.mjs.map +1 -1
  19. package/dist/ftl.mjs +400 -330
  20. package/dist/ftl.mjs.map +1 -1
  21. package/dist/ful.css +20 -16
  22. package/dist/ful.css.map +1 -1
  23. package/dist/ful.d.mts +2601 -678
  24. package/dist/ful.iife.js +3042 -1610
  25. package/dist/ful.iife.js.map +1 -1
  26. package/dist/ful.iife.min.js +1 -1
  27. package/dist/ful.iife.min.js.map +1 -1
  28. package/dist/ful.min.mjs +1 -1
  29. package/dist/ful.min.mjs.map +1 -1
  30. package/dist/ful.mjs +3042 -1611
  31. package/dist/ful.mjs.map +1 -1
  32. package/dist/httpc.d.mts +139 -121
  33. package/dist/httpc.iife.js +137 -166
  34. package/dist/httpc.iife.js.map +1 -1
  35. package/dist/httpc.iife.min.js +1 -1
  36. package/dist/httpc.iife.min.js.map +1 -1
  37. package/dist/httpc.min.mjs +1 -1
  38. package/dist/httpc.min.mjs.map +1 -1
  39. package/dist/httpc.mjs +137 -166
  40. package/dist/httpc.mjs.map +1 -1
  41. package/dist/vscode.html-custom-data.json +36 -18
  42. package/dist/web-types.json +67 -35
  43. package/package.json +1 -1
@@ -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 */\n/**\n * An error carrying a list of problems rather than one message. A problem's\n * `context` names the field it belongs to, which is what lets a form show each\n * one beside its own input instead of in a banner.\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 /**\n * Returns a copy whose problems' contexts have the prefix removed, so a\n * caller can rethrow namespaced problems as its own.\n * @param {string} prefix\n * @returns {Failure}\n */\n dropping(prefix) {\n return new Failure(this.message, Failure.dropProblemsContext(this.problems, prefix), this);\n }\n /**\n * @param {Problem[]} problems\n * @param {string} prefix\n * @returns {Problem[]}\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 * The one reading of a failure: its problems' reasons, one per line, or\n * the fallback when the value carries none. An empty problems array\n * carries nothing: the failure's own message reads instead.\n *\n * @param {any} cause\n * @param {string|null} [fallback]\n * @returns {string}\n */\n static problemsText(cause, fallback = null) {\n if (cause?.problems?.length) {\n return cause.problems.map((p) => `${p.reason}`).join('\\n');\n }\n return fallback ?? `${cause?.message ?? cause}`;\n }\n}\n\nexport { Failure };\n","/**\n * Base64 encoding and decoding over ArrayBuffers, in the STANDARD and URL_SAFE\n * alphabets. The encoder never emits padding; the decoder accepts both padded\n * and unpadded input, and rejects anything it cannot decode faithfully instead\n * of corrupting silently.\n */\nclass Base64 {\n /**\n * @param {ArrayBuffer} arrayBuffer\n * @param {string} [dialect] one of Base64.STANDARD or Base64.URL_SAFE, URL_SAFE by default\n * @returns {string} the unpadded encoding\n */\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 /**\n * @param {string} str\n * @param {string} [dialect] one of Base64.STANDARD or Base64.URL_SAFE, URL_SAFE by default\n * @returns {ArrayBuffer}\n */\n static decode(str, dialect) {\n const d = dialect || Base64.URL_SAFE;\n //padding belongs at the tail only, two at most, and nothing outside the\n //dialect decodes: reject instead of corrupting silently\n let end = str.length;\n while (end > 0 && str.charAt(end - 1) === '=') {\n --end;\n }\n const unpadded = str.substring(0, end);\n if (str.length - end > 2 || unpadded.includes('=') || (unpadded.length === 0 && str.length > 0)) {\n throw new Error('invalid padding');\n }\n if (unpadded.length % 4 === 1) {\n throw new Error('invalid length');\n }\n for (const c of unpadded) {\n if (d.indexOf(c) === -1) {\n throw new Error(`invalid character '${c}'`);\n }\n }\n const nbytes = Math.floor(unpadded.length * 0.75);\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(unpadded.charAt(si++));\n const v2 = d.indexOf(unpadded.charAt(si++));\n const v3 = d.indexOf(unpadded.charAt(si++));\n const v4 = d.indexOf(unpadded.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\n/**\n * Hex encoding and decoding over byte sequences, lowercase by default.\n */\nclass Hex {\n /**\n * @param {string} hex\n * @returns {Uint8Array}\n */\n static decode(hex) {\n if (hex.length % 2 !== 0) {\n throw new Error('invalid length');\n }\n if (!/^[0-9a-fA-F]*$/.test(hex)) {\n throw new Error('invalid character');\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 /**\n * @param {Iterable<number>} bytes\n * @param {boolean} [upper]\n * @returns {string}\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\n/** A parsed `Content-Type`: the type and subtype without the parameters, so a comparison is not defeated by a charset. */\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 * Parses a Content-Type header value into its type/subtype pair, dropping any parameter.\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().toLowerCase().split('/');\n if (!ptype || !psubtype) {\n return new MediaType('unknown', 'unknown');\n }\n return new MediaType(ptype, psubtype);\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\n/**\n * A Failure from an http exchange, carrying the status that was served. Status\n * 0 means no response was served at all: the transport failed, or a body the\n * server did send could not be read.\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 /**\n * Returns a copy whose problems' contexts have the prefix removed, keeping\n * this error's status.\n * @param {string} prefix\n * @returns {HttpClientError}\n */\n dropping(prefix) {\n return new HttpClientError(this.message, this.status, Failure.dropProblemsContext(this.problems, prefix), this);\n }\n /**\n * One problem of the client's own making: the four the client mints are the\n * same shape, and the server's arrive already shaped from the wire.\n * @param {string} type\n * @param {string} reason\n */\n static problem(type, reason) {\n return { type, context: null, reason, details: null };\n }\n /**\n * Creates a client failure carrying no status, wrapping the cause and its message.\n * @param {string} type\n * @param {any} cause\n * @returns\n */\n static of(type, cause) {\n const reason = String(cause?.message ?? cause ?? 'unknown failure');\n return new HttpClientError(reason, 0, [HttpClientError.problem(type, reason)], cause);\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().catch(() => HttpClientError.#unreadable);\n if (data === HttpClientError.#unreadable) {\n return HttpClientError.#undecodable(response);\n }\n if (!Array.isArray(data)) {\n return HttpClientError.#undecodable(response, 'as a failures array');\n }\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().catch(() => HttpClientError.#unreadable);\n if (data === HttpClientError.#unreadable) {\n return HttpClientError.#undecodable(response);\n }\n if (typeof data !== 'object' || data === null || Array.isArray(data)) {\n return HttpClientError.#undecodable(response, 'as a problem object');\n }\n const message = `${response.status} ${response.statusText}: ${data.title} ${data.detail}`;\n return new HttpClientError(\n message,\n response.status,\n data.problems || [HttpClientError.problem('GENERIC_PROBLEM', message)],\n );\n }\n default: {\n return HttpClientError.#generic(response);\n }\n }\n }\n /** marks a body whose json() rejected, telling it apart from a body decoding to json null */\n static #unreadable = Symbol('unreadable body');\n /**\n * A json body that failed to decode, or that decoded to something other than\n * the declared contract, has consumed its stream: there is no text left to\n * embed, the status, the declared media type and the shape are the report.\n * @param {Response} response\n * @param {string} [as] - what the body does not decode as\n */\n static #undecodable(response, as = 'as json') {\n const mediaType = MediaType.parse(response.headers.get('Content-Type')).normalized;\n const message = `${response.status} ${response.statusText}: the ${mediaType} body does not decode ${as}`;\n return new HttpClientError(message, response.status, [HttpClientError.problem('GENERIC_PROBLEM', message)]);\n }\n static async #generic(response) {\n //a body that cannot be read (the connection cut mid-body) must not\n //masquerade as a connection problem: the response was served, its\n //status is the report\n const text = await response.text().catch(() => null);\n const message =\n text === null\n ? `${response.status} ${response.statusText}: the body could not be read`\n : `${response.status} ${response.statusText}: ${text}`;\n return new HttpClientError(message, response.status, [HttpClientError.problem('GENERIC_PROBLEM', message)]);\n }\n}\n\nconst metaContent = (name) =>\n globalThis.document?.querySelector(`meta[name=\"${name}\"]`)?.getAttribute('content') ?? undefined;\n\n/**\n * @implements {HttpInterceptor}\n */\n/**\n * Sends the csrf header named by the page's `_csrf_header` meta, with the token\n * from `_csrf`. Both are read per request, so metas replaced after the client\n * was built are honoured, and the header is sent to the page's own origin only.\n */\nclass CsrfTokenInterceptor {\n async intercept(url, request, chain) {\n //the token is the page's own: it travels to the page's origin only, and it\n //is read at request time, so metas landed after the client was built (a\n //login flow) are honored without a rebuild\n if (url.origin !== (globalThis.window?.location?.origin ?? url.origin)) {\n return await chain.proceed(url, request);\n }\n const csrfHeader = metaContent('_csrf_header');\n const csrfToken = metaContent('_csrf');\n if (csrfHeader && csrfToken) {\n request.headers.set(csrfHeader, csrfToken);\n }\n return await chain.proceed(url, request);\n }\n}\n/**\n * @implements {HttpInterceptor}\n */\n/**\n * Navigates to a login url when a response comes back 401. The promise it\n * returns never settles, so callers keep waiting while the page unloads\n * instead of showing a failure nobody will be present to read.\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 //the page is navigating away: a promise that never settles keeps the\n //callers' spinners up instead of flashing a failure nobody will read.\n //Where the navigation is blocked (a beforeunload gate), they stay\n //pending until the page actually leaves\n return new Promise(() => {});\n }\n return response;\n }\n}\n\n/** Collects the interceptors an HttpClient will run, in the order they are added. */\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 */\n/** The last interceptor in every chain: the one that performs the request. */\nclass HttpCall {\n async intercept(url, request, chain) {\n try {\n return await fetch(url, request);\n } catch (ex) {\n //the one place a connection problem is a connection problem: the\n //transport itself refused to deliver. Everything above this is code,\n //and code that throws has a different story to tell\n throw HttpClientError.of('CONNECTION_PROBLEM', ex);\n }\n }\n}\n\n/** One request's position in the interceptor list: `proceed` runs the next interceptor, the last of which performs the request. */\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\n/**\n * Performs http requests through a fixed list of interceptors. The verbs\n * return a request builder; `exchange` is the lower-level entry that returns\n * the Response itself without treating an error status as a failure.\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 const request = { ...options, headers: new Headers(options?.headers) };\n return await chain.proceed(url, request);\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 * Reads the response body as the given type, wrapping a failed read as an UNMARSHALING_PROBLEM.\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\n/**\n * One request under construction: method, url, parameters, headers and body,\n * with a `fetch*` method per body type. Every configuration method returns the\n * builder, and a `fetch*` rejects with an HttpClientError for any status\n * outside 200-299.\n */\nclass HttpRequestBuilder {\n #client;\n #method;\n #uri;\n #params;\n #headers;\n #body;\n #options;\n #interceptors;\n #fragment;\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 //'/a#frag?p=1' parses as hash '#frag?p=1' with an empty query, and a '?'\n //may appear in a query itself: only the first of each splits\n const hashIndex = uri.indexOf('#');\n const fragment = hashIndex === -1 ? '' : uri.slice(hashIndex);\n const withoutFragment = hashIndex === -1 ? uri : uri.slice(0, hashIndex);\n const queryIndex = withoutFragment.indexOf('?');\n return new HttpRequestBuilder(\n client,\n method,\n queryIndex === -1 ? withoutFragment : withoutFragment.slice(0, queryIndex),\n new URLSearchParams(queryIndex === -1 ? '' : withoutFragment.slice(queryIndex + 1)),\n new Headers(),\n undefined,\n {},\n [],\n fragment,\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 * @param {string} [fragment]\n */\n constructor(client, method, uri, params, headers, body, options, interceptors, fragment = '') {\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 this.#fragment = fragment;\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. An empty list, or one carrying only null and undefined values, causes the key to be removed; nullish entries among real values are skipped.\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 const values = vs.filter((v) => v != null);\n if (values.length === 0) {\n return this;\n }\n for (const v of values) {\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 if (body === undefined) {\n return this;\n }\n const serialized = JSON.stringify(body);\n this.#headers.set('Content-Type', 'application/json');\n this.#body = serialized;\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 registered\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 registered\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 query = this.#params.size ? `?${this.#params}` : '';\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(`${this.#uri}${query}${this.#fragment}`, opts, this.#interceptors);\n }\n /**\n * Performs an HTTP exchange using the configured client request, and interceptors throwing a failure when response status is not in the 200-299 range.\n * @returns {Promise<Response>} the response\n */\n async fetch() {\n try {\n const response = await this.exchange();\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 //fetch() answers a Failure whatever happened, so a caller reading\n //`problems` never has to test the shape first. What reaches here is\n //not the transport, which labels its own failure below the chain: it\n //is a throw from the chain's own code, carried as the cause\n throw HttpClientError.of('UNEXPECTED_PROBLEM', ex);\n }\n }\n /**\n * Performs an HTTP exchange using the configured client request, and interceptors 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 interceptors throwing a failure when response status is not in the 200-299 range.\n * A 204 yields null without reading the body; any other empty body is an unmarshaling failure.\n * @returns {Promise<any>} the response body, deserialized as JSON\n */\n async fetchJson() {\n const response = await this.fetch();\n if (response.status === 204) {\n //a 204 declares no content: there is no body to decode\n return null;\n }\n return await unmarshal(response, 'json');\n }\n /**\n * Performs an HTTP exchange using the configured client request, and interceptors 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 interceptors 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\n/** Builds a multipart body: text fields, json parts, and single or repeated blobs. */\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\n//every type a caller can end up holding is nameable: the builder `builder()`\n//answers, the request builder every verb answers, the chain an interceptor is\n//handed and the customizer a multipart callback is handed. They were reachable\n//and unnameable, so a consumer could write the call but not annotate the\n//function it lives in. The interceptors stay unexported: they are page policy the\n//builder installs, not a type anything hands back\nexport {\n MediaType,\n HttpClient,\n HttpClientBuilder,\n HttpClientError,\n HttpInterceptorChain,\n HttpRequestBuilder,\n HttpMultipartRequestCustomizer,\n};\n"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA,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;AACA;AACA;AACA;AACA;AACA,IAAI,OAAO,mBAAmB,CAAC,QAAQ,EAAE,MAAM,EAAE;AACjD,QAAQ,OAAO,QAAQ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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;;"}
1
+ {"version":3,"file":"httpc.mjs","sources":["../src/httpc/failure.mjs","../src/httpc/encodings.mjs","../src/httpc/http-client.mjs"],"sourcesContent":["/**\n * One problem of a failure: its `type` (a code such as `FIELD_ERROR` or\n * `GENERIC_PROBLEM`), the `context` naming the field it belongs to or null, the\n * human `reason`, and optional `details`.\n * @typedef {{ type: string; context: string?; reason: string; details: any?; }} Problem\n */\n/**\n * An error carrying a list of problems rather than one message. A problem's\n * `context` names the field it belongs to, which is what lets a form show each\n * one beside its own input instead of in a banner.\n */\nclass Failure extends Error {\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 /**\n * Returns a copy whose problems' contexts have the prefix removed, so a\n * caller can rethrow namespaced problems as its own.\n * @param {string} prefix\n * @returns {Failure}\n */\n dropping(prefix) {\n return new Failure(this.message, Failure.dropProblemsContext(this.problems, prefix), this);\n }\n /**\n * Copies of the problems, each context losing the prefix where it starts with it.\n * @param {Problem[]} problems\n * @param {string} prefix\n * @returns {Problem[]}\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","/**\n * Base64 encoding and decoding over ArrayBuffers, in the STANDARD and URL_SAFE\n * alphabets. The encoder never emits padding; the decoder accepts both padded\n * and unpadded input, and rejects anything it cannot decode faithfully instead\n * of corrupting silently.\n */\nclass Base64 {\n /** The RFC 4648 alphabet, with `+` and `/`. */\n static STANDARD = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\n /** The RFC 4648 url and filename safe alphabet, with `-` and `_`. */\n static URL_SAFE = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_';\n /**\n * @param {ArrayBuffer} arrayBuffer\n * @param {string} [dialect] one of Base64.STANDARD or Base64.URL_SAFE, URL_SAFE by default\n * @returns {string} the unpadded encoding\n */\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 /**\n * @param {string} str padded or unpadded\n * @param {string} [dialect] one of Base64.STANDARD or Base64.URL_SAFE, URL_SAFE by default\n * @returns {ArrayBuffer}\n * @throws on padding anywhere but the tail or longer than two, on an\n * impossible length, and on a character outside the dialect\n */\n static decode(str, dialect) {\n const d = dialect || Base64.URL_SAFE;\n let end = str.length;\n while (end > 0 && str.charAt(end - 1) === '=') {\n --end;\n }\n const unpadded = str.substring(0, end);\n if (str.length - end > 2 || unpadded.includes('=') || (unpadded.length === 0 && str.length > 0)) {\n throw new Error('invalid padding');\n }\n if (unpadded.length % 4 === 1) {\n throw new Error('invalid length');\n }\n for (const c of unpadded) {\n if (d.indexOf(c) === -1) {\n throw new Error(`invalid character '${c}'`);\n }\n }\n const nbytes = Math.floor(unpadded.length * 0.75);\n const view = new Uint8Array(nbytes);\n\n let vi = 0;\n let si = 0;\n while (vi < nbytes) {\n const v1 = d.indexOf(unpadded.charAt(si++));\n const v2 = d.indexOf(unpadded.charAt(si++));\n const v3 = d.indexOf(unpadded.charAt(si++));\n const v4 = d.indexOf(unpadded.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\n/**\n * Hex encoding and decoding over byte sequences, lowercase by default.\n */\nclass Hex {\n /**\n * @param {string} hex either case\n * @returns {Uint8Array}\n * @throws on an odd length or a character that is not a hex digit\n */\n static decode(hex) {\n if (hex.length % 2 !== 0) {\n throw new Error('invalid length');\n }\n if (!/^[0-9a-fA-F]*$/.test(hex)) {\n throw new Error('invalid character');\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 /**\n * @param {Iterable<number>} bytes\n * @param {boolean} [upper] uppercase digits instead of lowercase\n * @returns {string} two digits per byte\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\n/** A parsed `Content-Type`: the type and subtype without the parameters, so a comparison is not defeated by a charset. */\nclass MediaType {\n #type;\n #subtype;\n constructor(type, subtype) {\n this.#type = type;\n this.#subtype = subtype;\n }\n /** @returns {string} `type/subtype`, lowercase */\n get normalized() {\n return `${this.#type}/${this.#subtype}`;\n }\n /** @returns {string} */\n get type() {\n return this.#type;\n }\n /** @returns {string} */\n get subtype() {\n return this.#subtype;\n }\n /**\n * Parses a Content-Type header value into its type/subtype pair, dropping any parameter.\n * @param {string|null|undefined} v\n * @returns {MediaType} `unknown/unknown` for a missing or malformed value\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().toLowerCase().split('/');\n if (!ptype || !psubtype) {\n return new MediaType('unknown', 'unknown');\n }\n return new MediaType(ptype, psubtype);\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\n/**\n * A Failure from an http exchange, carrying the status that was served. Status\n * 0 means no response was served at all: the transport failed, or a body the\n * server did send could not be read.\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 /**\n * Returns a copy whose problems' contexts have the prefix removed, keeping\n * this error's status.\n * @param {string} prefix\n * @returns {HttpClientError}\n */\n dropping(prefix) {\n return new HttpClientError(this.message, this.status, Failure.dropProblemsContext(this.problems, prefix), this);\n }\n /**\n * A problem with no context and no details.\n * @param {string} type\n * @param {string} reason\n * @returns {{ type: string; context: null; reason: string; details: null; }}\n */\n static problem(type, reason) {\n return { type, context: null, reason, details: null };\n }\n /**\n * A failure with status 0 and one problem of the given type, whose reason is\n * the cause's message.\n * @param {string} type\n * @param {any} cause\n * @returns {HttpClientError}\n */\n static of(type, cause) {\n const reason = String(cause?.message ?? cause ?? 'unknown failure');\n return new HttpClientError(reason, 0, [HttpClientError.problem(type, reason)], cause);\n }\n /**\n * The failure an error response stands for, keeping its status. An\n * `application/failures+json` body is the problems list; an\n * `application/problem+json` body contributes its `problems`, or one\n * GENERIC_PROBLEM made of its title and detail. Any other body is one\n * GENERIC_PROBLEM carrying the body text. A json body that does not decode,\n * or decodes to the wrong shape, and a body that cannot be read at all,\n * each become one GENERIC_PROBLEM saying so.\n * @param {Response} response consumed\n * @returns {Promise<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().catch(() => HttpClientError.#unreadable);\n if (data === HttpClientError.#unreadable) {\n return HttpClientError.#undecodable(response);\n }\n if (!Array.isArray(data)) {\n return HttpClientError.#undecodable(response, 'as a failures array');\n }\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().catch(() => HttpClientError.#unreadable);\n if (data === HttpClientError.#unreadable) {\n return HttpClientError.#undecodable(response);\n }\n if (typeof data !== 'object' || data === null || Array.isArray(data)) {\n return HttpClientError.#undecodable(response, 'as a problem object');\n }\n const message = `${response.status} ${response.statusText}: ${data.title} ${data.detail}`;\n return new HttpClientError(\n message,\n response.status,\n data.problems || [HttpClientError.problem('GENERIC_PROBLEM', message)],\n );\n }\n default: {\n return HttpClientError.#generic(response);\n }\n }\n }\n static #unreadable = Symbol('unreadable body');\n /**\n * @param {Response} response\n * @param {string} [as] what the body does not decode as\n */\n static #undecodable(response, as = 'as json') {\n const mediaType = MediaType.parse(response.headers.get('Content-Type')).normalized;\n const message = `${response.status} ${response.statusText}: the ${mediaType} body does not decode ${as}`;\n return new HttpClientError(message, response.status, [HttpClientError.problem('GENERIC_PROBLEM', message)]);\n }\n static async #generic(response) {\n const text = await response.text().catch(() => null);\n const message =\n text === null\n ? `${response.status} ${response.statusText}: the body could not be read`\n : `${response.status} ${response.statusText}: ${text}`;\n return new HttpClientError(message, response.status, [HttpClientError.problem('GENERIC_PROBLEM', message)]);\n }\n}\n\nconst metaContent = (name) =>\n globalThis.document?.querySelector(`meta[name=\"${name}\"]`)?.getAttribute('content') ?? undefined;\n\n/**\n * Sends the csrf header named by the page's `_csrf_header` meta, with the token\n * from `_csrf`. Both are read per request, so metas replaced after the client\n * was built are honoured, and the header is sent to the page's own origin only.\n * @implements {HttpInterceptor}\n */\nclass CsrfTokenInterceptor {\n async intercept(url, request, chain) {\n if (url.origin !== (globalThis.window?.location?.origin ?? url.origin)) {\n return await chain.proceed(url, request);\n }\n const csrfHeader = metaContent('_csrf_header');\n const csrfToken = metaContent('_csrf');\n if (csrfHeader && csrfToken) {\n request.headers.set(csrfHeader, csrfToken);\n }\n return await chain.proceed(url, request);\n }\n}\n/**\n * Navigates to a login url when a response comes back 401. The promise it\n * returns never settles, so callers keep waiting while the page unloads\n * instead of showing a failure; where the navigation is blocked, as by a\n * beforeunload prompt, they stay pending until the page leaves.\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\n/** Collects the interceptors an HttpClient will run, in the order they are added. */\nclass HttpClientBuilder {\n /**\n * @type {HttpInterceptor[]}\n */\n #interceptors;\n constructor() {\n this.#interceptors = [];\n }\n /**\n * Adds the CsrfTokenInterceptor.\n * @returns {HttpClientBuilder} this builder\n */\n withCsrfToken() {\n this.#interceptors.push(new CsrfTokenInterceptor());\n return this;\n }\n /**\n * Adds the RedirectOnUnauthorizedInterceptor.\n * @param {string} redirectUri where a 401 navigates to\n * @returns {HttpClientBuilder} this builder\n */\n withRedirectOnUnauthorized(redirectUri) {\n this.#interceptors.push(new RedirectOnUnauthorizedInterceptor(redirectUri));\n return this;\n }\n /**\n * Adds interceptors, run in the order given after the ones added before.\n * @param {...HttpInterceptor} interceptors\n * @returns {HttpClientBuilder} this builder\n */\n withInterceptors(...interceptors) {\n this.#interceptors.push(...interceptors);\n return this;\n }\n /** @returns {HttpClient} a client running the interceptors added so far */\n build() {\n return new HttpClient(this.#interceptors);\n }\n}\n\n/**\n * The last interceptor in every chain, performing the request with fetch. A\n * fetch rejection becomes an HttpClientError with a CONNECTION_PROBLEM.\n * @implements {HttpInterceptor}\n */\nclass HttpCall {\n async intercept(url, request, chain) {\n try {\n return await fetch(url, request);\n } catch (ex) {\n throw HttpClientError.of('CONNECTION_PROBLEM', ex);\n }\n }\n}\n\n/** One request's position in the interceptor list: `proceed` runs the next interceptor, the last of which performs the request. */\nclass HttpInterceptorChain {\n #interceptors;\n #current;\n /**\n * @param {HttpInterceptor[]} interceptors\n * @param {number} current the index of the interceptor `proceed` runs\n */\n constructor(interceptors, current) {\n this.#interceptors = interceptors;\n this.#current = current;\n }\n /**\n * Runs the next interceptor.\n * @param {URL} url\n * @param {RequestInit} request\n * @returns {Promise<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\n/**\n * Performs http requests through a fixed list of interceptors. The verbs\n * return a request builder; `exchange` is the lower-level entry that returns\n * the Response itself without treating an error status as a failure.\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 through the client's interceptors, then the\n * given ones.\n * @param {string} uri the request url, relative to the page's\n * @param {RequestInit|undefined} options fetch options\n * @param {HttpInterceptor[]|undefined} interceptors run for this exchange only\n * @returns {Promise<Response>} the response, whatever its status; rejecting\n * with an HttpClientError CONNECTION_PROBLEM when the transport fails, or\n * with what an interceptor throws\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 const request = { ...options, headers: new Headers(options?.headers) };\n return await chain.proceed(url, request);\n }\n /**\n * Starts a request with any method.\n * @param {string} method\n * @param {string} uri the request url, relative to the page's; a query and a fragment in it are kept\n * @returns {HttpRequestBuilder}\n */\n request(method, uri) {\n return HttpRequestBuilder.create(this, method, uri);\n }\n /**\n * Starts a GET request.\n * @param {string} uri the request url, relative to the page's; a query and a fragment in it are kept\n * @returns {HttpRequestBuilder}\n */\n get(uri) {\n return HttpRequestBuilder.create(this, 'GET', uri);\n }\n /**\n * Starts a HEAD request.\n * @param {string} uri the request url, relative to the page's; a query and a fragment in it are kept\n * @returns {HttpRequestBuilder}\n */\n head(uri) {\n return HttpRequestBuilder.create(this, 'HEAD', uri);\n }\n /**\n * Starts a POST request.\n * @param {string} uri the request url, relative to the page's; a query and a fragment in it are kept\n * @returns {HttpRequestBuilder}\n */\n post(uri) {\n return HttpRequestBuilder.create(this, 'POST', uri);\n }\n /**\n * Starts a PUT request.\n * @param {string} uri the request url, relative to the page's; a query and a fragment in it are kept\n * @returns {HttpRequestBuilder}\n */\n put(uri) {\n return HttpRequestBuilder.create(this, 'PUT', uri);\n }\n /**\n * Starts a PATCH request.\n * @param {string} uri the request url, relative to the page's; a query and a fragment in it are kept\n * @returns {HttpRequestBuilder}\n */\n patch(uri) {\n return HttpRequestBuilder.create(this, 'PATCH', uri);\n }\n /**\n * Starts a DELETE request.\n * @param {string} uri the request url, relative to the page's; a query and a fragment in it are kept\n * @returns {HttpRequestBuilder}\n */\n delete(uri) {\n return HttpRequestBuilder.create(this, 'DELETE', uri);\n }\n}\n\n/**\n * Reads the response body as the given type, wrapping a failed read as an UNMARSHALING_PROBLEM.\n * @param {Response} response\n * @param {'text'|'json'|'blob'|'arrayBuffer'} type\n * @returns {Promise<any>}\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 * The entries of a headers or params initializer with nullish values kept as they are.\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\n/**\n * One request under construction: method, url, parameters, headers and body,\n * with a `fetch*` method per body type. Every configuration method returns the\n * builder, and a `fetch*` rejects with an HttpClientError for any status\n * outside 200-299.\n */\nclass HttpRequestBuilder {\n #client;\n #method;\n #uri;\n #params;\n #headers;\n #body;\n #options;\n #interceptors;\n #fragment;\n /**\n * A builder for the url: its query becomes the initial params, split at the\n * first `?`, and its fragment, from the first `#`, is kept for the final url.\n * @param {HttpClient} client\n * @param {string} method\n * @param {string} uri\n * @returns {HttpRequestBuilder}\n */\n static create(client, method, uri) {\n const hashIndex = uri.indexOf('#');\n const fragment = hashIndex === -1 ? '' : uri.slice(hashIndex);\n const withoutFragment = hashIndex === -1 ? uri : uri.slice(0, hashIndex);\n const queryIndex = withoutFragment.indexOf('?');\n return new HttpRequestBuilder(\n client,\n method,\n queryIndex === -1 ? withoutFragment : withoutFragment.slice(0, queryIndex),\n new URLSearchParams(queryIndex === -1 ? '' : withoutFragment.slice(queryIndex + 1)),\n new Headers(),\n undefined,\n {},\n [],\n fragment,\n );\n }\n /**\n * @param {HttpClient} client\n * @param {string} method\n * @param {string} uri the url without query and fragment\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 * @param {string} [fragment]\n */\n constructor(client, method, uri, params, headers, body, options, interceptors, fragment = '') {\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 this.#fragment = fragment;\n }\n /**\n * Sets each header, replacing a header of the same name; a null or undefined value removes it.\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 this.header(k, v);\n }\n return this;\n }\n /**\n * Sets a header, replacing one of the same name; a null or undefined value removes it.\n * @param {string} k\n * @param {string|null|undefined} 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 * Sets each query parameter in place, replacing a parameter of the same name; a null or undefined value removes it.\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 * Sets a query parameter to the values given, as repeated entries moved to the end of the query; nullish values are skipped, and none left removes the parameter.\n * @param {string} k\n * @param {...string} vs\n * @returns {HttpRequestBuilder} this builder\n */\n param(k, ...vs) {\n this.#params.delete(k);\n for (const v of vs.filter((v) => v != null)) {\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 if (body === undefined) {\n return this;\n }\n const serialized = JSON.stringify(body);\n this.#headers.set('Content-Type', 'application/json');\n this.#body = serialized;\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 * @returns {HttpRequestBuilder} this builder\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 * Merges fetch options into the request's.\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 run for this request only, after the client's.\n * @param {HttpInterceptor[]} is\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 one interceptor run for this request only, after the client's.\n * @param {HttpInterceptor} i\n * @returns {HttpRequestBuilder} this builder\n */\n interceptor(i) {\n this.#interceptors.push(i);\n return this;\n }\n /**\n * Sends the request and answers the Response, whatever its status.\n * @returns {Promise<Response>} rejecting as `HttpClient.exchange` does\n */\n async exchange() {\n const query = this.#params.size ? `?${this.#params}` : '';\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(`${this.#uri}${query}${this.#fragment}`, opts, this.#interceptors);\n }\n /**\n * Sends the request and answers the Response when its status is 200-299.\n * Always rejects with an HttpClientError: `HttpClientError.fromResponse`\n * for an error status, CONNECTION_PROBLEM for a transport failure, and\n * UNEXPECTED_PROBLEM, carrying the error as its cause, for anything an\n * interceptor throws that is not already a Failure.\n * @returns {Promise<Response>}\n */\n async fetch() {\n try {\n const response = await this.exchange();\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('UNEXPECTED_PROBLEM', ex);\n }\n }\n /**\n * `fetch()`, then the body as text; a body that cannot be read rejects with UNMARSHALING_PROBLEM.\n * @returns {Promise<string>}\n */\n async fetchText() {\n const response = await this.fetch();\n return await unmarshal(response, 'text');\n }\n /**\n * `fetch()`, then the body parsed as json. A 204 yields null without reading\n * the body; any other body that does not parse rejects with UNMARSHALING_PROBLEM.\n * @returns {Promise<any>}\n */\n async fetchJson() {\n const response = await this.fetch();\n if (response.status === 204) {\n return null;\n }\n return await unmarshal(response, 'json');\n }\n /**\n * `fetch()`, then the body as a Blob; a body that cannot be read rejects with UNMARSHALING_PROBLEM.\n * @returns {Promise<Blob>}\n */\n async fetchBlob() {\n const response = await this.fetch();\n return await unmarshal(response, 'blob');\n }\n /**\n * `fetch()`, then the body as an ArrayBuffer; a body that cannot be read rejects with UNMARSHALING_PROBLEM.\n * @returns {Promise<ArrayBuffer>}\n */\n async fetchArrayBuffer() {\n const response = await this.fetch();\n return await unmarshal(response, 'arrayBuffer');\n }\n}\n\n/** Builds a multipart body: text fields, json parts, and single or repeated blobs. */\nclass HttpMultipartRequestCustomizer {\n #formData;\n /** @param {FormData} formData the body being built */\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 {HttpMultipartRequestCustomizer} 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. Without a filename a File keeps its own\n * and any other Blob is named \"blob\".\n * @param {string} name\n * @param {Blob} value\n * @param {string} [filename]\n * @returns {HttpMultipartRequestCustomizer} this builder\n */\n blob(name, value, filename) {\n this.#formData.append(name, value, filename);\n return this;\n }\n /**\n * Appends each Blob under the same name, a File keeping its own filename and\n * any other Blob named \"blob\".\n * @param {string} name\n * @param {Blob[]} values\n * @returns {HttpMultipartRequestCustomizer} 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 the value serialized as an `application/json` blob.\n * @param {string} name\n * @param {any} value\n * @param {string} [filename]\n * @returns {HttpMultipartRequestCustomizer} 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 {\n MediaType,\n HttpClient,\n HttpClientBuilder,\n HttpClientError,\n HttpInterceptorChain,\n HttpRequestBuilder,\n HttpMultipartRequestCustomizer,\n};\n"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,OAAO,SAAS,KAAK,CAAC;AAC5B;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;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,QAAQ,CAAC,MAAM,EAAE;AACrB,QAAQ,OAAO,IAAI,OAAO,CA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,CAAC;AACnD,QAAQ,OAAO,IAAI;AACnB,IAAI;AACJ;;"}
@@ -55,6 +55,16 @@
55
55
  }
56
56
  ]
57
57
  },
58
+ {
59
+ "name": "ful-menu",
60
+ "description": "A menu of commands on the native popover platform: the invoker named by for toggles it, light dismiss and Escape come from the browser, and the element adds the menu semantics and the keyboard protocol (roving focus with the arrows, Home and End, type-ahead, Enter and Space to activate, Escape and every close handing the focus back to the invoker). The items are the buttons and links written inside it, kept as they are and given their menuitem role; activation is the item's own click, which the menu only follows by closing.",
61
+ "attributes": [
62
+ {
63
+ "name": "for",
64
+ "description": "The id of the invoker the menu belongs to: it toggles the menu, carries aria-haspopup and aria-expanded, and takes the focus back when the menu closes. Read once at the upgrade, so the invoker must already be in the page by then. (string)"
65
+ }
66
+ ]
67
+ },
58
68
  {
59
69
  "name": "ful-toasts",
60
70
  "description": "A transient feedback region, one per page: each show() (or a show-toast document event carrying the same detail) appends a toast that dismisses itself after its timeout, the element's timeout attribute or five seconds by default, and carries its own dismiss button. severity picks the theme and the announcement, info by default, success, warning and error, the error one announced as an alert; a Failure message shows its problems' reasons. The timer holds while the toast is hovered or holds the focus, and action: { label, onClick } renders a button beside the message whose click answers and retires the toast, the same option travelling in the event detail.",
@@ -586,6 +596,14 @@
586
596
  {
587
597
  "name": "page-size",
588
598
  "description": "How many rows a page asks the loader for, 10 by default. Stays live: writing it reloads from the first page, a table that has not been asked to load yet only recording it. (number)"
599
+ },
600
+ {
601
+ "name": "src",
602
+ "description": "The url the default loader asks for rows; without it the table loads from an in-memory loader fed through withLoader. Stays live: writing it builds the loader again and reloads from the first page, keeping the sort and the filters. (string)"
603
+ },
604
+ {
605
+ "name": "method",
606
+ "description": "The http method the default loader sends, GET by default. Stays live, as src does. (string)"
589
607
  }
590
608
  ]
591
609
  },
@@ -933,15 +951,7 @@
933
951
  },
934
952
  {
935
953
  "name": "k-type",
936
- "description": "How a key coerces when it arrives from the response or from the value attribute: number, string or bool. (string)"
937
- },
938
- {
939
- "name": "src",
940
- "description": "The url the vocabulary is fetched from. Without it the slotted <option> elements are the whole vocabulary, held in memory. (string)"
941
- },
942
- {
943
- "name": "method",
944
- "description": "The method the vocabulary is fetched with; POST when absent. (string)"
954
+ "description": "How a key coerces when it arrives from the response or from the value attribute: number, string or boolean. (string)"
945
955
  },
946
956
  {
947
957
  "name": "mode",
@@ -1002,6 +1012,14 @@
1002
1012
  {
1003
1013
  "name": "item-list",
1004
1014
  "description": "Shows the selection as a ful-item-list under the control as well, in addition to the field itself (the label for a single select, the ful-badge chips when multiple). (boolean)"
1015
+ },
1016
+ {
1017
+ "name": "src",
1018
+ "description": "The url the vocabulary is fetched from. Without it the slotted <option> elements are the whole vocabulary, held in memory. Stays live: writing it builds the loader again and reloads as reload() does, dropping a selected key the new vocabulary does not know. (string)"
1019
+ },
1020
+ {
1021
+ "name": "method",
1022
+ "description": "The method the vocabulary is fetched with; POST when absent. Stays live, as src does. (string)"
1005
1023
  }
1006
1024
  ]
1007
1025
  },
@@ -1019,15 +1037,7 @@
1019
1037
  },
1020
1038
  {
1021
1039
  "name": "k-type",
1022
- "description": "How a key coerces when it arrives from the response or from the value attribute: number, string or bool. (string)"
1023
- },
1024
- {
1025
- "name": "src",
1026
- "description": "The url the vocabulary is fetched from. Without it the slotted <option> elements are the whole vocabulary, held in memory. (string)"
1027
- },
1028
- {
1029
- "name": "method",
1030
- "description": "The method the vocabulary is fetched with; POST when absent. (string)"
1040
+ "description": "How a key coerces when it arrives from the response or from the value attribute: number, string or boolean. (string)"
1031
1041
  },
1032
1042
  {
1033
1043
  "name": "mode",
@@ -1084,6 +1094,14 @@
1084
1094
  {
1085
1095
  "name": "item-list",
1086
1096
  "description": "Shows the selection as a ful-item-list under the control as well, in addition to the field itself (the label for a single select, the ful-badge chips when multiple). (boolean)"
1097
+ },
1098
+ {
1099
+ "name": "src",
1100
+ "description": "The url the vocabulary is fetched from. Without it the slotted <option> elements are the whole vocabulary, held in memory. Stays live: writing it builds the loader again and reloads as reload() does, dropping a selected key the new vocabulary does not know. (string)"
1101
+ },
1102
+ {
1103
+ "name": "method",
1104
+ "description": "The method the vocabulary is fetched with; POST when absent. Stays live, as src does. (string)"
1087
1105
  }
1088
1106
  ]
1089
1107
  },
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@optionfactory/fml",
4
- "version": "9.0.0-rc14",
4
+ "version": "9.0.0-rc16",
5
5
  "description-markup": "none",
6
6
  "contributions": {
7
7
  "html": {
@@ -147,6 +147,22 @@
147
147
  }
148
148
  ]
149
149
  },
150
+ {
151
+ "name": "ful-menu",
152
+ "description": "A menu of commands on the native popover platform: the invoker named by for toggles it, light dismiss and Escape come from the browser, and the element adds the menu semantics and the keyboard protocol (roving focus with the arrows, Home and End, type-ahead, Enter and Space to activate, Escape and every close handing the focus back to the invoker). The items are the buttons and links written inside it, kept as they are and given their menuitem role; activation is the item's own click, which the menu only follows by closing.",
153
+ "attributes": [
154
+ {
155
+ "name": "for",
156
+ "description": "The id of the invoker the menu belongs to: it toggles the menu, carries aria-haspopup and aria-expanded, and takes the focus back when the menu closes. Read once at the upgrade, so the invoker must already be in the page by then.",
157
+ "value": {
158
+ "kind": "plain",
159
+ "type": "string"
160
+ }
161
+ }
162
+ ],
163
+ "slots": [],
164
+ "events": []
165
+ },
150
166
  {
151
167
  "name": "ful-toasts",
152
168
  "description": "A transient feedback region, one per page: each show() (or a show-toast document event carrying the same detail) appends a toast that dismisses itself after its timeout, the element's timeout attribute or five seconds by default, and carries its own dismiss button. severity picks the theme and the announcement, info by default, success, warning and error, the error one announced as an alert; a Failure message shows its problems' reasons. The timer holds while the toast is hovered or holds the focus, and action: { label, onClick } renders a button beside the message whose click answers and retires the toast, the same option travelling in the event detail.",
@@ -1354,6 +1370,22 @@
1354
1370
  "kind": "plain",
1355
1371
  "type": "number"
1356
1372
  }
1373
+ },
1374
+ {
1375
+ "name": "src",
1376
+ "description": "The url the default loader asks for rows; without it the table loads from an in-memory loader fed through withLoader. Stays live: writing it builds the loader again and reloads from the first page, keeping the sort and the filters.",
1377
+ "value": {
1378
+ "kind": "plain",
1379
+ "type": "string"
1380
+ }
1381
+ },
1382
+ {
1383
+ "name": "method",
1384
+ "description": "The http method the default loader sends, GET by default. Stays live, as src does.",
1385
+ "value": {
1386
+ "kind": "plain",
1387
+ "type": "string"
1388
+ }
1357
1389
  }
1358
1390
  ],
1359
1391
  "slots": [
@@ -2159,23 +2191,7 @@
2159
2191
  },
2160
2192
  {
2161
2193
  "name": "k-type",
2162
- "description": "How a key coerces when it arrives from the response or from the value attribute: number, string or bool.",
2163
- "value": {
2164
- "kind": "plain",
2165
- "type": "string"
2166
- }
2167
- },
2168
- {
2169
- "name": "src",
2170
- "description": "The url the vocabulary is fetched from. Without it the slotted <option> elements are the whole vocabulary, held in memory.",
2171
- "value": {
2172
- "kind": "plain",
2173
- "type": "string"
2174
- }
2175
- },
2176
- {
2177
- "name": "method",
2178
- "description": "The method the vocabulary is fetched with; POST when absent.",
2194
+ "description": "How a key coerces when it arrives from the response or from the value attribute: number, string or boolean.",
2179
2195
  "value": {
2180
2196
  "kind": "plain",
2181
2197
  "type": "string"
@@ -2300,6 +2316,22 @@
2300
2316
  "kind": "plain",
2301
2317
  "type": "boolean"
2302
2318
  }
2319
+ },
2320
+ {
2321
+ "name": "src",
2322
+ "description": "The url the vocabulary is fetched from. Without it the slotted <option> elements are the whole vocabulary, held in memory. Stays live: writing it builds the loader again and reloads as reload() does, dropping a selected key the new vocabulary does not know.",
2323
+ "value": {
2324
+ "kind": "plain",
2325
+ "type": "string"
2326
+ }
2327
+ },
2328
+ {
2329
+ "name": "method",
2330
+ "description": "The method the vocabulary is fetched with; POST when absent. Stays live, as src does.",
2331
+ "value": {
2332
+ "kind": "plain",
2333
+ "type": "string"
2334
+ }
2303
2335
  }
2304
2336
  ],
2305
2337
  "slots": [
@@ -2353,23 +2385,7 @@
2353
2385
  },
2354
2386
  {
2355
2387
  "name": "k-type",
2356
- "description": "How a key coerces when it arrives from the response or from the value attribute: number, string or bool.",
2357
- "value": {
2358
- "kind": "plain",
2359
- "type": "string"
2360
- }
2361
- },
2362
- {
2363
- "name": "src",
2364
- "description": "The url the vocabulary is fetched from. Without it the slotted <option> elements are the whole vocabulary, held in memory.",
2365
- "value": {
2366
- "kind": "plain",
2367
- "type": "string"
2368
- }
2369
- },
2370
- {
2371
- "name": "method",
2372
- "description": "The method the vocabulary is fetched with; POST when absent.",
2388
+ "description": "How a key coerces when it arrives from the response or from the value attribute: number, string or boolean.",
2373
2389
  "value": {
2374
2390
  "kind": "plain",
2375
2391
  "type": "string"
@@ -2486,6 +2502,22 @@
2486
2502
  "kind": "plain",
2487
2503
  "type": "boolean"
2488
2504
  }
2505
+ },
2506
+ {
2507
+ "name": "src",
2508
+ "description": "The url the vocabulary is fetched from. Without it the slotted <option> elements are the whole vocabulary, held in memory. Stays live: writing it builds the loader again and reloads as reload() does, dropping a selected key the new vocabulary does not know.",
2509
+ "value": {
2510
+ "kind": "plain",
2511
+ "type": "string"
2512
+ }
2513
+ },
2514
+ {
2515
+ "name": "method",
2516
+ "description": "The method the vocabulary is fetched with; POST when absent. Stays live, as src does.",
2517
+ "value": {
2518
+ "kind": "plain",
2519
+ "type": "string"
2520
+ }
2489
2521
  }
2490
2522
  ],
2491
2523
  "slots": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@optionfactory/fml",
3
- "version": "9.0.0-rc14",
3
+ "version": "9.0.0-rc16",
4
4
  "type": "module",
5
5
  "main": "./dist/fml.mjs",
6
6
  "module": "./dist/fml.mjs",