@abide/abide 0.102.0 → 0.103.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/CHANGELOG.md +10 -0
- package/bin/abide.ts +31 -28
- package/docs/REGISTRY.md +30 -26
- package/docs/RULEBOOK.md +98 -83
- package/docs/abide.md +771 -522
- package/package.json +2 -1
- package/scaffold/AGENTS.md +13 -6
- package/src/compiler/TypeSession.ts +110 -35
- package/src/compiler/appMap.ts +96 -0
- package/src/compiler/argsSchemaOf.ts +1 -1
- package/src/compiler/checkApp.ts +35 -18
- package/src/compiler/checkedShadow.ts +40 -7
- package/src/compiler/compileApp.ts +228 -70
- package/src/compiler/compiledEntry.ts +10 -6
- package/src/compiler/componentGraph.ts +6 -7
- package/src/compiler/declaredExports.ts +3 -3
- package/src/compiler/emitClient.ts +3 -3
- package/src/compiler/emitComponent.ts +9 -9
- package/src/compiler/emitSource.ts +5 -9
- package/src/compiler/handlersUnder.ts +114 -73
- package/src/compiler/hooksCalled.ts +35 -0
- package/src/compiler/mountsOf.ts +30 -18
- package/src/compiler/parseAbide.ts +12 -12
- package/src/compiler/projectShadow.ts +70 -45
- package/src/compiler/readsIn.ts +2 -2
- package/src/compiler/scaffold.ts +24 -21
- package/src/compiler/serveLanguage.ts +0 -24
- package/src/compiler/sharedModuleWrites.ts +2 -2
- package/src/compiler/splitImports.ts +4 -4
- package/src/compiler/writeDefaultProject.ts +28 -1
- package/src/server/MODULE_QUERIES.ts +12 -3
- package/src/server/abideModules.ts +117 -51
- package/src/server/answerRequest.ts +9 -4
- package/src/server/answerRpc.ts +18 -16
- package/src/server/appTree.ts +83 -24
- package/src/server/commands.ts +5 -4
- package/src/server/componentModules.d.ts +1 -2
- package/src/server/createApp.ts +23 -11
- package/src/server/devWorker.ts +5 -1
- package/src/server/fenceServer.ts +36 -13
- package/src/server/hooks.ts +17 -4
- package/src/server/index.ts +1 -0
- package/src/server/installSourceMaps.ts +6 -1
- package/src/server/launcherOptions.ts +12 -13
- package/src/server/launcherPage.ts +2 -2
- package/src/server/nativeMenu.ts +3 -3
- package/src/server/preload.ts +13 -0
- package/src/server/runDesktop.ts +11 -16
- package/src/server/serveDev.ts +8 -2
- package/src/server/surfaceOf.ts +2 -0
- package/src/server/withAbideSources.ts +1 -1
- package/src/shared/ADDRESSES.ts +3 -0
- package/src/shared/LAUNCHER_FILES.ts +9 -0
- package/src/shared/RESERVED_DIRECTORIES.ts +13 -4
- package/src/shared/index.ts +2 -1
- package/src/{ui → shared}/menuBridge.ts +1 -1
- package/src/shared/menuItem.ts +2 -2
- package/src/shared/onMenu.ts +58 -0
- package/src/{ui → shared}/reportMenu.ts +7 -9
- package/src/shared/routePattern.ts +58 -20
- package/src/shared/rpc.ts +1 -1
- package/src/ui/Router.ts +0 -6
- package/src/compiler/syncTypes.ts +0 -32
- package/src/compiler/writeTypes.ts +0 -82
- package/src/server/LAUNCHER_FILES.ts +0 -9
- /package/scaffold/src/{page.abide → index.abide} +0 -0
- /package/src/{compiler → shared}/SPECIFIERS.ts +0 -0
package/docs/RULEBOOK.md
CHANGED
|
@@ -68,6 +68,9 @@ REGISTRY.md because none of them is a name an app author writes.
|
|
|
68
68
|
| sink | What 35.7 defines. |
|
|
69
69
|
| implementation | Anything claiming conformance to this document. |
|
|
70
70
|
| dependency's `.abide` | A `.abide` file under a `node_modules` directory or outside the app's root. |
|
|
71
|
+
| fence | A `server`, `public`, `lib` or `tests` directory. |
|
|
72
|
+
| handler file | A `.ts` of the app's own, neither a `.d.ts` nor a `.test.ts`, directly in a directory under no fence. |
|
|
73
|
+
| private handler | A handler a `<script server>` declares. |
|
|
71
74
|
|
|
72
75
|
RFC 2119 keywords are used as that document defines them: **MUST**, **MUST NOT**, **SHALL**,
|
|
73
76
|
**SHOULD**, **SHOULD NOT**, **MAY**.
|
|
@@ -775,8 +778,8 @@ states otherwise.
|
|
|
775
778
|
|
|
776
779
|
16.1 A handler MUST be a `reactive`, a plain function, or a value.
|
|
777
780
|
|
|
778
|
-
16.2 `GET`, `POST`, `PUT`, `PATCH` and `DELETE` MUST give
|
|
779
|
-
|
|
781
|
+
16.2 `GET`, `POST`, `PUT`, `PATCH` and `DELETE` MUST give the handler a handler file exports as its
|
|
782
|
+
default an address over http: that file's route, per 23.14.
|
|
780
783
|
|
|
781
784
|
16.3 An `Rpc` MUST hand back the same `Reactive` shape the handler had, `Produced` included.
|
|
782
785
|
|
|
@@ -845,7 +848,7 @@ read it.
|
|
|
845
848
|
16.27 A `schema` MUST run where its `Reactive` lives.
|
|
846
849
|
|
|
847
850
|
16.28 A browser MUST receive a generated `Rpc` wrapper carrying the method, the mount-relative address and
|
|
848
|
-
the description, and MUST NOT receive the `<script server>` that declared it.
|
|
851
|
+
the description, and MUST NOT receive the handler file or the `<script server>` that declared it.
|
|
849
852
|
|
|
850
853
|
16.29 Importing a module under a `server` directory from the client graph MUST be a compile error,
|
|
851
854
|
and MUST NOT be a silent stub.
|
|
@@ -945,7 +948,7 @@ answer `aborted` at 499, and MUST NOT report the throw as unexpected.
|
|
|
945
948
|
|
|
946
949
|
16.64 An `Rpc` over a plain function MUST NOT run that function before the first call reaches it.
|
|
947
950
|
|
|
948
|
-
16.65 Each parameter of the route a handler
|
|
951
|
+
16.65 Each parameter of the route a handler file answers at MUST reach its handler's `Args` from the
|
|
949
952
|
path.
|
|
950
953
|
|
|
951
954
|
16.66 A request naming a parameter of its route in its query or its body as well as its path MUST be
|
|
@@ -961,6 +964,23 @@ Details — and a reader MUST refuse with it after the chunks before it.
|
|
|
961
964
|
16.69 A `[...rest]` segment MUST take the most parts of an address the segments after it leave, so
|
|
962
965
|
a handler declared under one MUST answer at its own name.
|
|
963
966
|
|
|
967
|
+
16.70 A private handler MUST have an address below `/__abide/handlers/`, named by its file's path
|
|
968
|
+
below the root, a segment's brackets and dots dropped, and then its binding's name, and MUST NOT
|
|
969
|
+
take a parameter from the path.
|
|
970
|
+
|
|
971
|
+
16.71 A private handler MUST NOT be listed on `/__abide/mcp`, on `/__abide/openapi.json` or by the
|
|
972
|
+
command line.
|
|
973
|
+
|
|
974
|
+
16.72 A private handler MUST run under the `middleware` and `onError` filed at the route 37.1 files
|
|
975
|
+
its file's hooks at.
|
|
976
|
+
|
|
977
|
+
16.73 A handler file's default export MUST be declared by a call of abide's `GET`, `POST`, `PUT`,
|
|
978
|
+
`PATCH` or `DELETE`, and any other export, however the language spells it, MUST be a build error
|
|
979
|
+
naming it.
|
|
980
|
+
|
|
981
|
+
16.74 A module of the client graph importing a handler file MUST receive the wrapper 16.28 states as
|
|
982
|
+
that file's default.
|
|
983
|
+
|
|
964
984
|
# 17. Response helpers
|
|
965
985
|
|
|
966
986
|
17.1 Every body helper MUST take `Values<T>`.
|
|
@@ -1074,7 +1094,7 @@ their parameters' names being one route.
|
|
|
1074
1094
|
19.3 An implementation MUST NOT accept a predicate as a `Schema`.
|
|
1075
1095
|
|
|
1076
1096
|
19.4 The plain-function `Schema` form MUST throw what it refuses, and that throw MUST be caught where
|
|
1077
|
-
the schema runs and become the `''` entry of `Issues<T>`, or the whole of it per 19.
|
|
1097
|
+
the schema runs and become the `''` entry of `Issues<T>`, or the whole of it per 19.19.
|
|
1078
1098
|
|
|
1079
1099
|
19.5 `Paths<T>` MUST be dot-joined, MUST be depth-limited, and MUST widen to `string` past the limit.
|
|
1080
1100
|
|
|
@@ -1102,30 +1122,24 @@ optional.
|
|
|
1102
1122
|
19.14 A `JsonSchema` given as a `Schema` without `jsonSchema` MUST be refused, naming
|
|
1103
1123
|
`jsonSchema`.
|
|
1104
1124
|
|
|
1105
|
-
19.15
|
|
1106
|
-
`GET`, `POST`, `PUT`, `PATCH` or `DELETE` — however the language spells the export, the call or its
|
|
1107
|
-
import — and an export that is not MUST be a build error naming it.
|
|
1108
|
-
|
|
1109
|
-
19.16 A default in a keyed body's parameter or a handler's parameter that is not a literal MUST
|
|
1125
|
+
19.15 A default in a keyed body's parameter or a handler's parameter that is not a literal MUST
|
|
1110
1126
|
be refused at construction, naming its `Args` member, and the build MUST refuse one on a handler.
|
|
1111
1127
|
|
|
1112
|
-
19.
|
|
1128
|
+
19.16 `route.url` MUST hold the address a page is served at, the path `APP_URL` names included, on
|
|
1113
1129
|
the server as in the browser.
|
|
1114
1130
|
|
|
1115
|
-
19.
|
|
1131
|
+
19.17 A request for the path `APP_URL` names, without its trailing `/`, MUST be redirected 308 to
|
|
1116
1132
|
that path with one, by path alone.
|
|
1117
1133
|
|
|
1118
|
-
19.
|
|
1134
|
+
19.18 A `Schema` derived per 19.9 MUST refuse a member its type does not declare, wherever the type
|
|
1119
1135
|
carries no index signature.
|
|
1120
1136
|
|
|
1121
|
-
19.
|
|
1137
|
+
19.19 An `Issues<T>` over a value that is not an object MUST be the bare list of messages, not a
|
|
1122
1138
|
record keyed by `''`.
|
|
1123
1139
|
|
|
1124
|
-
19.
|
|
1140
|
+
19.20 A request MUST be answered by the most specific route answering its method, ranked as 30.9
|
|
1125
1141
|
ranks routes for `navigate`.
|
|
1126
1142
|
|
|
1127
|
-
19.22 A `<script server>` that re-exports with `export * from` MUST be a build error naming its file.
|
|
1128
|
-
|
|
1129
1143
|
# 20. Generated surfaces
|
|
1130
1144
|
|
|
1131
1145
|
20.1 Every surface `Clients` names MUST be derived from the route table, and MUST NOT be authored
|
|
@@ -1251,7 +1265,7 @@ composite.
|
|
|
1251
1265
|
|
|
1252
1266
|
23.2 `route.url` MUST be one `URL` instance per navigation, built when the route resolves.
|
|
1253
1267
|
|
|
1254
|
-
23.3 A page route MUST be created where a
|
|
1268
|
+
23.3 A page route MUST be created where a `.abide` 23.21 makes a page has a template or a head.
|
|
1255
1269
|
|
|
1256
1270
|
23.4 A page route's file path MUST determine its `route.url`.
|
|
1257
1271
|
|
|
@@ -1275,25 +1289,31 @@ segment a page below it adds.
|
|
|
1275
1289
|
|
|
1276
1290
|
23.13 `reachable` MUST ask a host that names no scheme over https, and an origin as written.
|
|
1277
1291
|
|
|
1278
|
-
23.14 A route MUST be the path of its file
|
|
1292
|
+
23.14 A route MUST be the path of its file below the app's `--root` without its extension, and an
|
|
1293
|
+
`index.abide`'s, a `layout.abide`'s and an `error.abide`'s MUST be its directory's.
|
|
1279
1294
|
|
|
1280
|
-
23.15 A file under a
|
|
1295
|
+
23.15 A file under a fence MUST NOT have a route.
|
|
1281
1296
|
|
|
1282
|
-
23.16 A
|
|
1283
|
-
both.
|
|
1297
|
+
23.16 A fence under a fence MUST be a build error naming both.
|
|
1284
1298
|
|
|
1285
1299
|
23.17 A route whose first segment is `__abide` MUST be a build error.
|
|
1286
1300
|
|
|
1287
|
-
23.18
|
|
1288
|
-
MUST be a build error.
|
|
1301
|
+
23.18 An `index.abide`, a `layout.abide` or an `error.abide` under a fence MUST be a build error.
|
|
1289
1302
|
|
|
1290
1303
|
23.19 An `import '…' with { type: 'routes' }` in an app's `.abide` MUST place every `.abide` under the
|
|
1291
|
-
directory it names at the importing file's directory, routed by its path
|
|
1292
|
-
as 23.14 routes the app's own, and a specifier naming no directory MUST be a build error.
|
|
1304
|
+
directory it names, and every handler file, at the importing file's directory, routed by its path
|
|
1305
|
+
below the named directory as 23.14 routes the app's own, and a specifier naming no directory MUST be a build error.
|
|
1293
1306
|
|
|
1294
1307
|
23.20 A directory two `type: 'routes'` imports name, or one that is the app's own, MUST be a build
|
|
1295
1308
|
error naming the mount.
|
|
1296
1309
|
|
|
1310
|
+
23.21 A `.abide` of the app's own directly in a directory under no fence MUST be a page, save a
|
|
1311
|
+
`layout.abide`, an `error.abide` and the root's `launcher.abide`.
|
|
1312
|
+
|
|
1313
|
+
23.22 A file of the app's own directly in a directory under no fence that is neither a `.abide` nor
|
|
1314
|
+
a handler file MUST be a build error naming the file and a `lib` directory, save one beside the
|
|
1315
|
+
`package.json` of a root that holds it, nor a `.ts`.
|
|
1316
|
+
|
|
1297
1317
|
# 24. Tracing
|
|
1298
1318
|
|
|
1299
1319
|
24.1 `trace` MUST be built on first ask and held for the request.
|
|
@@ -1412,7 +1432,8 @@ module ran is not the one served after it.
|
|
|
1412
1432
|
27.12 `Config` MUST admit a field an app declares on it, of any type.
|
|
1413
1433
|
|
|
1414
1434
|
27.13 `abide check` and `abide lsp` MUST type `Config` with what the defaults of every `onConfig`
|
|
1415
|
-
called as a statement at the top of a `<script server
|
|
1435
|
+
called as a statement at the top of a `<script server>`, a handler file or a module under a `server`
|
|
1436
|
+
directory return, and a union return with the keys
|
|
1416
1437
|
every member of it has.
|
|
1417
1438
|
|
|
1418
1439
|
# 28. Logging
|
|
@@ -1492,7 +1513,7 @@ segment.
|
|
|
1492
1513
|
30.7 `navigate` MUST navigate, and MUST NOT reload the document.
|
|
1493
1514
|
|
|
1494
1515
|
30.8 A route `url` and `navigate` take MUST be a page route, per 23.14, and MUST NOT be a handler
|
|
1495
|
-
|
|
1516
|
+
file's.
|
|
1496
1517
|
|
|
1497
1518
|
30.9 `navigate` MUST match the most specific route, ranking a static segment above a required
|
|
1498
1519
|
one, a required above an optional, and an optional above a rest, and where one route ends, its end
|
|
@@ -1878,64 +1899,46 @@ compiles to, as a static import of it does.
|
|
|
1878
1899
|
34.16 A `.abide` file a server module imports MUST resolve to a function that binds its props and
|
|
1879
1900
|
answers a `Component`, under `abide dev`, `abide start` and `abide compile` alike.
|
|
1880
1901
|
|
|
1881
|
-
34.17
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
34.18 A `<script>` that exports MUST be a compile error.
|
|
1902
|
+
34.17 An `export` in any script block of a `.abide`, however the language spells it, MUST be a compile
|
|
1903
|
+
error.
|
|
1885
1904
|
|
|
1886
|
-
34.
|
|
1905
|
+
34.18 A write a `<script>` makes outside any function to a `let` or `var` its file's
|
|
1887
1906
|
`<script module>` declares, holding no `Reactive`, MUST be warned on.
|
|
1888
1907
|
|
|
1889
|
-
34.
|
|
1908
|
+
34.19 A `<script server>` block MUST be module scope run on a server alone, and the module a browser
|
|
1890
1909
|
loads MUST NOT carry it.
|
|
1891
1910
|
|
|
1892
|
-
34.
|
|
1911
|
+
34.20 A `<script server>` in a `.abide` file of the app's own under a `server` or `public` directory
|
|
1893
1912
|
MUST be a compile error.
|
|
1894
1913
|
|
|
1895
|
-
34.
|
|
1896
|
-
|
|
1897
|
-
34.23 A handler a `<script server>` exports MUST be exported from the module a browser loads as the
|
|
1898
|
-
wrapper 16.28 states, under the same name.
|
|
1899
|
-
|
|
1900
|
-
34.24 `abide sync`, `abide check`, `abide dev` and `abide build` MUST write, for every `.abide`
|
|
1901
|
-
under the root, a module typing what its `<script module>` and `<script server>` export, below
|
|
1902
|
-
`.abide/types` at the path the file has below the directory above the root, and MUST remove one whose
|
|
1903
|
-
`.abide` is gone; `abide lsp` MUST write an open file's as the editor holds it, and the scaffold MUST
|
|
1904
|
-
run `abide sync` on install without failing the install where it fails. A file `abide sync` or
|
|
1905
|
-
`abide check` refuses MUST be named, and MUST NOT stop the others being typed.
|
|
1906
|
-
|
|
1907
|
-
34.25 A file a script block imports `with { type: 'text' }`, a `.abide` among them, MUST be imported
|
|
1914
|
+
34.21 A file a script block imports `with { type: 'text' }`, a `.abide` among them, MUST be imported
|
|
1908
1915
|
as its text and typed a `string`, on a server, in a browser and to the checker alike.
|
|
1909
1916
|
|
|
1910
|
-
34.
|
|
1917
|
+
34.22 A binding a `<script server>` imports that its file's `<script module>` or `<script>` imports
|
|
1911
1918
|
from the same specifier under the same name MUST compile as that one binding, a value wherever any
|
|
1912
1919
|
of them imports it as one. Where that binding is a `.abide`'s default or namespace imported as a
|
|
1913
1920
|
value by both, it MUST be a compile error, since the server block's is the bound function (34.16)
|
|
1914
1921
|
and the other's the module (32.17).
|
|
1915
1922
|
|
|
1916
|
-
34.
|
|
1923
|
+
34.23 A `.abide` file any script block imports MUST be compiled with the app that imports it,
|
|
1917
1924
|
wherever it lies.
|
|
1918
1925
|
|
|
1919
|
-
34.
|
|
1926
|
+
34.24 A dependency's `.abide` MUST be a component, and MUST NOT be an address, save where a mount
|
|
1920
1927
|
places it (23.19).
|
|
1921
1928
|
|
|
1922
|
-
34.
|
|
1923
|
-
|
|
1924
|
-
34.30 A dependency's `.abide` MUST run on the abide that the app's root resolves.
|
|
1929
|
+
34.25 A dependency's `.abide` MUST be typed by the project of the app that imports it.
|
|
1925
1930
|
|
|
1926
|
-
34.
|
|
1927
|
-
save the one a mount places it at (23.19).
|
|
1931
|
+
34.26 A dependency's `.abide` MUST run on the abide that the app's root resolves.
|
|
1928
1932
|
|
|
1929
|
-
34.
|
|
1930
|
-
|
|
1931
|
-
NOT be read by evaluating the module during a build.
|
|
1933
|
+
34.27 A dependency's `.ts` MUST NOT give a handler an address, save the one a mount places it at
|
|
1934
|
+
(23.19).
|
|
1932
1935
|
|
|
1933
|
-
34.
|
|
1936
|
+
34.28 A `<script>` carrying a `server` attribute with a value, or beside any other attribute, MUST be
|
|
1934
1937
|
a compile error.
|
|
1935
1938
|
|
|
1936
|
-
34.
|
|
1939
|
+
34.29 A `</script>` that closes no `<script>` MUST be a compile error.
|
|
1937
1940
|
|
|
1938
|
-
34.
|
|
1941
|
+
34.30 A `</script>` inside a string, a template, a comment or a regular expression in a `<script>`,
|
|
1939
1942
|
`<script module>` or `<script server>` block MUST be a compile error.
|
|
1940
1943
|
|
|
1941
1944
|
# 35. Pages, rendering and sinks
|
|
@@ -2037,8 +2040,9 @@ answered per 41.12.
|
|
|
2037
2040
|
|
|
2038
2041
|
# 37. Lifecycle hooks
|
|
2039
2042
|
|
|
2040
|
-
37.1 A lifecycle hook MUST be
|
|
2041
|
-
|
|
2043
|
+
37.1 A lifecycle hook MUST be filed at the route of the `.abide` or the handler file that called it,
|
|
2044
|
+
one under a `lib` or a `tests` directory at the route of the directory holding that one, and at the
|
|
2045
|
+
root route where neither did.
|
|
2042
2046
|
|
|
2043
2047
|
37.2 `middleware` filed below the root route MUST run after routing, over a request its route or a
|
|
2044
2048
|
route below it answers, outermost route first.
|
|
@@ -2217,7 +2221,7 @@ and open 38.7's shell on it.
|
|
|
2217
2221
|
38.55 Input that ends MUST NOT stop the app `abide` serves under 38.53.
|
|
2218
2222
|
|
|
2219
2223
|
38.56 A script the executable's `run` imports MUST resolve `abide`'s entries and the app's handler
|
|
2220
|
-
|
|
2224
|
+
files to the ones the executable holds.
|
|
2221
2225
|
|
|
2222
2226
|
38.57 `abide run` and the executable's `run` MUST resolve the configuration under the app's identity.
|
|
2223
2227
|
|
|
@@ -2283,18 +2287,18 @@ as 38.46 names the executable.
|
|
|
2283
2287
|
38.79 `abide bundle` MUST give the `.app` the icon the public file answered at `/icon.icns` holds,
|
|
2284
2288
|
or one drawn at every size from the one at `/icon.png` where there is no `.icns`.
|
|
2285
2289
|
|
|
2286
|
-
38.80 The desktop app MUST read the `
|
|
2287
|
-
|
|
2288
|
-
|
|
2290
|
+
38.80 The desktop app MUST read what the `onLauncher` `src/launcher.abide` calls answers as it
|
|
2291
|
+
launches, and MUST refuse to launch on a key it does not take, or a value of a type the key does not
|
|
2292
|
+
take.
|
|
2289
2293
|
|
|
2290
2294
|
38.81 `LauncherOptions` MUST NOT admit turning off both `start` and `connect`, and the desktop app
|
|
2291
|
-
MUST refuse to launch on
|
|
2295
|
+
MUST refuse to launch on an `onLauncher` answer that does.
|
|
2292
2296
|
|
|
2293
2297
|
38.82 Where the app's `src/launcher.abide` has markup of its own, the launcher MUST render it
|
|
2294
2298
|
through `render`, bound to the `Launch` it would show, in place of its own page; one holding script
|
|
2295
2299
|
blocks alone MUST leave the launcher's own page standing.
|
|
2296
2300
|
|
|
2297
|
-
38.83 A form
|
|
2301
|
+
38.83 A form `onLauncher` turns off MUST have no address in `Launch`, MUST NOT be
|
|
2298
2302
|
answered, and MUST NOT be done again at launch, and turning `connect` off MUST take the `connect`
|
|
2299
2303
|
item out of the default menu bar.
|
|
2300
2304
|
|
|
@@ -2304,28 +2308,29 @@ document it renders into.
|
|
|
2304
2308
|
38.85 A `src/launcher.abide` that fails to render MUST reach `onError`, and the launcher MUST
|
|
2305
2309
|
show its own page in its place.
|
|
2306
2310
|
|
|
2307
|
-
38.86 The window MUST open at the `
|
|
2311
|
+
38.86 The window MUST open at the `width` and `height` `onLauncher` answers where no launch
|
|
2308
2312
|
before it left a size, and MUST NOT be resized below its `minWidth` and `minHeight`.
|
|
2309
2313
|
|
|
2310
2314
|
38.87 The app's package name, as 38.46 names the executable, MUST name the app in its bundle, its
|
|
2311
2315
|
menu bar and its `Launch`.
|
|
2312
2316
|
|
|
2313
2317
|
38.88 The desktop app's menu bar MUST be the application, File, Edit, View and Window menus, with
|
|
2314
|
-
the `
|
|
2315
|
-
|
|
2318
|
+
the items every `onMenu` filed by the layouts and the page the window shows answers, outermost
|
|
2319
|
+
first: a menu whose `label` names one already standing appends its
|
|
2316
2320
|
items to that one, and any other stands before Window.
|
|
2317
2321
|
|
|
2318
2322
|
38.89 A `MenuItem` whose `MenuRole` AppKit answers MUST be sent down the responder chain, and MUST
|
|
2319
2323
|
be disabled where nothing in the chain answers it.
|
|
2320
2324
|
|
|
2321
|
-
38.90 Picking a `MenuItem` with an `href` MUST `navigate` to it in the page that
|
|
2325
|
+
38.90 Picking a `MenuItem` with an `href` MUST `navigate` to it in the page that filed it.
|
|
2322
2326
|
|
|
2323
|
-
38.91 Picking a `menuItem` MUST run every function its `on` filed, in the page that
|
|
2327
|
+
38.91 Picking a `menuItem` MUST run every function its `on` filed, in the page that filed it,
|
|
2324
2328
|
whether the launcher serves that app or connected to it, and a throw from one MUST NOT stop the
|
|
2325
2329
|
rest.
|
|
2326
2330
|
|
|
2327
|
-
38.92 The menu bar MUST be told again after every navigation the page makes
|
|
2328
|
-
|
|
2331
|
+
38.92 The menu bar MUST be told again after every navigation the page makes and after every change
|
|
2332
|
+
to what an `onMenu` it filed read, and MUST be the default alone from each load the launcher starts
|
|
2333
|
+
until the page loaded tells it its route's menus.
|
|
2329
2334
|
|
|
2330
2335
|
38.93 The executable `abide compile` writes MUST carry the app's code as bytecode, and MUST still
|
|
2331
2336
|
report an error at its source line.
|
|
@@ -2355,8 +2360,8 @@ last checked holds there, as 38.39 answers a hover.
|
|
|
2355
2360
|
`abide bundle` runs, and the platform's own accent where the icon gives none; `Launch` MUST carry
|
|
2356
2361
|
the accent and the icon to `src/launcher.abide`.
|
|
2357
2362
|
|
|
2358
|
-
38.102 The launcher's own page MUST show the app's icon, its name and a button for each form
|
|
2359
|
-
`
|
|
2363
|
+
38.102 The launcher's own page MUST show the app's icon, its name and a button for each form
|
|
2364
|
+
`onLauncher` leaves on. A button whose form asks for anything MUST open it in a modal dialog,
|
|
2360
2365
|
a start that asks for nothing MUST start at once, a refused start or connect MUST show its dialog
|
|
2361
2366
|
open on the refusal, and the `connect` menu role MUST show the connect dialog open.
|
|
2362
2367
|
|
|
@@ -2371,6 +2376,15 @@ published package holds.
|
|
|
2371
2376
|
38.106 The documentation the instructions `abide scaffold` writes name (38.104) MUST be every page
|
|
2372
2377
|
as one markdown file, in reading order.
|
|
2373
2378
|
|
|
2379
|
+
38.107 `onLauncher` called anywhere but `src/launcher.abide` MUST be a build error naming that file.
|
|
2380
|
+
|
|
2381
|
+
38.108 `abide routes` MUST print every route with each method it answers and the file answering
|
|
2382
|
+
it, every private handler with its address and its file, and every hook with the file that filed it;
|
|
2383
|
+
with `--json` it MUST print the same as one JSON document.
|
|
2384
|
+
|
|
2385
|
+
38.109 Under `bun test` with `@abide/abide/test` preloaded, a test MUST import a `.abide` of the app as
|
|
2386
|
+
the module it compiles to, whether or not `createApp` has run.
|
|
2387
|
+
|
|
2374
2388
|
# 39. Head and view transitions
|
|
2375
2389
|
|
|
2376
2390
|
39.1 A `<head>` element in a `.abide` file MUST contribute its children to the document head.
|
|
@@ -2496,13 +2510,14 @@ forms, the options they share, and a link to its reference page.
|
|
|
2496
2510
|
|
|
2497
2511
|
40.32 A page reporting the build's own results MUST NOT be listed in `SITE`.
|
|
2498
2512
|
|
|
2499
|
-
40.33 A documentation page MUST be
|
|
2513
|
+
40.33 A documentation page MUST be an `index.abide` written by hand at its route, and its title, nav
|
|
2500
2514
|
label, intent, lead, app and `covers` MUST be its `SITE` entry's alone.
|
|
2501
2515
|
|
|
2502
|
-
40.34 An `<Example>` MUST render a component in the directory
|
|
2503
|
-
component's handlers, hooks and data MUST be in its own file, save a file the example is
|
|
2516
|
+
40.34 An `<Example>` MUST render a component in the `lib` directory beside the page that embeds it,
|
|
2517
|
+
and that component's handlers, hooks and data MUST be in its own file, save a file the example is
|
|
2518
|
+
about.
|
|
2504
2519
|
|
|
2505
|
-
40.35 A page's `.md` twin MUST be derived from what its `
|
|
2520
|
+
40.35 A page's `.md` twin MUST be derived from what its `index.abide` renders.
|
|
2506
2521
|
|
|
2507
2522
|
# 41. Rendering and hydration
|
|
2508
2523
|
|