@trebired/frontend 28.0.0 → 28.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (105) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/README.md +45 -1
  3. package/dist/indent/styles/index.scss +30 -0
  4. package/dist/inputs/advanced/input/styles/field.scss +2 -2
  5. package/dist/inputs/styles/field.scss +14 -3
  6. package/dist/language/messages.d.ts.map +1 -1
  7. package/dist/language/messages.js +8 -0
  8. package/dist/language/messages.js.map +1 -1
  9. package/dist/layout/components/site/header/groups.d.ts +42 -0
  10. package/dist/layout/components/site/header/groups.d.ts.map +1 -0
  11. package/dist/layout/components/site/header/groups.js +93 -0
  12. package/dist/layout/components/site/header/groups.js.map +1 -0
  13. package/dist/layout/components/site/header/search.d.ts +11 -0
  14. package/dist/layout/components/site/header/search.d.ts.map +1 -0
  15. package/dist/layout/components/site/header/search.js +81 -0
  16. package/dist/layout/components/site/header/search.js.map +1 -0
  17. package/dist/layout/components/site/header/sheet.d.ts +14 -0
  18. package/dist/layout/components/site/header/sheet.d.ts.map +1 -0
  19. package/dist/layout/components/site/header/sheet.js +88 -0
  20. package/dist/layout/components/site/header/sheet.js.map +1 -0
  21. package/dist/layout/components/site/header.d.ts +1 -0
  22. package/dist/layout/components/site/header.d.ts.map +1 -1
  23. package/dist/layout/components/site/header.js +28 -42
  24. package/dist/layout/components/site/header.js.map +1 -1
  25. package/dist/layout/components/site/link.d.ts +2 -0
  26. package/dist/layout/components/site/link.d.ts.map +1 -1
  27. package/dist/layout/components/site/link.js.map +1 -1
  28. package/dist/layout/styles/index.scss +1 -0
  29. package/dist/layout/styles/site/footer.scss +1 -1
  30. package/dist/layout/styles/site/header.scss +1 -3
  31. package/dist/layout/styles/site/menu.scss +17 -3
  32. package/dist/layout/styles/site/sheet.scss +191 -0
  33. package/dist/popover/index.d.ts.map +1 -1
  34. package/dist/popover/index.js +9 -4
  35. package/dist/popover/index.js.map +1 -1
  36. package/dist/popover/styles/index.scss +1 -1
  37. package/dist/primitives/styles/_link.scss +6 -2
  38. package/dist/search/site/build.d.ts +33 -0
  39. package/dist/search/site/build.d.ts.map +1 -0
  40. package/dist/search/site/build.js +27 -0
  41. package/dist/search/site/build.js.map +1 -0
  42. package/dist/search/site/extract.d.ts +13 -0
  43. package/dist/search/site/extract.d.ts.map +1 -0
  44. package/dist/search/site/extract.js +82 -0
  45. package/dist/search/site/extract.js.map +1 -0
  46. package/dist/search/site/load.d.ts +4 -0
  47. package/dist/search/site/load.d.ts.map +1 -0
  48. package/dist/search/site/load.js +25 -0
  49. package/dist/search/site/load.js.map +1 -0
  50. package/dist/search/site/query.d.ts +31 -0
  51. package/dist/search/site/query.d.ts.map +1 -0
  52. package/dist/search/site/query.js +125 -0
  53. package/dist/search/site/query.js.map +1 -0
  54. package/dist/server/index.d.ts +2 -0
  55. package/dist/server/index.d.ts.map +1 -1
  56. package/dist/server/index.js +1 -0
  57. package/dist/server/index.js.map +1 -1
  58. package/dist/src/language/messages.d.ts.map +1 -1
  59. package/dist/src/language/messages.js +8 -0
  60. package/dist/src/language/messages.js.map +1 -1
  61. package/dist/src/layout/components/site/header/groups.d.ts +42 -0
  62. package/dist/src/layout/components/site/header/groups.d.ts.map +1 -0
  63. package/dist/src/layout/components/site/header/groups.js +93 -0
  64. package/dist/src/layout/components/site/header/groups.js.map +1 -0
  65. package/dist/src/layout/components/site/header/search.d.ts +11 -0
  66. package/dist/src/layout/components/site/header/search.d.ts.map +1 -0
  67. package/dist/src/layout/components/site/header/search.js +81 -0
  68. package/dist/src/layout/components/site/header/search.js.map +1 -0
  69. package/dist/src/layout/components/site/header/sheet.d.ts +14 -0
  70. package/dist/src/layout/components/site/header/sheet.d.ts.map +1 -0
  71. package/dist/src/layout/components/site/header/sheet.js +88 -0
  72. package/dist/src/layout/components/site/header/sheet.js.map +1 -0
  73. package/dist/src/layout/components/site/header.d.ts +1 -0
  74. package/dist/src/layout/components/site/header.d.ts.map +1 -1
  75. package/dist/src/layout/components/site/header.js +28 -42
  76. package/dist/src/layout/components/site/header.js.map +1 -1
  77. package/dist/src/layout/components/site/link.d.ts +2 -0
  78. package/dist/src/layout/components/site/link.d.ts.map +1 -1
  79. package/dist/src/layout/components/site/link.js.map +1 -1
  80. package/dist/src/popover/index.d.ts.map +1 -1
  81. package/dist/src/popover/index.js +9 -4
  82. package/dist/src/popover/index.js.map +1 -1
  83. package/dist/src/search/site/build.d.ts +33 -0
  84. package/dist/src/search/site/build.d.ts.map +1 -0
  85. package/dist/src/search/site/build.js +27 -0
  86. package/dist/src/search/site/build.js.map +1 -0
  87. package/dist/src/search/site/extract.d.ts +13 -0
  88. package/dist/src/search/site/extract.d.ts.map +1 -0
  89. package/dist/src/search/site/extract.js +82 -0
  90. package/dist/src/search/site/extract.js.map +1 -0
  91. package/dist/src/search/site/load.d.ts +4 -0
  92. package/dist/src/search/site/load.d.ts.map +1 -0
  93. package/dist/src/search/site/load.js +25 -0
  94. package/dist/src/search/site/load.js.map +1 -0
  95. package/dist/src/search/site/query.d.ts +31 -0
  96. package/dist/src/search/site/query.d.ts.map +1 -0
  97. package/dist/src/search/site/query.js +125 -0
  98. package/dist/src/search/site/query.js.map +1 -0
  99. package/dist/src/server/index.d.ts +2 -0
  100. package/dist/src/server/index.d.ts.map +1 -1
  101. package/dist/src/server/index.js +1 -0
  102. package/dist/src/server/index.js.map +1 -1
  103. package/dist/styles/tokens.scss +1 -0
  104. package/dist/styles/utils/_tone.scss +2 -0
  105. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,24 @@
1
1
  # Changelog
2
2
 
3
+ ## 28.2.0
4
+
5
+ - Changed `SiteHeader` groups to open the header's sheet instead of a popover. The sheet is a band under the bar, as wide as the header, painted with the bar's surface and following its tone, with its content on the bar's gutter. It opens on hover and on press, closes when the pointer leaves the header, on a second press, on Escape, on a press or focus outside the header and when a link in it is chosen, and moves focus to its first link when opened from the keyboard. Its layout has no tokens and is the same in every application.
6
+ - Added nested groups and link descriptions. A group whose children are groups lays out in the sheet as columns, each under an `h5`; a link's `description` is printed as one line under its label. The mobile menu shows the same groups as disclosures with the same headings and without the descriptions.
7
+ - Added site search. `createSiteSearchIndex()` in `@trebired/frontend/server` reads each language's rendered pages into `tbf-search/<locale>.json` at build time, taking only the page's own content. A `SiteHeader` group with `search: true` shows a search field in its sheet and in the mobile menu; it loads the reader's language on first focus, matches every word ignoring accents and case, ranks titles over headings over text, links a heading match to its section and marks the matched words in a snippet. `SiteHeader` takes `lang` for the language it is rendered in.
8
+ - Changed the indent to fit its text. `typography.indent.size` and `flow` now name the step for body text under an `h2`; the indent scales by the size of the text it moves and by the square root of the size of the largest heading in its block, so small text under a small title steps in a little and a lead under a page title steps in more. The configuration is unchanged. Browsers that cannot divide lengths in `calc()` keep the fixed step.
9
+ - Fixed a group's label in the mobile menu standing out from the links around it. It was inset by its own padding and printed in the full text colour; it is now the same text link as every other entry, muted, on the same edge, with the same hover and active states.
10
+ - Added the tone's `ground`, the background of whatever tone region an element sits in: the page by default and the ink inside any dark region, set by `--tbf-dark-ground` when an application wants another. The site header, its sheet and mobile menu, the inverse footer and popovers paint with it, so chrome has no background system of its own; `components.shell.header.rootBgDark` is gone, and a dark header takes the ink like every dark band. A popover takes the tone of the element that opened it, so one opened from a dark header is dark although it is portaled out of it.
11
+ - Changed the sheet's columns to wrap at four per row, so a group of more than four groups fills rows instead of narrowing, and capped the sheet at the window's height, scrolling inside it, so a long one never runs past the screen. The sheet opens at its full height behind a wipe instead of growing from nothing, so no scrollbar flashes while it opens. A column's links stop at the height of four and scroll with the `tbf-scroll-min` scrollbar, so one long group no longer sets the height of its whole row.
12
+ - Changed a header group to never show as current. A group is a menu, not a page: it lights up when it is hovered or open, and a group holding every page no longer looks active on all of them.
13
+ - Changed the input to ease into focus. Its outline is always drawn, transparent at rest, so focus fades the ring in and settles it inward instead of snapping it on; border, background and colour changes ease the same way.
14
+ - Added `primitives.input.root.bg` and `primitives.input.root.border`. The input reads them before its defaults, so an application can give every input its own background and border from config.
15
+ - Changed a link whose page is current to light up a text link inside it, as hovering it already did.
16
+ - Fixed popovers placed partly off screen near the right edge. Placement measured the panel while its opening scale shrank it and against a viewport that included the scrollbar; it now uses the panel's layout size and the document's client width.
17
+
18
+ ## 28.1.0
19
+
20
+ - The indent reaches past documents. `typography.indent.flow` steps in every paragraph and quote that follows a heading among the same siblings, so a band, a card or a hero indents its text under its title the way a document section does without wearing a class. It is zero by default, which leaves every existing page as it was; set it to the indent step, `token.gap("md")`, to turn it on. Only text moves: a grid, a figure, a button or a wrapper after a heading stays on the heading's edge, a document, whose body already wears `tbf-indent`, is not indented twice, and centered text (`tbf-text-center`, a centered column, the error page) is left alone so it stays centered.
21
+
3
22
  ## 28.0.0
4
23
 
5
24
  **Breaking: a container class is emitted under `tbfm-`.** `containers: { card: … }` now writes `.tbfm-card`, `.tbfm-card__header` and `.tbfm-card--muted`. Two prefixes mark two kinds of ownership: `tbf-` is the package's own and closed to applications, while `tbfm-` is tbf-managed, named and owned by the application and only compiled by the package. A bare `.card` said neither, and sat in the global namespace where anything could collide with it. Container names in config stay bare, and may not start with either prefix.
package/README.md CHANGED
@@ -125,9 +125,26 @@ It returns `{ bootScripts, bodyScripts }`: the head scripts that restore the scr
125
125
  />
126
126
  ```
127
127
 
128
+ A link with `links` is a group. In the bar it is a button that opens the header's sheet: a band directly under the bar, as wide as the header, painted with the bar's own surface and tone, with its content on the same gutter as the bar. The sheet opens when the pointer rests on the group and on a press; it closes when the pointer leaves the header, on a second press, on Escape, on a press or focus outside the header, and when a link in it is chosen. Pressing a group from the keyboard moves focus to its first link, and Escape returns it to the group. Every group's links are in the server markup, hidden until their group opens.
129
+
130
+ A group whose children are groups lays out as columns, one per child, each under an `h5` that takes the page's own heading styles. A group of plain links lays out as a list. A link's `description` is one line printed under its label in the sheet. In the mobile menu the same group is a disclosure with the same headings and without the descriptions, so it stays a short list. A group with `search: true` puts the site search at the top of its section and of its mobile disclosure (see Site Search); `lang` on `SiteHeader` names the language the header is rendered in. Groups nest two levels deep and no further. The sheet has no tokens: its spacing, columns and motion are the same in every application, and its colours are the header's.
131
+
132
+ ```tsx
133
+ links={[
134
+ { href: "/blog", label: "Blog" },
135
+ {
136
+ label: "Resources",
137
+ links: [
138
+ { label: "Organization", links: [{ description: "Why the organization exists", href: "/about", label: "About" }] },
139
+ { label: "Help", links: [{ description: "How to report a vulnerability", href: "/security", label: "Security" }] },
140
+ ],
141
+ },
142
+ ]}
143
+ ```
144
+
128
145
  A header with no links and no `menuActions` has no toggle and keeps its actions visible on a phone. `menuActions` replaces `actions` inside the menu when the two should differ, `menuIcon` and `closeIcon` replace the built-in burger, and `softRedirect` marks the links for soft navigation.
129
146
 
130
- The header takes the tone of whatever is behind it, and it knows which that is before the first paint. `frontendBoot()` adds the script that does it: it runs with the document parsed, finds the band under the bar among `main`'s own children and the site footer, and marks the header `data-tbf-dark` when that band declares itself dark, which is the same marker a dark band, an inverse footer or a dark card carries. After that it follows scrolling, resizing, `pageshow` and soft navigation. There is nothing to configure and nothing per page: a page that wants a dark bar under it says so on the band, once, the way it already says it for everything else inside it.
147
+ The header takes the tone of whatever is behind it, and it knows which that is before the first paint. `frontendBoot()` adds the script that does it: it runs with the document parsed, finds the band under the bar among `main`'s own children and the site footer, and marks the header `data-tbf-dark` when that band declares itself dark, which is the same marker a dark band, an inverse footer or a dark card carries. After that it follows scrolling, resizing, `pageshow` and soft navigation. There is nothing to configure and nothing per page: a page that wants a dark bar under it says so on the band, once, the way it already says it for everything else inside it. The header has no colours of its own for this: it paints with the tone's `ground`, the background every tone region carries (the page in a light region, the ink in a dark one), and its sheet, its mobile menu and every popover it opens paint with the same `ground`, so they all change together.
131
148
 
132
149
  The header is the hydration root, so it renders itself as the `<header>` element. Server markup wraps it with `siteHeaderRootHtml(html)`, which the client hydrates through `SITE_HEADER_ROOT_SELECTOR`; the wrapper is `display: contents`, so the header still sticks to the viewport.
133
150
 
@@ -135,6 +152,27 @@ Colors, fonts, borders and spacing are tokens under `components.shell.header`: `
135
152
 
136
153
  `tone` is the crossfade: `duration` and `easing`, 320ms by default, for the moment the bar changes tone as a band scrolls under it. The first paint never uses it, because the tone is decided before it. A soft navigation does not cross-fade either: `<html>` carries `data-tbf-page-swap` for the frame the page is replaced in, which holds every transition and animation at 1ms, so chrome arrives in the new page's colours instead of sliding into them while the reader is already looking at a different page.
137
154
 
155
+ ### Site Search
156
+
157
+ Site search finds any page of a static site by its words, with no server. The package owns the whole job: reading the rendered pages into an index at build time, loading the index in the browser, matching, ranking and showing the results. The application owns which pages exist and their titles, and it writes the files the package returns.
158
+
159
+ At build time, `createSiteSearchIndex()` from `@trebired/frontend/server` takes the same per-language bodies and metadata an application already renders for its shells and returns one file per language, `tbf-search/<locale>.json`:
160
+
161
+ ```ts
162
+ import { createSiteSearchIndex } from "@trebired/frontend/server";
163
+
164
+ for (const file of createSiteSearchIndex({
165
+ locales: ["en", "cs"],
166
+ meta: (path, locale) => ({ description: descriptionOf(path, locale), title: titleOf(path, locale) }),
167
+ paths: allRoutePaths,
168
+ render: (path, locale) => bodies[path][locale],
169
+ })) await Bun.write(`${outDir}/${file.path}`, file.contents);
170
+ ```
171
+
172
+ Only the page's own content is read: the inside of `<main>` when the page has one, without scripts, SVG, buttons, form controls, and anything `hidden`, `inert` or `aria-hidden`, so decorative duplicates and the header and footer every page shares never match. Headings up to `h4` are kept as sections, with their `id` when they have one.
173
+
174
+ In the browser the search lives in the site header: a group with `search: true` shows the field. The index for the reader's current language is fetched the first time the field is focused, once, and only that language is searched. Every word of the query has to match; accents and case are ignored, so "prirucka" finds "Příručka". Titles outrank section headings, which outrank descriptions and body text. A result whose best match is a heading with an `id` opens that section. Each result shows a snippet with the matched words marked. Enter opens the first result, the arrow keys move between results, and Escape clears the query before it closes the header's sheet. The field's label, placeholder and messages come from the package in the header's `lang`.
175
+
138
176
  ### Prose Text
139
177
 
140
178
  `ProseText` renders a plain string in which a marked span becomes a `TextLink`, so copy kept as strings can point at another page without becoming markup. It takes `text` and an optional `softRedirect`.
@@ -342,6 +380,12 @@ Static icon mode uses `registerStaticIcons()` in the browser. Missing cached ico
342
380
 
343
381
  `bindFrontendRuntime` binds graphs, logs, code blocks, editors, fullscreen targets, source-language breakdowns and live cards and lists only when a bound root carries their markup, and imports each system the first time it does. Each system is its own chunk: a page without a graph never downloads Chart.js, and a page without logs never downloads the log viewer or the socket client. Binding these systems is asynchronous; everything else binds synchronously as before.
344
382
 
383
+ ### Indented Flow
384
+
385
+ `typography.indent.flow` indents paragraphs and quotes that follow a heading among the same siblings, by the given step; it is zero by default. Set it once in the components config and every heading in the application carries its text one step in, without a class on any component. Structure decides what moves: text that is a sibling after a heading moves, everything else stays on the heading's edge.
386
+
387
+ The step is not a fixed distance. `flow` and `size` name the indent for body text under an `h2`, and the package scales it to what it moves: by the size of the indented text against the root size, and by the square root of the size of the largest heading in the same block against an `h2`. A list of small links under an `h5` steps in a little; a lead under a page title steps in more. The heading sizes are the `typography` heading tokens, so a heading restyled by a class still counts as its level. Browsers that cannot divide lengths in `calc()` use the configured step as it is.
388
+
345
389
  ### Island Preparation
346
390
 
347
391
  `mountLiveIsland({ prepare })` awaits `prepare` before the island renders or hydrates, on the first mount and on every remount after a soft navigation. It receives `url`, the address the island is about to render: during a soft navigation that is the target, which the browser history does not show until the new content is in place, so read the route from `url` rather than from `location`. Load what the island renders there, such as the page module of the current route, and the server markup hydrates against it without a mismatch.
@@ -4,6 +4,14 @@
4
4
  @return var(#{ns.css-var("typography-indent-" + $name)}, $fallback);
5
5
  }
6
6
 
7
+ $reference: var(#{ns.css-var("h2-font-size")}, 1.8rem);
8
+
9
+ $title: var(#{ns.css-var("indent-title")}, #{$reference});
10
+
11
+ @function scaled($step) {
12
+ @return calc(#{$step} * (1em / 1rem) * sqrt(#{$title} / #{$reference}));
13
+ }
14
+
7
15
  #{ns.class("indent")} {
8
16
  padding-inline-start: token("size", var(#{ns.css-var("gap-md")}, 24px));
9
17
  }
@@ -14,3 +22,25 @@
14
22
  var(#{ns.css-var("border-width")}, 1px) solid var(#{ns.css-var("border")}, currentColor)
15
23
  );
16
24
  }
25
+
26
+ $centered: "#{ns.class("text-center")}, #{ns.class("center")}, #{ns.class("error-page__body")}";
27
+
28
+ :where(h1, h2, h3, h4, h5, h6) ~ :where(p, blockquote):not(:where(#{$centered}, #{$centered} *)) {
29
+ padding-inline-start: token("flow", 0px);
30
+ }
31
+
32
+ @each $level in 6, 5, 4, 3, 2, 1 {
33
+ :where(:has(> h#{$level})) {
34
+ #{ns.css-var("indent-title")}: var(#{ns.css-var("h#{$level}-font-size")}, #{$reference});
35
+ }
36
+ }
37
+
38
+ @supports (width: calc(1px * sqrt(1em / 1rem))) {
39
+ #{ns.class("indent")} {
40
+ padding-inline-start: scaled(token("size", var(#{ns.css-var("gap-md")}, 24px)));
41
+ }
42
+
43
+ :where(h1, h2, h3, h4, h5, h6) ~ :where(p, blockquote):not(:where(#{$centered}, #{$centered} *)) {
44
+ padding-inline-start: scaled(token("flow", 0px));
45
+ }
46
+ }
@@ -84,8 +84,8 @@ $frontend-input-tones: (
84
84
  @include component-scroll-min;
85
85
  padding: var(#{ns.css-var("ui-input-root-padding")}, 7px 9px);
86
86
  border-radius: var(--radius-sm);
87
- border: $classic-field-border;
88
- background: var(--background-surface-1);
87
+ border: var(#{ns.css-var("ui-input-root-border")}, $classic-field-border);
88
+ background: var(#{ns.css-var("ui-input-root-bg")}, var(--background-surface-1));
89
89
  color: var(--text-color);
90
90
  font-size: var(#{ns.css-var("ui-input-root-font-size")}, 14px);
91
91
  outline: var(--border-width) solid transparent;
@@ -3,13 +3,24 @@
3
3
  min-height: 36px;
4
4
  box-sizing: border-box;
5
5
  padding: 0 10px;
6
- border: var(#{ns.css-var("border-width")}, 1px) solid var(#{ns.css-var("border")}, #000);
6
+ border: var(
7
+ #{ns.css-var("ui-input-root-border")},
8
+ var(#{ns.css-var("border-width")}, 1px) solid var(#{ns.css-var("border")}, #000)
9
+ );
7
10
  border-radius: var(#{ns.css-var("radius-sm")}, 0);
8
11
  color: var(#{ns.css-var("text")}, #000);
9
- background: var(#{ns.css-var("surface")}, #fff);
12
+ background: var(#{ns.css-var("ui-input-root-bg")}, var(#{ns.css-var("surface")}, #fff));
13
+ outline: var(#{ns.css-var("border-width")}, 1px) solid transparent;
14
+ outline-offset: 5px;
15
+ transition:
16
+ color var(#{ns.css-var("tone-change")}),
17
+ background-color var(#{ns.css-var("transition-fast")}, 180ms) ease,
18
+ border-color var(#{ns.css-var("transition-fast")}, 180ms) ease,
19
+ outline-color var(#{ns.css-var("transition-fast")}, 180ms) ease,
20
+ outline-offset var(#{ns.css-var("transition-fast")}, 180ms) ease;
10
21
  }
11
22
 
12
23
  #{ns.class("input")}:focus-visible {
13
- outline: var(#{ns.css-var("border-width")}, 1px) solid var(#{ns.css-var("focus")}, #000);
24
+ outline-color: var(#{ns.css-var("focus")}, #000);
14
25
  outline-offset: 2px;
15
26
  }
@@ -1 +1 @@
1
- {"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../../src/language/messages.ts"],"names":[],"mappings":"AAEA,KAAK,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AA+L3C,iBAAS,eAAe,CAAC,KAAK,EAAE,OAAO,eAItC;AAED,iBAAS,qBAAqB,CAC5B,GAAG,EAAE,MAAM,EACX,IAAI,CAAC,EAAE,MAAM,EACb,IAAI,CAAC,EAAE,WAAW,UAKnB;AAED,iBAAS,gBAAgB,gBAGxB;AAED,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,qBAAqB,EAAE,CAAC;AACpE,YAAY,EAAE,WAAW,EAAE,CAAC"}
1
+ {"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../../src/language/messages.ts"],"names":[],"mappings":"AAEA,KAAK,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAuM3C,iBAAS,eAAe,CAAC,KAAK,EAAE,OAAO,eAItC;AAED,iBAAS,qBAAqB,CAC5B,GAAG,EAAE,MAAM,EACX,IAAI,CAAC,EAAE,MAAM,EACb,IAAI,CAAC,EAAE,WAAW,UAKnB;AAED,iBAAS,gBAAgB,gBAGxB;AAED,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,qBAAqB,EAAE,CAAC;AACpE,YAAY,EAAE,WAAW,EAAE,CAAC"}
@@ -85,6 +85,10 @@ const EN_MESSAGES = {
85
85
  totalSizeLabel: "Total size:",
86
86
  unknown: "Unknown",
87
87
  unknownLanguage: "Unknown",
88
+ siteSearchEmpty: "Nothing on this site matches “{{query}}”.",
89
+ siteSearchFailed: "Search is not available right now.",
90
+ siteSearchLabel: "Search this site",
91
+ siteSearchPlaceholder: "Search every page",
88
92
  };
89
93
  const CS_MESSAGES = {
90
94
  a11yContrastDescription: "Nejvyšší možný kontrast mezi textem, okraji a stránkou.",
@@ -172,6 +176,10 @@ const CS_MESSAGES = {
172
176
  totalSizeLabel: "Celkova velikost:",
173
177
  unknown: "Neznamy",
174
178
  unknownLanguage: "Nezname",
179
+ siteSearchEmpty: "Na tomto webu nic neodpovídá „{{query}}“.",
180
+ siteSearchFailed: "Hledání teď není dostupné.",
181
+ siteSearchLabel: "Hledat na webu",
182
+ siteSearchPlaceholder: "Hledat na všech stránkách",
175
183
  };
176
184
  const MESSAGE_TABLES = {
177
185
  cs: CS_MESSAGES,
@@ -1 +1 @@
1
- {"version":3,"file":"messages.js","sourceRoot":"","sources":["../../../src/language/messages.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,IAAI,WAAW,EAAE,MAAM,eAAe,CAAC;AAMlE,MAAM,WAAW,GAAqB;IACpC,uBAAuB,EAAE,sDAAsD;IAC/E,iBAAiB,EAAE,UAAU;IAC7B,iBAAiB,EAAE,eAAe;IAClC,cAAc,EAAE,iBAAiB;IACjC,gBAAgB,EAAE,eAAe;IACjC,gBAAgB,EAAE,kBAAkB;IACpC,eAAe,EAAE,WAAW;IAC5B,cAAc,EA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AAC,CAAC;AACxE,CAAC;AAED,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,qBAAqB,EAAE,CAAC"}
@@ -0,0 +1,42 @@
1
+ import { type SiteLink } from "./../link.js";
2
+ import type { SiteHeaderSheet } from "./sheet.js";
3
+ type LinkRenderProps = {
4
+ currentPaths: string[];
5
+ currentUrl: string;
6
+ hasSection: boolean;
7
+ lang?: string;
8
+ onNavigate?: () => void;
9
+ section: string;
10
+ softRedirect?: boolean;
11
+ tabIndex?: number;
12
+ };
13
+ type GroupProps = LinkRenderProps & {
14
+ link: SiteLink;
15
+ };
16
+ type SheetProps = {
17
+ sheet: SiteHeaderSheet;
18
+ sheetId: string;
19
+ };
20
+ declare function useSiteLinkState(links: SiteLink[]): {
21
+ currentPaths: string[];
22
+ currentUrl: string;
23
+ hasSection: boolean;
24
+ section: string;
25
+ };
26
+ declare function SiteHeaderAnchor(props: LinkRenderProps & {
27
+ className?: string;
28
+ link: SiteLink;
29
+ plain?: boolean;
30
+ }): import("react").JSX.Element;
31
+ declare function SiteHeaderNavTrigger(props: GroupProps & SheetProps & {
32
+ index: number;
33
+ }): import("react").JSX.Element;
34
+ declare function SiteHeaderSheetPanel(props: SheetProps & {
35
+ lang?: string;
36
+ links: SiteLink[];
37
+ softRedirect?: boolean;
38
+ }): import("react").JSX.Element;
39
+ declare function SiteHeaderMenuGroup(props: GroupProps): import("react").JSX.Element;
40
+ export { SiteHeaderAnchor, SiteHeaderMenuGroup, SiteHeaderNavTrigger, SiteHeaderSheetPanel, useSiteLinkState };
41
+ export type { LinkRenderProps, SheetProps };
42
+ //# sourceMappingURL=groups.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"groups.d.ts","sourceRoot":"","sources":["../../../../../../src/layout/components/site/header/groups.tsx"],"names":[],"mappings":"AAKA,OAAO,EASL,KAAK,QAAQ,EACd,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAGlD,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{ createElement as _createElement } from "react";
2
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
+ import { useEffect, useId, useSyncExternalStore } from "react";
4
+ import { Disclosure, DisclosureButton } from "./../../../../inputs/components/disclosure.js";
5
+ import { frontendClassName, frontendDataAttrs, frontendElementClass } from "../../../../namespace/index.js";
6
+ import { useRenderCurrentUrl } from "./../../../../render/current_url.js";
7
+ import { activeSection, observeSections, serverActiveSection, subscribeActiveSection } from "./../section_spy.js";
8
+ import { isSiteLinkActive, isSiteLinkGroup, SiteLinkAnchor, siteLinkChildren, siteLinkFragment, siteLinkKey, siteLinkOnCurrentPage, sitePathForms, } from "./../link.js";
9
+ import { SiteHeaderSearch } from "./search.js";
10
+ const block = "site-header";
11
+ function siteLinkLeaves(links) {
12
+ return links.flatMap((link) => (isSiteLinkGroup(link) ? siteLinkLeaves(siteLinkChildren(link)) : [link]));
13
+ }
14
+ function useSiteLinkState(links) {
15
+ const currentUrl = useRenderCurrentUrl();
16
+ const currentPaths = sitePathForms(currentUrl);
17
+ const fragments = siteLinkLeaves(links)
18
+ .filter((link) => siteLinkFragment(link) && siteLinkOnCurrentPage(link, currentPaths))
19
+ .map((link) => siteLinkFragment(link));
20
+ const fragmentKey = fragments.join("|");
21
+ useEffect(() => {
22
+ observeSections(fragmentKey ? fragmentKey.split("|") : []);
23
+ }, [fragmentKey]);
24
+ const section = useSyncExternalStore(subscribeActiveSection, activeSection, serverActiveSection);
25
+ return { currentPaths, currentUrl, hasSection: fragments.length > 0, section };
26
+ }
27
+ function SiteHeaderAnchor(props) {
28
+ const { className, currentPaths, hasSection, link, section } = props;
29
+ return (_jsx(SiteLinkAnchor, { active: isSiteLinkActive(link, currentPaths, section, hasSection, props.currentUrl), className: className, link: link, onNavigate: props.onNavigate, plain: props.plain, softRedirect: props.softRedirect, tabIndex: props.tabIndex }));
30
+ }
31
+ function SiteHeaderNavTrigger(props) {
32
+ const { link, sheet } = props;
33
+ const key = String(props.index);
34
+ return (_jsxs("button", { "aria-controls": `${props.sheetId}_${key}`, "aria-expanded": sheet.open === key, className: frontendElementClass(block, "nav-trigger"), onClick: (event) => sheet.toggle(key, event.detail === 0), onPointerEnter: (event) => {
35
+ if (event.pointerType === "mouse")
36
+ sheet.hover(key);
37
+ }, tabIndex: props.tabIndex, type: "button", ...frontendDataAttrs({ "site-header-trigger": key }), children: [_jsx("span", { className: frontendClassName("text-link"), children: link.label }), _jsx("span", { "aria-hidden": "true", className: frontendElementClass(block, "nav-chevron") })] }));
38
+ }
39
+ function SheetEntry(props) {
40
+ const { link } = props;
41
+ const description = link.description === undefined ? null : (_jsx("span", { className: frontendElementClass(block, "sheet-description"), children: link.description }));
42
+ const label = (_jsxs(_Fragment, { children: [_jsx("span", { className: frontendClassName("text-link"), children: link.label }), description] }));
43
+ return _jsx(SiteHeaderAnchor, { ...props, plain: true, className: frontendElementClass(block, "sheet-entry"), link: { ...link, label } });
44
+ }
45
+ function SheetColumn(props) {
46
+ const headingId = `${useId().replace(/:/gu, "")}_sheet_heading`;
47
+ return (_jsxs("div", { "aria-labelledby": headingId, className: frontendElementClass(block, "sheet-column"), role: "group", children: [_jsx("h5", { className: frontendElementClass(block, "sheet-heading"), id: headingId, children: props.link.label }), _jsx("div", { className: `${frontendElementClass(block, "sheet-links")} ${frontendClassName("scroll-min")}`, children: siteLinkChildren(props.link).map((child, index) => _createElement(SheetEntry, { ...props, key: siteLinkKey(child, index), link: child })) })] }));
48
+ }
49
+ function SheetGrid(props) {
50
+ const children = siteLinkChildren(props.link);
51
+ const columns = children.some(isSiteLinkGroup);
52
+ return (_jsx("div", { className: frontendElementClass(block, "sheet-grid"), ...frontendDataAttrs({ "site-header-layout": columns ? "columns" : "list" }), children: children.map((child, index) => {
53
+ const key = siteLinkKey(child, index);
54
+ if (isSiteLinkGroup(child))
55
+ return _createElement(SheetColumn, { ...props, key: key, link: child });
56
+ return _createElement(SheetEntry, { ...props, key: key, link: child });
57
+ }) }));
58
+ }
59
+ function SheetSection(props) {
60
+ const grid = _jsx(SheetGrid, { ...props });
61
+ return (_jsx("div", { className: frontendElementClass(block, "sheet-section"), hidden: props.hidden, id: props.id, ...frontendDataAttrs({ "site-header-section": props.sectionKey }), children: props.link.search ? (_jsx(SiteHeaderSearch, { lang: props.lang, onNavigate: props.onNavigate, softRedirect: props.softRedirect, children: grid })) : grid }));
62
+ }
63
+ function SiteHeaderSheetPanel(props) {
64
+ const { links, sheet, sheetId } = props;
65
+ const state = useSiteLinkState(links);
66
+ const groups = links.map((link, index) => ({ index, link })).filter(({ link }) => isSiteLinkGroup(link));
67
+ if (!groups.length)
68
+ return null;
69
+ const open = Boolean(sheet.open);
70
+ return (_jsx("div", { "aria-hidden": !open, className: frontendElementClass(block, "sheet"), inert: !open, onPointerEnter: sheet.stay, ...frontendDataAttrs({ "site-header-sheet": open ? "open" : "closed" }), children: _jsx("div", { className: `${frontendElementClass(block, "sheet-body")} ${frontendClassName("scroll-min")}`, children: _jsx("div", { className: frontendElementClass(block, "sheet-content"), children: groups.map(({ index, link }) => (_createElement(SheetSection, { ...state, hidden: sheet.current !== String(index), id: `${sheetId}_${index}`, key: siteLinkKey(link, index), lang: props.lang, link: link, onNavigate: sheet.close, sectionKey: String(index), softRedirect: props.softRedirect }))) }) }) }));
71
+ }
72
+ function SiteHeaderChevron() {
73
+ return _jsx("span", { "aria-hidden": "true", className: frontendElementClass(block, "menu-group-chevron") });
74
+ }
75
+ function MenuSection(props) {
76
+ return (_jsxs("div", { className: frontendElementClass(block, "menu-section"), children: [_jsx("h5", { className: frontendElementClass(block, "menu-section-heading"), children: props.link.label }), _jsx("div", { className: frontendElementClass(block, "menu-section-links"), children: siteLinkChildren(props.link).map((child, index) => (_createElement(SiteHeaderAnchor, { ...props, key: siteLinkKey(child, index), link: child }))) })] }));
77
+ }
78
+ function MenuGroupLinks(props) {
79
+ const links = (_jsx("div", { className: frontendElementClass(block, "menu-group-links"), children: siteLinkChildren(props.link).map((child, index) => {
80
+ const key = siteLinkKey(child, index);
81
+ if (isSiteLinkGroup(child))
82
+ return _createElement(MenuSection, { ...props, key: key, link: child });
83
+ return _createElement(SiteHeaderAnchor, { ...props, key: key, link: child });
84
+ }) }));
85
+ if (!props.link.search)
86
+ return links;
87
+ return _jsx(SiteHeaderSearch, { lang: props.lang, onNavigate: props.onNavigate, softRedirect: props.softRedirect, children: links });
88
+ }
89
+ function SiteHeaderMenuGroup(props) {
90
+ return (_jsx(Disclosure, { className: frontendElementClass(block, "menu-group"), panel: _jsx(MenuGroupLinks, { ...props }), trigger: _jsxs(DisclosureButton, { className: frontendElementClass(block, "menu-group-label"), children: [_jsx("span", { className: frontendClassName("text-link"), children: props.link.label }), _jsx(SiteHeaderChevron, {})] }) }));
91
+ }
92
+ export { SiteHeaderAnchor, SiteHeaderMenuGroup, SiteHeaderNavTrigger, SiteHeaderSheetPanel, useSiteLinkState };
93
+ //# sourceMappingURL=groups.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"groups.js","sourceRoot":"","sources":["../../../../../../src/layout/components/site/header/groups.tsx"],"names":[],"mappings":";;AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,oBAAoB,EAAE,MAAM,OAAO,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,+CAA+C,CAAC;AAC7F,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAC3F,OAAO,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAC1E,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAClH,OAAO,EACL,gBAAgB,EAChB,eAAe,EACf,cAAc,EACd,gBAAgB,EAChB,gBAAgB,EAChB,WAAW,EACX,qBAAqB,EACrB,aAAa,GAEd,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;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AAoB,EAAE,gBAAgB,EAAE,CAAC"}
@@ -0,0 +1,11 @@
1
+ import type { ReactNode } from "react";
2
+ type SiteHeaderSearchProps = {
3
+ children?: ReactNode;
4
+ lang?: string;
5
+ onNavigate?: () => void;
6
+ softRedirect?: boolean;
7
+ };
8
+ declare function SiteHeaderSearch(props: SiteHeaderSearchProps): import("react").JSX.Element;
9
+ export { SiteHeaderSearch };
10
+ export type { SiteHeaderSearchProps };
11
+ //# sourceMappingURL=search.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../../../../../../src/layout/components/site/header/search.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAiB,SAAS,EAAE,MAAM,OAAO,CAAC;AAYtD,KAAK,qBAAqB,GAAG;IAC3B,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB,CAAC;AAsFF,iBAAS,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,+BAyCrD;AAED,OAAO,EAAE,gBAAgB,EAAE,CAAC;AAC5B,YAAY,EAAE,qBAAqB,EAAE,CAAC"}
@@ -0,0 +1,81 @@
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useEffect, useId, useRef, useState } from "react";
3
+ import { frontendClassName, frontendElementClass } from "../../../../namespace/index.js";
4
+ import { normalizeLocale, sourceLanguageMessage } from "./../../../../language/messages.js";
5
+ import { loadSiteSearch } from "./../../../../search/site/load.js";
6
+ import { searchSite } from "./../../../../search/site/query.js";
7
+ import { SiteLinkAnchor } from "./../link.js";
8
+ const block = "site-header";
9
+ const DEBOUNCE = 90;
10
+ function useSiteSearch(query, locale) {
11
+ const [state, setState] = useState({ hits: [], status: "idle" });
12
+ useEffect(() => {
13
+ const value = query.trim();
14
+ if (!value) {
15
+ setState({ hits: [], status: "idle" });
16
+ return undefined;
17
+ }
18
+ let live = true;
19
+ const timer = window.setTimeout(() => {
20
+ setState((current) => (current.status === "ready" ? current : { ...current, status: "loading" }));
21
+ loadSiteSearch(locale).then((pages) => live && setState({ hits: searchSite(pages, value), status: "ready" }), () => live && setState({ hits: [], status: "failed" }));
22
+ }, DEBOUNCE);
23
+ return () => {
24
+ live = false;
25
+ window.clearTimeout(timer);
26
+ };
27
+ }, [locale, query]);
28
+ return state;
29
+ }
30
+ function moveFocus(list, input, event) {
31
+ const links = [...(list?.querySelectorAll("a[href]") || [])];
32
+ const index = links.indexOf(document.activeElement);
33
+ if (event.key === "ArrowDown")
34
+ links[Math.min(links.length - 1, index + 1)]?.focus();
35
+ else if (event.key === "ArrowUp" && index <= 0)
36
+ input?.focus();
37
+ else if (event.key === "ArrowUp")
38
+ links[index - 1]?.focus();
39
+ else
40
+ return;
41
+ event.preventDefault();
42
+ }
43
+ function HitLink(props) {
44
+ const { hit } = props;
45
+ const title = hit.section && hit.section.title !== hit.title ? `${hit.title} · ${hit.section.title}` : hit.title;
46
+ const label = (_jsxs(_Fragment, { children: [_jsx("span", { className: frontendClassName("text-link"), children: title }), _jsx("span", { className: frontendElementClass(block, "sheet-description"), children: hit.snippet.map((part, index) => (part.mark ? _jsx("mark", { children: part.text }, index) : part.text)) })] }));
47
+ return (_jsx(SiteLinkAnchor, { className: frontendElementClass(block, "sheet-entry"), link: { href: hit.href, label }, onNavigate: props.onNavigate, plain: true, softRedirect: props.softRedirect }));
48
+ }
49
+ function SearchResults(props) {
50
+ const listRef = useRef(null);
51
+ const { hits, status } = props.state;
52
+ const say = (key) => sourceLanguageMessage(key, props.locale, { query: props.query.trim() });
53
+ const note = status === "failed" ? say("siteSearchFailed") : status === "ready" && !hits.length ? say("siteSearchEmpty") : "";
54
+ return (_jsxs("div", { "aria-live": "polite", className: frontendElementClass(block, "search-results"), children: [note ? _jsx("p", { className: frontendElementClass(block, "sheet-description"), children: note }) : null, hits.length ? (_jsx("ol", { className: frontendElementClass(block, "search-list"), onKeyDown: (event) => moveFocus(listRef.current, props.input, event), ref: listRef, children: hits.map((hit) => (_jsx("li", { children: _jsx(HitLink, { hit: hit, onNavigate: props.onNavigate, softRedirect: props.softRedirect }) }, hit.href))) })) : null] }));
55
+ }
56
+ function SiteHeaderSearch(props) {
57
+ const locale = normalizeLocale(props.lang || (typeof document === "undefined" ? "" : document.documentElement.lang));
58
+ const [query, setQuery] = useState("");
59
+ const inputRef = useRef(null);
60
+ const resultsId = `${useId().replace(/:/gu, "")}_site_search`;
61
+ const state = useSiteSearch(query, locale);
62
+ const searching = Boolean(query.trim());
63
+ const onKeyDown = (event) => {
64
+ const results = document.getElementById(resultsId);
65
+ if (event.key === "Escape" && query) {
66
+ event.stopPropagation();
67
+ setQuery("");
68
+ }
69
+ else if (event.key === "Enter")
70
+ results?.querySelector("a[href]")?.click();
71
+ else if (event.key === "ArrowDown")
72
+ moveFocus(results, inputRef.current, event);
73
+ };
74
+ const navigate = () => {
75
+ setQuery("");
76
+ props.onNavigate?.();
77
+ };
78
+ return (_jsxs("div", { className: frontendElementClass(block, "search"), children: [_jsx("input", { "aria-controls": resultsId, "aria-label": sourceLanguageMessage("siteSearchLabel", locale), autoComplete: "off", className: `${frontendClassName("input")} ${frontendElementClass(block, "search-input")}`, onChange: (event) => setQuery(event.target.value), onFocus: () => void loadSiteSearch(locale).catch(() => undefined), onKeyDown: onKeyDown, placeholder: sourceLanguageMessage("siteSearchPlaceholder", locale), ref: inputRef, spellCheck: false, type: "search", value: query }), _jsx("div", { id: resultsId, children: searching ? _jsx(SearchResults, { ...props, input: inputRef.current, locale: locale, onNavigate: navigate, query: query, state: state }) : null }), _jsx("div", { hidden: searching, children: props.children })] }));
79
+ }
80
+ export { SiteHeaderSearch };
81
+ //# sourceMappingURL=search.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"search.js","sourceRoot":"","sources":["../../../../../../src/layout/components/site/header/search.tsx"],"names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BAAiB,CAAC,OAAO,CAAC,IAAI,oBAAoB,CAAC,KAAK,EAAE,cAAc,CAAC,EAAE,EACzF,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,EACjD,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,cAAc,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,EACjE,SAAS,EAAE,SAAS,EACpB,WAAW,EAAE,qBAAqB,CAAC,uBAAuB,EAAE,MAAM,CAAC,EACnE,GAAG,EAAE,QAAQ,EACb,UAAU,EAAE,KAAK,EACjB,IAAI,EAAC,QAAQ,EACb,KAAK,EAAE,KAAK,GACV,EACF,cAAK,EAAE,EAAE,SAAS,YACjB,SAAS,CAAC,CAAC,CAAC,KAAC,aAAa,OAAK,KAAK,EAAE,KAAK,EAAE,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,GAAI,CAAC,CAAC,CAAC,IAAI,GACrI,EACN,cAAK,MAAM,EAAE,SAAS,YAAG,KAAK,CAAC,QAAQ,GAAO,IACxC,CACP,CAAC;AACJ,CAAC;AAED,OAAO,EAAE,gBAAgB,EAAE,CAAC"}
@@ -0,0 +1,14 @@
1
+ import type { RefObject } from "react";
2
+ type SiteHeaderSheet = {
3
+ close: () => void;
4
+ current: string;
5
+ hover: (key: string) => void;
6
+ leave: () => void;
7
+ open: string;
8
+ stay: () => void;
9
+ toggle: (key: string, keyboard: boolean) => void;
10
+ };
11
+ declare function useSiteHeaderSheet(headerRef: RefObject<HTMLElement | null>): SiteHeaderSheet;
12
+ export { useSiteHeaderSheet };
13
+ export type { SiteHeaderSheet };
14
+ //# sourceMappingURL=sheet.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sheet.d.ts","sourceRoot":"","sources":["../../../../../../src/layout/components/site/header/sheet.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAQvC,KAAK,eAAe,GAAG;IACrB,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7B,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,IAAI,CAAC;IACjB,MAAM,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;CAClD,CAAC;AA2CF,iBAAS,kBAAkB,CAAC,SAAS,EAAE,SAAS,CAAC,WAAW,GAAC,IAAI,CAAC,GAAG,eAAe,CAiCnF;AAED,OAAO,EAAE,kBAAkB,EAAE,CAAC;AAC9B,YAAY,EAAE,eAAe,EAAE,CAAC"}