@kayjs/kay 1.108.0 → 1.110.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/eslint.js +2093 -3774
- package/editors/zed/extension.toml +2 -2
- package/llms/action-protection.md +1 -1
- package/llms/actions-from-islands.md +5 -5
- package/llms/actions-refused-fields.md +4 -4
- package/llms/api-from-islands.md +6 -6
- package/llms/browser-only.md +2 -2
- package/llms/cdn-caching.md +1 -1
- package/llms/checks.md +1 -1
- package/llms/code-lints.md +1 -2
- package/llms/component-library-conventions.md +1 -1
- package/llms/components.md +5 -5
- package/llms/deprecated-lints.md +2 -7
- package/llms/effects.md +1 -1
- package/llms/errors.md +2 -2
- package/llms/events.md +1 -1
- package/llms/guards.md +1 -1
- package/llms/head.md +1 -1
- package/llms/hooks.md +2 -2
- package/llms/images.md +1 -1
- package/llms/island-and-form-lints.md +4 -2
- package/llms/island-sources.md +1 -1
- package/llms/islands-state-to-ids.md +2 -2
- package/llms/islands.md +8 -4
- package/llms/lints.md +1 -1
- package/llms/live-values.md +4 -4
- package/llms/local-collections.md +1 -1
- package/llms/locales.md +1 -1
- package/llms/mcp.md +2 -2
- package/llms/metrics.md +1 -1
- package/llms/navigation-from-code.md +7 -7
- package/llms/navigation.md +4 -2
- package/llms/prerendering.md +1 -0
- package/llms/production.md +2 -2
- package/llms/project-new-and-add.md +1 -1
- package/llms/project.md +4 -4
- package/llms/proxy-and-security.md +1 -1
- package/llms/queues.md +1 -1
- package/llms/rate-limits.md +4 -4
- package/llms/rendering.md +1 -1
- package/llms/server-islands.md +2 -2
- package/llms/server.md +1 -1
- package/llms/stores.md +1 -1
- package/llms/styles-and-assets.md +1 -1
- package/llms/templates-elements-slots-snippets.md +2 -2
- package/llms/testing-mount.md +49 -0
- package/llms/testing.md +4 -45
- package/llms/upgrading-1-105-config.md +13 -13
- package/llms/upgrading-archive.md +64 -74
- package/llms/upgrading.md +92 -70
- package/llms/whats-new.md +24 -0
- package/llms.txt +5 -6
- package/package.json +6 -10
- package/src/build/route-sizes.ts +2 -3
- package/src/build/variants.ts +132 -18
- package/src/check/browser-global-reads.ts +2 -2
- package/src/check/config-objects.ts +1 -1
- package/src/check/diagnose.ts +0 -22
- package/src/check/env-types.ts +1 -1
- package/src/check/export-homes.ts +1 -1
- package/src/check/guards.ts +3 -3
- package/src/check/index.ts +2 -7
- package/src/check/moved-keys.ts +1 -1
- package/src/check/project.ts +6 -7
- package/src/check/schema-builders.ts +125 -26
- package/src/check/shadow-types.ts +0 -86
- package/src/commands/check.ts +2 -2
- package/src/commands/env.ts +25 -3
- package/src/commands/upgrade.ts +2 -1
- package/src/compiler/allow-comments.ts +38 -2
- package/src/compiler/ast.ts +21 -19
- package/src/compiler/browser.ts +2 -14
- package/src/compiler/class-items.ts +16 -0
- package/src/compiler/codegen.ts +10 -10
- package/src/compiler/deprecated-library.ts +0 -12
- package/src/compiler/deprecated-lints-1-106.ts +2 -2
- package/src/compiler/deprecated-lints.ts +3 -495
- package/src/compiler/deprecated-ui-props.ts +5 -5
- package/src/compiler/errors.ts +2 -2
- package/src/compiler/fence-checks.ts +2 -121
- package/src/compiler/hand-parts.ts +83 -0
- package/src/compiler/helper-imports.ts +2 -2
- package/src/compiler/image-attributes.ts +1 -3
- package/src/compiler/index.ts +23 -23
- package/src/compiler/island-arguments.ts +17 -95
- package/src/compiler/island-cause.ts +7 -7
- package/src/compiler/island-declaration.ts +2 -8
- package/src/compiler/island-lints.ts +19 -0
- package/src/compiler/island-marker.ts +3 -3
- package/src/compiler/island-problems.ts +25 -0
- package/src/compiler/items.ts +12 -0
- package/src/compiler/jsx-class.ts +1 -25
- package/src/compiler/jsx.ts +7 -6
- package/src/compiler/kay-exports.ts +0 -2
- package/src/compiler/link-flags.ts +9 -38
- package/src/compiler/lints.ts +10 -18
- package/src/compiler/markup.ts +33 -41
- package/src/compiler/module-signals.ts +2 -2
- package/src/compiler/names.ts +1 -1
- package/src/compiler/page-settings.ts +11 -0
- package/src/compiler/parser.ts +6 -8
- package/src/compiler/plan.ts +1 -3
- package/src/compiler/removed-lints.ts +90 -0
- package/src/compiler/rewrite.ts +3 -18
- package/src/compiler/script-server.ts +8 -3
- package/src/compiler/signal-from-prop.ts +141 -0
- package/src/compiler/template-reads.ts +16 -0
- package/src/compiler/validate.ts +3 -8
- package/src/config-loader.ts +14 -4
- package/src/config-resolve.ts +18 -142
- package/src/config-shape.ts +44 -34
- package/src/config.ts +10 -114
- package/src/dev/preload.ts +4 -1
- package/src/lsp/server.ts +4 -0
- package/src/migrate/markup.ts +4 -1
- package/src/runtime/action-call.ts +0 -8
- package/src/runtime/action-encode.ts +26 -0
- package/src/runtime/action-error.ts +3 -11
- package/src/runtime/action-protection.ts +2 -2
- package/src/runtime/action-run.ts +2 -27
- package/src/runtime/action-shared.ts +14 -37
- package/src/runtime/action-stream.ts +0 -1
- package/src/runtime/action.ts +1 -1
- package/src/runtime/call-result.ts +2 -10
- package/src/runtime/checks.ts +25 -13
- package/src/runtime/client.ts +7 -11
- package/src/runtime/core.ts +5 -23
- package/src/runtime/dom.ts +1 -1
- package/src/runtime/html.ts +1 -1
- package/src/runtime/i18n.client.ts +1 -4
- package/src/runtime/i18n.server.ts +1 -4
- package/src/runtime/i18n.ts +3 -3
- package/src/runtime/image.ts +2 -19
- package/src/runtime/index.ts +3 -3
- package/src/runtime/island.server.ts +56 -13
- package/src/runtime/live-resource.server.ts +0 -1
- package/src/runtime/live-value.server.ts +2 -2
- package/src/runtime/live-value.shared.ts +7 -20
- package/src/runtime/live.ts +1 -12
- package/src/runtime/local-types.ts +1 -11
- package/src/runtime/local.ts +4 -14
- package/src/runtime/navigate-api.ts +2 -5
- package/src/runtime/navigate.ts +9 -0
- package/src/runtime/navigation-state.ts +0 -12
- package/src/runtime/navigation.ts +5 -1
- package/src/runtime/page-swap.ts +8 -8
- package/src/runtime/persist.ts +11 -3
- package/src/runtime/persisted.ts +4 -30
- package/src/runtime/presence.ts +6 -7
- package/src/runtime/query-param.ts +20 -12
- package/src/runtime/reactive.ts +3 -1
- package/src/runtime/refuse.ts +3 -17
- package/src/runtime/store-base.ts +4 -6
- package/src/runtime/swap-fetch.ts +1 -1
- package/src/runtime/swap-flight.ts +10 -10
- package/src/runtime/swap-kept.ts +69 -29
- package/src/runtime/swap-morph.ts +49 -9
- package/src/runtime/text-hash.ts +17 -0
- package/src/runtime/uid.server.ts +6 -4
- package/src/runtime/values.ts +52 -23
- package/src/runtime/with-query.ts +9 -0
- package/src/server/action-hooks.ts +8 -8
- package/src/server/actions.ts +13 -14
- package/src/server/api-modules.ts +2 -3
- package/src/server/app-stages.ts +15 -33
- package/src/server/app.ts +10 -5
- package/src/server/auth-mails.ts +0 -2
- package/src/server/env-state.ts +40 -10
- package/src/server/flash.ts +1 -1
- package/src/server/guard-requirement.ts +4 -4
- package/src/server/image.ts +2 -2
- package/src/server/index.ts +0 -2
- package/src/server/job-context.ts +3 -3
- package/src/server/jobs-page.ts +1 -1
- package/src/server/jobs.ts +5 -9
- package/src/server/kept-exports.ts +0 -2
- package/src/server/kv.ts +11 -14
- package/src/server/library.ts +1 -3
- package/src/server/live.ts +2 -2
- package/src/server/mcp.ts +3 -9
- package/src/server/metrics.ts +2 -4
- package/src/server/page-settings.ts +10 -19
- package/src/server/prerender.ts +19 -2
- package/src/server/protection.ts +15 -18
- package/src/server/queue.ts +3 -6
- package/src/server/rate-limit.ts +0 -3
- package/src/server/render-document.ts +9 -7
- package/src/server/render.ts +1 -1
- package/src/server/routes.ts +7 -3
- package/src/server/scope.ts +3 -2
- package/src/server/session.ts +5 -6
- package/src/server/setup.ts +1 -1
- package/src/server/signals.ts +17 -7
- package/src/server/signed.ts +1 -3
- package/src/server/source.ts +20 -4
- package/src/server/speculation.ts +1 -1
- package/src/server/storage.ts +3 -8
- package/src/server/validate.ts +1 -1
- package/src/server/vitals.ts +1 -3
- package/src/server/work-scope.ts +2 -4
- package/src/server/work.ts +1 -1
- package/src/server/workflow.ts +1 -1
- package/src/test/index.ts +2 -1
- package/src/test/site-actions.ts +16 -6
- package/src/test/site-keys.ts +10 -15
- package/src/test/site-socket.ts +1 -2
- package/src/test/site-types.ts +0 -8
- package/types/build/route-sizes.d.ts.map +1 -1
- package/types/build/variants.d.ts +9 -1
- package/types/build/variants.d.ts.map +1 -1
- package/types/check/diagnose.d.ts.map +1 -1
- package/types/check/index.d.ts +1 -2
- package/types/check/index.d.ts.map +1 -1
- package/types/check/project.d.ts.map +1 -1
- package/types/check/schema-builders.d.ts.map +1 -1
- package/types/check/shadow-types.d.ts.map +1 -1
- package/types/commands/env.d.ts.map +1 -1
- package/types/commands/upgrade.d.ts.map +1 -1
- package/types/compiler/allow-comments.d.ts +2 -0
- package/types/compiler/allow-comments.d.ts.map +1 -1
- package/types/compiler/ast.d.ts +1 -2
- package/types/compiler/ast.d.ts.map +1 -1
- package/types/compiler/browser.d.ts.map +1 -1
- package/types/compiler/class-items.d.ts +7 -0
- package/types/compiler/class-items.d.ts.map +1 -0
- package/types/compiler/deprecated-library.d.ts.map +1 -1
- package/types/compiler/deprecated-lints-1-106.d.ts +2 -2
- package/types/compiler/deprecated-lints-1-106.d.ts.map +1 -1
- package/types/compiler/deprecated-lints.d.ts +2 -553
- package/types/compiler/deprecated-lints.d.ts.map +1 -1
- package/types/compiler/deprecated-ui-props.d.ts +1 -8
- package/types/compiler/deprecated-ui-props.d.ts.map +1 -1
- package/types/compiler/errors.d.ts +2 -2
- package/types/compiler/errors.d.ts.map +1 -1
- package/types/compiler/fence-checks.d.ts +0 -1
- package/types/compiler/fence-checks.d.ts.map +1 -1
- package/types/compiler/hand-parts.d.ts +10 -0
- package/types/compiler/hand-parts.d.ts.map +1 -0
- package/types/compiler/image-attributes.d.ts +0 -1
- package/types/compiler/image-attributes.d.ts.map +1 -1
- package/types/compiler/index.d.ts.map +1 -1
- package/types/compiler/island-arguments.d.ts +7 -11
- package/types/compiler/island-arguments.d.ts.map +1 -1
- package/types/compiler/island-cause.d.ts +1 -1
- package/types/compiler/island-cause.d.ts.map +1 -1
- package/types/compiler/island-declaration.d.ts +1 -3
- package/types/compiler/island-declaration.d.ts.map +1 -1
- package/types/compiler/island-lints.d.ts +17 -0
- package/types/compiler/island-lints.d.ts.map +1 -0
- package/types/compiler/island-problems.d.ts +7 -0
- package/types/compiler/island-problems.d.ts.map +1 -0
- package/types/compiler/items.d.ts +1 -0
- package/types/compiler/items.d.ts.map +1 -1
- package/types/compiler/jsx-class.d.ts +1 -2
- package/types/compiler/jsx-class.d.ts.map +1 -1
- package/types/compiler/jsx.d.ts.map +1 -1
- package/types/compiler/kay-exports.d.ts.map +1 -1
- package/types/compiler/link-flags.d.ts +0 -6
- package/types/compiler/link-flags.d.ts.map +1 -1
- package/types/compiler/lints.d.ts +21 -566
- package/types/compiler/lints.d.ts.map +1 -1
- package/types/compiler/markup.d.ts +1 -1
- package/types/compiler/markup.d.ts.map +1 -1
- package/types/compiler/module-signals.d.ts.map +1 -1
- package/types/compiler/names.d.ts.map +1 -1
- package/types/compiler/page-settings.d.ts +4 -0
- package/types/compiler/page-settings.d.ts.map +1 -1
- package/types/compiler/parser.d.ts.map +1 -1
- package/types/compiler/plan.d.ts.map +1 -1
- package/types/compiler/removed-lints.d.ts +3 -0
- package/types/compiler/removed-lints.d.ts.map +1 -0
- package/types/compiler/script-server.d.ts.map +1 -1
- package/types/compiler/signal-from-prop.d.ts +4 -0
- package/types/compiler/signal-from-prop.d.ts.map +1 -0
- package/types/compiler/template-reads.d.ts +1 -0
- package/types/compiler/template-reads.d.ts.map +1 -1
- package/types/compiler/validate.d.ts.map +1 -1
- package/types/config-loader.d.ts.map +1 -1
- package/types/config-resolve.d.ts.map +1 -1
- package/types/config-shape.d.ts +1 -1
- package/types/config-shape.d.ts.map +1 -1
- package/types/config.d.ts +5 -105
- package/types/config.d.ts.map +1 -1
- package/types/dev/preload.d.ts.map +1 -1
- package/types/lsp/server.d.ts.map +1 -1
- package/types/migrate/markup.d.ts.map +1 -1
- package/types/runtime/action-call.d.ts.map +1 -1
- package/types/runtime/action-encode.d.ts +1 -0
- package/types/runtime/action-encode.d.ts.map +1 -1
- package/types/runtime/action-error.d.ts +1 -2
- package/types/runtime/action-error.d.ts.map +1 -1
- package/types/runtime/action-run.d.ts.map +1 -1
- package/types/runtime/action-shared.d.ts +1 -27
- package/types/runtime/action-shared.d.ts.map +1 -1
- package/types/runtime/action-stream.d.ts.map +1 -1
- package/types/runtime/action.d.ts +1 -1
- package/types/runtime/action.d.ts.map +1 -1
- package/types/runtime/call-result.d.ts +0 -10
- package/types/runtime/call-result.d.ts.map +1 -1
- package/types/runtime/checks.d.ts +14 -11
- package/types/runtime/checks.d.ts.map +1 -1
- package/types/runtime/client.d.ts.map +1 -1
- package/types/runtime/core.d.ts +2 -20
- package/types/runtime/core.d.ts.map +1 -1
- package/types/runtime/dom.d.ts +1 -1
- package/types/runtime/dom.d.ts.map +1 -1
- package/types/runtime/html.d.ts +1 -1
- package/types/runtime/html.d.ts.map +1 -1
- package/types/runtime/i18n.client.d.ts +0 -1
- package/types/runtime/i18n.client.d.ts.map +1 -1
- package/types/runtime/i18n.d.ts +1 -1
- package/types/runtime/i18n.d.ts.map +1 -1
- package/types/runtime/i18n.server.d.ts +0 -1
- package/types/runtime/i18n.server.d.ts.map +1 -1
- package/types/runtime/image.d.ts.map +1 -1
- package/types/runtime/index.d.ts +3 -3
- package/types/runtime/index.d.ts.map +1 -1
- package/types/runtime/island.server.d.ts +2 -0
- package/types/runtime/island.server.d.ts.map +1 -1
- package/types/runtime/live-resource.server.d.ts.map +1 -1
- package/types/runtime/live-value.shared.d.ts +7 -15
- package/types/runtime/live-value.shared.d.ts.map +1 -1
- package/types/runtime/live.d.ts +0 -11
- package/types/runtime/live.d.ts.map +1 -1
- package/types/runtime/local-types.d.ts +0 -14
- package/types/runtime/local-types.d.ts.map +1 -1
- package/types/runtime/navigate-api.d.ts +0 -4
- package/types/runtime/navigate-api.d.ts.map +1 -1
- package/types/runtime/navigate.d.ts.map +1 -1
- package/types/runtime/navigation-state.d.ts +0 -4
- package/types/runtime/navigation-state.d.ts.map +1 -1
- package/types/runtime/navigation.d.ts +2 -0
- package/types/runtime/navigation.d.ts.map +1 -1
- package/types/runtime/page-swap.d.ts.map +1 -1
- package/types/runtime/persist.d.ts +1 -0
- package/types/runtime/persist.d.ts.map +1 -1
- package/types/runtime/persisted.d.ts +0 -15
- package/types/runtime/persisted.d.ts.map +1 -1
- package/types/runtime/presence.d.ts +0 -2
- package/types/runtime/presence.d.ts.map +1 -1
- package/types/runtime/query-param.d.ts.map +1 -1
- package/types/runtime/reactive.d.ts +2 -1
- package/types/runtime/reactive.d.ts.map +1 -1
- package/types/runtime/refuse.d.ts +0 -7
- package/types/runtime/refuse.d.ts.map +1 -1
- package/types/runtime/store-base.d.ts +1 -2
- package/types/runtime/store-base.d.ts.map +1 -1
- package/types/runtime/swap-flight.d.ts +1 -1
- package/types/runtime/swap-flight.d.ts.map +1 -1
- package/types/runtime/swap-kept.d.ts.map +1 -1
- package/types/runtime/swap-morph.d.ts.map +1 -1
- package/types/runtime/text-hash.d.ts +2 -0
- package/types/runtime/text-hash.d.ts.map +1 -0
- package/types/runtime/uid.server.d.ts.map +1 -1
- package/types/runtime/values.d.ts +6 -1
- package/types/runtime/values.d.ts.map +1 -1
- package/types/runtime/with-query.d.ts +2 -0
- package/types/runtime/with-query.d.ts.map +1 -1
- package/types/server/action-hooks.d.ts +4 -4
- package/types/server/action-hooks.d.ts.map +1 -1
- package/types/server/actions.d.ts.map +1 -1
- package/types/server/api-modules.d.ts +0 -1
- package/types/server/api-modules.d.ts.map +1 -1
- package/types/server/app-stages.d.ts +5 -13
- package/types/server/app-stages.d.ts.map +1 -1
- package/types/server/app.d.ts +3 -8
- package/types/server/app.d.ts.map +1 -1
- package/types/server/auth-mails.d.ts +0 -5
- package/types/server/auth-mails.d.ts.map +1 -1
- package/types/server/env-state.d.ts +1 -0
- package/types/server/env-state.d.ts.map +1 -1
- package/types/server/guard-requirement.d.ts +0 -1
- package/types/server/guard-requirement.d.ts.map +1 -1
- package/types/server/image.d.ts +0 -1
- package/types/server/image.d.ts.map +1 -1
- package/types/server/index.d.ts +0 -2
- package/types/server/index.d.ts.map +1 -1
- package/types/server/job-context.d.ts +1 -1
- package/types/server/job-context.d.ts.map +1 -1
- package/types/server/jobs.d.ts +0 -4
- package/types/server/jobs.d.ts.map +1 -1
- package/types/server/kept-exports.d.ts.map +1 -1
- package/types/server/kv.d.ts +4 -4
- package/types/server/kv.d.ts.map +1 -1
- package/types/server/library.d.ts +1 -3
- package/types/server/library.d.ts.map +1 -1
- package/types/server/mcp.d.ts +0 -1
- package/types/server/mcp.d.ts.map +1 -1
- package/types/server/metrics.d.ts +0 -5
- package/types/server/metrics.d.ts.map +1 -1
- package/types/server/page-settings.d.ts +3 -3
- package/types/server/page-settings.d.ts.map +1 -1
- package/types/server/prerender.d.ts.map +1 -1
- package/types/server/protection.d.ts +6 -6
- package/types/server/protection.d.ts.map +1 -1
- package/types/server/queue.d.ts +1 -3
- package/types/server/queue.d.ts.map +1 -1
- package/types/server/rate-limit.d.ts +0 -2
- package/types/server/rate-limit.d.ts.map +1 -1
- package/types/server/render-document.d.ts +1 -1
- package/types/server/render-document.d.ts.map +1 -1
- package/types/server/routes.d.ts +1 -1
- package/types/server/routes.d.ts.map +1 -1
- package/types/server/scope.d.ts.map +1 -1
- package/types/server/session.d.ts +1 -1
- package/types/server/session.d.ts.map +1 -1
- package/types/server/signals.d.ts.map +1 -1
- package/types/server/signed.d.ts +0 -2
- package/types/server/signed.d.ts.map +1 -1
- package/types/server/source.d.ts +1 -1
- package/types/server/source.d.ts.map +1 -1
- package/types/server/storage.d.ts +0 -4
- package/types/server/storage.d.ts.map +1 -1
- package/types/server/vitals.d.ts +0 -1
- package/types/server/vitals.d.ts.map +1 -1
- package/types/server/work-scope.d.ts +0 -2
- package/types/server/work-scope.d.ts.map +1 -1
- package/types/server/workflow.d.ts +1 -1
- package/types/server/workflow.d.ts.map +1 -1
- package/types/test/index.d.ts.map +1 -1
- package/types/test/site-actions.d.ts +1 -1
- package/types/test/site-actions.d.ts.map +1 -1
- package/types/test/site-keys.d.ts +1 -1
- package/types/test/site-keys.d.ts.map +1 -1
- package/types/test/site-socket.d.ts +1 -1
- package/types/test/site-socket.d.ts.map +1 -1
- package/types/test/site-types.d.ts +0 -8
- package/types/test/site-types.d.ts.map +1 -1
- package/llms/deprecated-lints-1-105-libraries.md +0 -32
- package/llms/deprecated-lints-1-105.md +0 -58
- package/src/check/action-readers.ts +0 -115
- package/src/check/action-type.ts +0 -44
- package/src/check/ai-language.ts +0 -56
- package/src/check/app-hooks.ts +0 -90
- package/src/check/auth-methods.ts +0 -85
- package/src/check/auth-rate-limits.ts +0 -99
- package/src/check/call-result.ts +0 -242
- package/src/check/client-keys.ts +0 -10
- package/src/check/cms-options.ts +0 -81
- package/src/check/config-groups.ts +0 -22
- package/src/check/config-switches.ts +0 -38
- package/src/check/context-import.ts +0 -51
- package/src/check/env-files.ts +0 -31
- package/src/check/format-duration.ts +0 -75
- package/src/check/guard-options.ts +0 -58
- package/src/check/handler-events.ts +0 -149
- package/src/check/hook-context.ts +0 -94
- package/src/check/hook-names.ts +0 -104
- package/src/check/i18n-keys.ts +0 -50
- package/src/check/images-keys.ts +0 -54
- package/src/check/job-shapes.ts +0 -273
- package/src/check/link-flag-tests.ts +0 -130
- package/src/check/live-api.ts +0 -137
- package/src/check/mail-api.ts +0 -67
- package/src/check/one-state-api.ts +0 -357
- package/src/check/pages-options.ts +0 -35
- package/src/check/rate-enforce.ts +0 -53
- package/src/check/refusal-calls.ts +0 -185
- package/src/check/retired-lints.ts +0 -49
- package/src/check/route-keys.ts +0 -166
- package/src/check/secret-keys.ts +0 -83
- package/src/check/socket-frames.ts +0 -102
- package/src/check/source-readers.ts +0 -257
- package/src/check/store-ms.ts +0 -72
- package/src/check/store-names.ts +0 -88
- package/src/check/test-helpers.ts +0 -98
- package/src/check/ttl-names.ts +0 -142
- package/src/compiler/deprecated-ai-labels.ts +0 -97
- package/src/compiler/deprecated-ai-links.ts +0 -63
- package/src/compiler/deprecated-allow.ts +0 -50
- package/src/compiler/deprecated-auth-lints.ts +0 -14
- package/src/compiler/deprecated-auth-signed.ts +0 -29
- package/src/compiler/deprecated-children.ts +0 -66
- package/src/compiler/deprecated-image.ts +0 -116
- package/src/compiler/deprecated-island.ts +0 -155
- package/src/compiler/deprecated-lints-1-105.ts +0 -41
- package/src/compiler/deprecated-page.ts +0 -125
- package/src/compiler/deprecated-parts.ts +0 -22
- package/src/compiler/deprecated-typed-lints.ts +0 -23
- package/src/compiler/deprecated-ui-callbacks.ts +0 -66
- package/src/compiler/deprecated-ui-input.ts +0 -97
- package/src/compiler/deprecated-ui-items.ts +0 -47
- package/src/compiler/old-parts.ts +0 -84
- package/src/runtime/mount.compat.ts +0 -8
- package/src/server/moved-exports.ts +0 -17
- package/types/check/action-readers.d.ts +0 -3
- package/types/check/action-readers.d.ts.map +0 -1
- package/types/check/action-type.d.ts +0 -3
- package/types/check/action-type.d.ts.map +0 -1
- package/types/check/ai-language.d.ts +0 -3
- package/types/check/ai-language.d.ts.map +0 -1
- package/types/check/app-hooks.d.ts +0 -3
- package/types/check/app-hooks.d.ts.map +0 -1
- package/types/check/auth-methods.d.ts +0 -3
- package/types/check/auth-methods.d.ts.map +0 -1
- package/types/check/auth-rate-limits.d.ts +0 -3
- package/types/check/auth-rate-limits.d.ts.map +0 -1
- package/types/check/call-result.d.ts +0 -7
- package/types/check/call-result.d.ts.map +0 -1
- package/types/check/client-keys.d.ts +0 -3
- package/types/check/client-keys.d.ts.map +0 -1
- package/types/check/cms-options.d.ts +0 -3
- package/types/check/cms-options.d.ts.map +0 -1
- package/types/check/config-groups.d.ts +0 -3
- package/types/check/config-groups.d.ts.map +0 -1
- package/types/check/config-switches.d.ts +0 -3
- package/types/check/config-switches.d.ts.map +0 -1
- package/types/check/context-import.d.ts +0 -3
- package/types/check/context-import.d.ts.map +0 -1
- package/types/check/env-files.d.ts +0 -3
- package/types/check/env-files.d.ts.map +0 -1
- package/types/check/format-duration.d.ts +0 -5
- package/types/check/format-duration.d.ts.map +0 -1
- package/types/check/guard-options.d.ts +0 -3
- package/types/check/guard-options.d.ts.map +0 -1
- package/types/check/handler-events.d.ts +0 -9
- package/types/check/handler-events.d.ts.map +0 -1
- package/types/check/hook-context.d.ts +0 -3
- package/types/check/hook-context.d.ts.map +0 -1
- package/types/check/hook-names.d.ts +0 -3
- package/types/check/hook-names.d.ts.map +0 -1
- package/types/check/i18n-keys.d.ts +0 -3
- package/types/check/i18n-keys.d.ts.map +0 -1
- package/types/check/images-keys.d.ts +0 -3
- package/types/check/images-keys.d.ts.map +0 -1
- package/types/check/job-shapes.d.ts +0 -6
- package/types/check/job-shapes.d.ts.map +0 -1
- package/types/check/link-flag-tests.d.ts +0 -4
- package/types/check/link-flag-tests.d.ts.map +0 -1
- package/types/check/live-api.d.ts +0 -3
- package/types/check/live-api.d.ts.map +0 -1
- package/types/check/mail-api.d.ts +0 -3
- package/types/check/mail-api.d.ts.map +0 -1
- package/types/check/one-state-api.d.ts +0 -9
- package/types/check/one-state-api.d.ts.map +0 -1
- package/types/check/pages-options.d.ts +0 -3
- package/types/check/pages-options.d.ts.map +0 -1
- package/types/check/rate-enforce.d.ts +0 -3
- package/types/check/rate-enforce.d.ts.map +0 -1
- package/types/check/refusal-calls.d.ts +0 -3
- package/types/check/refusal-calls.d.ts.map +0 -1
- package/types/check/retired-lints.d.ts +0 -3
- package/types/check/retired-lints.d.ts.map +0 -1
- package/types/check/route-keys.d.ts +0 -3
- package/types/check/route-keys.d.ts.map +0 -1
- package/types/check/secret-keys.d.ts +0 -3
- package/types/check/secret-keys.d.ts.map +0 -1
- package/types/check/socket-frames.d.ts +0 -3
- package/types/check/socket-frames.d.ts.map +0 -1
- package/types/check/source-readers.d.ts +0 -3
- package/types/check/source-readers.d.ts.map +0 -1
- package/types/check/store-ms.d.ts +0 -3
- package/types/check/store-ms.d.ts.map +0 -1
- package/types/check/store-names.d.ts +0 -3
- package/types/check/store-names.d.ts.map +0 -1
- package/types/check/test-helpers.d.ts +0 -3
- package/types/check/test-helpers.d.ts.map +0 -1
- package/types/check/ttl-names.d.ts +0 -3
- package/types/check/ttl-names.d.ts.map +0 -1
- package/types/compiler/deprecated-ai-labels.d.ts +0 -5
- package/types/compiler/deprecated-ai-labels.d.ts.map +0 -1
- package/types/compiler/deprecated-ai-links.d.ts +0 -5
- package/types/compiler/deprecated-ai-links.d.ts.map +0 -1
- package/types/compiler/deprecated-allow.d.ts +0 -5
- package/types/compiler/deprecated-allow.d.ts.map +0 -1
- package/types/compiler/deprecated-auth-lints.d.ts +0 -12
- package/types/compiler/deprecated-auth-lints.d.ts.map +0 -1
- package/types/compiler/deprecated-auth-signed.d.ts +0 -5
- package/types/compiler/deprecated-auth-signed.d.ts.map +0 -1
- package/types/compiler/deprecated-children.d.ts +0 -4
- package/types/compiler/deprecated-children.d.ts.map +0 -1
- package/types/compiler/deprecated-image.d.ts +0 -5
- package/types/compiler/deprecated-image.d.ts.map +0 -1
- package/types/compiler/deprecated-island.d.ts +0 -9
- package/types/compiler/deprecated-island.d.ts.map +0 -1
- package/types/compiler/deprecated-lints-1-105.d.ts +0 -39
- package/types/compiler/deprecated-lints-1-105.d.ts.map +0 -1
- package/types/compiler/deprecated-page.d.ts +0 -4
- package/types/compiler/deprecated-page.d.ts.map +0 -1
- package/types/compiler/deprecated-parts.d.ts +0 -3
- package/types/compiler/deprecated-parts.d.ts.map +0 -1
- package/types/compiler/deprecated-typed-lints.d.ts +0 -21
- package/types/compiler/deprecated-typed-lints.d.ts.map +0 -1
- package/types/compiler/deprecated-ui-callbacks.d.ts +0 -5
- package/types/compiler/deprecated-ui-callbacks.d.ts.map +0 -1
- package/types/compiler/deprecated-ui-input.d.ts +0 -5
- package/types/compiler/deprecated-ui-input.d.ts.map +0 -1
- package/types/compiler/deprecated-ui-items.d.ts +0 -5
- package/types/compiler/deprecated-ui-items.d.ts.map +0 -1
- package/types/compiler/old-parts.d.ts +0 -9
- package/types/compiler/old-parts.d.ts.map +0 -1
- package/types/runtime/mount.compat.d.ts +0 -7
- package/types/runtime/mount.compat.d.ts.map +0 -1
- package/types/server/moved-exports.d.ts +0 -12
- package/types/server/moved-exports.d.ts.map +0 -1
package/llms/upgrading.md
CHANGED
|
@@ -2,121 +2,143 @@
|
|
|
2
2
|
|
|
3
3
|
What each release breaks, and what an app changes to move to it. kay and its libraries share one version, so one section covers them all; a patch breaks nothing, and a version missing here broke nothing. Through 1.x a breaking change ships in a minor; from 2.0.0 it ships in a major, and a minor or a patch breaks nothing.
|
|
4
4
|
|
|
5
|
-
## 1.
|
|
6
|
-
|
|
7
|
-
### The `deprecated-package-names` lint is gone
|
|
8
|
-
|
|
9
|
-
A project still importing `@kaynooo/kayjs*` is not reported any more, and `kay check --fix` no longer rewrites it: write `@kayjs/kay` and `@kayjs/<library>` (`ui`, `auth`, `mail`, `cms`, `ai`) in the imports, config keys, stylesheets and `package.json` yourself, or run `kay upgrade`, which still moves an app off the old names, stopping at 1.107 first.
|
|
10
|
-
|
|
11
|
-
## 1.107.0
|
|
12
|
-
|
|
13
|
-
### `TSchema` is gone from `kay/library`
|
|
14
|
-
|
|
15
|
-
Import `Schema` from `kay/library` instead, kay's own name for what `s` builds; `kay upgrade` on 1.106 rewrote the import and its uses. The `deprecated-schema-type` lint is gone with it.
|
|
5
|
+
## 1.110.0
|
|
16
6
|
|
|
17
|
-
###
|
|
7
|
+
### A swap keeps an island whose props changed
|
|
18
8
|
|
|
19
|
-
A
|
|
9
|
+
- A refresh (an action's, `refresh()`, a live value's) used to end an island whose props changed and hydrate it afresh; it now stays, with its signals, open dialogs and focus, and takes the new props in place. A value the island seeds from a prop once, `signal(light)`, keeps the first value: write `linked(() => light)` for one that follows, or give the island a `persist={key}` that changes to start it afresh. A list whose items move keeps each island by `persist={id}`.
|
|
10
|
+
- A visit to a page with the same layout keeps the islands the layout renders (a menu, a folded group) with their state; the page's own islands are still ended. An island of a layout that used to start closed on every page now stays as it was left.
|
|
11
|
+
- A refresh keeps a field a visitor typed in and a `details` they toggled unless the server changed that value, where it used to show the server's again.
|
|
12
|
+
### A Dialog's close is a plain button with a `close` part
|
|
20
13
|
|
|
21
|
-
|
|
14
|
+
Dialog's close button is a `button` (an `a` with `closeHref`) of the `kui-icon-btn` class drawing the `x` icon, no longer an `IconButton`. An app styling it through `part="root"` of that IconButton, or a `restyle` recipe on `IconButton` that reached it, styles the `close` part of Dialog instead (SidePanel hands it on as its own `close`); a `close` block still replaces the whole button.
|
|
22
15
|
|
|
23
|
-
|
|
16
|
+
## 1.109.0
|
|
24
17
|
|
|
25
|
-
###
|
|
18
|
+
### The 1.105 config, page, server and store forms are gone
|
|
26
19
|
|
|
27
|
-
|
|
20
|
+
The twenty-four lints that reported them are gone too. `kay upgrade` on 1.108 rewrote each one written inline; what it could not reach is a type error or a refusal at boot naming the new form. The full 1.105 rules are in [Upgrading to 1.105: kay.config.ts and library options](upgrading-1-105-config.md).
|
|
28
21
|
|
|
29
|
-
|
|
22
|
+
- Config keys at the top of kay.config.ts: `links`, `offline` and `search` are `client.*`; `images`, `fonts`, `favicon`, `manifest` and `publicCache` are `assets.*`; `observe`, `health`, `metrics` and `jobs` are `ops.*`; `env` is `envFiles`; `onStart` is `onListen`. The config refuses them, naming where each moved.
|
|
23
|
+
- `i18n`'s `defaultLocale` is `default`, `prefixDefault: true` is `mode: 'always'` and `domains` is `mode: { domains }`; the old keys are refused.
|
|
24
|
+
- `serve.apiPrefix` and the `path` of `openapi`, `mcp`, `health`, `metrics` and `jobs` are `endpoints.*`; `openapi.referencePath` is `openapi: { reference: { path } }`.
|
|
25
|
+
- `/mcp` and `/metrics`, where those endpoints were before 1.105, answer 404: use `/_kay/mcp` and `/_kay/metrics`, or what `endpoints` sets.
|
|
26
|
+
- `mcp: { key }` is `mcp: { token }`, `proxy: { key: 'x-upstream-key' }` is `proxy: { key: { header } }`, and `proxy: 2` is `proxy: { hops: 2 }`; `observe.log: 'json'` and a bare function are `ops: { observe: { log: { format: 'json' } } }` and `{ sink }`.
|
|
27
|
+
- `images` takes `remote`, `formats` and `limits` only: `remoteMaxSize`, `remoteTimeout`, `quality`, `webp`, `avif`, `maxVariants` and `queue` are refused.
|
|
28
|
+
- `pages({ root, client: { ... } })` and `testSite({ root, mcp: true })` refuse a config key beside `root`: write it in `config`. `testSite({ mcpKey })` is `config: { mcp: { token } }` and `testSite({ proxyKey })` is `config: { proxy: { key: { header, secret } } }`.
|
|
29
|
+
- The `onSave`, `onUpload`, `onSend`, `onSuppress`, `onSubscribe`, `onConfirm`, `onUnsubscribe`, `onBroadcast`, `onSignUp`, `onStep`, `onToolCall` and `onSuccess` of kayjs-ai, -auth, -cms and -mail are their `after` names (`afterSave`, `afterSend`, `afterSignUp`, `afterStep`, `afterToolCall`, `afterRequest`...), and an action hook event has `context` where it had `ctx`.
|
|
30
|
+
- `maxAge` is `ttl` in `signed.sign`, `files.url`, workChallenge, kayjs-auth's `proofOfWork` and `captcha`, an action's `protect.minTime` and `protect.proofOfWork`, and the data of a kayjs-auth mail (`ttl: { link, code }`).
|
|
31
|
+
- A store is handed a `Duration` for every length, `durations: true` is no member of a store, `lengthFor` takes milliseconds only and `kv(ns).set(key, value, 60_000)` is `'60000ms'`; `formatDuration(7_500_000)` is `formatDuration('125m')`.
|
|
32
|
+
- Library stores: `ai({ conversations })` is `ai({ store })`; `pgConversations`, `sqliteConversations`, `createConversationTable` and `conversationTable` are `pgAi`, `sqliteAi`, `createAiTables` and `aiTables`; `openLists`, `createMailListTables` and `mailListTableNames` are `sqliteLists`, `createMailTables` and `mailTables`; `mailer({ listStore, suppressionStore })` is `store: { lists, suppressions }`; `pgLoader` and `sqliteLoader` of kayjs-cms are `pgCms` and `sqliteCms`.
|
|
33
|
+
- Jobs: a handler is `(input, ctx)`, its signal and job being `ctx.signal` and `ctx.job` and no longer the second and third arguments, and `lostAfter` is `timeout`; `schedule('@hourly', job, options)` is `schedule({ cron: '@hourly', ...options }, job)`, `schedule('30s', job)` is `schedule({ every: '30s' }, job)`; `diskFiles(dir, hooks)` is `diskFiles({ dir, ...hooks })`; `ws.send(JSON.stringify(value))` of an `api()` socket is `ws.send(value)`.
|
|
34
|
+
- A page's `noindex`, `sitemap`, `lastmod`, `search` and `feed` are written in `seo`, and `ttl` and `cacheControl` are `cache`: the build refuses a top-level key of `page`, naming the new one. An `img` takes `placeholder={false}` where it took `no-placeholder`.
|
|
35
|
+
### What `kay upgrade` on 1.108 did not reach
|
|
30
36
|
|
|
31
|
-
|
|
37
|
+
The lints only saw the forms written inline, so an app that reported nothing on 1.108 can still hold these; `kay check` on 1.109 shows each as a type error, and each is a hand edit.
|
|
32
38
|
|
|
33
|
-
|
|
34
|
-
|
|
39
|
+
- A removed lint named in `lints` (`'deprecated-package-names': 'allow'`, any `deprecated-*` of 1.105 to 1.108, `unreturned-fail`, `uncaught-await`) is accepted: `kay check` warns that the lint is gone and the entry changes nothing, so delete it when convenient; a `// kay-allow` comment naming one gets the same warning, and `kay check --fix` drops the name (the comment when it was the only one).
|
|
40
|
+
- `.rows()` of an `infiniteList(...)`, in a template or a script, is `.data()`, wherever the list was built; and `site.refusal(action, input)` in a test is `site.expectRefused(action, input)`.
|
|
41
|
+
- `ctx.deny(status, message)` with the message in a variable (`ctx.deny(503, failure.message)`) is `ctx.deny(503, { message: failure.message })`.
|
|
42
|
+
- `maxAge` in the options handed to `files.url(key, { maxAge: '1d' })` is `ttl`.
|
|
43
|
+
- `schedule(cron, job, { enabled })` with the cron held in a const or a variable is `schedule({ cron, enabled }, job)`: look for a `schedule(` whose first argument is not a literal.
|
|
44
|
+
- `formatDuration(ms)` of `kay/i18n` with a number held in a variable takes a `Duration`: write `` formatDuration(`${ms}ms`) ``.
|
|
45
|
+
- A `s.Union(Object.keys(R).map(key => s.Literal(key)))` is `s.enum(R)`: `kay check --fix` now writes it, where `s.union` of a mapped array is a type error.
|
|
46
|
+
- The `kay check --fix` of 1.106 to 1.108 wrote `s.list(...)` and `s.object(...)` with no options, so an app already rewritten holds lists capped at 1,000 items and objects that refuse a key their shape lacks, where the old builders did neither. Search the app for `s.list(` without a `max` and `s.object(` without `extra`, and add `max` or `extra: 'strip'` where the old limit or the old leniency is wanted; a string field already took the 10,000 characters of any action's string.
|
|
35
47
|
|
|
36
|
-
|
|
37
|
-
### `sanitizeHtml` keeps only `language-*` classes on `code`
|
|
48
|
+
### The island and template forms of 1.105 are gone
|
|
38
49
|
|
|
39
|
-
|
|
50
|
+
The `deprecated-page-island`, `deprecated-island-fence`, `deprecated-island-attributes`, `deprecated-island-events`, `deprecated-link-flags`, `deprecated-children-prop`, `deprecated-uncaught-await`, `deprecated-import-path`, `deprecated-context-import` and `deprecated-listen-target` lints are gone with the forms they reported; run `kay upgrade` on 1.108 first, which rewrote each but the page island.
|
|
40
51
|
|
|
41
|
-
|
|
52
|
+
- A page without a `--- server` fence that needs the browser is the `page-island` error: move what needs the browser into a component and render it from the page.
|
|
53
|
+
- `--- island`, `--- client` and `--- static` are unknown fences, and `export const island = { ... }` in a `--- module` fence is a `fence-invalid` error: write `island({ render, hydrate, persist, interactive })` first in the component's script.
|
|
54
|
+
- `hydrate="client"` on a use is `render="client"`, and `server="defer"` is `server defer`: `server="defer"` is a `server-island-invalid` error and `hydrate="client"` an `attribute-invalid` one.
|
|
55
|
+
- `data-keep-scroll`, `data-no-transition` and `data-no-prefetch` are read by nothing and are an `unknown-link-flag` error: write `data-scroll="keep"`, `data-transition="false"` and `data-prefetch="false"`.
|
|
56
|
+
- A `// kay-allow uncaught-await` comment and a `lints: { 'uncaught-await': ... }` entry name a removed lint: `kay check` warns, and `--fix` drops the name from the comment, which allows nothing now.
|
|
57
|
+
- `listen(window, ...)` is `listen(() => window, ...)`: `listen` takes a function returning its target, and a value is a type error, and in a `.kay` file a server read of `window`.
|
|
58
|
+
- Import `mount`, `Mounted`, `s`, `RateLimit` and `RateLimitRefusal` from `kay` and `sqliteCache` from `kay/cache`: `kay/mount` is no entry any more and `kay/server` no longer exports them.
|
|
59
|
+
- `defineContext` is imported from `kay/server`: `kay/library` no longer exports it.
|
|
60
|
+
- `children?: Snippet` beside a bare `slot` and `listen(() => document, 'kay:navigate', ...)` in an island are reported no more: both still work, and the function hook is the form to write.
|
|
61
|
+
### An action's form readers are only under `form`
|
|
42
62
|
|
|
43
|
-
|
|
63
|
+
`add.failed()`, `add.error(field)` and `add.validate(form, field)` are gone from an action: write `add.form.failed()`, `add.form.error(field)` and `add.form.validate(form, field)`, which the 1.105 upgrade had already moved to. The `deprecated-action-readers` lint is gone with them, and `.error('field')` on an action in a template no longer describes its field.
|
|
44
64
|
|
|
45
|
-
### `
|
|
65
|
+
### `Action<never, unknown>` is `Action`
|
|
46
66
|
|
|
47
|
-
`
|
|
48
|
-
### `SignedIn` takes `require` and an `@else` block
|
|
67
|
+
Write `Action` for a prop that takes any action: both parameters default to it. The `deprecated-action-type` lint is gone.
|
|
49
68
|
|
|
50
|
-
|
|
69
|
+
### An island's call answers only a result
|
|
51
70
|
|
|
52
|
-
|
|
71
|
+
A call read as its data (`const list = await call(notes, '/')` then `list.items`) is a type error, as the 1.105 call result made it; write `.orThrow()` after the call, or read `ok` and `data`. The `deprecated-call-result` lint that found it is gone.
|
|
53
72
|
|
|
54
|
-
|
|
73
|
+
### A callback of a library component takes only the event object
|
|
55
74
|
|
|
56
|
-
|
|
75
|
+
`onChange={toggle}` with `toggle(on: boolean)` is a type error on a kayjs component: write `onChange={event => toggle(event.checked)}`, `{ value }` or `{ files }` for the others. The `deprecated-callback-handler` lint is gone.
|
|
57
76
|
|
|
58
|
-
|
|
77
|
+
### A refusal is only `ctx.deny(status, { message, errors, data })`
|
|
59
78
|
|
|
60
|
-
|
|
79
|
+
`deny(403, 'text')` and `deny(403, 'text', data)` take a status and options only, `ctx.fail(...)` is gone, and `refuse('text', { status })` is `refuse(status, { message })`: write `ctx.deny(status, { message, errors, data })`. `RefuseOptions` is no longer exported from `kay/library`. The `deprecated-deny-call`, `deprecated-ctx-fail` and `deprecated-refuse-call` lints are gone, and with them the `unreturned-fail` lint of a `ctx.fail` left unreturned.
|
|
61
80
|
|
|
62
|
-
|
|
81
|
+
### `guard` and `requireGuards` are `guards`
|
|
63
82
|
|
|
64
|
-
|
|
83
|
+
`vitals({ guard })`, `jobs: { guard }` and `images: { guard }` are `guards`, and `requireGuards: true` (in kay.config.ts, `pages()` and `testSite`) is `guards: { default: 'closed' }`, `false` `guards: { default: 'open' }`. `VitalsOptions.guard`, `KayConfig.requireGuards` and `PagesOptions.requireGuards` are gone, and so is the `deprecated-guard-option` lint.
|
|
65
84
|
|
|
66
|
-
|
|
85
|
+
### `limit.enforce(ctx)` is `limit.check(ctx)`
|
|
67
86
|
|
|
68
|
-
|
|
87
|
+
`rateLimit()`'s `enforce(ctx, message?)` is gone: write `check(ctx, message?)`; `limiter().enforce(key)` keeps its name. The `deprecated-rate-enforce` lint is gone.
|
|
88
|
+
### The parts object of `class` is gone
|
|
69
89
|
|
|
70
|
-
|
|
90
|
+
A component's parts are its `parts` attribute: `Card(class={{ head: 'p-6' }})` is `Card(parts={{ head: 'p-6' }})`, as `kay upgrade` on 1.108 wrote it. `class` is a string, an array or an object of conditions, so `{ head: 'p-6' }` in it is the class `head`: a type error on a component with parts, unreported when a shorthand or a spread sits beside it. The `deprecated-parts-class` lint is gone with it.
|
|
91
|
+
### `persisted(...)` and `persisted.query` are `persisted.cookie(...)` and `queryParam`
|
|
71
92
|
|
|
72
|
-
|
|
93
|
+
A bare `persisted(name, value)` is `persisted.cookie(name, value)`, and `persisted.query(name, value, options)` is `queryParam(name, { default: value, ...options })`. The `deprecated-persisted-call` and `deprecated-persisted-query` lints are gone, and `PersistedQueryOptions` with them.
|
|
73
94
|
|
|
74
|
-
|
|
95
|
+
### `navigate({ query })`, `onNavigate` and `onBeforeNavigate` are gone
|
|
75
96
|
|
|
76
|
-
|
|
97
|
+
`navigate({ query: changes })` is `navigate.query(changes)`, and the imported `onNavigate(fn)` and `onBeforeNavigate(fn)` are `navigation.onNavigate(fn)` and `navigation.onBeforeNavigate(fn)`. The `deprecated-navigate-query` and `deprecated-navigation-hooks` lints are gone.
|
|
77
98
|
|
|
78
|
-
|
|
99
|
+
### `set(key, next)` and `presence(room, member)` are refused
|
|
79
100
|
|
|
80
|
-
|
|
101
|
+
`room.set(next, { key })` of a live value per key and `unread.set(next, { user })` of one per user take the next value first; the old order throws. `presence({ room, member, signal })` takes one object. The `deprecated-live-api` lint is gone.
|
|
81
102
|
|
|
82
|
-
|
|
103
|
+
### The old readers of a source are gone
|
|
83
104
|
|
|
84
|
-
|
|
105
|
+
`value()`, `last()`, `rows()` (of a `resource`, `stream`, `socket`, `local()` and `infiniteList()`, and a list of your own given to `LoadMore`, `Table` or `VirtualList`), `unsynced()`, `syncStatus()`, `onSuccess` and `onSync` of a source or a `track()` handle, and an action's `succeeded()` are `data()`, `sync.queued()`, `sync.status()` and `onData({ value })` (an action's `succeeded()` is `data()`). The `deprecated-source-readers` lint is gone.
|
|
106
|
+
### kayjs-auth drops its 1.105 names
|
|
85
107
|
|
|
86
|
-
|
|
108
|
+
- `organizations.members()`, `setMemberRoles()`, `removeMember()`, `invitations()`, `myInvitations()` and `invitation()`, `admin.roles()` and `auditLog()`, `oauthServer.clients()`, `passkeys.rename()`, `account.changeUsername()`, `profile()` and `saveProfile()`, `oauth.identities()` and `providerToken()`, `magicLink.signInWithCode()`, and the methods that sat on `auth` (`requireAdmin()`, `captchaRequired()`, `captchaChallenge()`, `provedLately()`, `reprove()`, `scopes()`, `hasScope()`, `oauthResource()`, `oauthOrigin()`, `oauthFixed()`) no longer exist: write the names of the 1.105.0 section below. `deprecated-auth-methods` is gone, so run `kay upgrade` on 1.108 first, which renames the calls.
|
|
109
|
+
- `rateLimit` takes the grouped form only: the flat keys `signInAccount`, `signInAccountAll`, `resendAccount`, `forgotAccount`, `magicLinkAccount`, `emailChangeAccount`, `twoFactorAccount`, `emailCodeAccount`, `inviteAddress`, `oauthRegister`, `oauthRegisterAll`, `oauthDocument` and `oauthToken` throw at startup, naming the group to write (`signIn: { account }`, `oauth: { token }`). `deprecated-auth-rate-limits` is gone.
|
|
110
|
+
- `SignedIn(role=...)` is `SignedIn(require=...)`, and the `SignedOut` component and kayjs-auth's `isSignedOut` are removed: put the children in an `@else` block of a `SignedIn`. `deprecated-auth-signed` is gone.
|
|
87
111
|
|
|
88
|
-
###
|
|
112
|
+
### kayjs-mail drops `send`, `enqueue` and its own `SubscribeForm`
|
|
89
113
|
|
|
90
|
-
|
|
114
|
+
- `send` and `enqueue` are no longer exported from `@kayjs/mail` (`registeredMailer` went in 1.105): a page, an action or a guard sends through `ctx.locals.mail.send(...)` or `.enqueue(...)`, a job or a script through the mailer of `src/mail.ts`. `deprecated-mail-send` is gone.
|
|
115
|
+
- `@kayjs/mail/subscribe-form.kay` does not resolve: import `SubscribeForm` from `@kayjs/ui/subscribe-form.kay`, which takes the same props. `deprecated-mail-form` is gone, so run `kay upgrade` on 1.108 first to have the import rewritten.
|
|
91
116
|
|
|
92
|
-
###
|
|
117
|
+
### kayjs-ai drops its 1.105 props and options
|
|
93
118
|
|
|
94
|
-
|
|
119
|
+
- The `<key>Label` props of `Chat`, `ChatLauncher` and `ChatPanel` (`sendLabel`, `stopLabel`, `openLabel`, `attachTooBigLabel`...) are not read: write one `labels` object keyed as the `ai.chat.<key>` messages are, `labels={{ send: 'Go' }}`; `waitingLabel` and `failureLabel` are `labels.thinking` and `labels.error`. The `ChatLabelProps` and `ChatLauncherLabelProps` types are removed. `deprecated-ai-labels` is gone.
|
|
120
|
+
- `Chat`'s `links` and `Sources`' `here` are not read: `links="apart"` is `newTab={true}` (the default), `links="here"` and `here` are `newTab="auto"`. `deprecated-ai-links` is gone.
|
|
121
|
+
- `language` in the options of `transcribe()` and `describeImage()` is not read: write `locale`, a BCP 47 tag. `deprecated-ai-language` is gone.
|
|
95
122
|
|
|
96
|
-
###
|
|
123
|
+
### kayjs-cms drops `role`, `member` and a list `uploads`
|
|
97
124
|
|
|
98
|
-
|
|
125
|
+
- `cms({ role: 'editor' })` is `cms({ access: 'editor' })`, and `cms({ member })` is folded into an `access` function, which admits and names the person in one: `access: ({ locals }) => locals.user && { name: locals.user.email, roles: locals.user.roles }`. Both throw as unknown options now. A `guard` of your own stays, for what `access` cannot say, and holds no role. `deprecated-cms-options` is gone, so `guard: passwordGuard(password)` is `access: { password }` by hand.
|
|
126
|
+
- `uploads: ['image/*']` is `uploads: { types: ['image/*'] }`.
|
|
99
127
|
|
|
100
|
-
###
|
|
128
|
+
### kayjs-ui drops its 1.105 names
|
|
101
129
|
|
|
102
|
-
|
|
130
|
+
- `onChange` on an Accordion, a Tabs and a ThemeToggle is `onValueChange({ value })`, a ZoomPane's is `onPlateChange({ plate })`, a Table's `onSort` is `onSortChange({ sort })` and a chart's `onActive` is `onActiveChange({ index })`: each takes one event object, and the old names are not called. `deprecated-ui-callbacks` is gone.
|
|
131
|
+
- The list a component draws is `items`: `tabs`, `avatars`, `entries`, `links`, `steps`, `icons` and `slides` are not read on Tabs, AvatarGroup, CommandPalette, Timeline, SideNav, SiteNav, AppHeader, Steps, IconPicker and Carousel, nor the `list` of an infinite source on Table, Carousel, Masonry, MediaGallery, VirtualList and LoadMore. `deprecated-ui-items` is gone.
|
|
132
|
+
- `deprecated-ui-input` is gone: a Toggle, Checkbox, Slider, ColorInput, Combobox or DateInput keeps its `id`, `title` and `data-*` on its root, as since 1.105, and `inputProps` is the way to reach the input.
|
|
103
133
|
|
|
104
|
-
###
|
|
134
|
+
### The old test helper names are gone
|
|
105
135
|
|
|
106
|
-
|
|
136
|
+
- `aiTest`, `mailTest`, `cmsTest` and `authTest` are not exported by the libraries' `/test` entries: import `test` (`import { test as mailTest } from '@kayjs/mail/test'`). `site.refusal(...)` is `site.expectRefused(...)` and `site.socketRefusal(...)` is `site.socket.refused(...)`. `deprecated-test-helpers` is gone.
|
|
107
137
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
An endpoint's `ctx: EndpointContext` and an `api()` module's `ctx.guard` are now typed from the file tree without a generic, so `ctx.params.x` for a param the file's name lacks, a `ctx.guard` field no guard above returns and a `ctx.query` field outside `page.query` are type errors in `kay check`.
|
|
111
|
-
|
|
112
|
-
`kay check` holds the `EndpointContext<Params, Guard>` a handler declares to its file's params and the `_guard.ts` files above it: a param the file has not, or a guard field no guard returns, is a type error. Declare what the guards return, or `any` as the guard type, where a guard fills `locals` instead; a file listing `guards` of its own is not checked.
|
|
113
|
-
|
|
114
|
-
### Test helpers share one shape
|
|
115
|
-
|
|
116
|
-
`aiTest`, `mailTest`, `cmsTest` and `authTest` of the libraries' `/test` entries are `test(site)` in each, taking the `TestSite` and with a `reset()`; `aiTest()` needed no site, `test(site)` takes it and works without. `site.refusal(action, ...)` is `site.expectRefused(action, ...)` and `site.socketRefusal(...)` is `site.socket.refused(...)`. The old names work until 1.108, and `kay upgrade` rewrites them (`deprecated-test-helpers`): an import keeps its local name (`test as mailTest`), so `bun:test`'s own `test` is not shadowed.
|
|
138
|
+
## 1.108.0
|
|
117
139
|
|
|
118
|
-
|
|
140
|
+
### The `deprecated-package-names` lint is gone
|
|
119
141
|
|
|
120
|
-
|
|
142
|
+
A project still importing `@kaynooo/kayjs*` is not reported any more, and `kay check --fix` no longer rewrites it: write `@kayjs/kay` and `@kayjs/<library>` (`ui`, `auth`, `mail`, `cms`, `ai`) in the imports, config keys, stylesheets and `package.json` yourself, or run `kay upgrade`, which still moves an app off the old names, stopping at 1.107 first.
|
|
121
143
|
|
|
122
|
-
Releases before 1.
|
|
144
|
+
Releases before 1.108 are in [Upgrading, older releases](upgrading-archive.md).
|
package/llms/whats-new.md
CHANGED
|
@@ -2,6 +2,30 @@
|
|
|
2
2
|
|
|
3
3
|
What each release of kay and its libraries adds, newest first, each feature with where it is documented. kay and its libraries share one version, so one section covers them all; what a release breaks is in [Upgrading](upgrading.md).
|
|
4
4
|
|
|
5
|
+
## 1.110.0
|
|
6
|
+
|
|
7
|
+
- kayjs-ui's `Checkbox`, `RadioGroup` choices and `Toggle` rows are at least 24px tall, the tap target of WCAG 2.5.8, whatever the label's line height.
|
|
8
|
+
- kayjs-ui's `Segmented` keeps each option's label on one line and scrolls sideways inside its container when the options do not fit, and a `Badge` wraps its text between words inside its parent, instead of overflowing it.
|
|
9
|
+
- kayjs-ui's `BarChart` draws each shown x-axis label in a box as wide as its text, centred on its column, and no box for a column with no label, so a chart of many columns no longer has labels running past their own box.
|
|
10
|
+
- A task list item (`- [ ] a`) inside `.kui-prose`, such as a MarkdownEditor preview, shows no bullet and a drawn box in the accent hanging where the bullet was, not the browser's dimmed checkbox; the space skin draws it too.
|
|
11
|
+
- A component listing `island({ interactive })` takes a function or a block with parameters from a use turning none of those props on, so a page's `Table` with an `@cell(row, column)` block is plain markup with the block rendered by the server, and no longer an `island-prop` error ([islands](islands.md#make-a-component-interactive)).
|
|
12
|
+
- A Table whose `rows` is replaced by copies under the same `rowKey` keeps the nodes its `@cell` and `@detail` blocks drew, so a field in a cell keeps the focus while it is edited; the block's `row` is a view of the current row, read by its fields where it is used, so compare rows by their key, not by identity (`rows.indexOf(row)` is `-1`); Masonry, AvatarGroup, BellInbox, ChipGroup, Segmented, RadioGroup, MultiSelect, Combobox, DescriptionList, AppSwitcher and AudioPlayer draw their item blocks the same way ([Table](../../ui/llms/table.md)).
|
|
13
|
+
- A swap keeps what the visitor changed and applies what the server changed: an island stays on a refresh and takes its new props in place, its state kept, as do the islands a layout renders across a visit to a page with the same layout; a static `details` the visitor opened and a field they typed in keep their state through a refresh, in production as in `kay dev`, unless the server changed that value ([Navigation](navigation.md#islands-kept-across-pages), [Actions from islands](actions-from-islands.md)).
|
|
14
|
+
- `signal-from-prop` (a warning in the `islands` group) flags a `signal(light)` seeded from a prop and never written, which keeps the first value now that an island stays through a refresh, and `kay check --fix` writes `linked(() => light)` ([lints](island-and-form-lints.md)).
|
|
15
|
+
- kayjs-ui's `Dialog` closes with a plain button with a `close` part, so an island holding a Dialog no longer ships `IconButton` and the icon set for it (a plain Dialog island is 7 KB smaller in an app that has no other icon button), and it leaves out `level`, `header`, `handle`, `trigger` and `closeHref` when no call site of the project writes them; the close draws kayjs-ui's `x` icon, and a `close` block replaces it ([restyle](https://git.kaynooo.fr/kaynooo/kayjs/src/branch/main/packages/ui/llms/restyle.md)).
|
|
16
|
+
- A kayjs-ui component handing its `...rest` props, or a prop it takes by name, on to a component with optional features (`FormDialog`, `SidePanel` and `ConfirmHost` into `Dialog`) counts by what its own callers write, no longer as every prop, so an island leaves out the features no call site uses.
|
|
17
|
+
- A part handed on to a component (`Icon(part="spinner")`) writes its `class` and `parts` as one source, about 45 bytes less in each island per hand-off.
|
|
18
|
+
- A `lints` entry in kay.config.ts naming a lint kay has removed (`'deprecated-package-names': 'allow'`) is accepted by the config type and warned about by `kay check`, instead of refused; `kay check --fix` writes `s.Union(Object.keys(R).map(key => s.Literal(key)))` as `s.enum(R)` and leaves any other mapped `s.Union` to the app, see [Upgrading](upgrading.md). The same fix writes `max: Number.MAX_SAFE_INTEGER` on an `s.Array` and `extra: 'strip'` on an `s.Object`, so a rewritten list or object keeps the old behaviour; an app rewritten before has lists capped at 1,000 and objects that refuse extra keys, [how to check](upgrading.md#what-kay-upgrade-on-1108-did-not-reach).
|
|
19
|
+
|
|
20
|
+
## 1.109.0
|
|
21
|
+
|
|
22
|
+
- An endpoint file (`src/routes/a.txt.ts`) no longer stops an app with a root `_guard.ts` and an extension layout that reaches files, as kayjs-auth's, from starting or passing `kay check` (`the layouts of the extensions are placed before what the pages reach was opened`): the endpoints are scanned after what the pages reach is open, as the pages are.
|
|
23
|
+
- `kay env` and `kay check` list the variables of a `defineEnv` module that kay.config.ts imports, as for any other module, so a variable required in production and missing from `.env.example` is reported ([environment](environment.md)).
|
|
24
|
+
- kayjs-ui's centred modal `Dialog` is as tall as its content again, capped at the viewport less 2rem (`size="full"` still fills it), and the opened dialog box no longer draws a browser focus ring round itself (a regression of the 1.105 placement change).
|
|
25
|
+
- An island reading a `queryParam` follows a swap that changes only the query, a link `?x=1` or a component's `param=` navigation, and Back and Forward, whatever its render mode: a signal made outside a component and shared by islands reads the address again after each swap and traversal, as one in a component does ([islands](islands.md#keep-a-filter-in-the-url)).
|
|
26
|
+
- On a static build or a `prerender` page, an island reading a `queryParam` is drawn again from the address when the page is opened with a query, instead of reporting `did not match its server markup`; the build warns naming each page holding one ([prerendering](prerendering.md#static-export)).
|
|
27
|
+
- `site.call(action.with(fields), input)` and `site.submit(action.with(fields), fields, { from: '/path' })` send the fields `with` fixes, as an island's call and a form's post do, instead of answering 422 for a missing field ([testing](testing.md)).
|
|
28
|
+
|
|
5
29
|
## 1.108.0
|
|
6
30
|
|
|
7
31
|
- kayjs-ui's `BarChart` leaves `goals` out of an island that never writes them, a `ConfirmDelete` leaves out the inline pair (`ask`), the trigger looks and `details` it is never given, and the confirm words no longer carry the questions' queue: a plain `ConfirmDelete` island holds 3.1 KB less of kayjs-ui, a `BarChart` 1.6 KB, and a `Dialog`'s discard question loads when first asked, 1.2 KB less ([kayjs-ui](../../ui/llms/table.md))
|
package/llms.txt
CHANGED
|
@@ -82,9 +82,10 @@ To build a site, read [Build a site](llms/site.md) first, then the topics below;
|
|
|
82
82
|
- [Live values and presence](llms/live-values.md): `live()`, presence, websockets
|
|
83
83
|
- [Local collections](llms/local-collections.md): `local()`, offline rows
|
|
84
84
|
- [Rooms](llms/rooms.md): websocket groups, shared state, a snapshot on join
|
|
85
|
-
- [Testing](llms/testing.md): `kay/test`, pages and actions
|
|
86
|
-
- [Testing
|
|
87
|
-
- [
|
|
85
|
+
- [Testing](llms/testing.md): `kay/test`, pages and actions
|
|
86
|
+
- [Testing components](llms/testing-mount.md): `mountComponent`
|
|
87
|
+
- [Testing requests](llms/testing-requests-jobs-sockets.md): jobs, sockets
|
|
88
|
+
- [Test databases](llms/testing-setup.md): seeds
|
|
88
89
|
- [Testing in a browser](llms/testing-browser.md): `site.open`
|
|
89
90
|
- [Checks and lints](llms/checks.md): what `kay check` verifies, ESLint on `.kay` files
|
|
90
91
|
- [Lints and warnings](llms/lints.md): levels, groups, fixes, allowing one
|
|
@@ -95,8 +96,6 @@ To build a site, read [Build a site](llms/site.md) first, then the topics below;
|
|
|
95
96
|
- [SEO lints](llms/seo-lints.md): `seo`
|
|
96
97
|
- [Performance lints](llms/performance-lints.md): `performance`
|
|
97
98
|
- [Deprecated lints](llms/deprecated-lints.md): old forms and fixes
|
|
98
|
-
- [Deprecated lints of 1.105](llms/deprecated-lints-1-105.md): the 1.105 old forms and fixes
|
|
99
|
-
- [Deprecated lints of the 1.105 libraries](llms/deprecated-lints-1-105-libraries.md): old forms of the libraries
|
|
100
99
|
- [Errors](llms/errors.md): codes and fixes
|
|
101
100
|
- [Thrown errors](llms/errors-runtime.md): `Result`
|
|
102
101
|
- [Project setup](llms/project.md): `kay.config.ts`, tsconfig, Astro
|
|
@@ -118,7 +117,7 @@ To build a site, read [Build a site](llms/site.md) first, then the topics below;
|
|
|
118
117
|
- [Proxies and security headers](llms/proxy-and-security.md): headers, CSP, compression
|
|
119
118
|
- [Upgrading](llms/upgrading.md): what each recent minor breaks, what an app changes
|
|
120
119
|
- [Upgrading to 1.105, config](llms/upgrading-1-105-config.md): config and hooks
|
|
121
|
-
- [Upgrading, older](llms/upgrading-archive.md): the minors before 1.
|
|
120
|
+
- [Upgrading, older](llms/upgrading-archive.md): the minors before 1.108
|
|
122
121
|
- [What's new](llms/whats-new.md): what each recent release adds
|
|
123
122
|
- [What's new, older](llms/whats-new-archive.md): the releases before 1.107
|
|
124
123
|
- [Privacy and personal data](llms/privacy.md): what kay keeps, erasing a person
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kayjs/kay",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.110.0",
|
|
5
5
|
"description": "A Bun web framework: one .kay file per component, pages rendered to plain HTML on the server, interactive islands in the browser",
|
|
6
6
|
"author": "Kaynooo <https://github.com/Kayno0o>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -150,10 +150,6 @@
|
|
|
150
150
|
"types": "./types/runtime/client.d.ts",
|
|
151
151
|
"default": "./src/runtime/client.ts"
|
|
152
152
|
},
|
|
153
|
-
"./mount": {
|
|
154
|
-
"types": "./types/runtime/mount.compat.d.ts",
|
|
155
|
-
"default": "./src/runtime/mount.compat.ts"
|
|
156
|
-
},
|
|
157
153
|
"./compiler": {
|
|
158
154
|
"types": "./types/compiler/public.d.ts",
|
|
159
155
|
"default": "./src/compiler/public.ts"
|
|
@@ -308,11 +304,11 @@
|
|
|
308
304
|
"@fontsource/inter": "^5.3.0",
|
|
309
305
|
"@happy-dom/global-registrator": "^21.0.4",
|
|
310
306
|
"@iconify-json/tabler": "^1.2.42",
|
|
311
|
-
"@kayjs/ai": "1.
|
|
312
|
-
"@kayjs/auth": "1.
|
|
313
|
-
"@kayjs/cms": "1.
|
|
314
|
-
"@kayjs/mail": "1.
|
|
315
|
-
"@kayjs/ui": "1.
|
|
307
|
+
"@kayjs/ai": "1.110.0",
|
|
308
|
+
"@kayjs/auth": "1.110.0",
|
|
309
|
+
"@kayjs/cms": "1.110.0",
|
|
310
|
+
"@kayjs/mail": "1.110.0",
|
|
311
|
+
"@kayjs/ui": "1.110.0",
|
|
316
312
|
"@kaynooo/eslint": "^8.0.3",
|
|
317
313
|
"@kaynooo/pg-orm": "^8.1.4",
|
|
318
314
|
"@oxc-parser/binding-wasm32-wasip1": "0.155.0",
|
package/src/build/route-sizes.ts
CHANGED
|
@@ -8,7 +8,6 @@ import type { RouteSize, SizeReport } from './report'
|
|
|
8
8
|
import { realpathSync } from 'node:fs'
|
|
9
9
|
import { join, relative, sep } from 'node:path'
|
|
10
10
|
import { actionOf, elementsIn, serverIslandOf, someNode } from '../compiler/ast'
|
|
11
|
-
import { exportedHydrate } from '../compiler/island-arguments'
|
|
12
11
|
import { parseKay } from '../compiler/parser'
|
|
13
12
|
import { analyzeScript } from '../compiler/script'
|
|
14
13
|
import { bindingNames, scopedBlocks } from '../compiler/template-reads'
|
|
@@ -365,10 +364,10 @@ function isWaiting(hydrate: string | undefined): boolean {
|
|
|
365
364
|
return hydrate === 'visible' || hydrate === 'idle' || hydrate === 'interaction' || hydrate?.startsWith('media(') === true
|
|
366
365
|
}
|
|
367
366
|
|
|
368
|
-
// Whether the component's
|
|
367
|
+
// Whether the component's `island()` asks for `hydrate: 'visible'` or another waiting value, which every use that writes no `hydrate` of its own gets.
|
|
369
368
|
function asksToWait(source: string): boolean {
|
|
370
369
|
const parsed = parseKay(source)
|
|
371
|
-
const hydrate =
|
|
370
|
+
const hydrate = analyzeScript(source, parsed.script, [], parsed.module).island?.hydrate
|
|
372
371
|
|
|
373
372
|
return isWaiting(hydrate)
|
|
374
373
|
}
|