Feedback
GateNotice
What a page shows in place of a read that was refused or failed, drawn the same way on every page.
The page maps the server's answer to one state of the exported Gate type and passes every
sentence in its own words. A read that answered draws nothing.
Every state
absent, full, forbidden, busy and unavailable draw a warning or brand Alert from words. Only error is drawn as a failure, with the message the gate
carries. locked renders the page's own locked snippet with the link
forward the gate carried. Only busy, unavailable and error, the states that waiting can change, offer the retry link. A role does not
change on a retry, so forbidden offers nothing to press, and full offers no
link because only the page knows a way past its ceiling.
absent
locked
Caching is not enabled
full
Cache is at its limit
forbidden
busy
Too many requests
Wait a moment, then try again.
unavailable
Temporarily unavailable
The server did not answer, so the cache could not be read. Nothing was changed.
error
The cache rules could not be read.
Try again
The retry is a plain link to retryHref, usually the page's own path and query, so it
works before the page hydrates. It carries data-sveltekit-reload, because a SvelteKit
router keeps the data it holds for an address that did not change, and the link has to ask for a
fresh document. Other hosts ignore the attribute. The link's label is words.retry.
API
| Prop | Type | Default | Description |
|---|---|---|---|
gate required | Gate | no default | The state the page mapped from the server answer. ok draws nothing. |
words required | GateWords | no default | Every sentence the notice can draw, in the page's words. |
locked required | Snippet<[forwardHref: string]> | no default | Drawn for a feature that is not enabled, given the link forward the gate carried. |
retryHref required | string | no default | The address that asks for this page again, usually its own path and query. |
class | string | no default | Extra classes on the wrapper. |
Gate
| Prop | Type | Default | Description |
|---|---|---|---|
ok | { state: 'ok' } | no default | The read answered. Nothing is drawn. |
absent | { state: 'absent' } | no default | The route is not there. |
locked | { state: 'locked'; forwardHref: string } | no default | Not enabled here. forwardHref is where it is turned on. |
full | { state: 'full'; limit: number | null; current: number | null } | no default | At a capacity ceiling. The numbers are for the page to put into its words, and either is null when the server sent none. |
forbidden | { state: 'forbidden' } | no default | The reader's role may not read it. |
busy | { state: 'busy' } | no default | Refused for the request rate. The same read succeeds once the window passes. |
unavailable | { state: 'unavailable' } | no default | The server or its database did not answer. |
error | { state: 'error'; message: string } | no default | The read failed. The message is drawn as a failure. |
GateWords
The kit holds none of these sentences, so each console says a refusal its own way and in its own
language. GateText is a title and the body under it.
| Prop | Type | Default | Description |
|---|---|---|---|
absent required | string | no default | What a missing route means here. |
full required | GateText | no default | A capacity ceiling, with the numbers already in the body. |
forbidden required | string | no default | A role that may not read it, and who to ask. |
busy required | GateText | no default | A refusal for the request rate. |
unavailable required | GateText | no default | A server or database that did not answer. |
retry required | string | no default | The label of the link that asks for the page again. |