@abide/abide 0.123.3 → 0.124.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.
- package/ABIDE.md +8 -5
- package/CHANGELOG.md +38 -0
- package/docs/REGISTRY.md +45 -12
- package/docs/RULEBOOK.md +29 -16
- package/docs/abide.md +999 -459
- package/package.json +1 -1
- package/src/compiler/ARRAY_MUTATORS.ts +20 -0
- package/src/compiler/LoweredFile.ts +609 -0
- package/src/compiler/Lowering.ts +46 -4
- package/src/compiler/SHARED_NAMES.ts +2 -0
- package/src/compiler/ShadowHost.ts +670 -0
- package/src/compiler/ShadowMap.ts +1 -1
- package/src/compiler/TypeSession.ts +71 -1715
- package/src/compiler/appLints.ts +109 -0
- package/src/compiler/checkedShadow.ts +1 -1
- package/src/compiler/classifyRead.ts +16 -1
- package/src/compiler/compileApp.ts +2 -2
- package/src/compiler/declaredExports.ts +44 -17
- package/src/compiler/diagnoseSources.ts +232 -0
- package/src/compiler/formatAbide.ts +5 -6
- package/src/compiler/handlersUnder.ts +16 -35
- package/src/compiler/projectShadow.ts +1 -0
- package/src/compiler/reactiveReads.ts +235 -0
- package/src/compiler/reactiveTypes.ts +13 -0
- package/src/compiler/readsIn.ts +180 -81
- package/src/compiler/routesDeclaration.ts +46 -0
- package/src/compiler/scaffold.ts +7 -2
- package/src/compiler/serveLanguage.ts +26 -20
- package/src/compiler/splitImports.ts +2 -2
- package/src/server/BRIDGE_VERSION.ts +1 -1
- package/src/server/DesktopSession.ts +213 -0
- package/src/server/Followers.ts +399 -0
- package/src/server/MODULE_QUERIES.ts +6 -2
- package/src/server/PageRender.ts +201 -0
- package/src/server/abideModules.ts +7 -7
- package/src/server/answerFailure.ts +3 -2
- package/src/server/answerRequest.ts +6 -70
- package/src/server/answerRpc.ts +48 -260
- package/src/server/answerSocket.ts +41 -463
- package/src/server/appKit.ts +1 -1
- package/src/server/argsContract.ts +1 -1
- package/src/server/createApp.ts +8 -2
- package/src/server/csp.ts +1 -1
- package/src/server/deferredBuilds.ts +3 -16
- package/src/server/faceOf.ts +1 -1
- package/src/server/generatedSurfaces.ts +2 -1
- package/src/server/handlerFileMount.ts +1 -1
- package/src/server/index.ts +1 -1
- package/src/server/installServer.ts +5 -9
- package/src/server/invokeHandler.ts +230 -0
- package/src/server/mountHandlers.ts +184 -0
- package/src/server/openDesktopWindow.ts +308 -0
- package/src/server/preload.ts +18 -0
- package/src/server/principal.ts +1 -1
- package/src/server/remote.ts +1 -1
- package/src/server/render.ts +31 -59
- package/src/server/requestScope.ts +5 -36
- package/src/server/runDesktop.ts +19 -447
- package/src/server/seedBuffer.ts +11 -11
- package/src/server/servedApp.ts +1 -1
- package/src/server/shell.ts +1 -1
- package/src/server/surfaceOf.ts +1 -1
- package/src/server/versionOf.ts +1 -1
- package/src/shared/RPC_SERVER.ts +27 -31
- package/src/shared/Schema.ts +1 -2
- package/src/shared/index.ts +1 -1
- package/src/shared/{note.ts → issueReport.ts} +22 -0
- package/src/shared/loadCall.ts +66 -0
- package/src/shared/reactive/Keyed.ts +23 -15
- package/src/shared/reactive/Reactive.ts +46 -1002
- package/src/shared/reactive/byOf.ts +2 -5
- package/src/shared/reactive/callLoad.ts +8 -14
- package/src/shared/reactive/cellShape.ts +734 -0
- package/src/shared/reactive/index.ts +12 -24
- package/src/shared/reactive/pairReactive.ts +5 -3
- package/src/shared/reactive/producer.ts +121 -0
- package/src/shared/reactive/scoped.ts +3 -2
- package/src/shared/reactive/selections.ts +209 -0
- package/src/shared/reactive/watch.ts +3 -4
- package/src/shared/rpc.ts +8 -5
- package/src/shared/validateJson.ts +1 -2
- package/src/shared/writePath.ts +29 -0
- package/src/ui/Router.ts +53 -69
- package/src/ui/outboxQueue.ts +2 -8
- package/src/ui/outcomeOf.ts +120 -0
- package/src/ui/socketWire.ts +3 -3
- package/src/ui/wire.ts +9 -10
- package/src/shared/LOAD_OFFLINE.ts +0 -15
- package/src/shared/LOAD_SIGNAL.ts +0 -10
- package/src/shared/issuesOf.ts +0 -18
- package/src/shared/reactive/ENTRY_LIVES.ts +0 -7
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
// the chunk every page loads. The cell is read here, in the core's folder, so its layout stays the
|
|
4
4
|
// core's.
|
|
5
5
|
import { CELL } from './CELL.ts'
|
|
6
|
+
import type { Callable } from './cellShape.ts'
|
|
6
7
|
import { isReactive } from './isReactive.ts'
|
|
7
8
|
|
|
8
9
|
/** The `by` a `Reactive` declared (32.32), or `null` where it declared none or `value` is not one. */
|
|
@@ -10,9 +11,5 @@ export function byOf(
|
|
|
10
11
|
value: unknown,
|
|
11
12
|
): string | ((element: unknown) => unknown) | null {
|
|
12
13
|
if (!isReactive(value)) return null
|
|
13
|
-
return (
|
|
14
|
-
value as unknown as {
|
|
15
|
-
[CELL]: { by: string | ((element: unknown) => unknown) | null }
|
|
16
|
-
}
|
|
17
|
-
)[CELL].by
|
|
14
|
+
return (value as unknown as Callable)[CELL].by
|
|
18
15
|
}
|
|
@@ -7,18 +7,16 @@
|
|
|
7
7
|
// ONE RECORD PER VALUE, IN A SIDE TABLE, not a field on the cell. Every value would carry the field
|
|
8
8
|
// and only a called one ever fills it, so the table is what keeps a plain `reactive` paying nothing.
|
|
9
9
|
|
|
10
|
-
import {
|
|
11
|
-
import { LOAD_SIGNAL } from '../LOAD_SIGNAL.ts'
|
|
10
|
+
import { beginLoadCall, endLoadCall, reachedInLoadCall } from '../loadCall.ts'
|
|
12
11
|
import { aborted, refuse } from '../refuse.ts'
|
|
13
|
-
// Through the barrel, for the cycle it names: rpc reaches this module ahead of the barrel.
|
|
12
|
+
// Through the barrel first, for the cycle it names: rpc reaches this module ahead of the barrel.
|
|
13
|
+
import { isReactive, STREAMING } from './index.ts'
|
|
14
14
|
import {
|
|
15
15
|
abandonLoad,
|
|
16
16
|
failedTransiently,
|
|
17
|
-
isReactive,
|
|
18
17
|
loadOf,
|
|
19
|
-
STREAMING,
|
|
20
18
|
streamingOrSettled,
|
|
21
|
-
} from './
|
|
19
|
+
} from './producer.ts'
|
|
22
20
|
|
|
23
21
|
/**
|
|
24
22
|
* Who is waiting on one value's load, and what the last one came to.
|
|
@@ -75,7 +73,7 @@ const ATTENDED = new WeakMap<object, Attended>()
|
|
|
75
73
|
* Reaches `args` through `reach` as a call does, under that call's `signal` and `timeout`.
|
|
76
74
|
*
|
|
77
75
|
* 16.49 — a load this call starts may be ended by it, so its transport is handed a signal of the
|
|
78
|
-
* load's own (`
|
|
76
|
+
* load's own (`startingLoadCall`, read by the body as it starts) — the caller's is only one vote.
|
|
79
77
|
*/
|
|
80
78
|
export function callLoad(
|
|
81
79
|
reach: (args: unknown) => unknown,
|
|
@@ -86,14 +84,12 @@ export function callLoad(
|
|
|
86
84
|
offline?: (args: unknown) => unknown,
|
|
87
85
|
): unknown {
|
|
88
86
|
const ending = signal === undefined ? undefined : new AbortController()
|
|
89
|
-
|
|
90
|
-
LOAD_OFFLINE.current = offline
|
|
87
|
+
beginLoadCall(ending?.signal, offline)
|
|
91
88
|
let reached: unknown
|
|
92
89
|
let attended: Attended | undefined
|
|
93
90
|
try {
|
|
94
91
|
reached = reach(args)
|
|
95
|
-
|
|
96
|
-
if (standing !== undefined) standing.value = reached
|
|
92
|
+
reachedInLoadCall(reached)
|
|
97
93
|
attended = ATTENDED.get(reached as object)
|
|
98
94
|
// 16.62 — the callers of an aborted load stopped waiting, and this one has not.
|
|
99
95
|
// 15.19 — and of one whose last answer failed transiently, which runs again here where an
|
|
@@ -106,9 +102,7 @@ export function callLoad(
|
|
|
106
102
|
if (again || failedTransiently(reached))
|
|
107
103
|
(reached as { refresh(): void }).refresh()
|
|
108
104
|
} finally {
|
|
109
|
-
|
|
110
|
-
LOAD_OFFLINE.current = undefined
|
|
111
|
-
LOAD_OFFLINE.standing = undefined
|
|
105
|
+
endLoadCall()
|
|
112
106
|
}
|
|
113
107
|
if (!isReactive(reached)) return reached
|
|
114
108
|
const load = loadOf(reached)
|