@abide/abide 0.117.2 → 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 (156) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/bin/abide.ts +74 -11
  3. package/docs/REGISTRY.md +18 -15
  4. package/docs/RULEBOOK.md +71 -10
  5. package/docs/abide.md +584 -274
  6. package/package.json +1 -1
  7. package/scaffold/AGENTS.md +1 -1
  8. package/scaffold/src/getGreeting.test.ts +2 -1
  9. package/scaffold/src/index.abide +5 -2
  10. package/scaffold/src/index.test.ts +2 -0
  11. package/scaffold/src/layout.abide +6 -6
  12. package/src/compiler/Lowering.ts +20 -2
  13. package/src/compiler/PositionTable.ts +1 -0
  14. package/src/compiler/Refusals.ts +1 -0
  15. package/src/compiler/TypeSession.ts +49 -13
  16. package/src/compiler/aliasedSymbol.ts +1 -1
  17. package/src/compiler/ambientReadsIn.ts +1 -0
  18. package/src/compiler/appLayout.ts +55 -3
  19. package/src/compiler/appMap.ts +15 -0
  20. package/src/compiler/argsDefaultsIn.ts +1 -0
  21. package/src/compiler/argsSchemaOf.ts +1 -0
  22. package/src/compiler/checkApp.ts +3 -1
  23. package/src/compiler/checkedShadow.ts +2 -1
  24. package/src/compiler/classifyRead.ts +1 -0
  25. package/src/compiler/classifyTemplate.ts +1 -0
  26. package/src/compiler/compileApp.ts +5 -3
  27. package/src/compiler/compiledEntry.ts +2 -1
  28. package/src/compiler/componentGraph.ts +1 -0
  29. package/src/compiler/declaredExports.ts +4 -2
  30. package/src/compiler/emitClient.ts +19 -14
  31. package/src/compiler/emitComponent.ts +1 -0
  32. package/src/compiler/emitSource.ts +2 -1
  33. package/src/compiler/formatAbide.ts +857 -0
  34. package/src/compiler/formatDiagnosis.ts +1 -0
  35. package/src/compiler/handlersUnder.ts +7 -3
  36. package/src/compiler/hookCalls.ts +1 -0
  37. package/src/compiler/lineOf.ts +17 -0
  38. package/src/compiler/matchersOf.ts +157 -0
  39. package/src/compiler/mountsOf.ts +5 -0
  40. package/src/compiler/paramFile.ts +125 -0
  41. package/src/compiler/parseAbide.ts +48 -28
  42. package/src/compiler/projectShadow.ts +11 -4
  43. package/src/compiler/reactiveOptions.ts +1 -0
  44. package/src/compiler/reactiveTypes.ts +2 -1
  45. package/src/compiler/readsIn.ts +3 -2
  46. package/src/compiler/renderMarkup.ts +3 -2
  47. package/src/compiler/resolverIn.ts +2 -0
  48. package/src/compiler/sameTemplate.ts +150 -0
  49. package/src/compiler/scaffold.ts +4 -11
  50. package/src/compiler/serveLanguage.ts +48 -21
  51. package/src/compiler/sharedModuleWrites.ts +2 -1
  52. package/src/compiler/sourceMapOf.ts +1 -0
  53. package/src/compiler/splitImports.ts +2 -0
  54. package/src/compiler/templateWarnings.ts +2 -2
  55. package/src/compiler/trackingWarnings.ts +1 -0
  56. package/src/compiler/writeDefaultProject.ts +5 -1
  57. package/src/server/BRIDGE_VERSION.ts +1 -1
  58. package/src/server/abideModules.ts +2 -0
  59. package/src/server/answerFailure.ts +1 -0
  60. package/src/server/answerRequest.ts +57 -19
  61. package/src/server/answerRpc.ts +6 -2
  62. package/src/server/answerSocket.ts +2 -1
  63. package/src/server/answerValue.ts +1 -0
  64. package/src/server/answerWorker.ts +1 -0
  65. package/src/server/appTree.ts +18 -9
  66. package/src/server/argsFor.ts +1 -0
  67. package/src/server/assistant.ts +2 -1
  68. package/src/server/banner.ts +2 -0
  69. package/src/server/bridgeRelay.ts +1 -0
  70. package/src/server/callerOf.ts +1 -0
  71. package/src/server/claudeApi.ts +1 -0
  72. package/src/server/claudeCode.ts +1 -0
  73. package/src/server/clientBundle.ts +1 -0
  74. package/src/server/coerceArgs.ts +1 -2
  75. package/src/server/commands.ts +9 -0
  76. package/src/server/compressAnswer.ts +2 -1
  77. package/src/server/config.ts +2 -0
  78. package/src/server/createApp.ts +4 -2
  79. package/src/server/crossingOrigin.ts +1 -0
  80. package/src/server/csp.ts +1 -0
  81. package/src/server/deferredBuilds.ts +1 -0
  82. package/src/server/derivedArgs.ts +1 -0
  83. package/src/server/devWorker.ts +2 -1
  84. package/src/server/faceOf.ts +2 -7
  85. package/src/server/generatedSurfaces.ts +79 -7
  86. package/src/server/hooks.ts +1 -0
  87. package/src/server/iconAccent.ts +1 -1
  88. package/src/server/installServer.ts +1 -0
  89. package/src/server/installSourceMaps.ts +1 -0
  90. package/src/server/launcherPage.ts +2 -2
  91. package/src/server/manifestOf.ts +1 -0
  92. package/src/server/muxUpgrade.ts +1 -0
  93. package/src/server/nativeMenu.ts +2 -0
  94. package/src/server/placement.ts +12 -2
  95. package/src/server/principal.ts +2 -1
  96. package/src/server/remote.ts +7 -2
  97. package/src/server/render.ts +3 -3
  98. package/src/server/renderComponent.ts +1 -0
  99. package/src/server/reportHealth.ts +1 -0
  100. package/src/server/requestScope.ts +3 -1
  101. package/src/server/runDesktop.ts +3 -2
  102. package/src/server/seedBuffer.ts +1 -0
  103. package/src/server/serveDev.ts +3 -2
  104. package/src/server/shell.ts +2 -0
  105. package/src/server/streamEvent.ts +1 -0
  106. package/src/server/surfaceOf.ts +6 -1
  107. package/src/server/testBuild.ts +1 -0
  108. package/src/server/testMount.ts +1 -0
  109. package/src/server/trace.ts +2 -0
  110. package/src/server/withAbideSources.ts +1 -0
  111. package/src/shared/Attributes.ts +12 -8
  112. package/src/shared/cookies.ts +1 -1
  113. package/src/shared/escapeText.ts +1 -1
  114. package/src/shared/filledPath.ts +16 -10
  115. package/src/shared/index.ts +1 -5
  116. package/src/shared/jsonSchema.ts +1 -3
  117. package/src/shared/matchRoute.ts +16 -4
  118. package/src/shared/menuBridge.ts +1 -2
  119. package/src/shared/outbox.ts +1 -1
  120. package/src/shared/reactive/Keyed.ts +2 -2
  121. package/src/shared/reactive/Reactive.ts +12 -16
  122. package/src/shared/reactive/index.ts +3 -4
  123. package/src/shared/reactive/isReactive.ts +1 -1
  124. package/src/shared/reactive/scoped.ts +2 -2
  125. package/src/shared/reactive/share.ts +1 -1
  126. package/src/shared/reactive/watch.ts +4 -4
  127. package/src/shared/refuse.ts +1 -1
  128. package/src/shared/routePattern.ts +66 -14
  129. package/src/shared/rpc.ts +8 -11
  130. package/src/shared/url.ts +24 -7
  131. package/src/shared/validateJson.ts +1 -1
  132. package/src/ui/ArmRegion.ts +1 -0
  133. package/src/ui/Level.ts +1 -0
  134. package/src/ui/List.ts +1 -0
  135. package/src/ui/RawRun.ts +1 -0
  136. package/src/ui/Router.ts +1 -0
  137. package/src/ui/TryRegion.ts +1 -0
  138. package/src/ui/adoptWalk.ts +2 -1
  139. package/src/ui/bindElement.ts +1 -0
  140. package/src/ui/bindFiles.ts +1 -0
  141. package/src/ui/bindGroup.ts +1 -0
  142. package/src/ui/bindProperty.ts +1 -0
  143. package/src/ui/bindSpread.ts +1 -0
  144. package/src/ui/index.ts +1 -6
  145. package/src/ui/outboxQueue.ts +1 -1
  146. package/src/ui/parseMarkup.ts +2 -1
  147. package/src/ui/reconcile.ts +2 -1
  148. package/src/ui/reconcileHead.ts +1 -0
  149. package/src/ui/regions.ts +2 -1
  150. package/src/ui/registerWorker.ts +1 -0
  151. package/src/ui/rows.ts +1 -0
  152. package/src/ui/setMarkup.ts +1 -0
  153. package/src/ui/setText.ts +1 -0
  154. package/src/ui/socketWire.ts +4 -3
  155. package/src/ui/wire.ts +2 -1
  156. /package/scaffold/src/{getGreeting.ts → getGreeting.handler.ts} +0 -0
@@ -1,3 +1,4 @@
1
+ import { anchorMarkup } from '#shared/anchorMarkup.ts'
1
2
  import {
2
3
  RAW_CLOSE,
3
4
  RAW_OPEN,
@@ -5,7 +6,6 @@ import {
5
6
  REGION_OPEN,
6
7
  ROW_OPEN,
7
8
  } from '#shared/ANCHORS.ts'
8
- import { anchorMarkup } from '#shared/anchorMarkup.ts'
9
9
  import { CHILDREN } from '#shared/CHILDREN.ts'
10
10
  import { FOREIGN_ATTRIBUTES } from '#shared/FOREIGN_ATTRIBUTES.ts'
11
11
  import {
@@ -13,22 +13,23 @@ import {
13
13
  INTEGRATION_POINTS,
14
14
  } from '#shared/INTEGRATION_POINTS.ts'
15
15
  import { RUNTIME_SPECIFIER, SHARED_SPECIFIER } from '#shared/SPECIFIERS.ts'
16
+
16
17
  import { type CheckerAnswer, UNCHECKED } from './CheckerAnswer.ts'
17
- import {
18
- Cursor,
19
- type PlacedNode,
20
- placeTemplate,
21
- REGION_ROOT,
22
- ROW_ROOT,
23
- } from './Cursor.ts'
24
18
  import {
25
19
  type ClassifiedAttribute,
26
20
  classifyAttributes,
27
21
  isBound,
28
22
  isSingleRooted,
29
- type MergeGroup,
30
23
  isSlot,
24
+ type MergeGroup,
31
25
  } from './classifyTemplate.ts'
26
+ import {
27
+ Cursor,
28
+ type PlacedNode,
29
+ placeTemplate,
30
+ REGION_ROOT,
31
+ ROW_ROOT,
32
+ } from './Cursor.ts'
32
33
  import { decodeCharacterReferences } from './decodeCharacterReferences.ts'
33
34
  import { moduleImports } from './emitComponent.ts'
34
35
  import { invocationProps, passedName } from './invocationProps.ts'
@@ -41,8 +42,8 @@ import {
41
42
  } from './Lowering.ts'
42
43
  import type { AbideFile } from './parseAbide.ts'
43
44
  import {
44
- CLIENT_LANE,
45
45
  chosenArm,
46
+ CLIENT_LANE,
46
47
  headSink,
47
48
  mergedValue,
48
49
  renderMarkup,
@@ -1313,7 +1314,8 @@ function emitInvocation(
1313
1314
  // 32.34, 32.35 — A TAG CHOOSING BY A VALUE IS AN `{#if}` WHOSE ARMS ARE COMPONENTS
1314
1315
  // (`ChosenRegion`): the watch reads which, and the region swaps.
1315
1316
  const name = region.claim('dc')
1316
- region.lines.push(`const ${name} = new ${lowering.use('ChosenRegion')}(${lowering.use('regionFound')}(${at.name}), ${SCOPE}, { ${props.join(', ')} }, ${SHARE_AT})
1317
+ region.lines
1318
+ .push(`const ${name} = new ${lowering.use('ChosenRegion')}(${lowering.use('regionFound')}(${at.name}), ${SCOPE}, { ${props.join(', ')} }, ${SHARE_AT})
1317
1319
  ${SCOPE}.watch(() => ${name}.show(${chosen}))`)
1318
1320
  }
1319
1321
 
@@ -1336,7 +1338,8 @@ function emitSlot(at: PlacedNode, region: RegionEmission): void {
1336
1338
  // THE EMPTY REGION IS THE ONE THE SERVER DID NOT PAINT — a child built in the browser (32.17)
1337
1339
  // or a page navigated to (30.7). Filled from whichever side owns what goes there, and then
1338
1340
  // mounted from the same side, so the markup and the bindings can never come from two.
1339
- region.lines.push(`const ${name} = ${lowering.use('regionFound')}(${at.name})
1341
+ region.lines
1342
+ .push(`const ${name} = ${lowering.use('regionFound')}(${at.name})
1340
1343
  const ${name}_kids = ${PROPS}[${JSON.stringify(CHILDREN)}] === undefined ? undefined : ${PROPS}[${JSON.stringify(CHILDREN)}]()
1341
1344
  ${lowering.use('fillEmpty')}(${name}, ${name}_kids === undefined ? ${name}_build : ${name}_kids.build)
1342
1345
  ${SCOPE}.own(${name}_kids === undefined ? ${name}_mount(${name}) : ${name}_kids.mount(${name}))`)
@@ -1384,7 +1387,8 @@ function emitBlock(
1384
1387
  // it takes can never change, and a watch over it is a reader that can never wake. Unproven, the
1385
1388
  // watch stays, and tracking decides what it reads.
1386
1389
  const show = `${name}.show(${take})`
1387
- region.lines.push(`const ${name} = new ${lowering.use('ArmRegion')}(${lowering.use('regionFound')}(${at.name}), ${SCOPE}, ${name}_arms, ${mounted})
1390
+ region.lines
1391
+ .push(`const ${name} = new ${lowering.use('ArmRegion')}(${lowering.use('regionFound')}(${at.name}), ${SCOPE}, ${name}_arms, ${mounted})
1388
1392
  ${lowering.isLiveChain(block.branches) ? `${SCOPE}.watch(() => ${show})` : show}`)
1389
1393
  }
1390
1394
 
@@ -1414,7 +1418,8 @@ function emitTry(
1414
1418
  )
1415
1419
 
1416
1420
  // ONE UNIT, for `emitBlock`'s reason. What the body and the catch do is `TryRegion`'s.
1417
- region.lines.push(`const ${name} = new ${lowering.use('TryRegion')}(${lowering.use('regionFound')}(${at.name}), ${SCOPE}, ${name}_arms)
1421
+ region.lines
1422
+ .push(`const ${name} = new ${lowering.use('TryRegion')}(${lowering.use('regionFound')}(${at.name}), ${SCOPE}, ${name}_arms)
1418
1423
  ${SCOPE}.watch(() => ${name}.follow())`)
1419
1424
  }
1420
1425
 
@@ -1,5 +1,6 @@
1
1
  import type { JsonValue } from '#shared/JsonValue.ts'
2
2
  import { SERVER_SPECIFIER, SHARED_SPECIFIER } from '#shared/SPECIFIERS.ts'
3
+
3
4
  import { type CheckerAnswer, UNCHECKED } from './CheckerAnswer.ts'
4
5
  import { Cursor, placeTemplate } from './Cursor.ts'
5
6
  import { type LoweredChunk, Lowering, PROPS } from './Lowering.ts'
@@ -1,6 +1,7 @@
1
1
  import { STYLE_QUERY } from '#server/MODULE_QUERIES.ts'
2
- import type { JsonValue } from '#shared/JsonValue.ts'
3
2
  import type { Placement } from '#server/placement.ts'
3
+ import type { JsonValue } from '#shared/JsonValue.ts'
4
+
4
5
  import type { CheckerAnswer } from './CheckerAnswer.ts'
5
6
  import { emitClient } from './emitClient.ts'
6
7
  import { emitComponent } from './emitComponent.ts'