@panneau/app 5.0.0-alpha.4 → 5.0.0-alpha.6

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 (103) hide show
  1. package/README.md +33 -5
  2. package/dist/Panneau.css +19 -0
  3. package/dist/Panneau.d.ts +13 -1
  4. package/dist/Panneau.d.ts.map +1 -1
  5. package/dist/Panneau.js +144 -31
  6. package/dist/Panneau.js.map +1 -1
  7. package/dist/Panneau.module.js +12 -0
  8. package/dist/Panneau.module.js.map +1 -0
  9. package/dist/Shell.d.ts +8 -3
  10. package/dist/Shell.d.ts.map +1 -1
  11. package/dist/Shell.js +272 -114
  12. package/dist/Shell.js.map +1 -1
  13. package/dist/createPanneauApp.d.ts +9 -0
  14. package/dist/createPanneauApp.d.ts.map +1 -1
  15. package/dist/createPanneauApp.js.map +1 -1
  16. package/dist/cx.d.ts +3 -0
  17. package/dist/cx.d.ts.map +1 -0
  18. package/dist/cx.js +9 -0
  19. package/dist/cx.js.map +1 -0
  20. package/dist/documentTitle.d.ts +10 -0
  21. package/dist/documentTitle.d.ts.map +1 -0
  22. package/dist/documentTitle.js +49 -0
  23. package/dist/documentTitle.js.map +1 -0
  24. package/dist/index.d.ts +1 -0
  25. package/dist/index.d.ts.map +1 -1
  26. package/dist/index.js +2 -1
  27. package/dist/location.d.ts +13 -1
  28. package/dist/location.d.ts.map +1 -1
  29. package/dist/location.js +55 -48
  30. package/dist/location.js.map +1 -1
  31. package/dist/navigation.d.ts +53 -0
  32. package/dist/navigation.d.ts.map +1 -0
  33. package/dist/navigation.js +117 -0
  34. package/dist/navigation.js.map +1 -0
  35. package/dist/pages/HomePage.d.ts +11 -0
  36. package/dist/pages/HomePage.d.ts.map +1 -0
  37. package/dist/pages/HomePage.js +111 -0
  38. package/dist/pages/HomePage.js.map +1 -0
  39. package/dist/pages/ItemPanel.css +164 -0
  40. package/dist/pages/ItemPanel.d.ts +17 -0
  41. package/dist/pages/ItemPanel.d.ts.map +1 -0
  42. package/dist/pages/ItemPanel.js +370 -0
  43. package/dist/pages/ItemPanel.js.map +1 -0
  44. package/dist/pages/ItemPanel.module.js +34 -0
  45. package/dist/pages/ItemPanel.module.js.map +1 -0
  46. package/dist/pages/ItemPreview.d.ts +15 -0
  47. package/dist/pages/ItemPreview.d.ts.map +1 -0
  48. package/dist/pages/ItemPreview.js +179 -0
  49. package/dist/pages/ItemPreview.js.map +1 -0
  50. package/dist/pages/NotFoundPage.d.ts +6 -0
  51. package/dist/pages/NotFoundPage.d.ts.map +1 -0
  52. package/dist/pages/NotFoundPage.js +93 -0
  53. package/dist/pages/NotFoundPage.js.map +1 -0
  54. package/dist/pages/PageHeader.d.ts +21 -0
  55. package/dist/pages/PageHeader.d.ts.map +1 -0
  56. package/dist/pages/PageHeader.js +86 -0
  57. package/dist/pages/PageHeader.js.map +1 -0
  58. package/dist/pages/ResourceFormPage.d.ts +15 -0
  59. package/dist/pages/ResourceFormPage.d.ts.map +1 -0
  60. package/dist/pages/ResourceFormPage.js +204 -0
  61. package/dist/pages/ResourceFormPage.js.map +1 -0
  62. package/dist/pages/ResourceListPage.d.ts +15 -0
  63. package/dist/pages/ResourceListPage.d.ts.map +1 -0
  64. package/dist/pages/ResourceListPage.js +101 -0
  65. package/dist/pages/ResourceListPage.js.map +1 -0
  66. package/dist/pages/itemTitle.d.ts +7 -0
  67. package/dist/pages/itemTitle.d.ts.map +1 -0
  68. package/dist/pages/itemTitle.js +18 -0
  69. package/dist/pages/itemTitle.js.map +1 -0
  70. package/dist/pages/pages.css +162 -0
  71. package/dist/pages/pages.module.js +40 -0
  72. package/dist/pages/pages.module.js.map +1 -0
  73. package/dist/preferences.d.ts +6 -0
  74. package/dist/preferences.d.ts.map +1 -0
  75. package/dist/preferences.js +53 -0
  76. package/dist/preferences.js.map +1 -0
  77. package/dist/recentItems.d.ts +15 -0
  78. package/dist/recentItems.d.ts.map +1 -0
  79. package/dist/recentItems.js +70 -0
  80. package/dist/recentItems.js.map +1 -0
  81. package/dist/shell/AppLayout.css +189 -0
  82. package/dist/shell/AppLayout.d.ts +22 -0
  83. package/dist/shell/AppLayout.d.ts.map +1 -0
  84. package/dist/shell/AppLayout.js +365 -0
  85. package/dist/shell/AppLayout.js.map +1 -0
  86. package/dist/shell/AppLayout.module.js +36 -0
  87. package/dist/shell/AppLayout.module.js.map +1 -0
  88. package/dist/shell/GoTo.d.ts +20 -0
  89. package/dist/shell/GoTo.d.ts.map +1 -0
  90. package/dist/shell/GoTo.js +370 -0
  91. package/dist/shell/GoTo.js.map +1 -0
  92. package/dist/shell/Sidebar.css +313 -0
  93. package/dist/shell/Sidebar.d.ts +29 -0
  94. package/dist/shell/Sidebar.d.ts.map +1 -0
  95. package/dist/shell/Sidebar.js +225 -0
  96. package/dist/shell/Sidebar.js.map +1 -0
  97. package/dist/shell/Sidebar.module.js +60 -0
  98. package/dist/shell/Sidebar.module.js.map +1 -0
  99. package/dist/shell/tokens.d.ts +23 -0
  100. package/dist/shell/tokens.d.ts.map +1 -0
  101. package/dist/shell/tokens.js +75 -0
  102. package/dist/shell/tokens.js.map +1 -0
  103. package/package.json +15 -6
@@ -0,0 +1,313 @@
1
+ /* The sidebar sits on the window's background, like the tab strip of a browser: no surface of its
2
+ * own, and the current link raised on a surface. Collapsed, it is a rail of icons. */
3
+
4
+ .panneau-sidebar {
5
+ display: flex;
6
+ flex-direction: column;
7
+ gap: var(--panneau-space-4);
8
+ min-width: 0;
9
+ height: 100%;
10
+ padding: var(--panneau-space-3) var(--panneau-space-2);
11
+ }
12
+
13
+ .panneau-sidebar-top {
14
+ display: flex;
15
+ align-items: center;
16
+ justify-content: space-between;
17
+ gap: var(--panneau-space-2);
18
+ min-width: 0;
19
+ }
20
+
21
+ .panneau-sidebar-brand {
22
+ display: flex;
23
+ flex: 1 1 auto;
24
+ align-items: center;
25
+ gap: var(--panneau-space-2);
26
+ min-width: 0;
27
+ min-height: var(--panneau-control-height-sm);
28
+ padding-inline: var(--panneau-space-1);
29
+ border-radius: var(--panneau-radius-md);
30
+ color: var(--panneau-color-text);
31
+ font-weight: var(--panneau-font-weight-bold);
32
+ text-decoration: none;
33
+ outline: none;
34
+ }
35
+
36
+ .panneau-sidebar-logo {
37
+ display: inline-grid;
38
+ flex: none;
39
+ place-items: center;
40
+ width: 1.75rem;
41
+ height: 1.75rem;
42
+ border-radius: var(--panneau-radius-md);
43
+ background: var(--panneau-sidebar-logo-bg, var(--panneau-color-accent));
44
+ color: var(--panneau-sidebar-logo-color, var(--panneau-color-accent-text));
45
+ font-size: var(--panneau-font-size-sm);
46
+ line-height: 1;
47
+ }
48
+
49
+ .panneau-sidebar-toggle {
50
+ flex: none;
51
+ color: var(--panneau-color-text-muted);
52
+ }
53
+
54
+ /* "Go to…": a button that looks like a search field, with its shortcut. */
55
+ .panneau-sidebar-go-to {
56
+ display: flex;
57
+ align-items: center;
58
+ gap: var(--panneau-space-2);
59
+ min-height: var(--panneau-control-height-sm);
60
+ padding: 0 var(--panneau-space-2);
61
+ border: var(--panneau-border-width) solid var(--panneau-color-border);
62
+ border-radius: var(--panneau-sidebar-link-radius, var(--panneau-radius-md));
63
+ background: var(--panneau-color-surface);
64
+ color: var(--panneau-color-text-muted);
65
+ font: inherit;
66
+ font-size: var(--panneau-font-size-sm);
67
+ text-align: start;
68
+ cursor: pointer;
69
+ outline: none;
70
+ }
71
+
72
+ .panneau-sidebar-go-to[data-hovered] {
73
+ border-color: var(--panneau-color-border-control);
74
+ color: var(--panneau-color-text);
75
+ }
76
+
77
+ .panneau-sidebar-go-to[data-focus-visible] {
78
+ box-shadow: 0 0 0 var(--panneau-focus-width) var(--panneau-color-focus);
79
+ }
80
+
81
+ .panneau-sidebar-go-to-search {
82
+ flex: none;
83
+ }
84
+
85
+ .panneau-sidebar-go-to-label {
86
+ flex: 1 1 auto;
87
+ overflow: hidden;
88
+ text-overflow: ellipsis;
89
+ white-space: nowrap;
90
+ }
91
+
92
+ .panneau-sidebar-go-to-key {
93
+ flex: none;
94
+ padding: 0 var(--panneau-space-1);
95
+ border: var(--panneau-border-width) solid var(--panneau-color-border);
96
+ border-radius: var(--panneau-radius-sm);
97
+ font-family: inherit;
98
+ font-size: var(--panneau-font-size-xs);
99
+ }
100
+
101
+ .panneau-sidebar-go-to-icon {
102
+ flex: none;
103
+ color: var(--panneau-color-text-muted);
104
+ }
105
+
106
+ .panneau-sidebar-nav {
107
+ display: flex;
108
+ flex: 1 1 auto;
109
+ flex-direction: column;
110
+ gap: var(--panneau-space-3);
111
+ min-height: 0;
112
+ overflow-y: auto;
113
+ /* Room for the focus ring of the links. */
114
+ margin-inline: calc(-1 * var(--panneau-focus-width));
115
+ padding-inline: var(--panneau-focus-width);
116
+ }
117
+
118
+ .panneau-sidebar-section {
119
+ display: flex;
120
+ flex-direction: column;
121
+ gap: var(--panneau-space-1);
122
+ }
123
+
124
+ .panneau-sidebar-section-label {
125
+ padding: var(--panneau-space-1) var(--panneau-space-2) 0;
126
+ color: var(--panneau-color-text-muted);
127
+ font-size: var(--panneau-font-size-xs);
128
+ font-weight: var(--panneau-font-weight-medium);
129
+ letter-spacing: 0.04em;
130
+ text-transform: uppercase;
131
+ }
132
+
133
+ .panneau-sidebar-list {
134
+ display: flex;
135
+ flex-direction: column;
136
+ gap: 2px;
137
+ margin: 0;
138
+ padding: 0;
139
+ list-style: none;
140
+ }
141
+
142
+ .panneau-sidebar-separator {
143
+ width: 100%;
144
+ margin: 0;
145
+ border: 0;
146
+ border-top: var(--panneau-border-width) solid var(--panneau-color-border);
147
+ }
148
+
149
+ .panneau-sidebar-link {
150
+ display: flex;
151
+ align-items: center;
152
+ gap: var(--panneau-space-2);
153
+ min-height: var(--panneau-control-height-sm);
154
+ padding: 0 var(--panneau-space-2);
155
+ border: var(--panneau-border-width) solid transparent;
156
+ border-radius: var(--panneau-sidebar-link-radius, var(--panneau-radius-md));
157
+ color: var(--panneau-sidebar-link-color, var(--panneau-color-text-muted));
158
+ font-size: var(--panneau-font-size-sm);
159
+ font-weight: var(--panneau-font-weight-medium);
160
+ text-decoration: none;
161
+ outline: none;
162
+ cursor: pointer;
163
+ transition:
164
+ background-color var(--panneau-duration),
165
+ color var(--panneau-duration);
166
+ }
167
+
168
+ .panneau-sidebar-link[data-hovered] {
169
+ background: var(--panneau-sidebar-link-hover-bg, var(--panneau-color-hover));
170
+ color: var(--panneau-sidebar-link-current-color, var(--panneau-color-text));
171
+ }
172
+
173
+ .panneau-sidebar-link[data-pressed] {
174
+ background: var(--panneau-color-pressed);
175
+ }
176
+
177
+ .panneau-sidebar-link[aria-current='page'] {
178
+ border-color: var(--panneau-sidebar-link-current-border, var(--panneau-color-border));
179
+ background: var(--panneau-sidebar-link-current-bg, var(--panneau-color-surface));
180
+ color: var(--panneau-sidebar-link-current-color, var(--panneau-color-text));
181
+ box-shadow: var(--panneau-sidebar-link-current-shadow, var(--panneau-shadow-sm));
182
+ }
183
+
184
+ .panneau-sidebar-link[data-focus-visible],
185
+ .panneau-sidebar-brand[data-focus-visible] {
186
+ box-shadow: 0 0 0 var(--panneau-focus-width) var(--panneau-color-focus);
187
+ }
188
+
189
+ .panneau-sidebar-link-icon {
190
+ flex: none;
191
+ }
192
+
193
+ .panneau-sidebar-label {
194
+ overflow: hidden;
195
+ text-overflow: ellipsis;
196
+ white-space: nowrap;
197
+ }
198
+
199
+ .panneau-sidebar-footer {
200
+ display: flex;
201
+ align-items: center;
202
+ justify-content: space-between;
203
+ gap: var(--panneau-space-2);
204
+ padding-top: var(--panneau-space-3);
205
+ border-top: var(--panneau-border-width) solid var(--panneau-color-border);
206
+ }
207
+
208
+ .panneau-sidebar-user {
209
+ display: flex;
210
+ flex: 1 1 auto;
211
+ align-items: center;
212
+ gap: var(--panneau-space-2);
213
+ min-width: 0;
214
+ padding-inline: var(--panneau-space-1);
215
+ }
216
+
217
+ .panneau-sidebar-user-link {
218
+ min-height: var(--panneau-control-height-sm);
219
+ padding-block: var(--panneau-space-1);
220
+ border: var(--panneau-border-width) solid transparent;
221
+ border-radius: var(--panneau-radius-md);
222
+ color: var(--panneau-color-text);
223
+ text-decoration: none;
224
+ outline: none;
225
+ cursor: pointer;
226
+ }
227
+
228
+ /* The profile is a link of the sidebar: the same hover and current states. */
229
+ .panneau-sidebar-user-link[data-hovered] {
230
+ background: var(--panneau-sidebar-link-hover-bg, var(--panneau-color-hover));
231
+ }
232
+
233
+ .panneau-sidebar-user-link[aria-current='page'] {
234
+ border-color: var(--panneau-sidebar-link-current-border, var(--panneau-color-border));
235
+ background: var(--panneau-sidebar-link-current-bg, var(--panneau-color-surface));
236
+ box-shadow: var(--panneau-sidebar-link-current-shadow, var(--panneau-shadow-sm));
237
+ }
238
+
239
+ .panneau-sidebar-user-link[data-focus-visible] {
240
+ box-shadow: 0 0 0 var(--panneau-focus-width) var(--panneau-color-focus);
241
+ }
242
+
243
+ .panneau-sidebar-avatar {
244
+ display: inline-grid;
245
+ flex: none;
246
+ place-items: center;
247
+ width: 1.75rem;
248
+ height: 1.75rem;
249
+ border: var(--panneau-border-width) solid var(--panneau-color-border);
250
+ border-radius: var(--panneau-radius-full);
251
+ background: var(--panneau-color-surface);
252
+ color: var(--panneau-color-text);
253
+ font-size: var(--panneau-font-size-xs);
254
+ font-weight: var(--panneau-font-weight-bold);
255
+ object-fit: cover;
256
+ }
257
+
258
+ .panneau-sidebar-user-text {
259
+ display: flex;
260
+ flex-direction: column;
261
+ min-width: 0;
262
+ line-height: var(--panneau-line-height-tight);
263
+ }
264
+
265
+ .panneau-sidebar-user-name {
266
+ overflow: hidden;
267
+ font-size: var(--panneau-font-size-sm);
268
+ font-weight: var(--panneau-font-weight-medium);
269
+ text-overflow: ellipsis;
270
+ }
271
+
272
+ .panneau-sidebar-user-email {
273
+ overflow: hidden;
274
+ color: var(--panneau-color-text-muted);
275
+ font-size: var(--panneau-font-size-xs);
276
+ text-overflow: ellipsis;
277
+ }
278
+
279
+ /* The rail: icons only, centered, the labels in tooltips. */
280
+ .panneau-sidebar-collapsed {
281
+ align-items: center;
282
+ padding-inline: var(--panneau-space-1);
283
+ }
284
+
285
+ .panneau-sidebar-collapsed .panneau-sidebar-top,
286
+ .panneau-sidebar-collapsed .panneau-sidebar-footer {
287
+ flex-direction: column;
288
+ }
289
+
290
+ .panneau-sidebar-collapsed .panneau-sidebar-brand {
291
+ flex: none;
292
+ padding: 0;
293
+ }
294
+
295
+ .panneau-sidebar-collapsed .panneau-sidebar-label,
296
+ .panneau-sidebar-collapsed .panneau-sidebar-section-label {
297
+ display: none;
298
+ }
299
+
300
+ .panneau-sidebar-collapsed .panneau-sidebar-link {
301
+ justify-content: center;
302
+ width: var(--panneau-control-height-sm);
303
+ padding: 0;
304
+ }
305
+
306
+ .panneau-sidebar-collapsed .panneau-sidebar-list {
307
+ align-items: center;
308
+ }
309
+
310
+ .panneau-sidebar-collapsed .panneau-sidebar-user {
311
+ flex: none;
312
+ padding: 0;
313
+ }
@@ -0,0 +1,29 @@
1
+ import type { Definition } from '@panneau/protocol';
2
+ import { type AppRoute } from '../routes';
3
+ /** The color schemes the user can pick, in the order of the button. */
4
+ export declare const COLOR_SCHEMES: readonly ["light", "dark", "auto"];
5
+ export type ColorSchemePreference = (typeof COLOR_SCHEMES)[number];
6
+ export interface SidebarProps {
7
+ definition: Definition;
8
+ basePath: string;
9
+ route: AppRoute;
10
+ /** Only icons, with the labels in tooltips. */
11
+ collapsed?: boolean;
12
+ /** Collapses or expands the sidebar. Without it, the sidebar has no such button. */
13
+ onToggle?: () => void;
14
+ /** Closes the sidebar, when it is a drawer on a small screen. */
15
+ onClose?: () => void;
16
+ /** Called after a link is followed, to close a drawer. */
17
+ onNavigate?: () => void;
18
+ colorScheme: ColorSchemePreference;
19
+ onColorSchemeChange: (scheme: ColorSchemePreference) => void;
20
+ /** Opens the "Go to…" palette. Without it, the sidebar has no such button. */
21
+ onGoTo?: () => void;
22
+ className?: string;
23
+ }
24
+ /**
25
+ * The main navigation, as a column: the site, the links of the `main` menu of the definition, and
26
+ * the user. Collapsed, it is a rail of icons, as in the sidebars of recent browsers.
27
+ */
28
+ export declare function Sidebar({ definition, basePath, route, collapsed, onToggle, onClose, onNavigate, colorScheme, onColorSchemeChange, onGoTo, className, }: SidebarProps): import("react").JSX.Element;
29
+ //# sourceMappingURL=Sidebar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Sidebar.d.ts","sourceRoot":"","sources":["../../src/shell/Sidebar.tsx"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAoBpD,OAAO,EAAE,KAAK,QAAQ,EAAa,MAAM,WAAW,CAAC;AAGrD,uEAAuE;AACvE,eAAO,MAAM,aAAa,oCAAqC,CAAC;AAChE,MAAM,MAAM,qBAAqB,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC;AAqBnE,MAAM,WAAW,YAAY;IACzB,UAAU,EAAE,UAAU,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,QAAQ,CAAC;IAChB,+CAA+C;IAC/C,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,oFAAoF;IACpF,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,iEAAiE;IACjE,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,0DAA0D;IAC1D,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,WAAW,EAAE,qBAAqB,CAAC;IACnC,mBAAmB,EAAE,CAAC,MAAM,EAAE,qBAAqB,KAAK,IAAI,CAAC;IAC7D,8EAA8E;IAC9E,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;GAGG;AACH,wBAAgB,OAAO,CAAC,EACpB,UAAU,EACV,QAAQ,EACR,KAAK,EACL,SAAiB,EACjB,QAAQ,EACR,OAAO,EACP,UAAU,EACV,WAAW,EACX,mBAAmB,EACnB,MAAM,EACN,SAAS,GACZ,EAAE,YAAY,+BAyMd"}
@@ -0,0 +1,225 @@
1
+ import { routePath } from "../routes.js";
2
+ import { getNavigation, getProfilePath, isCurrent } from "../navigation.js";
3
+ import { cx } from "../cx.js";
4
+ import Sidebar_module_default from "./Sidebar.module.js";
5
+ import { appMessages } from "@panneau/intl";
6
+ import { Icon, IconButton, Tooltip, getNamedIcon, isApplePlatform, usePanneauIntl } from "@panneau/ui";
7
+ import { Button as Button$1, Link } from "react-aria-components";
8
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
9
+ import { ExternalLink, File, House, Link2, List, Monitor, Moon, PanelLeftClose, PanelLeftOpen, Search, Sun, X } from "lucide-react";
10
+ //#region src/shell/Sidebar.tsx
11
+ /** The color schemes the user can pick, in the order of the button. */
12
+ var COLOR_SCHEMES = [
13
+ "light",
14
+ "dark",
15
+ "auto"
16
+ ];
17
+ var SCHEME_ICONS = {
18
+ light: Sun,
19
+ dark: Moon,
20
+ auto: Monitor
21
+ };
22
+ function defaultIcon(target) {
23
+ switch (target.kind) {
24
+ case "home": return House;
25
+ case "resource": return List;
26
+ case "page": return File;
27
+ case "url": return target.external ? ExternalLink : Link2;
28
+ }
29
+ }
30
+ /**
31
+ * The main navigation, as a column: the site, the links of the `main` menu of the definition, and
32
+ * the user. Collapsed, it is a rail of icons, as in the sidebars of recent browsers.
33
+ */
34
+ function Sidebar({ definition, basePath, route, collapsed = false, onToggle, onClose, onNavigate, colorScheme, onColorSchemeChange, onGoTo, className }) {
35
+ const intl = usePanneauIntl();
36
+ const home = {
37
+ type: "link",
38
+ key: "home",
39
+ label: intl.formatMessage(appMessages.home),
40
+ href: routePath({ name: "home" }, basePath),
41
+ icon: void 0,
42
+ target: { kind: "home" }
43
+ };
44
+ const entries = getNavigation(definition, basePath);
45
+ const sections = [{
46
+ key: "home",
47
+ links: [home]
48
+ }];
49
+ entries.forEach((entry) => {
50
+ const last = sections.at(-1);
51
+ if (entry.type === "link") {
52
+ if (last === void 0 || last.label !== void 0 || last.key === "home") sections.push({
53
+ key: entry.key,
54
+ links: [entry]
55
+ });
56
+ else last.links.push(entry);
57
+ } else if (entry.type === "group") sections.push({
58
+ key: entry.key,
59
+ label: entry.label,
60
+ links: entry.children
61
+ });
62
+ else sections.push({
63
+ key: `separator-${entry.key}`,
64
+ links: []
65
+ });
66
+ });
67
+ const renderLink = (link) => {
68
+ const current = isCurrent(link.target, route);
69
+ const external = link.target.kind === "url" && link.target.external;
70
+ const element = /* @__PURE__ */ jsxs(Link, {
71
+ href: link.href,
72
+ target: external ? "_blank" : void 0,
73
+ rel: external ? "noopener noreferrer" : void 0,
74
+ "aria-current": current ? "page" : void 0,
75
+ "aria-label": collapsed ? link.label : void 0,
76
+ className: Sidebar_module_default.link,
77
+ onPress: onNavigate,
78
+ children: [/* @__PURE__ */ jsx(Icon, {
79
+ icon: link.icon !== void 0 ? getNamedIcon(link.icon) : defaultIcon(link.target),
80
+ size: "md",
81
+ className: Sidebar_module_default.linkIcon
82
+ }), /* @__PURE__ */ jsx("span", {
83
+ className: Sidebar_module_default.label,
84
+ children: link.label
85
+ })]
86
+ });
87
+ return /* @__PURE__ */ jsx("li", { children: collapsed ? /* @__PURE__ */ jsx(Tooltip, {
88
+ content: link.label,
89
+ placement: "end",
90
+ delay: 300,
91
+ children: element
92
+ }) : element }, link.key);
93
+ };
94
+ const user = definition.user ?? null;
95
+ const profilePath = getProfilePath(definition, basePath);
96
+ const currentPath = route.name !== "not-found" ? routePath(route, basePath) : null;
97
+ const userContent = user !== null ? /* @__PURE__ */ jsxs(Fragment, { children: [user.avatarUrl !== void 0 ? /* @__PURE__ */ jsx("img", {
98
+ src: user.avatarUrl,
99
+ alt: "",
100
+ className: Sidebar_module_default.avatar
101
+ }) : /* @__PURE__ */ jsx("span", {
102
+ className: Sidebar_module_default.avatar,
103
+ "aria-hidden": "true",
104
+ children: user.name.charAt(0).toLocaleUpperCase(definition.locale)
105
+ }), /* @__PURE__ */ jsxs("span", {
106
+ className: cx(Sidebar_module_default.label, Sidebar_module_default.userText),
107
+ children: [/* @__PURE__ */ jsx("span", {
108
+ className: Sidebar_module_default.userName,
109
+ children: user.name
110
+ }), user.email !== void 0 ? /* @__PURE__ */ jsx("span", {
111
+ className: Sidebar_module_default.userEmail,
112
+ children: user.email
113
+ }) : null]
114
+ })] }) : null;
115
+ const apple = isApplePlatform();
116
+ const shortcut = apple ? "⌘K" : "Ctrl+K";
117
+ const keyShortcuts = apple ? "Meta+K" : "Control+K";
118
+ const nextScheme = COLOR_SCHEMES[(COLOR_SCHEMES.indexOf(colorScheme) + 1) % COLOR_SCHEMES.length] ?? "light";
119
+ return /* @__PURE__ */ jsxs("div", {
120
+ className: cx(Sidebar_module_default.sidebar, collapsed && Sidebar_module_default.collapsed, className),
121
+ children: [
122
+ /* @__PURE__ */ jsxs("div", {
123
+ className: Sidebar_module_default.top,
124
+ children: [
125
+ /* @__PURE__ */ jsxs(Link, {
126
+ href: routePath({ name: "home" }, basePath),
127
+ className: Sidebar_module_default.brand,
128
+ "aria-label": collapsed ? definition.name : void 0,
129
+ onPress: onNavigate,
130
+ children: [/* @__PURE__ */ jsx("span", {
131
+ className: Sidebar_module_default.logo,
132
+ "aria-hidden": "true",
133
+ children: definition.name.charAt(0).toLocaleUpperCase(definition.locale)
134
+ }), /* @__PURE__ */ jsx("span", {
135
+ className: Sidebar_module_default.label,
136
+ children: definition.name
137
+ })]
138
+ }),
139
+ onToggle !== void 0 ? /* @__PURE__ */ jsx(IconButton, {
140
+ icon: collapsed ? PanelLeftOpen : PanelLeftClose,
141
+ label: intl.formatMessage(collapsed ? appMessages.expandSidebar : appMessages.collapseSidebar),
142
+ "aria-expanded": !collapsed,
143
+ size: "sm",
144
+ className: Sidebar_module_default.toggle,
145
+ onPress: onToggle
146
+ }) : null,
147
+ onClose !== void 0 ? /* @__PURE__ */ jsx(IconButton, {
148
+ icon: X,
149
+ label: intl.formatMessage(appMessages.closeMenu),
150
+ size: "sm",
151
+ className: Sidebar_module_default.toggle,
152
+ onPress: onClose
153
+ }) : null
154
+ ]
155
+ }),
156
+ onGoTo !== void 0 ? collapsed ? /* @__PURE__ */ jsx(IconButton, {
157
+ icon: Search,
158
+ label: `${intl.formatMessage(appMessages.goTo)} (${shortcut})`,
159
+ "aria-haspopup": "dialog",
160
+ "aria-keyshortcuts": keyShortcuts,
161
+ size: "sm",
162
+ className: Sidebar_module_default.goToIcon,
163
+ onPress: onGoTo
164
+ }) : /* @__PURE__ */ jsxs(Button$1, {
165
+ "aria-haspopup": "dialog",
166
+ "aria-keyshortcuts": keyShortcuts,
167
+ className: Sidebar_module_default.goTo,
168
+ onPress: onGoTo,
169
+ children: [
170
+ /* @__PURE__ */ jsx(Icon, {
171
+ icon: Search,
172
+ size: "sm",
173
+ className: Sidebar_module_default.goToSearch
174
+ }),
175
+ /* @__PURE__ */ jsx("span", {
176
+ className: Sidebar_module_default.goToLabel,
177
+ children: intl.formatMessage(appMessages.goTo)
178
+ }),
179
+ /* @__PURE__ */ jsx("kbd", {
180
+ className: Sidebar_module_default.goToKey,
181
+ children: shortcut
182
+ })
183
+ ]
184
+ }) : null,
185
+ /* @__PURE__ */ jsx("nav", {
186
+ "aria-label": intl.formatMessage(appMessages.navigation),
187
+ className: Sidebar_module_default.nav,
188
+ children: sections.map((section) => section.links.length === 0 ? /* @__PURE__ */ jsx("hr", { className: Sidebar_module_default.separator }, section.key) : /* @__PURE__ */ jsxs("div", {
189
+ className: Sidebar_module_default.section,
190
+ children: [section.label !== void 0 ? /* @__PURE__ */ jsx("span", {
191
+ className: Sidebar_module_default.sectionLabel,
192
+ "aria-hidden": collapsed,
193
+ children: section.label
194
+ }) : null, /* @__PURE__ */ jsx("ul", {
195
+ className: Sidebar_module_default.list,
196
+ children: section.links.map(renderLink)
197
+ })]
198
+ }, section.key))
199
+ }),
200
+ /* @__PURE__ */ jsxs("div", {
201
+ className: Sidebar_module_default.footer,
202
+ children: [user !== null ? profilePath !== null ? /* @__PURE__ */ jsx(Link, {
203
+ href: profilePath,
204
+ className: cx(Sidebar_module_default.user, Sidebar_module_default.userLink),
205
+ "aria-label": collapsed ? intl.formatMessage(appMessages.profile, { name: user.name }) : void 0,
206
+ "aria-current": currentPath === profilePath ? "page" : void 0,
207
+ onPress: onNavigate,
208
+ children: userContent
209
+ }) : /* @__PURE__ */ jsx("div", {
210
+ className: Sidebar_module_default.user,
211
+ children: userContent
212
+ }) : null, /* @__PURE__ */ jsx(IconButton, {
213
+ icon: SCHEME_ICONS[colorScheme],
214
+ label: intl.formatMessage(appMessages.colorScheme, { scheme: colorScheme }),
215
+ size: "sm",
216
+ onPress: () => onColorSchemeChange(nextScheme)
217
+ })]
218
+ })
219
+ ]
220
+ });
221
+ }
222
+ //#endregion
223
+ export { COLOR_SCHEMES, Sidebar };
224
+
225
+ //# sourceMappingURL=Sidebar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Sidebar.js","names":["styles","_Fragment","Button"],"sources":["../../src/shell/Sidebar.tsx"],"sourcesContent":["import {\n ExternalLink,\n File,\n House,\n Link2,\n List,\n Monitor,\n Moon,\n PanelLeftClose,\n PanelLeftOpen,\n Search,\n Sun,\n X,\n} from 'lucide-react';\nimport { Button, Link } from 'react-aria-components';\n\nimport { appMessages } from '@panneau/intl';\nimport type { Definition } from '@panneau/protocol';\nimport {\n Icon,\n IconButton,\n type IconComponent,\n Tooltip,\n getNamedIcon,\n isApplePlatform,\n usePanneauIntl,\n} from '@panneau/ui';\n\nimport { cx } from '../cx';\nimport {\n type NavEntry,\n type NavLink,\n type NavTarget,\n getNavigation,\n getProfilePath,\n isCurrent,\n} from '../navigation';\nimport { type AppRoute, routePath } from '../routes';\nimport styles from './Sidebar.module.css';\n\n/** The color schemes the user can pick, in the order of the button. */\nexport const COLOR_SCHEMES = ['light', 'dark', 'auto'] as const;\nexport type ColorSchemePreference = (typeof COLOR_SCHEMES)[number];\n\nconst SCHEME_ICONS: Record<ColorSchemePreference, IconComponent> = {\n light: Sun,\n dark: Moon,\n auto: Monitor,\n};\n\nfunction defaultIcon(target: NavTarget): IconComponent {\n switch (target.kind) {\n case 'home':\n return House;\n case 'resource':\n return List;\n case 'page':\n return File;\n case 'url':\n return target.external ? ExternalLink : Link2;\n }\n}\n\nexport interface SidebarProps {\n definition: Definition;\n basePath: string;\n route: AppRoute;\n /** Only icons, with the labels in tooltips. */\n collapsed?: boolean;\n /** Collapses or expands the sidebar. Without it, the sidebar has no such button. */\n onToggle?: () => void;\n /** Closes the sidebar, when it is a drawer on a small screen. */\n onClose?: () => void;\n /** Called after a link is followed, to close a drawer. */\n onNavigate?: () => void;\n colorScheme: ColorSchemePreference;\n onColorSchemeChange: (scheme: ColorSchemePreference) => void;\n /** Opens the \"Go to…\" palette. Without it, the sidebar has no such button. */\n onGoTo?: () => void;\n className?: string;\n}\n\n/**\n * The main navigation, as a column: the site, the links of the `main` menu of the definition, and\n * the user. Collapsed, it is a rail of icons, as in the sidebars of recent browsers.\n */\nexport function Sidebar({\n definition,\n basePath,\n route,\n collapsed = false,\n onToggle,\n onClose,\n onNavigate,\n colorScheme,\n onColorSchemeChange,\n onGoTo,\n className,\n}: SidebarProps) {\n const intl = usePanneauIntl();\n const home: NavLink = {\n type: 'link',\n key: 'home',\n label: intl.formatMessage(appMessages.home),\n href: routePath({ name: 'home' }, basePath),\n icon: undefined,\n target: { kind: 'home' },\n };\n const entries = getNavigation(definition, basePath);\n // Groups and the links between separators each get their own list.\n const sections: { key: string; label?: string; links: NavLink[] }[] = [\n { key: 'home', links: [home] },\n ];\n entries.forEach((entry: NavEntry) => {\n const last = sections.at(-1);\n if (entry.type === 'link') {\n if (last === undefined || last.label !== undefined || last.key === 'home') {\n sections.push({ key: entry.key, links: [entry] });\n } else {\n last.links.push(entry);\n }\n } else if (entry.type === 'group') {\n sections.push({ key: entry.key, label: entry.label, links: entry.children });\n } else {\n sections.push({ key: `separator-${entry.key}`, links: [] });\n }\n });\n\n const renderLink = (link: NavLink) => {\n const current = isCurrent(link.target, route);\n const external = link.target.kind === 'url' && link.target.external;\n const element = (\n <Link\n href={link.href}\n target={external ? '_blank' : undefined}\n rel={external ? 'noopener noreferrer' : undefined}\n aria-current={current ? 'page' : undefined}\n aria-label={collapsed ? link.label : undefined}\n className={styles.link}\n onPress={onNavigate}\n >\n <Icon\n icon={\n link.icon !== undefined ? getNamedIcon(link.icon) : defaultIcon(link.target)\n }\n size=\"md\"\n className={styles.linkIcon}\n />\n <span className={styles.label}>{link.label}</span>\n </Link>\n );\n return (\n <li key={link.key}>\n {collapsed ? (\n <Tooltip content={link.label} placement=\"end\" delay={300}>\n {element}\n </Tooltip>\n ) : (\n element\n )}\n </li>\n );\n };\n\n const user = definition.user ?? null;\n // The user's profile, when the definition has the resource of users\n const profilePath = getProfilePath(definition, basePath);\n const currentPath = route.name !== 'not-found' ? routePath(route, basePath) : null;\n const userContent =\n user !== null ? (\n <>\n {user.avatarUrl !== undefined ? (\n <img src={user.avatarUrl} alt=\"\" className={styles.avatar} />\n ) : (\n <span className={styles.avatar} aria-hidden=\"true\">\n {user.name.charAt(0).toLocaleUpperCase(definition.locale)}\n </span>\n )}\n <span className={cx(styles.label, styles.userText)}>\n <span className={styles.userName}>{user.name}</span>\n {user.email !== undefined ? (\n <span className={styles.userEmail}>{user.email}</span>\n ) : null}\n </span>\n </>\n ) : null;\n const apple = isApplePlatform();\n const shortcut = apple ? '⌘K' : 'Ctrl+K';\n const keyShortcuts = apple ? 'Meta+K' : 'Control+K';\n const nextScheme =\n COLOR_SCHEMES[(COLOR_SCHEMES.indexOf(colorScheme) + 1) % COLOR_SCHEMES.length] ?? 'light';\n\n return (\n <div className={cx(styles.sidebar, collapsed && styles.collapsed, className)}>\n <div className={styles.top}>\n <Link\n href={routePath({ name: 'home' }, basePath)}\n className={styles.brand}\n aria-label={collapsed ? definition.name : undefined}\n onPress={onNavigate}\n >\n <span className={styles.logo} aria-hidden=\"true\">\n {definition.name.charAt(0).toLocaleUpperCase(definition.locale)}\n </span>\n <span className={styles.label}>{definition.name}</span>\n </Link>\n {onToggle !== undefined ? (\n <IconButton\n icon={collapsed ? PanelLeftOpen : PanelLeftClose}\n label={intl.formatMessage(\n collapsed ? appMessages.expandSidebar : appMessages.collapseSidebar,\n )}\n aria-expanded={!collapsed}\n size=\"sm\"\n className={styles.toggle}\n onPress={onToggle}\n />\n ) : null}\n {onClose !== undefined ? (\n <IconButton\n icon={X}\n label={intl.formatMessage(appMessages.closeMenu)}\n size=\"sm\"\n className={styles.toggle}\n onPress={onClose}\n />\n ) : null}\n </div>\n {onGoTo !== undefined ? (\n collapsed ? (\n <IconButton\n icon={Search}\n label={`${intl.formatMessage(appMessages.goTo)} (${shortcut})`}\n aria-haspopup=\"dialog\"\n aria-keyshortcuts={keyShortcuts}\n size=\"sm\"\n className={styles.goToIcon}\n onPress={onGoTo}\n />\n ) : (\n <Button\n aria-haspopup=\"dialog\"\n aria-keyshortcuts={keyShortcuts}\n className={styles.goTo}\n onPress={onGoTo}\n >\n <Icon icon={Search} size=\"sm\" className={styles.goToSearch} />\n <span className={styles.goToLabel}>\n {intl.formatMessage(appMessages.goTo)}\n </span>\n <kbd className={styles.goToKey}>{shortcut}</kbd>\n </Button>\n )\n ) : null}\n <nav aria-label={intl.formatMessage(appMessages.navigation)} className={styles.nav}>\n {sections.map((section) =>\n section.links.length === 0 ? (\n <hr key={section.key} className={styles.separator} />\n ) : (\n <div key={section.key} className={styles.section}>\n {section.label !== undefined ? (\n <span className={styles.sectionLabel} aria-hidden={collapsed}>\n {section.label}\n </span>\n ) : null}\n <ul className={styles.list}>{section.links.map(renderLink)}</ul>\n </div>\n ),\n )}\n </nav>\n <div className={styles.footer}>\n {user !== null ? (\n profilePath !== null ? (\n <Link\n href={profilePath}\n className={cx(styles.user, styles.userLink)}\n aria-label={\n collapsed\n ? intl.formatMessage(appMessages.profile, { name: user.name })\n : undefined\n }\n aria-current={currentPath === profilePath ? 'page' : undefined}\n onPress={onNavigate}\n >\n {userContent}\n </Link>\n ) : (\n <div className={styles.user}>{userContent}</div>\n )\n ) : null}\n <IconButton\n icon={SCHEME_ICONS[colorScheme]}\n label={intl.formatMessage(appMessages.colorScheme, { scheme: colorScheme })}\n size=\"sm\"\n onPress={() => onColorSchemeChange(nextScheme)}\n />\n </div>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;AAyCA,IAAa,gBAAgB;CAAC;CAAS;CAAQ;AAAM;AAGrD,IAAM,eAA6D;CAC/D,OAAO;CACP,MAAM;CACN,MAAM;AACV;AAEA,SAAS,YAAY,QAAkC;CACnD,QAAQ,OAAO,MAAf;EACI,KAAK,QACD,OAAO;EACX,KAAK,YACD,OAAO;EACX,KAAK,QACD,OAAO;EACX,KAAK,OACD,OAAO,OAAO,WAAW,eAAe;CAChD;AACJ;;;;;AAyBA,SAAgB,QAAQ,EACpB,YACA,UACA,OACA,YAAY,OACZ,UACA,SACA,YACA,aACA,qBACA,QACA,aACa;CACb,MAAM,OAAO,eAAe;CAC5B,MAAM,OAAgB;EAClB,MAAM;EACN,KAAK;EACL,OAAO,KAAK,cAAc,YAAY,IAAI;EAC1C,MAAM,UAAU,EAAE,MAAM,OAAO,GAAG,QAAQ;EAC1C,MAAM,KAAA;EACN,QAAQ,EAAE,MAAM,OAAO;CAC3B;CACA,MAAM,UAAU,cAAc,YAAY,QAAQ;CAElD,MAAM,WAAgE,CAClE;EAAE,KAAK;EAAQ,OAAO,CAAC,IAAI;CAAE,CAAC;CAElC,QAAQ,SAAS,UAAoB;EACjC,MAAM,OAAO,SAAS,GAAG,EAAE;EAC3B,IAAI,MAAM,SAAS,QAAQ;GACvB,IAAI,SAAS,KAAA,KAAa,KAAK,UAAU,KAAA,KAAa,KAAK,QAAQ,QAC/D,SAAS,KAAK;IAAE,KAAK,MAAM;IAAK,OAAO,CAAC,KAAK;GAAE,CAAC;QAEhD,KAAK,MAAM,KAAK,KAAK;EAE7B,OAAO,IAAI,MAAM,SAAS,SACtB,SAAS,KAAK;GAAE,KAAK,MAAM;GAAK,OAAO,MAAM;GAAO,OAAO,MAAM;EAAS,CAAC;O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O,MAAMA,uBAAO,QAAQ;KAC1C,cACI,YACM,KAAK,cAAc,YAAY,SAAS,EAAE,MAAM,KAAK,KAAK,CAAC,IAC3D,KAAA;KAEV,gBAAc,gBAAgB,cAAc,SAAS,KAAA;KACrD,SAAS;KAER,UAAA;IACC,CAAA,IAEN,oBAAC,OAAD;KAAK,WAAWA,uBAAO;KAAO,UAAA;IAAiB,CAAA,IAEnD,MACJ,oBAAC,YAAD;KACI,MAAM,aAAa;KACnB,OAAO,KAAK,cAAc,YAAY,aAAa,EAAE,QAAQ,YAAY,CAAC;KAC1E,MAAK;KACL,eAAe,oBAAoB,UAAU;IAAE,CAAA,CAElD;;EACJ;;AAEb"}
@@ -0,0 +1,60 @@
1
+ import "./Sidebar.css";
2
+ //#region src/shell/Sidebar.module.css
3
+ var sidebar = "panneau-sidebar";
4
+ var top = "panneau-sidebar-top";
5
+ var brand = "panneau-sidebar-brand";
6
+ var logo = "panneau-sidebar-logo";
7
+ var toggle = "panneau-sidebar-toggle";
8
+ var goTo = "panneau-sidebar-go-to";
9
+ var goToSearch = "panneau-sidebar-go-to-search";
10
+ var goToLabel = "panneau-sidebar-go-to-label";
11
+ var goToKey = "panneau-sidebar-go-to-key";
12
+ var goToIcon = "panneau-sidebar-go-to-icon";
13
+ var nav = "panneau-sidebar-nav";
14
+ var section = "panneau-sidebar-section";
15
+ var sectionLabel = "panneau-sidebar-section-label";
16
+ var list = "panneau-sidebar-list";
17
+ var separator = "panneau-sidebar-separator";
18
+ var link = "panneau-sidebar-link";
19
+ var linkIcon = "panneau-sidebar-link-icon";
20
+ var label = "panneau-sidebar-label";
21
+ var footer = "panneau-sidebar-footer";
22
+ var user = "panneau-sidebar-user";
23
+ var userLink = "panneau-sidebar-user-link";
24
+ var avatar = "panneau-sidebar-avatar";
25
+ var userText = "panneau-sidebar-user-text";
26
+ var userName = "panneau-sidebar-user-name";
27
+ var userEmail = "panneau-sidebar-user-email";
28
+ var collapsed = "panneau-sidebar-collapsed";
29
+ var Sidebar_module_default = {
30
+ sidebar,
31
+ top,
32
+ brand,
33
+ logo,
34
+ toggle,
35
+ goTo,
36
+ goToSearch,
37
+ goToLabel,
38
+ goToKey,
39
+ goToIcon,
40
+ nav,
41
+ section,
42
+ sectionLabel,
43
+ list,
44
+ separator,
45
+ link,
46
+ linkIcon,
47
+ label,
48
+ footer,
49
+ user,
50
+ userLink,
51
+ avatar,
52
+ userText,
53
+ userName,
54
+ userEmail,
55
+ collapsed
56
+ };
57
+ //#endregion
58
+ export { avatar, brand, collapsed, Sidebar_module_default as default, footer, goTo, goToIcon, goToKey, goToLabel, goToSearch, label, link, linkIcon, list, logo, nav, section, sectionLabel, separator, sidebar, toggle, top, user, userEmail, userLink, userName, userText };
59
+
60
+ //# sourceMappingURL=Sidebar.module.js.map