@sdxc/kit 2026.10.23 → 2026.10.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/changelog.jsonl +82 -0
- package/package.json +6 -6
- package/registry/ui/breadcrumbs.json +6 -3
- package/registry/ui/group.json +6 -3
- package/registry/ui/link-button.json +3 -3
- package/registry/ui/link.json +6 -3
- package/registry/ui/nav-link.json +6 -3
- package/registry/ui/navigation-menu.json +6 -3
- package/registry/ui/pagination.json +3 -3
- package/registry/ui/sidebar.json +3 -3
- package/templates/app/package.json +1 -1
package/changelog.jsonl
CHANGED
|
@@ -1260,3 +1260,85 @@
|
|
|
1260
1260
|
{"release":"2026.10.23","package":"@sdxc/ui","type":"fix","breaking":false,"title":"Rewrite nested ternaries for eslint/no-nested-ternary","body":"No consumer effect: nested `? :` chains are rewritten to `if`/`else` or named locals so `eslint/no-nested-ternary` can stay denied without suppressions."}
|
|
1261
1261
|
{"release":"2026.10.23","package":"@sdxc/ui","type":"fix","breaking":false,"title":"Narrow Attachment.Trigger inferred role","body":"Callers are unaffected. The nested-ternary rewrite left `inferredRole` as string | undefined; it is typed as \"link\" | \"button\" | undefined so the trigger `role` prop typechecks."}
|
|
1262
1262
|
{"release":"2026.10.23","package":"@sdxc/ui","type":"refactor","breaking":false,"title":"Prefer iife for expression-shaped branches","body":"Call sites that used an outer `let` filled by `if`/`else` after the nested-ternary\nrewrite now use `iife` so the binding stays an expression. Consumers take\n`@sdxc/iife` as a workspace dependency; runtime behavior is unchanged."}
|
|
1263
|
+
{"release":"2026.10.24","package":"@sdxc/activitypub","type":"chore","breaking":false,"title":"Upgrade Remix to 3.1.0","body":"Every @sdxc package that depends on or peers with remix now pins remix\n3.1.0 instead of 3.0.0, and new apps from the kit template start on it.\nRemix 3.1.0 is a minor release with no breaking changes: server rendering\nwith remix/component is about twice as fast, and it adds\ncreateMixin(setup, { ssr: false }), frame.reload(), frame prefetching and\nstreaming form-data parsing under the /future entry points.\n\nConsumers upgrade remix to 3.1.0 alongside these packages:\n\n bun add remix@3.1.0\n\nNo code changes are needed. The sweep also picks up in-range updates of\n@cloudflare/workers-types, @cloudflare/vite-plugin, wrangler, jose,\nlinkedom and lucide-static, none of which change any package's API."}
|
|
1264
|
+
{"release":"2026.10.24","package":"@sdxc/assets-middleware","type":"chore","breaking":false,"title":"Upgrade Remix to 3.1.0","body":"Every @sdxc package that depends on or peers with remix now pins remix\n3.1.0 instead of 3.0.0, and new apps from the kit template start on it.\nRemix 3.1.0 is a minor release with no breaking changes: server rendering\nwith remix/component is about twice as fast, and it adds\ncreateMixin(setup, { ssr: false }), frame.reload(), frame prefetching and\nstreaming form-data parsing under the /future entry points.\n\nConsumers upgrade remix to 3.1.0 alongside these packages:\n\n bun add remix@3.1.0\n\nNo code changes are needed. The sweep also picks up in-range updates of\n@cloudflare/workers-types, @cloudflare/vite-plugin, wrangler, jose,\nlinkedom and lucide-static, none of which change any package's API."}
|
|
1265
|
+
{"release":"2026.10.24","package":"@sdxc/attribution","type":"chore","breaking":false,"title":"Upgrade Remix to 3.1.0","body":"Every @sdxc package that depends on or peers with remix now pins remix\n3.1.0 instead of 3.0.0, and new apps from the kit template start on it.\nRemix 3.1.0 is a minor release with no breaking changes: server rendering\nwith remix/component is about twice as fast, and it adds\ncreateMixin(setup, { ssr: false }), frame.reload(), frame prefetching and\nstreaming form-data parsing under the /future entry points.\n\nConsumers upgrade remix to 3.1.0 alongside these packages:\n\n bun add remix@3.1.0\n\nNo code changes are needed. The sweep also picks up in-range updates of\n@cloudflare/workers-types, @cloudflare/vite-plugin, wrangler, jose,\nlinkedom and lucide-static, none of which change any package's API."}
|
|
1266
|
+
{"release":"2026.10.24","package":"@sdxc/auth","type":"chore","breaking":false,"title":"Upgrade Remix to 3.1.0","body":"Every @sdxc package that depends on or peers with remix now pins remix\n3.1.0 instead of 3.0.0, and new apps from the kit template start on it.\nRemix 3.1.0 is a minor release with no breaking changes: server rendering\nwith remix/component is about twice as fast, and it adds\ncreateMixin(setup, { ssr: false }), frame.reload(), frame prefetching and\nstreaming form-data parsing under the /future entry points.\n\nConsumers upgrade remix to 3.1.0 alongside these packages:\n\n bun add remix@3.1.0\n\nNo code changes are needed. The sweep also picks up in-range updates of\n@cloudflare/workers-types, @cloudflare/vite-plugin, wrangler, jose,\nlinkedom and lucide-static, none of which change any package's API."}
|
|
1267
|
+
{"release":"2026.10.24","package":"@sdxc/authz","type":"chore","breaking":false,"title":"Upgrade Remix to 3.1.0","body":"Every @sdxc package that depends on or peers with remix now pins remix\n3.1.0 instead of 3.0.0, and new apps from the kit template start on it.\nRemix 3.1.0 is a minor release with no breaking changes: server rendering\nwith remix/component is about twice as fast, and it adds\ncreateMixin(setup, { ssr: false }), frame.reload(), frame prefetching and\nstreaming form-data parsing under the /future entry points.\n\nConsumers upgrade remix to 3.1.0 alongside these packages:\n\n bun add remix@3.1.0\n\nNo code changes are needed. The sweep also picks up in-range updates of\n@cloudflare/workers-types, @cloudflare/vite-plugin, wrangler, jose,\nlinkedom and lucide-static, none of which change any package's API."}
|
|
1268
|
+
{"release":"2026.10.24","package":"@sdxc/billing","type":"chore","breaking":false,"title":"Upgrade Remix to 3.1.0","body":"Every @sdxc package that depends on or peers with remix now pins remix\n3.1.0 instead of 3.0.0, and new apps from the kit template start on it.\nRemix 3.1.0 is a minor release with no breaking changes: server rendering\nwith remix/component is about twice as fast, and it adds\ncreateMixin(setup, { ssr: false }), frame.reload(), frame prefetching and\nstreaming form-data parsing under the /future entry points.\n\nConsumers upgrade remix to 3.1.0 alongside these packages:\n\n bun add remix@3.1.0\n\nNo code changes are needed. The sweep also picks up in-range updates of\n@cloudflare/workers-types, @cloudflare/vite-plugin, wrangler, jose,\nlinkedom and lucide-static, none of which change any package's API."}
|
|
1269
|
+
{"release":"2026.10.24","package":"@sdxc/bracket-params","type":"chore","breaking":false,"title":"Upgrade Remix to 3.1.0","body":"Every @sdxc package that depends on or peers with remix now pins remix\n3.1.0 instead of 3.0.0, and new apps from the kit template start on it.\nRemix 3.1.0 is a minor release with no breaking changes: server rendering\nwith remix/component is about twice as fast, and it adds\ncreateMixin(setup, { ssr: false }), frame.reload(), frame prefetching and\nstreaming form-data parsing under the /future entry points.\n\nConsumers upgrade remix to 3.1.0 alongside these packages:\n\n bun add remix@3.1.0\n\nNo code changes are needed. The sweep also picks up in-range updates of\n@cloudflare/workers-types, @cloudflare/vite-plugin, wrangler, jose,\nlinkedom and lucide-static, none of which change any package's API."}
|
|
1270
|
+
{"release":"2026.10.24","package":"@sdxc/cache","type":"chore","breaking":false,"title":"Upgrade Remix to 3.1.0","body":"Every @sdxc package that depends on or peers with remix now pins remix\n3.1.0 instead of 3.0.0, and new apps from the kit template start on it.\nRemix 3.1.0 is a minor release with no breaking changes: server rendering\nwith remix/component is about twice as fast, and it adds\ncreateMixin(setup, { ssr: false }), frame.reload(), frame prefetching and\nstreaming form-data parsing under the /future entry points.\n\nConsumers upgrade remix to 3.1.0 alongside these packages:\n\n bun add remix@3.1.0\n\nNo code changes are needed. The sweep also picks up in-range updates of\n@cloudflare/workers-types, @cloudflare/vite-plugin, wrangler, jose,\nlinkedom and lucide-static, none of which change any package's API."}
|
|
1271
|
+
{"release":"2026.10.24","package":"@sdxc/captcha","type":"chore","breaking":false,"title":"Upgrade Remix to 3.1.0","body":"Every @sdxc package that depends on or peers with remix now pins remix\n3.1.0 instead of 3.0.0, and new apps from the kit template start on it.\nRemix 3.1.0 is a minor release with no breaking changes: server rendering\nwith remix/component is about twice as fast, and it adds\ncreateMixin(setup, { ssr: false }), frame.reload(), frame prefetching and\nstreaming form-data parsing under the /future entry points.\n\nConsumers upgrade remix to 3.1.0 alongside these packages:\n\n bun add remix@3.1.0\n\nNo code changes are needed. The sweep also picks up in-range updates of\n@cloudflare/workers-types, @cloudflare/vite-plugin, wrangler, jose,\nlinkedom and lucide-static, none of which change any package's API."}
|
|
1272
|
+
{"release":"2026.10.24","package":"@sdxc/catch-response-middleware","type":"chore","breaking":false,"title":"Upgrade Remix to 3.1.0","body":"Every @sdxc package that depends on or peers with remix now pins remix\n3.1.0 instead of 3.0.0, and new apps from the kit template start on it.\nRemix 3.1.0 is a minor release with no breaking changes: server rendering\nwith remix/component is about twice as fast, and it adds\ncreateMixin(setup, { ssr: false }), frame.reload(), frame prefetching and\nstreaming form-data parsing under the /future entry points.\n\nConsumers upgrade remix to 3.1.0 alongside these packages:\n\n bun add remix@3.1.0\n\nNo code changes are needed. The sweep also picks up in-range updates of\n@cloudflare/workers-types, @cloudflare/vite-plugin, wrangler, jose,\nlinkedom and lucide-static, none of which change any package's API."}
|
|
1273
|
+
{"release":"2026.10.24","package":"@sdxc/cli","type":"chore","breaking":false,"title":"Upgrade Remix to 3.1.0","body":"Every @sdxc package that depends on or peers with remix now pins remix\n3.1.0 instead of 3.0.0, and new apps from the kit template start on it.\nRemix 3.1.0 is a minor release with no breaking changes: server rendering\nwith remix/component is about twice as fast, and it adds\ncreateMixin(setup, { ssr: false }), frame.reload(), frame prefetching and\nstreaming form-data parsing under the /future entry points.\n\nConsumers upgrade remix to 3.1.0 alongside these packages:\n\n bun add remix@3.1.0\n\nNo code changes are needed. The sweep also picks up in-range updates of\n@cloudflare/workers-types, @cloudflare/vite-plugin, wrangler, jose,\nlinkedom and lucide-static, none of which change any package's API."}
|
|
1274
|
+
{"release":"2026.10.24","package":"@sdxc/cloudflare-mocks","type":"chore","breaking":false,"title":"Upgrade Remix to 3.1.0","body":"Every @sdxc package that depends on or peers with remix now pins remix\n3.1.0 instead of 3.0.0, and new apps from the kit template start on it.\nRemix 3.1.0 is a minor release with no breaking changes: server rendering\nwith remix/component is about twice as fast, and it adds\ncreateMixin(setup, { ssr: false }), frame.reload(), frame prefetching and\nstreaming form-data parsing under the /future entry points.\n\nConsumers upgrade remix to 3.1.0 alongside these packages:\n\n bun add remix@3.1.0\n\nNo code changes are needed. The sweep also picks up in-range updates of\n@cloudflare/workers-types, @cloudflare/vite-plugin, wrangler, jose,\nlinkedom and lucide-static, none of which change any package's API."}
|
|
1275
|
+
{"release":"2026.10.24","package":"@sdxc/data-model","type":"chore","breaking":false,"title":"Upgrade Remix to 3.1.0","body":"Every @sdxc package that depends on or peers with remix now pins remix\n3.1.0 instead of 3.0.0, and new apps from the kit template start on it.\nRemix 3.1.0 is a minor release with no breaking changes: server rendering\nwith remix/component is about twice as fast, and it adds\ncreateMixin(setup, { ssr: false }), frame.reload(), frame prefetching and\nstreaming form-data parsing under the /future entry points.\n\nConsumers upgrade remix to 3.1.0 alongside these packages:\n\n bun add remix@3.1.0\n\nNo code changes are needed. The sweep also picks up in-range updates of\n@cloudflare/workers-types, @cloudflare/vite-plugin, wrangler, jose,\nlinkedom and lucide-static, none of which change any package's API."}
|
|
1276
|
+
{"release":"2026.10.24","package":"@sdxc/data-table-d1","type":"chore","breaking":false,"title":"Upgrade Remix to 3.1.0","body":"Every @sdxc package that depends on or peers with remix now pins remix\n3.1.0 instead of 3.0.0, and new apps from the kit template start on it.\nRemix 3.1.0 is a minor release with no breaking changes: server rendering\nwith remix/component is about twice as fast, and it adds\ncreateMixin(setup, { ssr: false }), frame.reload(), frame prefetching and\nstreaming form-data parsing under the /future entry points.\n\nConsumers upgrade remix to 3.1.0 alongside these packages:\n\n bun add remix@3.1.0\n\nNo code changes are needed. The sweep also picks up in-range updates of\n@cloudflare/workers-types, @cloudflare/vite-plugin, wrangler, jose,\nlinkedom and lucide-static, none of which change any package's API."}
|
|
1277
|
+
{"release":"2026.10.24","package":"@sdxc/data-table-sqlstorage","type":"chore","breaking":false,"title":"Upgrade Remix to 3.1.0","body":"Every @sdxc package that depends on or peers with remix now pins remix\n3.1.0 instead of 3.0.0, and new apps from the kit template start on it.\nRemix 3.1.0 is a minor release with no breaking changes: server rendering\nwith remix/component is about twice as fast, and it adds\ncreateMixin(setup, { ssr: false }), frame.reload(), frame prefetching and\nstreaming form-data parsing under the /future entry points.\n\nConsumers upgrade remix to 3.1.0 alongside these packages:\n\n bun add remix@3.1.0\n\nNo code changes are needed. The sweep also picks up in-range updates of\n@cloudflare/workers-types, @cloudflare/vite-plugin, wrangler, jose,\nlinkedom and lucide-static, none of which change any package's API."}
|
|
1278
|
+
{"release":"2026.10.24","package":"@sdxc/database-middleware","type":"chore","breaking":false,"title":"Upgrade Remix to 3.1.0","body":"Every @sdxc package that depends on or peers with remix now pins remix\n3.1.0 instead of 3.0.0, and new apps from the kit template start on it.\nRemix 3.1.0 is a minor release with no breaking changes: server rendering\nwith remix/component is about twice as fast, and it adds\ncreateMixin(setup, { ssr: false }), frame.reload(), frame prefetching and\nstreaming form-data parsing under the /future entry points.\n\nConsumers upgrade remix to 3.1.0 alongside these packages:\n\n bun add remix@3.1.0\n\nNo code changes are needed. The sweep also picks up in-range updates of\n@cloudflare/workers-types, @cloudflare/vite-plugin, wrangler, jose,\nlinkedom and lucide-static, none of which change any package's API."}
|
|
1279
|
+
{"release":"2026.10.24","package":"@sdxc/diagram","type":"chore","breaking":false,"title":"Upgrade Remix to 3.1.0","body":"Every @sdxc package that depends on or peers with remix now pins remix\n3.1.0 instead of 3.0.0, and new apps from the kit template start on it.\nRemix 3.1.0 is a minor release with no breaking changes: server rendering\nwith remix/component is about twice as fast, and it adds\ncreateMixin(setup, { ssr: false }), frame.reload(), frame prefetching and\nstreaming form-data parsing under the /future entry points.\n\nConsumers upgrade remix to 3.1.0 alongside these packages:\n\n bun add remix@3.1.0\n\nNo code changes are needed. The sweep also picks up in-range updates of\n@cloudflare/workers-types, @cloudflare/vite-plugin, wrangler, jose,\nlinkedom and lucide-static, none of which change any package's API."}
|
|
1280
|
+
{"release":"2026.10.24","package":"@sdxc/doh","type":"chore","breaking":false,"title":"Upgrade Remix to 3.1.0","body":"Every @sdxc package that depends on or peers with remix now pins remix\n3.1.0 instead of 3.0.0, and new apps from the kit template start on it.\nRemix 3.1.0 is a minor release with no breaking changes: server rendering\nwith remix/component is about twice as fast, and it adds\ncreateMixin(setup, { ssr: false }), frame.reload(), frame prefetching and\nstreaming form-data parsing under the /future entry points.\n\nConsumers upgrade remix to 3.1.0 alongside these packages:\n\n bun add remix@3.1.0\n\nNo code changes are needed. The sweep also picks up in-range updates of\n@cloudflare/workers-types, @cloudflare/vite-plugin, wrangler, jose,\nlinkedom and lucide-static, none of which change any package's API."}
|
|
1281
|
+
{"release":"2026.10.24","package":"@sdxc/expression","type":"chore","breaking":false,"title":"Upgrade Remix to 3.1.0","body":"Every @sdxc package that depends on or peers with remix now pins remix\n3.1.0 instead of 3.0.0, and new apps from the kit template start on it.\nRemix 3.1.0 is a minor release with no breaking changes: server rendering\nwith remix/component is about twice as fast, and it adds\ncreateMixin(setup, { ssr: false }), frame.reload(), frame prefetching and\nstreaming form-data parsing under the /future entry points.\n\nConsumers upgrade remix to 3.1.0 alongside these packages:\n\n bun add remix@3.1.0\n\nNo code changes are needed. The sweep also picks up in-range updates of\n@cloudflare/workers-types, @cloudflare/vite-plugin, wrangler, jose,\nlinkedom and lucide-static, none of which change any package's API."}
|
|
1282
|
+
{"release":"2026.10.24","package":"@sdxc/file-storage-r2","type":"chore","breaking":false,"title":"Upgrade Remix to 3.1.0","body":"Every @sdxc package that depends on or peers with remix now pins remix\n3.1.0 instead of 3.0.0, and new apps from the kit template start on it.\nRemix 3.1.0 is a minor release with no breaking changes: server rendering\nwith remix/component is about twice as fast, and it adds\ncreateMixin(setup, { ssr: false }), frame.reload(), frame prefetching and\nstreaming form-data parsing under the /future entry points.\n\nConsumers upgrade remix to 3.1.0 alongside these packages:\n\n bun add remix@3.1.0\n\nNo code changes are needed. The sweep also picks up in-range updates of\n@cloudflare/workers-types, @cloudflare/vite-plugin, wrangler, jose,\nlinkedom and lucide-static, none of which change any package's API."}
|
|
1283
|
+
{"release":"2026.10.24","package":"@sdxc/flags","type":"chore","breaking":false,"title":"Upgrade Remix to 3.1.0","body":"Every @sdxc package that depends on or peers with remix now pins remix\n3.1.0 instead of 3.0.0, and new apps from the kit template start on it.\nRemix 3.1.0 is a minor release with no breaking changes: server rendering\nwith remix/component is about twice as fast, and it adds\ncreateMixin(setup, { ssr: false }), frame.reload(), frame prefetching and\nstreaming form-data parsing under the /future entry points.\n\nConsumers upgrade remix to 3.1.0 alongside these packages:\n\n bun add remix@3.1.0\n\nNo code changes are needed. The sweep also picks up in-range updates of\n@cloudflare/workers-types, @cloudflare/vite-plugin, wrangler, jose,\nlinkedom and lucide-static, none of which change any package's API."}
|
|
1284
|
+
{"release":"2026.10.24","package":"@sdxc/flags-engine","type":"chore","breaking":false,"title":"Upgrade Remix to 3.1.0","body":"Every @sdxc package that depends on or peers with remix now pins remix\n3.1.0 instead of 3.0.0, and new apps from the kit template start on it.\nRemix 3.1.0 is a minor release with no breaking changes: server rendering\nwith remix/component is about twice as fast, and it adds\ncreateMixin(setup, { ssr: false }), frame.reload(), frame prefetching and\nstreaming form-data parsing under the /future entry points.\n\nConsumers upgrade remix to 3.1.0 alongside these packages:\n\n bun add remix@3.1.0\n\nNo code changes are needed. The sweep also picks up in-range updates of\n@cloudflare/workers-types, @cloudflare/vite-plugin, wrangler, jose,\nlinkedom and lucide-static, none of which change any package's API."}
|
|
1285
|
+
{"release":"2026.10.24","package":"@sdxc/get-client-ip","type":"chore","breaking":false,"title":"Upgrade Remix to 3.1.0","body":"Every @sdxc package that depends on or peers with remix now pins remix\n3.1.0 instead of 3.0.0, and new apps from the kit template start on it.\nRemix 3.1.0 is a minor release with no breaking changes: server rendering\nwith remix/component is about twice as fast, and it adds\ncreateMixin(setup, { ssr: false }), frame.reload(), frame prefetching and\nstreaming form-data parsing under the /future entry points.\n\nConsumers upgrade remix to 3.1.0 alongside these packages:\n\n bun add remix@3.1.0\n\nNo code changes are needed. The sweep also picks up in-range updates of\n@cloudflare/workers-types, @cloudflare/vite-plugin, wrangler, jose,\nlinkedom and lucide-static, none of which change any package's API."}
|
|
1286
|
+
{"release":"2026.10.24","package":"@sdxc/honeypot","type":"chore","breaking":false,"title":"Upgrade Remix to 3.1.0","body":"Every @sdxc package that depends on or peers with remix now pins remix\n3.1.0 instead of 3.0.0, and new apps from the kit template start on it.\nRemix 3.1.0 is a minor release with no breaking changes: server rendering\nwith remix/component is about twice as fast, and it adds\ncreateMixin(setup, { ssr: false }), frame.reload(), frame prefetching and\nstreaming form-data parsing under the /future entry points.\n\nConsumers upgrade remix to 3.1.0 alongside these packages:\n\n bun add remix@3.1.0\n\nNo code changes are needed. The sweep also picks up in-range updates of\n@cloudflare/workers-types, @cloudflare/vite-plugin, wrangler, jose,\nlinkedom and lucide-static, none of which change any package's API."}
|
|
1287
|
+
{"release":"2026.10.24","package":"@sdxc/hostname","type":"chore","breaking":false,"title":"Upgrade Remix to 3.1.0","body":"Every @sdxc package that depends on or peers with remix now pins remix\n3.1.0 instead of 3.0.0, and new apps from the kit template start on it.\nRemix 3.1.0 is a minor release with no breaking changes: server rendering\nwith remix/component is about twice as fast, and it adds\ncreateMixin(setup, { ssr: false }), frame.reload(), frame prefetching and\nstreaming form-data parsing under the /future entry points.\n\nConsumers upgrade remix to 3.1.0 alongside these packages:\n\n bun add remix@3.1.0\n\nNo code changes are needed. The sweep also picks up in-range updates of\n@cloudflare/workers-types, @cloudflare/vite-plugin, wrangler, jose,\nlinkedom and lucide-static, none of which change any package's API."}
|
|
1288
|
+
{"release":"2026.10.24","package":"@sdxc/html","type":"chore","breaking":false,"title":"Upgrade Remix to 3.1.0","body":"Every @sdxc package that depends on or peers with remix now pins remix\n3.1.0 instead of 3.0.0, and new apps from the kit template start on it.\nRemix 3.1.0 is a minor release with no breaking changes: server rendering\nwith remix/component is about twice as fast, and it adds\ncreateMixin(setup, { ssr: false }), frame.reload(), frame prefetching and\nstreaming form-data parsing under the /future entry points.\n\nConsumers upgrade remix to 3.1.0 alongside these packages:\n\n bun add remix@3.1.0\n\nNo code changes are needed. The sweep also picks up in-range updates of\n@cloudflare/workers-types, @cloudflare/vite-plugin, wrangler, jose,\nlinkedom and lucide-static, none of which change any package's API."}
|
|
1289
|
+
{"release":"2026.10.24","package":"@sdxc/http","type":"chore","breaking":false,"title":"Upgrade Remix to 3.1.0","body":"Every @sdxc package that depends on or peers with remix now pins remix\n3.1.0 instead of 3.0.0, and new apps from the kit template start on it.\nRemix 3.1.0 is a minor release with no breaking changes: server rendering\nwith remix/component is about twice as fast, and it adds\ncreateMixin(setup, { ssr: false }), frame.reload(), frame prefetching and\nstreaming form-data parsing under the /future entry points.\n\nConsumers upgrade remix to 3.1.0 alongside these packages:\n\n bun add remix@3.1.0\n\nNo code changes are needed. The sweep also picks up in-range updates of\n@cloudflare/workers-types, @cloudflare/vite-plugin, wrangler, jose,\nlinkedom and lucide-static, none of which change any package's API."}
|
|
1290
|
+
{"release":"2026.10.24","package":"@sdxc/i18n","type":"chore","breaking":false,"title":"Upgrade Remix to 3.1.0","body":"Every @sdxc package that depends on or peers with remix now pins remix\n3.1.0 instead of 3.0.0, and new apps from the kit template start on it.\nRemix 3.1.0 is a minor release with no breaking changes: server rendering\nwith remix/component is about twice as fast, and it adds\ncreateMixin(setup, { ssr: false }), frame.reload(), frame prefetching and\nstreaming form-data parsing under the /future entry points.\n\nConsumers upgrade remix to 3.1.0 alongside these packages:\n\n bun add remix@3.1.0\n\nNo code changes are needed. The sweep also picks up in-range updates of\n@cloudflare/workers-types, @cloudflare/vite-plugin, wrangler, jose,\nlinkedom and lucide-static, none of which change any package's API."}
|
|
1291
|
+
{"release":"2026.10.24","package":"@sdxc/icons","type":"chore","breaking":false,"title":"Upgrade Remix to 3.1.0","body":"Every @sdxc package that depends on or peers with remix now pins remix\n3.1.0 instead of 3.0.0, and new apps from the kit template start on it.\nRemix 3.1.0 is a minor release with no breaking changes: server rendering\nwith remix/component is about twice as fast, and it adds\ncreateMixin(setup, { ssr: false }), frame.reload(), frame prefetching and\nstreaming form-data parsing under the /future entry points.\n\nConsumers upgrade remix to 3.1.0 alongside these packages:\n\n bun add remix@3.1.0\n\nNo code changes are needed. The sweep also picks up in-range updates of\n@cloudflare/workers-types, @cloudflare/vite-plugin, wrangler, jose,\nlinkedom and lucide-static, none of which change any package's API."}
|
|
1292
|
+
{"release":"2026.10.24","package":"@sdxc/idempotency","type":"chore","breaking":false,"title":"Upgrade Remix to 3.1.0","body":"Every @sdxc package that depends on or peers with remix now pins remix\n3.1.0 instead of 3.0.0, and new apps from the kit template start on it.\nRemix 3.1.0 is a minor release with no breaking changes: server rendering\nwith remix/component is about twice as fast, and it adds\ncreateMixin(setup, { ssr: false }), frame.reload(), frame prefetching and\nstreaming form-data parsing under the /future entry points.\n\nConsumers upgrade remix to 3.1.0 alongside these packages:\n\n bun add remix@3.1.0\n\nNo code changes are needed. The sweep also picks up in-range updates of\n@cloudflare/workers-types, @cloudflare/vite-plugin, wrangler, jose,\nlinkedom and lucide-static, none of which change any package's API."}
|
|
1293
|
+
{"release":"2026.10.24","package":"@sdxc/jobs","type":"chore","breaking":false,"title":"Upgrade Remix to 3.1.0","body":"Every @sdxc package that depends on or peers with remix now pins remix\n3.1.0 instead of 3.0.0, and new apps from the kit template start on it.\nRemix 3.1.0 is a minor release with no breaking changes: server rendering\nwith remix/component is about twice as fast, and it adds\ncreateMixin(setup, { ssr: false }), frame.reload(), frame prefetching and\nstreaming form-data parsing under the /future entry points.\n\nConsumers upgrade remix to 3.1.0 alongside these packages:\n\n bun add remix@3.1.0\n\nNo code changes are needed. The sweep also picks up in-range updates of\n@cloudflare/workers-types, @cloudflare/vite-plugin, wrangler, jose,\nlinkedom and lucide-static, none of which change any package's API."}
|
|
1294
|
+
{"release":"2026.10.24","package":"@sdxc/json-schema","type":"chore","breaking":false,"title":"Upgrade Remix to 3.1.0","body":"Every @sdxc package that depends on or peers with remix now pins remix\n3.1.0 instead of 3.0.0, and new apps from the kit template start on it.\nRemix 3.1.0 is a minor release with no breaking changes: server rendering\nwith remix/component is about twice as fast, and it adds\ncreateMixin(setup, { ssr: false }), frame.reload(), frame prefetching and\nstreaming form-data parsing under the /future entry points.\n\nConsumers upgrade remix to 3.1.0 alongside these packages:\n\n bun add remix@3.1.0\n\nNo code changes are needed. The sweep also picks up in-range updates of\n@cloudflare/workers-types, @cloudflare/vite-plugin, wrangler, jose,\nlinkedom and lucide-static, none of which change any package's API."}
|
|
1295
|
+
{"release":"2026.10.24","package":"@sdxc/jwt","type":"chore","breaking":false,"title":"Upgrade Remix to 3.1.0","body":"Every @sdxc package that depends on or peers with remix now pins remix\n3.1.0 instead of 3.0.0, and new apps from the kit template start on it.\nRemix 3.1.0 is a minor release with no breaking changes: server rendering\nwith remix/component is about twice as fast, and it adds\ncreateMixin(setup, { ssr: false }), frame.reload(), frame prefetching and\nstreaming form-data parsing under the /future entry points.\n\nConsumers upgrade remix to 3.1.0 alongside these packages:\n\n bun add remix@3.1.0\n\nNo code changes are needed. The sweep also picks up in-range updates of\n@cloudflare/workers-types, @cloudflare/vite-plugin, wrangler, jose,\nlinkedom and lucide-static, none of which change any package's API."}
|
|
1296
|
+
{"release":"2026.10.24","package":"@sdxc/kit","type":"chore","breaking":false,"title":"Upgrade Remix to 3.1.0","body":"Every @sdxc package that depends on or peers with remix now pins remix\n3.1.0 instead of 3.0.0, and new apps from the kit template start on it.\nRemix 3.1.0 is a minor release with no breaking changes: server rendering\nwith remix/component is about twice as fast, and it adds\ncreateMixin(setup, { ssr: false }), frame.reload(), frame prefetching and\nstreaming form-data parsing under the /future entry points.\n\nConsumers upgrade remix to 3.1.0 alongside these packages:\n\n bun add remix@3.1.0\n\nNo code changes are needed. The sweep also picks up in-range updates of\n@cloudflare/workers-types, @cloudflare/vite-plugin, wrangler, jose,\nlinkedom and lucide-static, none of which change any package's API."}
|
|
1297
|
+
{"release":"2026.10.24","package":"@sdxc/lazy-frame","type":"chore","breaking":false,"title":"Upgrade Remix to 3.1.0","body":"Every @sdxc package that depends on or peers with remix now pins remix\n3.1.0 instead of 3.0.0, and new apps from the kit template start on it.\nRemix 3.1.0 is a minor release with no breaking changes: server rendering\nwith remix/component is about twice as fast, and it adds\ncreateMixin(setup, { ssr: false }), frame.reload(), frame prefetching and\nstreaming form-data parsing under the /future entry points.\n\nConsumers upgrade remix to 3.1.0 alongside these packages:\n\n bun add remix@3.1.0\n\nNo code changes are needed. The sweep also picks up in-range updates of\n@cloudflare/workers-types, @cloudflare/vite-plugin, wrangler, jose,\nlinkedom and lucide-static, none of which change any package's API."}
|
|
1298
|
+
{"release":"2026.10.24","package":"@sdxc/lazy-frame","type":"feat","breaking":false,"title":"Prefetch a dialog's frame on intent shown on its opener","body":"A `LazyFrame` with `loadOn=\"open\"` and an `opener` takes a new `prefetch`\nprop. With it, the frame's `src` is fetched ahead as soon as the visitor\nrests the mouse or keyboard focus on the opener for 100ms, or presses it,\nso the dialog's content is warm when it opens:\n\n <LazyFrame src=\"/jobs/1?frame\" loadOn=\"open\" opener=\"job-1\" prefetch>\n <a href=\"/jobs/1\">Read the full posting</a>\n </LazyFrame>\n\nThe request goes through `prefetch()` from `remix/component`: it sends the\nsame `Accept: text/html` and `X-Remix-Frame: true` headers as the frame,\nhints the scripts, stylesheets and preloads the response names, and runs\nonly where the runtime intercepts navigations. It fires at most once per\nopener and is skipped when the visitor saves data or is on a 2G link.\n\nThe frame reuses the prefetched HTML from the browser's HTTP cache only when\nthe server makes the response cacheable, for example with\n`Cache-Control: private, max-age=30`; without such a header the frame fetches\nit again. The prop defaults to off, so existing frames behave as before."}
|
|
1299
|
+
{"release":"2026.10.24","package":"@sdxc/lazy-route","type":"chore","breaking":false,"title":"Upgrade Remix to 3.1.0","body":"Every @sdxc package that depends on or peers with remix now pins remix\n3.1.0 instead of 3.0.0, and new apps from the kit template start on it.\nRemix 3.1.0 is a minor release with no breaking changes: server rendering\nwith remix/component is about twice as fast, and it adds\ncreateMixin(setup, { ssr: false }), frame.reload(), frame prefetching and\nstreaming form-data parsing under the /future entry points.\n\nConsumers upgrade remix to 3.1.0 alongside these packages:\n\n bun add remix@3.1.0\n\nNo code changes are needed. The sweep also picks up in-range updates of\n@cloudflare/workers-types, @cloudflare/vite-plugin, wrangler, jose,\nlinkedom and lucide-static, none of which change any package's API."}
|
|
1300
|
+
{"release":"2026.10.24","package":"@sdxc/logger","type":"chore","breaking":false,"title":"Upgrade Remix to 3.1.0","body":"Every @sdxc package that depends on or peers with remix now pins remix\n3.1.0 instead of 3.0.0, and new apps from the kit template start on it.\nRemix 3.1.0 is a minor release with no breaking changes: server rendering\nwith remix/component is about twice as fast, and it adds\ncreateMixin(setup, { ssr: false }), frame.reload(), frame prefetching and\nstreaming form-data parsing under the /future entry points.\n\nConsumers upgrade remix to 3.1.0 alongside these packages:\n\n bun add remix@3.1.0\n\nNo code changes are needed. The sweep also picks up in-range updates of\n@cloudflare/workers-types, @cloudflare/vite-plugin, wrangler, jose,\nlinkedom and lucide-static, none of which change any package's API."}
|
|
1301
|
+
{"release":"2026.10.24","package":"@sdxc/mail","type":"chore","breaking":false,"title":"Upgrade Remix to 3.1.0","body":"Every @sdxc package that depends on or peers with remix now pins remix\n3.1.0 instead of 3.0.0, and new apps from the kit template start on it.\nRemix 3.1.0 is a minor release with no breaking changes: server rendering\nwith remix/component is about twice as fast, and it adds\ncreateMixin(setup, { ssr: false }), frame.reload(), frame prefetching and\nstreaming form-data parsing under the /future entry points.\n\nConsumers upgrade remix to 3.1.0 alongside these packages:\n\n bun add remix@3.1.0\n\nNo code changes are needed. The sweep also picks up in-range updates of\n@cloudflare/workers-types, @cloudflare/vite-plugin, wrangler, jose,\nlinkedom and lucide-static, none of which change any package's API."}
|
|
1302
|
+
{"release":"2026.10.24","package":"@sdxc/markdown","type":"chore","breaking":false,"title":"Upgrade Remix to 3.1.0","body":"Every @sdxc package that depends on or peers with remix now pins remix\n3.1.0 instead of 3.0.0, and new apps from the kit template start on it.\nRemix 3.1.0 is a minor release with no breaking changes: server rendering\nwith remix/component is about twice as fast, and it adds\ncreateMixin(setup, { ssr: false }), frame.reload(), frame prefetching and\nstreaming form-data parsing under the /future entry points.\n\nConsumers upgrade remix to 3.1.0 alongside these packages:\n\n bun add remix@3.1.0\n\nNo code changes are needed. The sweep also picks up in-range updates of\n@cloudflare/workers-types, @cloudflare/vite-plugin, wrangler, jose,\nlinkedom and lucide-static, none of which change any package's API."}
|
|
1303
|
+
{"release":"2026.10.24","package":"@sdxc/math","type":"chore","breaking":false,"title":"Upgrade Remix to 3.1.0","body":"Every @sdxc package that depends on or peers with remix now pins remix\n3.1.0 instead of 3.0.0, and new apps from the kit template start on it.\nRemix 3.1.0 is a minor release with no breaking changes: server rendering\nwith remix/component is about twice as fast, and it adds\ncreateMixin(setup, { ssr: false }), frame.reload(), frame prefetching and\nstreaming form-data parsing under the /future entry points.\n\nConsumers upgrade remix to 3.1.0 alongside these packages:\n\n bun add remix@3.1.0\n\nNo code changes are needed. The sweep also picks up in-range updates of\n@cloudflare/workers-types, @cloudflare/vite-plugin, wrangler, jose,\nlinkedom and lucide-static, none of which change any package's API."}
|
|
1304
|
+
{"release":"2026.10.24","package":"@sdxc/mcp","type":"chore","breaking":false,"title":"Upgrade Remix to 3.1.0","body":"Every @sdxc package that depends on or peers with remix now pins remix\n3.1.0 instead of 3.0.0, and new apps from the kit template start on it.\nRemix 3.1.0 is a minor release with no breaking changes: server rendering\nwith remix/component is about twice as fast, and it adds\ncreateMixin(setup, { ssr: false }), frame.reload(), frame prefetching and\nstreaming form-data parsing under the /future entry points.\n\nConsumers upgrade remix to 3.1.0 alongside these packages:\n\n bun add remix@3.1.0\n\nNo code changes are needed. The sweep also picks up in-range updates of\n@cloudflare/workers-types, @cloudflare/vite-plugin, wrangler, jose,\nlinkedom and lucide-static, none of which change any package's API."}
|
|
1305
|
+
{"release":"2026.10.24","package":"@sdxc/merge-patch","type":"chore","breaking":false,"title":"Upgrade Remix to 3.1.0","body":"Every @sdxc package that depends on or peers with remix now pins remix\n3.1.0 instead of 3.0.0, and new apps from the kit template start on it.\nRemix 3.1.0 is a minor release with no breaking changes: server rendering\nwith remix/component is about twice as fast, and it adds\ncreateMixin(setup, { ssr: false }), frame.reload(), frame prefetching and\nstreaming form-data parsing under the /future entry points.\n\nConsumers upgrade remix to 3.1.0 alongside these packages:\n\n bun add remix@3.1.0\n\nNo code changes are needed. The sweep also picks up in-range updates of\n@cloudflare/workers-types, @cloudflare/vite-plugin, wrangler, jose,\nlinkedom and lucide-static, none of which change any package's API."}
|
|
1306
|
+
{"release":"2026.10.24","package":"@sdxc/messaging","type":"chore","breaking":false,"title":"Upgrade Remix to 3.1.0","body":"Every @sdxc package that depends on or peers with remix now pins remix\n3.1.0 instead of 3.0.0, and new apps from the kit template start on it.\nRemix 3.1.0 is a minor release with no breaking changes: server rendering\nwith remix/component is about twice as fast, and it adds\ncreateMixin(setup, { ssr: false }), frame.reload(), frame prefetching and\nstreaming form-data parsing under the /future entry points.\n\nConsumers upgrade remix to 3.1.0 alongside these packages:\n\n bun add remix@3.1.0\n\nNo code changes are needed. The sweep also picks up in-range updates of\n@cloudflare/workers-types, @cloudflare/vite-plugin, wrangler, jose,\nlinkedom and lucide-static, none of which change any package's API."}
|
|
1307
|
+
{"release":"2026.10.24","package":"@sdxc/microformats","type":"chore","breaking":false,"title":"Upgrade Remix to 3.1.0","body":"Every @sdxc package that depends on or peers with remix now pins remix\n3.1.0 instead of 3.0.0, and new apps from the kit template start on it.\nRemix 3.1.0 is a minor release with no breaking changes: server rendering\nwith remix/component is about twice as fast, and it adds\ncreateMixin(setup, { ssr: false }), frame.reload(), frame prefetching and\nstreaming form-data parsing under the /future entry points.\n\nConsumers upgrade remix to 3.1.0 alongside these packages:\n\n bun add remix@3.1.0\n\nNo code changes are needed. The sweep also picks up in-range updates of\n@cloudflare/workers-types, @cloudflare/vite-plugin, wrangler, jose,\nlinkedom and lucide-static, none of which change any package's API."}
|
|
1308
|
+
{"release":"2026.10.24","package":"@sdxc/micropub","type":"chore","breaking":false,"title":"Upgrade Remix to 3.1.0","body":"Every @sdxc package that depends on or peers with remix now pins remix\n3.1.0 instead of 3.0.0, and new apps from the kit template start on it.\nRemix 3.1.0 is a minor release with no breaking changes: server rendering\nwith remix/component is about twice as fast, and it adds\ncreateMixin(setup, { ssr: false }), frame.reload(), frame prefetching and\nstreaming form-data parsing under the /future entry points.\n\nConsumers upgrade remix to 3.1.0 alongside these packages:\n\n bun add remix@3.1.0\n\nNo code changes are needed. The sweep also picks up in-range updates of\n@cloudflare/workers-types, @cloudflare/vite-plugin, wrangler, jose,\nlinkedom and lucide-static, none of which change any package's API."}
|
|
1309
|
+
{"release":"2026.10.24","package":"@sdxc/newsletter","type":"chore","breaking":false,"title":"Upgrade Remix to 3.1.0","body":"Every @sdxc package that depends on or peers with remix now pins remix\n3.1.0 instead of 3.0.0, and new apps from the kit template start on it.\nRemix 3.1.0 is a minor release with no breaking changes: server rendering\nwith remix/component is about twice as fast, and it adds\ncreateMixin(setup, { ssr: false }), frame.reload(), frame prefetching and\nstreaming form-data parsing under the /future entry points.\n\nConsumers upgrade remix to 3.1.0 alongside these packages:\n\n bun add remix@3.1.0\n\nNo code changes are needed. The sweep also picks up in-range updates of\n@cloudflare/workers-types, @cloudflare/vite-plugin, wrangler, jose,\nlinkedom and lucide-static, none of which change any package's API."}
|
|
1310
|
+
{"release":"2026.10.24","package":"@sdxc/no-www-middleware","type":"chore","breaking":false,"title":"Upgrade Remix to 3.1.0","body":"Every @sdxc package that depends on or peers with remix now pins remix\n3.1.0 instead of 3.0.0, and new apps from the kit template start on it.\nRemix 3.1.0 is a minor release with no breaking changes: server rendering\nwith remix/component is about twice as fast, and it adds\ncreateMixin(setup, { ssr: false }), frame.reload(), frame prefetching and\nstreaming form-data parsing under the /future entry points.\n\nConsumers upgrade remix to 3.1.0 alongside these packages:\n\n bun add remix@3.1.0\n\nNo code changes are needed. The sweep also picks up in-range updates of\n@cloudflare/workers-types, @cloudflare/vite-plugin, wrangler, jose,\nlinkedom and lucide-static, none of which change any package's API."}
|
|
1311
|
+
{"release":"2026.10.24","package":"@sdxc/openapi","type":"chore","breaking":false,"title":"Upgrade Remix to 3.1.0","body":"Every @sdxc package that depends on or peers with remix now pins remix\n3.1.0 instead of 3.0.0, and new apps from the kit template start on it.\nRemix 3.1.0 is a minor release with no breaking changes: server rendering\nwith remix/component is about twice as fast, and it adds\ncreateMixin(setup, { ssr: false }), frame.reload(), frame prefetching and\nstreaming form-data parsing under the /future entry points.\n\nConsumers upgrade remix to 3.1.0 alongside these packages:\n\n bun add remix@3.1.0\n\nNo code changes are needed. The sweep also picks up in-range updates of\n@cloudflare/workers-types, @cloudflare/vite-plugin, wrangler, jose,\nlinkedom and lucide-static, none of which change any package's API."}
|
|
1312
|
+
{"release":"2026.10.24","package":"@sdxc/pagination","type":"chore","breaking":false,"title":"Upgrade Remix to 3.1.0","body":"Every @sdxc package that depends on or peers with remix now pins remix\n3.1.0 instead of 3.0.0, and new apps from the kit template start on it.\nRemix 3.1.0 is a minor release with no breaking changes: server rendering\nwith remix/component is about twice as fast, and it adds\ncreateMixin(setup, { ssr: false }), frame.reload(), frame prefetching and\nstreaming form-data parsing under the /future entry points.\n\nConsumers upgrade remix to 3.1.0 alongside these packages:\n\n bun add remix@3.1.0\n\nNo code changes are needed. The sweep also picks up in-range updates of\n@cloudflare/workers-types, @cloudflare/vite-plugin, wrangler, jose,\nlinkedom and lucide-static, none of which change any package's API."}
|
|
1313
|
+
{"release":"2026.10.24","package":"@sdxc/passkey","type":"chore","breaking":false,"title":"Upgrade Remix to 3.1.0","body":"Every @sdxc package that depends on or peers with remix now pins remix\n3.1.0 instead of 3.0.0, and new apps from the kit template start on it.\nRemix 3.1.0 is a minor release with no breaking changes: server rendering\nwith remix/component is about twice as fast, and it adds\ncreateMixin(setup, { ssr: false }), frame.reload(), frame prefetching and\nstreaming form-data parsing under the /future entry points.\n\nConsumers upgrade remix to 3.1.0 alongside these packages:\n\n bun add remix@3.1.0\n\nNo code changes are needed. The sweep also picks up in-range updates of\n@cloudflare/workers-types, @cloudflare/vite-plugin, wrangler, jose,\nlinkedom and lucide-static, none of which change any package's API."}
|
|
1314
|
+
{"release":"2026.10.24","package":"@sdxc/problem","type":"chore","breaking":false,"title":"Upgrade Remix to 3.1.0","body":"Every @sdxc package that depends on or peers with remix now pins remix\n3.1.0 instead of 3.0.0, and new apps from the kit template start on it.\nRemix 3.1.0 is a minor release with no breaking changes: server rendering\nwith remix/component is about twice as fast, and it adds\ncreateMixin(setup, { ssr: false }), frame.reload(), frame prefetching and\nstreaming form-data parsing under the /future entry points.\n\nConsumers upgrade remix to 3.1.0 alongside these packages:\n\n bun add remix@3.1.0\n\nNo code changes are needed. The sweep also picks up in-range updates of\n@cloudflare/workers-types, @cloudflare/vite-plugin, wrangler, jose,\nlinkedom and lucide-static, none of which change any package's API."}
|
|
1315
|
+
{"release":"2026.10.24","package":"@sdxc/qr","type":"chore","breaking":false,"title":"Upgrade Remix to 3.1.0","body":"Every @sdxc package that depends on or peers with remix now pins remix\n3.1.0 instead of 3.0.0, and new apps from the kit template start on it.\nRemix 3.1.0 is a minor release with no breaking changes: server rendering\nwith remix/component is about twice as fast, and it adds\ncreateMixin(setup, { ssr: false }), frame.reload(), frame prefetching and\nstreaming form-data parsing under the /future entry points.\n\nConsumers upgrade remix to 3.1.0 alongside these packages:\n\n bun add remix@3.1.0\n\nNo code changes are needed. The sweep also picks up in-range updates of\n@cloudflare/workers-types, @cloudflare/vite-plugin, wrangler, jose,\nlinkedom and lucide-static, none of which change any package's API."}
|
|
1316
|
+
{"release":"2026.10.24","package":"@sdxc/random","type":"chore","breaking":false,"title":"Upgrade Remix to 3.1.0","body":"Every @sdxc package that depends on or peers with remix now pins remix\n3.1.0 instead of 3.0.0, and new apps from the kit template start on it.\nRemix 3.1.0 is a minor release with no breaking changes: server rendering\nwith remix/component is about twice as fast, and it adds\ncreateMixin(setup, { ssr: false }), frame.reload(), frame prefetching and\nstreaming form-data parsing under the /future entry points.\n\nConsumers upgrade remix to 3.1.0 alongside these packages:\n\n bun add remix@3.1.0\n\nNo code changes are needed. The sweep also picks up in-range updates of\n@cloudflare/workers-types, @cloudflare/vite-plugin, wrangler, jose,\nlinkedom and lucide-static, none of which change any package's API."}
|
|
1317
|
+
{"release":"2026.10.24","package":"@sdxc/rate-limit","type":"chore","breaking":false,"title":"Upgrade Remix to 3.1.0","body":"Every @sdxc package that depends on or peers with remix now pins remix\n3.1.0 instead of 3.0.0, and new apps from the kit template start on it.\nRemix 3.1.0 is a minor release with no breaking changes: server rendering\nwith remix/component is about twice as fast, and it adds\ncreateMixin(setup, { ssr: false }), frame.reload(), frame prefetching and\nstreaming form-data parsing under the /future entry points.\n\nConsumers upgrade remix to 3.1.0 alongside these packages:\n\n bun add remix@3.1.0\n\nNo code changes are needed. The sweep also picks up in-range updates of\n@cloudflare/workers-types, @cloudflare/vite-plugin, wrangler, jose,\nlinkedom and lucide-static, none of which change any package's API."}
|
|
1318
|
+
{"release":"2026.10.24","package":"@sdxc/rdap","type":"chore","breaking":false,"title":"Upgrade Remix to 3.1.0","body":"Every @sdxc package that depends on or peers with remix now pins remix\n3.1.0 instead of 3.0.0, and new apps from the kit template start on it.\nRemix 3.1.0 is a minor release with no breaking changes: server rendering\nwith remix/component is about twice as fast, and it adds\ncreateMixin(setup, { ssr: false }), frame.reload(), frame prefetching and\nstreaming form-data parsing under the /future entry points.\n\nConsumers upgrade remix to 3.1.0 alongside these packages:\n\n bun add remix@3.1.0\n\nNo code changes are needed. The sweep also picks up in-range updates of\n@cloudflare/workers-types, @cloudflare/vite-plugin, wrangler, jose,\nlinkedom and lucide-static, none of which change any package's API."}
|
|
1319
|
+
{"release":"2026.10.24","package":"@sdxc/scim","type":"chore","breaking":false,"title":"Upgrade Remix to 3.1.0","body":"Every @sdxc package that depends on or peers with remix now pins remix\n3.1.0 instead of 3.0.0, and new apps from the kit template start on it.\nRemix 3.1.0 is a minor release with no breaking changes: server rendering\nwith remix/component is about twice as fast, and it adds\ncreateMixin(setup, { ssr: false }), frame.reload(), frame prefetching and\nstreaming form-data parsing under the /future entry points.\n\nConsumers upgrade remix to 3.1.0 alongside these packages:\n\n bun add remix@3.1.0\n\nNo code changes are needed. The sweep also picks up in-range updates of\n@cloudflare/workers-types, @cloudflare/vite-plugin, wrangler, jose,\nlinkedom and lucide-static, none of which change any package's API."}
|
|
1320
|
+
{"release":"2026.10.24","package":"@sdxc/search","type":"chore","breaking":false,"title":"Upgrade Remix to 3.1.0","body":"Every @sdxc package that depends on or peers with remix now pins remix\n3.1.0 instead of 3.0.0, and new apps from the kit template start on it.\nRemix 3.1.0 is a minor release with no breaking changes: server rendering\nwith remix/component is about twice as fast, and it adds\ncreateMixin(setup, { ssr: false }), frame.reload(), frame prefetching and\nstreaming form-data parsing under the /future entry points.\n\nConsumers upgrade remix to 3.1.0 alongside these packages:\n\n bun add remix@3.1.0\n\nNo code changes are needed. The sweep also picks up in-range updates of\n@cloudflare/workers-types, @cloudflare/vite-plugin, wrangler, jose,\nlinkedom and lucide-static, none of which change any package's API."}
|
|
1321
|
+
{"release":"2026.10.24","package":"@sdxc/security-headers","type":"chore","breaking":false,"title":"Upgrade Remix to 3.1.0","body":"Every @sdxc package that depends on or peers with remix now pins remix\n3.1.0 instead of 3.0.0, and new apps from the kit template start on it.\nRemix 3.1.0 is a minor release with no breaking changes: server rendering\nwith remix/component is about twice as fast, and it adds\ncreateMixin(setup, { ssr: false }), frame.reload(), frame prefetching and\nstreaming form-data parsing under the /future entry points.\n\nConsumers upgrade remix to 3.1.0 alongside these packages:\n\n bun add remix@3.1.0\n\nNo code changes are needed. The sweep also picks up in-range updates of\n@cloudflare/workers-types, @cloudflare/vite-plugin, wrangler, jose,\nlinkedom and lucide-static, none of which change any package's API."}
|
|
1322
|
+
{"release":"2026.10.24","package":"@sdxc/seo","type":"chore","breaking":false,"title":"Upgrade Remix to 3.1.0","body":"Every @sdxc package that depends on or peers with remix now pins remix\n3.1.0 instead of 3.0.0, and new apps from the kit template start on it.\nRemix 3.1.0 is a minor release with no breaking changes: server rendering\nwith remix/component is about twice as fast, and it adds\ncreateMixin(setup, { ssr: false }), frame.reload(), frame prefetching and\nstreaming form-data parsing under the /future entry points.\n\nConsumers upgrade remix to 3.1.0 alongside these packages:\n\n bun add remix@3.1.0\n\nNo code changes are needed. The sweep also picks up in-range updates of\n@cloudflare/workers-types, @cloudflare/vite-plugin, wrangler, jose,\nlinkedom and lucide-static, none of which change any package's API."}
|
|
1323
|
+
{"release":"2026.10.24","package":"@sdxc/session-storage-kv","type":"chore","breaking":false,"title":"Upgrade Remix to 3.1.0","body":"Every @sdxc package that depends on or peers with remix now pins remix\n3.1.0 instead of 3.0.0, and new apps from the kit template start on it.\nRemix 3.1.0 is a minor release with no breaking changes: server rendering\nwith remix/component is about twice as fast, and it adds\ncreateMixin(setup, { ssr: false }), frame.reload(), frame prefetching and\nstreaming form-data parsing under the /future entry points.\n\nConsumers upgrade remix to 3.1.0 alongside these packages:\n\n bun add remix@3.1.0\n\nNo code changes are needed. The sweep also picks up in-range updates of\n@cloudflare/workers-types, @cloudflare/vite-plugin, wrangler, jose,\nlinkedom and lucide-static, none of which change any package's API."}
|
|
1324
|
+
{"release":"2026.10.24","package":"@sdxc/sitemap","type":"chore","breaking":false,"title":"Upgrade Remix to 3.1.0","body":"Every @sdxc package that depends on or peers with remix now pins remix\n3.1.0 instead of 3.0.0, and new apps from the kit template start on it.\nRemix 3.1.0 is a minor release with no breaking changes: server rendering\nwith remix/component is about twice as fast, and it adds\ncreateMixin(setup, { ssr: false }), frame.reload(), frame prefetching and\nstreaming form-data parsing under the /future entry points.\n\nConsumers upgrade remix to 3.1.0 alongside these packages:\n\n bun add remix@3.1.0\n\nNo code changes are needed. The sweep also picks up in-range updates of\n@cloudflare/workers-types, @cloudflare/vite-plugin, wrangler, jose,\nlinkedom and lucide-static, none of which change any package's API."}
|
|
1325
|
+
{"release":"2026.10.24","package":"@sdxc/spam","type":"chore","breaking":false,"title":"Upgrade Remix to 3.1.0","body":"Every @sdxc package that depends on or peers with remix now pins remix\n3.1.0 instead of 3.0.0, and new apps from the kit template start on it.\nRemix 3.1.0 is a minor release with no breaking changes: server rendering\nwith remix/component is about twice as fast, and it adds\ncreateMixin(setup, { ssr: false }), frame.reload(), frame prefetching and\nstreaming form-data parsing under the /future entry points.\n\nConsumers upgrade remix to 3.1.0 alongside these packages:\n\n bun add remix@3.1.0\n\nNo code changes are needed. The sweep also picks up in-range updates of\n@cloudflare/workers-types, @cloudflare/vite-plugin, wrangler, jose,\nlinkedom and lucide-static, none of which change any package's API."}
|
|
1326
|
+
{"release":"2026.10.24","package":"@sdxc/spec","type":"chore","breaking":false,"title":"Upgrade Remix to 3.1.0","body":"Every @sdxc package that depends on or peers with remix now pins remix\n3.1.0 instead of 3.0.0, and new apps from the kit template start on it.\nRemix 3.1.0 is a minor release with no breaking changes: server rendering\nwith remix/component is about twice as fast, and it adds\ncreateMixin(setup, { ssr: false }), frame.reload(), frame prefetching and\nstreaming form-data parsing under the /future entry points.\n\nConsumers upgrade remix to 3.1.0 alongside these packages:\n\n bun add remix@3.1.0\n\nNo code changes are needed. The sweep also picks up in-range updates of\n@cloudflare/workers-types, @cloudflare/vite-plugin, wrangler, jose,\nlinkedom and lucide-static, none of which change any package's API."}
|
|
1327
|
+
{"release":"2026.10.24","package":"@sdxc/structured-fields","type":"chore","breaking":false,"title":"Upgrade Remix to 3.1.0","body":"Every @sdxc package that depends on or peers with remix now pins remix\n3.1.0 instead of 3.0.0, and new apps from the kit template start on it.\nRemix 3.1.0 is a minor release with no breaking changes: server rendering\nwith remix/component is about twice as fast, and it adds\ncreateMixin(setup, { ssr: false }), frame.reload(), frame prefetching and\nstreaming form-data parsing under the /future entry points.\n\nConsumers upgrade remix to 3.1.0 alongside these packages:\n\n bun add remix@3.1.0\n\nNo code changes are needed. The sweep also picks up in-range updates of\n@cloudflare/workers-types, @cloudflare/vite-plugin, wrangler, jose,\nlinkedom and lucide-static, none of which change any package's API."}
|
|
1328
|
+
{"release":"2026.10.24","package":"@sdxc/trace-context","type":"chore","breaking":false,"title":"Upgrade Remix to 3.1.0","body":"Every @sdxc package that depends on or peers with remix now pins remix\n3.1.0 instead of 3.0.0, and new apps from the kit template start on it.\nRemix 3.1.0 is a minor release with no breaking changes: server rendering\nwith remix/component is about twice as fast, and it adds\ncreateMixin(setup, { ssr: false }), frame.reload(), frame prefetching and\nstreaming form-data parsing under the /future entry points.\n\nConsumers upgrade remix to 3.1.0 alongside these packages:\n\n bun add remix@3.1.0\n\nNo code changes are needed. The sweep also picks up in-range updates of\n@cloudflare/workers-types, @cloudflare/vite-plugin, wrangler, jose,\nlinkedom and lucide-static, none of which change any package's API."}
|
|
1329
|
+
{"release":"2026.10.24","package":"@sdxc/trailing-slash-middleware","type":"chore","breaking":false,"title":"Upgrade Remix to 3.1.0","body":"Every @sdxc package that depends on or peers with remix now pins remix\n3.1.0 instead of 3.0.0, and new apps from the kit template start on it.\nRemix 3.1.0 is a minor release with no breaking changes: server rendering\nwith remix/component is about twice as fast, and it adds\ncreateMixin(setup, { ssr: false }), frame.reload(), frame prefetching and\nstreaming form-data parsing under the /future entry points.\n\nConsumers upgrade remix to 3.1.0 alongside these packages:\n\n bun add remix@3.1.0\n\nNo code changes are needed. The sweep also picks up in-range updates of\n@cloudflare/workers-types, @cloudflare/vite-plugin, wrangler, jose,\nlinkedom and lucide-static, none of which change any package's API."}
|
|
1330
|
+
{"release":"2026.10.24","package":"@sdxc/u","type":"chore","breaking":false,"title":"Upgrade Remix to 3.1.0","body":"Every @sdxc package that depends on or peers with remix now pins remix\n3.1.0 instead of 3.0.0, and new apps from the kit template start on it.\nRemix 3.1.0 is a minor release with no breaking changes: server rendering\nwith remix/component is about twice as fast, and it adds\ncreateMixin(setup, { ssr: false }), frame.reload(), frame prefetching and\nstreaming form-data parsing under the /future entry points.\n\nConsumers upgrade remix to 3.1.0 alongside these packages:\n\n bun add remix@3.1.0\n\nNo code changes are needed. The sweep also picks up in-range updates of\n@cloudflare/workers-types, @cloudflare/vite-plugin, wrangler, jose,\nlinkedom and lucide-static, none of which change any package's API."}
|
|
1331
|
+
{"release":"2026.10.24","package":"@sdxc/ui","type":"chore","breaking":false,"title":"Upgrade Remix to 3.1.0","body":"Every @sdxc package that depends on or peers with remix now pins remix\n3.1.0 instead of 3.0.0, and new apps from the kit template start on it.\nRemix 3.1.0 is a minor release with no breaking changes: server rendering\nwith remix/component is about twice as fast, and it adds\ncreateMixin(setup, { ssr: false }), frame.reload(), frame prefetching and\nstreaming form-data parsing under the /future entry points.\n\nConsumers upgrade remix to 3.1.0 alongside these packages:\n\n bun add remix@3.1.0\n\nNo code changes are needed. The sweep also picks up in-range updates of\n@cloudflare/workers-types, @cloudflare/vite-plugin, wrangler, jose,\nlinkedom and lucide-static, none of which change any package's API."}
|
|
1332
|
+
{"release":"2026.10.24","package":"@sdxc/ui","type":"feat","breaking":false,"title":"Prefetch a Link or LinkButton destination with the prefetch prop","body":"Link and LinkButton accept an optional `prefetch` prop that starts loading\nthe destination page before the visitor navigates. `\"intent\"` prefetches\nonce the visitor rests the pointer or focus on the link, or presses it;\n`\"viewport\"` prefetches once the link scrolls into view. The default,\n`\"none\"`, renders the anchor exactly as before.\n\n <Link href=\"/products/shirt\" prefetch=\"intent\">Shirt</Link>\n <LinkButton href=\"/projects/new\" prefetch=\"viewport\">New project</LinkButton>\n\nThe prop writes `data-rmx-prefetch`, which the remix/component runtime in\nremix 3.1.0 reads, so it takes effect on pages that run that runtime. Mark\nonly links whose GET request is safe to repeat."}
|
|
1333
|
+
{"release":"2026.10.24","package":"@sdxc/ui","type":"feat","breaking":false,"title":"Share one prefetch contract across link components","body":"@sdxc/ui/utils exports `LinkPrefetch`, the prefetch modes link components\naccept (`\"none\" | \"intent\" | \"viewport\" | \"render\"`), with two helpers:\n`prefetchAttribute(mode)` returns the `data-rmx-prefetch` value for the\nmodes the remix/component runtime reads, and `rendersPrefetchHint(mode,\nhref)` says whether a `<link rel=\"prefetch\">` belongs beside the anchor.\n\n import { prefetchAttribute } from \"@sdxc/ui/utils\";\n\n <a href={href} data-rmx-prefetch={prefetchAttribute(mode)}>…</a>\n\nExisting components are unchanged by this commit."}
|
|
1334
|
+
{"release":"2026.10.24","package":"@sdxc/ui","type":"feat","breaking":false,"title":"Prefetch the option a combobox's arrows rest on","body":"`activeDescendantKeys` takes an optional `prefetch` strategy. Once the arrow\nkeys rest on an option for 100ms, the option's same-origin link starts\nloading, so pressing Enter lands sooner:\n\n <input role=\"combobox\" aria-controls=\"results\" mix={[activeDescendantKeys({ prefetch: \"frame\" })]} />\n\n- `\"frame\"` calls `prefetch()` from `remix/component`, which warms the HTTP\n cache a client-side (frame) navigation reads. Use it where Remix handles\n navigations and the pages are cacheable.\n- `\"document\"` appends a `<link rel=\"prefetch\">` to the document head, which a\n full document load reuses. Use it where links load whole documents.\n\nThe new `prefetchOption(combobox, index, strategy)` loads an option's link\ndirectly, for example the top result once new results settle:\n\n prefetchOption(input, 0, \"document\");\n\nBoth skip readers with Save-Data on or a slow-2g/2g connection, links to\nanother origin, links that open elsewhere or download, the page already\nshowing, and a destination loaded in the last five minutes. Without\n`prefetch` the mixin behaves exactly as before; nobody needs to change code."}
|
|
1335
|
+
{"release":"2026.10.24","package":"@sdxc/ui","type":"feat","breaking":false,"title":"Prefetch Pagination, NavigationMenu and Sidebar link destinations","body":"`Pagination.Link`, `NavigationMenu.Link`, `Sidebar.MenuLink` and\n`Sidebar.MenuSubLink` accept a `prefetch` prop with the same modes as\n`Link`: `\"none\"` (the default) writes nothing, `\"intent\"` and `\"viewport\"`\nwrite `data-rmx-prefetch` on the anchor for the remix/component runtime, and\n`\"render\"` renders a `<link rel=\"prefetch\">` right after the anchor, which\nalso serves full-document navigations.\n\n <Pagination.Link href=\"?page=3\" prefetch=\"render\">3</Pagination.Link>\n <Sidebar.MenuLink href=\"/inbox\" prefetch=\"intent\">Inbox</Sidebar.MenuLink>\n\nEach `\"render\"` hint is a request on page load, so in a menu or sidebar keep\nit to the first few links; on pagination it suits the next-page link.\nExisting links are unchanged until they set the prop."}
|
|
1336
|
+
{"release":"2026.10.24","package":"@sdxc/ui","type":"feat","breaking":false,"title":"Prefetch link destinations on render or intent from every link","body":"`Link`, `LinkButton`, `NavLink` and `Breadcrumbs.Link` now accept the same\n`prefetch` prop: `\"none\"` (the default), `\"intent\"`, `\"viewport\"` or the new\n`\"render\"`. `\"intent\"` and `\"viewport\"` write `data-rmx-prefetch` on the anchor\nfor the `remix/component` runtime; `\"render\"` instead renders\n`<link rel=\"prefetch\" href>` right after the anchor, so the browser fetches the\ndestination as soon as the page loads, which also serves full-document\nnavigations. A link without an `href` renders no hint.\n\n <NavLink href=\"/dashboard\" prefetch=\"render\">{t(\"nav.dashboard\")}</NavLink>\n <Breadcrumbs.Link href=\"/projects\" prefetch=\"intent\">{t(\"nav.projects\")}</Breadcrumbs.Link>\n\nEach `\"render\"` hint is a request on page load, so keep it to the first few\nitems of a list. `Link.Prefetch`, `LinkButton.Prefetch`, `NavLink.Prefetch` and\n`Breadcrumbs.Prefetch` name the shared mode type.\n\n`Group` now flattens a control's end corners only when another control follows\nit, so the last control keeps its rounded corners when a `\"render\"` prefetch hint\nsits after it. No consumer action is needed."}
|
|
1337
|
+
{"release":"2026.10.24","package":"@sdxc/ui","type":"feat","breaking":false,"title":"Submit a form into its frame and keep a frame current with frameSubmit and frameRefresh","body":"Two new mixins in `@sdxc/ui/mixins` drive the frame that renders their host.\n\n`frameSubmit(options?)` goes on a `<form>` inside a frame. On submit it checks the form's\nvalidity, then sends the form's data through the frame and renders the answer there in one\nrequest, honoring the submitting button's `formaction`, `formmethod` and `formenctype`. The\nform carries `aria-busy=\"true\"` while the request runs, and dispatches a `ui:frame-submit`\nevent (`FrameSubmitEvent`) whose `state` is `pending`, then `settled`, `aborted` or `failed`.\nAfterwards the frame returns to its own address, so the action should answer a frame request\nwith the frame's content; a redirect to the frame's route works. Pass `{ keepSrc: false }`\nto have the frame adopt the action's address instead. Without JavaScript the form submits as\na normal document request.\n\n <form method=\"post\" action=\"/actions/rename\" mix={[frameSubmit()]}>…</form>\n\n`frameRefresh(options)` reloads the enclosing frame every `every` milliseconds, whenever the\n`on` event reaches the host, or both. One reload runs at a time, the schedule rests while the\npage is hidden and reloads once when it is shown again, and an `until` callback stops it for\ngood once it returns `true`."}
|
|
1338
|
+
{"release":"2026.10.24","package":"@sdxc/ui","type":"docs","breaking":false,"title":"Document FrameSubmitEvent's state field","body":"The `state` field on `FrameSubmitEvent` now carries its own doc comment: it reports where a frameSubmit submission stands, with `pending` always first. No behavior changes and no consumer action is needed."}
|
|
1339
|
+
{"release":"2026.10.24","package":"@sdxc/user-agent","type":"chore","breaking":false,"title":"Upgrade Remix to 3.1.0","body":"Every @sdxc package that depends on or peers with remix now pins remix\n3.1.0 instead of 3.0.0, and new apps from the kit template start on it.\nRemix 3.1.0 is a minor release with no breaking changes: server rendering\nwith remix/component is about twice as fast, and it adds\ncreateMixin(setup, { ssr: false }), frame.reload(), frame prefetching and\nstreaming form-data parsing under the /future entry points.\n\nConsumers upgrade remix to 3.1.0 alongside these packages:\n\n bun add remix@3.1.0\n\nNo code changes are needed. The sweep also picks up in-range updates of\n@cloudflare/workers-types, @cloudflare/vite-plugin, wrangler, jose,\nlinkedom and lucide-static, none of which change any package's API."}
|
|
1340
|
+
{"release":"2026.10.24","package":"@sdxc/validate","type":"chore","breaking":false,"title":"Upgrade Remix to 3.1.0","body":"Every @sdxc package that depends on or peers with remix now pins remix\n3.1.0 instead of 3.0.0, and new apps from the kit template start on it.\nRemix 3.1.0 is a minor release with no breaking changes: server rendering\nwith remix/component is about twice as fast, and it adds\ncreateMixin(setup, { ssr: false }), frame.reload(), frame prefetching and\nstreaming form-data parsing under the /future entry points.\n\nConsumers upgrade remix to 3.1.0 alongside these packages:\n\n bun add remix@3.1.0\n\nNo code changes are needed. The sweep also picks up in-range updates of\n@cloudflare/workers-types, @cloudflare/vite-plugin, wrangler, jose,\nlinkedom and lucide-static, none of which change any package's API."}
|
|
1341
|
+
{"release":"2026.10.24","package":"@sdxc/web-push","type":"chore","breaking":false,"title":"Upgrade Remix to 3.1.0","body":"Every @sdxc package that depends on or peers with remix now pins remix\n3.1.0 instead of 3.0.0, and new apps from the kit template start on it.\nRemix 3.1.0 is a minor release with no breaking changes: server rendering\nwith remix/component is about twice as fast, and it adds\ncreateMixin(setup, { ssr: false }), frame.reload(), frame prefetching and\nstreaming form-data parsing under the /future entry points.\n\nConsumers upgrade remix to 3.1.0 alongside these packages:\n\n bun add remix@3.1.0\n\nNo code changes are needed. The sweep also picks up in-range updates of\n@cloudflare/workers-types, @cloudflare/vite-plugin, wrangler, jose,\nlinkedom and lucide-static, none of which change any package's API."}
|
|
1342
|
+
{"release":"2026.10.24","package":"@sdxc/webhooks","type":"chore","breaking":false,"title":"Upgrade Remix to 3.1.0","body":"Every @sdxc package that depends on or peers with remix now pins remix\n3.1.0 instead of 3.0.0, and new apps from the kit template start on it.\nRemix 3.1.0 is a minor release with no breaking changes: server rendering\nwith remix/component is about twice as fast, and it adds\ncreateMixin(setup, { ssr: false }), frame.reload(), frame prefetching and\nstreaming form-data parsing under the /future entry points.\n\nConsumers upgrade remix to 3.1.0 alongside these packages:\n\n bun add remix@3.1.0\n\nNo code changes are needed. The sweep also picks up in-range updates of\n@cloudflare/workers-types, @cloudflare/vite-plugin, wrangler, jose,\nlinkedom and lucide-static, none of which change any package's API."}
|
|
1343
|
+
{"release":"2026.10.24","package":"@sdxc/well-known","type":"chore","breaking":false,"title":"Upgrade Remix to 3.1.0","body":"Every @sdxc package that depends on or peers with remix now pins remix\n3.1.0 instead of 3.0.0, and new apps from the kit template start on it.\nRemix 3.1.0 is a minor release with no breaking changes: server rendering\nwith remix/component is about twice as fast, and it adds\ncreateMixin(setup, { ssr: false }), frame.reload(), frame prefetching and\nstreaming form-data parsing under the /future entry points.\n\nConsumers upgrade remix to 3.1.0 alongside these packages:\n\n bun add remix@3.1.0\n\nNo code changes are needed. The sweep also picks up in-range updates of\n@cloudflare/workers-types, @cloudflare/vite-plugin, wrangler, jose,\nlinkedom and lucide-static, none of which change any package's API."}
|
|
1344
|
+
{"release":"2026.10.24","package":"@sdxc/workers-cache","type":"chore","breaking":false,"title":"Upgrade Remix to 3.1.0","body":"Every @sdxc package that depends on or peers with remix now pins remix\n3.1.0 instead of 3.0.0, and new apps from the kit template start on it.\nRemix 3.1.0 is a minor release with no breaking changes: server rendering\nwith remix/component is about twice as fast, and it adds\ncreateMixin(setup, { ssr: false }), frame.reload(), frame prefetching and\nstreaming form-data parsing under the /future entry points.\n\nConsumers upgrade remix to 3.1.0 alongside these packages:\n\n bun add remix@3.1.0\n\nNo code changes are needed. The sweep also picks up in-range updates of\n@cloudflare/workers-types, @cloudflare/vite-plugin, wrangler, jose,\nlinkedom and lucide-static, none of which change any package's API."}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sdxc/kit",
|
|
3
|
-
"version": "2026.10.
|
|
3
|
+
"version": "2026.10.24",
|
|
4
4
|
"description": "The sdxc command line: start a Remix v3 app, generate its files, copy UI components into it and upgrade it",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"bin": {
|
|
@@ -14,12 +14,12 @@
|
|
|
14
14
|
"./lock.schema.json": "./lock.schema.json"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@sdxc/cli": "2026.10.
|
|
17
|
+
"@sdxc/cli": "2026.10.24",
|
|
18
18
|
"@sdxc/codemod": "2026.10.23",
|
|
19
19
|
"@sdxc/cron": "2026.10.23",
|
|
20
|
-
"@sdxc/diagram": "2026.10.
|
|
20
|
+
"@sdxc/diagram": "2026.10.24",
|
|
21
21
|
"@sdxc/iife": "2026.10.23",
|
|
22
|
-
"@sdxc/json-schema": "2026.10.
|
|
22
|
+
"@sdxc/json-schema": "2026.10.24",
|
|
23
23
|
"@sdxc/jsonc": "2026.10.16",
|
|
24
24
|
"@sdxc/jsonl": "2026.10.16",
|
|
25
25
|
"@sdxc/result": "2026.10.13",
|
|
@@ -27,9 +27,9 @@
|
|
|
27
27
|
"oxc-parser": "^0.154.0"
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
|
30
|
-
"remix": "3.
|
|
30
|
+
"remix": "3.1.0"
|
|
31
31
|
},
|
|
32
|
-
"gitHead": "
|
|
32
|
+
"gitHead": "f9db0f8f1f51a256e74b94b0f4b1db4be9880370",
|
|
33
33
|
"publishConfig": {
|
|
34
34
|
"access": "public"
|
|
35
35
|
},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "breadcrumbs",
|
|
3
|
-
"changedIn": "2026.10.
|
|
3
|
+
"changedIn": "2026.10.24",
|
|
4
4
|
"dependencies": [
|
|
5
5
|
"link"
|
|
6
6
|
],
|
|
@@ -9,7 +9,10 @@
|
|
|
9
9
|
],
|
|
10
10
|
"source": {
|
|
11
11
|
"path": "breadcrumbs.tsx",
|
|
12
|
-
"content": "/**\n * A trail of links marking the page's position within a hierarchy of parent\n * sections, composing a `<nav>` root, an `<ol>` list, and `<li>` items around\n * {@link Breadcrumbs.Link}, a restyled {@link Link}. Every item but the last\n * draws its separator through a CSS `::after` pseudo-element, keeping it\n * purely presentational, and the trail's current segment reads straight from\n * the native `aria-current` attribute a consumer sets while rendering the\n * page it currently occupies.\n *\n * @author [Sergio Xalambrí](https://sergiodxa.com)\n * @copyright Sergio Xalambrí 2026\n */\n\nimport type { Handle, Props as TagProps } from \"remix/component\";\n\nimport { fg } from \"@sdxc/u/color\";\nimport { listStyle, pseudoContent } from \"@sdxc/u/general\";\nimport { flex, items } from \"@sdxc/u/layout\";\nimport { m, mb, mis, p, pb, pi } from \"@sdxc/u/size\";\nimport { data, hover, when } from \"@sdxc/u/state\";\nimport { fontSize, textDecoration, weight } from \"@sdxc/u/typography\";\n\nimport { warnIfNoAccessibleLabel } from \"@sdxc/ui/utils\";\n\nimport { Link } from \"@sdxc/ui/link\";\n\n/** Semantic color role {@link Breadcrumbs.Link} falls back to when `color` is omitted. */\nconst DEFAULT_COLOR: Link.Color = \"neutral\";\n\n/**\n * Prop types for {@link Breadcrumbs} and its compound parts.\n */\nexport namespace Breadcrumbs {\n\t/**\n\t * Every native `<nav>` attribute, unchanged, plus the `mix` passthrough.\n\t */\n\texport interface Props extends TagProps<\"nav\"> {}\n\n\t/**\n\t * Every native `<ol>` attribute, unchanged, plus the `mix` passthrough.\n\t */\n\texport interface ListProps extends TagProps<\"ol\"> {}\n\n\t/**\n\t * Every native `<li>` attribute, unchanged, plus the `mix` passthrough.\n\t */\n\texport interface ItemProps extends TagProps<\"li\"> {}\n\n\t/**\n\t * Every prop {@link Link.Props} accepts
|
|
12
|
+
"content": "/**\n * A trail of links marking the page's position within a hierarchy of parent\n * sections, composing a `<nav>` root, an `<ol>` list, and `<li>` items around\n * {@link Breadcrumbs.Link}, a restyled {@link Link}. Every item but the last\n * draws its separator through a CSS `::after` pseudo-element, keeping it\n * purely presentational, and the trail's current segment reads straight from\n * the native `aria-current` attribute a consumer sets while rendering the\n * page it currently occupies.\n *\n * @author [Sergio Xalambrí](https://sergiodxa.com)\n * @copyright Sergio Xalambrí 2026\n */\n\nimport type { Handle, Props as TagProps } from \"remix/component\";\n\nimport { fg } from \"@sdxc/u/color\";\nimport { listStyle, pseudoContent } from \"@sdxc/u/general\";\nimport { flex, items } from \"@sdxc/u/layout\";\nimport { m, mb, mis, p, pb, pi } from \"@sdxc/u/size\";\nimport { data, hover, when } from \"@sdxc/u/state\";\nimport { fontSize, textDecoration, weight } from \"@sdxc/u/typography\";\n\nimport type { LinkPrefetch } from \"@sdxc/ui/utils\";\n\nimport { warnIfNoAccessibleLabel } from \"@sdxc/ui/utils\";\n\nimport { Link } from \"@sdxc/ui/link\";\n\n/** Semantic color role {@link Breadcrumbs.Link} falls back to when `color` is omitted. */\nconst DEFAULT_COLOR: Link.Color = \"neutral\";\n\n/** Prefetch mode {@link Breadcrumbs.Link} falls back to when `prefetch` is omitted. */\nconst DEFAULT_PREFETCH: Breadcrumbs.Prefetch = \"none\";\n\n/**\n * Prop types for {@link Breadcrumbs} and its compound parts.\n */\nexport namespace Breadcrumbs {\n\t/**\n\t * Every native `<nav>` attribute, unchanged, plus the `mix` passthrough.\n\t */\n\texport interface Props extends TagProps<\"nav\"> {}\n\n\t/**\n\t * Every native `<ol>` attribute, unchanged, plus the `mix` passthrough.\n\t */\n\texport interface ListProps extends TagProps<\"ol\"> {}\n\n\t/**\n\t * Every native `<li>` attribute, unchanged, plus the `mix` passthrough.\n\t */\n\texport interface ItemProps extends TagProps<\"li\"> {}\n\n\t/**\n\t * When a segment's destination starts loading: on intent, once in the\n\t * viewport, on render through a `<link rel=\"prefetch\">` that also serves\n\t * full-document navigations, or only on navigation (`\"none\"`).\n\t */\n\texport type Prefetch = LinkPrefetch;\n\n\t/**\n\t * Every prop {@link Link.Props} accepts. A type alias rather than an\n\t * interface, since {@link Link.Props} resolves through a conditional type\n\t * that an `interface extends` clause can't statically extend.\n\t */\n\texport type LinkProps = Link.Props & {\n\t\t/**\n\t\t * Prefetch mode, for segments whose GET is safe to repeat. `\"render\"` suits\n\t\t * multi-page navigations; a long trail keeps it to its nearest parents, since\n\t\t * each hint is a request on page load. Defaults to {@link DEFAULT_PREFETCH}.\n\t\t */\n\t\tprefetch?: Prefetch;\n\t};\n}\n\n/**\n * Renders the trail's `<nav>` root, laying {@link Breadcrumbs.List} as a row.\n * A root missing `aria-label` or `aria-labelledby` logs a dev-mode\n * `console.warn`, since assistive technology needs one to identify this landmark.\n *\n * @param handle Runtime handle carrying the host `<nav>`'s props.\n * @returns The render function producing the trail's markup.\n * @example\n * <Breadcrumbs aria-label={t(\"breadcrumbs.label\")}>\n * \t<Breadcrumbs.List>\n * \t\t<Breadcrumbs.Item>\n * \t\t\t<Breadcrumbs.Link href=\"/\">{t(\"nav.home\")}</Breadcrumbs.Link>\n * \t\t</Breadcrumbs.Item>\n * \t\t<Breadcrumbs.Item>\n * \t\t\t<Breadcrumbs.Link href=\"/projects\" aria-current=\"page\">\n * \t\t\t\t{t(\"nav.projects\")}\n * \t\t\t</Breadcrumbs.Link>\n * \t\t</Breadcrumbs.Item>\n * \t</Breadcrumbs.List>\n * </Breadcrumbs>\n */\nexport function Breadcrumbs(handle: Handle<Breadcrumbs.Props>) {\n\treturn () => {\n\t\tlet { mix, ...rest } = handle.props;\n\n\t\twarnIfNoAccessibleLabel(\n\t\t\thandle.props,\n\t\t\t'Breadcrumbs: needs an \"aria-label\" or \"aria-labelledby\" identifying this navigation landmark for assistive technology.',\n\t\t);\n\n\t\treturn <nav {...rest} data-slot=\"breadcrumbs\" mix={[flex(), items(\"center\"), mix]} />;\n\t};\n}\n\n/**\n * Renders the trail's `<ol>` list, resetting native list markers and spacing\n * and laying {@link Breadcrumbs.Item} children out in a row whose spacing\n * comes from each {@link Breadcrumbs.Link}'s padding, so the gaps stay clickable.\n *\n * @param handle Runtime handle carrying the host `<ol>`'s props.\n * @returns The render function producing the list's markup.\n * @example\n * <Breadcrumbs.List>\n * \t<Breadcrumbs.Item>\n * \t\t<Breadcrumbs.Link href=\"/\">{t(\"nav.home\")}</Breadcrumbs.Link>\n * \t</Breadcrumbs.Item>\n * </Breadcrumbs.List>\n */\nBreadcrumbs.List = function BreadcrumbsList(handle: Handle<Breadcrumbs.ListProps>) {\n\treturn () => {\n\t\tlet { mix, ...rest } = handle.props;\n\n\t\treturn (\n\t\t\t<ol\n\t\t\t\t{...rest}\n\t\t\t\tdata-slot=\"list\"\n\t\t\t\tmix={[flex(), items(\"center\"), m(0), p(0), listStyle(), mix]}\n\t\t\t/>\n\t\t);\n\t};\n};\n\n/**\n * Renders a single `<li>` wrapping one {@link Breadcrumbs.Link}. Every item\n * but the last draws a `›` separator glyph via a CSS `::after`\n * pseudo-element, keeping the divider purely presentational.\n *\n * @param handle Runtime handle carrying the host `<li>`'s props.\n * @returns The render function producing the item's markup.\n * @example\n * <Breadcrumbs.Item>\n * \t<Breadcrumbs.Link href=\"/projects\">{t(\"nav.projects\")}</Breadcrumbs.Link>\n * </Breadcrumbs.Item>\n */\nBreadcrumbs.Item = function BreadcrumbsItem(handle: Handle<Breadcrumbs.ItemProps>) {\n\treturn () => {\n\t\tlet { mix, ...rest } = handle.props;\n\n\t\treturn (\n\t\t\t<li\n\t\t\t\t{...rest}\n\t\t\t\tdata-slot=\"item\"\n\t\t\t\tmix={[\n\t\t\t\t\tflex(),\n\t\t\t\t\titems(\"center\"),\n\t\t\t\t\twhen(\"&:not(:last-child)::after\", [\n\t\t\t\t\t\tfg(\"neutral.muted\"),\n\t\t\t\t\t\tfontSize(\"sm\"),\n\t\t\t\t\t\tpseudoContent('\"›\"'),\n\t\t\t\t\t]),\n\t\t\t\t\tmix,\n\t\t\t\t]}\n\t\t\t/>\n\t\t);\n\t};\n};\n\n/**\n * Renders one trail segment as a restyled {@link Link}: sized to `0.875rem`\n * with its underline dropped, defaulting to a quiet neutral color role that\n * brightens on hover and bolds when `aria-current=\"page\"` is set.\n *\n * @param handle Runtime handle carrying the host `<a>`'s props.\n * @returns The render function producing the segment's markup.\n * @example\n * <Breadcrumbs.Link href=\"/settings\" prefetch=\"render\">{t(\"nav.settings\")}</Breadcrumbs.Link>\n * @example\n * <Breadcrumbs.Link href=\"/settings/profile\" aria-current=\"page\">\n * \t{t(\"nav.profile\")}\n * </Breadcrumbs.Link>\n * @example\n * <Breadcrumbs.Link aria-disabled=\"true\">{t(\"nav.archived\")}</Breadcrumbs.Link>\n */\nBreadcrumbs.Link = function BreadcrumbsLink(handle: Handle<Breadcrumbs.LinkProps>) {\n\treturn () => {\n\t\tlet { color, prefetch, mix, ...rest } = handle.props;\n\t\tlet resolvedColor = color ?? DEFAULT_COLOR;\n\n\t\treturn (\n\t\t\t<Link\n\t\t\t\tcolor={resolvedColor}\n\t\t\t\tprefetch={prefetch ?? DEFAULT_PREFETCH}\n\t\t\t\t{...rest}\n\t\t\t\tdata-slot=\"link\"\n\t\t\t\tmix={[\n\t\t\t\t\tfontSize(\"sm\"),\n\t\t\t\t\t/**\n\t\t\t\t\t * The space around each separator lives in the link's own padding, so the\n\t\t\t\t\t * whole gap is clickable; the block padding reaches a 24px target and its\n\t\t\t\t\t * negative margin keeps the row at the text's height. The trail's first link\n\t\t\t\t\t * pulls back by its padding so the trail stays flush with its container.\n\t\t\t\t\t */\n\t\t\t\t\tpi(2),\n\t\t\t\t\tpb(0.5),\n\t\t\t\t\tmb(-0.5),\n\t\t\t\t\twhen('[data-slot=\"item\"]:first-child > &', mis(-2)),\n\t\t\t\t\ttextDecoration(\"none\"),\n\t\t\t\t\thover(textDecoration(\"none\")),\n\t\t\t\t\tdata(\"color\", \"neutral\", [fg(\"neutral.muted\"), hover(fg(\"neutral\"))]),\n\t\t\t\t\twhen('&[aria-current]:not([aria-current=\"false\"])', [\n\t\t\t\t\t\tweight(\"medium\"),\n\t\t\t\t\t\tfg(\"neutral.emphasis\"),\n\t\t\t\t\t]),\n\t\t\t\t\tmix,\n\t\t\t\t]}\n\t\t\t/>\n\t\t);\n\t};\n};\n"
|
|
13
13
|
},
|
|
14
|
-
"test":
|
|
14
|
+
"test": {
|
|
15
|
+
"path": "breadcrumbs.test.tsx",
|
|
16
|
+
"content": "/**\n * Tests for {@link Breadcrumbs.Link}: a segment carries `data-rmx-prefetch` only for\n * the runtime's modes, and `\"render\"` adds a `<link rel=\"prefetch\">` after it instead.\n *\n * @author [Sergio Xalambrí](https://sergiodxa.com)\n * @copyright Sergio Xalambrí 2026\n */\n\nimport { renderToString } from \"remix/component/server\";\nimport { describe, expect, test } from \"vitest\";\n\nimport { Breadcrumbs } from \"@sdxc/ui/breadcrumbs\";\n\ndescribe(\"Breadcrumbs.Link\", () => {\n\ttest(\"leaves prefetching off unless a mode is chosen\", async () => {\n\t\tlet html = await renderToString(<Breadcrumbs.Link href=\"/projects\">Projects</Breadcrumbs.Link>);\n\t\tlet none = await renderToString(\n\t\t\t<Breadcrumbs.Link href=\"/projects\" prefetch=\"none\">\n\t\t\t\tProjects\n\t\t\t</Breadcrumbs.Link>,\n\t\t);\n\n\t\texpect(html).toMatch(/<a [^>]*href=\"\\/projects\"[^>]*>Projects<\\/a>/);\n\t\texpect(html).not.toContain(\"data-rmx-prefetch\");\n\t\texpect(none).not.toContain(\"data-rmx-prefetch\");\n\t\texpect(html).not.toContain(\"<link\");\n\t\texpect(none).not.toContain(\"<link\");\n\t});\n\n\ttest.each([\"intent\", \"viewport\"] as const)(\"prefetches on %s\", async (prefetch) => {\n\t\tlet html = await renderToString(\n\t\t\t<Breadcrumbs.Link href=\"/projects\" prefetch={prefetch}>\n\t\t\t\tProjects\n\t\t\t</Breadcrumbs.Link>,\n\t\t);\n\n\t\texpect(html).toMatch(new RegExp(`<a [^>]*data-rmx-prefetch=\"${prefetch}\"`));\n\t\texpect(html).not.toContain(\"<link\");\n\t});\n\n\ttest(\"renders a prefetch hint after the segment's anchor on render\", async () => {\n\t\tlet html = await renderToString(\n\t\t\t<Breadcrumbs.Item>\n\t\t\t\t<Breadcrumbs.Link href=\"/projects\" prefetch=\"render\">\n\t\t\t\t\tProjects\n\t\t\t\t</Breadcrumbs.Link>\n\t\t\t</Breadcrumbs.Item>,\n\t\t);\n\n\t\texpect(html).toMatch(/Projects<\\/a><link rel=\"prefetch\" href=\"\\/projects\"\\s*\\/?><\\/li>/);\n\t\texpect(html).not.toContain(\"data-rmx-prefetch\");\n\t});\n\n\ttest(\"renders no prefetch hint without a destination\", async () => {\n\t\tlet html = await renderToString(\n\t\t\t<Breadcrumbs.Link prefetch=\"render\">Projects</Breadcrumbs.Link>,\n\t\t);\n\n\t\texpect(html).not.toContain(\"<link\");\n\t});\n});\n"
|
|
17
|
+
}
|
|
15
18
|
}
|
package/registry/ui/group.json
CHANGED
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "group",
|
|
3
|
-
"changedIn": "2026.10.
|
|
3
|
+
"changedIn": "2026.10.24",
|
|
4
4
|
"dependencies": [],
|
|
5
5
|
"exports": [
|
|
6
6
|
"Group"
|
|
7
7
|
],
|
|
8
8
|
"source": {
|
|
9
9
|
"path": "group.tsx",
|
|
10
|
-
"content": "/**\n * A visual and semantic wrapper binding a cluster of related controls into\n * one unit — a text input paired with its clear button, a row of segmented\n * buttons, a search field with a trailing submit action. The host lays its\n * children out in a single row, joining their edges so the cluster reads as one\n * control, with the seam between two of them drawn structurally rather than\n * through any tracked state.\n *\n * @author [Sergio Xalambrí](https://sergiodxa.com)\n * @copyright Sergio Xalambrí 2026\n */\n\nimport type { Handle, Props as TagProps } from \"remix/component\";\n\nimport { outlineColor } from \"@sdxc/u/color\";\nimport { roundedCorner } from \"@sdxc/u/effects\";\nimport { flex, items } from \"@sdxc/u/layout\";\nimport { mis } from \"@sdxc/u/size\";\nimport { z } from \"@sdxc/u/stacking\";\nimport { when } from \"@sdxc/u/state\";\nimport { attrs } from \"remix/component\";\n\n/**\n * Default ARIA role applied through {@link attrs} unless a consumer\n * overrides `role`; pass `\"region\"` for landmark-worthy content or\n * `\"presentation\"` for purely visual grouping.\n */\nconst DEFAULT_ROLE = \"group\";\n\n/**\n * Prop types for {@link Group}.\n */\nexport namespace Group {\n\t/**\n\t * Native `<div>` attributes plus `mix`. `role` defaults to\n\t * {@link DEFAULT_ROLE} (or `\"region\"`/`\"presentation\"`); `aria-invalid`\n\t * gives the focus ring the danger tone, `aria-disabled` marks it disabled.\n\t */\n\texport interface Props extends TagProps<\"div\"> {}\n}\n\n/**\n * Lays children out in a centered flex row with no border, background, or gap, joining\n * their edges into one shape: only the cluster's outer corners stay round, and the seam\n * two controls share is drawn once. Focus is shown by whichever control holds it.\n *\n * @param handle Runtime handle carrying the host `<div>`'s props.\n * @returns The render function producing the group's markup.\n * @example\n * <Group>\n * \t<Button>{t(\"stepper.decrement\")}</Button>\n * \t<Button>{t(\"stepper.increment\")}</Button>\n * </Group>\n * @example\n * <Group aria-invalid=\"true\">\n * \t<input aria-label={t(\"form.email\")} />\n * \t<Button aria-label={t(\"form.clear\")}>\n * \t\t<XIcon />\n * \t</Button>\n * </Group>\n */\nexport function Group(handle: Handle<Group.Props>) {\n\treturn () => {\n\t\tlet { mix, ...rest } = handle.props;\n\n\t\treturn (\n\t\t\t<div\n\t\t\t\t{...rest}\n\t\t\t\tmix={[\n\t\t\t\t\tattrs({ role: DEFAULT_ROLE }),\n\t\t\t\t\tflex(),\n\t\t\t\t\titems(\"center\"),\n\t\t\t\t\t/**\n\t\t\t\t\t * The controls compose into one shape, so the cluster keeps the rounding on\n\t\t\t\t\t * its own outer corners and the seam where two of them meet is drawn once.\n\t\t\t\t\t */\n\t\t\t\t\twhen(\"& > *:not(:first-child)\", [\n\t\t\t\t\t\troundedCorner(\"start-start\", \"none\"),\n\t\t\t\t\t\troundedCorner(\"end-start\", \"none\"),\n\t\t\t\t\t\tmis(\"-1px\"),\n\t\t\t\t\t]),\n\t\t\t\t\twhen(\"& > *:not(
|
|
10
|
+
"content": "/**\n * A visual and semantic wrapper binding a cluster of related controls into\n * one unit — a text input paired with its clear button, a row of segmented\n * buttons, a search field with a trailing submit action. The host lays its\n * children out in a single row, joining their edges so the cluster reads as one\n * control, with the seam between two of them drawn structurally rather than\n * through any tracked state.\n *\n * @author [Sergio Xalambrí](https://sergiodxa.com)\n * @copyright Sergio Xalambrí 2026\n */\n\nimport type { Handle, Props as TagProps } from \"remix/component\";\n\nimport { outlineColor } from \"@sdxc/u/color\";\nimport { roundedCorner } from \"@sdxc/u/effects\";\nimport { flex, items } from \"@sdxc/u/layout\";\nimport { mis } from \"@sdxc/u/size\";\nimport { z } from \"@sdxc/u/stacking\";\nimport { when } from \"@sdxc/u/state\";\nimport { attrs } from \"remix/component\";\n\n/**\n * Default ARIA role applied through {@link attrs} unless a consumer\n * overrides `role`; pass `\"region\"` for landmark-worthy content or\n * `\"presentation\"` for purely visual grouping.\n */\nconst DEFAULT_ROLE = \"group\";\n\n/**\n * Prop types for {@link Group}.\n */\nexport namespace Group {\n\t/**\n\t * Native `<div>` attributes plus `mix`. `role` defaults to\n\t * {@link DEFAULT_ROLE} (or `\"region\"`/`\"presentation\"`); `aria-invalid`\n\t * gives the focus ring the danger tone, `aria-disabled` marks it disabled.\n\t */\n\texport interface Props extends TagProps<\"div\"> {}\n}\n\n/**\n * Lays children out in a centered flex row with no border, background, or gap, joining\n * their edges into one shape: only the cluster's outer corners stay round, and the seam\n * two controls share is drawn once. Focus is shown by whichever control holds it.\n *\n * @param handle Runtime handle carrying the host `<div>`'s props.\n * @returns The render function producing the group's markup.\n * @example\n * <Group>\n * \t<Button>{t(\"stepper.decrement\")}</Button>\n * \t<Button>{t(\"stepper.increment\")}</Button>\n * </Group>\n * @example\n * <Group aria-invalid=\"true\">\n * \t<input aria-label={t(\"form.email\")} />\n * \t<Button aria-label={t(\"form.clear\")}>\n * \t\t<XIcon />\n * \t</Button>\n * </Group>\n */\nexport function Group(handle: Handle<Group.Props>) {\n\treturn () => {\n\t\tlet { mix, ...rest } = handle.props;\n\n\t\treturn (\n\t\t\t<div\n\t\t\t\t{...rest}\n\t\t\t\tmix={[\n\t\t\t\t\tattrs({ role: DEFAULT_ROLE }),\n\t\t\t\t\tflex(),\n\t\t\t\t\titems(\"center\"),\n\t\t\t\t\t/**\n\t\t\t\t\t * The controls compose into one shape, so the cluster keeps the rounding on\n\t\t\t\t\t * its own outer corners and the seam where two of them meet is drawn once; the\n\t\t\t\t\t * last control before a trailing `<link rel=\"prefetch\">` hint keeps its corners.\n\t\t\t\t\t */\n\t\t\t\t\twhen(\"& > *:not(:first-child)\", [\n\t\t\t\t\t\troundedCorner(\"start-start\", \"none\"),\n\t\t\t\t\t\troundedCorner(\"end-start\", \"none\"),\n\t\t\t\t\t\tmis(\"-1px\"),\n\t\t\t\t\t]),\n\t\t\t\t\twhen(\"& > *:has(~ :not(link))\", [\n\t\t\t\t\t\troundedCorner(\"start-end\", \"none\"),\n\t\t\t\t\t\troundedCorner(\"end-end\", \"none\"),\n\t\t\t\t\t]),\n\t\t\t\t\t/**\n\t\t\t\t\t * Focus shows on the control holding it, naming which control has it where a ring\n\t\t\t\t\t * around the cluster names only the group. That control is raised so its ring\n\t\t\t\t\t * crosses the seam it shares with a neighbour.\n\t\t\t\t\t */\n\t\t\t\t\twhen(\"& > *:focus-visible\", z(1)),\n\t\t\t\t\twhen('&[aria-invalid=\"true\"] > *:focus-visible', outlineColor(\"danger\")),\n\t\t\t\t\tmix,\n\t\t\t\t]}\n\t\t\t/>\n\t\t);\n\t};\n}\n"
|
|
11
11
|
},
|
|
12
|
-
"test":
|
|
12
|
+
"test": {
|
|
13
|
+
"path": "group.test.tsx",
|
|
14
|
+
"content": "/**\n * Tests for {@link Group}: a control flattens its end corners only when another\n * control follows it, so a trailing `<link rel=\"prefetch\">` hint leaves the\n * cluster's last control rounded.\n *\n * @author [Sergio Xalambrí](https://sergiodxa.com)\n * @copyright Sergio Xalambrí 2026\n */\n\nimport { renderToString } from \"remix/component/server\";\nimport { describe, expect, test } from \"vitest\";\n\nimport { Group } from \"@sdxc/ui/group\";\n\ndescribe(Group.name, () => {\n\ttest(\"flattens end corners only before a following control\", async () => {\n\t\tlet html = await renderToString(<Group />);\n\n\t\texpect(html).toContain(\"& > *:has(~ :not(link))\");\n\t\texpect(html).not.toContain(\"& > *:not(:last-child)\");\n\t});\n});\n"
|
|
15
|
+
}
|
|
13
16
|
}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "link-button",
|
|
3
|
-
"changedIn": "2026.10.
|
|
3
|
+
"changedIn": "2026.10.24",
|
|
4
4
|
"dependencies": [],
|
|
5
5
|
"exports": [
|
|
6
6
|
"LinkButton"
|
|
7
7
|
],
|
|
8
8
|
"source": {
|
|
9
9
|
"path": "link-button.tsx",
|
|
10
|
-
"content": "/**\n * A navigation action styled to read as a button rather than inline text —\n * \"View project\", \"Download\", a dialog's \"Cancel\" that also navigates away.\n * Its host renders as a native `<a>`, sharing {@link Button}'s semantic\n * color role, visual weight variant, and size so a link and a button placed\n * side by side render pixel-identical.\n *\n * @author [Sergio Xalambrí](https://sergiodxa.com)\n * @copyright Sergio Xalambrí 2026\n */\n\nimport type { Handle, Props as TagProps } from \"remix/component\";\n\nimport { bg, border, fg, outline } from \"@sdxc/u/color\";\nimport { opacity, rounded } from \"@sdxc/u/effects\";\nimport { cursor, pointerEvents, userSelect } from \"@sdxc/u/general\";\nimport { gap, inlineFlex, items, justify, shrink } from \"@sdxc/u/layout\";\nimport { bs, is, minBs, pb, pi, pie, pis } from \"@sdxc/u/size\";\nimport { active, data, hover, when } from \"@sdxc/u/state\";\nimport { text, weight } from \"@sdxc/u/typography\";\n\nimport type { SemanticColor } from \"@sdxc/ui/utils\";\n\nimport { hitArea } from \"@sdxc/ui/styles\";\nimport { interactiveTransition } from \"@sdxc/ui/styles\";\nimport { glyphEdges } from \"@sdxc/ui/utils\";\n\n/** Semantic color role {@link LinkButton} falls back to when `color` is omitted. */\nconst DEFAULT_COLOR: LinkButton.Color = \"neutral\";\n\n/** Visual weight {@link LinkButton} falls back to when `variant` is omitted. */\nconst DEFAULT_VARIANT: LinkButton.Variant = \"solid\";\n\n/** Size variant {@link LinkButton} falls back to when `size` is omitted. */\nconst DEFAULT_SIZE: LinkButton.Size = \"md\";\n\n/**\n * Prop types for {@link LinkButton}.\n */\nexport namespace LinkButton {\n\t/**\n\t * Semantic color role, each mapped to its matching `--ui-*` variables.\n\t */\n\texport type Color = SemanticColor;\n\n\t/**\n\t * Visual weight the link renders with: a solid fill with an on-solid\n\t * foreground, a transparent fill with a strong colored border, or a fully\n\t * transparent fill with just a colored label.\n\t */\n\texport type Variant = \"solid\" | \"outline\" | \"ghost\";\n\n\t/**\n\t * Size variant controlling the link's padding and font size.\n\t */\n\texport type Size = \"sm\" | \"md\" | \"lg\";\n\n\t/**\n\t * Props accepted by {@link LinkButton}. A type alias rather than an\n\t * interface, since the native anchor props resolve to an intersection\n\t * type that TypeScript can't use in an `extends` clause.\n\t */\n\texport type Props = TagProps<\"a\"> & {\n\t\t/** Semantic color role. Defaults to {@link DEFAULT_COLOR}. */\n\t\tcolor?: Color;\n\t\t/** Visual weight. Defaults to {@link DEFAULT_VARIANT}. */\n\t\tvariant?: Variant;\n\t\t/** Size variant. Defaults to {@link DEFAULT_SIZE}. */\n\t\tsize?: Size;\n\t};\n}\n\n/**\n * Renders a native `<a>` host, colored and shaped through the same color,\n * variant, and size data attributes as {@link Button}. `aria-disabled=\"true\"`\n * keeps it focusable while dimmed, so drop `href` too for full inertness.\n *\n * @param handle Runtime handle carrying the host `<a>`'s props.\n * @returns The render function producing the link's markup.\n * @example\n * <LinkButton href=\"/projects/new\">{t(\"actions.createProject\")}</LinkButton>\n * @example\n * <LinkButton href=\"/projects\" color=\"neutral\" variant=\"outline\" size=\"sm\">{t(\"actions.cancel\")}</LinkButton>\n * @example\n * <LinkButton href=\"/export/report.csv\" download aria-disabled={!hasReport || undefined}>{t(\"actions.download\")}</LinkButton>\n */\nexport function LinkButton(handle: Handle<LinkButton.Props>) {\n\treturn () => {\n\t\tlet { color, variant, size, children, mix, ...rest } = handle.props;\n\t\tlet resolvedColor = color ?? DEFAULT_COLOR;\n\t\tlet resolvedVariant = variant ?? DEFAULT_VARIANT;\n\t\tlet resolvedSize = size ?? DEFAULT_SIZE;\n\t\tlet edges = glyphEdges(children);\n\n\t\treturn (\n\t\t\t<a\n\t\t\t\t{...rest}\n\t\t\t\tdata-color={resolvedColor}\n\t\t\t\tdata-variant={resolvedVariant}\n\t\t\t\tdata-size={resolvedSize}\n\t\t\t\tdata-glyph-start={edges.start || undefined}\n\t\t\t\tdata-glyph-end={edges.end || undefined}\n\t\t\t\tmix={[\n\t\t\t\t\twhen(\"&:focus-visible\", [\n\t\t\t\t\t\toutline({ color: \"brand.ring\", offset: 2 }),\n\t\t\t\t\t\tdata(\"color\", \"neutral\", outline(\"neutral.ring\")),\n\t\t\t\t\t\tdata(\"color\", \"success\", outline(\"success.ring\")),\n\t\t\t\t\t\tdata(\"color\", \"warning\", outline(\"warning.ring\")),\n\t\t\t\t\t\tdata(\"color\", \"danger\", outline(\"danger.ring\")),\n\t\t\t\t\t]),\n\t\t\t\t\tinteractiveTransition(),\n\t\t\t\t\tinlineFlex(),\n\t\t\t\t\titems(\"center\"),\n\t\t\t\t\tjustify(\"center\"),\n\t\t\t\t\tgap(2),\n\t\t\t\t\t/**\n\t\t\t\t\t * A glyph inside a link button is measured and held at size by the same rules\n\t\t\t\t\t * `Button` states, for the same reasons: it is sized against the label beside\n\t\t\t\t\t * it so the row keeps the height its text and padding ask for, and it never\n\t\t\t\t\t * shrinks, since the default `flex-shrink: 1` would compress the glyph rather\n\t\t\t\t\t * than the words and a squashed icon reads as a rendering fault.\n\t\t\t\t\t */\n\t\t\t\t\twhen(\"& > svg\", [shrink(), is(4), bs(4)]),\n\t\t\t\t\trounded(\"md\"),\n\t\t\t\t\tweight(\"medium\"),\n\t\t\t\t\t/** A small control reaches `--ui-target-size` however a consumer positions it. */\n\t\t\t\t\thitArea({ anchor: \"flex-center\" }),\n\t\t\t\t\tpi(4),\n\t\t\t\t\tpb(2),\n\t\t\t\t\t/**\n\t\t\t\t\t * Every variant carries the same border width, colored to match its\n\t\t\t\t\t * own fill (transparent for ghost), so solid, outline, and ghost\n\t\t\t\t\t * render at the same footprint.\n\t\t\t\t\t */\n\t\t\t\t\tborder({ width: 1 }),\n\t\t\t\t\t/**\n\t\t\t\t\t * The row measure is stated, so the control lines up with a field of the same size when\n\t\t\t\t\t * a Group fuses the two, and still grows when a long label wraps.\n\t\t\t\t\t */\n\t\t\t\t\tminBs(\"2.5rem\"),\n\n\t\t\t\t\tdata(\"size\", \"sm\", [pi(3), pb(1.5), minBs(\"2rem\"), when(\"& > svg\", [is(3), bs(3)])]),\n\t\t\t\t\tdata(\"size\", \"lg\", [\n\t\t\t\t\t\tpi(5),\n\t\t\t\t\t\tpb(2.5),\n\t\t\t\t\t\ttext(\"base\"),\n\t\t\t\t\t\tminBs(\"3rem\"),\n\t\t\t\t\t\twhen(\"& > svg\", [is(5), bs(5)]),\n\t\t\t\t\t]),\n\t\t\t\t\t/**\n\t\t\t\t\t * A glyph beside a label carries its own side bearing, so the padding on that\n\t\t\t\t\t * side drops one step and the glyph and the words read as evenly inset.\n\t\t\t\t\t */\n\t\t\t\t\twhen(\"&[data-glyph-start]:has(> svg:first-child)\", [\n\t\t\t\t\t\tpis(3),\n\t\t\t\t\t\tdata(\"size\", \"sm\", pis(2)),\n\t\t\t\t\t\tdata(\"size\", \"lg\", pis(4)),\n\t\t\t\t\t]),\n\t\t\t\t\twhen(\"&[data-glyph-end]:has(> svg:last-child)\", [\n\t\t\t\t\t\tpie(3),\n\t\t\t\t\t\tdata(\"size\", \"sm\", pie(2)),\n\t\t\t\t\t\tdata(\"size\", \"lg\", pie(4)),\n\t\t\t\t\t]),\n\n\t\t\t\t\tdata(\"variant\", \"solid\", [\n\t\t\t\t\t\tdata(\"color\", \"brand\", [\n\t\t\t\t\t\t\tbg(\"brand.solid\"),\n\t\t\t\t\t\t\tborder(\"brand.solid\"),\n\t\t\t\t\t\t\tfg(\"brand.onSolid\"),\n\t\t\t\t\t\t\thover([bg(\"brand.bg-solid-hover\"), border(\"brand.bg-solid-hover\")]),\n\t\t\t\t\t\t\tactive([bg(\"brand.bg-solid-pressed\"), border(\"brand.bg-solid-pressed\")]),\n\t\t\t\t\t\t]),\n\t\t\t\t\t\tdata(\"color\", \"neutral\", [\n\t\t\t\t\t\t\tbg(\"neutral.solid\"),\n\t\t\t\t\t\t\tborder(\"neutral.solid\"),\n\t\t\t\t\t\t\tfg(\"neutral.onSolid\"),\n\t\t\t\t\t\t\thover([bg(\"neutral.bg-solid-hover\"), border(\"neutral.bg-solid-hover\")]),\n\t\t\t\t\t\t\tactive([bg(\"neutral.bg-solid-pressed\"), border(\"neutral.bg-solid-pressed\")]),\n\t\t\t\t\t\t]),\n\t\t\t\t\t\tdata(\"color\", \"success\", [\n\t\t\t\t\t\t\tbg(\"success.solid\"),\n\t\t\t\t\t\t\tborder(\"success.solid\"),\n\t\t\t\t\t\t\tfg(\"success.onSolid\"),\n\t\t\t\t\t\t\thover([bg(\"success.bg-solid-hover\"), border(\"success.bg-solid-hover\")]),\n\t\t\t\t\t\t\tactive([bg(\"success.bg-solid-pressed\"), border(\"success.bg-solid-pressed\")]),\n\t\t\t\t\t\t]),\n\t\t\t\t\t\tdata(\"color\", \"warning\", [\n\t\t\t\t\t\t\tbg(\"warning.solid\"),\n\t\t\t\t\t\t\tborder(\"warning.solid\"),\n\t\t\t\t\t\t\tfg(\"warning.onSolid\"),\n\t\t\t\t\t\t\thover([bg(\"warning.bg-solid-hover\"), border(\"warning.bg-solid-hover\")]),\n\t\t\t\t\t\t\tactive([bg(\"warning.bg-solid-pressed\"), border(\"warning.bg-solid-pressed\")]),\n\t\t\t\t\t\t]),\n\t\t\t\t\t\tdata(\"color\", \"danger\", [\n\t\t\t\t\t\t\tbg(\"danger.solid\"),\n\t\t\t\t\t\t\tborder(\"danger.solid\"),\n\t\t\t\t\t\t\tfg(\"danger.onSolid\"),\n\t\t\t\t\t\t\thover([bg(\"danger.bg-solid-hover\"), border(\"danger.bg-solid-hover\")]),\n\t\t\t\t\t\t\tactive([bg(\"danger.bg-solid-pressed\"), border(\"danger.bg-solid-pressed\")]),\n\t\t\t\t\t\t]),\n\t\t\t\t\t]),\n\n\t\t\t\t\tdata(\"variant\", \"outline\", [\n\t\t\t\t\t\tdata(\"color\", \"brand\", [\n\t\t\t\t\t\t\tborder(\"brand\"),\n\t\t\t\t\t\t\tfg(\"brand\"),\n\t\t\t\t\t\t\thover([bg(\"brand.tint\"), border(\"brand.border-hover\")]),\n\t\t\t\t\t\t\tactive(bg(\"brand.bg-tint-hover\")),\n\t\t\t\t\t\t]),\n\t\t\t\t\t\tdata(\"color\", \"neutral\", [\n\t\t\t\t\t\t\tborder(\"neutral\"),\n\t\t\t\t\t\t\tfg(\"neutral\"),\n\t\t\t\t\t\t\thover([bg(\"neutral.tint\"), border(\"neutral.border-hover\")]),\n\t\t\t\t\t\t\tactive(bg(\"neutral.bg-tint-hover\")),\n\t\t\t\t\t\t]),\n\t\t\t\t\t\tdata(\"color\", \"success\", [\n\t\t\t\t\t\t\tborder(\"success\"),\n\t\t\t\t\t\t\tfg(\"success\"),\n\t\t\t\t\t\t\thover([bg(\"success.tint\"), border(\"success.border-hover\")]),\n\t\t\t\t\t\t\tactive(bg(\"success.bg-tint-hover\")),\n\t\t\t\t\t\t]),\n\t\t\t\t\t\tdata(\"color\", \"warning\", [\n\t\t\t\t\t\t\tborder(\"warning\"),\n\t\t\t\t\t\t\tfg(\"warning\"),\n\t\t\t\t\t\t\thover([bg(\"warning.tint\"), border(\"warning.border-hover\")]),\n\t\t\t\t\t\t\tactive(bg(\"warning.bg-tint-hover\")),\n\t\t\t\t\t\t]),\n\t\t\t\t\t\tdata(\"color\", \"danger\", [\n\t\t\t\t\t\t\tborder(\"danger\"),\n\t\t\t\t\t\t\tfg(\"danger\"),\n\t\t\t\t\t\t\thover([bg(\"danger.tint\"), border(\"danger.border-hover\")]),\n\t\t\t\t\t\t\tactive(bg(\"danger.bg-tint-hover\")),\n\t\t\t\t\t\t]),\n\t\t\t\t\t]),\n\t\t\t\t\tdata(\"variant\", \"outline\", bg(\"transparent\")),\n\n\t\t\t\t\tdata(\"variant\", \"ghost\", [\n\t\t\t\t\t\tdata(\"color\", \"brand\", [\n\t\t\t\t\t\t\tfg(\"brand\"),\n\t\t\t\t\t\t\thover(bg(\"brand.tint\")),\n\t\t\t\t\t\t\tactive(bg(\"brand.bg-tint-hover\")),\n\t\t\t\t\t\t]),\n\t\t\t\t\t\tdata(\"color\", \"neutral\", [\n\t\t\t\t\t\t\tfg(\"neutral\"),\n\t\t\t\t\t\t\thover(bg(\"neutral.bg-tint-hover\")),\n\t\t\t\t\t\t\tactive(bg(\"neutral.bg-tint-pressed\")),\n\t\t\t\t\t\t]),\n\t\t\t\t\t\tdata(\"color\", \"success\", [\n\t\t\t\t\t\t\tfg(\"success\"),\n\t\t\t\t\t\t\thover(bg(\"success.tint\")),\n\t\t\t\t\t\t\tactive(bg(\"success.bg-tint-hover\")),\n\t\t\t\t\t\t]),\n\t\t\t\t\t\tdata(\"color\", \"warning\", [\n\t\t\t\t\t\t\tfg(\"warning\"),\n\t\t\t\t\t\t\thover(bg(\"warning.tint\")),\n\t\t\t\t\t\t\tactive(bg(\"warning.bg-tint-hover\")),\n\t\t\t\t\t\t]),\n\t\t\t\t\t\tdata(\"color\", \"danger\", [\n\t\t\t\t\t\t\tfg(\"danger\"),\n\t\t\t\t\t\t\thover(bg(\"danger.tint\")),\n\t\t\t\t\t\t\tactive(bg(\"danger.bg-tint-hover\")),\n\t\t\t\t\t\t]),\n\t\t\t\t\t]),\n\t\t\t\t\tdata(\"variant\", \"ghost\", [bg(\"transparent\"), border(\"transparent\")]),\n\n\t\t\t\t\twhen('&[aria-disabled=\"true\"]', opacity(50)),\n\t\t\t\t\twhen('&[aria-disabled=\"true\"]', [cursor(\"not-allowed\"), pointerEvents()]),\n\n\t\t\t\t\tcursor(\"default\"),\n\t\t\t\t\tuserSelect(),\n\n\t\t\t\t\ttext(\"sm\"),\n\n\t\t\t\t\tdata(\"size\", \"sm\", text(\"xs\")),\n\t\t\t\t\tmix,\n\t\t\t\t]}\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t</a>\n\t\t);\n\t};\n}\n"
|
|
10
|
+
"content": "/**\n * A navigation action styled to read as a button rather than inline text —\n * \"View project\", \"Download\", a dialog's \"Cancel\" that also navigates away.\n * Its host renders as a native `<a>`, sharing {@link Button}'s semantic\n * color role, visual weight variant, and size so a link and a button placed\n * side by side render pixel-identical.\n *\n * @author [Sergio Xalambrí](https://sergiodxa.com)\n * @copyright Sergio Xalambrí 2026\n */\n\nimport type { Handle, Props as TagProps } from \"remix/component\";\n\nimport { bg, border, fg, outline } from \"@sdxc/u/color\";\nimport { opacity, rounded } from \"@sdxc/u/effects\";\nimport { cursor, pointerEvents, userSelect } from \"@sdxc/u/general\";\nimport { gap, inlineFlex, items, justify, shrink } from \"@sdxc/u/layout\";\nimport { bs, is, minBs, pb, pi, pie, pis } from \"@sdxc/u/size\";\nimport { active, data, hover, when } from \"@sdxc/u/state\";\nimport { text, weight } from \"@sdxc/u/typography\";\n\nimport type { LinkPrefetch } from \"@sdxc/ui/utils\";\nimport type { SemanticColor } from \"@sdxc/ui/utils\";\n\nimport { hitArea } from \"@sdxc/ui/styles\";\nimport { interactiveTransition } from \"@sdxc/ui/styles\";\nimport { glyphEdges } from \"@sdxc/ui/utils\";\nimport { prefetchAttribute, rendersPrefetchHint } from \"@sdxc/ui/utils\";\n\n/** Semantic color role {@link LinkButton} falls back to when `color` is omitted. */\nconst DEFAULT_COLOR: LinkButton.Color = \"neutral\";\n\n/** Visual weight {@link LinkButton} falls back to when `variant` is omitted. */\nconst DEFAULT_VARIANT: LinkButton.Variant = \"solid\";\n\n/** Size variant {@link LinkButton} falls back to when `size` is omitted. */\nconst DEFAULT_SIZE: LinkButton.Size = \"md\";\n\n/** Prefetch mode {@link LinkButton} falls back to when `prefetch` is omitted. */\nconst DEFAULT_PREFETCH: LinkButton.Prefetch = \"none\";\n\n/**\n * Prop types for {@link LinkButton}.\n */\nexport namespace LinkButton {\n\t/**\n\t * Semantic color role, each mapped to its matching `--ui-*` variables.\n\t */\n\texport type Color = SemanticColor;\n\n\t/**\n\t * Visual weight the link renders with: a solid fill with an on-solid\n\t * foreground, a transparent fill with a strong colored border, or a fully\n\t * transparent fill with just a colored label.\n\t */\n\texport type Variant = \"solid\" | \"outline\" | \"ghost\";\n\n\t/**\n\t * Size variant controlling the link's padding and font size.\n\t */\n\texport type Size = \"sm\" | \"md\" | \"lg\";\n\n\t/**\n\t * When the destination starts loading: on intent, once in the viewport, on\n\t * render through a `<link rel=\"prefetch\">` that also serves full-document\n\t * navigations, or only on navigation (`\"none\"`).\n\t */\n\texport type Prefetch = LinkPrefetch;\n\n\t/**\n\t * Props accepted by {@link LinkButton}. A type alias rather than an\n\t * interface, since the native anchor props resolve to an intersection\n\t * type that TypeScript can't use in an `extends` clause.\n\t */\n\texport type Props = TagProps<\"a\"> & {\n\t\t/** Semantic color role. Defaults to {@link DEFAULT_COLOR}. */\n\t\tcolor?: Color;\n\t\t/** Visual weight. Defaults to {@link DEFAULT_VARIANT}. */\n\t\tvariant?: Variant;\n\t\t/** Size variant. Defaults to {@link DEFAULT_SIZE}. */\n\t\tsize?: Size;\n\t\t/**\n\t\t * Prefetch mode, for links whose GET is safe to repeat. `\"render\"` suits\n\t\t * multi-page navigations; a list keeps it to its first few items, since each\n\t\t * hint is a request on page load. Defaults to {@link DEFAULT_PREFETCH}.\n\t\t */\n\t\tprefetch?: Prefetch;\n\t};\n}\n\n/**\n * Renders a native `<a>` host, colored and shaped through the same color,\n * variant, and size data attributes as {@link Button}. `aria-disabled=\"true\"`\n * keeps it focusable while dimmed, so drop `href` too for full inertness.\n *\n * @param handle Runtime handle carrying the host `<a>`'s props.\n * @returns The render function producing the link's markup.\n * @example\n * <LinkButton href=\"/projects/new\" prefetch=\"intent\">{t(\"actions.createProject\")}</LinkButton>\n * @example\n * <LinkButton href=\"/projects\" color=\"neutral\" variant=\"outline\" size=\"sm\">{t(\"actions.cancel\")}</LinkButton>\n * @example\n * <LinkButton href=\"/export/report.csv\" download aria-disabled={!hasReport || undefined}>{t(\"actions.download\")}</LinkButton>\n */\nexport function LinkButton(handle: Handle<LinkButton.Props>) {\n\treturn () => {\n\t\tlet { color, variant, size, prefetch, children, mix, ...rest } = handle.props;\n\t\tlet resolvedColor = color ?? DEFAULT_COLOR;\n\t\tlet resolvedVariant = variant ?? DEFAULT_VARIANT;\n\t\tlet resolvedSize = size ?? DEFAULT_SIZE;\n\t\tlet resolvedPrefetch = prefetch ?? DEFAULT_PREFETCH;\n\t\tlet edges = glyphEdges(children);\n\n\t\treturn (\n\t\t\t<>\n\t\t\t\t<a\n\t\t\t\t\t{...rest}\n\t\t\t\t\tdata-color={resolvedColor}\n\t\t\t\t\tdata-variant={resolvedVariant}\n\t\t\t\t\tdata-size={resolvedSize}\n\t\t\t\t\tdata-rmx-prefetch={prefetchAttribute(resolvedPrefetch)}\n\t\t\t\t\tdata-glyph-start={edges.start || undefined}\n\t\t\t\t\tdata-glyph-end={edges.end || undefined}\n\t\t\t\t\tmix={[\n\t\t\t\t\t\twhen(\"&:focus-visible\", [\n\t\t\t\t\t\t\toutline({ color: \"brand.ring\", offset: 2 }),\n\t\t\t\t\t\t\tdata(\"color\", \"neutral\", outline(\"neutral.ring\")),\n\t\t\t\t\t\t\tdata(\"color\", \"success\", outline(\"success.ring\")),\n\t\t\t\t\t\t\tdata(\"color\", \"warning\", outline(\"warning.ring\")),\n\t\t\t\t\t\t\tdata(\"color\", \"danger\", outline(\"danger.ring\")),\n\t\t\t\t\t\t]),\n\t\t\t\t\t\tinteractiveTransition(),\n\t\t\t\t\t\tinlineFlex(),\n\t\t\t\t\t\titems(\"center\"),\n\t\t\t\t\t\tjustify(\"center\"),\n\t\t\t\t\t\tgap(2),\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * A glyph inside a link button is measured and held at size by the same rules\n\t\t\t\t\t\t * `Button` states, for the same reasons: it is sized against the label beside\n\t\t\t\t\t\t * it so the row keeps the height its text and padding ask for, and it never\n\t\t\t\t\t\t * shrinks, since the default `flex-shrink: 1` would compress the glyph rather\n\t\t\t\t\t\t * than the words and a squashed icon reads as a rendering fault.\n\t\t\t\t\t\t */\n\t\t\t\t\t\twhen(\"& > svg\", [shrink(), is(4), bs(4)]),\n\t\t\t\t\t\trounded(\"md\"),\n\t\t\t\t\t\tweight(\"medium\"),\n\t\t\t\t\t\t/** A small control reaches `--ui-target-size` however a consumer positions it. */\n\t\t\t\t\t\thitArea({ anchor: \"flex-center\" }),\n\t\t\t\t\t\tpi(4),\n\t\t\t\t\t\tpb(2),\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * Every variant carries the same border width, colored to match its\n\t\t\t\t\t\t * own fill (transparent for ghost), so solid, outline, and ghost\n\t\t\t\t\t\t * render at the same footprint.\n\t\t\t\t\t\t */\n\t\t\t\t\t\tborder({ width: 1 }),\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * The row measure is stated, so the control lines up with a field of the same size when\n\t\t\t\t\t\t * a Group fuses the two, and still grows when a long label wraps.\n\t\t\t\t\t\t */\n\t\t\t\t\t\tminBs(\"2.5rem\"),\n\n\t\t\t\t\t\tdata(\"size\", \"sm\", [pi(3), pb(1.5), minBs(\"2rem\"), when(\"& > svg\", [is(3), bs(3)])]),\n\t\t\t\t\t\tdata(\"size\", \"lg\", [\n\t\t\t\t\t\t\tpi(5),\n\t\t\t\t\t\t\tpb(2.5),\n\t\t\t\t\t\t\ttext(\"base\"),\n\t\t\t\t\t\t\tminBs(\"3rem\"),\n\t\t\t\t\t\t\twhen(\"& > svg\", [is(5), bs(5)]),\n\t\t\t\t\t\t]),\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * A glyph beside a label carries its own side bearing, so the padding on that\n\t\t\t\t\t\t * side drops one step and the glyph and the words read as evenly inset.\n\t\t\t\t\t\t */\n\t\t\t\t\t\twhen(\"&[data-glyph-start]:has(> svg:first-child)\", [\n\t\t\t\t\t\t\tpis(3),\n\t\t\t\t\t\t\tdata(\"size\", \"sm\", pis(2)),\n\t\t\t\t\t\t\tdata(\"size\", \"lg\", pis(4)),\n\t\t\t\t\t\t]),\n\t\t\t\t\t\twhen(\"&[data-glyph-end]:has(> svg:last-child)\", [\n\t\t\t\t\t\t\tpie(3),\n\t\t\t\t\t\t\tdata(\"size\", \"sm\", pie(2)),\n\t\t\t\t\t\t\tdata(\"size\", \"lg\", pie(4)),\n\t\t\t\t\t\t]),\n\n\t\t\t\t\t\tdata(\"variant\", \"solid\", [\n\t\t\t\t\t\t\tdata(\"color\", \"brand\", [\n\t\t\t\t\t\t\t\tbg(\"brand.solid\"),\n\t\t\t\t\t\t\t\tborder(\"brand.solid\"),\n\t\t\t\t\t\t\t\tfg(\"brand.onSolid\"),\n\t\t\t\t\t\t\t\thover([bg(\"brand.bg-solid-hover\"), border(\"brand.bg-solid-hover\")]),\n\t\t\t\t\t\t\t\tactive([bg(\"brand.bg-solid-pressed\"), border(\"brand.bg-solid-pressed\")]),\n\t\t\t\t\t\t\t]),\n\t\t\t\t\t\t\tdata(\"color\", \"neutral\", [\n\t\t\t\t\t\t\t\tbg(\"neutral.solid\"),\n\t\t\t\t\t\t\t\tborder(\"neutral.solid\"),\n\t\t\t\t\t\t\t\tfg(\"neutral.onSolid\"),\n\t\t\t\t\t\t\t\thover([bg(\"neutral.bg-solid-hover\"), border(\"neutral.bg-solid-hover\")]),\n\t\t\t\t\t\t\t\tactive([bg(\"neutral.bg-solid-pressed\"), border(\"neutral.bg-solid-pressed\")]),\n\t\t\t\t\t\t\t]),\n\t\t\t\t\t\t\tdata(\"color\", \"success\", [\n\t\t\t\t\t\t\t\tbg(\"success.solid\"),\n\t\t\t\t\t\t\t\tborder(\"success.solid\"),\n\t\t\t\t\t\t\t\tfg(\"success.onSolid\"),\n\t\t\t\t\t\t\t\thover([bg(\"success.bg-solid-hover\"), border(\"success.bg-solid-hover\")]),\n\t\t\t\t\t\t\t\tactive([bg(\"success.bg-solid-pressed\"), border(\"success.bg-solid-pressed\")]),\n\t\t\t\t\t\t\t]),\n\t\t\t\t\t\t\tdata(\"color\", \"warning\", [\n\t\t\t\t\t\t\t\tbg(\"warning.solid\"),\n\t\t\t\t\t\t\t\tborder(\"warning.solid\"),\n\t\t\t\t\t\t\t\tfg(\"warning.onSolid\"),\n\t\t\t\t\t\t\t\thover([bg(\"warning.bg-solid-hover\"), border(\"warning.bg-solid-hover\")]),\n\t\t\t\t\t\t\t\tactive([bg(\"warning.bg-solid-pressed\"), border(\"warning.bg-solid-pressed\")]),\n\t\t\t\t\t\t\t]),\n\t\t\t\t\t\t\tdata(\"color\", \"danger\", [\n\t\t\t\t\t\t\t\tbg(\"danger.solid\"),\n\t\t\t\t\t\t\t\tborder(\"danger.solid\"),\n\t\t\t\t\t\t\t\tfg(\"danger.onSolid\"),\n\t\t\t\t\t\t\t\thover([bg(\"danger.bg-solid-hover\"), border(\"danger.bg-solid-hover\")]),\n\t\t\t\t\t\t\t\tactive([bg(\"danger.bg-solid-pressed\"), border(\"danger.bg-solid-pressed\")]),\n\t\t\t\t\t\t\t]),\n\t\t\t\t\t\t]),\n\n\t\t\t\t\t\tdata(\"variant\", \"outline\", [\n\t\t\t\t\t\t\tdata(\"color\", \"brand\", [\n\t\t\t\t\t\t\t\tborder(\"brand\"),\n\t\t\t\t\t\t\t\tfg(\"brand\"),\n\t\t\t\t\t\t\t\thover([bg(\"brand.tint\"), border(\"brand.border-hover\")]),\n\t\t\t\t\t\t\t\tactive(bg(\"brand.bg-tint-hover\")),\n\t\t\t\t\t\t\t]),\n\t\t\t\t\t\t\tdata(\"color\", \"neutral\", [\n\t\t\t\t\t\t\t\tborder(\"neutral\"),\n\t\t\t\t\t\t\t\tfg(\"neutral\"),\n\t\t\t\t\t\t\t\thover([bg(\"neutral.tint\"), border(\"neutral.border-hover\")]),\n\t\t\t\t\t\t\t\tactive(bg(\"neutral.bg-tint-hover\")),\n\t\t\t\t\t\t\t]),\n\t\t\t\t\t\t\tdata(\"color\", \"success\", [\n\t\t\t\t\t\t\t\tborder(\"success\"),\n\t\t\t\t\t\t\t\tfg(\"success\"),\n\t\t\t\t\t\t\t\thover([bg(\"success.tint\"), border(\"success.border-hover\")]),\n\t\t\t\t\t\t\t\tactive(bg(\"success.bg-tint-hover\")),\n\t\t\t\t\t\t\t]),\n\t\t\t\t\t\t\tdata(\"color\", \"warning\", [\n\t\t\t\t\t\t\t\tborder(\"warning\"),\n\t\t\t\t\t\t\t\tfg(\"warning\"),\n\t\t\t\t\t\t\t\thover([bg(\"warning.tint\"), border(\"warning.border-hover\")]),\n\t\t\t\t\t\t\t\tactive(bg(\"warning.bg-tint-hover\")),\n\t\t\t\t\t\t\t]),\n\t\t\t\t\t\t\tdata(\"color\", \"danger\", [\n\t\t\t\t\t\t\t\tborder(\"danger\"),\n\t\t\t\t\t\t\t\tfg(\"danger\"),\n\t\t\t\t\t\t\t\thover([bg(\"danger.tint\"), border(\"danger.border-hover\")]),\n\t\t\t\t\t\t\t\tactive(bg(\"danger.bg-tint-hover\")),\n\t\t\t\t\t\t\t]),\n\t\t\t\t\t\t]),\n\t\t\t\t\t\tdata(\"variant\", \"outline\", bg(\"transparent\")),\n\n\t\t\t\t\t\tdata(\"variant\", \"ghost\", [\n\t\t\t\t\t\t\tdata(\"color\", \"brand\", [\n\t\t\t\t\t\t\t\tfg(\"brand\"),\n\t\t\t\t\t\t\t\thover(bg(\"brand.tint\")),\n\t\t\t\t\t\t\t\tactive(bg(\"brand.bg-tint-hover\")),\n\t\t\t\t\t\t\t]),\n\t\t\t\t\t\t\tdata(\"color\", \"neutral\", [\n\t\t\t\t\t\t\t\tfg(\"neutral\"),\n\t\t\t\t\t\t\t\thover(bg(\"neutral.bg-tint-hover\")),\n\t\t\t\t\t\t\t\tactive(bg(\"neutral.bg-tint-pressed\")),\n\t\t\t\t\t\t\t]),\n\t\t\t\t\t\t\tdata(\"color\", \"success\", [\n\t\t\t\t\t\t\t\tfg(\"success\"),\n\t\t\t\t\t\t\t\thover(bg(\"success.tint\")),\n\t\t\t\t\t\t\t\tactive(bg(\"success.bg-tint-hover\")),\n\t\t\t\t\t\t\t]),\n\t\t\t\t\t\t\tdata(\"color\", \"warning\", [\n\t\t\t\t\t\t\t\tfg(\"warning\"),\n\t\t\t\t\t\t\t\thover(bg(\"warning.tint\")),\n\t\t\t\t\t\t\t\tactive(bg(\"warning.bg-tint-hover\")),\n\t\t\t\t\t\t\t]),\n\t\t\t\t\t\t\tdata(\"color\", \"danger\", [\n\t\t\t\t\t\t\t\tfg(\"danger\"),\n\t\t\t\t\t\t\t\thover(bg(\"danger.tint\")),\n\t\t\t\t\t\t\t\tactive(bg(\"danger.bg-tint-hover\")),\n\t\t\t\t\t\t\t]),\n\t\t\t\t\t\t]),\n\t\t\t\t\t\tdata(\"variant\", \"ghost\", [bg(\"transparent\"), border(\"transparent\")]),\n\n\t\t\t\t\t\twhen('&[aria-disabled=\"true\"]', opacity(50)),\n\t\t\t\t\t\twhen('&[aria-disabled=\"true\"]', [cursor(\"not-allowed\"), pointerEvents()]),\n\n\t\t\t\t\t\tcursor(\"default\"),\n\t\t\t\t\t\tuserSelect(),\n\n\t\t\t\t\t\ttext(\"sm\"),\n\n\t\t\t\t\t\tdata(\"size\", \"sm\", text(\"xs\")),\n\t\t\t\t\t\tmix,\n\t\t\t\t\t]}\n\t\t\t\t>\n\t\t\t\t\t{children}\n\t\t\t\t</a>\n\t\t\t\t{rendersPrefetchHint(resolvedPrefetch, rest.href) && (\n\t\t\t\t\t<link rel=\"prefetch\" href={rest.href} />\n\t\t\t\t)}\n\t\t\t</>\n\t\t);\n\t};\n}\n"
|
|
11
11
|
},
|
|
12
12
|
"test": {
|
|
13
13
|
"path": "link-button.test.tsx",
|
|
14
|
-
"content": "/**\n * Tests for {@link LinkButton}: its children still render inside the anchor, a glyph at\n * either edge of a label is marked so that side's padding drops a step, and the anchor\n * carries an inset-free pointer target box.\n *\n * @author [Sergio Xalambrí](https://sergiodxa.com)\n * @copyright Sergio Xalambrí 2026\n */\n\nimport { renderToString } from \"remix/component/server\";\nimport { describe, expect, test } from \"vitest\";\n\nimport { LinkButton } from \"@sdxc/ui/link-button\";\n\ndescribe(LinkButton.name, () => {\n\ttest(\"renders its label inside the anchor\", async () => {\n\t\tlet html = await renderToString(<LinkButton href=\"/new\">Create</LinkButton>);\n\n\t\texpect(html).toMatch(/<a [^>]*href=\"\\/new\"[^>]*>Create<\\/a>/);\n\t});\n\n\ttest(\"marks a leading glyph and leaves the trailing edge alone\", async () => {\n\t\tlet html = await renderToString(\n\t\t\t<LinkButton href=\"/new\">\n\t\t\t\t<svg />\n\t\t\t\tCreate\n\t\t\t</LinkButton>,\n\t\t);\n\n\t\texpect(html).toMatch(/<a [^>]*data-glyph-start/);\n\t\texpect(html).not.toMatch(/<a [^>]*data-glyph-end/);\n\t});\n\n\ttest(\"marks a trailing glyph after a label\", async () => {\n\t\tlet html = await renderToString(\n\t\t\t<LinkButton href=\"/next\">\n\t\t\t\tNext\n\t\t\t\t<svg />\n\t\t\t</LinkButton>,\n\t\t);\n\n\t\texpect(html).toMatch(/<a [^>]*data-glyph-end/);\n\t\texpect(html).not.toMatch(/<a [^>]*data-glyph-start/);\n\t});\n\n\ttest(\"draws a target-size box that holds however the anchor is positioned\", async () => {\n\t\tlet html = await renderToString(<LinkButton href=\"/new\">Create</LinkButton>);\n\n\t\texpect(html).toMatch(\n\t\t\t/&::after \\{[^}]*position: absolute;[^}]*inline-size: var\\(--ui-target-size, 1\\.5rem\\);/,\n\t\t);\n\t});\n});\n"
|
|
14
|
+
"content": "/**\n * Tests for {@link LinkButton}: its children still render inside the anchor, a glyph at\n * either edge of a label is marked so that side's padding drops a step, and the anchor\n * carries an inset-free pointer target box.\n *\n * @author [Sergio Xalambrí](https://sergiodxa.com)\n * @copyright Sergio Xalambrí 2026\n */\n\nimport { renderToString } from \"remix/component/server\";\nimport { describe, expect, test } from \"vitest\";\n\nimport { LinkButton } from \"@sdxc/ui/link-button\";\n\ndescribe(LinkButton.name, () => {\n\ttest(\"renders its label inside the anchor\", async () => {\n\t\tlet html = await renderToString(<LinkButton href=\"/new\">Create</LinkButton>);\n\n\t\texpect(html).toMatch(/<a [^>]*href=\"\\/new\"[^>]*>Create<\\/a>/);\n\t});\n\n\ttest(\"marks a leading glyph and leaves the trailing edge alone\", async () => {\n\t\tlet html = await renderToString(\n\t\t\t<LinkButton href=\"/new\">\n\t\t\t\t<svg />\n\t\t\t\tCreate\n\t\t\t</LinkButton>,\n\t\t);\n\n\t\texpect(html).toMatch(/<a [^>]*data-glyph-start/);\n\t\texpect(html).not.toMatch(/<a [^>]*data-glyph-end/);\n\t});\n\n\ttest(\"marks a trailing glyph after a label\", async () => {\n\t\tlet html = await renderToString(\n\t\t\t<LinkButton href=\"/next\">\n\t\t\t\tNext\n\t\t\t\t<svg />\n\t\t\t</LinkButton>,\n\t\t);\n\n\t\texpect(html).toMatch(/<a [^>]*data-glyph-end/);\n\t\texpect(html).not.toMatch(/<a [^>]*data-glyph-start/);\n\t});\n\n\ttest(\"draws a target-size box that holds however the anchor is positioned\", async () => {\n\t\tlet html = await renderToString(<LinkButton href=\"/new\">Create</LinkButton>);\n\n\t\texpect(html).toMatch(\n\t\t\t/&::after \\{[^}]*position: absolute;[^}]*inline-size: var\\(--ui-target-size, 1\\.5rem\\);/,\n\t\t);\n\t});\n\n\ttest(\"leaves prefetching off unless a mode is chosen\", async () => {\n\t\tlet html = await renderToString(<LinkButton href=\"/new\">Create</LinkButton>);\n\t\tlet none = await renderToString(\n\t\t\t<LinkButton href=\"/new\" prefetch=\"none\">\n\t\t\t\tCreate\n\t\t\t</LinkButton>,\n\t\t);\n\n\t\texpect(html).not.toContain(\"data-rmx-prefetch\");\n\t\texpect(none).not.toContain(\"data-rmx-prefetch\");\n\t\texpect(html).not.toContain(\"<link\");\n\t\texpect(none).not.toContain(\"<link\");\n\t});\n\n\ttest.each([\"intent\", \"viewport\"] as const)(\"prefetches on %s\", async (prefetch) => {\n\t\tlet html = await renderToString(\n\t\t\t<LinkButton href=\"/new\" prefetch={prefetch}>\n\t\t\t\tCreate\n\t\t\t</LinkButton>,\n\t\t);\n\n\t\texpect(html).toMatch(new RegExp(`<a [^>]*data-rmx-prefetch=\"${prefetch}\"`));\n\t\texpect(html).not.toContain(\"<link\");\n\t});\n\n\ttest(\"renders a prefetch hint after the anchor on render\", async () => {\n\t\tlet html = await renderToString(\n\t\t\t<LinkButton href=\"/new\" prefetch=\"render\">\n\t\t\t\tCreate\n\t\t\t</LinkButton>,\n\t\t);\n\n\t\texpect(html).toMatch(/Create<\\/a><link rel=\"prefetch\" href=\"\\/new\"/);\n\t\texpect(html).not.toContain(\"data-rmx-prefetch\");\n\t});\n\n\ttest(\"renders no prefetch hint without a destination\", async () => {\n\t\tlet html = await renderToString(<LinkButton prefetch=\"render\">Create</LinkButton>);\n\n\t\texpect(html).not.toContain(\"<link\");\n\t});\n});\n"
|
|
15
15
|
}
|
|
16
16
|
}
|
package/registry/ui/link.json
CHANGED
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "link",
|
|
3
|
-
"changedIn": "2026.10.
|
|
3
|
+
"changedIn": "2026.10.24",
|
|
4
4
|
"dependencies": [],
|
|
5
5
|
"exports": [
|
|
6
6
|
"Link"
|
|
7
7
|
],
|
|
8
8
|
"source": {
|
|
9
9
|
"path": "link.tsx",
|
|
10
|
-
"content": "/**\n * A native anchor for inline navigation, always underlined so its\n * affordance never rests on color alone, and colored through a semantic\n * color role that also drives its focus ring and disabled state.\n *\n * @author [Sergio Xalambrí](https://sergiodxa.com)\n * @copyright Sergio Xalambrí 2026\n */\n\nimport type { Handle, Props as TagProps } from \"remix/component\";\n\nimport { colorMix, fg, outline } from \"@sdxc/u/color\";\nimport { opacity, rounded } from \"@sdxc/u/effects\";\nimport { cursor, raw, var as varUtility } from \"@sdxc/u/general\";\nimport { data, when } from \"@sdxc/u/state\";\nimport { textDecoration } from \"@sdxc/u/typography\";\n\nimport type { SemanticColor } from \"@sdxc/ui/utils\";\n\nimport { interactiveTransition } from \"@sdxc/ui/styles\";\n\n/** Semantic color role {@link Link} falls back to when `color` is omitted. */\nconst DEFAULT_COLOR: Link.Color = \"brand\";\n\n/**\n * Prop types for {@link Link}.\n */\nexport namespace Link {\n\t/**\n\t * Semantic color role, each mapped to its matching `--ui-*` variables.\n\t */\n\texport type Color = SemanticColor;\n\n\t/**\n\t * Props accepted by {@link Link}. A type alias rather than an interface,\n\t * since the native anchor props resolve through a conditional type that an\n\t * `interface extends` clause can't statically extend.\n\t */\n\texport type Props = TagProps<\"a\"> & {\n\t\t/** Semantic color role. Defaults to {@link DEFAULT_COLOR}. */\n\t\tcolor?: Color;\n\t};\n}\n\n/**\n * Renders a native `<a>` host, colored through the `data-color` attribute\n * contract and underlined unconditionally. `aria-disabled=\"true\"` mutes the\n * link, but only removing or neutralizing `href` actually stops navigation.\n *\n * @param handle Runtime handle carrying the host `<a>`'s props.\n * @returns The render function producing the link's markup.\n * @example\n * <Link href=\"/about\">{t(\"nav.about\")}</Link>\n * @example\n * <Link href=\"/
|
|
10
|
+
"content": "/**\n * A native anchor for inline navigation, always underlined so its\n * affordance never rests on color alone, and colored through a semantic\n * color role that also drives its focus ring and disabled state.\n *\n * @author [Sergio Xalambrí](https://sergiodxa.com)\n * @copyright Sergio Xalambrí 2026\n */\n\nimport type { Handle, Props as TagProps } from \"remix/component\";\n\nimport { colorMix, fg, outline } from \"@sdxc/u/color\";\nimport { opacity, rounded } from \"@sdxc/u/effects\";\nimport { cursor, raw, var as varUtility } from \"@sdxc/u/general\";\nimport { data, when } from \"@sdxc/u/state\";\nimport { textDecoration } from \"@sdxc/u/typography\";\n\nimport type { LinkPrefetch } from \"@sdxc/ui/utils\";\nimport type { SemanticColor } from \"@sdxc/ui/utils\";\n\nimport { interactiveTransition } from \"@sdxc/ui/styles\";\nimport { prefetchAttribute, rendersPrefetchHint } from \"@sdxc/ui/utils\";\n\n/** Semantic color role {@link Link} falls back to when `color` is omitted. */\nconst DEFAULT_COLOR: Link.Color = \"brand\";\n\n/** Prefetch mode {@link Link} falls back to when `prefetch` is omitted. */\nconst DEFAULT_PREFETCH: Link.Prefetch = \"none\";\n\n/**\n * Prop types for {@link Link}.\n */\nexport namespace Link {\n\t/**\n\t * Semantic color role, each mapped to its matching `--ui-*` variables.\n\t */\n\texport type Color = SemanticColor;\n\n\t/**\n\t * When the destination starts loading: on intent, once in the viewport, on\n\t * render through a `<link rel=\"prefetch\">` that also serves full-document\n\t * navigations, or only on navigation (`\"none\"`).\n\t */\n\texport type Prefetch = LinkPrefetch;\n\n\t/**\n\t * Props accepted by {@link Link}. A type alias rather than an interface,\n\t * since the native anchor props resolve through a conditional type that an\n\t * `interface extends` clause can't statically extend.\n\t */\n\texport type Props = TagProps<\"a\"> & {\n\t\t/** Semantic color role. Defaults to {@link DEFAULT_COLOR}. */\n\t\tcolor?: Color;\n\t\t/**\n\t\t * Prefetch mode, for links whose GET is safe to repeat. `\"render\"` suits\n\t\t * multi-page navigations; a list keeps it to its first few items, since each\n\t\t * hint is a request on page load. Defaults to {@link DEFAULT_PREFETCH}.\n\t\t */\n\t\tprefetch?: Prefetch;\n\t};\n}\n\n/**\n * Renders a native `<a>` host, colored through the `data-color` attribute\n * contract and underlined unconditionally. `aria-disabled=\"true\"` mutes the\n * link, but only removing or neutralizing `href` actually stops navigation.\n *\n * @param handle Runtime handle carrying the host `<a>`'s props.\n * @returns The render function producing the link's markup.\n * @example\n * <Link href=\"/about\">{t(\"nav.about\")}</Link>\n * @example\n * <Link href=\"/products/shirt\" prefetch=\"render\">{t(\"products.shirt\")}</Link>\n * @example\n * <Link href=\"/settings\" aria-disabled=\"true\">{t(\"nav.settings\")}</Link>\n */\nexport function Link(handle: Handle<Link.Props>) {\n\treturn () => {\n\t\tlet { color, prefetch, mix, ...rest } = handle.props;\n\t\tlet resolvedColor = color ?? DEFAULT_COLOR;\n\t\tlet resolvedPrefetch = prefetch ?? DEFAULT_PREFETCH;\n\n\t\treturn (\n\t\t\t<>\n\t\t\t\t<a\n\t\t\t\t\tdata-color={resolvedColor}\n\t\t\t\t\tdata-rmx-prefetch={prefetchAttribute(resolvedPrefetch)}\n\t\t\t\t\t{...rest}\n\t\t\t\t\tmix={[\n\t\t\t\t\t\twhen(\"&:focus-visible\", [\n\t\t\t\t\t\t\toutline({ color: \"brand.ring\", offset: 2 }),\n\t\t\t\t\t\t\tdata(\"color\", \"neutral\", outline(\"neutral.ring\")),\n\t\t\t\t\t\t\tdata(\"color\", \"success\", outline(\"success.ring\")),\n\t\t\t\t\t\t\tdata(\"color\", \"warning\", outline(\"warning.ring\")),\n\t\t\t\t\t\t\tdata(\"color\", \"danger\", outline(\"danger.ring\")),\n\t\t\t\t\t\t]),\n\t\t\t\t\t\tinteractiveTransition(),\n\t\t\t\t\t\trounded(\"sm\"),\n\t\t\t\t\t\tdata(\"color\", \"brand\", fg(\"brand\")),\n\t\t\t\t\t\tdata(\"color\", \"neutral\", fg(\"neutral\")),\n\t\t\t\t\t\tdata(\"color\", \"success\", fg(\"success\")),\n\t\t\t\t\t\tdata(\"color\", \"danger\", fg(\"danger\")),\n\t\t\t\t\t\tdata(\"color\", \"warning\", fg(\"warning\")),\n\t\t\t\t\t\twhen('&[aria-disabled=\"true\"]', opacity(50)),\n\t\t\t\t\t\ttextDecoration(\"underline\"),\n\t\t\t\t\t\tcursor(\"pointer\"),\n\t\t\t\t\t\tdata(\"color\", \"brand\", [\n\t\t\t\t\t\t\t/**\n\t\t\t\t\t\t\t * `color-mix()`'s color argument needs the raw CSS variable\n\t\t\t\t\t\t\t * (`var(--ui-brand-fg)`), so the property stays `raw()` while\n\t\t\t\t\t\t\t * the literal string becomes a builder call.\n\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\traw({\n\t\t\t\t\t\t\t\ttextDecorationColor: colorMix(\n\t\t\t\t\t\t\t\t\t\"srgb\",\n\t\t\t\t\t\t\t\t\t{ color: varUtility(\"ui-brand-fg\"), weight: 60 },\n\t\t\t\t\t\t\t\t\t\"transparent\",\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\twhen(\"&:hover\", raw({ textDecorationColor: varUtility(\"ui-brand-fg\") })),\n\t\t\t\t\t\t]),\n\t\t\t\t\t\tdata(\"color\", \"neutral\", [\n\t\t\t\t\t\t\traw({\n\t\t\t\t\t\t\t\ttextDecorationColor: colorMix(\n\t\t\t\t\t\t\t\t\t\"srgb\",\n\t\t\t\t\t\t\t\t\t{ color: varUtility(\"ui-neutral-fg\"), weight: 50 },\n\t\t\t\t\t\t\t\t\t\"transparent\",\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\twhen(\"&:hover\", raw({ textDecorationColor: varUtility(\"ui-neutral-fg\") })),\n\t\t\t\t\t\t]),\n\t\t\t\t\t\tdata(\"color\", \"success\", [\n\t\t\t\t\t\t\traw({\n\t\t\t\t\t\t\t\ttextDecorationColor: colorMix(\n\t\t\t\t\t\t\t\t\t\"srgb\",\n\t\t\t\t\t\t\t\t\t{ color: varUtility(\"ui-success-fg\"), weight: 60 },\n\t\t\t\t\t\t\t\t\t\"transparent\",\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\twhen(\"&:hover\", raw({ textDecorationColor: varUtility(\"ui-success-fg\") })),\n\t\t\t\t\t\t]),\n\t\t\t\t\t\tdata(\"color\", \"danger\", [\n\t\t\t\t\t\t\traw({\n\t\t\t\t\t\t\t\ttextDecorationColor: colorMix(\n\t\t\t\t\t\t\t\t\t\"srgb\",\n\t\t\t\t\t\t\t\t\t{ color: varUtility(\"ui-danger-fg\"), weight: 60 },\n\t\t\t\t\t\t\t\t\t\"transparent\",\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\twhen(\"&:hover\", raw({ textDecorationColor: varUtility(\"ui-danger-fg\") })),\n\t\t\t\t\t\t]),\n\t\t\t\t\t\tdata(\"color\", \"warning\", [\n\t\t\t\t\t\t\traw({\n\t\t\t\t\t\t\t\ttextDecorationColor: colorMix(\n\t\t\t\t\t\t\t\t\t\"srgb\",\n\t\t\t\t\t\t\t\t\t{ color: varUtility(\"ui-warning-fg\"), weight: 60 },\n\t\t\t\t\t\t\t\t\t\"transparent\",\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\twhen(\"&:hover\", raw({ textDecorationColor: varUtility(\"ui-warning-fg\") })),\n\t\t\t\t\t\t]),\n\t\t\t\t\t\twhen('&[aria-disabled=\"true\"]', [cursor(\"not-allowed\"), textDecoration(\"none\")]),\n\t\t\t\t\t\tmix,\n\t\t\t\t\t]}\n\t\t\t\t/>\n\t\t\t\t{rendersPrefetchHint(resolvedPrefetch, rest.href) && (\n\t\t\t\t\t<link rel=\"prefetch\" href={rest.href} />\n\t\t\t\t)}\n\t\t\t</>\n\t\t);\n\t};\n}\n"
|
|
11
11
|
},
|
|
12
|
-
"test":
|
|
12
|
+
"test": {
|
|
13
|
+
"path": "link.test.tsx",
|
|
14
|
+
"content": "/**\n * Tests for {@link Link}: the anchor carries `data-rmx-prefetch` only for the\n * runtime's modes, and `\"render\"` adds a `<link rel=\"prefetch\">` after it instead.\n *\n * @author [Sergio Xalambrí](https://sergiodxa.com)\n * @copyright Sergio Xalambrí 2026\n */\n\nimport { renderToString } from \"remix/component/server\";\nimport { describe, expect, test } from \"vitest\";\n\nimport { Link } from \"@sdxc/ui/link\";\n\ndescribe(Link.name, () => {\n\ttest(\"leaves prefetching off unless a mode is chosen\", async () => {\n\t\tlet html = await renderToString(<Link href=\"/about\">About</Link>);\n\t\tlet none = await renderToString(\n\t\t\t<Link href=\"/about\" prefetch=\"none\">\n\t\t\t\tAbout\n\t\t\t</Link>,\n\t\t);\n\n\t\texpect(html).toMatch(/<a [^>]*href=\"\\/about\"[^>]*>About<\\/a>/);\n\t\texpect(html).not.toContain(\"data-rmx-prefetch\");\n\t\texpect(none).not.toContain(\"data-rmx-prefetch\");\n\t\texpect(html).not.toContain(\"<link\");\n\t\texpect(none).not.toContain(\"<link\");\n\t});\n\n\ttest.each([\"intent\", \"viewport\"] as const)(\"prefetches on %s\", async (prefetch) => {\n\t\tlet html = await renderToString(\n\t\t\t<Link href=\"/about\" prefetch={prefetch}>\n\t\t\t\tAbout\n\t\t\t</Link>,\n\t\t);\n\n\t\texpect(html).toMatch(new RegExp(`<a [^>]*data-rmx-prefetch=\"${prefetch}\"`));\n\t\texpect(html).not.toContain(\"<link\");\n\t});\n\n\ttest(\"renders a prefetch hint after the anchor on render\", async () => {\n\t\tlet html = await renderToString(\n\t\t\t<Link href=\"/about\" prefetch=\"render\">\n\t\t\t\tAbout\n\t\t\t</Link>,\n\t\t);\n\n\t\texpect(html).toMatch(/About<\\/a><link rel=\"prefetch\" href=\"\\/about\"/);\n\t\texpect(html).not.toContain(\"data-rmx-prefetch\");\n\t});\n\n\ttest(\"renders no prefetch hint without a destination\", async () => {\n\t\tlet html = await renderToString(<Link prefetch=\"render\">About</Link>);\n\n\t\texpect(html).not.toContain(\"<link\");\n\t});\n});\n"
|
|
15
|
+
}
|
|
13
16
|
}
|