stitchkit 0.113.3 → 0.114.1

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 (102) hide show
  1. package/CHANGELOG.md +42 -0
  2. package/README.md +1 -1
  3. package/dist/browser/client-url.d.ts.map +1 -1
  4. package/dist/entrypoints/agent-runtime/coding-tools.js +1 -1
  5. package/dist/entrypoints/agent-runtime/harness.js +4 -4
  6. package/dist/entrypoints/agent-runtime/realtime.js +2 -2
  7. package/dist/entrypoints/agent-runtime/sandbox.js +3 -3
  8. package/dist/entrypoints/agent-runtime/sqlite/bun.js +3 -3
  9. package/dist/entrypoints/agent-runtime/sqlite/node.js +3 -3
  10. package/dist/entrypoints/agent-runtime/testing.js +4 -4
  11. package/dist/entrypoints/agent-runtime.js +12 -12
  12. package/dist/entrypoints/application/directory-inbox.js +3 -3
  13. package/dist/entrypoints/application.js +4 -4
  14. package/dist/entrypoints/cli/publish.js +1 -1
  15. package/dist/entrypoints/cli.js +4 -4
  16. package/dist/entrypoints/contract.js +2 -2
  17. package/dist/entrypoints/http.js +2 -2
  18. package/dist/entrypoints/index.js +5 -5
  19. package/dist/entrypoints/node.js +3 -3
  20. package/dist/entrypoints/observability.js +3 -3
  21. package/dist/entrypoints/react/keyboard/testing.d.ts +2 -0
  22. package/dist/entrypoints/react/keyboard/testing.d.ts.map +1 -0
  23. package/dist/entrypoints/react/keyboard/testing.js +127 -0
  24. package/dist/entrypoints/react/keyboard.d.ts +4 -2
  25. package/dist/entrypoints/react/keyboard.d.ts.map +1 -1
  26. package/dist/entrypoints/react/keyboard.js +83 -319
  27. package/dist/entrypoints/react.js +15 -3
  28. package/dist/entrypoints/realtime.js +1 -1
  29. package/dist/entrypoints/remote.js +1 -1
  30. package/dist/entrypoints/server.js +18 -18
  31. package/dist/entrypoints/telegram/grammy.d.ts +2 -0
  32. package/dist/entrypoints/telegram/grammy.d.ts.map +1 -0
  33. package/dist/entrypoints/telegram/grammy.js +50 -0
  34. package/dist/entrypoints/telegram/screens.js +1 -1
  35. package/dist/entrypoints/telegram.d.ts +1 -0
  36. package/dist/entrypoints/telegram.d.ts.map +1 -1
  37. package/dist/entrypoints/telegram.js +254 -8
  38. package/dist/entrypoints/testing.js +3 -3
  39. package/dist/entrypoints/tools/connections.js +10 -10
  40. package/dist/entrypoints/tools.js +19 -19
  41. package/dist/entrypoints/tracking.js +1 -1
  42. package/dist/{index-xvj9h8yh.js → index-61hve0ez.js} +15 -28
  43. package/dist/index-6j725ez5.js +25 -0
  44. package/dist/{index-1csp1hwm.js → index-6p3frkv5.js} +1 -1
  45. package/dist/{index-fy4av0hq.js → index-9bwcthxw.js} +1 -1
  46. package/dist/{index-523tq7y4.js → index-a3462dqf.js} +1 -1
  47. package/dist/{index-506kd458.js → index-aw6zahv1.js} +1 -1
  48. package/dist/{index-tpwbct8j.js → index-dc9ere5p.js} +1 -1
  49. package/dist/{index-erv5shjq.js → index-kdnfe0sr.js} +1 -1
  50. package/dist/{index-k7z3j3hr.js → index-km2qw407.js} +4 -4
  51. package/dist/{index-7fc0c2np.js → index-n3v695sb.js} +1 -1
  52. package/dist/index-p02zgk8x.js +351 -0
  53. package/dist/{index-vtann8bz.js → index-p0rf7sq9.js} +8 -8
  54. package/dist/{index-aykhzcnf.js → index-qj1sy4ep.js} +1 -1
  55. package/dist/{index-cxpcdswt.js → index-t65erk4z.js} +1 -1
  56. package/dist/{index-c5at3ykd.js → index-tsngj2b5.js} +22 -10
  57. package/dist/react/entity-cache.d.ts +24 -2
  58. package/dist/react/entity-cache.d.ts.map +1 -1
  59. package/dist/react/keyboard/hooks.d.ts +41 -10
  60. package/dist/react/keyboard/hooks.d.ts.map +1 -1
  61. package/dist/react/keyboard/layers.d.ts +27 -8
  62. package/dist/react/keyboard/layers.d.ts.map +1 -1
  63. package/dist/react/keyboard/modality.d.ts +21 -0
  64. package/dist/react/keyboard/modality.d.ts.map +1 -0
  65. package/dist/react/keyboard/refs.d.ts +13 -0
  66. package/dist/react/keyboard/refs.d.ts.map +1 -0
  67. package/dist/react/keyboard/testing.d.ts +80 -0
  68. package/dist/react/keyboard/testing.d.ts.map +1 -0
  69. package/dist/react/keyboard/zone.d.ts +60 -10
  70. package/dist/react/keyboard/zone.d.ts.map +1 -1
  71. package/dist/telegram/budget-transformer.d.ts +35 -0
  72. package/dist/telegram/budget-transformer.d.ts.map +1 -0
  73. package/dist/telegram/outbound-budget.d.ts +101 -0
  74. package/dist/telegram/outbound-budget.d.ts.map +1 -0
  75. package/dist/telegram/send-failure.d.ts +6 -1
  76. package/dist/telegram/send-failure.d.ts.map +1 -1
  77. package/llms/react-keyboard-testing.txt +24 -0
  78. package/llms/react-keyboard.txt +264 -4
  79. package/llms/react.txt +1 -1
  80. package/llms/server.3.txt +31 -0
  81. package/llms/server.4.txt +5 -0
  82. package/llms/stitchkit.2.txt +118 -0
  83. package/llms/stitchkit.txt +8 -122
  84. package/llms/telegram-grammy.txt +22 -0
  85. package/llms/telegram.txt +76 -2
  86. package/llms/{upgrading-0.103.13-0.113.0.txt → upgrading-0.104.0-0.114.0.txt} +45 -84
  87. package/llms/upgrading-0.37.0-0.44.0.txt +444 -0
  88. package/llms/{upgrading-0.44.0-0.60.0.txt → upgrading-0.44.0-0.61.0.txt} +140 -271
  89. package/llms/{upgrading-0.61.0-0.74.0.txt → upgrading-0.62.0-0.78.0.txt} +137 -140
  90. package/llms/{upgrading-0.75.0-0.103.0.txt → upgrading-0.79.0-0.103.13.txt} +84 -137
  91. package/llms/upgrading.txt +5 -5
  92. package/llms-full.txt +453 -11
  93. package/llms.txt +12 -10
  94. package/package.json +9 -1
  95. package/llms/upgrading-0.37.0.txt +0 -176
  96. package/dist/{index-616xh7f2.js → index-4qnzda76.js} +0 -0
  97. package/dist/{index-fsw1ybf3.js → index-d9hq291n.js} +3 -3
  98. package/dist/{index-bjcjqj46.js → index-m8a44e64.js} +3 -3
  99. package/dist/{index-5efrpfmj.js → index-qndsr7f0.js} +3 -3
  100. package/dist/{index-zktz242w.js → index-s47ac8zt.js} +3 -3
  101. package/dist/{index-56yx8dxp.js → index-tvtacc9a.js} +3 -3
  102. /package/dist/{index-v1tswj0z.js → index-txg1npmg.js} +0 -0
@@ -0,0 +1,351 @@
1
+ // src/react/keyboard/layers.ts
2
+ var RANK = {
3
+ overlay: 4,
4
+ local: 3,
5
+ route: 2,
6
+ zone: 1,
7
+ global: 0
8
+ };
9
+ var KEY_FIELD_SELECTOR = [
10
+ "input:not([type=button],[type=submit],[type=reset],[type=checkbox],[type=image])",
11
+ "textarea",
12
+ "select",
13
+ "[contenteditable]:not([contenteditable=false])",
14
+ "[role=textbox]",
15
+ "[role=combobox]",
16
+ "[role=slider]",
17
+ "[role=spinbutton]",
18
+ "[data-local-keys]"
19
+ ].join(",");
20
+ function hasClosest(target) {
21
+ return typeof target === "object" && target !== null && "closest" in target && typeof target.closest === "function";
22
+ }
23
+ function closestFromTarget(target, selectors) {
24
+ return hasClosest(target) ? target.closest(selectors) : null;
25
+ }
26
+ function isKeyFieldTarget2(target) {
27
+ const field = closestFromTarget(target, KEY_FIELD_SELECTOR);
28
+ return field !== null && field !== undefined;
29
+ }
30
+ function liveScope(entry) {
31
+ const read = entry.state.scope;
32
+ if (read === undefined)
33
+ return "unscoped";
34
+ const element = read();
35
+ if (element === null || !element.isConnected)
36
+ return null;
37
+ const inert = element.closest("[inert]");
38
+ if (inert !== null && inert !== undefined)
39
+ return null;
40
+ if (element.checkVisibility !== undefined && !element.checkVisibility())
41
+ return null;
42
+ return element;
43
+ }
44
+ function askingOrder(entries) {
45
+ const live = [];
46
+ for (const entry of entries) {
47
+ if (entry.state.active === false)
48
+ continue;
49
+ const scope = liveScope(entry);
50
+ if (scope !== null)
51
+ live.push({ entry, scope, depth: 0 });
52
+ }
53
+ for (const layer of live) {
54
+ const own = layer.scope;
55
+ if (own === "unscoped")
56
+ continue;
57
+ layer.depth = live.filter((other) => other !== layer && other.entry.state.kind === layer.entry.state.kind && other.scope !== "unscoped" && other.scope !== own && other.scope.contains(own)).length;
58
+ }
59
+ return live.sort((left, right) => RANK[right.entry.state.kind] - RANK[left.entry.state.kind] || right.depth - left.depth || right.entry.order - left.entry.order);
60
+ }
61
+ function createKeyLayerStack2(target) {
62
+ const entries = new Set;
63
+ let activations = 0;
64
+ const bubbling = (event) => {
65
+ dispatch(event, "bubble");
66
+ };
67
+ const capturing = (event) => {
68
+ dispatch(event, "capture");
69
+ };
70
+ const attached = { bubble: false, capture: false };
71
+ const phaseOf = (state) => state.phase ?? "bubble";
72
+ function sync() {
73
+ for (const phase of ["bubble", "capture"]) {
74
+ const wanted = [...entries].some((entry) => phaseOf(entry.state) === phase);
75
+ if (wanted === attached[phase])
76
+ continue;
77
+ attached[phase] = wanted;
78
+ const listener = phase === "capture" ? capturing : bubbling;
79
+ if (wanted)
80
+ target.addEventListener("keydown", listener, phase === "capture");
81
+ else
82
+ target.removeEventListener("keydown", listener, phase === "capture");
83
+ }
84
+ }
85
+ function refuseUnlessLocal(state) {
86
+ if (phaseOf(state) === "capture" && state.kind !== "local") {
87
+ throw new Error(`A ${state.kind} layer cannot listen in the capture phase; only a local layer can`);
88
+ }
89
+ }
90
+ function dispatch(event, phase = "bubble") {
91
+ if (event.defaultPrevented || event.isComposing)
92
+ return false;
93
+ const isEscape = event.key === "Escape";
94
+ if (isEscape && event.repeat)
95
+ return false;
96
+ const inField = !isEscape && isKeyFieldTarget2(event.target);
97
+ let behindOverlay = false;
98
+ for (const { entry } of askingOrder(entries)) {
99
+ const { kind } = entry.state;
100
+ if (behindOverlay && kind !== "overlay")
101
+ break;
102
+ if (kind === "overlay")
103
+ behindOverlay = true;
104
+ if (phaseOf(entry.state) !== phase)
105
+ continue;
106
+ if (inField && entry.state.fields !== "include")
107
+ continue;
108
+ if (entry.state.onKey(event)) {
109
+ event.preventDefault();
110
+ if (phase === "capture")
111
+ event.stopPropagation?.();
112
+ return true;
113
+ }
114
+ }
115
+ return false;
116
+ }
117
+ function add(state) {
118
+ refuseUnlessLocal(state);
119
+ const entry = { state, order: ++activations };
120
+ entries.add(entry);
121
+ sync();
122
+ return {
123
+ update(next) {
124
+ refuseUnlessLocal(next);
125
+ const reactivated = entry.state.active === false && next.active !== false;
126
+ const moved = phaseOf(entry.state) !== phaseOf(next);
127
+ entry.state = next;
128
+ if (reactivated)
129
+ entry.order = ++activations;
130
+ if (moved)
131
+ sync();
132
+ },
133
+ remove() {
134
+ if (!entries.delete(entry))
135
+ return;
136
+ sync();
137
+ }
138
+ };
139
+ }
140
+ return { add, dispatch };
141
+ }
142
+
143
+ // src/react/keyboard/zone.ts
144
+ var ZONE_ATTRIBUTE = "data-keyboard-zone";
145
+ function nextZoneIndex2({
146
+ length,
147
+ index,
148
+ move,
149
+ loop
150
+ }) {
151
+ if (length <= 0)
152
+ return move === "previous" || move === "first" ? "before-start" : "after-end";
153
+ if (move === "first")
154
+ return 0;
155
+ if (move === "last")
156
+ return length - 1;
157
+ if (index < 0 || index >= length)
158
+ return move === "next" ? 0 : length - 1;
159
+ const target = move === "next" ? index + 1 : index - 1;
160
+ if (target >= 0 && target < length)
161
+ return target;
162
+ if (loop)
163
+ return target < 0 ? length - 1 : 0;
164
+ return target < 0 ? "before-start" : "after-end";
165
+ }
166
+ function zoneIntent(event, orientation) {
167
+ if (event.altKey || event.ctrlKey || event.metaKey || event.shiftKey)
168
+ return null;
169
+ const vertical = orientation === "vertical";
170
+ switch (event.key) {
171
+ case (vertical ? "ArrowDown" : "ArrowRight"):
172
+ return { type: "move", move: "next" };
173
+ case (vertical ? "ArrowUp" : "ArrowLeft"):
174
+ return { type: "move", move: "previous" };
175
+ case (vertical ? "ArrowRight" : "ArrowDown"):
176
+ return { type: "enter" };
177
+ case (vertical ? "ArrowLeft" : "ArrowUp"):
178
+ return { type: "exit" };
179
+ case "Home":
180
+ return { type: "move", move: "first" };
181
+ case "End":
182
+ return { type: "move", move: "last" };
183
+ case "Enter":
184
+ return { type: "confirm" };
185
+ default:
186
+ return null;
187
+ }
188
+ }
189
+ function resolveZoneIndex(items, value, pointed) {
190
+ if (pointed !== null) {
191
+ const index = items.indexOf(pointed);
192
+ if (index >= 0)
193
+ return index;
194
+ }
195
+ if (value !== null) {
196
+ const index = items.indexOf(value);
197
+ if (index >= 0)
198
+ return index;
199
+ }
200
+ return items.length > 0 ? 0 : -1;
201
+ }
202
+ function isFieldInside(target, zone) {
203
+ const field = closestFromTarget(target, KEY_FIELD_SELECTOR);
204
+ if (field === null || field === undefined || field === zone)
205
+ return false;
206
+ return closestFromTarget(field, `[${ZONE_ATTRIBUTE}]`) === zone;
207
+ }
208
+ function createNavZone2(initial) {
209
+ let options = initial;
210
+ let pointed = null;
211
+ let awaiting = null;
212
+ const elements = new Map;
213
+ const listeners = new Set;
214
+ const point = (id) => {
215
+ if (pointed === id)
216
+ return;
217
+ pointed = id;
218
+ for (const listener of listeners)
219
+ listener();
220
+ };
221
+ const chosenValue = () => options.value ?? null;
222
+ function currentIndex() {
223
+ return resolveZoneIndex(options.items, chosenValue(), pointed);
224
+ }
225
+ function current() {
226
+ return options.items[currentIndex()] ?? null;
227
+ }
228
+ function focusElement(element) {
229
+ element.focus({ preventScroll: true });
230
+ element.scrollIntoView?.({ block: "nearest", inline: "nearest" });
231
+ }
232
+ function focus(id) {
233
+ const target = id ?? current();
234
+ if (target === null)
235
+ return false;
236
+ point(target);
237
+ const element = elements.get(target);
238
+ if (element === undefined) {
239
+ awaiting = target;
240
+ options.onReveal?.(target);
241
+ return true;
242
+ }
243
+ awaiting = null;
244
+ focusElement(element);
245
+ return true;
246
+ }
247
+ const taken = (answer) => answer !== false;
248
+ function choose(id, cause) {
249
+ if (options.mode !== "focus")
250
+ options.onChange(id, cause);
251
+ }
252
+ function apply(intent) {
253
+ const { items, mode = "select", loop = false } = options;
254
+ const index = currentIndex();
255
+ const id = items[index] ?? null;
256
+ switch (intent.type) {
257
+ case "move": {
258
+ const landed = nextZoneIndex2({ length: items.length, index, move: intent.move, loop });
259
+ if (typeof landed !== "number") {
260
+ if (options.onBoundary === undefined)
261
+ return false;
262
+ return taken(options.onBoundary(landed === "before-start" ? "start" : "end"));
263
+ }
264
+ const next = items[landed];
265
+ if (next === undefined)
266
+ return false;
267
+ focus(next);
268
+ if (mode === "select" && next !== chosenValue())
269
+ choose(next, "arrow");
270
+ return true;
271
+ }
272
+ case "enter":
273
+ return id !== null && options.onEnter !== undefined && taken(options.onEnter(id));
274
+ case "exit":
275
+ return options.onExit !== undefined && taken(options.onExit());
276
+ case "confirm":
277
+ if (id === null || mode === "focus")
278
+ return false;
279
+ if (mode === "highlight") {
280
+ choose(id, "confirm");
281
+ return true;
282
+ }
283
+ return options.onEnter !== undefined && taken(options.onEnter(id));
284
+ }
285
+ }
286
+ return {
287
+ update(next) {
288
+ const changed = (next.value ?? null) !== chosenValue();
289
+ options = next;
290
+ if (changed)
291
+ point(null);
292
+ },
293
+ get options() {
294
+ return options;
295
+ },
296
+ pointedItem: () => pointed,
297
+ current,
298
+ keyDown(event, zone) {
299
+ if (event.defaultPrevented || event.isComposing || isFieldInside(event.target, zone)) {
300
+ return false;
301
+ }
302
+ if (closestFromTarget(event.target, `[${ZONE_ATTRIBUTE}]`) !== zone)
303
+ return false;
304
+ const intent = zoneIntent(event, options.orientation ?? "vertical");
305
+ if (intent === null || options.ignore?.(event) === true)
306
+ return false;
307
+ const landsOnCurrent = event.target === zone && intent.type === "move" && (intent.move === "next" || intent.move === "previous");
308
+ if (!(landsOnCurrent ? focus() : apply(intent)))
309
+ return false;
310
+ event.preventDefault();
311
+ return true;
312
+ },
313
+ keyFromOutside(event) {
314
+ if (closestFromTarget(event.target, `[${ZONE_ATTRIBUTE}]`) !== null)
315
+ return false;
316
+ const intent = zoneIntent(event, options.orientation ?? "vertical");
317
+ if (intent?.type !== "move" || intent.move !== "next" && intent.move !== "previous") {
318
+ return false;
319
+ }
320
+ if (options.ignore?.(event) === true)
321
+ return false;
322
+ return options.outside === "move" ? apply(intent) : focus();
323
+ },
324
+ focused(id) {
325
+ if (id !== pointed && !options.items.includes(id))
326
+ return;
327
+ awaiting = null;
328
+ point(id);
329
+ },
330
+ focus,
331
+ setItemElement(id, element) {
332
+ if (element === null) {
333
+ elements.delete(id);
334
+ return;
335
+ }
336
+ elements.set(id, element);
337
+ if (id === awaiting) {
338
+ awaiting = null;
339
+ focusElement(element);
340
+ }
341
+ },
342
+ subscribe(listener) {
343
+ listeners.add(listener);
344
+ return () => {
345
+ listeners.delete(listener);
346
+ };
347
+ }
348
+ };
349
+ }
350
+
351
+ export { KEY_FIELD_SELECTOR, isKeyFieldTarget2, createKeyLayerStack2, ZONE_ATTRIBUTE, nextZoneIndex2, resolveZoneIndex, createNavZone2 };
@@ -27,14 +27,6 @@ import {
27
27
  bindContract,
28
28
  mediaTypeEssence
29
29
  } from "./index-cqmqyjax.js";
30
- import {
31
- readBoundedChunks,
32
- concatChunks,
33
- readBoundedBody2
34
- } from "./index-5efrpfmj.js";
35
- import {
36
- assertPositiveSafeInteger
37
- } from "./index-0s4xebbg.js";
38
30
  import {
39
31
  assertCorsConfig,
40
32
  isOriginAllowed,
@@ -59,6 +51,11 @@ import {
59
51
  getClientInfo2,
60
52
  parseQueryParams
61
53
  } from "./index-kw1ws0cs.js";
54
+ import {
55
+ readBoundedChunks,
56
+ concatChunks,
57
+ readBoundedBody2
58
+ } from "./index-qndsr7f0.js";
62
59
  import {
63
60
  abortReason,
64
61
  untilAborted
@@ -67,6 +64,9 @@ import {
67
64
  isUnsafeKey,
68
65
  safeJsonParse
69
66
  } from "./index-zsarb5xp.js";
67
+ import {
68
+ assertPositiveSafeInteger
69
+ } from "./index-0s4xebbg.js";
70
70
  import {
71
71
  AppError2,
72
72
  badRequest2,
@@ -19,7 +19,7 @@ import {
19
19
  appendEventIn,
20
20
  ArchiveProjectionSchema,
21
21
  createAgentRuntimeStore2
22
- } from "./index-523tq7y4.js";
22
+ } from "./index-a3462dqf.js";
23
23
  import {
24
24
  AgentConversationPageSchema2,
25
25
  AgentConversationMessagePageSchema2
@@ -3,7 +3,7 @@ import {
3
3
  } from "./index-b0kddvzw.js";
4
4
  import {
5
5
  readBoundedChunks
6
- } from "./index-5efrpfmj.js";
6
+ } from "./index-qndsr7f0.js";
7
7
 
8
8
  // src/internal/secure-fetch.ts
9
9
  import { lookup } from "node:dns/promises";
@@ -336,6 +336,8 @@ function escapeRegex(value) {
336
336
  return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
337
337
  }
338
338
  function decodePathSegment(value) {
339
+ if (!value.includes("%"))
340
+ return value;
339
341
  try {
340
342
  return decodeURIComponent(value);
341
343
  } catch {
@@ -356,28 +358,38 @@ function createClientRouteMatcher(endpoint, contractPrefix, config) {
356
358
  const wildcard = patternSegments.at(-1)?.startsWith("*") === true;
357
359
  const fixedCount = wildcard ? patternSegments.length - 1 : patternSegments.length;
358
360
  const markers = Object.values(markerByKey);
361
+ const segmentTests = patternSegments.slice(0, fixedCount).map((pattern) => compileSegmentTest(pattern, markers));
359
362
  return (pathname) => {
360
- const actualSegments = pathname.split("/").filter(Boolean).map(decodePathSegment);
363
+ const actualSegments = pathname.split("/").filter(Boolean);
361
364
  if (wildcard ? actualSegments.length < fixedCount : actualSegments.length !== fixedCount) {
362
365
  return false;
363
366
  }
364
367
  for (let index = 0;index < fixedCount; index += 1) {
365
- const pattern = patternSegments[index];
368
+ const test = segmentTests[index];
366
369
  const actual = actualSegments[index];
367
- if (!pattern || actual === undefined)
370
+ if (test === undefined || actual === undefined)
368
371
  return false;
369
- if (pattern.startsWith(":"))
370
- continue;
371
- let source = escapeRegex(pattern);
372
- for (const marker of markers) {
373
- source = source.replaceAll(escapeRegex(marker), "[^/]+");
374
- }
375
- if (!new RegExp(`^${source}$`).test(actual))
372
+ if (test !== null && !test(decodePathSegment(actual)))
376
373
  return false;
377
374
  }
378
375
  return true;
379
376
  };
380
377
  }
378
+ function compileSegmentTest(pattern, markers) {
379
+ if (pattern.startsWith(":"))
380
+ return null;
381
+ let source = escapeRegex(pattern);
382
+ let marked = false;
383
+ for (const marker of markers) {
384
+ const next = source.replaceAll(escapeRegex(marker), "[^/]+");
385
+ marked ||= next !== source;
386
+ source = next;
387
+ }
388
+ if (!marked)
389
+ return (actual) => actual === pattern;
390
+ const expression = new RegExp(`^${source}$`);
391
+ return (actual) => expression.test(actual);
392
+ }
381
393
  function extractParamNames(path) {
382
394
  const matches = path.match(/:(\w+)/g);
383
395
  const names = matches ? matches.map((match) => match.slice(1)) : [];
@@ -47,7 +47,16 @@ export interface EntityCacheTotalPolicy<TData> {
47
47
  /** What to do when an unseen id makes the delta unknowable. Default `preserve`. */
48
48
  unknown?: 'preserve' | 'invalidate';
49
49
  }
50
- /** List envelope, scoped key and explicit CRUD policies. */
50
+ /**
51
+ * List envelope, scoped key and explicit CRUD policies. It stays an interface,
52
+ * not a union of shapes: a consumer's config is often a value of this type, and
53
+ * a union turns `compare` and `insertCompare` into a discriminated choice the
54
+ * compiler cannot narrow from the fields alone.
55
+ *
56
+ * At most one of `compare` and `insertCompare` is set — a list has one answer to
57
+ * "what order is this?". `createEntityCacheHandlers` refuses both at creation.
58
+ * With neither, a create goes to the `createAt` edge and every other row stays.
59
+ */
51
60
  export interface EntityCacheListConfig<TData, TListItem> {
52
61
  /** Static query-key prefix or an event-aware scoped key factory. */
53
62
  key: EntityCacheKey<TData>;
@@ -55,8 +64,21 @@ export interface EntityCacheListConfig<TData, TListItem> {
55
64
  createAt: 'start' | 'end';
56
65
  /** Explicit behavior when an update's id is absent from every cached page. */
57
66
  updateMissing: 'skip' | 'insert';
58
- /** Backend-equivalent ordering for each affected logical item array. */
67
+ /**
68
+ * Backend-equivalent ordering of each affected logical item array: it is
69
+ * sorted again after every create and update. Only for an order the row
70
+ * itself determines; never together with `insertCompare`.
71
+ */
59
72
  compare?: (left: TListItem, right: TListItem) => number;
73
+ /**
74
+ * Where a row that is *entering* the list goes: before the first row it sorts
75
+ * ahead of, with ties broken by `createAt` (`'start'`: before equal rows,
76
+ * `'end'`: after them). On a list already in this order the result is the one
77
+ * `compare` gives; on a list that is not — an order the server decides with
78
+ * facts the row does not carry — no other row moves, and a row that is already
79
+ * there is replaced in place. Never together with `compare`.
80
+ */
81
+ insertCompare?: (incoming: TListItem, existing: TListItem) => number;
60
82
  /** Cached data envelope; no runtime shape inference is performed. */
61
83
  shape: EntityCacheListShape;
62
84
  /** Optional per-query filter membership. Omit for the envelope-preserving legacy path. */
@@ -1 +1 @@
1
- {"version":3,"file":"entity-cache.d.ts","sourceRoot":"","sources":["../../src/react/entity-cache.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAgB,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAGpE,OAAO,KAAK,EAAsB,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAE7E,qEAAqE;AACrE,MAAM,MAAM,cAAc,CAAC,KAAK,IAAI,KAAK,GAAG;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,CAAC;AAE3D,qEAAqE;AACrE,MAAM,MAAM,gBAAgB,CAAC,KAAK,IAC9B;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,MAAM,EAAE,KAAK,CAAC;IAAC,EAAE,EAAE,MAAM,CAAA;CAAE,GAC9C;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,MAAM,EAAE,KAAK,CAAC;IAAC,EAAE,EAAE,MAAM,CAAA;CAAE,GAC9C;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,OAAO,EAAE,cAAc,CAAC,KAAK,CAAC,CAAC;IAAC,EAAE,EAAE,MAAM,CAAA;CAAE,CAAC;AAEpE,+DAA+D;AAC/D,MAAM,MAAM,cAAc,CAAC,KAAK,IAAI,QAAQ,GAAG,CAAC,CAAC,KAAK,EAAE,gBAAgB,CAAC,KAAK,CAAC,KAAK,QAAQ,CAAC,CAAC;AAE9F,MAAM,MAAM,oBAAoB,GAC5B,OAAO,GACP,WAAW,GACX,gBAAgB,GAChB,oBAAoB,CAAC;AAEzB,MAAM,MAAM,qBAAqB,GAAG,SAAS,G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,EAAE,cAAc,CAAC,KAAK,CAAC,KAAK,MAAM,CAAC;IAC1D,yEAAyE;IACzE,IAAI,EAAE,qBAAqB,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;IAC9C,iFAAiF;IACjF,SAAS,CAAC,EAAE,cAAc,CAAC,KAAK,CAAC,CAAC;CACnC;AAED,0EAA0E;AAC1E,MAAM,WAAW,mBAAmB,CAAC,KAAK;IACxC,OAAO,EAAE,kBAAkB,CAAC,KAAK,CAAC,CAAC;IACnC,OAAO,EAAE,kBAAkB,CAAC,KAAK,CAAC,CAAC;IACnC,OAAO,EAAE,kBAAkB,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC,CAAC;CACpD;AA4QD;;;GAGG;AACH,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,SAAS,GAAG,KAAK,EAChE,MAAM,EAAE,iBAAiB,CAAC,KAAK,EAAE,SAAS,CAAC,GAC1C,mBAAmB,CAAC,KAAK,CAAC,CA4D5B"}
@@ -4,8 +4,15 @@
4
4
  * mounts, so a layer inside a portal is on the same stack as the page.
5
5
  */
6
6
  import { type RefObject } from 'react';
7
- import { type KeyLayerKind } from './layers.js';
8
- import { type NavZoneOptions, type ZoneItemId, type ZoneOrientation } from './zone.js';
7
+ import { type KeyLayerKind, type KeyLayerPhase } from './layers.js';
8
+ import { type ZoneItemId, type ZoneOptions, type ZoneOrientation } from './zone.js';
9
+ /**
10
+ * A layer on the window's key stack. `phase: 'capture'` is for a `local` layer
11
+ * only — any other kind refuses it when it mounts: the layer then hears a key
12
+ * before the element that has focus does, as a menu over a text field must, and
13
+ * a key it takes reaches nothing nearer. Such a layer sets `fields: 'include'`,
14
+ * since the key is pressed in the field.
15
+ */
9
16
  export interface KeyLayerOptions {
10
17
  readonly kind: KeyLayerKind;
11
18
  /** Return `true` when the key was taken: its default is prevented and no layer below hears it. */
@@ -20,6 +27,8 @@ export interface KeyLayerOptions {
20
27
  readonly scope?: RefObject<Element | null>;
21
28
  /** Default `'skip'`: keys pressed in fields and `data-local-keys` areas, except Escape, pass it by. */
22
29
  readonly fields?: 'skip' | 'include';
30
+ /** Default `'bubble'`: after everything nearer. `'capture'`: before it, `local` layers only. */
31
+ readonly phase?: KeyLayerPhase;
23
32
  }
24
33
  /** Put a layer on the window's key stack for as long as the component is mounted. */
25
34
  export declare function useKeyLayer(options: KeyLayerOptions): void;
@@ -32,24 +41,31 @@ export interface EscapeLayerOptions {
32
41
  }
33
42
  /** One Escape closes one level: the first layer that takes it is the only one that hears it. */
34
43
  export declare function useEscapeLayer(options: EscapeLayerOptions): void;
35
- /** Spread on the zone's element. */
44
+ /**
45
+ * Spread on the zone's element. A key that has no value is absent, not
46
+ * `undefined`, so spreading the props after an attribute of your own keeps it.
47
+ */
36
48
  export interface NavZoneProps {
37
49
  readonly ref: (element: HTMLElement | null) => void;
38
- readonly role: 'listbox' | 'tablist' | undefined;
50
+ readonly role?: 'listbox' | 'tablist';
39
51
  readonly 'aria-orientation': ZoneOrientation;
40
- readonly 'aria-label': string | undefined;
52
+ readonly 'aria-label'?: string;
41
53
  readonly 'data-keyboard-zone': '';
42
54
  readonly onKeyDown: (event: {
43
55
  readonly nativeEvent: KeyboardEvent;
44
56
  }) => void;
45
57
  }
46
- /** Spread on each item's element. */
58
+ /**
59
+ * Spread on each item's element. A key that has no value is absent, not
60
+ * `undefined`: a `role` or `aria-selected` the element carries from another
61
+ * library survives the spread.
62
+ */
47
63
  export interface NavZoneItemProps {
48
64
  readonly ref: (element: HTMLElement | null) => void;
49
65
  readonly tabIndex: 0 | -1;
50
- readonly role: 'option' | 'tab' | undefined;
51
- readonly 'aria-selected': boolean | undefined;
52
- readonly 'aria-current': 'true' | undefined;
66
+ readonly role?: 'option' | 'tab';
67
+ readonly 'aria-selected'?: boolean;
68
+ readonly 'aria-current'?: 'true';
53
69
  readonly onFocus: () => void;
54
70
  }
55
71
  export interface NavZone<Id extends ZoneItemId> {
@@ -63,9 +79,24 @@ export interface NavZone<Id extends ZoneItemId> {
63
79
  /** Put focus on `id`, or on the current item — to move into this zone from another. */
64
80
  focus(id?: Id): boolean;
65
81
  }
82
+ /**
83
+ * Ref callbacks for the items of a zone, one per id, created once and dropped
84
+ * when their element goes. A list whose ids change over time — a conversation
85
+ * list that loads more, a table that pages — would otherwise keep a callback for
86
+ * every id it ever showed.
87
+ */
88
+ export declare function createItemRefs<Id extends ZoneItemId>(set: (id: Id, node: HTMLElement | null) => void): {
89
+ get(id: Id): (node: HTMLElement | null) => void;
90
+ readonly size: number;
91
+ };
66
92
  /**
67
93
  * A list the arrows move through with real focus. See `zone.ts` for the
68
94
  * modes, the cross axis and what happens past an end.
95
+ *
96
+ * Rendering never changes the zone: the options of a render are adopted when it
97
+ * commits, and the tab stop of a render is worked out from that render's own
98
+ * options. A render React starts and throws away — a suspended transition, an
99
+ * interrupted update — leaves the zone as the last committed render left it.
69
100
  */
70
- export declare function useNavZone<Id extends ZoneItemId>(options: NavZoneOptions<Id>): NavZone<Id>;
101
+ export declare function useNavZone<Id extends ZoneItemId>(options: ZoneOptions<Id>): NavZone<Id>;
71
102
  //# sourceMappingURL=hooks.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../../src/react/keyboard/hooks.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,KAAK,SAAS,EAAqD,MAAM,OAAO,CAAC;AAC1F,OAAO,EAGL,KAAK,YAAY,EAGlB,MAAM,UAAU,CAAC;AAClB,OAAO,EAEL,KAAK,cAAc,EAEnB,KAAK,UAAU,EACf,KAAK,eAAe,EACrB,MAAM,QAAQ,CAAC;AAchB,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAC;IAC5B,kGAAkG;IAClG,KAAK,CAAC,KAAK,EAAE,aAAa,GAAG,OAAO,CAAC;IACrC,yEAAyE;IACzE,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC;IAC1B;;;;OAIG;IACH,QA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