@mistriwork/engine 0.0.0-stage → 1.0.0-rc.10

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 (546) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +17 -2
  3. package/dist/adapters/adapter.d.ts +693 -0
  4. package/dist/adapters/adapter.js +444 -0
  5. package/dist/adapters/cache/cacheStore.d.ts +75 -0
  6. package/dist/adapters/cache/cacheStore.js +160 -0
  7. package/dist/adapters/cache/resp.d.ts +52 -0
  8. package/dist/adapters/cache/resp.js +237 -0
  9. package/dist/adapters/commands/canonicalJson.d.ts +19 -0
  10. package/dist/adapters/commands/canonicalJson.js +154 -0
  11. package/dist/adapters/connect.d.ts +29 -0
  12. package/dist/adapters/connect.js +40 -0
  13. package/dist/adapters/connectionBudget.d.ts +101 -0
  14. package/dist/adapters/connectionBudget.js +128 -0
  15. package/dist/adapters/dbLatency.d.ts +35 -0
  16. package/dist/adapters/dbLatency.js +79 -0
  17. package/dist/adapters/epochCache.d.ts +50 -0
  18. package/dist/adapters/epochCache.js +85 -0
  19. package/dist/adapters/http/egress.d.ts +48 -0
  20. package/dist/adapters/http/egress.js +175 -0
  21. package/dist/adapters/http/httpAdapter.d.ts +71 -0
  22. package/dist/adapters/http/httpAdapter.js +512 -0
  23. package/dist/adapters/http/httpDescription.d.ts +32 -0
  24. package/dist/adapters/http/httpDescription.js +246 -0
  25. package/dist/adapters/http/openapi.d.ts +98 -0
  26. package/dist/adapters/http/openapi.js +487 -0
  27. package/dist/adapters/layoutRefusal.d.ts +24 -0
  28. package/dist/adapters/layoutRefusal.js +35 -0
  29. package/dist/adapters/net/networkPolicy.d.ts +44 -0
  30. package/dist/adapters/net/networkPolicy.js +123 -0
  31. package/dist/adapters/net/untrustedDatabase.d.ts +18 -0
  32. package/dist/adapters/net/untrustedDatabase.js +120 -0
  33. package/dist/adapters/poolAdmission.d.ts +43 -0
  34. package/dist/adapters/poolAdmission.js +184 -0
  35. package/dist/adapters/poolMetrics.d.ts +121 -0
  36. package/dist/adapters/poolMetrics.js +185 -0
  37. package/dist/adapters/postgres.d.ts +436 -0
  38. package/dist/adapters/postgres.js +1890 -0
  39. package/dist/adapters/postgresCatalog.d.ts +96 -0
  40. package/dist/adapters/postgresCatalog.js +387 -0
  41. package/dist/adapters/postgresCatalogDigest.d.ts +30 -0
  42. package/dist/adapters/postgresCatalogDigest.js +87 -0
  43. package/dist/adapters/postgresCatalogRows.d.ts +62 -0
  44. package/dist/adapters/postgresCatalogRows.js +37 -0
  45. package/dist/adapters/postgresDates.d.ts +1 -0
  46. package/dist/adapters/postgresDates.js +39 -0
  47. package/dist/adapters/postgresMaintenance.d.ts +33 -0
  48. package/dist/adapters/postgresMaintenance.js +179 -0
  49. package/dist/adapters/postgresPool.d.ts +255 -0
  50. package/dist/adapters/postgresPool.js +838 -0
  51. package/dist/adapters/postgresPooler.d.ts +28 -0
  52. package/dist/adapters/postgresPooler.js +267 -0
  53. package/dist/adapters/postgresReadCatalog.d.ts +31 -0
  54. package/dist/adapters/postgresReadCatalog.js +226 -0
  55. package/dist/adapters/postgresReadSnapshot.d.ts +46 -0
  56. package/dist/adapters/postgresReadSnapshot.js +133 -0
  57. package/dist/adapters/postgresSchemaEpoch.d.ts +24 -0
  58. package/dist/adapters/postgresSchemaEpoch.js +149 -0
  59. package/dist/adapters/postgresTransactionHandle.d.ts +173 -0
  60. package/dist/adapters/postgresTransactionHandle.js +524 -0
  61. package/dist/adapters/postgresValues.d.ts +30 -0
  62. package/dist/adapters/postgresValues.js +75 -0
  63. package/dist/adapters/replicas.d.ts +70 -0
  64. package/dist/adapters/replicas.js +208 -0
  65. package/dist/adapters/reservedSql.d.ts +38 -0
  66. package/dist/adapters/reservedSql.js +264 -0
  67. package/dist/adapters/rolePrivileges.d.ts +17 -0
  68. package/dist/adapters/rolePrivileges.js +22 -0
  69. package/dist/adapters/scoped/keyRows.d.ts +65 -0
  70. package/dist/adapters/scoped/keyRows.js +173 -0
  71. package/dist/adapters/scoped/postgresScopeCatalog.d.ts +16 -0
  72. package/dist/adapters/scoped/postgresScopeCatalog.js +117 -0
  73. package/dist/adapters/scoped/scopedCommandOperations.d.ts +5 -0
  74. package/dist/adapters/scoped/scopedCommandOperations.js +48 -0
  75. package/dist/adapters/scoped/scopedReads.d.ts +20 -0
  76. package/dist/adapters/scoped/scopedReads.js +174 -0
  77. package/dist/adapters/scoped/scopedTransaction.d.ts +89 -0
  78. package/dist/adapters/scoped/scopedTransaction.js +303 -0
  79. package/dist/adapters/scoped/sqliteScopeCatalog.d.ts +16 -0
  80. package/dist/adapters/scoped/sqliteScopeCatalog.js +241 -0
  81. package/dist/adapters/scoped/updateGuard.d.ts +3 -0
  82. package/dist/adapters/scoped/updateGuard.js +40 -0
  83. package/dist/adapters/serverSettings.d.ts +45 -0
  84. package/dist/adapters/serverSettings.js +46 -0
  85. package/dist/adapters/sqlite.d.ts +262 -0
  86. package/dist/adapters/sqlite.js +1434 -0
  87. package/dist/adapters/sqliteCostlyReads.d.ts +33 -0
  88. package/dist/adapters/sqliteCostlyReads.js +49 -0
  89. package/dist/adapters/sqliteDecimals.d.ts +22 -0
  90. package/dist/adapters/sqliteDecimals.js +57 -0
  91. package/dist/adapters/sqliteHandles.d.ts +43 -0
  92. package/dist/adapters/sqliteHandles.js +143 -0
  93. package/dist/adapters/sqliteStatementProcess.d.ts +29 -0
  94. package/dist/adapters/sqliteStatementProcess.js +131 -0
  95. package/dist/adapters/statementControl.d.ts +34 -0
  96. package/dist/adapters/statementControl.js +90 -0
  97. package/dist/adapters/storeHost.d.ts +130 -0
  98. package/dist/adapters/storeHost.js +13 -0
  99. package/dist/adapters/telemetry/drivers.d.ts +21 -0
  100. package/dist/adapters/telemetry/drivers.js +321 -0
  101. package/dist/adapters/telemetry/metrics.d.ts +63 -0
  102. package/dist/adapters/telemetry/metrics.js +122 -0
  103. package/dist/adapters/telemetry/otlp.d.ts +12 -0
  104. package/dist/adapters/telemetry/otlp.js +320 -0
  105. package/dist/adapters/telemetry/otlpEncode.d.ts +48 -0
  106. package/dist/adapters/telemetry/otlpEncode.js +366 -0
  107. package/dist/adapters/telemetry/otlpEnv.d.ts +1 -0
  108. package/dist/adapters/telemetry/otlpEnv.js +12 -0
  109. package/dist/adapters/telemetry/serverTiming.d.ts +83 -0
  110. package/dist/adapters/telemetry/serverTiming.js +503 -0
  111. package/dist/adapters/telemetry/start.d.ts +10 -0
  112. package/dist/adapters/telemetry/start.js +25 -0
  113. package/dist/adapters/telemetry/statement.d.ts +16 -0
  114. package/dist/adapters/telemetry/statement.js +134 -0
  115. package/dist/adapters/telemetry/trace.d.ts +127 -0
  116. package/dist/adapters/telemetry/trace.js +295 -0
  117. package/dist/adapters/writeAhead.d.ts +27 -0
  118. package/dist/adapters/writeAhead.js +46 -0
  119. package/dist/adapters/writeAttribution.d.ts +18 -0
  120. package/dist/adapters/writeAttribution.js +23 -0
  121. package/dist/adapters/writeCapture.d.ts +73 -0
  122. package/dist/adapters/writeCapture.js +20 -0
  123. package/dist/adapters/writeLanes.d.ts +94 -0
  124. package/dist/adapters/writeLanes.js +232 -0
  125. package/dist/engine.d.ts +15 -0
  126. package/dist/engine.js +13 -0
  127. package/dist/server/auth/credentials.d.ts +61 -0
  128. package/dist/server/auth/credentials.js +260 -0
  129. package/dist/server/cacheService.d.ts +50 -0
  130. package/dist/server/cacheService.js +110 -0
  131. package/dist/server/cli/args.d.ts +176 -0
  132. package/dist/server/cli/args.js +342 -0
  133. package/dist/server/cli/bin.d.ts +5 -0
  134. package/dist/server/cli/bin.js +66 -0
  135. package/dist/server/cli/browser.d.ts +15 -0
  136. package/dist/server/cli/browser.js +37 -0
  137. package/dist/server/cli/config.d.ts +50 -0
  138. package/dist/server/cli/config.js +206 -0
  139. package/dist/server/cli/startup.d.ts +36 -0
  140. package/dist/server/cli/startup.js +128 -0
  141. package/dist/server/cli/startupOptions.d.ts +63 -0
  142. package/dist/server/cli/startupOptions.js +143 -0
  143. package/dist/server/cli/subcommand.d.ts +28 -0
  144. package/dist/server/cli/subcommand.js +32 -0
  145. package/dist/server/cli/usage.d.ts +13 -0
  146. package/dist/server/cli/usage.js +31 -0
  147. package/dist/server/clientHttp.d.ts +184 -0
  148. package/dist/server/clientHttp.js +700 -0
  149. package/dist/server/clientSurface.d.ts +128 -0
  150. package/dist/server/clientSurface.js +182 -0
  151. package/dist/server/columnGrants.d.ts +103 -0
  152. package/dist/server/columnGrants.js +730 -0
  153. package/dist/server/compileCache.d.ts +1 -0
  154. package/dist/server/compileCache.js +30 -0
  155. package/dist/server/config/locations.d.ts +1 -0
  156. package/dist/server/config/locations.js +15 -0
  157. package/dist/server/configPaths.d.ts +7 -0
  158. package/dist/server/configPaths.js +34 -0
  159. package/dist/server/configSections.d.ts +64 -0
  160. package/dist/server/configSections.js +72 -0
  161. package/dist/server/connectionRedaction.d.ts +30 -0
  162. package/dist/server/connectionRedaction.js +77 -0
  163. package/dist/server/connections.d.ts +353 -0
  164. package/dist/server/connections.js +978 -0
  165. package/dist/server/constraints.d.ts +82 -0
  166. package/dist/server/constraints.js +169 -0
  167. package/dist/server/demo.d.ts +9 -0
  168. package/dist/server/demo.js +554 -0
  169. package/dist/server/devclient.d.ts +108 -0
  170. package/dist/server/devclient.js +361 -0
  171. package/dist/server/evidence.d.ts +55 -0
  172. package/dist/server/evidence.js +323 -0
  173. package/dist/server/hiddenColumns.d.ts +32 -0
  174. package/dist/server/hiddenColumns.js +238 -0
  175. package/dist/server/http/baselineHeaders.d.ts +24 -0
  176. package/dist/server/http/baselineHeaders.js +12 -0
  177. package/dist/server/http/captured.d.ts +35 -0
  178. package/dist/server/http/captured.js +73 -0
  179. package/dist/server/http/clock.d.ts +1 -0
  180. package/dist/server/http/clock.js +14 -0
  181. package/dist/server/http/connectionSource.d.ts +4 -0
  182. package/dist/server/http/connectionSource.js +48 -0
  183. package/dist/server/http/context.d.ts +189 -0
  184. package/dist/server/http/context.js +11 -0
  185. package/dist/server/http/crawlerText.d.ts +15 -0
  186. package/dist/server/http/crawlerText.js +32 -0
  187. package/dist/server/http/dataRoutes.d.ts +88 -0
  188. package/dist/server/http/dataRoutes.js +137 -0
  189. package/dist/server/http/door.d.ts +57 -0
  190. package/dist/server/http/door.js +39 -0
  191. package/dist/server/http/exportRoute.d.ts +15 -0
  192. package/dist/server/http/exportRoute.js +320 -0
  193. package/dist/server/http/firstPaint.d.ts +108 -0
  194. package/dist/server/http/firstPaint.js +262 -0
  195. package/dist/server/http/httpOperationRoutes.d.ts +11 -0
  196. package/dist/server/http/httpOperationRoutes.js +50 -0
  197. package/dist/server/http/pageReads.d.ts +20 -0
  198. package/dist/server/http/pageReads.js +205 -0
  199. package/dist/server/http/pageRoutes.d.ts +39 -0
  200. package/dist/server/http/pageRoutes.js +291 -0
  201. package/dist/server/http/probes.d.ts +22 -0
  202. package/dist/server/http/probes.js +27 -0
  203. package/dist/server/http/rateLimit.d.ts +131 -0
  204. package/dist/server/http/rateLimit.js +351 -0
  205. package/dist/server/http/readRoutes.d.ts +9 -0
  206. package/dist/server/http/readRoutes.js +131 -0
  207. package/dist/server/http/readRouting.d.ts +20 -0
  208. package/dist/server/http/readRouting.js +80 -0
  209. package/dist/server/http/recordCompose.d.ts +67 -0
  210. package/dist/server/http/recordCompose.js +167 -0
  211. package/dist/server/http/recordWrites.d.ts +89 -0
  212. package/dist/server/http/recordWrites.js +298 -0
  213. package/dist/server/http/refusalReport.d.ts +38 -0
  214. package/dist/server/http/refusalReport.js +63 -0
  215. package/dist/server/http/reply.d.ts +130 -0
  216. package/dist/server/http/reply.js +394 -0
  217. package/dist/server/http/requestOrigin.d.ts +11 -0
  218. package/dist/server/http/requestOrigin.js +8 -0
  219. package/dist/server/http/router.d.ts +45 -0
  220. package/dist/server/http/router.js +22 -0
  221. package/dist/server/http/serverCore.d.ts +68 -0
  222. package/dist/server/http/serverCore.js +177 -0
  223. package/dist/server/http/traceRequest.d.ts +30 -0
  224. package/dist/server/http/traceRequest.js +224 -0
  225. package/dist/server/http/trust.d.ts +261 -0
  226. package/dist/server/http/trust.js +472 -0
  227. package/dist/server/http/writeRefusal.d.ts +33 -0
  228. package/dist/server/http/writeRefusal.js +24 -0
  229. package/dist/server/httpConnection.d.ts +49 -0
  230. package/dist/server/httpConnection.js +170 -0
  231. package/dist/server/impact.d.ts +55 -0
  232. package/dist/server/impact.js +47 -0
  233. package/dist/server/journal.d.ts +134 -0
  234. package/dist/server/journal.js +398 -0
  235. package/dist/server/keysetReadHttp.d.ts +52 -0
  236. package/dist/server/keysetReadHttp.js +85 -0
  237. package/dist/server/layouts.d.ts +49 -0
  238. package/dist/server/layouts.js +192 -0
  239. package/dist/server/migrate/cli.d.ts +55 -0
  240. package/dist/server/migrate/cli.js +517 -0
  241. package/dist/server/migrate/database.d.ts +37 -0
  242. package/dist/server/migrate/database.js +247 -0
  243. package/dist/server/migrate/desired.d.ts +76 -0
  244. package/dist/server/migrate/desired.js +292 -0
  245. package/dist/server/migrate/files.d.ts +34 -0
  246. package/dist/server/migrate/files.js +141 -0
  247. package/dist/server/migrate/flyway.d.ts +7 -0
  248. package/dist/server/migrate/flyway.js +69 -0
  249. package/dist/server/migrate/history.d.ts +70 -0
  250. package/dist/server/migrate/history.js +211 -0
  251. package/dist/server/migrate/runner.d.ts +100 -0
  252. package/dist/server/migrate/runner.js +409 -0
  253. package/dist/server/migrate/snapshot.d.ts +30 -0
  254. package/dist/server/migrate/snapshot.js +239 -0
  255. package/dist/server/migrate/target.d.ts +33 -0
  256. package/dist/server/migrate/target.js +82 -0
  257. package/dist/server/openapiDraft.d.ts +25 -0
  258. package/dist/server/openapiDraft.js +171 -0
  259. package/dist/server/operations/diagnostics.d.ts +101 -0
  260. package/dist/server/operations/diagnostics.js +284 -0
  261. package/dist/server/operations/requestMetrics.d.ts +33 -0
  262. package/dist/server/operations/requestMetrics.js +94 -0
  263. package/dist/server/packageVersion.d.ts +1 -0
  264. package/dist/server/packageVersion.js +11 -0
  265. package/dist/server/poolConfig.d.ts +34 -0
  266. package/dist/server/poolConfig.js +114 -0
  267. package/dist/server/product.d.ts +20 -0
  268. package/dist/server/product.js +12 -0
  269. package/dist/server/recordHistoryOperations.d.ts +39 -0
  270. package/dist/server/recordHistoryOperations.js +43 -0
  271. package/dist/server/recordWriteOperations.d.ts +111 -0
  272. package/dist/server/recordWriteOperations.js +329 -0
  273. package/dist/server/resourceReadHttp.d.ts +81 -0
  274. package/dist/server/resourceReadHttp.js +606 -0
  275. package/dist/server/resourceReadOperations.d.ts +147 -0
  276. package/dist/server/resourceReadOperations.js +452 -0
  277. package/dist/server/scaffoldMachine.d.ts +54 -0
  278. package/dist/server/scaffoldMachine.js +184 -0
  279. package/dist/server/seed/cli.d.ts +20 -0
  280. package/dist/server/seed/cli.js +164 -0
  281. package/dist/server/seed/lexicon.d.ts +26 -0
  282. package/dist/server/seed/lexicon.js +585 -0
  283. package/dist/server/seed/seed.d.ts +70 -0
  284. package/dist/server/seed/seed.js +779 -0
  285. package/dist/server/seed/words.d.ts +21 -0
  286. package/dist/server/seed/words.js +164 -0
  287. package/dist/server/serverRequests.d.ts +6 -0
  288. package/dist/server/serverRequests.js +33 -0
  289. package/dist/server/serverTimeouts.d.ts +33 -0
  290. package/dist/server/serverTimeouts.js +32 -0
  291. package/dist/server/shapeonly.d.ts +32 -0
  292. package/dist/server/shapeonly.js +110 -0
  293. package/dist/server/startupWarnings.d.ts +32 -0
  294. package/dist/server/startupWarnings.js +92 -0
  295. package/dist/shared/addressParams.d.ts +28 -0
  296. package/dist/shared/addressParams.js +47 -0
  297. package/dist/shared/appCards.d.ts +123 -0
  298. package/dist/shared/appCards.js +385 -0
  299. package/dist/shared/appComponents.d.ts +177 -0
  300. package/dist/shared/appComponents.js +422 -0
  301. package/dist/shared/appDocuments.d.ts +43 -0
  302. package/dist/shared/appDocuments.js +131 -0
  303. package/dist/shared/appEmbeds.d.ts +21 -0
  304. package/dist/shared/appEmbeds.js +24 -0
  305. package/dist/shared/appIcons.d.ts +28 -0
  306. package/dist/shared/appIcons.js +223 -0
  307. package/dist/shared/appLinks.d.ts +17 -0
  308. package/dist/shared/appLinks.js +124 -0
  309. package/dist/shared/appListColumns.d.ts +3 -0
  310. package/dist/shared/appListColumns.js +66 -0
  311. package/dist/shared/appLocale.d.ts +36 -0
  312. package/dist/shared/appLocale.js +86 -0
  313. package/dist/shared/appMessages.d.ts +44 -0
  314. package/dist/shared/appMessages.js +78 -0
  315. package/dist/shared/appNoun.d.ts +21 -0
  316. package/dist/shared/appNoun.js +32 -0
  317. package/dist/shared/autoBucket.d.ts +98 -0
  318. package/dist/shared/autoBucket.js +305 -0
  319. package/dist/shared/autoValues.d.ts +25 -0
  320. package/dist/shared/autoValues.js +25 -0
  321. package/dist/shared/breakdown.d.ts +228 -0
  322. package/dist/shared/breakdown.js +557 -0
  323. package/dist/shared/breakdowntext.d.ts +41 -0
  324. package/dist/shared/breakdowntext.js +400 -0
  325. package/dist/shared/builtInThemes.d.ts +2 -0
  326. package/dist/shared/builtInThemes.js +771 -0
  327. package/dist/shared/chartSeparation.d.ts +11 -0
  328. package/dist/shared/chartSeparation.js +58 -0
  329. package/dist/shared/clauses.d.ts +22 -0
  330. package/dist/shared/clauses.js +97 -0
  331. package/dist/shared/columnCaption.d.ts +16 -0
  332. package/dist/shared/columnCaption.js +90 -0
  333. package/dist/shared/commandFieldPath.d.ts +2 -0
  334. package/dist/shared/commandFieldPath.js +7 -0
  335. package/dist/shared/commandWire.d.ts +26 -0
  336. package/dist/shared/commandWire.js +41 -0
  337. package/dist/shared/computed.d.ts +161 -0
  338. package/dist/shared/computed.js +378 -0
  339. package/dist/shared/computedParse.d.ts +13 -0
  340. package/dist/shared/computedParse.js +278 -0
  341. package/dist/shared/computedValue.d.ts +47 -0
  342. package/dist/shared/computedValue.js +191 -0
  343. package/dist/shared/connection.d.ts +30 -0
  344. package/dist/shared/connection.js +1 -0
  345. package/dist/shared/csv.d.ts +20 -0
  346. package/dist/shared/csv.js +63 -0
  347. package/dist/shared/dashLayout.d.ts +30 -0
  348. package/dist/shared/dashLayout.js +132 -0
  349. package/dist/shared/dashboardAsks.d.ts +93 -0
  350. package/dist/shared/dashboardAsks.js +129 -0
  351. package/dist/shared/dashboardTrend.d.ts +20 -0
  352. package/dist/shared/dashboardTrend.js +50 -0
  353. package/dist/shared/declaredReferences.d.ts +50 -0
  354. package/dist/shared/declaredReferences.js +202 -0
  355. package/dist/shared/definedFields.d.ts +63 -0
  356. package/dist/shared/definedFields.js +103 -0
  357. package/dist/shared/definedValues.d.ts +63 -0
  358. package/dist/shared/definedValues.js +184 -0
  359. package/dist/shared/displayDefaults.d.ts +135 -0
  360. package/dist/shared/displayDefaults.js +529 -0
  361. package/dist/shared/dueDate.d.ts +6 -0
  362. package/dist/shared/dueDate.js +6 -0
  363. package/dist/shared/duration.d.ts +4 -0
  364. package/dist/shared/duration.js +23 -0
  365. package/dist/shared/fileBounds.d.ts +9 -0
  366. package/dist/shared/fileBounds.js +9 -0
  367. package/dist/shared/filter.d.ts +217 -0
  368. package/dist/shared/filter.js +305 -0
  369. package/dist/shared/firstPaint.d.ts +24 -0
  370. package/dist/shared/firstPaint.js +33 -0
  371. package/dist/shared/form.d.ts +21 -0
  372. package/dist/shared/form.js +25 -0
  373. package/dist/shared/formValues.d.ts +104 -0
  374. package/dist/shared/formValues.js +352 -0
  375. package/dist/shared/funnel.d.ts +45 -0
  376. package/dist/shared/funnel.js +108 -0
  377. package/dist/shared/httpOperations.d.ts +48 -0
  378. package/dist/shared/httpOperations.js +9 -0
  379. package/dist/shared/iconGlyphs.d.ts +4 -0
  380. package/dist/shared/iconGlyphs.js +151 -0
  381. package/dist/shared/iconWeights.d.ts +3 -0
  382. package/dist/shared/iconWeights.js +162 -0
  383. package/dist/shared/imageWidths.d.ts +32 -0
  384. package/dist/shared/imageWidths.js +38 -0
  385. package/dist/shared/keysetPage.d.ts +64 -0
  386. package/dist/shared/keysetPage.js +161 -0
  387. package/dist/shared/like.d.ts +20 -0
  388. package/dist/shared/like.js +29 -0
  389. package/dist/shared/listEmpty.d.ts +12 -0
  390. package/dist/shared/listEmpty.js +36 -0
  391. package/dist/shared/listFilters.d.ts +28 -0
  392. package/dist/shared/listFilters.js +84 -0
  393. package/dist/shared/listPresentations.d.ts +199 -0
  394. package/dist/shared/listPresentations.js +7 -0
  395. package/dist/shared/listQuestion.d.ts +52 -0
  396. package/dist/shared/listQuestion.js +137 -0
  397. package/dist/shared/lookPalettes.d.ts +62 -0
  398. package/dist/shared/lookPalettes.js +306 -0
  399. package/dist/shared/maskQuoted.d.ts +24 -0
  400. package/dist/shared/maskQuoted.js +48 -0
  401. package/dist/shared/mentionLabel.d.ts +19 -0
  402. package/dist/shared/mentionLabel.js +38 -0
  403. package/dist/shared/mentionLookup.d.ts +17 -0
  404. package/dist/shared/mentionLookup.js +64 -0
  405. package/dist/shared/menuCounts.d.ts +16 -0
  406. package/dist/shared/menuCounts.js +74 -0
  407. package/dist/shared/model.d.ts +79 -0
  408. package/dist/shared/model.js +153 -0
  409. package/dist/shared/money.d.ts +44 -0
  410. package/dist/shared/money.js +81 -0
  411. package/dist/shared/moneyEntry.d.ts +7 -0
  412. package/dist/shared/moneyEntry.js +27 -0
  413. package/dist/shared/mount.d.ts +118 -0
  414. package/dist/shared/mount.js +248 -0
  415. package/dist/shared/niceTicks.d.ts +26 -0
  416. package/dist/shared/niceTicks.js +50 -0
  417. package/dist/shared/order.d.ts +59 -0
  418. package/dist/shared/order.js +133 -0
  419. package/dist/shared/page.d.ts +135 -0
  420. package/dist/shared/page.js +1187 -0
  421. package/dist/shared/pageAnatomy.d.ts +99 -0
  422. package/dist/shared/pageAnatomy.js +370 -0
  423. package/dist/shared/pageConfig.d.ts +25 -0
  424. package/dist/shared/pageConfig.js +1308 -0
  425. package/dist/shared/pageEmptyActions.d.ts +12 -0
  426. package/dist/shared/pageEmptyActions.js +20 -0
  427. package/dist/shared/pageLayouts.d.ts +72 -0
  428. package/dist/shared/pageLayouts.js +205 -0
  429. package/dist/shared/pageModel.d.ts +785 -0
  430. package/dist/shared/pageModel.js +121 -0
  431. package/dist/shared/pagePaths.d.ts +180 -0
  432. package/dist/shared/pagePaths.js +869 -0
  433. package/dist/shared/pagePlans.d.ts +52 -0
  434. package/dist/shared/pagePlans.js +108 -0
  435. package/dist/shared/pageRoutes.d.ts +9 -0
  436. package/dist/shared/pageRoutes.js +9 -0
  437. package/dist/shared/query.d.ts +166 -0
  438. package/dist/shared/query.js +1302 -0
  439. package/dist/shared/queryDates.d.ts +12 -0
  440. package/dist/shared/queryDates.js +101 -0
  441. package/dist/shared/queryOperands.d.ts +99 -0
  442. package/dist/shared/queryOperands.js +131 -0
  443. package/dist/shared/reads.d.ts +103 -0
  444. package/dist/shared/reads.js +154 -0
  445. package/dist/shared/recordLabel.d.ts +51 -0
  446. package/dist/shared/recordLabel.js +123 -0
  447. package/dist/shared/recordReadKeys.d.ts +30 -0
  448. package/dist/shared/recordReadKeys.js +51 -0
  449. package/dist/shared/recordReads.d.ts +268 -0
  450. package/dist/shared/recordReads.js +368 -0
  451. package/dist/shared/recordview.d.ts +198 -0
  452. package/dist/shared/recordview.js +356 -0
  453. package/dist/shared/referenceModel.d.ts +58 -0
  454. package/dist/shared/referenceModel.js +194 -0
  455. package/dist/shared/refusal.d.ts +64 -0
  456. package/dist/shared/refusal.js +144 -0
  457. package/dist/shared/relatedCreate.d.ts +30 -0
  458. package/dist/shared/relatedCreate.js +162 -0
  459. package/dist/shared/resourceHttp.d.ts +464 -0
  460. package/dist/shared/resourceHttp.js +1 -0
  461. package/dist/shared/richText.d.ts +85 -0
  462. package/dist/shared/richText.js +305 -0
  463. package/dist/shared/rollups.d.ts +143 -0
  464. package/dist/shared/rollups.js +64 -0
  465. package/dist/shared/rowScope.d.ts +72 -0
  466. package/dist/shared/rowScope.js +376 -0
  467. package/dist/shared/runtimeTables.d.ts +44 -0
  468. package/dist/shared/runtimeTables.js +79 -0
  469. package/dist/shared/schema.d.ts +523 -0
  470. package/dist/shared/schema.js +627 -0
  471. package/dist/shared/schematext.d.ts +38 -0
  472. package/dist/shared/schematext.js +101 -0
  473. package/dist/shared/scopeCatalog.d.ts +29 -0
  474. package/dist/shared/scopeCatalog.js +468 -0
  475. package/dist/shared/servedApp.d.ts +681 -0
  476. package/dist/shared/servedApp.js +45 -0
  477. package/dist/shared/sessionLease.d.ts +34 -0
  478. package/dist/shared/sessionLease.js +3 -0
  479. package/dist/shared/shape.d.ts +55 -0
  480. package/dist/shared/shape.js +168 -0
  481. package/dist/shared/slug.d.ts +1 -0
  482. package/dist/shared/slug.js +12 -0
  483. package/dist/shared/sortText.d.ts +14 -0
  484. package/dist/shared/sortText.js +26 -0
  485. package/dist/shared/sqlRelation.d.ts +4 -0
  486. package/dist/shared/sqlRelation.js +8 -0
  487. package/dist/shared/sqlsaved.d.ts +44 -0
  488. package/dist/shared/sqlsaved.js +63 -0
  489. package/dist/shared/stitchedPaths.d.ts +27 -0
  490. package/dist/shared/stitchedPaths.js +38 -0
  491. package/dist/shared/structuredFilter.d.ts +22 -0
  492. package/dist/shared/structuredFilter.js +1 -0
  493. package/dist/shared/subtitlePath.d.ts +20 -0
  494. package/dist/shared/subtitlePath.js +24 -0
  495. package/dist/shared/suggest.d.ts +18 -0
  496. package/dist/shared/suggest.js +59 -0
  497. package/dist/shared/tableSizing.d.ts +4 -0
  498. package/dist/shared/tableSizing.js +9 -0
  499. package/dist/shared/tagLists.d.ts +57 -0
  500. package/dist/shared/tagLists.js +34 -0
  501. package/dist/shared/textRules.d.ts +54 -0
  502. package/dist/shared/textRules.js +133 -0
  503. package/dist/shared/theme.d.ts +94 -0
  504. package/dist/shared/theme.js +800 -0
  505. package/dist/shared/themeColor.d.ts +34 -0
  506. package/dist/shared/themeColor.js +109 -0
  507. package/dist/shared/themeFaces.d.ts +30 -0
  508. package/dist/shared/themeFaces.js +42 -0
  509. package/dist/shared/themeInk.d.ts +20 -0
  510. package/dist/shared/themeInk.js +52 -0
  511. package/dist/shared/themeLooks.d.ts +9 -0
  512. package/dist/shared/themeLooks.js +572 -0
  513. package/dist/shared/themeParts.d.ts +26 -0
  514. package/dist/shared/themeParts.js +71 -0
  515. package/dist/shared/themePartsCheck.d.ts +21 -0
  516. package/dist/shared/themePartsCheck.js +91 -0
  517. package/dist/shared/themePresets.d.ts +85 -0
  518. package/dist/shared/themePresets.js +139 -0
  519. package/dist/shared/themeRecipeWords.d.ts +156 -0
  520. package/dist/shared/themeRecipeWords.js +156 -0
  521. package/dist/shared/themeRecipes.d.ts +213 -0
  522. package/dist/shared/themeRecipes.js +234 -0
  523. package/dist/shared/themeResolve.d.ts +55 -0
  524. package/dist/shared/themeResolve.js +52 -0
  525. package/dist/shared/themeTokens.d.ts +107 -0
  526. package/dist/shared/themeTokens.js +116 -0
  527. package/dist/shared/themeType.d.ts +38 -0
  528. package/dist/shared/themeType.js +205 -0
  529. package/dist/shared/unitWord.d.ts +4 -0
  530. package/dist/shared/unitWord.js +37 -0
  531. package/dist/shared/view.d.ts +195 -0
  532. package/dist/shared/view.js +987 -0
  533. package/dist/shared/viewLabels.d.ts +47 -0
  534. package/dist/shared/viewLabels.js +459 -0
  535. package/dist/shared/viewPaths.d.ts +248 -0
  536. package/dist/shared/viewPaths.js +294 -0
  537. package/dist/shared/viewtext.d.ts +57 -0
  538. package/dist/shared/viewtext.js +282 -0
  539. package/dist/shared/vocabulary.d.ts +71 -0
  540. package/dist/shared/vocabulary.js +249 -0
  541. package/dist/shared/weekStart.d.ts +7 -0
  542. package/dist/shared/weekStart.js +36 -0
  543. package/mark.svg +1 -0
  544. package/package.json +261 -4
  545. package/schema/model.d.ts +298 -0
  546. package/schema/theme.d.ts +587 -0
@@ -0,0 +1,587 @@
1
+ /** Built-in structural styles. Custom themes inherit one without changing app layout. */
2
+ export type ThemeBase = 'workshop' | 'lumen' | 'mono' | 'sage' | 'ledger';
3
+
4
+ /**
5
+ * One mode's colors as a compiled theme holds them: `ThemeColors` flattened, each
6
+ * key its spec path in camel case (`nav.ground` is `navGround`, `status.critical`
7
+ * is `statusCritical`, `chart[0]` is `chart1`) and each worn as the custom property
8
+ * of the same name (`--nav-ground`, `--status-critical`, `--chart-1`). What each
9
+ * color is for is said once, on `ThemeColors`.
10
+ */
11
+ export interface ThemePalette {
12
+ ground?: string;
13
+ surface: string;
14
+ field?: string;
15
+ raised?: string;
16
+ line?: string;
17
+ lineStrong?: string;
18
+ lineControl?: string;
19
+ ink: string;
20
+ inkMuted?: string;
21
+ inkSubtle?: string;
22
+ accent: string;
23
+ onAccent?: string;
24
+ accentInk?: string;
25
+ primary?: string;
26
+ onPrimary?: string;
27
+ focus?: string;
28
+ accentSoft?: string;
29
+ link?: string;
30
+ statusGood?: string;
31
+ statusWarning?: string;
32
+ statusCritical?: string;
33
+ statusInfo?: string;
34
+ navGround?: string;
35
+ navInk?: string;
36
+ navMuted?: string;
37
+ navLine?: string;
38
+ navAccent?: string;
39
+ navCurrent?: string;
40
+ navOnCurrent?: string;
41
+ rulesSection?: string;
42
+ rulesHead?: string;
43
+ shadow?: string;
44
+ band?: string;
45
+ rulesWeight?: '1px' | '2px' | '3px';
46
+ rulesControl?: '0px' | '1px' | '2px';
47
+ chart1?: string;
48
+ chart2?: string;
49
+ chart3?: string;
50
+ chart4?: string;
51
+ chart5?: string;
52
+ chart6?: string;
53
+ chart7?: string;
54
+ chart8?: string;
55
+ }
56
+
57
+ /** A color variation, independent of the theme's structure, fonts and radii. */
58
+ export interface ThemePaletteVariant {
59
+ /** Unique within this theme; `default` is reserved for its original colors. */
60
+ id: string;
61
+ label: string;
62
+ /** Omitted roles inherit this theme's original mode, then its structural base. */
63
+ light: Partial<ThemePalette>;
64
+ dark: Partial<ThemePalette>;
65
+ }
66
+
67
+ export interface ThemeDefinition {
68
+ /** Unique lowercase slug, not a built-in theme name. */
69
+ id: string;
70
+ label: string;
71
+ base?: ThemeBase;
72
+ /** Opaque six-digit hex colors. Omitted roles inherit the base style. */
73
+ light: ThemePalette;
74
+ dark: ThemePalette;
75
+ /** At most 20 named color variations. Existing light/dark remain the Default palette. */
76
+ palettes?: readonly ThemePaletteVariant[];
77
+ /** Initial palette id; omitted or `default` selects the original light/dark pair. */
78
+ defaultPalette?: string;
79
+ /** `dark`: worn dark until the reader picks a mode. `dark-only`: no light colors of its own — `light` is the dark
80
+ ones, and nothing turns it light. Omitted, it follows the reader and their machine. */
81
+ scheme?: 'dark' | 'dark-only';
82
+ /** CSS font-family stacks, each over the machine's faces or the theme's own (`faces`). */
83
+ fonts?: { ui?: string; data?: string; heading?: string; code?: string };
84
+ /** The font files the theme ships, from the App's directory: each an `@font-face` the page declares. */
85
+ faces?: readonly ThemeFaceDefinition[];
86
+ /** Pixel lengths: a control's up to 16px, a field's and a pill's up to 12px, a panel's up to 20px; `999px` is a
87
+ control's or a pill's `round`. */
88
+ radius?: { control?: string; field?: string; pill?: string; panel?: string };
89
+ /** A panel's edge and the focus ring's width; a rule's and a control's are each mode's `rulesWeight`/`rulesControl`. */
90
+ border?: { panel?: '0px' | '1px' | '2px'; focus?: '2px' | '3px' };
91
+ /** A control's height (`shape.height.control`), a length from 32px to 56px. */
92
+ height?: { control?: string };
93
+ /** Each part's treatment, from the closed menu (`ThemeRecipes`). Omitted parts take the base's. */
94
+ recipes?: ThemeRecipes;
95
+ /** How panels and popups stand off the page, as a look draws it. Omitted, the base's. */
96
+ elevation?: ThemeElevation;
97
+ /** A step for cards and one for what floats, over the elevation's own (`ThemeLifts`). Omitted, the base's. */
98
+ lifts?: ThemeLifts;
99
+ /** The base size and each type role's own (`ThemeTypeDefinition`). Omitted roles take the base's. */
100
+ type?: ThemeTypeDefinition;
101
+ /** How fast things enter: `house`, `brisk` or `still`. Omitted, the base's (house). */
102
+ motion?: ThemeMotion;
103
+ /** How far apart things stand: `tight`, `house` or `airy`. Omitted, the base's (house). */
104
+ rhythm?: ThemeRhythm;
105
+ /** The density a reader sees until they pick their own. Omitted, comfortable. */
106
+ density?: ThemeDensity;
107
+ /** Where the theme would draw the menu, when it is the App's own (`ui.theme.preset`); `ui.shell.placement` wins. */
108
+ shell?: { placement: 'side' | 'top' };
109
+ /** The patterns behind the page and the navigation (`ThemeSurface`). Omitted, none. */
110
+ surface?: ThemeSurface;
111
+ /** Each part's own style (`ThemePartStyle`). */
112
+ parts?: Partial<Record<ThemePart, ThemePartStyle>>;
113
+ /** The icons' weight. Omitted, regular. */
114
+ icons?: ThemeIconWeight;
115
+ /** The theme's own stylesheet, read and scoped (`ThemeSpec.stylesheet`): the file as written, and once the App is
116
+ loaded, where the scoped sheet is served and the pictures it names, by their served names. */
117
+ stylesheet?: { src: string; href?: string; files?: readonly string[] };
118
+ }
119
+
120
+ /**
121
+ * A pattern drawn behind the page or the navigation, never behind a panel or a field: `paper` and `grain` a fine
122
+ * speckle, `grid` squares, `dots` a dot grid, `lines` ruled lines, `scanlines` a screen's. Drawn in the theme's `line`
123
+ * color at `strength` 1, 2 or 3 (omitted, 1); `check` measures text over its darkest point (theme-contrast).
124
+ */
125
+ export interface ThemePattern {
126
+ kind: 'paper' | 'grain' | 'grid' | 'dots' | 'lines' | 'scanlines';
127
+ strength?: 1 | 2 | 3;
128
+ }
129
+ /** Where a theme draws a pattern: `ground`, the page behind the panels; `nav`, behind the menu. */
130
+ export interface ThemeSurface {
131
+ ground?: ThemePattern;
132
+ nav?: ThemePattern;
133
+ }
134
+
135
+ /** The icons' weight, from Phosphor's: `regular` (omitted), `light`, `bold` and `fill`. */
136
+ export type ThemeIconWeight = 'regular' | 'light' | 'bold' | 'fill';
137
+
138
+ /**
139
+ * The published parts of an App's page a theme may style one by one (`parts`) and its stylesheet may name
140
+ * (`[data-part="stat"]`). Contract 1: a 1.x release may publish another part, and withdraws none.
141
+ */
142
+ export type ThemePart =
143
+ | 'ground'
144
+ | 'bar'
145
+ | 'bar.search'
146
+ | 'nav'
147
+ | 'nav.item'
148
+ | 'nav.current'
149
+ | 'nav.group'
150
+ | 'logo'
151
+ | 'page.title'
152
+ | 'tabs'
153
+ | 'tab.current'
154
+ | 'section'
155
+ | 'section.title'
156
+ | 'stat'
157
+ | 'stat.figure'
158
+ | 'fields'
159
+ | 'field.label'
160
+ | 'table'
161
+ | 'table.head'
162
+ | 'table.row'
163
+ | 'status'
164
+ | 'tag'
165
+ | 'button.primary'
166
+ | 'button.secondary'
167
+ | 'button.quiet'
168
+ | 'link'
169
+ | 'board.lane'
170
+ | 'board.card'
171
+ | 'workflow.step'
172
+ | 'banner'
173
+ | 'steps.step'
174
+ | 'avatar'
175
+ | 'menu'
176
+ | 'dialog'
177
+ | 'chart';
178
+
179
+ /** A color role by its path in `colors`: `ink`, `nav.ground`, `status.good`, `chart[2]`. */
180
+ export type ThemeColorPath =
181
+ | 'ground'
182
+ | 'surface'
183
+ | 'raised'
184
+ | 'band'
185
+ | 'ink'
186
+ | 'inkMuted'
187
+ | 'inkSubtle'
188
+ | 'line'
189
+ | 'lineStrong'
190
+ | 'lineControl'
191
+ | 'accent'
192
+ | 'onAccent'
193
+ | 'accentInk'
194
+ | 'accentSoft'
195
+ | 'link'
196
+ | 'focus'
197
+ | `status.${'good' | 'warning' | 'critical' | 'info'}`
198
+ | `nav.${'ground' | 'ink' | 'muted' | 'line' | 'accent' | 'current' | 'onCurrent'}`
199
+ | `rules.${'section' | 'head'}`
200
+ | `chart[${0 | 1 | 2 | 3 | 4 | 5 | 6 | 7}]`;
201
+
202
+ /**
203
+ * One part's style. Its colors are roles, never hex, so `check` measures its ink on its ground in every mode and
204
+ * palette (theme-part); nothing here moves a box: no size, spacing, order or visibility.
205
+ */
206
+ export interface ThemePartStyle {
207
+ /** What it is drawn on. */
208
+ ground?: ThemeColorPath;
209
+ /** Its words; checked at 4.5:1 on its ground (its own, or the one it sits on). */
210
+ ink?: ThemeColorPath;
211
+ /** Its edge, where it draws one. */
212
+ edge?: ThemeColorPath;
213
+ /** Its corner, as one of the theme's: `control`, `field`, `pill`, `panel`, or `square`. */
214
+ radius?: 'control' | 'field' | 'pill' | 'panel' | 'square';
215
+ /** Its lift, a step drawn in the theme's `shadow`. */
216
+ lift?: ThemeLift;
217
+ /** Its face, one of the theme's stacks. */
218
+ face?: 'ui' | 'heading' | 'data';
219
+ weight?: 400 | 500 | 600 | 700;
220
+ case?: 'none' | 'upper' | 'small-caps';
221
+ }
222
+
223
+ /**
224
+ * A font file a theme ships: one `@font-face`. `src` is a `.woff2` or `.woff`
225
+ * file inside the App's directory, written relative to it (`./fonts/x.woff2`);
226
+ * the server serves it from the App's own origin, so nothing is fetched from
227
+ * anywhere else. Name the family in a `type.font` stack to draw in it.
228
+ */
229
+ export interface ThemeFace {
230
+ /** The family name a `type.font` stack names it by. */
231
+ family: string;
232
+ /** The file, relative to the App's directory: `./fonts/workshop-mono.woff2`. */
233
+ src: string;
234
+ /** 100 to 900, or a variable file's range as `"100 900"`. Omitted, 400. */
235
+ weight?: number | string;
236
+ /** Omitted, normal. */
237
+ style?: 'normal' | 'italic';
238
+ /**
239
+ * Omitted, the file is cut to Latin when the App loads — the letters, digits,
240
+ * accents and punctuation of English and the Western European languages — so
241
+ * a whole font's Cyrillic, Greek and Vietnamese are not fetched before a
242
+ * heading can draw. `false` ships the file as it is, for an App written in
243
+ * another script.
244
+ */
245
+ subset?: false;
246
+ }
247
+
248
+ /** A face as compiled: its weight said, and once the App is loaded the name it is served under. */
249
+ export interface ThemeFaceDefinition {
250
+ family: string;
251
+ src: string;
252
+ weight: string;
253
+ style: 'normal' | 'italic';
254
+ /** `false`: served whole, not cut to Latin. */
255
+ subset?: false;
256
+ /** Set by the server when it read the file: `<name>-<hash>.woff2`. */
257
+ file?: string;
258
+ /** Where it is served, as the App's inside address: `/{app}/_fonts/<file>`. */
259
+ href?: string;
260
+ }
261
+
262
+ /**
263
+ * How panels and popups stand off the page, each as its look draws it: `flat` (Mono) no lift at all, `hairline` the
264
+ * platform's (no card lift, a low float), `soft` (Sage) a mid card and a mid float, `raised` (Lumen) a low card and a
265
+ * high float. `{ card, float }` says the steps instead (`ThemeLifts`).
266
+ */
267
+ export type ThemeElevation = 'flat' | 'hairline' | 'soft' | 'raised';
268
+ /** One step of lift, each drawn in the theme's `shadow`: none, a hairline's shade, then a low fall (the platform's
269
+ popups), a mid one (Sage's) and a high one (Lumen's). */
270
+ export type ThemeLift = 'none' | 'hairline' | 'low' | 'mid' | 'high';
271
+ /** A lift for the cards a recipe draws (a section, a field group or a stat boxed by `section`, `fields` or `stat`) and
272
+ one for what floats (a menu, a popover and a drawer, a dialog a step above). Either omitted keeps the look's. */
273
+ export interface ThemeLifts {
274
+ card?: ThemeLift;
275
+ float?: ThemeLift;
276
+ }
277
+ /** How fast things enter: `house` as the platform moves, `brisk` a quarter quicker, `still` with no enter at all, as
278
+ reduced motion draws it. A reader who asks for reduced motion gets `still` under every pace. */
279
+ export type ThemeMotion = 'house' | 'brisk' | 'still';
280
+ /** How far apart things stand: `house` as the platform spaces a page, `tight` its layout steps (16px and up, and the
281
+ section seam) a quarter closer, `airy` a quarter wider. A control's own padding never moves. */
282
+ export type ThemeRhythm = 'tight' | 'house' | 'airy';
283
+ export type ThemeDensity = 'compact' | 'comfortable' | 'spacious';
284
+
285
+ /**
286
+ * The closed menu of treatments a theme picks from, one per part. Every value is
287
+ * one a built-in look wears, or one of the few an App's own theme may (a bar in
288
+ * the navigation's colour, a printed page's rules); an App writes no CSS. The
289
+ * first value of each is the default, the plain structure a theme that extends
290
+ * nothing starts from.
291
+ */
292
+ export interface ThemeRecipes {
293
+ /** The side menu's current entry and its rows. */
294
+ nav?: 'tint' | 'inverted' | 'wash' | 'underline' | 'pill' | 'quiet' | 'slot';
295
+ /** The top bar and its search. */
296
+ bar?: 'plain' | 'ruled' | 'dark' | 'airy' | 'soft';
297
+ /** A record's tabs and the selected tab. */
298
+ tabs?: 'pill' | 'inverted' | 'underline' | 'rule' | 'chosen';
299
+ /** A dashboard's window picker (7 days, 30 days). */
300
+ windows?: 'segmented' | 'lifted' | 'chosen';
301
+ /** A stat card. */
302
+ stat?: 'plain' | 'framed' | 'topline' | 'ruled' | 'icon' | 'panel' | 'divided';
303
+ /** A page section on a dashboard. */
304
+ section?: 'open' | 'card' | 'panel';
305
+ /** A record's field groups and forms; `rail` also sets an aside's cards open, as captioned groups between hairlines. */
306
+ fields?: 'open' | 'panel' | 'card' | 'rail';
307
+ /** A table's rows, hover and selection; `banded` lays every other row on the `band` color. */
308
+ table?: 'open' | 'tinted' | 'hairline' | 'card' | 'quiet' | 'banded';
309
+ /** A status value. */
310
+ status?: 'dot' | 'pill' | 'pill-dot' | 'quiet';
311
+ /** A board's lanes and cards. */
312
+ board?: 'ruled' | 'soft' | 'strip';
313
+ /** A chart's areas and marks. */
314
+ chart?: 'plain' | 'wash' | 'gradient' | 'line';
315
+ /** The primary button. */
316
+ buttons?: 'accent' | 'raised' | 'keyed';
317
+ /** Links in text. */
318
+ links?: 'plain' | 'underline';
319
+ /** A page section's rule: in the ink, a hairline, or a hairline with ruled boxes and double-ruled table heads (Ledger's). */
320
+ rules?: 'ink' | 'hairline' | 'double';
321
+ /** A record's avatar. */
322
+ avatar?: 'plain' | 'large' | 'round';
323
+ /** A workflow's steps. */
324
+ workflow?: 'markers' | 'pills';
325
+ /** A dashboard's banner note: a tint of the accent, a soft gradient across it, or plain on the ground. */
326
+ banner?: 'tint' | 'gradient' | 'plain';
327
+ /** A breakdown drawn as steps: cards on the surface with a hairline, each on a pale tint of its tone, or one strip of figures parted by hairlines, with no cards or marks. */
328
+ steps?: 'flat' | 'tinted' | 'strip';
329
+ /** A board lane's value in its head: its tone's tint, a solid tag in its tone, or its name in plain ink. */
330
+ lanes?: 'tint' | 'tag' | 'plain';
331
+ /** A record's head and a list's (the trail, the title, its status and facts, the verbs and a list's tabs): on the
332
+ page's ground, on a band of the raised ground from edge to edge, or a band with the record's avatar large beside
333
+ its title. It paints the box the page placed: it never moves a region, adds to the head or reorders it. */
334
+ header?: 'plain' | 'band' | 'hero';
335
+ /** A required field's mark: a red star after its label, or the word "(optional)" after the labels of the fields that
336
+ may be left empty (`aria-required` stays either way). The words are the form's, in the reader's language. */
337
+ required?: 'star' | 'optional-word';
338
+ /** A checkbox: the browser's own, or drawn as a square in the field's fill with the control's edge and corner, and
339
+ the accent with a check when on. */
340
+ checkbox?: 'native' | 'drawn';
341
+ /** A multi-step form's step header: plain, or ruled with a hairline under it. */
342
+ formStep?: 'plain' | 'ruled';
343
+ /** A form's sticky action bar: a hairline over the page, or raised on the surface with a soft lift. */
344
+ actionBar?: 'plain' | 'raised';
345
+ }
346
+
347
+ /** A mode's colors, by what they are for. Hex `#rrggbb` only. Each is worn as the custom property of its path
348
+ (`ink` is `--ink`, `nav.ground` is `--nav-ground`), and `check` measures the pairs named here in light, dark
349
+ and every palette. */
350
+ export interface ThemeColors {
351
+ /** The page. */
352
+ ground: string;
353
+ /** Panels and cards. */
354
+ surface: string;
355
+ /** A field's fill: text boxes, selects, pickers. Checked: the `ink` at 4.5:1 on it. Omitted, `surface`. A filled field
356
+ may draw no edge (`shape.border.control: '0px'`) when this fill stands measurably apart from `ground` and
357
+ `surface` (`check` refuses it otherwise). */
358
+ field?: string;
359
+ /** A row's hover, a panel inside a panel. Omitted, a step of the ink into the surface. */
360
+ raised?: string;
361
+ /** Text; checked at 4.5:1 on `surface`, `ground` and `raised`. */
362
+ ink: string;
363
+ /** Secondary text (a caption, a date), checked as the ink is. Omitted, mixed from the ink. */
364
+ inkMuted?: string;
365
+ /** Tertiary text (a count, a hint). Omitted, mixed from the ink. */
366
+ inkSubtle?: string;
367
+ /** Hairlines: decoration, not checked. */
368
+ line?: string;
369
+ /** Emphasized rules. */
370
+ lineStrong?: string;
371
+ /** A form control's edge — text boxes, selects, pickers; checked at 3:1 on `surface` and `ground`. */
372
+ lineControl?: string;
373
+ /** Buttons, the current item, the focus ring unless `focus` says otherwise: the accent as a fill. */
374
+ accent: string;
375
+ /** The words on an accent fill (a button, a selected tab); checked at 4.5:1 on `accent`. Omitted, the `ground`, or
376
+ the `ink`, white or black when `ground` does not read on the accent: a bright brand orange takes dark words. */
377
+ onAccent?: string;
378
+ /** The accent as text — a link-like action, a current tab's word; checked at 4.5:1 on `surface`, `ground` and
379
+ `raised`. Omitted, the accent, or the accent drawn toward the `ink` until it reads: a brand accent can be a
380
+ fill that is too bright to be text. `link` follows it when `link` is omitted. */
381
+ accentInk?: string;
382
+ /** A form's primary action — Continue, Submit, Add — as a fill: every command form, New form and stepper presses in
383
+ it. Omitted, the look's choice (Lumen's ink, so a form says "next" by weight rather than hue; Workshop's, Mono's
384
+ and Sage's accent), following the theme's own `ink` or `accent` where the look's was that color; the `accent` for a theme
385
+ that extends nothing. Name your accent or brand here to have forms press in it. */
386
+ primary?: string;
387
+ /** The words on `primary`; checked at 4.5:1 on it. Omitted, taken as `onAccent` is. Said only beside `primary`. */
388
+ onPrimary?: string;
389
+ /** The accent's tint, under a selected item. Omitted, 12% of the accent. */
390
+ accentSoft?: string;
391
+ /** Links. Omitted, the accent. */
392
+ link?: string;
393
+ /** The keyboard focus ring: a softer, mid-tone tint of the look's hue, drawn 2px round whatever has focus; checked
394
+ at 3:1 on `surface`, `ground` and `raised` (WCAG 1.4.11). Omitted, the accent. */
395
+ focus?: string;
396
+ /** The meaning colors: done, needs attention, failed, for information; each checked at 4.5:1 on the page and a panel. */
397
+ status?: { good?: string; warning?: string; critical?: string; info?: string };
398
+ /** Up to eight chart series, in order. Adjacent series must stay apart for color-blind readers. */
399
+ chart?: readonly string[];
400
+ /**
401
+ * The navigation — the top bar and the side menu, whichever the shell draws. Omitted parts follow the page.
402
+ * `ground` is behind them; `ink` the entries, `muted` a group's heading, a count and an icon, each checked at
403
+ * 4.5:1 on `ground`; `line` their rules; `accent` the current entry's mark; `current` the current entry's block
404
+ * (omitted, the look's own mark for it — an underline, a tint, an inverted block — stands) and `onCurrent` the
405
+ * words on it (omitted, `ink`; checked at 4.5:1 on `current`).
406
+ */
407
+ nav?: { ground?: string; ink?: string; muted?: string; line?: string; accent?: string; current?: string; onCurrent?: string };
408
+ /** `section`: the rule over a page section and a board's lanes; `head`: the rule under a table's column heads (each
409
+ omitted, the ink — near-white in dark mode). How thick they are is `shape.border.rule`. */
410
+ rules?: { section?: string; head?: string };
411
+ /** The ink every lift is mixed from: a card's, a menu's, a dialog's shadow. Omitted, the look's (its ink by day, its
412
+ ground by night). Never lighter than `ground`: a shadow lighter than the page is a glow (theme-shadow). */
413
+ shadow?: string;
414
+ /** Every other row of a `banded` table (`recipes.table`). Omitted, `raised`. Text on it is checked as on `ground`. */
415
+ band?: string;
416
+ }
417
+
418
+ /** A control's height in pixels, 32 to 56. */
419
+ export type ThemeControlHeight = `${32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56}px`;
420
+
421
+ /** A theme's widths (`shape.border`). */
422
+ export interface ThemeBorders {
423
+ rule?: '1px' | '2px' | '3px';
424
+ control?: '0px' | '1px' | '2px';
425
+ panel?: '0px' | '1px' | '2px';
426
+ focus?: '2px' | '3px';
427
+ }
428
+
429
+ /** Partial colors, over a base or the theme's own. */
430
+ export type ThemeColorsOver = Partial<Omit<ThemeColors, 'status' | 'nav' | 'rules' | 'chart'>> & {
431
+ /** Series to replace, in order; `null` keeps that series as it was. */
432
+ chart?: readonly (string | null)[];
433
+ status?: ThemeColors['status'];
434
+ nav?: ThemeColors['nav'];
435
+ rules?: ThemeColors['rules'];
436
+ };
437
+
438
+ /** The size an App's text is drawn at; every size grows with it. */
439
+ export type ThemeTypeBase = '13px' | '14px' | '15px' | '16px';
440
+
441
+ /** The face a role is drawn in: one of the theme's stacks (`fonts`): `code` is its monospace (`fonts.code`, the
442
+ platform's own when the theme names none), for figures and labels as Mono sets them. */
443
+ export type ThemeTypeFace = 'ui' | 'heading' | 'data' | 'code';
444
+ /** Capitals: as written, upper case, or the face's small capitals (all of a word, its capitals included). Either
445
+ capital takes the look's caps tracking unless `tracking` says one. */
446
+ export type ThemeTypeCase = 'none' | 'upper' | 'small-caps';
447
+ /** What the data face sets: every value (`values`, omitted) or only figures, keys and dates (`figures`). */
448
+ export type ThemeTypeReach = 'values' | 'figures';
449
+ /** OpenType features a role turns on: figures (`tnum` tabular, `lnum` lining, `onum` old-style), a slashed `zero`,
450
+ `case`-sensitive forms, and a face's stylistic sets and character variants (`ss01`…`ss20`, `cv01`…`cv99`). */
451
+ export type ThemeTypeFeature = 'tnum' | 'lnum' | 'onum' | 'zero' | 'case' | `ss${number}` | `cv${number}`;
452
+ type TypePx = `${number}px`;
453
+ type TypeEm = `${number}em`;
454
+ type TypeWeight = 400 | 500 | 600 | 700 | 800 | 900;
455
+
456
+ /**
457
+ * Each kind of text, by what it is for. A role says only what differs from the look; its size is the size at the
458
+ * 13px base, and grows with `base`. Body, data, label and navigation text has no size of its own: it follows the
459
+ * base. A weight past 700 is for a face the theme ships at that weight (`type.faces`); `check` warns of one it does
460
+ * not (theme-type).
461
+ */
462
+ export interface ThemeTypeRoles {
463
+ /** A landing's headline: 28px to 56px. Its leading may go down to 0.85; `check` warns under 1.0 (a line that wraps sets its descenders into the next). */
464
+ display?: { face?: ThemeTypeFace; size?: TypePx; leading?: number; tracking?: TypeEm; weight?: TypeWeight; features?: readonly ThemeTypeFeature[] };
465
+ /** A record's and a dashboard's name: 20px to 36px, its leading 0.85 to 1.8 (`check` warns under 1.0). Its weight is every title's (`--heading-weight`). */
466
+ title?: { face?: ThemeTypeFace; size?: TypePx; leading?: number; tracking?: TypeEm; weight?: TypeWeight; case?: ThemeTypeCase; features?: readonly ThemeTypeFeature[] };
467
+ /** A list naming itself over its rows: 16px to 28px. */
468
+ heading?: { face?: ThemeTypeFace; size?: TypePx; leading?: number; tracking?: TypeEm; weight?: TypeWeight; case?: ThemeTypeCase; features?: readonly ThemeTypeFeature[] };
469
+ /** A section's title, on a record and a dashboard: its face, case and features reach both; its size (12px to 20px),
470
+ * tracking and weight reach a dashboard's section title, so a record's section heads keep the field groups' measure. */
471
+ section?: { face?: ThemeTypeFace; size?: TypePx; tracking?: TypeEm; weight?: TypeWeight; case?: ThemeTypeCase; features?: readonly ThemeTypeFeature[] };
472
+ /** Prose, fields and the interface: its leading, 1.35 to 1.8. */
473
+ body?: { leading?: number; features?: readonly ThemeTypeFeature[] };
474
+ /** The short names things are filed under: a column's head, a stat's label, a record's tabs. */
475
+ label?: { face?: ThemeTypeFace; tracking?: TypeEm; weight?: 400 | 500 | 600 | 700; case?: ThemeTypeCase; features?: readonly ThemeTypeFeature[] };
476
+ /** A table's cells and a record's values, in the data face; tabular figures stay. `reach: 'figures'` sets only
477
+ the figures, keys and dates in it (a table's, a field's and a record header's facts), and leaves names and words
478
+ in the interface face; omitted, every value is in it, and a header's figures too. */
479
+ data?: { features?: readonly ThemeTypeFeature[]; reach?: ThemeTypeReach };
480
+ /** A stat's figure: 18px to 40px; tabular figures stay. */
481
+ figure?: { face?: ThemeTypeFace; size?: TypePx; tracking?: TypeEm; weight?: TypeWeight; features?: readonly ThemeTypeFeature[] };
482
+ /** The menu's entries, in the bar and down the side: never a size of their own, at most 600. */
483
+ nav?: { face?: ThemeTypeFace; tracking?: TypeEm; weight?: 400 | 500 | 600; case?: ThemeTypeCase };
484
+ }
485
+ export type ThemeTypeRole = keyof ThemeTypeRoles;
486
+ /** One role as compiled: every property a role may take. */
487
+ export interface ThemeTypeRoleDefinition {
488
+ face?: ThemeTypeFace;
489
+ size?: string;
490
+ leading?: number;
491
+ tracking?: string;
492
+ weight?: number;
493
+ case?: ThemeTypeCase;
494
+ features?: readonly string[];
495
+ reach?: ThemeTypeReach;
496
+ }
497
+ /** A compiled theme's type: its base and each role's own, the base look's under the theme's. */
498
+ export interface ThemeTypeDefinition {
499
+ base?: ThemeTypeBase;
500
+ roles?: Partial<Record<ThemeTypeRole, ThemeTypeRoleDefinition>>;
501
+ }
502
+
503
+ interface ThemeSpecCommon {
504
+ /** Unique lowercase slug, not a built-in theme name. */
505
+ id: string;
506
+ label: string;
507
+ /** Named color variations a reader may pick, each over the theme's own colors. */
508
+ palettes?: readonly { id: string; label: string; light?: ThemeColorsOver; dark?: ThemeColorsOver }[];
509
+ defaultPalette?: string;
510
+ /**
511
+ * `'dark'`: worn dark until the reader picks a mode themselves, whatever their machine is set to; it still has
512
+ * light colors, which are held to a printed page's white paper. `'dark-only'`: no light colors at all — `colors`
513
+ * names `dark` alone, the theme is judged as dark and not as paper, and a reader cannot turn it light. Omitted,
514
+ * the theme follows the reader and their machine.
515
+ */
516
+ scheme?: 'dark' | 'dark-only';
517
+ shape?: {
518
+ /** Corners, each a length: a control's (0px to 16px, or `round`, a pill), a field's (0px to 12px), `pill`, a status
519
+ pill's, a tag's and a chip's (0px to 12px, or `round`; omitted, round), and `panel`, a card's, a section's and
520
+ a dialog's (0px to 20px; omitted, one and a half controls', at most 20px). Always the object; a single length
521
+ is refused. */
522
+ radius?: { control?: string; field?: string; pill?: string; panel?: string };
523
+ /** A preset (`flat`, `hairline`, `soft`, `raised`), or a lift for cards and one for what floats over the base's:
524
+ `{ card: 'low', float: 'mid' }`, each `none`, `hairline`, `low`, `mid` or `high`. */
525
+ elevation?: ThemeElevation | ThemeLifts;
526
+ /** Widths, each omitted for the look's own: `rule`, the rules over a section and under a table's heads (`1px`,
527
+ `2px` or `3px`); `control`, a field's and a select's edge (`1px` or `2px`; `0px` draws none, and is refused unless
528
+ `colors.field` stands measurably apart from the ground and the surface, and then the focus ring is the edge); `panel`, a card's and a section's
529
+ edge where the look draws one (`0px` draws none); `focus`, the focus ring (`2px` or `3px`). */
530
+ border?: ThemeBorders;
531
+ /** Heights: `control`, a field's, a select's and a button's, `32px` to `56px` (omitted, the look's 34px). A touch
532
+ screen keeps a 44px floor whatever this says. */
533
+ height?: { control?: ThemeControlHeight };
534
+ };
535
+ type?: {
536
+ /** CSS font-family stacks: the machine's faces, or the families `faces` ships. */
537
+ font?: string | { ui?: string; data?: string; heading?: string; code?: string };
538
+ /** Font files from the App's directory, each one `@font-face` (at most 12). The heading's face is preloaded. */
539
+ faces?: readonly ThemeFace[];
540
+ /** The size an App's text is drawn at, 13px to 16px; every size grows with it, the roles' too. Omitted, 13px. */
541
+ base?: ThemeTypeBase;
542
+ /** Each kind of text's face, size, leading, tracking, weight, case and OpenType features (`ThemeTypeRoles`). */
543
+ roles?: ThemeTypeRoles;
544
+ /** The icons' weight: `regular` (omitted), `light`, `bold` or `fill`. */
545
+ icons?: ThemeIconWeight;
546
+ };
547
+ density?: ThemeDensity;
548
+ /** How fast things enter: `house` (omitted), `brisk` a quarter quicker, or `still`, nothing entering. */
549
+ motion?: ThemeMotion;
550
+ /** How far apart things stand: `house` (omitted), `tight` a quarter closer, or `airy` a quarter wider. */
551
+ rhythm?: ThemeRhythm;
552
+ recipes?: ThemeRecipes;
553
+ /**
554
+ * Where the menu is drawn: beside the page or in the top bar. A suggestion: it holds when the theme is the App's
555
+ * own (`ui.theme.preset`) and `ui.shell.placement` says nothing; a reader who picks another theme keeps the App's
556
+ * shell.
557
+ */
558
+ shell?: { placement?: 'side' | 'top' };
559
+ /** A pattern behind the page and one behind the navigation (`ThemeSurface`). */
560
+ surface?: ThemeSurface;
561
+ /** Each published part's own colors, corner, lift, face, weight and case (`ThemePartStyle`). */
562
+ parts?: { readonly [P in ThemePart]?: ThemePartStyle };
563
+ /**
564
+ * One CSS file beside the theme (`./theme.css`, at most 8 KB), read against an allowlist: rules on published parts
565
+ * (`[data-part="stat"]`) that say colors as roles, gradients, borders, corners, lifts, faces and letter case, and
566
+ * nothing that moves a box. It is drawn in the `theme` layer, over the look and under the structure, only while
567
+ * the theme is worn (theme-css).
568
+ */
569
+ stylesheet?: `./${string}.css`;
570
+ /** The theme contract it was written to. A package says `1`; a newer one than this tablewalk knows is refused. */
571
+ contract?: 1;
572
+ /** Where its files are read from: a package's `import.meta.url`. Omitted, the App's directory. */
573
+ from?: string;
574
+ }
575
+
576
+ /**
577
+ * A theme as `defineTheme` takes it. Without `extends` it names every color it
578
+ * needs and starts from the plain structure (every recipe's first value); with `extends` it starts from that
579
+ * built-in look and says only what differs.
580
+ */
581
+ export type ThemeSpec =
582
+ | (ThemeSpecCommon & { extends?: undefined; colors: { light: ThemeColors; dark: ThemeColors } })
583
+ | (ThemeSpecCommon & { extends?: undefined; scheme: 'dark-only'; colors: { light?: undefined; dark: ThemeColors } })
584
+ | (ThemeSpecCommon & { extends: ThemeBase | Theme; colors?: { light?: ThemeColorsOver; dark?: ThemeColorsOver } });
585
+
586
+ /** What `defineTheme` returns: the spec, marked. */
587
+ export type Theme<S extends ThemeSpec = ThemeSpec> = S & { readonly kind: 'theme' };