@kayjs/kay 1.109.0 → 1.110.0
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.
- package/dist/eslint.js +332 -52
- package/editors/zed/extension.toml +2 -2
- package/llms/actions-from-islands.md +1 -1
- package/llms/components.md +1 -1
- package/llms/deprecated-lints.md +1 -1
- package/llms/island-and-form-lints.md +2 -1
- package/llms/islands.md +4 -2
- package/llms/live-values.md +1 -1
- package/llms/navigation-from-code.md +1 -1
- package/llms/navigation.md +4 -2
- package/llms/templates-elements-slots-snippets.md +2 -2
- package/llms/upgrading-archive.md +31 -1
- package/llms/upgrading.md +26 -32
- package/llms/whats-new.md +15 -0
- package/llms.txt +1 -1
- package/package.json +6 -6
- package/src/build/variants.ts +132 -18
- package/src/check/env-types.ts +1 -1
- package/src/check/project.ts +4 -0
- package/src/check/schema-builders.ts +125 -26
- package/src/commands/upgrade.ts +2 -1
- package/src/compiler/allow-comments.ts +38 -2
- package/src/compiler/ast.ts +4 -4
- package/src/compiler/codegen.ts +3 -3
- package/src/compiler/deprecated-lints-1-106.ts +2 -2
- package/src/compiler/hand-parts.ts +36 -8
- package/src/compiler/helper-imports.ts +2 -2
- package/src/compiler/index.ts +4 -3
- package/src/compiler/island-arguments.ts +9 -0
- package/src/compiler/island-lints.ts +7 -0
- package/src/compiler/items.ts +12 -0
- package/src/compiler/jsx.ts +5 -4
- package/src/compiler/lints.ts +5 -6
- package/src/compiler/markup.ts +16 -21
- package/src/compiler/names.ts +1 -1
- package/src/compiler/removed-lints.ts +90 -0
- package/src/compiler/signal-from-prop.ts +141 -0
- package/src/compiler/template-reads.ts +16 -0
- package/src/runtime/checks.ts +14 -2
- package/src/runtime/client.ts +5 -9
- package/src/runtime/dom.ts +1 -1
- package/src/runtime/html.ts +1 -1
- package/src/runtime/image.ts +2 -19
- package/src/runtime/index.ts +1 -1
- package/src/runtime/island.server.ts +40 -10
- package/src/runtime/navigate.ts +9 -0
- package/src/runtime/navigation.ts +5 -1
- package/src/runtime/page-swap.ts +2 -2
- package/src/runtime/swap-flight.ts +10 -10
- package/src/runtime/swap-kept.ts +69 -29
- package/src/runtime/swap-morph.ts +49 -9
- package/src/runtime/text-hash.ts +17 -0
- package/src/runtime/uid.server.ts +6 -4
- package/src/runtime/values.ts +12 -0
- package/src/server/render-document.ts +8 -6
- package/src/server/render.ts +1 -1
- package/types/build/variants.d.ts +9 -1
- package/types/build/variants.d.ts.map +1 -1
- package/types/check/project.d.ts.map +1 -1
- package/types/check/schema-builders.d.ts.map +1 -1
- package/types/commands/upgrade.d.ts.map +1 -1
- package/types/compiler/allow-comments.d.ts +2 -0
- package/types/compiler/allow-comments.d.ts.map +1 -1
- package/types/compiler/ast.d.ts +1 -1
- package/types/compiler/ast.d.ts.map +1 -1
- package/types/compiler/deprecated-lints-1-106.d.ts +2 -2
- package/types/compiler/deprecated-lints-1-106.d.ts.map +1 -1
- package/types/compiler/deprecated-lints.d.ts +2 -2
- package/types/compiler/hand-parts.d.ts +6 -3
- package/types/compiler/hand-parts.d.ts.map +1 -1
- package/types/compiler/index.d.ts.map +1 -1
- package/types/compiler/island-arguments.d.ts +5 -0
- package/types/compiler/island-arguments.d.ts.map +1 -1
- package/types/compiler/island-lints.d.ts +7 -0
- package/types/compiler/island-lints.d.ts.map +1 -1
- package/types/compiler/items.d.ts +1 -0
- package/types/compiler/items.d.ts.map +1 -1
- package/types/compiler/jsx.d.ts.map +1 -1
- package/types/compiler/lints.d.ts +11 -4
- package/types/compiler/lints.d.ts.map +1 -1
- package/types/compiler/markup.d.ts +1 -1
- package/types/compiler/markup.d.ts.map +1 -1
- package/types/compiler/names.d.ts.map +1 -1
- package/types/compiler/removed-lints.d.ts +3 -0
- package/types/compiler/removed-lints.d.ts.map +1 -0
- package/types/compiler/signal-from-prop.d.ts +4 -0
- package/types/compiler/signal-from-prop.d.ts.map +1 -0
- package/types/compiler/template-reads.d.ts +1 -0
- package/types/compiler/template-reads.d.ts.map +1 -1
- package/types/runtime/checks.d.ts +8 -2
- package/types/runtime/checks.d.ts.map +1 -1
- package/types/runtime/client.d.ts.map +1 -1
- package/types/runtime/dom.d.ts +1 -1
- package/types/runtime/dom.d.ts.map +1 -1
- package/types/runtime/html.d.ts +1 -1
- package/types/runtime/html.d.ts.map +1 -1
- package/types/runtime/image.d.ts.map +1 -1
- package/types/runtime/index.d.ts +1 -1
- package/types/runtime/index.d.ts.map +1 -1
- package/types/runtime/island.server.d.ts +1 -0
- package/types/runtime/island.server.d.ts.map +1 -1
- package/types/runtime/navigate.d.ts.map +1 -1
- package/types/runtime/navigation.d.ts +2 -0
- package/types/runtime/navigation.d.ts.map +1 -1
- package/types/runtime/swap-flight.d.ts +1 -1
- package/types/runtime/swap-flight.d.ts.map +1 -1
- package/types/runtime/swap-kept.d.ts.map +1 -1
- package/types/runtime/swap-morph.d.ts.map +1 -1
- package/types/runtime/text-hash.d.ts +2 -0
- package/types/runtime/text-hash.d.ts.map +1 -0
- package/types/runtime/uid.server.d.ts.map +1 -1
- package/types/runtime/values.d.ts +4 -0
- package/types/runtime/values.d.ts.map +1 -1
- package/types/server/render-document.d.ts +1 -1
- package/types/server/render-document.d.ts.map +1 -1
package/src/runtime/swap-kept.ts
CHANGED
|
@@ -2,12 +2,15 @@ import type { Policy } from './swap-flight'
|
|
|
2
2
|
import { ISLAND } from './markers'
|
|
3
3
|
import { moves, place } from './move'
|
|
4
4
|
import { navigation } from './navigation'
|
|
5
|
+
import { inFlight } from './swap-flight'
|
|
5
6
|
import { runnable, scriptMarkup } from './swap-head'
|
|
6
7
|
import { KEPT, MISSING, morphChildren, scoped, UNIT } from './swap-morph'
|
|
7
8
|
import { decodeServerValue } from './wire'
|
|
8
9
|
|
|
9
10
|
const PERSISTENT = 'slot[data-persist]'
|
|
10
11
|
const SERVER_ISLAND = 'slot[data-kay-server]'
|
|
12
|
+
// The islands a layout rendered, which a navigation keeping the layout keeps.
|
|
13
|
+
const LAYOUT_ISLAND = `${ISLAND}[data-layout]`
|
|
11
14
|
// What a script put in the body to outlive every page, a live region an announcer fills for one: the next body never holds it, so the morph leaves it where it is, never moved, as a live region taken out and put back may go unread.
|
|
12
15
|
const LASTING = ':scope > [data-kay-keep]'
|
|
13
16
|
|
|
@@ -92,7 +95,8 @@ export function swapBody(next: Document, policy: Policy, held: Held | undefined,
|
|
|
92
95
|
const scrolls = new Map<Element, readonly [left: number, top: number]>()
|
|
93
96
|
|
|
94
97
|
// Read before the first move, and only when the next page has an island to keep, so every read shares one layout instead of forcing one after each move.
|
|
95
|
-
const
|
|
98
|
+
const matching = policy.islands === 'all' ? ISLAND : LAYOUT_ISLAND
|
|
99
|
+
const candidates = `${PERSISTENT},${matching}`
|
|
96
100
|
|
|
97
101
|
for (const root of [...body.querySelector(candidates) ? old.querySelectorAll(candidates) : [], ...lives]) {
|
|
98
102
|
for (const element of [root, ...root.querySelectorAll('*')]) {
|
|
@@ -132,37 +136,11 @@ export function swapBody(next: Document, policy: Policy, held: Held | undefined,
|
|
|
132
136
|
markCurrent(live, placeholder)
|
|
133
137
|
keep(placeholder, live)
|
|
134
138
|
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
// What the next page gives it, which it reads from now on, or once it hydrates.
|
|
138
|
-
if (props !== live.dataset.props) {
|
|
139
|
-
if (props === undefined)
|
|
140
|
-
delete live.dataset.props
|
|
141
|
-
else
|
|
142
|
-
live.dataset.props = props
|
|
143
|
-
|
|
144
|
-
live._$p?.(props === undefined ? {} : decodeServerValue(props) as object)
|
|
145
|
-
}
|
|
139
|
+
givePropsOf(live, placeholder)
|
|
146
140
|
}
|
|
147
141
|
}
|
|
148
142
|
|
|
149
|
-
|
|
150
|
-
const unchanged = [...old.querySelectorAll<KeptIsland>(ISLAND)]
|
|
151
|
-
|
|
152
|
-
for (const placeholder of body.querySelectorAll<HTMLElement>(ISLAND)) {
|
|
153
|
-
// One in the static slot of an island kept went along with it, or away with the copy it replaced.
|
|
154
|
-
if (!body.contains(placeholder) || standIns.has(placeholder) || [...kept].some(island => island.contains(placeholder)))
|
|
155
|
-
continue
|
|
156
|
-
|
|
157
|
-
const index = unchanged.findIndex(live => old.contains(live) && live.dataset.component === placeholder.dataset.component && live.dataset.props === placeholder.dataset.props && live.dataset.slots === placeholder.dataset.slots && (live.dataset.slots === undefined || (live._$h ?? live.innerHTML) === placeholder.innerHTML))
|
|
158
|
-
|
|
159
|
-
if (index !== -1) {
|
|
160
|
-
const [live] = unchanged.splice(index, 1)
|
|
161
|
-
|
|
162
|
-
keep(placeholder, live!)
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
}
|
|
143
|
+
keepMatched(old, body, matching, standIns, keep)
|
|
166
144
|
|
|
167
145
|
// Every island left is taken away, as the morph never keeps one.
|
|
168
146
|
navigation.hooks!.dispose(old)
|
|
@@ -209,6 +187,12 @@ export function swapBody(next: Document, policy: Policy, held: Held | undefined,
|
|
|
209
187
|
if (focused && document.activeElement !== focused.element && [...kept].some(island => island.contains(focused.element)))
|
|
210
188
|
focused.restore()
|
|
211
189
|
|
|
190
|
+
// What each `details` shows now is what the server served: the visitor's toggle, which a refresh compares with it, comes after, and a toggle event the markup's own opening fires is not one.
|
|
191
|
+
for (const details of document.querySelectorAll('details')) {
|
|
192
|
+
if (!inFlight.typing || !navigation.opened.has(details))
|
|
193
|
+
navigation.opened.set(details, details.open)
|
|
194
|
+
}
|
|
195
|
+
|
|
212
196
|
// A drawer or a menu left open closes as the page changes, as it would on a page loaded afresh.
|
|
213
197
|
for (const popover of opened) {
|
|
214
198
|
if (popover.isConnected && popover instanceof HTMLElement && popover.matches(':popover-open'))
|
|
@@ -222,6 +206,62 @@ export function swapBody(next: Document, policy: Policy, held: Held | undefined,
|
|
|
222
206
|
}
|
|
223
207
|
}
|
|
224
208
|
|
|
209
|
+
// An island of the next page that has its match among those of this one, the same component in the same place, stays and takes the new props: what the visitor did in it is its own.
|
|
210
|
+
function keepMatched(old: Element, body: Element, matching: string, standIns: ReadonlyMap<Element, Element>, keep: (placeholder: Element, live: Element) => void): void {
|
|
211
|
+
const live = new Map<string, KeptIsland[]>()
|
|
212
|
+
|
|
213
|
+
// Only the islands of the page itself take part: one in another's static slot goes where its parent goes.
|
|
214
|
+
for (const island of old.querySelectorAll<KeptIsland>(matching)) {
|
|
215
|
+
if (island.dataset.persist !== undefined || island.parentElement?.closest(ISLAND))
|
|
216
|
+
continue
|
|
217
|
+
|
|
218
|
+
const place = placeOf(island)
|
|
219
|
+
const list = live.get(place)
|
|
220
|
+
|
|
221
|
+
if (list)
|
|
222
|
+
list.push(island)
|
|
223
|
+
else
|
|
224
|
+
live.set(place, [island])
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
if (live.size === 0)
|
|
228
|
+
return
|
|
229
|
+
|
|
230
|
+
for (const placeholder of body.querySelectorAll<HTMLElement>(matching)) {
|
|
231
|
+
// One in the static slot of an island kept went along with it, or away with the copy it replaced.
|
|
232
|
+
if (placeholder.dataset.persist !== undefined || !body.contains(placeholder) || standIns.has(placeholder) || placeholder.parentElement?.closest(ISLAND))
|
|
233
|
+
continue
|
|
234
|
+
|
|
235
|
+
const match = live.get(placeOf(placeholder))?.shift()
|
|
236
|
+
|
|
237
|
+
if (match && old.contains(match) && match.dataset.slots === placeholder.dataset.slots && (match.dataset.slots === undefined || (match._$h ?? match.innerHTML) === placeholder.innerHTML)) {
|
|
238
|
+
markCurrent(match, placeholder)
|
|
239
|
+
keep(placeholder, match)
|
|
240
|
+
givePropsOf(match, placeholder)
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
// Where an island stands among the others, which the next page's copy of it is paired by: its layout, component and `key` or `id`, then in order.
|
|
246
|
+
function placeOf(island: HTMLElement): string {
|
|
247
|
+
return `${island.dataset.layout ?? ''}\0${island.dataset.component}\0${island.dataset.key ?? ''}`
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
// What the next page gives a kept island, which it reads from now on, or once it hydrates.
|
|
251
|
+
function givePropsOf(live: KeptIsland, next: HTMLElement): void {
|
|
252
|
+
const props = next.dataset.props
|
|
253
|
+
|
|
254
|
+
if (props === live.dataset.props)
|
|
255
|
+
return
|
|
256
|
+
|
|
257
|
+
if (props === undefined)
|
|
258
|
+
delete live.dataset.props
|
|
259
|
+
else
|
|
260
|
+
live.dataset.props = props
|
|
261
|
+
|
|
262
|
+
live._$p?.(props === undefined ? {} : decodeServerValue(props) as object)
|
|
263
|
+
}
|
|
264
|
+
|
|
225
265
|
const KAY_MARKS = new Set<string | null>([null, 'page', 'true'])
|
|
226
266
|
|
|
227
267
|
// The marks of the next page's copy of an island kept, a link to the page now shown, `aria-current`, carried over to the links of the one that lives on, found by their place and address: those that differ are left, as the island renders them itself, and so is a value kay never writes (`step`, `false`), which an island setting its own holds.
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { ISLAND } from './markers'
|
|
2
|
+
import { navigation } from './navigation'
|
|
2
3
|
import { inFlight } from './swap-flight'
|
|
3
4
|
|
|
4
5
|
const NOTHING: ReadonlySet<Node> = new Set()
|
|
5
|
-
// What the morph never keeps across pages: islands are kept by `persist
|
|
6
|
+
// What the morph never keeps across pages: islands are kept by `persist`, a match in the same place or a refresh, never morphed, and a script or a template is put in afresh.
|
|
6
7
|
const OPAQUE = `${ISLAND},slot[data-kay-server],script,template`
|
|
7
8
|
// The tags OPAQUE can match, so the selector is only matched for them.
|
|
8
9
|
const OPAQUE_TAGS = new Set(['slot', 'script', 'template'])
|
|
@@ -37,9 +38,9 @@ function alike(live: Node, next: Node): boolean {
|
|
|
37
38
|
return live.id === other.id && live.getAttribute('class') === other.getAttribute('class') && (!OPAQUE_TAGS.has(live.localName) || (!live.matches(OPAQUE) && !other.matches(OPAQUE)))
|
|
38
39
|
}
|
|
39
40
|
|
|
40
|
-
// Whether a field keeps what was typed into it: it is the same field and the
|
|
41
|
+
// Whether a field keeps what was typed into it: it is the same field and the render left what the server renders in it as it was, so only a visitor changed it.
|
|
41
42
|
function typedKept(live: Element, other: Element): boolean {
|
|
42
|
-
if (
|
|
43
|
+
if (!inFlight.typing)
|
|
43
44
|
return false
|
|
44
45
|
|
|
45
46
|
if (live instanceof HTMLInputElement && other instanceof HTMLInputElement)
|
|
@@ -72,6 +73,37 @@ function holdTabStop(element: Element): void {
|
|
|
72
73
|
}, { once: true, signal: held.signal })
|
|
73
74
|
}
|
|
74
75
|
|
|
76
|
+
// Whether a `details` the visitor toggled keeps its state: the render leaves what the server wrote as `open` when the visitor toggled it, so only the visitor changed it. One the server changed takes the server's, and is the visitor's again from its next toggle.
|
|
77
|
+
function keepsOpen(live: Element, other: Element): boolean {
|
|
78
|
+
if (!(live instanceof HTMLDetailsElement))
|
|
79
|
+
return false
|
|
80
|
+
|
|
81
|
+
// A swap that keeps nothing of the visitor's leaves what it served as the new baseline.
|
|
82
|
+
if (!inFlight.typing) {
|
|
83
|
+
navigation.opened.delete(live)
|
|
84
|
+
|
|
85
|
+
return false
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
const served = navigation.opened.get(live)
|
|
89
|
+
|
|
90
|
+
if (served === undefined)
|
|
91
|
+
return false
|
|
92
|
+
|
|
93
|
+
if (other.hasAttribute('open') === served)
|
|
94
|
+
return true
|
|
95
|
+
|
|
96
|
+
navigation.opened.delete(live)
|
|
97
|
+
|
|
98
|
+
return false
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
// A change the morph makes to `open`, whose `toggle` event is not the visitor's.
|
|
102
|
+
function wrote(live: Element, name: string): void {
|
|
103
|
+
if (name === 'open' && live instanceof HTMLDetailsElement)
|
|
104
|
+
navigation.written.add(live)
|
|
105
|
+
}
|
|
106
|
+
|
|
75
107
|
// Makes the live node read as the next one, keeping it and each child of it the next page renders again.
|
|
76
108
|
function morph(live: Node, next: Node): void {
|
|
77
109
|
if (!(live instanceof Element)) {
|
|
@@ -89,29 +121,37 @@ function morph(live: Node, next: Node): void {
|
|
|
89
121
|
// Read before the attributes and the children become the next page's, which the defaults come from.
|
|
90
122
|
const typed = typedKept(live, other)
|
|
91
123
|
|
|
92
|
-
if (
|
|
124
|
+
if (inFlight.typing && live instanceof HTMLSelectElement && live.name !== (other as HTMLSelectElement).name)
|
|
93
125
|
inFlight.renamed.add(live)
|
|
94
126
|
|
|
95
127
|
// An element's open state is closed through it, as the attribute alone would leave a modal dialog blocking the page.
|
|
96
128
|
if (live instanceof HTMLDialogElement && live.open && !other.hasAttribute('open'))
|
|
97
129
|
live.close()
|
|
98
130
|
|
|
131
|
+
const opened = keepsOpen(live, other)
|
|
132
|
+
|
|
99
133
|
for (const { name, value } of other.attributes) {
|
|
100
|
-
if (live.getAttribute(name) !== value)
|
|
134
|
+
if (live.getAttribute(name) !== value && !(opened && name === 'open')) {
|
|
135
|
+
wrote(live, name)
|
|
101
136
|
live.setAttribute(name, value)
|
|
137
|
+
}
|
|
102
138
|
}
|
|
103
139
|
|
|
104
140
|
if (other.hasAttribute('tabindex'))
|
|
105
141
|
heldTabStops.get(live)?.abort()
|
|
106
142
|
|
|
107
143
|
for (const name of live.getAttributeNames()) {
|
|
108
|
-
if (other.hasAttribute(name))
|
|
144
|
+
if (other.hasAttribute(name) || (opened && name === 'open'))
|
|
109
145
|
continue
|
|
110
146
|
|
|
111
|
-
if (name === 'tabindex' && live === document.activeElement)
|
|
147
|
+
if (name === 'tabindex' && live === document.activeElement) {
|
|
112
148
|
holdTabStop(live)
|
|
113
|
-
|
|
114
|
-
|
|
149
|
+
|
|
150
|
+
continue
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
wrote(live, name)
|
|
154
|
+
live.removeAttribute(name)
|
|
115
155
|
}
|
|
116
156
|
|
|
117
157
|
morphChildren(live, other)
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// cyrb53, 53 bits of a string's hash in base 36, in plain script so the browser and the docs playground run it as the server does.
|
|
2
|
+
export function textHash(text: string): string {
|
|
3
|
+
let h1 = 0xDEADBEEF
|
|
4
|
+
let h2 = 0x41C6CE57
|
|
5
|
+
|
|
6
|
+
for (let index = 0; index < text.length; index++) {
|
|
7
|
+
const code = text.charCodeAt(index)
|
|
8
|
+
|
|
9
|
+
h1 = Math.imul(h1 ^ code, 2654435761)
|
|
10
|
+
h2 = Math.imul(h2 ^ code, 1597334677)
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
h1 = Math.imul(h1 ^ (h1 >>> 16), 2246822507) ^ Math.imul(h2 ^ (h2 >>> 13), 3266489909)
|
|
14
|
+
h2 = Math.imul(h2 ^ (h2 >>> 16), 2246822507) ^ Math.imul(h1 ^ (h1 >>> 13), 3266489909)
|
|
15
|
+
|
|
16
|
+
return (4294967296 * (2097151 & h2) + (h1 >>> 0)).toString(36)
|
|
17
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { AsyncLocalStorage } from 'node:async_hooks'
|
|
2
|
+
import { textHash } from './text-hash'
|
|
2
3
|
import { freshPrefix, withIds } from './uid'
|
|
3
4
|
|
|
4
5
|
// The page the server is rendering: its token keeps ids apart from those of a page swapped out around a persistent island.
|
|
@@ -50,7 +51,7 @@ export function withSlotIslands<T>(prefix: string, run: () => T): T {
|
|
|
50
51
|
}
|
|
51
52
|
|
|
52
53
|
// The prefix of the next island the server renders, written on its slot.
|
|
53
|
-
//
|
|
54
|
+
// An island takes it from its key (a `persist` one's own, else its component's with its layout's) and its index among those of that key, not from its place in the page, so the page that replaces one at the same URL, with the same token, cannot give another island the ids the kept one still holds.
|
|
54
55
|
export function islandPrefix(persist?: string): string {
|
|
55
56
|
if (!page)
|
|
56
57
|
return freshPrefix()
|
|
@@ -61,9 +62,10 @@ export function islandPrefix(persist?: string): string {
|
|
|
61
62
|
if (persist === undefined)
|
|
62
63
|
return `${page.token}-${page.islands++}-`
|
|
63
64
|
|
|
64
|
-
const
|
|
65
|
+
const hash = textHash(persist).slice(-6)
|
|
66
|
+
const seen = page.kept.get(hash) ?? 0
|
|
65
67
|
|
|
66
|
-
page.kept.set(
|
|
68
|
+
page.kept.set(hash, seen + 1)
|
|
67
69
|
|
|
68
|
-
return `${page.token}-p${
|
|
70
|
+
return `${page.token}-p${hash}${seen === 0 ? '' : `_${seen}`}-`
|
|
69
71
|
}
|
package/src/runtime/values.ts
CHANGED
|
@@ -211,6 +211,18 @@ export function handParts(list: readonly unknown[], written?: unknown): unknown
|
|
|
211
211
|
return all.length < 2 ? all[0] : mergeParts(all)
|
|
212
212
|
}
|
|
213
213
|
|
|
214
|
+
// The `class` and `parts` of a call handing a part of this component on, both read from one list (and the `parts` the call writes): the one prop pair a call site writes, as `partsClass` and `handParts` give them.
|
|
215
|
+
export function partProps(read: () => readonly [list: readonly unknown[], written?: unknown]): { readonly class: string | undefined, readonly parts: unknown } {
|
|
216
|
+
return {
|
|
217
|
+
get class() {
|
|
218
|
+
return partsClass(read()[0])
|
|
219
|
+
},
|
|
220
|
+
get parts() {
|
|
221
|
+
return handParts(...read())
|
|
222
|
+
},
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
|
|
214
226
|
// The entry of a part that is a component is its own parts, as `partClass` reads it from a prop.
|
|
215
227
|
function entryParts(entry: unknown): unknown {
|
|
216
228
|
return typeof entry === 'object' && entry !== null && !Array.isArray(entry) ? taggedParts(entry as Record<string, unknown>) : entry
|
|
@@ -21,7 +21,7 @@ import { collectHead, head as setHead } from '../runtime/head'
|
|
|
21
21
|
import { child, component, html, newServerIslands, withinComponent, withServerIslands } from '../runtime/html'
|
|
22
22
|
import { localePath, textDirection } from '../runtime/i18n'
|
|
23
23
|
import { DEFAULT_MAX_DENSITY, RESOLVED_META } from '../runtime/image'
|
|
24
|
-
import { unrevivableAction } from '../runtime/island.server'
|
|
24
|
+
import { inLayout, unrevivableAction } from '../runtime/island.server'
|
|
25
25
|
import { resourcesUsed, resourcesWanted, withSeeds } from '../runtime/live-resource.server'
|
|
26
26
|
import { localeState } from '../runtime/locale-state'
|
|
27
27
|
import { kayLog } from '../runtime/log'
|
|
@@ -359,10 +359,12 @@ function registerSeo(module: PageModule): void {
|
|
|
359
359
|
|
|
360
360
|
// The page inside its layouts, each through `component`, so what a layout provides reaches its page.
|
|
361
361
|
// A layout's named slot is read off its page: reading one renders the page first, once, which hands the layout the blocks it wrote.
|
|
362
|
-
export function viewOf(modules: PageModule[], data: Record<string, unknown>[], entry?: HeadTag[]): () => unknown {
|
|
362
|
+
export function viewOf(modules: PageModule[], data: Record<string, unknown>[], entry?: HeadTag[], files?: readonly string[]): () => unknown {
|
|
363
363
|
const page = modules.length - 1
|
|
364
364
|
const chain = newFillChain(modules.length)
|
|
365
365
|
const declared = modules.map(module => module.slots)
|
|
366
|
+
// The layout a module renders as, for the islands it draws to carry it: none for the page.
|
|
367
|
+
const layoutOf = (index: number) => index < page && files?.[index] !== undefined ? projectPath(files[index]) : undefined
|
|
366
368
|
|
|
367
369
|
// Set after its layouts' heads and before its own, which each replace what the entry gave.
|
|
368
370
|
let view = () => {
|
|
@@ -373,7 +375,7 @@ export function viewOf(modules: PageModule[], data: Record<string, unknown>[], e
|
|
|
373
375
|
|
|
374
376
|
registerSeo(modules[page]!)
|
|
375
377
|
|
|
376
|
-
return component(modules[page]!.default, data[page]!)
|
|
378
|
+
return inLayout(undefined, () => component(modules[page]!.default, data[page]!))
|
|
377
379
|
}
|
|
378
380
|
|
|
379
381
|
for (let index = page - 1; index >= 0; index--) {
|
|
@@ -400,14 +402,14 @@ export function viewOf(modules: PageModule[], data: Record<string, unknown>[], e
|
|
|
400
402
|
|
|
401
403
|
const found = filledBy(chain, declared, index, name)
|
|
402
404
|
|
|
403
|
-
return found && withinComponent(modules[found.at]!.default, found.block)
|
|
405
|
+
return found && inLayout(layoutOf(found.at), () => withinComponent(modules[found.at]!.default, found.block))
|
|
404
406
|
} })
|
|
405
407
|
}
|
|
406
408
|
|
|
407
409
|
chain.at = index
|
|
408
410
|
registerSeo(modules[index]!)
|
|
409
411
|
|
|
410
|
-
return component(modules[index]!.default, props)
|
|
412
|
+
return inLayout(layoutOf(index), () => component(modules[index]!.default, props))
|
|
411
413
|
}
|
|
412
414
|
}
|
|
413
415
|
|
|
@@ -451,7 +453,7 @@ function seedBlocks(deferred: PendingBlock[], seeds: ReadonlyMap<string, Seed>):
|
|
|
451
453
|
}
|
|
452
454
|
|
|
453
455
|
function documentOf(files: string[], modules: PageModule[], data: Record<string, unknown>[], client: ClientBuild, rendering: Rendering, options: RenderOptions, rules: QueryRules | undefined, entry?: HeadTag[]): string | Pieced | ReadableStream<Uint8Array> {
|
|
454
|
-
const view = viewOf(modules, data, entry)
|
|
456
|
+
const view = viewOf(modules, data, entry, files)
|
|
455
457
|
const chunks = islandChunks(client)
|
|
456
458
|
// A prerendered page holds each server island between marks the server splits it at.
|
|
457
459
|
const scan = options.prerendering ? Object.assign(newServerIslands(true), { awaits: options.awaits }) : undefined
|
package/src/server/render.ts
CHANGED
|
@@ -664,7 +664,7 @@ export async function renderServerIslands(route: ServedRoute, context: RequestCo
|
|
|
664
664
|
}
|
|
665
665
|
}, () => rendering.headers.append('vary', 'cookie'), rules)
|
|
666
666
|
const chunks = islandChunks(client)
|
|
667
|
-
const { deferred, islands: shell } = inScope(() => withServerIslands(islands, () => renderStatic(viewOf(page.modules, page.data), undefined, chunks)))
|
|
667
|
+
const { deferred, islands: shell } = inScope(() => withServerIslands(islands, () => renderStatic(viewOf(page.modules, page.data, undefined, page.files), undefined, chunks)))
|
|
668
668
|
const unrevivable = unrevivableAction(shell, client)
|
|
669
669
|
|
|
670
670
|
if (unrevivable)
|
|
@@ -3,19 +3,27 @@ export declare function variantFile(input: string): string;
|
|
|
3
3
|
export declare function usesNames(source: string, file?: string): string[];
|
|
4
4
|
export declare function specializedSource(source: string, present: ReadonlySet<string>, file?: string): string;
|
|
5
5
|
export declare const ANY: unique symbol;
|
|
6
|
-
export declare function propsWritten(source: string, locals: readonly string[], defaults?: ReadonlyMap<string, ReadonlySet<string
|
|
6
|
+
export declare function propsWritten(source: string, locals: readonly string[], defaults?: ReadonlyMap<string, ReadonlySet<string>>, rest?: Pick<Rest, 'name' | 'forwards'>): Map<string, Set<string> | typeof ANY>;
|
|
7
|
+
interface Rest {
|
|
8
|
+
name: string;
|
|
9
|
+
taken: Set<string>;
|
|
10
|
+
forwards: Map<string, string>;
|
|
11
|
+
}
|
|
7
12
|
export declare class VariantIndex {
|
|
8
13
|
private readonly files;
|
|
9
14
|
private readonly union;
|
|
15
|
+
private readonly through;
|
|
10
16
|
private readonly indexed;
|
|
11
17
|
private scan;
|
|
12
18
|
constructor(files: string | readonly string[]);
|
|
13
19
|
private scanned;
|
|
14
20
|
private add;
|
|
15
21
|
private read;
|
|
22
|
+
private writtenOf;
|
|
16
23
|
private usedOf;
|
|
17
24
|
entry(path: string): Promise<string>;
|
|
18
25
|
variantImports(code: string, file: string, source: string): Promise<string>;
|
|
19
26
|
}
|
|
20
27
|
export declare function kayFiles(dir: string): string[];
|
|
28
|
+
export {};
|
|
21
29
|
//# sourceMappingURL=variants.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"variants.d.ts","sourceRoot":"","sources":["../../src/build/variants.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"variants.d.ts","sourceRoot":"","sources":["../../src/build/variants.ts"],"names":[],"mappings":"AA6BA,eAAO,MAAM,UAAU,QAAwC,CAAA;AAI/D,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAEjD;AAgLD,wBAAgB,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,SAAK,GAAG,MAAM,EAAE,CAE7D;AAkND,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,CAAC,MAAM,CAAC,EAAE,IAAI,SAAK,GAAG,MAAM,CAgDjG;AAGD,eAAO,MAAM,GAAG,eAAgB,CAAA;AAahC,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,MAAM,EAAE,EAAE,QAAQ,GAAE,WAAW,CAAC,MAAM,EAAE,WA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@
|
|
|
1
|
-
{"version":3,"file":"schema-builders.d.ts","sourceRoot":"","sources":["../../src/check/schema-builders.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,GAAG,CAAA;
|
|
1
|
+
{"version":3,"file":"schema-builders.d.ts","sourceRoot":"","sources":["../../src/check/schema-builders.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,GAAG,CAAA;AA2OtD,wBAAsB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC,CAuHpG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"upgrade.d.ts","sourceRoot":"","sources":["../../src/commands/upgrade.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAA;AAQvD,OAAO,EAAE,kBAAkB,
|
|
1
|
+
{"version":3,"file":"upgrade.d.ts","sourceRoot":"","sources":["../../src/commands/upgrade.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAA;AAQvD,OAAO,EAAE,kBAAkB,EAAgB,MAAM,mBAAmB,CAAA;AAUpE,MAAM,WAAW,WAAW;IAE1B,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAA;IAEnE,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,gBAAgB,EAAE,KAAK,OAAO,CAAC,OAAO,CAAC,CAAA;IAExE,GAAG,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,M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EAAE,OAAO,CAAA;CACf;AAGD,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,GAAE,OAAO,kBAAuC,GAAG,MAAM,EAAE,CAkBxH;AAGD,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,GAAE,OAAO,kBAAuC,GAAG;IAAE,MAAM,EAAE,MAAM,EAAE,CAAC;IAAC,MAAM,EAAE,MAAM,EAAE,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,CAU9K;AAyOD,iBAAe,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAM,EAAE,KAAK,GAAE,SAAS,GAAG,MAAkB,GAAG,OAAO,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC,CAKrL"}
|
|
@@ -12,9 +12,11 @@ export interface AllowComment {
|
|
|
12
12
|
file: boolean;
|
|
13
13
|
line: number;
|
|
14
14
|
start: number;
|
|
15
|
+
end: number;
|
|
15
16
|
reasoned: boolean;
|
|
16
17
|
}
|
|
17
18
|
export declare function allowComments(source: string): AllowComment[];
|
|
19
|
+
export declare function unknownNames(comment: AllowComment, source: string, known: (name: string) => boolean, help: string): Diagnostic[];
|
|
18
20
|
export declare function honoured(comments: AllowComment[], rules: AllowRules | undefined): AllowComment[];
|
|
19
21
|
export declare function refusedComments(comments: AllowComment[], rules: AllowRules | undefined): Diagnostic[];
|
|
20
22
|
//# sourceMappingURL=allow-comments.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"allow-comments.d.ts","sourceRoot":"","sources":["../../src/compiler/allow-comments.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"allow-comments.d.ts","sourceRoot":"","sources":["../../src/compiler/allow-comments.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAKvC,MAAM,WAAW,UAAU;IAEzB,MAAM,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;IAE5B,IAAI,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;IAE1B,MAAM,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;CAC7B;AAQD,MAAM,WAAW,YAAY;IAE3B,KAAK,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAA;IACxC,IAAI,EAAE,OAAO,CAAA;IAEb,IAAI,EAAE,MAAM,CAAA;IAEZ,KAAK,EAAE,MAAM,CAAA;IACb,GAAG,EAAE,MAAM,CAAA;IAEX,QAAQ,EAAE,OAAO,CAAA;CAClB;AAED,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,YAAY,EAAE,CAS5D;AAGD,wBAAgB,YAAY,CAAC,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,EAAE,IAAI,EAAE,MAAM,GAAG,UAAU,EAAE,CA8BhI;AAcD,wBAAgB,QAAQ,CAAC,QAAQ,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,UAAU,GAAG,SAAS,GAAG,YAAY,EAAE,CAEhG;AAGD,wBAAgB,eAAe,CAAC,QAAQ,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,UAAU,GAAG,SAAS,GAAG,UAAU,EAAE,CASrG"}
|
package/types/compiler/ast.d.ts
CHANGED
|
@@ -210,7 +210,7 @@ export declare function isHead(node: Node): node is ElementNode & {
|
|
|
210
210
|
};
|
|
211
211
|
export declare function isSlot(node: Node): boolean;
|
|
212
212
|
export declare function isChildrenSlot(node: Node): boolean;
|
|
213
|
-
export type TemplateHelper = 'For' | 'componentClass' | 'handParts' | 'partClass' | 'partHanded' | '
|
|
213
|
+
export type TemplateHelper = 'For' | 'componentClass' | 'handParts' | 'partClass' | 'partHanded' | 'partProps';
|
|
214
214
|
export declare function uiHasVariants(entry: UiEntry): boolean;
|
|
215
215
|
export declare function uiPartClasses(entry: UiEntry, part: string): string | undefined;
|
|
216
216
|
export interface TemplateFacts {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ast.d.ts","sourceRoot":"","sources":["../../src/compiler/ast.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAC5C,OAAO,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AACzD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AAK7D,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AACzD,OAAO,EAAE,WAAW,EAAE,oBAAoB,EAAE,QAAQ,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAGpG,MAAM,WAAW,IAAI;IACnB,KAAK,EAAE,MAAM,CAAA;IACb,GAAG,EAAE,MAAM,CAAA;CACZ;AAED,MAAM,WAAW,UAAW,SAAQ,IAAI;IAEtC,OAAO,EAAE,MAAM,CAAA;IAEf,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAE1B,OAAO,CAAC,EAAE,QAAQ,EAAE,GAAG,SAAS,CAAA;IAEhC,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAEzB,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAEzB,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAEzB,QAAQ,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,SAAS,CAAA;IAE1C,KAAK,CAAC,E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AM,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,EAAE;IAAE,IAAI,EAAE,QAAQ,CAAA;CAAE,CAAC,GAAG,SAAS,CAE3H;AAKD,wBAAgB,SAAS,CAAC,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAIxE;AAED,wBAAgB,QAAQ,CAAC,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAEjF;AAGD,wBAAgB,WAAW,CAAC,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,GAAG,SAAS,GAAG,MAAM,EAAE,CAExG;AAGD,wBAAgB,OAAO,CAAC,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,GAAG,SAAS,GAAG,MAAM,EAAE,CAOpG;AAoBD,wBAAgB,aAAa,CAAC,IAAI,EAAE,OAAO,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,aAAa,CAO3E;AAyHD,wBAAgB,eAAe,CAAC,KAAK,EAAE,SAAS,IAAI,EAAE,GAAG,IAAI,EAAE,CAM9D;AAGD,wBAAgB,eAAe,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,EAAE,CA4DlD"}
|
|
@@ -4,9 +4,9 @@ export declare const SCHEMA_BUILDERS: {
|
|
|
4
4
|
readonly group: 'deprecated';
|
|
5
5
|
readonly since: '1.106';
|
|
6
6
|
readonly site: true;
|
|
7
|
-
readonly summary: 'The PascalCase builders of `s` before 1.106, which kay\'s own lowercase builders replace, each taking the same field options (`optional`, `default`, `error`, `label`, `description`, `example`) and short names for the rest: `s.String` is `s.string` (`min`, `max`), `s.Integer` `s.int`, `s.Number` and `s.Numeric` `s.number`, `s.Boolean` and `s.BooleanString` `s.boolean`, `s.Array` `s.list`, `s.UnionEnum` and `s.UnionKeys` `s.enum`, and `s.Date`, `s.Literal`, `s.Union`, `s.Object`, `s.File`, `s.Files`, `s.Secret` and `s.Public` their lowercase names; `s.Optional(field)` is `optional: true` in the options of the field; an `s.Object({ ... })` that is the schema of
|
|
7
|
+
readonly summary: 'The PascalCase builders of `s` before 1.106, which kay\'s own lowercase builders replace, each taking the same field options (`optional`, `default`, `error`, `label`, `description`, `example`) and short names for the rest: `s.String` is `s.string` (`min`, `max`), `s.Integer` `s.int`, `s.Number` and `s.Numeric` `s.number`, `s.Boolean` and `s.BooleanString` `s.boolean`, `s.Array` `s.list`, `s.UnionEnum` and `s.UnionKeys` `s.enum`, and `s.Date`, `s.Literal`, `s.Union`, `s.Object`, `s.File`, `s.Files`, `s.Secret` and `s.Public` their lowercase names; `s.Optional(field)` is `optional: true` in the options of the field; an `s.Object({ ... })` that is the schema of a `defineEnv` is the record of fields alone, as an env reads only the names it declares; and a file size written `\'2m\'` is `\'2mb\'`. The old names work until 2.0. Found on the `s` a file imports from `kay`, in the TypeScript files and the fences of `.kay` files. The fix renames the builder and the options that changed, and keeps what each did: an `s.Array` takes `max: Number.MAX_SAFE_INTEGER` (the lowercase list stops at 1,000 items) and an `s.Object` `extra: \'strip\'`, a rewrite whose options are not an object literal being reported without a fix; an `s.Union` of `Object.keys(R).map(key => s.Literal(key))` is `s.enum(R)`, and any other `s.Union` of a mapped array is reported without a fix; an `s.Optional` around anything but one of these builders, such as a helper of `kay/content`, is left as it is. A lowercase `s.object` refuses a key its shape lacks where kay reads the schema itself (an action\'s input, an API route\'s body, `defineEnv`, collection frontmatter), where `s.Object` let it by, so the fix writes `{ extra: \'strip\' }`. A query, the headers and the cookies of a request carry keys no schema names, so their unknown keys are dropped whatever the schema says.';
|
|
8
8
|
readonly wrong: '--- server\nimport { action, s } from \'kay\'\n\nexport const add = action(s.Object({ title: s.String({ maxLength: 200 }), note: s.Optional(s.String()) }), ({ title }) => title)\n---\np x';
|
|
9
|
-
readonly right: '--- server\nimport { action, s } from \'kay\'\n\nexport const add = action({ title: s.string({ max: 200 }), note: s.string({ optional: true }) }, ({ title }) => title)\n---\np x';
|
|
9
|
+
readonly right: '--- server\nimport { action, s } from \'kay\'\n\nexport const add = action(s.object({ title: s.string({ max: 200 }), note: s.string({ optional: true }) }, { extra: \'strip\' }), ({ title }) => title)\n---\np x';
|
|
10
10
|
};
|
|
11
11
|
};
|
|
12
12
|
//# sourceMappingURL=deprecated-lints-1-106.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deprecated-lints-1-106.d.ts","sourceRoot":"","sources":["../../src/compiler/deprecated-lints-1-106.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,eAAe;;iBAExB,KAAK,EAAE,MAAM;iBACb,KAAK,EAAE,YAAY;iBACnB,KAAK,EAAE,OAAO;iBACd,IAAI;iBACJ,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"deprecated-lints-1-106.d.ts","sourceRoot":"","sources":["../../src/compiler/deprecated-lints-1-106.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,eAAe;;iBAExB,KAAK,EAAE,MAAM;iBACb,KAAK,EAAE,YAAY;iBACnB,KAAK,EAAE,OAAO;iBACd,IAAI;iBACJ,OAAO,EAAE,o0DAAo0D;iBAC70D,KAAK,EAAE,6LAA6L;iBACpM,KAAK,EAAE,mNAAmN;;CAErL,CAAA"}
|
|
@@ -4,9 +4,9 @@ export declare const DEPRECATED_LINTS: {
|
|
|
4
4
|
readonly group: 'deprecated';
|
|
5
5
|
readonly since: '1.106';
|
|
6
6
|
readonly site: true;
|
|
7
|
-
readonly summary: 'The PascalCase builders of `s` before 1.106, which kay\'s own lowercase builders replace, each taking the same field options (`optional`, `default`, `error`, `label`, `description`, `example`) and short names for the rest: `s.String` is `s.string` (`min`, `max`), `s.Integer` `s.int`, `s.Number` and `s.Numeric` `s.number`, `s.Boolean` and `s.BooleanString` `s.boolean`, `s.Array` `s.list`, `s.UnionEnum` and `s.UnionKeys` `s.enum`, and `s.Date`, `s.Literal`, `s.Union`, `s.Object`, `s.File`, `s.Files`, `s.Secret` and `s.Public` their lowercase names; `s.Optional(field)` is `optional: true` in the options of the field; an `s.Object({ ... })` that is the schema of
|
|
7
|
+
readonly summary: 'The PascalCase builders of `s` before 1.106, which kay\'s own lowercase builders replace, each taking the same field options (`optional`, `default`, `error`, `label`, `description`, `example`) and short names for the rest: `s.String` is `s.string` (`min`, `max`), `s.Integer` `s.int`, `s.Number` and `s.Numeric` `s.number`, `s.Boolean` and `s.BooleanString` `s.boolean`, `s.Array` `s.list`, `s.UnionEnum` and `s.UnionKeys` `s.enum`, and `s.Date`, `s.Literal`, `s.Union`, `s.Object`, `s.File`, `s.Files`, `s.Secret` and `s.Public` their lowercase names; `s.Optional(field)` is `optional: true` in the options of the field; an `s.Object({ ... })` that is the schema of a `defineEnv` is the record of fields alone, as an env reads only the names it declares; and a file size written `\'2m\'` is `\'2mb\'`. The old names work until 2.0. Found on the `s` a file imports from `kay`, in the TypeScript files and the fences of `.kay` files. The fix renames the builder and the options that changed, and keeps what each did: an `s.Array` takes `max: Number.MAX_SAFE_INTEGER` (the lowercase list stops at 1,000 items) and an `s.Object` `extra: \'strip\'`, a rewrite whose options are not an object literal being reported without a fix; an `s.Union` of `Object.keys(R).map(key => s.Literal(key))` is `s.enum(R)`, and any other `s.Union` of a mapped array is reported without a fix; an `s.Optional` around anything but one of these builders, such as a helper of `kay/content`, is left as it is. A lowercase `s.object` refuses a key its shape lacks where kay reads the schema itself (an action\'s input, an API route\'s body, `defineEnv`, collection frontmatter), where `s.Object` let it by, so the fix writes `{ extra: \'strip\' }`. A query, the headers and the cookies of a request carry keys no schema names, so their unknown keys are dropped whatever the schema says.';
|
|
8
8
|
readonly wrong: '--- server\nimport { action, s } from \'kay\'\n\nexport const add = action(s.Object({ title: s.String({ maxLength: 200 }), note: s.Optional(s.String()) }), ({ title }) => title)\n---\np x';
|
|
9
|
-
readonly right: '--- server\nimport { action, s } from \'kay\'\n\nexport const add = action({ title: s.string({ max: 200 }), note: s.string({ optional: true }) }, ({ title }) => title)\n---\np x';
|
|
9
|
+
readonly right: '--- server\nimport { action, s } from \'kay\'\n\nexport const add = action(s.object({ title: s.string({ max: 200 }), note: s.string({ optional: true }) }, { extra: \'strip\' }), ({ title }) => title)\n---\np x';
|
|
10
10
|
};
|
|
11
11
|
readonly 'deprecated-action-options': {
|
|
12
12
|
readonly level: 'warn';
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
import type { Attribute, ElementNode, NamedAttribute } from './ast';
|
|
1
|
+
import type { Attribute, ElementNode, NamedAttribute, PartFacts } from './ast';
|
|
2
|
+
import type { ClassItem } from './class-items';
|
|
2
3
|
import type { CodeBuilder } from './mapping';
|
|
3
4
|
export declare function writtenParts(element: ElementNode, source: string): Attribute[];
|
|
4
|
-
export declare function
|
|
5
|
-
export declare function
|
|
5
|
+
export declare function writesTogether(element: ElementNode, source: string, facts: PartFacts | undefined): boolean;
|
|
6
|
+
export declare function handedItem(b: CodeBuilder, part: string, recipe: readonly (() => void)[]): ClassItem;
|
|
7
|
+
export declare function openClassList(b: CodeBuilder, component: boolean, handing: readonly Attribute[] | undefined, together: boolean): void;
|
|
8
|
+
export declare function closeHandParts(b: CodeBuilder, component: boolean, written: readonly Attribute[] | undefined, together: boolean): void;
|
|
6
9
|
export declare function handsEntry(element: ElementNode, source: string, attribute: NamedAttribute, hands: boolean): boolean;
|
|
7
10
|
//# sourceMappingURL=hand-parts.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hand-parts.d.ts","sourceRoot":"","sources":["../../src/compiler/hand-parts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"hand-parts.d.ts","sourceRoot":"","sources":["../../src/compiler/hand-parts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CA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