@kayjs/kay 1.112.1 → 1.112.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/eslint.js +1 -1
- package/editors/zed/extension.toml +2 -2
- package/llms/navigation.md +1 -1
- package/llms/whats-new.md +4 -0
- package/package.json +6 -6
- package/src/server/new-tab.ts +1 -1
package/dist/eslint.js
CHANGED
|
@@ -25,7 +25,7 @@ var __esm = (fn, res, err) => () => {
|
|
|
25
25
|
};
|
|
26
26
|
|
|
27
27
|
// package.json
|
|
28
|
-
var version = "1.112.
|
|
28
|
+
var version = "1.112.2", peerDependencies;
|
|
29
29
|
var init_package = __esm(() => {
|
|
30
30
|
peerDependencies = {
|
|
31
31
|
"@happy-dom/global-registrator": "^20.14.6 || ^21.0.3",
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
id = "kay"
|
|
2
2
|
name = "Kay"
|
|
3
3
|
description = "Highlighting and the kay language server for .kay components"
|
|
4
|
-
version = "1.112.
|
|
4
|
+
version = "1.112.2"
|
|
5
5
|
schema_version = 1
|
|
6
6
|
authors = [ "Kaynooo" ]
|
|
7
7
|
repository = "https://github.com/Kayno0o/kayjs"
|
|
8
8
|
|
|
9
9
|
[grammars.kay]
|
|
10
10
|
repository = "https://github.com/Kayno0o/kayjs"
|
|
11
|
-
rev = "v1.112.
|
|
11
|
+
rev = "v1.112.2"
|
|
12
12
|
path = "editors/tree-sitter-kay"
|
|
13
13
|
|
|
14
14
|
[language_servers.kay]
|
package/llms/navigation.md
CHANGED
|
@@ -78,7 +78,7 @@ A handler of your own on Enter in a text field starts with `if (composing(event)
|
|
|
78
78
|
- After a swap the focus goes to the element the URL's `#fragment` points at, when the page has one (a section, or a link or field as it stands), its `tabindex="-1"` held only until it blurs, else to the page's `[autofocus]` field, heading or `main`; the new title is announced either way. Back and Forward to a position the entry saved leave the focus on the heading, as they leave the scroll.
|
|
79
79
|
- A link to the page being rendered gets `aria-current="page"`, which screen readers announce and a stylesheet can light up, `aria-[current=page]:font-bold` with Tailwind: an `a` whose `href` is a path of the site, a trailing slash or not, and holds no query or fragment.
|
|
80
80
|
- A link writing its own `aria-current` keeps it. The links of an island are marked in the server HTML the same way, and a swap keeping the island (`persist`) carries the next page's marks over to its links, matched by place and `href`; a link the island renders on its own after hydrating is its own to mark. A link marked with `section`, `a(href="/docs" section)`, or `section={isDocs}` for a boolean that decides it, also gets `aria-current="true"` on the pages below it (`/docs/guide`, not `/docs-old`), which a stylesheet lights up with `aria-[current=true]:font-bold`; the attribute is never written out, the site's home (`/` or a locale's own) is never marked that way, and it holds under `base`, `trailingSlash` and a locale prefix. A link not marked `section`, such as a pagination `prev` or a breadcrumb's parent, is lit on its own page only.
|
|
81
|
-
- A link whose `href` leaves the site gets `target="_blank" rel="noopener"`: in a template, an island, `renderMarkdown` and a collection's Markdown body, an absolute `http(s)` URL of another origin or one starting `//`, compared with the `site` origin on the server (with no `site`, any absolute `http(s)` link) and `location.origin` in an island. A relative or root-relative path, `#hash`, `mailto:`, `tel:` and a same-origin absolute link stay in the same tab, as does a link writing its own `target` (an empty one too, and a `target={expr}` even when it gives `undefined`: spread `{...cond ? { target: '_blank' } : {}}` instead); one writing its own `rel` keeps it. `client: { links: { outside: 'same-tab' } }` in `kay.config.ts` or `pages()` writes none. The swap never follows a link with a `target`, so it never meets one. `markdownHtml` (a user's text, server and island) does the same with `rel="nofollow ugc noopener"`. Each such link also gets `data-new-tab`, which a rule in the page's head (`a[data-new-tab]::after`) turns into a visually hidden "(opens in a new tab)" for screen readers, worded under `kay.link.newTab` ([Locales](locales-texts.md)); an app adds an icon with CSS on `a[data-new-tab]`.
|
|
81
|
+
- A link whose `href` leaves the site gets `target="_blank" rel="noopener"`: in a template, an island, `renderMarkdown` and a collection's Markdown body, an absolute `http(s)` URL of another origin or one starting `//`, compared with the `site` origin on the server (with no `site`, any absolute `http(s)` link) and `location.origin` in an island. A relative or root-relative path, `#hash`, `mailto:`, `tel:` and a same-origin absolute link stay in the same tab, as does a link writing its own `target` (an empty one too, and a `target={expr}` even when it gives `undefined`: spread `{...cond ? { target: '_blank' } : {}}` instead); one writing its own `rel` keeps it. `client: { links: { outside: 'same-tab' } }` in `kay.config.ts` or `pages()` writes none. The swap never follows a link with a `target`, so it never meets one. `markdownHtml` (a user's text, server and island) does the same with `rel="nofollow ugc noopener"`. Each such link also gets `data-new-tab`, which a rule in the page's head (`a[data-new-tab]::after`) turns into a visually hidden "(opens in a new tab)" for screen readers, pinned to a corner of its positioned ancestor so a clipped link never widens the page, worded under `kay.link.newTab` ([Locales](locales-texts.md)); an app adds an icon with CSS on `a[data-new-tab]`.
|
|
82
82
|
|
|
83
83
|
### Islands kept across pages
|
|
84
84
|
|
package/llms/whats-new.md
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
What each release of kay and its libraries adds, newest first, each feature with where it is documented. kay and its libraries share one version, so one section covers them all; what a release breaks is in [Upgrading](upgrading.md).
|
|
4
4
|
|
|
5
|
+
## 1.112.2
|
|
6
|
+
|
|
7
|
+
- An outside link that clips a long title (`truncate`) no longer widens the page: its hidden "(opens in a new tab)" label sits at a corner of its positioned ancestor rather than after the unclipped text ([navigation](navigation.md)).
|
|
8
|
+
|
|
5
9
|
## 1.112.1
|
|
6
10
|
|
|
7
11
|
- A page's `Table` that renders as plain markup passes `kay check` with its columns typed `Column<Row>[]` or holding a function `sortValue`, and renders: a use turning no interactive prop on sends nothing, so a function in the data it is given is called by the server and no `island-prop` ([islands](islands.md#make-a-component-interactive)).
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kayjs/kay",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.112.
|
|
4
|
+
"version": "1.112.2",
|
|
5
5
|
"description": "A Bun web framework: one .kay file per component, pages rendered to plain HTML on the server, interactive islands in the browser",
|
|
6
6
|
"author": "Kaynooo <https://github.com/Kayno0o>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -304,11 +304,11 @@
|
|
|
304
304
|
"@fontsource/inter": "^5.3.0",
|
|
305
305
|
"@happy-dom/global-registrator": "^21.0.4",
|
|
306
306
|
"@iconify-json/tabler": "^1.2.42",
|
|
307
|
-
"@kayjs/ai": "1.112.
|
|
308
|
-
"@kayjs/auth": "1.112.
|
|
309
|
-
"@kayjs/cms": "1.112.
|
|
310
|
-
"@kayjs/mail": "1.112.
|
|
311
|
-
"@kayjs/ui": "1.112.
|
|
307
|
+
"@kayjs/ai": "1.112.2",
|
|
308
|
+
"@kayjs/auth": "1.112.2",
|
|
309
|
+
"@kayjs/cms": "1.112.2",
|
|
310
|
+
"@kayjs/mail": "1.112.2",
|
|
311
|
+
"@kayjs/ui": "1.112.2",
|
|
312
312
|
"@kaynooo/eslint": "^8.0.3",
|
|
313
313
|
"@kaynooo/pg-orm": "^9.0.0",
|
|
314
314
|
"@oxc-parser/binding-wasm32-wasip1": "0.155.0",
|
package/src/server/new-tab.ts
CHANGED
|
@@ -9,7 +9,7 @@ const ESCAPED: Record<string, string> = { '\\': '\\\\', '"': '\\"', '<': '\\3C '
|
|
|
9
9
|
function styleOf(word: string): string {
|
|
10
10
|
const text = word.replace(CSS_SPECIALS, character => ESCAPED[character]!)
|
|
11
11
|
|
|
12
|
-
return `<style>a[${NEW_TAB_ATTRIBUTE}]::after{content:"${text}";position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}</style>`
|
|
12
|
+
return `<style>a[${NEW_TAB_ATTRIBUTE}]::after{content:"${text}";position:absolute;top:0;inset-inline-start:0;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}</style>`
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
// The rule saying aloud that a link kay opens in a new tab does: the text is the page's locale's `kay.link.newTab`, clipped out of sight as a screen reader still reads it. A page whose markup holds no such link, and whose islands and streamed parts can add none, goes without it.
|