@abide/abide 0.118.0 → 0.119.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.
Files changed (149) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/bin/abide.ts +74 -11
  3. package/docs/REGISTRY.md +2 -1
  4. package/docs/RULEBOOK.md +22 -0
  5. package/docs/abide.md +338 -118
  6. package/package.json +1 -1
  7. package/scaffold/src/getGreeting.test.ts +1 -0
  8. package/scaffold/src/index.abide +4 -1
  9. package/scaffold/src/index.test.ts +2 -0
  10. package/scaffold/src/layout.abide +6 -6
  11. package/src/compiler/Lowering.ts +20 -2
  12. package/src/compiler/PositionTable.ts +1 -0
  13. package/src/compiler/Refusals.ts +1 -0
  14. package/src/compiler/TypeSession.ts +11 -8
  15. package/src/compiler/aliasedSymbol.ts +1 -1
  16. package/src/compiler/ambientReadsIn.ts +1 -0
  17. package/src/compiler/appLayout.ts +4 -2
  18. package/src/compiler/argsDefaultsIn.ts +1 -0
  19. package/src/compiler/argsSchemaOf.ts +1 -0
  20. package/src/compiler/checkApp.ts +3 -1
  21. package/src/compiler/checkedShadow.ts +2 -1
  22. package/src/compiler/classifyRead.ts +1 -0
  23. package/src/compiler/classifyTemplate.ts +1 -0
  24. package/src/compiler/compileApp.ts +4 -2
  25. package/src/compiler/compiledEntry.ts +1 -0
  26. package/src/compiler/componentGraph.ts +1 -0
  27. package/src/compiler/declaredExports.ts +4 -2
  28. package/src/compiler/emitClient.ts +19 -14
  29. package/src/compiler/emitComponent.ts +1 -0
  30. package/src/compiler/emitSource.ts +2 -1
  31. package/src/compiler/formatAbide.ts +857 -0
  32. package/src/compiler/formatDiagnosis.ts +1 -0
  33. package/src/compiler/handlersUnder.ts +2 -1
  34. package/src/compiler/hookCalls.ts +1 -0
  35. package/src/compiler/lineOf.ts +17 -0
  36. package/src/compiler/matchersOf.ts +13 -3
  37. package/src/compiler/mountsOf.ts +2 -0
  38. package/src/compiler/paramFile.ts +1 -0
  39. package/src/compiler/parseAbide.ts +48 -28
  40. package/src/compiler/projectShadow.ts +10 -3
  41. package/src/compiler/reactiveOptions.ts +1 -0
  42. package/src/compiler/reactiveTypes.ts +2 -1
  43. package/src/compiler/readsIn.ts +3 -2
  44. package/src/compiler/renderMarkup.ts +3 -2
  45. package/src/compiler/resolverIn.ts +2 -0
  46. package/src/compiler/sameTemplate.ts +150 -0
  47. package/src/compiler/scaffold.ts +4 -11
  48. package/src/compiler/serveLanguage.ts +46 -19
  49. package/src/compiler/sharedModuleWrites.ts +2 -1
  50. package/src/compiler/sourceMapOf.ts +1 -0
  51. package/src/compiler/splitImports.ts +2 -0
  52. package/src/compiler/templateWarnings.ts +2 -2
  53. package/src/compiler/trackingWarnings.ts +1 -0
  54. package/src/compiler/writeDefaultProject.ts +5 -1
  55. package/src/server/BRIDGE_VERSION.ts +1 -1
  56. package/src/server/abideModules.ts +2 -0
  57. package/src/server/answerFailure.ts +1 -0
  58. package/src/server/answerRequest.ts +15 -14
  59. package/src/server/answerRpc.ts +3 -2
  60. package/src/server/answerSocket.ts +2 -1
  61. package/src/server/answerValue.ts +1 -0
  62. package/src/server/answerWorker.ts +1 -0
  63. package/src/server/appTree.ts +3 -1
  64. package/src/server/argsFor.ts +1 -0
  65. package/src/server/assistant.ts +2 -1
  66. package/src/server/banner.ts +2 -0
  67. package/src/server/bridgeRelay.ts +1 -0
  68. package/src/server/callerOf.ts +1 -0
  69. package/src/server/claudeApi.ts +1 -0
  70. package/src/server/claudeCode.ts +1 -0
  71. package/src/server/clientBundle.ts +1 -0
  72. package/src/server/coerceArgs.ts +1 -2
  73. package/src/server/commands.ts +9 -0
  74. package/src/server/compressAnswer.ts +2 -1
  75. package/src/server/config.ts +2 -0
  76. package/src/server/createApp.ts +4 -2
  77. package/src/server/crossingOrigin.ts +1 -0
  78. package/src/server/csp.ts +1 -0
  79. package/src/server/deferredBuilds.ts +1 -0
  80. package/src/server/derivedArgs.ts +1 -0
  81. package/src/server/devWorker.ts +2 -1
  82. package/src/server/faceOf.ts +2 -7
  83. package/src/server/generatedSurfaces.ts +5 -1
  84. package/src/server/hooks.ts +1 -0
  85. package/src/server/iconAccent.ts +1 -1
  86. package/src/server/installServer.ts +1 -0
  87. package/src/server/installSourceMaps.ts +1 -0
  88. package/src/server/launcherPage.ts +2 -2
  89. package/src/server/manifestOf.ts +1 -0
  90. package/src/server/muxUpgrade.ts +1 -0
  91. package/src/server/nativeMenu.ts +2 -0
  92. package/src/server/principal.ts +2 -1
  93. package/src/server/remote.ts +1 -0
  94. package/src/server/render.ts +3 -3
  95. package/src/server/renderComponent.ts +1 -0
  96. package/src/server/reportHealth.ts +1 -0
  97. package/src/server/requestScope.ts +3 -1
  98. package/src/server/runDesktop.ts +3 -2
  99. package/src/server/seedBuffer.ts +1 -0
  100. package/src/server/serveDev.ts +3 -2
  101. package/src/server/shell.ts +2 -0
  102. package/src/server/streamEvent.ts +1 -0
  103. package/src/server/surfaceOf.ts +1 -0
  104. package/src/server/testBuild.ts +1 -0
  105. package/src/server/testMount.ts +1 -0
  106. package/src/server/trace.ts +2 -0
  107. package/src/server/withAbideSources.ts +1 -0
  108. package/src/shared/Attributes.ts +12 -8
  109. package/src/shared/cookies.ts +1 -1
  110. package/src/shared/escapeText.ts +1 -1
  111. package/src/shared/index.ts +1 -5
  112. package/src/shared/jsonSchema.ts +1 -3
  113. package/src/shared/menuBridge.ts +1 -2
  114. package/src/shared/outbox.ts +1 -1
  115. package/src/shared/reactive/Keyed.ts +2 -2
  116. package/src/shared/reactive/Reactive.ts +12 -16
  117. package/src/shared/reactive/index.ts +3 -4
  118. package/src/shared/reactive/isReactive.ts +1 -1
  119. package/src/shared/reactive/scoped.ts +2 -2
  120. package/src/shared/reactive/share.ts +1 -1
  121. package/src/shared/reactive/watch.ts +4 -4
  122. package/src/shared/refuse.ts +1 -1
  123. package/src/shared/rpc.ts +8 -11
  124. package/src/shared/url.ts +1 -1
  125. package/src/shared/validateJson.ts +1 -1
  126. package/src/ui/ArmRegion.ts +1 -0
  127. package/src/ui/Level.ts +1 -0
  128. package/src/ui/List.ts +1 -0
  129. package/src/ui/RawRun.ts +1 -0
  130. package/src/ui/Router.ts +1 -0
  131. package/src/ui/TryRegion.ts +1 -0
  132. package/src/ui/adoptWalk.ts +2 -1
  133. package/src/ui/bindElement.ts +1 -0
  134. package/src/ui/bindFiles.ts +1 -0
  135. package/src/ui/bindGroup.ts +1 -0
  136. package/src/ui/bindProperty.ts +1 -0
  137. package/src/ui/bindSpread.ts +1 -0
  138. package/src/ui/index.ts +1 -6
  139. package/src/ui/outboxQueue.ts +1 -1
  140. package/src/ui/parseMarkup.ts +2 -1
  141. package/src/ui/reconcile.ts +2 -1
  142. package/src/ui/reconcileHead.ts +1 -0
  143. package/src/ui/regions.ts +2 -1
  144. package/src/ui/registerWorker.ts +1 -0
  145. package/src/ui/rows.ts +1 -0
  146. package/src/ui/setMarkup.ts +1 -0
  147. package/src/ui/setText.ts +1 -0
  148. package/src/ui/socketWire.ts +4 -3
  149. package/src/ui/wire.ts +2 -1
@@ -22,15 +22,15 @@ import {
22
22
  detach,
23
23
  newSubscriber,
24
24
  type Subscriber,
25
- TRACKING,
26
25
  type Tracked,
26
+ TRACKING,
27
27
  truncate,
28
28
  truncateProbes,
29
29
  untracked,
30
30
  } from './tracking.ts'
31
31
 
32
32
  export type Disposer = () => void
33
- // biome-ignore lint/suspicious/noConfusingVoidType: `void` is an EFFECT'S RETURN POSITION and is load-bearing. `undefined` there refuses the ordinary effect — a block body that returns nothing infers `void`, which is not assignable to `undefined` — so the rule's own fix would reject every caller that does not return a disposer.
33
+ // `void` is an EFFECT'S RETURN POSITION and is load-bearing. `undefined` there refuses the ordinary effect — a block body that returns nothing infers `void`, which is not assignable to `undefined` — so every caller that does not return a disposer would be rejected.
34
34
  export type Effect = () => void | Disposer
35
35
 
36
36
  const WATCH_LOG = namedLogger('abide:watch')
@@ -186,7 +186,7 @@ export function watchOver(
186
186
  adopter: Tracked | null,
187
187
  effect: Effect,
188
188
  ): Disposer {
189
- // biome-ignore lint/suspicious/noConfusingVoidType: `void` is an EFFECT'S RETURN POSITION and is load-bearing. `undefined` there refuses the ordinary effect — a block body that returns nothing infers `void`, which is not assignable to `undefined` — so the rule's own fix would reject every caller that does not return a disposer.
189
+ // `void`, not `undefined`: see `Effect`.
190
190
  let dispose: Disposer | void
191
191
  // The sources are declared rather than tracked. `detach` still tears this down: it truncates
192
192
  // from the cursor, and the cursor of a body that never tracked is zero.
@@ -259,7 +259,7 @@ export function watchOver(
259
259
  * adoption mirror's too. Two literals keep that call site to the effects a template makes.
260
260
  */
261
261
  export function watchTracked(effect: Effect): Disposer {
262
- // biome-ignore lint/suspicious/noConfusingVoidType: `void` is an EFFECT'S RETURN POSITION and is load-bearing. `undefined` there refuses the ordinary effect — a block body that returns nothing infers `void`, which is not assignable to `undefined` — so the rule's own fix would reject every caller that does not return a disposer.
262
+ // `void`, not `undefined`: see `Effect`.
263
263
  let dispose: Disposer | void
264
264
  const reader: Subscriber = newSubscriber([], null)
265
265
  // 11.32 — A RERUN READS THROUGH THE SCOPE THE WATCH WAS OPENED IN, not the ambient one. The
@@ -8,8 +8,8 @@
8
8
  // cannot narrow against a name it never wrote. `Aborted` is the one the app asks for itself: it
9
9
  // comes back only from a call the app handed a signal and then aborted (16.49).
10
10
 
11
- import { FAILURE_STATUS_TEXT } from './FAILURE_STATUS_TEXT.ts'
12
11
  import { type Failed, failed, isFailed } from './Failed.ts'
12
+ import { FAILURE_STATUS_TEXT } from './FAILURE_STATUS_TEXT.ts'
13
13
  import type { Issues } from './Issues.ts'
14
14
  import type { JsonValue } from './JsonValue.ts'
15
15
  import { namedLogger } from './log.ts'
package/src/shared/rpc.ts CHANGED
@@ -17,12 +17,11 @@ import { DERIVED_ARGS } from './DERIVED_ARGS.ts'
17
17
  import { type Failed, isFailedNamed } from './Failed.ts'
18
18
  import { GLOBAL_GETS } from './GLOBAL_GETS.ts'
19
19
  import { HandlerRoute } from './HandlerRoute.ts'
20
- import type { Issues } from './Issues.ts'
21
20
  import { IN_PROCESS_ORIGIN } from './IN_PROCESS_ORIGIN.ts'
21
+ import type { Issues } from './Issues.ts'
22
22
  import { compose, type Middleware } from './Middleware.ts'
23
23
  import { outbox, type QueuedCall, sendingFor } from './outbox.ts'
24
24
  import { principalRotated } from './principalRotated.ts'
25
- import { RPC_SERVER } from './RPC_SERVER.ts'
26
25
  import {
27
26
  contractOf,
28
27
  type Gated,
@@ -42,18 +41,19 @@ import {
42
41
  type Keyed,
43
42
  type OptionalParameter,
44
43
  type Reactive,
45
- type Refusals,
46
44
  reactive,
45
+ type Refusals,
47
46
  type Shaping,
48
47
  STREAMING,
49
- type Streams,
50
48
  streamingOrSettled,
49
+ type Streams,
51
50
  } from './reactive/index.ts'
52
51
  import { MUTATION } from './reactive/MUTATION.ts'
53
52
  import { dropAnswered } from './reactive/Reactive.ts'
54
- import { SELECTION_MEMBERS } from './reactive/SELECTION_MEMBERS.ts'
55
53
  import { builtHere, isForwarder } from './reactive/scoped.ts'
54
+ import { SELECTION_MEMBERS } from './reactive/SELECTION_MEMBERS.ts'
56
55
  import { checkArgs, validationError } from './refuse.ts'
56
+ import { RPC_SERVER } from './RPC_SERVER.ts'
57
57
  import { rpcRequest } from './rpcRequest.ts'
58
58
  import type { Schema } from './Schema.ts'
59
59
 
@@ -150,8 +150,7 @@ type Annotated<Args> = 0 extends 1 & Args
150
150
  : Derived<Exclude<Args, undefined>>
151
151
  // `Member` is distributed over and `Whole` is not: a member that is not the whole is one arm of a union.
152
152
  type Derived<Member, Whole = Member> = Member extends
153
- | readonly unknown[]
154
- | ((...given: never[]) => unknown)
153
+ readonly unknown[] | ((...given: never[]) => unknown)
155
154
  ? never
156
155
  : Member extends object
157
156
  ? [Whole] extends [Member]
@@ -215,8 +214,7 @@ export type Plain = { invalidate?: never }
215
214
  // every function arm, whose `& Plain` only passes assignability. The guard is the whole parameter
216
215
  // because `& Plain` kept `GET(0)` the literal `0`, and a bound of `Plain` refuses every primitive.
217
216
  type Held<Accepted> = Accepted extends
218
- | ((...given: never[]) => unknown)
219
- | { invalidate: unknown }
217
+ ((...given: never[]) => unknown) | { invalidate: unknown }
220
218
  ? never
221
219
  : Accepted | PromiseLike<Accepted>
222
220
 
@@ -262,8 +260,7 @@ type Declare = {
262
260
  >
263
261
  <Chunk, Shaped = Chunk[], Gate = Schema<Chunk[]>>(
264
262
  handler: (() =>
265
- | AsyncGenerator<Chunk>
266
- | Promise<AsyncGenerator<Chunk>>) &
263
+ AsyncGenerator<Chunk> | Promise<AsyncGenerator<Chunk>>) &
267
264
  Plain,
268
265
  options?: Shaping<Chunk[], Shaped, never, Gate> & RpcOptions<undefined>,
269
266
  ): Rpc<Kept<Shaped>, undefined, Refusals<Shaped, Gate, Chunk[]>, Chunk>
package/src/shared/url.ts CHANGED
@@ -77,7 +77,7 @@ type Narrowed<P extends string> = P extends keyof Routes
77
77
  * 30.26 — the route literals an app files its pages under, which `abide check` declares for the app
78
78
  * it checks. Where nothing declared them any literal is taken, so a plain `tsc` still compiles.
79
79
  */
80
- // biome-ignore lint/suspicious/noEmptyInterface: filled by declaration merging, per app — each literal to `true`, or to the params it narrows (23.9)
80
+ // Filled by declaration merging, per app — each literal to `true`, or to the params it narrows (23.9)
81
81
  export interface Routes {}
82
82
 
83
83
  /** 30.26 — what `url` takes: one of the app's route literals, or any where none were declared. */
@@ -13,8 +13,8 @@
13
13
  // `description`, `default` and the rest say nothing about whether a value is valid, and a
14
14
  // generated document carries them.
15
15
 
16
- import type { Issues } from './Issues.ts'
17
16
  import { isRecord } from './isRecord.ts'
17
+ import type { Issues } from './Issues.ts'
18
18
  import { issuesOf } from './issuesOf.ts'
19
19
  import type { JsonValue } from './JsonValue.ts'
20
20
  import { note } from './note.ts'
@@ -11,6 +11,7 @@ import {
11
11
  type ShareScope,
12
12
  } from '#shared/reactive/share.ts'
13
13
  import { untracked } from '#shared/reactive/tracking.ts'
14
+
14
15
  import { HYDRATE_LOG } from './Mismatch.ts'
15
16
  import { fillRegion, isEmptyRegion, type Region } from './regions.ts'
16
17
  import { Scope, type Stoppable } from './Scope.ts'
package/src/ui/Level.ts CHANGED
@@ -6,6 +6,7 @@ import {
6
6
  } from '#shared/reactive/share.ts'
7
7
  import { untracked } from '#shared/reactive/tracking.ts'
8
8
  import { type Disposer, watchTracked } from '#shared/reactive/watch.ts'
9
+
9
10
  import { reconciled, reconcileHead } from './reconcileHead.ts'
10
11
  import { isEmptyRegion, type Region } from './regions.ts'
11
12
  import type { Scope } from './Scope.ts'
package/src/ui/List.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import { listOf } from '#shared/listOf.ts'
2
2
  import { untracked } from '#shared/reactive/tracking.ts'
3
+
3
4
  import { HYDRATE_LOG, Mismatch, warnMismatch } from './Mismatch.ts'
4
5
  import { reconcile } from './reconcile.ts'
5
6
  import { isEmptyRegion, type Region, removeUntil } from './regions.ts'
package/src/ui/RawRun.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import { RAW_CLOSE, RAW_OPEN } from '#shared/ANCHORS.ts'
2
+
2
3
  import { Mismatch } from './Mismatch.ts'
3
4
  import { parseMarkup } from './parseMarkup.ts'
4
5
  import { removeUntil } from './regions.ts'
package/src/ui/Router.ts CHANGED
@@ -11,6 +11,7 @@ import { arrive, route } from '#shared/route.ts'
11
11
  import { rankRoutes, type Segment } from '#shared/routePattern.ts'
12
12
  import { setUpLevels } from '#shared/setUpLevels.ts'
13
13
  import { paintedCallsLanded } from '#shared/takeEarlyCall.ts'
14
+
14
15
  import { LAYER_MOUNT, LAYER_NAVIGATE } from './LAYER_NAMES.ts'
15
16
  import { Level } from './Level.ts'
16
17
  import { beginLayer, endLayer } from './measureLayer.ts'
@@ -16,6 +16,7 @@ import { type Reactive, reactive } from '#shared/reactive/index.ts'
16
16
  import { NotLanded } from '#shared/reactive/NotLanded.ts'
17
17
  import { untracked } from '#shared/reactive/tracking.ts'
18
18
  import { type Disposer, watchTracked } from '#shared/reactive/watch.ts'
19
+
19
20
  import { type Arm, type ArmMakers, ArmRegion } from './ArmRegion.ts'
20
21
  import { Mismatch } from './Mismatch.ts'
21
22
  import {
@@ -1,6 +1,7 @@
1
1
  import { RAW_CLOSE, RAW_OPEN } from '#shared/ANCHORS.ts'
2
+
2
3
  import { Mismatch } from './Mismatch.ts'
3
- import { type RawRun, rawCloseOf, rawRunEndingAt } from './RawRun.ts'
4
+ import { rawCloseOf, type RawRun, rawRunEndingAt } from './RawRun.ts'
4
5
  import { closeOf, opensRegion, type Region } from './regions.ts'
5
6
 
6
7
  // WHERE A NODE IS WHEN THE SERVER ALREADY WROTE IT — the adopt half of every region's mount: the
@@ -1,6 +1,7 @@
1
1
  import { isReactive } from '#shared/reactive/isReactive.ts'
2
2
  import { isThenable } from '#shared/reactive/isThenable.ts'
3
3
  import type { Disposer } from '#shared/reactive/watch.ts'
4
+
4
5
  import { holdWhileLeaving } from './leave.ts'
5
6
 
6
7
  /**
@@ -1,4 +1,5 @@
1
1
  import { boundValue, writeBound } from '#shared/boundValue.ts'
2
+
2
3
  import type { Scope } from './Scope.ts'
3
4
 
4
5
  /**
@@ -4,6 +4,7 @@ import {
4
4
  heldValue,
5
5
  writeBound,
6
6
  } from '#shared/boundValue.ts'
7
+
7
8
  import type { Scope } from './Scope.ts'
8
9
 
9
10
  /**
@@ -13,6 +13,7 @@ import {
13
13
  writeBound,
14
14
  } from '#shared/boundValue.ts'
15
15
  import { numberFromText } from '#shared/numberFromText.ts'
16
+
16
17
  import type { Scope } from './Scope.ts'
17
18
 
18
19
  type Bound = HTMLInputElement & HTMLDetailsElement
@@ -3,6 +3,7 @@
3
3
  // function becomes the element's listener, replaced when the value hands over another.
4
4
 
5
5
  import { spreadEntries } from '#shared/spread.ts'
6
+
6
7
  import type { Scope } from './Scope.ts'
7
8
  import { addAttribute } from './setAttribute.ts'
8
9
 
package/src/ui/index.ts CHANGED
@@ -50,12 +50,7 @@ export { contributeHead } from './Level.ts'
50
50
  export { listAt, updateList } from './List.ts'
51
51
  export { warnMismatch } from './Mismatch.ts'
52
52
  export { markupNodes, namespaceUnder } from './parseMarkup.ts'
53
- export {
54
- fillEmpty,
55
- fillRegion,
56
- isEmptyRegion,
57
- type Region,
58
- } from './regions.ts'
53
+ export { fillEmpty, fillRegion, isEmptyRegion, type Region } from './regions.ts'
59
54
  export { rowKeyOf } from './rowKeyOf.ts'
60
55
  export { itemOf, noUpdate, replaceRow, rowCell } from './rows.ts'
61
56
  export { EMPTY_SCOPE, Scope } from './Scope.ts'
@@ -17,7 +17,7 @@ import {
17
17
  } from '#shared/answerOf.ts'
18
18
  import { failedFrom, isFailed, problemOf } from '#shared/Failed.ts'
19
19
  import type { Problem } from '#shared/Failed.ts'
20
- import { type ShownCall, showLine, showSending } from '#shared/outbox.ts'
20
+ import { showLine, type ShownCall, showSending } from '#shared/outbox.ts'
21
21
  import { onPrincipalRotated } from '#shared/principalRotated.ts'
22
22
  import {
23
23
  isReactive,
@@ -50,7 +50,8 @@ export function parseMarkup(parent: Node, markup: string): DocumentFragment {
50
50
  TEMPLATES.set(document, template)
51
51
  }
52
52
  const space = namespaceUnder(parent)
53
- const wrapper = space === HTML_NAMESPACE ? undefined : space === SVG ? 'svg' : 'math'
53
+ const wrapper =
54
+ space === HTML_NAMESPACE ? undefined : space === SVG ? 'svg' : 'math'
54
55
  if (wrapper === undefined) {
55
56
  template.innerHTML = markup
56
57
  return template.content
@@ -1,8 +1,9 @@
1
1
  import { PATCHES } from '#shared/reactive/PATCHES.ts'
2
+
2
3
  import { LAYER_RECONCILE } from './LAYER_NAMES.ts'
3
4
  import type { List } from './List.ts'
4
- import { HYDRATE_LOG } from './Mismatch.ts'
5
5
  import { beginLayer, endLayer } from './measureLayer.ts'
6
+ import { HYDRATE_LOG } from './Mismatch.ts'
6
7
  import { emptyRegion } from './regions.ts'
7
8
  import { dropRow, makeRow, moveRow, type Row, updateRow } from './rows.ts'
8
9
 
@@ -13,6 +13,7 @@
13
13
  // server painted is ADOPTED the first time its contributor is reconciled, matched in chain order.
14
14
 
15
15
  import { headKeyOf } from '#shared/headKeyOf.ts'
16
+
16
17
  import { markupNodes } from './parseMarkup.ts'
17
18
 
18
19
  /** One contributor's head, parsed once per text it reads. */
package/src/ui/regions.ts CHANGED
@@ -1,8 +1,9 @@
1
1
  import { REGION_CLOSE, REGION_OPEN } from '#shared/ANCHORS.ts'
2
+
2
3
  import { LAYER_FILL } from './LAYER_NAMES.ts'
3
4
  import { anyLeaving, leave } from './leave.ts'
4
- import { Mismatch } from './Mismatch.ts'
5
5
  import { beginLayer, endLayer } from './measureLayer.ts'
6
+ import { Mismatch } from './Mismatch.ts'
6
7
 
7
8
  export type Region = { open: Comment; close: Comment }
8
9
 
@@ -5,6 +5,7 @@ import { WORKER_ADDRESS } from '#shared/ADDRESSES.ts'
5
5
  import { MOUNT, mounted } from '#shared/mount.ts'
6
6
  import { OFFLINE_META } from '#shared/OFFLINE_META.ts'
7
7
  import { onPrincipalRotated } from '#shared/principalRotated.ts'
8
+
8
9
  import { HYDRATE_LOG } from './Mismatch.ts'
9
10
 
10
11
  /** Registers the app's service worker once the page has loaded, over the mount's whole scope. */
package/src/ui/rows.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  import { REGION_CLOSE, ROW_OPEN } from '#shared/ANCHORS.ts'
2
2
  import { moveItem, rowItem } from '#shared/reactive/index.ts'
3
3
  import { PATCHES } from '#shared/reactive/PATCHES.ts'
4
+
4
5
  import { leave } from './leave.ts'
5
6
  import { moveNode } from './moveNode.ts'
6
7
  import { closeOf, opensRegion, type Region, removeUntil } from './regions.ts'
@@ -1,4 +1,5 @@
1
1
  import { WORK } from '#shared/WORK.ts'
2
+
2
3
  import { RawRun, refillRun, textToMarkup } from './RawRun.ts'
3
4
 
4
5
  /**
package/src/ui/setText.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import { WORK } from '#shared/WORK.ts'
2
+
2
3
  import { markupToText, RawRun } from './RawRun.ts'
3
4
 
4
5
  /**
@@ -3,7 +3,10 @@
3
3
  // where the version it holds is not the server's, and the writes of each patch over it (18.6, 18.11).
4
4
 
5
5
  import { SOCKET_ADDRESS } from '#shared/ADDRESSES.ts'
6
+ import { applyPatch } from '#shared/applyPatch.ts'
6
7
  import { mounted } from '#shared/mount.ts'
8
+ import type { BrowserFrame, ServerFrame } from '#shared/muxFrames.ts'
9
+ import { onPrincipalRotated } from '#shared/principalRotated.ts'
7
10
  import { canonicalKey } from '#shared/reactive/canonicalKey.ts'
8
11
  import {
9
12
  heldGenerationOf,
@@ -14,9 +17,7 @@ import {
14
17
  writtenLocally,
15
18
  } from '#shared/reactive/index.ts'
16
19
  import { PATCHES } from '#shared/reactive/PATCHES.ts'
17
- import type { BrowserFrame, ServerFrame } from '#shared/muxFrames.ts'
18
- import { applyPatch } from '#shared/applyPatch.ts'
19
- import { onPrincipalRotated } from '#shared/principalRotated.ts'
20
+
20
21
  import { HYDRATE_LOG } from './Mismatch.ts'
21
22
  import { undelivered, whenDelivered } from './outboxQueue.ts'
22
23
 
package/src/ui/wire.ts CHANGED
@@ -33,11 +33,12 @@ import { LOAD_OFFLINE } from '#shared/LOAD_OFFLINE.ts'
33
33
  import { LOAD_SIGNAL } from '#shared/LOAD_SIGNAL.ts'
34
34
  import { reactive, standIn, structural } from '#shared/reactive/index.ts'
35
35
  import {
36
- type Defaults,
37
36
  declareDefaults,
37
+ type Defaults,
38
38
  } from '#shared/reactive/parameterDefaults.ts'
39
39
  import { declare, type Method } from '#shared/rpc.ts'
40
40
  import { type RpcRequest, rpcRequest } from '#shared/rpcRequest.ts'
41
+
41
42
  import { enqueue, undelivered } from './outboxQueue.ts'
42
43
  import { followRpc } from './socketWire.ts'
43
44