@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.
- package/LICENSE +21 -0
- package/README.md +17 -2
- package/dist/adapters/adapter.d.ts +693 -0
- package/dist/adapters/adapter.js +444 -0
- package/dist/adapters/cache/cacheStore.d.ts +75 -0
- package/dist/adapters/cache/cacheStore.js +160 -0
- package/dist/adapters/cache/resp.d.ts +52 -0
- package/dist/adapters/cache/resp.js +237 -0
- package/dist/adapters/commands/canonicalJson.d.ts +19 -0
- package/dist/adapters/commands/canonicalJson.js +154 -0
- package/dist/adapters/connect.d.ts +29 -0
- package/dist/adapters/connect.js +40 -0
- package/dist/adapters/connectionBudget.d.ts +101 -0
- package/dist/adapters/connectionBudget.js +128 -0
- package/dist/adapters/dbLatency.d.ts +35 -0
- package/dist/adapters/dbLatency.js +79 -0
- package/dist/adapters/epochCache.d.ts +50 -0
- package/dist/adapters/epochCache.js +85 -0
- package/dist/adapters/http/egress.d.ts +48 -0
- package/dist/adapters/http/egress.js +175 -0
- package/dist/adapters/http/httpAdapter.d.ts +71 -0
- package/dist/adapters/http/httpAdapter.js +512 -0
- package/dist/adapters/http/httpDescription.d.ts +32 -0
- package/dist/adapters/http/httpDescription.js +246 -0
- package/dist/adapters/http/openapi.d.ts +98 -0
- package/dist/adapters/http/openapi.js +487 -0
- package/dist/adapters/layoutRefusal.d.ts +24 -0
- package/dist/adapters/layoutRefusal.js +35 -0
- package/dist/adapters/net/networkPolicy.d.ts +44 -0
- package/dist/adapters/net/networkPolicy.js +123 -0
- package/dist/adapters/net/untrustedDatabase.d.ts +18 -0
- package/dist/adapters/net/untrustedDatabase.js +120 -0
- package/dist/adapters/poolAdmission.d.ts +43 -0
- package/dist/adapters/poolAdmission.js +184 -0
- package/dist/adapters/poolMetrics.d.ts +121 -0
- package/dist/adapters/poolMetrics.js +185 -0
- package/dist/adapters/postgres.d.ts +436 -0
- package/dist/adapters/postgres.js +1890 -0
- package/dist/adapters/postgresCatalog.d.ts +96 -0
- package/dist/adapters/postgresCatalog.js +387 -0
- package/dist/adapters/postgresCatalogDigest.d.ts +30 -0
- package/dist/adapters/postgresCatalogDigest.js +87 -0
- package/dist/adapters/postgresCatalogRows.d.ts +62 -0
- package/dist/adapters/postgresCatalogRows.js +37 -0
- package/dist/adapters/postgresDates.d.ts +1 -0
- package/dist/adapters/postgresDates.js +39 -0
- package/dist/adapters/postgresMaintenance.d.ts +33 -0
- package/dist/adapters/postgresMaintenance.js +179 -0
- package/dist/adapters/postgresPool.d.ts +255 -0
- package/dist/adapters/postgresPool.js +838 -0
- package/dist/adapters/postgresPooler.d.ts +28 -0
- package/dist/adapters/postgresPooler.js +267 -0
- package/dist/adapters/postgresReadCatalog.d.ts +31 -0
- package/dist/adapters/postgresReadCatalog.js +226 -0
- package/dist/adapters/postgresReadSnapshot.d.ts +46 -0
- package/dist/adapters/postgresReadSnapshot.js +133 -0
- package/dist/adapters/postgresSchemaEpoch.d.ts +24 -0
- package/dist/adapters/postgresSchemaEpoch.js +149 -0
- package/dist/adapters/postgresTransactionHandle.d.ts +173 -0
- package/dist/adapters/postgresTransactionHandle.js +524 -0
- package/dist/adapters/postgresValues.d.ts +30 -0
- package/dist/adapters/postgresValues.js +75 -0
- package/dist/adapters/replicas.d.ts +70 -0
- package/dist/adapters/replicas.js +208 -0
- package/dist/adapters/reservedSql.d.ts +38 -0
- package/dist/adapters/reservedSql.js +264 -0
- package/dist/adapters/rolePrivileges.d.ts +17 -0
- package/dist/adapters/rolePrivileges.js +22 -0
- package/dist/adapters/scoped/keyRows.d.ts +65 -0
- package/dist/adapters/scoped/keyRows.js +173 -0
- package/dist/adapters/scoped/postgresScopeCatalog.d.ts +16 -0
- package/dist/adapters/scoped/postgresScopeCatalog.js +117 -0
- package/dist/adapters/scoped/scopedCommandOperations.d.ts +5 -0
- package/dist/adapters/scoped/scopedCommandOperations.js +48 -0
- package/dist/adapters/scoped/scopedReads.d.ts +20 -0
- package/dist/adapters/scoped/scopedReads.js +174 -0
- package/dist/adapters/scoped/scopedTransaction.d.ts +89 -0
- package/dist/adapters/scoped/scopedTransaction.js +303 -0
- package/dist/adapters/scoped/sqliteScopeCatalog.d.ts +16 -0
- package/dist/adapters/scoped/sqliteScopeCatalog.js +241 -0
- package/dist/adapters/scoped/updateGuard.d.ts +3 -0
- package/dist/adapters/scoped/updateGuard.js +40 -0
- package/dist/adapters/serverSettings.d.ts +45 -0
- package/dist/adapters/serverSettings.js +46 -0
- package/dist/adapters/sqlite.d.ts +262 -0
- package/dist/adapters/sqlite.js +1434 -0
- package/dist/adapters/sqliteCostlyReads.d.ts +33 -0
- package/dist/adapters/sqliteCostlyReads.js +49 -0
- package/dist/adapters/sqliteDecimals.d.ts +22 -0
- package/dist/adapters/sqliteDecimals.js +57 -0
- package/dist/adapters/sqliteHandles.d.ts +43 -0
- package/dist/adapters/sqliteHandles.js +143 -0
- package/dist/adapters/sqliteStatementProcess.d.ts +29 -0
- package/dist/adapters/sqliteStatementProcess.js +131 -0
- package/dist/adapters/statementControl.d.ts +34 -0
- package/dist/adapters/statementControl.js +90 -0
- package/dist/adapters/storeHost.d.ts +130 -0
- package/dist/adapters/storeHost.js +13 -0
- package/dist/adapters/telemetry/drivers.d.ts +21 -0
- package/dist/adapters/telemetry/drivers.js +321 -0
- package/dist/adapters/telemetry/metrics.d.ts +63 -0
- package/dist/adapters/telemetry/metrics.js +122 -0
- package/dist/adapters/telemetry/otlp.d.ts +12 -0
- package/dist/adapters/telemetry/otlp.js +320 -0
- package/dist/adapters/telemetry/otlpEncode.d.ts +48 -0
- package/dist/adapters/telemetry/otlpEncode.js +366 -0
- package/dist/adapters/telemetry/otlpEnv.d.ts +1 -0
- package/dist/adapters/telemetry/otlpEnv.js +12 -0
- package/dist/adapters/telemetry/serverTiming.d.ts +83 -0
- package/dist/adapters/telemetry/serverTiming.js +503 -0
- package/dist/adapters/telemetry/start.d.ts +10 -0
- package/dist/adapters/telemetry/start.js +25 -0
- package/dist/adapters/telemetry/statement.d.ts +16 -0
- package/dist/adapters/telemetry/statement.js +134 -0
- package/dist/adapters/telemetry/trace.d.ts +127 -0
- package/dist/adapters/telemetry/trace.js +295 -0
- package/dist/adapters/writeAhead.d.ts +27 -0
- package/dist/adapters/writeAhead.js +46 -0
- package/dist/adapters/writeAttribution.d.ts +18 -0
- package/dist/adapters/writeAttribution.js +23 -0
- package/dist/adapters/writeCapture.d.ts +73 -0
- package/dist/adapters/writeCapture.js +20 -0
- package/dist/adapters/writeLanes.d.ts +94 -0
- package/dist/adapters/writeLanes.js +232 -0
- package/dist/engine.d.ts +15 -0
- package/dist/engine.js +13 -0
- package/dist/server/auth/credentials.d.ts +61 -0
- package/dist/server/auth/credentials.js +260 -0
- package/dist/server/cacheService.d.ts +50 -0
- package/dist/server/cacheService.js +110 -0
- package/dist/server/cli/args.d.ts +176 -0
- package/dist/server/cli/args.js +342 -0
- package/dist/server/cli/bin.d.ts +5 -0
- package/dist/server/cli/bin.js +66 -0
- package/dist/server/cli/browser.d.ts +15 -0
- package/dist/server/cli/browser.js +37 -0
- package/dist/server/cli/config.d.ts +50 -0
- package/dist/server/cli/config.js +206 -0
- package/dist/server/cli/startup.d.ts +36 -0
- package/dist/server/cli/startup.js +128 -0
- package/dist/server/cli/startupOptions.d.ts +63 -0
- package/dist/server/cli/startupOptions.js +143 -0
- package/dist/server/cli/subcommand.d.ts +28 -0
- package/dist/server/cli/subcommand.js +32 -0
- package/dist/server/cli/usage.d.ts +13 -0
- package/dist/server/cli/usage.js +31 -0
- package/dist/server/clientHttp.d.ts +184 -0
- package/dist/server/clientHttp.js +700 -0
- package/dist/server/clientSurface.d.ts +128 -0
- package/dist/server/clientSurface.js +182 -0
- package/dist/server/columnGrants.d.ts +103 -0
- package/dist/server/columnGrants.js +730 -0
- package/dist/server/compileCache.d.ts +1 -0
- package/dist/server/compileCache.js +30 -0
- package/dist/server/config/locations.d.ts +1 -0
- package/dist/server/config/locations.js +15 -0
- package/dist/server/configPaths.d.ts +7 -0
- package/dist/server/configPaths.js +34 -0
- package/dist/server/configSections.d.ts +64 -0
- package/dist/server/configSections.js +72 -0
- package/dist/server/connectionRedaction.d.ts +30 -0
- package/dist/server/connectionRedaction.js +77 -0
- package/dist/server/connections.d.ts +353 -0
- package/dist/server/connections.js +978 -0
- package/dist/server/constraints.d.ts +82 -0
- package/dist/server/constraints.js +169 -0
- package/dist/server/demo.d.ts +9 -0
- package/dist/server/demo.js +554 -0
- package/dist/server/devclient.d.ts +108 -0
- package/dist/server/devclient.js +361 -0
- package/dist/server/evidence.d.ts +55 -0
- package/dist/server/evidence.js +323 -0
- package/dist/server/hiddenColumns.d.ts +32 -0
- package/dist/server/hiddenColumns.js +238 -0
- package/dist/server/http/baselineHeaders.d.ts +24 -0
- package/dist/server/http/baselineHeaders.js +12 -0
- package/dist/server/http/captured.d.ts +35 -0
- package/dist/server/http/captured.js +73 -0
- package/dist/server/http/clock.d.ts +1 -0
- package/dist/server/http/clock.js +14 -0
- package/dist/server/http/connectionSource.d.ts +4 -0
- package/dist/server/http/connectionSource.js +48 -0
- package/dist/server/http/context.d.ts +189 -0
- package/dist/server/http/context.js +11 -0
- package/dist/server/http/crawlerText.d.ts +15 -0
- package/dist/server/http/crawlerText.js +32 -0
- package/dist/server/http/dataRoutes.d.ts +88 -0
- package/dist/server/http/dataRoutes.js +137 -0
- package/dist/server/http/door.d.ts +57 -0
- package/dist/server/http/door.js +39 -0
- package/dist/server/http/exportRoute.d.ts +15 -0
- package/dist/server/http/exportRoute.js +320 -0
- package/dist/server/http/firstPaint.d.ts +108 -0
- package/dist/server/http/firstPaint.js +262 -0
- package/dist/server/http/httpOperationRoutes.d.ts +11 -0
- package/dist/server/http/httpOperationRoutes.js +50 -0
- package/dist/server/http/pageReads.d.ts +20 -0
- package/dist/server/http/pageReads.js +205 -0
- package/dist/server/http/pageRoutes.d.ts +39 -0
- package/dist/server/http/pageRoutes.js +291 -0
- package/dist/server/http/probes.d.ts +22 -0
- package/dist/server/http/probes.js +27 -0
- package/dist/server/http/rateLimit.d.ts +131 -0
- package/dist/server/http/rateLimit.js +351 -0
- package/dist/server/http/readRoutes.d.ts +9 -0
- package/dist/server/http/readRoutes.js +131 -0
- package/dist/server/http/readRouting.d.ts +20 -0
- package/dist/server/http/readRouting.js +80 -0
- package/dist/server/http/recordCompose.d.ts +67 -0
- package/dist/server/http/recordCompose.js +167 -0
- package/dist/server/http/recordWrites.d.ts +89 -0
- package/dist/server/http/recordWrites.js +298 -0
- package/dist/server/http/refusalReport.d.ts +38 -0
- package/dist/server/http/refusalReport.js +63 -0
- package/dist/server/http/reply.d.ts +130 -0
- package/dist/server/http/reply.js +394 -0
- package/dist/server/http/requestOrigin.d.ts +11 -0
- package/dist/server/http/requestOrigin.js +8 -0
- package/dist/server/http/router.d.ts +45 -0
- package/dist/server/http/router.js +22 -0
- package/dist/server/http/serverCore.d.ts +68 -0
- package/dist/server/http/serverCore.js +177 -0
- package/dist/server/http/traceRequest.d.ts +30 -0
- package/dist/server/http/traceRequest.js +224 -0
- package/dist/server/http/trust.d.ts +261 -0
- package/dist/server/http/trust.js +472 -0
- package/dist/server/http/writeRefusal.d.ts +33 -0
- package/dist/server/http/writeRefusal.js +24 -0
- package/dist/server/httpConnection.d.ts +49 -0
- package/dist/server/httpConnection.js +170 -0
- package/dist/server/impact.d.ts +55 -0
- package/dist/server/impact.js +47 -0
- package/dist/server/journal.d.ts +134 -0
- package/dist/server/journal.js +398 -0
- package/dist/server/keysetReadHttp.d.ts +52 -0
- package/dist/server/keysetReadHttp.js +85 -0
- package/dist/server/layouts.d.ts +49 -0
- package/dist/server/layouts.js +192 -0
- package/dist/server/migrate/cli.d.ts +55 -0
- package/dist/server/migrate/cli.js +517 -0
- package/dist/server/migrate/database.d.ts +37 -0
- package/dist/server/migrate/database.js +247 -0
- package/dist/server/migrate/desired.d.ts +76 -0
- package/dist/server/migrate/desired.js +292 -0
- package/dist/server/migrate/files.d.ts +34 -0
- package/dist/server/migrate/files.js +141 -0
- package/dist/server/migrate/flyway.d.ts +7 -0
- package/dist/server/migrate/flyway.js +69 -0
- package/dist/server/migrate/history.d.ts +70 -0
- package/dist/server/migrate/history.js +211 -0
- package/dist/server/migrate/runner.d.ts +100 -0
- package/dist/server/migrate/runner.js +409 -0
- package/dist/server/migrate/snapshot.d.ts +30 -0
- package/dist/server/migrate/snapshot.js +239 -0
- package/dist/server/migrate/target.d.ts +33 -0
- package/dist/server/migrate/target.js +82 -0
- package/dist/server/openapiDraft.d.ts +25 -0
- package/dist/server/openapiDraft.js +171 -0
- package/dist/server/operations/diagnostics.d.ts +101 -0
- package/dist/server/operations/diagnostics.js +284 -0
- package/dist/server/operations/requestMetrics.d.ts +33 -0
- package/dist/server/operations/requestMetrics.js +94 -0
- package/dist/server/packageVersion.d.ts +1 -0
- package/dist/server/packageVersion.js +11 -0
- package/dist/server/poolConfig.d.ts +34 -0
- package/dist/server/poolConfig.js +114 -0
- package/dist/server/product.d.ts +20 -0
- package/dist/server/product.js +12 -0
- package/dist/server/recordHistoryOperations.d.ts +39 -0
- package/dist/server/recordHistoryOperations.js +43 -0
- package/dist/server/recordWriteOperations.d.ts +111 -0
- package/dist/server/recordWriteOperations.js +329 -0
- package/dist/server/resourceReadHttp.d.ts +81 -0
- package/dist/server/resourceReadHttp.js +606 -0
- package/dist/server/resourceReadOperations.d.ts +147 -0
- package/dist/server/resourceReadOperations.js +452 -0
- package/dist/server/scaffoldMachine.d.ts +54 -0
- package/dist/server/scaffoldMachine.js +184 -0
- package/dist/server/seed/cli.d.ts +20 -0
- package/dist/server/seed/cli.js +164 -0
- package/dist/server/seed/lexicon.d.ts +26 -0
- package/dist/server/seed/lexicon.js +585 -0
- package/dist/server/seed/seed.d.ts +70 -0
- package/dist/server/seed/seed.js +779 -0
- package/dist/server/seed/words.d.ts +21 -0
- package/dist/server/seed/words.js +164 -0
- package/dist/server/serverRequests.d.ts +6 -0
- package/dist/server/serverRequests.js +33 -0
- package/dist/server/serverTimeouts.d.ts +33 -0
- package/dist/server/serverTimeouts.js +32 -0
- package/dist/server/shapeonly.d.ts +32 -0
- package/dist/server/shapeonly.js +110 -0
- package/dist/server/startupWarnings.d.ts +32 -0
- package/dist/server/startupWarnings.js +92 -0
- package/dist/shared/addressParams.d.ts +28 -0
- package/dist/shared/addressParams.js +47 -0
- package/dist/shared/appCards.d.ts +123 -0
- package/dist/shared/appCards.js +385 -0
- package/dist/shared/appComponents.d.ts +177 -0
- package/dist/shared/appComponents.js +422 -0
- package/dist/shared/appDocuments.d.ts +43 -0
- package/dist/shared/appDocuments.js +131 -0
- package/dist/shared/appEmbeds.d.ts +21 -0
- package/dist/shared/appEmbeds.js +24 -0
- package/dist/shared/appIcons.d.ts +28 -0
- package/dist/shared/appIcons.js +223 -0
- package/dist/shared/appLinks.d.ts +17 -0
- package/dist/shared/appLinks.js +124 -0
- package/dist/shared/appListColumns.d.ts +3 -0
- package/dist/shared/appListColumns.js +66 -0
- package/dist/shared/appLocale.d.ts +36 -0
- package/dist/shared/appLocale.js +86 -0
- package/dist/shared/appMessages.d.ts +44 -0
- package/dist/shared/appMessages.js +78 -0
- package/dist/shared/appNoun.d.ts +21 -0
- package/dist/shared/appNoun.js +32 -0
- package/dist/shared/autoBucket.d.ts +98 -0
- package/dist/shared/autoBucket.js +305 -0
- package/dist/shared/autoValues.d.ts +25 -0
- package/dist/shared/autoValues.js +25 -0
- package/dist/shared/breakdown.d.ts +228 -0
- package/dist/shared/breakdown.js +557 -0
- package/dist/shared/breakdowntext.d.ts +41 -0
- package/dist/shared/breakdowntext.js +400 -0
- package/dist/shared/builtInThemes.d.ts +2 -0
- package/dist/shared/builtInThemes.js +771 -0
- package/dist/shared/chartSeparation.d.ts +11 -0
- package/dist/shared/chartSeparation.js +58 -0
- package/dist/shared/clauses.d.ts +22 -0
- package/dist/shared/clauses.js +97 -0
- package/dist/shared/columnCaption.d.ts +16 -0
- package/dist/shared/columnCaption.js +90 -0
- package/dist/shared/commandFieldPath.d.ts +2 -0
- package/dist/shared/commandFieldPath.js +7 -0
- package/dist/shared/commandWire.d.ts +26 -0
- package/dist/shared/commandWire.js +41 -0
- package/dist/shared/computed.d.ts +161 -0
- package/dist/shared/computed.js +378 -0
- package/dist/shared/computedParse.d.ts +13 -0
- package/dist/shared/computedParse.js +278 -0
- package/dist/shared/computedValue.d.ts +47 -0
- package/dist/shared/computedValue.js +191 -0
- package/dist/shared/connection.d.ts +30 -0
- package/dist/shared/connection.js +1 -0
- package/dist/shared/csv.d.ts +20 -0
- package/dist/shared/csv.js +63 -0
- package/dist/shared/dashLayout.d.ts +30 -0
- package/dist/shared/dashLayout.js +132 -0
- package/dist/shared/dashboardAsks.d.ts +93 -0
- package/dist/shared/dashboardAsks.js +129 -0
- package/dist/shared/dashboardTrend.d.ts +20 -0
- package/dist/shared/dashboardTrend.js +50 -0
- package/dist/shared/declaredReferences.d.ts +50 -0
- package/dist/shared/declaredReferences.js +202 -0
- package/dist/shared/definedFields.d.ts +63 -0
- package/dist/shared/definedFields.js +103 -0
- package/dist/shared/definedValues.d.ts +63 -0
- package/dist/shared/definedValues.js +184 -0
- package/dist/shared/displayDefaults.d.ts +135 -0
- package/dist/shared/displayDefaults.js +529 -0
- package/dist/shared/dueDate.d.ts +6 -0
- package/dist/shared/dueDate.js +6 -0
- package/dist/shared/duration.d.ts +4 -0
- package/dist/shared/duration.js +23 -0
- package/dist/shared/fileBounds.d.ts +9 -0
- package/dist/shared/fileBounds.js +9 -0
- package/dist/shared/filter.d.ts +217 -0
- package/dist/shared/filter.js +305 -0
- package/dist/shared/firstPaint.d.ts +24 -0
- package/dist/shared/firstPaint.js +33 -0
- package/dist/shared/form.d.ts +21 -0
- package/dist/shared/form.js +25 -0
- package/dist/shared/formValues.d.ts +104 -0
- package/dist/shared/formValues.js +352 -0
- package/dist/shared/funnel.d.ts +45 -0
- package/dist/shared/funnel.js +108 -0
- package/dist/shared/httpOperations.d.ts +48 -0
- package/dist/shared/httpOperations.js +9 -0
- package/dist/shared/iconGlyphs.d.ts +4 -0
- package/dist/shared/iconGlyphs.js +151 -0
- package/dist/shared/iconWeights.d.ts +3 -0
- package/dist/shared/iconWeights.js +162 -0
- package/dist/shared/imageWidths.d.ts +32 -0
- package/dist/shared/imageWidths.js +38 -0
- package/dist/shared/keysetPage.d.ts +64 -0
- package/dist/shared/keysetPage.js +161 -0
- package/dist/shared/like.d.ts +20 -0
- package/dist/shared/like.js +29 -0
- package/dist/shared/listEmpty.d.ts +12 -0
- package/dist/shared/listEmpty.js +36 -0
- package/dist/shared/listFilters.d.ts +28 -0
- package/dist/shared/listFilters.js +84 -0
- package/dist/shared/listPresentations.d.ts +199 -0
- package/dist/shared/listPresentations.js +7 -0
- package/dist/shared/listQuestion.d.ts +52 -0
- package/dist/shared/listQuestion.js +137 -0
- package/dist/shared/lookPalettes.d.ts +62 -0
- package/dist/shared/lookPalettes.js +306 -0
- package/dist/shared/maskQuoted.d.ts +24 -0
- package/dist/shared/maskQuoted.js +48 -0
- package/dist/shared/mentionLabel.d.ts +19 -0
- package/dist/shared/mentionLabel.js +38 -0
- package/dist/shared/mentionLookup.d.ts +17 -0
- package/dist/shared/mentionLookup.js +64 -0
- package/dist/shared/menuCounts.d.ts +16 -0
- package/dist/shared/menuCounts.js +74 -0
- package/dist/shared/model.d.ts +79 -0
- package/dist/shared/model.js +153 -0
- package/dist/shared/money.d.ts +44 -0
- package/dist/shared/money.js +81 -0
- package/dist/shared/moneyEntry.d.ts +7 -0
- package/dist/shared/moneyEntry.js +27 -0
- package/dist/shared/mount.d.ts +118 -0
- package/dist/shared/mount.js +248 -0
- package/dist/shared/niceTicks.d.ts +26 -0
- package/dist/shared/niceTicks.js +50 -0
- package/dist/shared/order.d.ts +59 -0
- package/dist/shared/order.js +133 -0
- package/dist/shared/page.d.ts +135 -0
- package/dist/shared/page.js +1187 -0
- package/dist/shared/pageAnatomy.d.ts +99 -0
- package/dist/shared/pageAnatomy.js +370 -0
- package/dist/shared/pageConfig.d.ts +25 -0
- package/dist/shared/pageConfig.js +1308 -0
- package/dist/shared/pageEmptyActions.d.ts +12 -0
- package/dist/shared/pageEmptyActions.js +20 -0
- package/dist/shared/pageLayouts.d.ts +72 -0
- package/dist/shared/pageLayouts.js +205 -0
- package/dist/shared/pageModel.d.ts +785 -0
- package/dist/shared/pageModel.js +121 -0
- package/dist/shared/pagePaths.d.ts +180 -0
- package/dist/shared/pagePaths.js +869 -0
- package/dist/shared/pagePlans.d.ts +52 -0
- package/dist/shared/pagePlans.js +108 -0
- package/dist/shared/pageRoutes.d.ts +9 -0
- package/dist/shared/pageRoutes.js +9 -0
- package/dist/shared/query.d.ts +166 -0
- package/dist/shared/query.js +1302 -0
- package/dist/shared/queryDates.d.ts +12 -0
- package/dist/shared/queryDates.js +101 -0
- package/dist/shared/queryOperands.d.ts +99 -0
- package/dist/shared/queryOperands.js +131 -0
- package/dist/shared/reads.d.ts +103 -0
- package/dist/shared/reads.js +154 -0
- package/dist/shared/recordLabel.d.ts +51 -0
- package/dist/shared/recordLabel.js +123 -0
- package/dist/shared/recordReadKeys.d.ts +30 -0
- package/dist/shared/recordReadKeys.js +51 -0
- package/dist/shared/recordReads.d.ts +268 -0
- package/dist/shared/recordReads.js +368 -0
- package/dist/shared/recordview.d.ts +198 -0
- package/dist/shared/recordview.js +356 -0
- package/dist/shared/referenceModel.d.ts +58 -0
- package/dist/shared/referenceModel.js +194 -0
- package/dist/shared/refusal.d.ts +64 -0
- package/dist/shared/refusal.js +144 -0
- package/dist/shared/relatedCreate.d.ts +30 -0
- package/dist/shared/relatedCreate.js +162 -0
- package/dist/shared/resourceHttp.d.ts +464 -0
- package/dist/shared/resourceHttp.js +1 -0
- package/dist/shared/richText.d.ts +85 -0
- package/dist/shared/richText.js +305 -0
- package/dist/shared/rollups.d.ts +143 -0
- package/dist/shared/rollups.js +64 -0
- package/dist/shared/rowScope.d.ts +72 -0
- package/dist/shared/rowScope.js +376 -0
- package/dist/shared/runtimeTables.d.ts +44 -0
- package/dist/shared/runtimeTables.js +79 -0
- package/dist/shared/schema.d.ts +523 -0
- package/dist/shared/schema.js +627 -0
- package/dist/shared/schematext.d.ts +38 -0
- package/dist/shared/schematext.js +101 -0
- package/dist/shared/scopeCatalog.d.ts +29 -0
- package/dist/shared/scopeCatalog.js +468 -0
- package/dist/shared/servedApp.d.ts +681 -0
- package/dist/shared/servedApp.js +45 -0
- package/dist/shared/sessionLease.d.ts +34 -0
- package/dist/shared/sessionLease.js +3 -0
- package/dist/shared/shape.d.ts +55 -0
- package/dist/shared/shape.js +168 -0
- package/dist/shared/slug.d.ts +1 -0
- package/dist/shared/slug.js +12 -0
- package/dist/shared/sortText.d.ts +14 -0
- package/dist/shared/sortText.js +26 -0
- package/dist/shared/sqlRelation.d.ts +4 -0
- package/dist/shared/sqlRelation.js +8 -0
- package/dist/shared/sqlsaved.d.ts +44 -0
- package/dist/shared/sqlsaved.js +63 -0
- package/dist/shared/stitchedPaths.d.ts +27 -0
- package/dist/shared/stitchedPaths.js +38 -0
- package/dist/shared/structuredFilter.d.ts +22 -0
- package/dist/shared/structuredFilter.js +1 -0
- package/dist/shared/subtitlePath.d.ts +20 -0
- package/dist/shared/subtitlePath.js +24 -0
- package/dist/shared/suggest.d.ts +18 -0
- package/dist/shared/suggest.js +59 -0
- package/dist/shared/tableSizing.d.ts +4 -0
- package/dist/shared/tableSizing.js +9 -0
- package/dist/shared/tagLists.d.ts +57 -0
- package/dist/shared/tagLists.js +34 -0
- package/dist/shared/textRules.d.ts +54 -0
- package/dist/shared/textRules.js +133 -0
- package/dist/shared/theme.d.ts +94 -0
- package/dist/shared/theme.js +800 -0
- package/dist/shared/themeColor.d.ts +34 -0
- package/dist/shared/themeColor.js +109 -0
- package/dist/shared/themeFaces.d.ts +30 -0
- package/dist/shared/themeFaces.js +42 -0
- package/dist/shared/themeInk.d.ts +20 -0
- package/dist/shared/themeInk.js +52 -0
- package/dist/shared/themeLooks.d.ts +9 -0
- package/dist/shared/themeLooks.js +572 -0
- package/dist/shared/themeParts.d.ts +26 -0
- package/dist/shared/themeParts.js +71 -0
- package/dist/shared/themePartsCheck.d.ts +21 -0
- package/dist/shared/themePartsCheck.js +91 -0
- package/dist/shared/themePresets.d.ts +85 -0
- package/dist/shared/themePresets.js +139 -0
- package/dist/shared/themeRecipeWords.d.ts +156 -0
- package/dist/shared/themeRecipeWords.js +156 -0
- package/dist/shared/themeRecipes.d.ts +213 -0
- package/dist/shared/themeRecipes.js +234 -0
- package/dist/shared/themeResolve.d.ts +55 -0
- package/dist/shared/themeResolve.js +52 -0
- package/dist/shared/themeTokens.d.ts +107 -0
- package/dist/shared/themeTokens.js +116 -0
- package/dist/shared/themeType.d.ts +38 -0
- package/dist/shared/themeType.js +205 -0
- package/dist/shared/unitWord.d.ts +4 -0
- package/dist/shared/unitWord.js +37 -0
- package/dist/shared/view.d.ts +195 -0
- package/dist/shared/view.js +987 -0
- package/dist/shared/viewLabels.d.ts +47 -0
- package/dist/shared/viewLabels.js +459 -0
- package/dist/shared/viewPaths.d.ts +248 -0
- package/dist/shared/viewPaths.js +294 -0
- package/dist/shared/viewtext.d.ts +57 -0
- package/dist/shared/viewtext.js +282 -0
- package/dist/shared/vocabulary.d.ts +71 -0
- package/dist/shared/vocabulary.js +249 -0
- package/dist/shared/weekStart.d.ts +7 -0
- package/dist/shared/weekStart.js +36 -0
- package/mark.svg +1 -0
- package/package.json +261 -4
- package/schema/model.d.ts +298 -0
- package/schema/theme.d.ts +587 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What a theme may say beyond the recipe menu, checked: its patterns (`surface`), its parts' styles (`parts`) and
|
|
3
|
+
* its icons' weight (`type.icons`), for the spec (themeSpec.ts) and for a compiled theme read back (theme.ts
|
|
4
|
+
* parseThemes) alike. A module apart from themeParts.ts, which the first paint wears and these messages are no
|
|
5
|
+
* weight of.
|
|
6
|
+
*/
|
|
7
|
+
import type { ThemeIconWeight, ThemePart, ThemePartStyle, ThemePattern, ThemeSurface } from '../../schema/theme.js';
|
|
8
|
+
/** The patterns, drawn by surfacesLook.css; each at a strength of 1 (omitted), 2 or 3. */
|
|
9
|
+
export declare const PATTERN_KINDS: readonly ['paper', 'grain', 'grid', 'dots', 'lines', 'scanlines'];
|
|
10
|
+
/** How much of the line color a pattern of this kind and strength is drawn in. */
|
|
11
|
+
export declare const patternStrength: (pattern: ThemePattern) => number;
|
|
12
|
+
/** Phosphor's weights a theme may pick for the icons: thin fades at 16px, duotone says a second tone no role names. */
|
|
13
|
+
export declare const ICON_WEIGHTS: readonly ThemeIconWeight[];
|
|
14
|
+
/** A role's path back to the role it names: `nav.onCurrent` is `navOnCurrent`, `chart[2]` is `chart3`. */
|
|
15
|
+
export declare function pathRole(path: string): string;
|
|
16
|
+
/** `surface`: a pattern behind the page, one behind the menu, each of the six at a strength; omitted strength is 1. */
|
|
17
|
+
export declare function surfaceOf(raw: unknown, where: string): ThemeSurface;
|
|
18
|
+
/** `parts`: each a published part, saying only what its menus hold. */
|
|
19
|
+
export declare function partsOf(raw: unknown, where: string): Partial<Record<ThemePart, ThemePartStyle>>;
|
|
20
|
+
/** `type.icons`: one of Phosphor's weights the icons are drawn in. */
|
|
21
|
+
export declare function iconsOf(raw: unknown, where: string): ThemeIconWeight;
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { PALETTE_TOKENS, rolePath } from './themeTokens.js';
|
|
2
|
+
import { PART_CASES, PART_FACES, PART_LIFTS, PART_PROPERTIES, PART_RADII, PART_WEIGHTS, THEME_PARTS } from './themeParts.js';
|
|
3
|
+
/** The patterns, drawn by surfacesLook.css; each at a strength of 1 (omitted), 2 or 3. */
|
|
4
|
+
export const PATTERN_KINDS = ['paper', 'grain', 'grid', 'dots', 'lines', 'scanlines'];
|
|
5
|
+
/** How much of the line color each strength draws a pattern in (surfacesLook.css says the same three). */
|
|
6
|
+
const PATTERN_STRENGTH = { 1: 0.4, 2: 0.7, 3: 1 };
|
|
7
|
+
/* Paper is two families of fibers crossing, twice the ink of one family of lines at a strength: at 40% its low end
|
|
8
|
+
read as a mesh over the page, not a sheet of paper. Its own steps are half again lighter. */
|
|
9
|
+
const PAPER_STRENGTH = { 1: 0.2, 2: 0.45, 3: 0.7 };
|
|
10
|
+
/** How much of the line color a pattern of this kind and strength is drawn in. */
|
|
11
|
+
export const patternStrength = (pattern) => (pattern.kind === 'paper' ? PAPER_STRENGTH : PATTERN_STRENGTH)[pattern.strength ?? 1];
|
|
12
|
+
/** Phosphor's weights a theme may pick for the icons: thin fades at 16px, duotone says a second tone no role names. */
|
|
13
|
+
export const ICON_WEIGHTS = ['regular', 'light', 'bold', 'fill'];
|
|
14
|
+
/** The color roles a part may name, by their paths: every color but the widths and the shadow's ink. */
|
|
15
|
+
const PART_COLOR_PATHS = Object.keys(PALETTE_TOKENS)
|
|
16
|
+
.filter((role) => role !== 'shadow' && role !== 'rulesWeight' && role !== 'rulesControl')
|
|
17
|
+
.map(rolePath);
|
|
18
|
+
/** A role's path back to the role it names: `nav.onCurrent` is `navOnCurrent`, `chart[2]` is `chart3`. */
|
|
19
|
+
export function pathRole(path) {
|
|
20
|
+
const series = /^chart\[(\d)\]$/.exec(path);
|
|
21
|
+
if (series)
|
|
22
|
+
return `chart${Number(series[1]) + 1}`;
|
|
23
|
+
return path.replace(/\.(\w)/, (_, letter) => letter.toUpperCase());
|
|
24
|
+
}
|
|
25
|
+
function record(raw, where) {
|
|
26
|
+
if (!raw || typeof raw !== 'object' || Array.isArray(raw))
|
|
27
|
+
throw new Error(`${where} must be an object.`);
|
|
28
|
+
return raw;
|
|
29
|
+
}
|
|
30
|
+
/** `surface`: a pattern behind the page, one behind the menu, each of the six at a strength; omitted strength is 1. */
|
|
31
|
+
export function surfaceOf(raw, where) {
|
|
32
|
+
const surface = record(raw, where);
|
|
33
|
+
const out = {};
|
|
34
|
+
for (const [place, value] of Object.entries(surface)) {
|
|
35
|
+
if (place !== 'ground' && place !== 'nav')
|
|
36
|
+
throw new Error(`${where} has no "${place}". It takes: ground, nav.`);
|
|
37
|
+
const pattern = record(value, `${where}.${place}`);
|
|
38
|
+
for (const key of Object.keys(pattern))
|
|
39
|
+
if (key !== 'kind' && key !== 'strength')
|
|
40
|
+
throw new Error(`${where}.${place} has no "${key}". It takes: kind, strength. A pattern is one of the platform's, drawn in the theme's line color.`);
|
|
41
|
+
if (!PATTERN_KINDS.includes(pattern.kind))
|
|
42
|
+
throw new Error(`${where}.${place}.kind must be one of ${PATTERN_KINDS.join(', ')}.`);
|
|
43
|
+
if (pattern.strength !== undefined && pattern.strength !== 1 && pattern.strength !== 2 && pattern.strength !== 3)
|
|
44
|
+
throw new Error(`${where}.${place}.strength must be 1, 2 or 3.`);
|
|
45
|
+
out[place] = { kind: pattern.kind, strength: (pattern.strength ?? 1) };
|
|
46
|
+
}
|
|
47
|
+
return out;
|
|
48
|
+
}
|
|
49
|
+
/** `parts`: each a published part, saying only what its menus hold. */
|
|
50
|
+
export function partsOf(raw, where) {
|
|
51
|
+
const parts = record(raw, where);
|
|
52
|
+
const out = {};
|
|
53
|
+
for (const [part, value] of Object.entries(parts)) {
|
|
54
|
+
if (!THEME_PARTS.includes(part))
|
|
55
|
+
throw new Error(`${where} has no "${part}". The parts are: ${THEME_PARTS.join(', ')}.`);
|
|
56
|
+
const at = `${where}.${part}`;
|
|
57
|
+
const style = record(value, at);
|
|
58
|
+
for (const [property, said] of Object.entries(style)) {
|
|
59
|
+
if (!PART_PROPERTIES.includes(property))
|
|
60
|
+
throw new Error(`${at} has no "${property}". It takes: ${PART_PROPERTIES.join(', ')}. A part's size, spacing, order and visibility are the App's, never its theme's.`);
|
|
61
|
+
const menu = (why, values) => {
|
|
62
|
+
if (!values.includes(said))
|
|
63
|
+
throw new Error(`${at}.${property} must be one of ${values.join(', ')}${why}.`);
|
|
64
|
+
};
|
|
65
|
+
if (property === 'ground' || property === 'ink' || property === 'edge') {
|
|
66
|
+
if (said === 'nav.currentInk')
|
|
67
|
+
throw new Error(`${at}.${property} names nav.currentInk, which is now nav.onCurrent.`);
|
|
68
|
+
if (typeof said !== 'string' || !PART_COLOR_PATHS.includes(said))
|
|
69
|
+
throw new Error(`${at}.${property} must be a color role by its path, like nav.ground or chart[2], never a hex.`);
|
|
70
|
+
}
|
|
71
|
+
else if (property === 'radius')
|
|
72
|
+
menu(": a corner the theme's shape already says, or square", PART_RADII);
|
|
73
|
+
else if (property === 'lift')
|
|
74
|
+
menu('', PART_LIFTS);
|
|
75
|
+
else if (property === 'face')
|
|
76
|
+
menu(": a face the theme's type already says", PART_FACES);
|
|
77
|
+
else if (property === 'weight')
|
|
78
|
+
menu('', PART_WEIGHTS);
|
|
79
|
+
else
|
|
80
|
+
menu('', PART_CASES);
|
|
81
|
+
}
|
|
82
|
+
out[part] = { ...style };
|
|
83
|
+
}
|
|
84
|
+
return out;
|
|
85
|
+
}
|
|
86
|
+
/** `type.icons`: one of Phosphor's weights the icons are drawn in. */
|
|
87
|
+
export function iconsOf(raw, where) {
|
|
88
|
+
if (!ICON_WEIGHTS.includes(raw))
|
|
89
|
+
throw new Error(`${where} must be one of ${ICON_WEIGHTS.join(', ')}: thin draws a 1px stroke that fades at the 16px an icon is drawn at, and duotone a second tone no color role says.`);
|
|
90
|
+
return raw;
|
|
91
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import type { ThemeDefinition, ThemePalette } from '../../schema/theme.js';
|
|
2
|
+
import { THEME_PRESETS } from './builtInThemes.js';
|
|
3
|
+
/** The built-in looks as the browser wears them: built from their specs (themeLooks.ts) by
|
|
4
|
+
scripts/theme-presets.mjs and committed, so no reader's first page carries the theme builder. */
|
|
5
|
+
export { THEME_PRESETS };
|
|
6
|
+
/** A theme's title weight (`type.roles.title.weight`): its own, else its base look's. Every heading reads it, as
|
|
7
|
+
`--heading-weight`. */
|
|
8
|
+
export declare function headingWeight(theme: ThemeDefinition): number;
|
|
9
|
+
export declare function themePreset(id: string | undefined): ThemeDefinition | undefined;
|
|
10
|
+
/** The modes a theme has colors for: both, or the dark alone where it is dark-only (its light slot is the dark colors). */
|
|
11
|
+
export declare function themeModes(theme: Pick<ThemeDefinition, 'scheme'>): readonly ('light' | 'dark')[];
|
|
12
|
+
/** A theme's `scheme`, read the one way for an App's theme (themeSpec.ts) and a tenant's or host's (theme.ts parseThemes). */
|
|
13
|
+
export declare function parseScheme(raw: unknown, where: string): ThemeDefinition['scheme'];
|
|
14
|
+
/** The nav role its base look sets, which a theme wears on the bar only until it sets the role itself (recipeAttributes). */
|
|
15
|
+
export declare function lookNavRole(theme: ThemeDefinition): import("../../schema/theme.js").ThemeTypeRoleDefinition | undefined;
|
|
16
|
+
/** Inherit roles from a data-backed base, then overlay the author's explicit values. */
|
|
17
|
+
export declare function inheritThemePreset(theme: ThemeDefinition): ThemeDefinition;
|
|
18
|
+
/** Resolve structure first, then theme colors, then a named color variation.
|
|
19
|
+
A removed stored choice falls back to the authored default. */
|
|
20
|
+
export declare function effectiveThemeDefinition(theme: ThemeDefinition, paletteId?: string): ThemeDefinition;
|
|
21
|
+
/** App overrides are applied after inheritance and palette selection. Keep the
|
|
22
|
+
CSS expressions intact: legacy authored colors may use browser CSS syntax.
|
|
23
|
+
An authored accent is the first chart series too: a brand blue on the tabs
|
|
24
|
+
beside the look's own blue in the chart read as two products on one page. */
|
|
25
|
+
/**
|
|
26
|
+
* A look's palette under the App's own accent. One colour is authored for the light ground and mixed toward white on
|
|
27
|
+
* the dark one; `{ light, dark }` says both, each worn as written. The soft tint is always derived from the accent worn.
|
|
28
|
+
*/
|
|
29
|
+
export declare function effectiveThemePalette(palette: ThemePalette, dark: boolean, own?: {
|
|
30
|
+
accent?: AppAccent;
|
|
31
|
+
}): {
|
|
32
|
+
ground?: string;
|
|
33
|
+
surface: string;
|
|
34
|
+
field?: string;
|
|
35
|
+
raised?: string;
|
|
36
|
+
line?: string;
|
|
37
|
+
lineStrong?: string;
|
|
38
|
+
lineControl?: string;
|
|
39
|
+
ink: string;
|
|
40
|
+
inkMuted?: string;
|
|
41
|
+
inkSubtle?: string;
|
|
42
|
+
onAccent?: string;
|
|
43
|
+
accentInk?: string;
|
|
44
|
+
primary?: string;
|
|
45
|
+
onPrimary?: string;
|
|
46
|
+
statusGood?: string;
|
|
47
|
+
statusWarning?: string;
|
|
48
|
+
statusCritical?: string;
|
|
49
|
+
statusInfo?: string;
|
|
50
|
+
navGround?: string;
|
|
51
|
+
navInk?: string;
|
|
52
|
+
navMuted?: string;
|
|
53
|
+
navLine?: string;
|
|
54
|
+
navAccent?: string;
|
|
55
|
+
navCurrent?: string;
|
|
56
|
+
navOnCurrent?: string;
|
|
57
|
+
rulesSection?: string;
|
|
58
|
+
rulesHead?: string;
|
|
59
|
+
shadow?: string;
|
|
60
|
+
band?: string;
|
|
61
|
+
rulesWeight?: '1px' | '2px' | '3px';
|
|
62
|
+
rulesControl?: '0px' | '1px' | '2px';
|
|
63
|
+
chart2?: string;
|
|
64
|
+
chart3?: string;
|
|
65
|
+
chart4?: string;
|
|
66
|
+
chart5?: string;
|
|
67
|
+
chart6?: string;
|
|
68
|
+
chart7?: string;
|
|
69
|
+
chart8?: string;
|
|
70
|
+
accent: string;
|
|
71
|
+
focus: string;
|
|
72
|
+
link: string;
|
|
73
|
+
chart1: string;
|
|
74
|
+
accentSoft: string;
|
|
75
|
+
};
|
|
76
|
+
/** A worn palette's inks said whole: what a check or a fix measures when the theme named neither. */
|
|
77
|
+
export declare function withInks<T extends ThemePalette>(palette: T): T & {
|
|
78
|
+
onAccent: string;
|
|
79
|
+
accentInk: string;
|
|
80
|
+
};
|
|
81
|
+
/** An App's accent: one colour for both grounds, or one for each. */
|
|
82
|
+
export type AppAccent = string | {
|
|
83
|
+
light: string;
|
|
84
|
+
dark: string;
|
|
85
|
+
};
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import { THEME_PRESETS } from './builtInThemes.js';
|
|
2
|
+
import { mergeType } from './themeType.js';
|
|
3
|
+
import { deriveAccentInk, deriveOnAccent } from './themeInk.js';
|
|
4
|
+
/** The built-in looks as the browser wears them: built from their specs (themeLooks.ts) by
|
|
5
|
+
scripts/theme-presets.mjs and committed, so no reader's first page carries the theme builder. */
|
|
6
|
+
export { THEME_PRESETS };
|
|
7
|
+
/** A theme's title weight (`type.roles.title.weight`): its own, else its base look's. Every heading reads it, as
|
|
8
|
+
`--heading-weight`. */
|
|
9
|
+
export function headingWeight(theme) {
|
|
10
|
+
return theme.type?.roles?.title?.weight ?? themePreset(theme.base)?.type?.roles?.title?.weight ?? 700;
|
|
11
|
+
}
|
|
12
|
+
export function themePreset(id) {
|
|
13
|
+
return THEME_PRESETS.find((theme) => theme.id === id);
|
|
14
|
+
}
|
|
15
|
+
/** The modes a theme has colors for: both, or the dark alone where it is dark-only (its light slot is the dark colors). */
|
|
16
|
+
export function themeModes(theme) {
|
|
17
|
+
return theme.scheme === 'dark-only' ? ['dark'] : ['light', 'dark'];
|
|
18
|
+
}
|
|
19
|
+
/** A theme's `scheme`, read the one way for an App's theme (themeSpec.ts) and a tenant's or host's (theme.ts parseThemes). */
|
|
20
|
+
export function parseScheme(raw, where) {
|
|
21
|
+
if (raw !== undefined && raw !== 'dark' && raw !== 'dark-only')
|
|
22
|
+
throw new Error(`${where}.scheme must be "dark" or "dark-only".`);
|
|
23
|
+
return raw;
|
|
24
|
+
}
|
|
25
|
+
/** A palette over another. An accent set without a `focus` of its own drops the base's: that ring is a tint of
|
|
26
|
+
the base's hue, and under another accent it would be the wrong colour; the ring then follows the accent. The inks
|
|
27
|
+
chosen for the base's accent (`onAccent`, `accentInk`) go the same way: they read on that fill, not this one. */
|
|
28
|
+
function overlayPalette(base, over) {
|
|
29
|
+
const merged = { ...base, ...over };
|
|
30
|
+
if (over?.accent !== undefined && over.focus === undefined)
|
|
31
|
+
delete merged.focus;
|
|
32
|
+
if (over?.accent !== undefined && over.accent !== base.accent) {
|
|
33
|
+
if (over.onAccent === undefined)
|
|
34
|
+
delete merged.onAccent;
|
|
35
|
+
if (over.accentInk === undefined)
|
|
36
|
+
delete merged.accentInk;
|
|
37
|
+
}
|
|
38
|
+
if (over?.primary !== undefined && over.primary !== base.primary && over.onPrimary === undefined)
|
|
39
|
+
delete merged.onPrimary;
|
|
40
|
+
return merged;
|
|
41
|
+
}
|
|
42
|
+
/** The nav role its base look sets, which a theme wears on the bar only until it sets the role itself (recipeAttributes). */
|
|
43
|
+
export function lookNavRole(theme) {
|
|
44
|
+
return themePreset(theme.base)?.type?.roles?.nav;
|
|
45
|
+
}
|
|
46
|
+
/** Inherit roles from a data-backed base, then overlay the author's explicit values. */
|
|
47
|
+
export function inheritThemePreset(theme) {
|
|
48
|
+
const base = themePreset(theme.base);
|
|
49
|
+
if (!base || base === theme)
|
|
50
|
+
return theme;
|
|
51
|
+
return {
|
|
52
|
+
...theme,
|
|
53
|
+
light: overlayPalette(base.light, theme.light),
|
|
54
|
+
dark: overlayPalette(base.dark, theme.dark),
|
|
55
|
+
fonts: { ...base.fonts, ...theme.fonts },
|
|
56
|
+
radius: { ...base.radius, ...theme.radius },
|
|
57
|
+
recipes: { ...base.recipes, ...theme.recipes },
|
|
58
|
+
elevation: theme.elevation ?? base.elevation,
|
|
59
|
+
...((theme.lifts ?? base.lifts) ? { lifts: { ...base.lifts, ...theme.lifts } } : {}),
|
|
60
|
+
...((theme.type ?? base.type) ? { type: mergeType(base.type, theme.type) } : {}),
|
|
61
|
+
...((theme.density ?? base.density) ? { density: theme.density ?? base.density } : {}),
|
|
62
|
+
...((theme.motion ?? base.motion) ? { motion: theme.motion ?? base.motion } : {}),
|
|
63
|
+
...((theme.rhythm ?? base.rhythm) ? { rhythm: theme.rhythm ?? base.rhythm } : {}),
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
/** Resolve structure first, then theme colors, then a named color variation.
|
|
67
|
+
A removed stored choice falls back to the authored default. */
|
|
68
|
+
export function effectiveThemeDefinition(theme, paletteId) {
|
|
69
|
+
const inherited = inheritThemePreset(theme);
|
|
70
|
+
const selected = paletteId === 'default'
|
|
71
|
+
? undefined
|
|
72
|
+
: (theme.palettes?.find((palette) => palette.id === (paletteId ?? theme.defaultPalette)) ??
|
|
73
|
+
theme.palettes?.find((palette) => palette.id === theme.defaultPalette));
|
|
74
|
+
if (!selected)
|
|
75
|
+
return inherited;
|
|
76
|
+
return { ...inherited, light: overlayPalette(inherited.light, selected.light), dark: overlayPalette(inherited.dark, selected.dark) };
|
|
77
|
+
}
|
|
78
|
+
/** App overrides are applied after inheritance and palette selection. Keep the
|
|
79
|
+
CSS expressions intact: legacy authored colors may use browser CSS syntax.
|
|
80
|
+
An authored accent is the first chart series too: a brand blue on the tabs
|
|
81
|
+
beside the look's own blue in the chart read as two products on one page. */
|
|
82
|
+
/**
|
|
83
|
+
* A look's palette under the App's own accent. One colour is authored for the light ground and mixed toward white on
|
|
84
|
+
* the dark one; `{ light, dark }` says both, each worn as written. The soft tint is always derived from the accent worn.
|
|
85
|
+
*/
|
|
86
|
+
export function effectiveThemePalette(palette, dark, own = {}) {
|
|
87
|
+
const authored = typeof own.accent === 'object' ? (dark ? own.accent.dark : own.accent.light) : own.accent;
|
|
88
|
+
const accent = !authored
|
|
89
|
+
? palette.accent
|
|
90
|
+
: typeof own.accent === 'string' && dark
|
|
91
|
+
? `color-mix(in srgb, ${authored} 62%, white)`
|
|
92
|
+
: authored;
|
|
93
|
+
/* The inks an accent needs beyond itself: the theme's own, else the one that reads where the accent as it stands
|
|
94
|
+
would not. An App's accent is not the one the theme chose them for, so they are chosen again. */
|
|
95
|
+
const under = authored ? { ...palette, onAccent: undefined, accentInk: undefined, accent } : palette;
|
|
96
|
+
const onAccent = under.onAccent ?? deriveOnAccent(under);
|
|
97
|
+
const accentInk = under.accentInk ?? deriveAccentInk(under, Boolean(authored));
|
|
98
|
+
/* What a theme left as its accent and an App's accent is drawn as a line or a word, not a fill: a link, the ring, the
|
|
99
|
+
menu's current mark, the first series. It follows the accent's ink; a color the theme chose for it stays. */
|
|
100
|
+
const ink = accentInk ?? accent;
|
|
101
|
+
const follows = (value) => authored || value === undefined || value === palette.accent;
|
|
102
|
+
const out = {
|
|
103
|
+
...palette,
|
|
104
|
+
accent,
|
|
105
|
+
focus: follows(palette.focus) ? ink : palette.focus,
|
|
106
|
+
link: follows(palette.link) ? ink : palette.link,
|
|
107
|
+
...(palette.navAccent !== undefined && !authored && palette.navAccent === palette.accent ? { navAccent: ink } : {}),
|
|
108
|
+
chart1: authored ? ink : follows(palette.chart1) ? ink : palette.chart1,
|
|
109
|
+
accentSoft: authored
|
|
110
|
+
? `color-mix(in srgb, ${authored} 14%, transparent)`
|
|
111
|
+
: (palette.accentSoft ?? `color-mix(in srgb, ${palette.accent} 14%, transparent)`),
|
|
112
|
+
};
|
|
113
|
+
if (onAccent)
|
|
114
|
+
out.onAccent = onAccent;
|
|
115
|
+
else
|
|
116
|
+
delete out.onAccent;
|
|
117
|
+
/* A form's primary action, where the theme names one: the words on it as the theme says, else the ones that read. */
|
|
118
|
+
if (palette.primary)
|
|
119
|
+
out.onPrimary = palette.onPrimary ?? onPrimaryOf(palette);
|
|
120
|
+
if (accentInk)
|
|
121
|
+
out.accentInk = accentInk;
|
|
122
|
+
else
|
|
123
|
+
delete out.accentInk;
|
|
124
|
+
return out;
|
|
125
|
+
}
|
|
126
|
+
/** A worn palette's inks said whole: what a check or a fix measures when the theme named neither. */
|
|
127
|
+
export function withInks(palette) {
|
|
128
|
+
return {
|
|
129
|
+
...palette,
|
|
130
|
+
onAccent: palette.onAccent ?? palette.ground ?? palette.surface,
|
|
131
|
+
accentInk: palette.accentInk ?? palette.accent,
|
|
132
|
+
...(palette.primary ? { onPrimary: palette.onPrimary ?? onPrimaryOf(palette) } : {}),
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
/** The words on a form's primary action the theme left unsaid: the page's color where it reads on the fill, else the
|
|
136
|
+
ink, white or black, as for the accent. */
|
|
137
|
+
function onPrimaryOf(palette) {
|
|
138
|
+
return deriveOnAccent({ ...palette, accent: palette.primary }) ?? palette.ground ?? palette.surface;
|
|
139
|
+
}
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Every recipe value said in one sentence: what it draws, and what tells it from the values beside it. The menu
|
|
3
|
+
* (themeRecipes.ts) names the values and the sheets that draw them; this says them for a reader who chooses by
|
|
4
|
+
* text: an agent reading the schema, an author reading the gallery page (site theme-recipes.md) under each picture.
|
|
5
|
+
* Not on the first page: nothing here is drawn.
|
|
6
|
+
*
|
|
7
|
+
* Typed against the menu, so a value added to it without a sentence here is a type error, and a sentence for a
|
|
8
|
+
* value it does not have is one too. test/theme-recipe-words.test.ts holds the schema's descriptions and the
|
|
9
|
+
* gallery page to these words.
|
|
10
|
+
*/
|
|
11
|
+
import type { ThemeTypeRole } from '../../schema/theme.js';
|
|
12
|
+
import type { RECIPE_MENU } from './themeRecipes.js';
|
|
13
|
+
export declare const RECIPE_WORDS: {
|
|
14
|
+
readonly nav: {
|
|
15
|
+
readonly tint: 'The current entry sits on a soft tint of the accent; the other rows stay plain.';
|
|
16
|
+
readonly inverted: 'The current entry is inverted, the menu’s ink as its ground: the boldest mark, square and high-contrast.';
|
|
17
|
+
readonly wash: 'The current entry sits on a wash of the menu’s own accent, stronger than tint, for a menu in a brand color.';
|
|
18
|
+
readonly underline: 'The current entry in the top bar is marked by a 3px rule of the menu’s accent under it, with no fill.';
|
|
19
|
+
readonly pill: 'Every row is a rounded pill with room around it; the current one is filled in the accent’s tint, its word in the accent.';
|
|
20
|
+
readonly quiet: 'The current entry is barely shaded in the menu’s ink, with no accent at all: the calmest mark.';
|
|
21
|
+
readonly slot: 'The current entry is an ink block, as inverted, with a 3px marker of the menu’s accent beside it, like a tool’s slot on a pegboard.';
|
|
22
|
+
};
|
|
23
|
+
readonly bar: {
|
|
24
|
+
readonly plain: 'The top bar is the menu’s ground with a hairline under it.';
|
|
25
|
+
readonly ruled: 'The top bar ends in a 2px rule instead of a hairline, and casts no shadow.';
|
|
26
|
+
readonly dark: 'The top bar takes the menu’s ground and inks, so a dark or brand-colored menu runs across the top too.';
|
|
27
|
+
readonly airy: 'The top bar is taller, with a large bold brand name and a wide, raised search box.';
|
|
28
|
+
readonly soft: 'The top bar is a panel in the surface color with a hairline under it, apart from the menu beside it.';
|
|
29
|
+
};
|
|
30
|
+
readonly tabs: {
|
|
31
|
+
readonly pill: 'The chosen tab is a filled pill; the others are plain words.';
|
|
32
|
+
readonly inverted: 'The chosen tab is inverted, the ink as its ground: square, high-contrast.';
|
|
33
|
+
readonly underline: 'The tabs stand on a hairline, wide apart, the chosen one underlined in the accent with no fill.';
|
|
34
|
+
readonly rule: 'The chosen tab is underlined by a 2px rule in the link color with no fill, the tabs packed as written.';
|
|
35
|
+
readonly chosen: 'The chosen tab sits on a soft tint of the accent in the ink, wider apart, with no underline.';
|
|
36
|
+
};
|
|
37
|
+
readonly windows: {
|
|
38
|
+
readonly segmented: 'The period picker is a segmented control, the chosen period filled.';
|
|
39
|
+
readonly lifted: 'The period picker is a sunken tray, the chosen period a raised white key on it.';
|
|
40
|
+
readonly chosen: 'The period picker has no tray; the chosen period sits on a soft tint of the accent.';
|
|
41
|
+
};
|
|
42
|
+
readonly stat: {
|
|
43
|
+
readonly plain: 'A stat is a figure and its label with no frame.';
|
|
44
|
+
readonly framed: 'Each stat is a card framed by a line in the ink: square and stark.';
|
|
45
|
+
readonly topline: 'Each stat card has a 3px rule in the first chart color along its top.';
|
|
46
|
+
readonly ruled: 'Each stat stands open under a 2px rule in the ink, with no card or shadow, like a printed page.';
|
|
47
|
+
readonly icon: 'Each stat is a card with its icon in a round tint of a chart color above the label, and a large bold figure.';
|
|
48
|
+
readonly panel: 'Each stat is a panel on the surface with a hairline and the look’s card shadow.';
|
|
49
|
+
readonly divided: 'The stats share one strip, parted by hairlines, with no cards: the quietest arrangement.';
|
|
50
|
+
};
|
|
51
|
+
readonly section: {
|
|
52
|
+
readonly open: 'A dashboard section stands open on the page under its rule.';
|
|
53
|
+
readonly card: 'Each dashboard section is a card with a hairline and the card shadow, its table drawn to the card’s edges.';
|
|
54
|
+
readonly panel: 'Each dashboard section is a panel like card, but a section in the side column stays open on the page.';
|
|
55
|
+
};
|
|
56
|
+
readonly fields: {
|
|
57
|
+
readonly open: 'A record’s field groups and forms stand open on the page.';
|
|
58
|
+
readonly panel: 'Each field group and form is a panel on the surface with a hairline; its labels stay as the look draws them.';
|
|
59
|
+
readonly card: 'Each field group and form is a card with a hairline and the card shadow, its labels muted and the values in the interface face.';
|
|
60
|
+
readonly rail: 'Field groups stand open, and the side column’s cards become captioned groups between hairlines.';
|
|
61
|
+
};
|
|
62
|
+
readonly table: {
|
|
63
|
+
readonly open: 'Rows stand on the page under a rule, the head as the look draws it.';
|
|
64
|
+
readonly tinted: 'As open, but a hovered row takes a tint of the accent and its check boxes the accent: the same until a pointer moves.';
|
|
65
|
+
readonly hairline: 'The head sits on a hairline in 12.5px semibold, the rows in 13.5px: open, a little roomier.';
|
|
66
|
+
readonly card: 'The table is a card: muted 12px heads on a hairline, faint row rules and taller rows.';
|
|
67
|
+
readonly quiet: 'The table is a card of quiet rows, a work queue’s open button folded to a chevron at the row’s end.';
|
|
68
|
+
readonly banded: 'As open, but every other row lies on the band color (colors.band, or the raised ground), each ink measured on it.';
|
|
69
|
+
};
|
|
70
|
+
readonly status: {
|
|
71
|
+
readonly dot: 'A status word in its tone with a dot before it.';
|
|
72
|
+
readonly pill: 'A status word on a pill tinted with its tone, without a dot.';
|
|
73
|
+
readonly 'pill-dot': 'A status word on a pill tinted with its tone, with a small dot inside it.';
|
|
74
|
+
readonly quiet: 'A status word in the ink with a dot in its tone: the color is only the dot.';
|
|
75
|
+
};
|
|
76
|
+
readonly board: {
|
|
77
|
+
readonly ruled: 'A board’s lanes are outlined by a hairline; its cards lie flat on them.';
|
|
78
|
+
readonly soft: 'As ruled, but each card casts the look’s card shadow: only the cards lift.';
|
|
79
|
+
readonly strip: 'Each lane is headed by a strip tinted with its tone, its cards white on the lane.';
|
|
80
|
+
};
|
|
81
|
+
readonly chart: {
|
|
82
|
+
readonly plain: 'A chart is its lines or bars on a light grid.';
|
|
83
|
+
readonly wash: 'An area under a line is washed in the first chart color.';
|
|
84
|
+
readonly gradient: 'An area fades from the line down to nothing, the line heavier and the grid dashed.';
|
|
85
|
+
readonly line: 'Only the lines: no areas, a fine solid grid and small ticks.';
|
|
86
|
+
};
|
|
87
|
+
readonly buttons: {
|
|
88
|
+
readonly accent: 'The primary button is filled in the accent; the rest are quiet.';
|
|
89
|
+
readonly raised: 'Secondary buttons are white keys with a hairline and a small shadow, raised off the page.';
|
|
90
|
+
readonly keyed: 'Buttons are hard-edged keys: the primary one filled in the accent with an ink edge, like a hazard tag, the rest edged in the ink.';
|
|
91
|
+
};
|
|
92
|
+
readonly links: {
|
|
93
|
+
readonly plain: 'A link to another record is in the link color without an underline.';
|
|
94
|
+
readonly underline: 'A link to another record is underlined, so it reads as one without color.';
|
|
95
|
+
};
|
|
96
|
+
readonly rules: {
|
|
97
|
+
readonly ink: 'A record’s sections are announced by a 2px rule in the ink.';
|
|
98
|
+
readonly hairline: 'A record’s sections are announced by a 1px hairline instead.';
|
|
99
|
+
readonly double: 'A 1px hairline announces a record’s sections as in hairline, a box is ruled in the strong line, and a table’s heads close with a double rule.';
|
|
100
|
+
};
|
|
101
|
+
readonly avatar: {
|
|
102
|
+
readonly plain: 'A record’s avatar is its initials in a small square.';
|
|
103
|
+
readonly large: 'A record’s avatar is 44px, in the look’s corners.';
|
|
104
|
+
readonly round: 'A record’s avatar is 44px and round, and the menu’s and the account’s marks are round too.';
|
|
105
|
+
};
|
|
106
|
+
readonly workflow: {
|
|
107
|
+
readonly markers: 'A workflow is a track of thin segments, the label under each.';
|
|
108
|
+
readonly pills: 'A workflow is a row of pills with a dot each: a step walked in the good tint, the current one in the accent’s.';
|
|
109
|
+
};
|
|
110
|
+
readonly banner: {
|
|
111
|
+
readonly tint: 'A dashboard’s banner note is a box tinted with the accent.';
|
|
112
|
+
readonly gradient: 'A dashboard’s banner note is a soft gradient from the accent to the second chart color.';
|
|
113
|
+
readonly plain: 'A dashboard’s banner note stands on the page with no box, its eyebrow in the link color.';
|
|
114
|
+
};
|
|
115
|
+
readonly steps: {
|
|
116
|
+
readonly flat: 'A breakdown drawn as steps is a row of cards on the surface with a hairline.';
|
|
117
|
+
readonly tinted: 'Each step’s card is tinted with its tone: good, warning, critical or the accent.';
|
|
118
|
+
readonly strip: 'The steps are one strip of figures parted by hairlines, with no cards or marks.';
|
|
119
|
+
};
|
|
120
|
+
readonly lanes: {
|
|
121
|
+
readonly tint: 'A board lane’s value in its head is on its tone’s tint.';
|
|
122
|
+
readonly tag: 'A board lane’s value is a solid tag in its tone, in white capitals.';
|
|
123
|
+
readonly plain: 'A board lane’s value is its name in plain ink.';
|
|
124
|
+
};
|
|
125
|
+
readonly header: {
|
|
126
|
+
readonly plain: 'A record’s head and a list’s stand on the page’s ground, under the trail’s hairline.';
|
|
127
|
+
readonly band: 'A record’s head and a list’s are one band of the raised ground from edge to edge: the trail, the title, its status, facts and verbs, a list’s tabs and filters; the contents keep their edge.';
|
|
128
|
+
readonly hero: 'A band, with the record’s avatar large beside its title (above it on a phone); a record without one, and a list, draw the band.';
|
|
129
|
+
};
|
|
130
|
+
readonly required: {
|
|
131
|
+
readonly star: 'A required field wears a red star after its label; an optional one wears nothing.';
|
|
132
|
+
readonly 'optional-word': 'A required field wears nothing and an optional one says “(optional)” after its label, quietly; the form’s own words, in the reader’s language.';
|
|
133
|
+
};
|
|
134
|
+
readonly checkbox: {
|
|
135
|
+
readonly native: 'A checkbox is the browser’s own, in the accent.';
|
|
136
|
+
readonly drawn: 'A checkbox is drawn: a square in the field’s fill with the control’s edge and corner, the accent with a check when on.';
|
|
137
|
+
};
|
|
138
|
+
readonly formStep: {
|
|
139
|
+
readonly plain: 'A multi-step form’s step header is its title over its lead, with nothing between it and the fields.';
|
|
140
|
+
readonly ruled: 'A multi-step form’s step header ends in a hairline, which parts it from the fields under it.';
|
|
141
|
+
};
|
|
142
|
+
readonly actionBar: {
|
|
143
|
+
readonly plain: 'A form’s sticky action bar stands on a hairline over the page.';
|
|
144
|
+
readonly raised: 'A form’s sticky action bar is raised on the surface with a soft lift, in place of the hairline.';
|
|
145
|
+
};
|
|
146
|
+
};
|
|
147
|
+
/** One part's values said, in the menu's order: "`tint`: …. `inverted`: …." — the schema's description of the part. */
|
|
148
|
+
export declare function recipeDescription(part: keyof typeof RECIPE_MENU): string;
|
|
149
|
+
/**
|
|
150
|
+
* Each type role said in a sentence: what it draws and what it takes. A role is not a menu of values but a few
|
|
151
|
+
* properties (themeType.ts holds their ranges), so this is the schema's description of the role and the gallery's
|
|
152
|
+
* Type section, where the three recipes it replaced (labels, headings, figures) were.
|
|
153
|
+
*/
|
|
154
|
+
export declare const TYPE_WORDS: {
|
|
155
|
+
readonly [Role in ThemeTypeRole]: string;
|
|
156
|
+
};
|