@canopy-iiif/app 0.7.14 → 0.7.17

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@canopy-iiif/app",
3
- "version": "0.7.14",
3
+ "version": "0.7.17",
4
4
  "private": false,
5
5
  "license": "MIT",
6
6
  "author": "Mat Jordan <mat@northwestern.edu>",
@@ -14,7 +14,8 @@
14
14
  "./ui/styles/index.css": "./ui/styles/index.css",
15
15
  "./ui/canopy-iiif-plugin": "./ui/tailwind-canopy-iiif-plugin.js",
16
16
  "./ui/canopy-iiif-preset": "./ui/tailwind-canopy-iiif-preset.js",
17
- "./lib/components/*": "./lib/components/*"
17
+ "./lib/components/*": "./lib/components/*",
18
+ "./head": "./lib/head.js"
18
19
  },
19
20
  "files": [
20
21
  "lib/**",
@@ -38,7 +39,13 @@
38
39
  },
39
40
  "peerDependencies": {
40
41
  "react": "^18.2.0 || ^19.0.0",
41
- "react-dom": "^18.2.0 || ^19.0.0"
42
+ "react-dom": "^18.2.0 || ^19.0.0",
43
+ "tailwindcss": "^4.0.0"
44
+ },
45
+ "peerDependenciesMeta": {
46
+ "tailwindcss": {
47
+ "optional": true
48
+ }
42
49
  },
43
50
  "devDependencies": {
44
51
  "esbuild": "^0.21.4"
package/ui/dist/index.mjs CHANGED
@@ -1,25 +1,11 @@
1
- // ui/src/Fallback.jsx
2
- import React from "react";
3
- function Fallback({ name, ...props }) {
4
- const style = {
5
- padding: "0.75rem 1rem",
6
- border: "1px dashed #d1d5db",
7
- color: "#6b7280",
8
- borderRadius: 6,
9
- background: "#f9fafb",
10
- fontSize: 14
11
- };
12
- return /* @__PURE__ */ React.createElement("div", { style, "data-fallback-component": name || "Unknown" }, /* @__PURE__ */ React.createElement("strong", null, name || "Unknown component"), " not available in UI.");
13
- }
14
-
15
1
  // ui/src/HelloWorld.jsx
16
- import React2 from "react";
2
+ import React from "react";
17
3
  var HelloWorld = () => {
18
- return /* @__PURE__ */ React2.createElement("div", null, "Hello, World!");
4
+ return /* @__PURE__ */ React.createElement("div", null, "Hello, World!");
19
5
  };
20
6
 
21
7
  // ui/src/layout/Card.jsx
22
- import React3, { useEffect, useRef, useState } from "react";
8
+ import React2, { useEffect, useRef, useState } from "react";
23
9
  function Card({
24
10
  href,
25
11
  src,
@@ -75,8 +61,8 @@ function Card({
75
61
  const h = Number(imgHeight);
76
62
  const ratio = Number.isFinite(Number(aspectRatio)) && Number(aspectRatio) > 0 ? Number(aspectRatio) : Number.isFinite(w) && w > 0 && Number.isFinite(h) && h > 0 ? w / h : void 0;
77
63
  const paddingPercent = ratio ? 100 / ratio : 100;
78
- const caption = /* @__PURE__ */ React3.createElement("figcaption", null, title && /* @__PURE__ */ React3.createElement("span", null, title), subtitle && /* @__PURE__ */ React3.createElement("span", null, subtitle), children);
79
- return /* @__PURE__ */ React3.createElement(
64
+ const caption = /* @__PURE__ */ React2.createElement("figcaption", null, title && /* @__PURE__ */ React2.createElement("span", null, title), subtitle && /* @__PURE__ */ React2.createElement("span", null, subtitle), children);
65
+ return /* @__PURE__ */ React2.createElement(
80
66
  "a",
81
67
  {
82
68
  href,
@@ -88,13 +74,13 @@ function Card({
88
74
  "data-image-loaded": imageLoaded ? "true" : "false",
89
75
  ...rest
90
76
  },
91
- /* @__PURE__ */ React3.createElement("figure", null, src ? ratio ? /* @__PURE__ */ React3.createElement(
77
+ /* @__PURE__ */ React2.createElement("figure", null, src ? ratio ? /* @__PURE__ */ React2.createElement(
92
78
  "div",
93
79
  {
94
80
  className: "canopy-card-media",
95
81
  style: { "--canopy-card-padding": `${paddingPercent}%` }
96
82
  },
97
- inView ? /* @__PURE__ */ React3.createElement(
83
+ inView ? /* @__PURE__ */ React2.createElement(
98
84
  "img",
99
85
  {
100
86
  src,
@@ -104,7 +90,7 @@ function Card({
104
90
  onError: () => setImageLoaded(true)
105
91
  }
106
92
  ) : null
107
- ) : /* @__PURE__ */ React3.createElement(
93
+ ) : /* @__PURE__ */ React2.createElement(
108
94
  "img",
109
95
  {
110
96
  src,
@@ -120,9 +106,9 @@ function Card({
120
106
 
121
107
  // ui/src/layout/Grid.jsx
122
108
  import Masonry from "react-masonry-css";
123
- import React4 from "react";
109
+ import React3 from "react";
124
110
  function GridItem({ children, className = "", style = {}, ...rest }) {
125
- return /* @__PURE__ */ React4.createElement(
111
+ return /* @__PURE__ */ React3.createElement(
126
112
  "div",
127
113
  {
128
114
  className: `canopy-grid-item ${className}`.trim(),
@@ -150,7 +136,7 @@ function Grid({
150
136
  640: 2
151
137
  };
152
138
  const vars = { "--grid-gap": gap, "--grid-padding-y": paddingY };
153
- return /* @__PURE__ */ React4.createElement("div", { className: "canopy-grid-wrap" }, /* @__PURE__ */ React4.createElement(
139
+ return /* @__PURE__ */ React3.createElement("div", { className: "canopy-grid-wrap" }, /* @__PURE__ */ React3.createElement(
154
140
  "style",
155
141
  {
156
142
  dangerouslySetInnerHTML: {
@@ -162,7 +148,7 @@ function Grid({
162
148
  `
163
149
  }
164
150
  }
165
- ), /* @__PURE__ */ React4.createElement(
151
+ ), /* @__PURE__ */ React3.createElement(
166
152
  Masonry,
167
153
  {
168
154
  breakpointCols: cols,
@@ -176,7 +162,7 @@ function Grid({
176
162
  }
177
163
 
178
164
  // ui/src/iiif/Viewer.jsx
179
- import React5, { useEffect as useEffect2, useState as useState2 } from "react";
165
+ import React4, { useEffect as useEffect2, useState as useState2 } from "react";
180
166
  var DEFAULT_VIEWER_OPTIONS = {
181
167
  showDownload: false,
182
168
  showIIIFBadge: false,
@@ -232,7 +218,7 @@ var Viewer = (props) => {
232
218
  } catch (_) {
233
219
  json = "{}";
234
220
  }
235
- return /* @__PURE__ */ React5.createElement("div", { "data-canopy-viewer": "1", className: "not-prose" }, /* @__PURE__ */ React5.createElement(
221
+ return /* @__PURE__ */ React4.createElement("div", { "data-canopy-viewer": "1", className: "not-prose" }, /* @__PURE__ */ React4.createElement(
236
222
  "script",
237
223
  {
238
224
  type: "application/json",
@@ -240,11 +226,11 @@ var Viewer = (props) => {
240
226
  }
241
227
  ));
242
228
  }
243
- return /* @__PURE__ */ React5.createElement(CloverViewer, { ...props, options: mergedOptions });
229
+ return /* @__PURE__ */ React4.createElement(CloverViewer, { ...props, options: mergedOptions });
244
230
  };
245
231
 
246
232
  // ui/src/iiif/Slider.jsx
247
- import React6, { useEffect as useEffect3, useState as useState3 } from "react";
233
+ import React5, { useEffect as useEffect3, useState as useState3 } from "react";
248
234
  var Slider = (props) => {
249
235
  const [CloverSlider, setCloverSlider] = useState3(null);
250
236
  useEffect3(() => {
@@ -270,7 +256,7 @@ var Slider = (props) => {
270
256
  } catch (_) {
271
257
  json = "{}";
272
258
  }
273
- return /* @__PURE__ */ React6.createElement("div", { "data-canopy-slider": "1", className: "not-prose" }, /* @__PURE__ */ React6.createElement(
259
+ return /* @__PURE__ */ React5.createElement("div", { "data-canopy-slider": "1", className: "not-prose" }, /* @__PURE__ */ React5.createElement(
274
260
  "script",
275
261
  {
276
262
  type: "application/json",
@@ -278,11 +264,11 @@ var Slider = (props) => {
278
264
  }
279
265
  ));
280
266
  }
281
- return /* @__PURE__ */ React6.createElement(CloverSlider, { ...props });
267
+ return /* @__PURE__ */ React5.createElement(CloverSlider, { ...props });
282
268
  };
283
269
 
284
270
  // ui/src/iiif/MdxRelatedItems.jsx
285
- import React7 from "react";
271
+ import React6 from "react";
286
272
  function MdxRelatedItems(props) {
287
273
  let json = "{}";
288
274
  try {
@@ -290,11 +276,11 @@ function MdxRelatedItems(props) {
290
276
  } catch (_) {
291
277
  json = "{}";
292
278
  }
293
- return /* @__PURE__ */ React7.createElement("div", { "data-canopy-related-items": "1", className: "not-prose" }, /* @__PURE__ */ React7.createElement("script", { type: "application/json", dangerouslySetInnerHTML: { __html: json } }));
279
+ return /* @__PURE__ */ React6.createElement("div", { "data-canopy-related-items": "1", className: "not-prose" }, /* @__PURE__ */ React6.createElement("script", { type: "application/json", dangerouslySetInnerHTML: { __html: json } }));
294
280
  }
295
281
 
296
282
  // ui/src/search/MdxSearchResults.jsx
297
- import React8 from "react";
283
+ import React7 from "react";
298
284
  function MdxSearchResults(props) {
299
285
  let json = "{}";
300
286
  try {
@@ -302,11 +288,11 @@ function MdxSearchResults(props) {
302
288
  } catch (_) {
303
289
  json = "{}";
304
290
  }
305
- return /* @__PURE__ */ React8.createElement("div", { "data-canopy-search-results": "1" }, /* @__PURE__ */ React8.createElement("script", { type: "application/json", dangerouslySetInnerHTML: { __html: json } }));
291
+ return /* @__PURE__ */ React7.createElement("div", { "data-canopy-search-results": "1" }, /* @__PURE__ */ React7.createElement("script", { type: "application/json", dangerouslySetInnerHTML: { __html: json } }));
306
292
  }
307
293
 
308
294
  // ui/src/search/SearchSummary.jsx
309
- import React9 from "react";
295
+ import React8 from "react";
310
296
  function SearchSummary(props) {
311
297
  let json = "{}";
312
298
  try {
@@ -314,11 +300,11 @@ function SearchSummary(props) {
314
300
  } catch (_) {
315
301
  json = "{}";
316
302
  }
317
- return /* @__PURE__ */ React9.createElement("div", { "data-canopy-search-summary": "1" }, /* @__PURE__ */ React9.createElement("script", { type: "application/json", dangerouslySetInnerHTML: { __html: json } }));
303
+ return /* @__PURE__ */ React8.createElement("div", { "data-canopy-search-summary": "1" }, /* @__PURE__ */ React8.createElement("script", { type: "application/json", dangerouslySetInnerHTML: { __html: json } }));
318
304
  }
319
305
 
320
306
  // ui/src/search/MdxSearchTabs.jsx
321
- import React10 from "react";
307
+ import React9 from "react";
322
308
  function MdxSearchTabs(props) {
323
309
  let json = "{}";
324
310
  try {
@@ -326,31 +312,31 @@ function MdxSearchTabs(props) {
326
312
  } catch (_) {
327
313
  json = "{}";
328
314
  }
329
- return /* @__PURE__ */ React10.createElement("div", { "data-canopy-search-tabs": "1" }, /* @__PURE__ */ React10.createElement("script", { type: "application/json", dangerouslySetInnerHTML: { __html: json } }));
315
+ return /* @__PURE__ */ React9.createElement("div", { "data-canopy-search-tabs": "1" }, /* @__PURE__ */ React9.createElement("script", { type: "application/json", dangerouslySetInnerHTML: { __html: json } }));
330
316
  }
331
317
 
332
318
  // ui/src/search/SearchResults.jsx
333
- import React11 from "react";
319
+ import React10 from "react";
334
320
  function SearchResults({
335
321
  results = [],
336
322
  type = "all",
337
323
  layout = "grid"
338
324
  }) {
339
325
  if (!results.length) {
340
- return /* @__PURE__ */ React11.createElement("div", { className: "text-slate-600" }, /* @__PURE__ */ React11.createElement("em", null, "No results"));
326
+ return /* @__PURE__ */ React10.createElement("div", { className: "text-slate-600" }, /* @__PURE__ */ React10.createElement("em", null, "No results"));
341
327
  }
342
328
  if (layout === "list") {
343
- return /* @__PURE__ */ React11.createElement("ul", { id: "search-results", className: "space-y-3" }, results.map((r, i) => {
329
+ return /* @__PURE__ */ React10.createElement("ul", { id: "search-results", className: "space-y-3" }, results.map((r, i) => {
344
330
  const hasDims = Number.isFinite(Number(r.thumbnailWidth)) && Number(r.thumbnailWidth) > 0 && Number.isFinite(Number(r.thumbnailHeight)) && Number(r.thumbnailHeight) > 0;
345
331
  const aspect = hasDims ? Number(r.thumbnailWidth) / Number(r.thumbnailHeight) : void 0;
346
- return /* @__PURE__ */ React11.createElement(
332
+ return /* @__PURE__ */ React10.createElement(
347
333
  "li",
348
334
  {
349
335
  key: i,
350
336
  className: `search-result ${r.type}`,
351
337
  "data-thumbnail-aspect-ratio": aspect
352
338
  },
353
- /* @__PURE__ */ React11.createElement(
339
+ /* @__PURE__ */ React10.createElement(
354
340
  Card,
355
341
  {
356
342
  href: r.href,
@@ -364,17 +350,17 @@ function SearchResults({
364
350
  );
365
351
  }));
366
352
  }
367
- return /* @__PURE__ */ React11.createElement("div", { id: "search-results" }, /* @__PURE__ */ React11.createElement(Grid, null, results.map((r, i) => {
353
+ return /* @__PURE__ */ React10.createElement("div", { id: "search-results" }, /* @__PURE__ */ React10.createElement(Grid, null, results.map((r, i) => {
368
354
  const hasDims = Number.isFinite(Number(r.thumbnailWidth)) && Number(r.thumbnailWidth) > 0 && Number.isFinite(Number(r.thumbnailHeight)) && Number(r.thumbnailHeight) > 0;
369
355
  const aspect = hasDims ? Number(r.thumbnailWidth) / Number(r.thumbnailHeight) : void 0;
370
- return /* @__PURE__ */ React11.createElement(
356
+ return /* @__PURE__ */ React10.createElement(
371
357
  GridItem,
372
358
  {
373
359
  key: i,
374
360
  className: `search-result ${r.type}`,
375
361
  "data-thumbnail-aspect-ratio": aspect
376
362
  },
377
- /* @__PURE__ */ React11.createElement(
363
+ /* @__PURE__ */ React10.createElement(
378
364
  Card,
379
365
  {
380
366
  href: r.href,
@@ -390,15 +376,15 @@ function SearchResults({
390
376
  }
391
377
 
392
378
  // ui/src/search/SearchTabs.jsx
393
- import React12 from "react";
379
+ import React11 from "react";
394
380
  function SearchTabs({ type = "all", onTypeChange, types = [], counts = {} }) {
395
381
  const orderedTypes = Array.isArray(types) ? types : [];
396
382
  const toLabel = (t) => t && t.length ? t.charAt(0).toUpperCase() + t.slice(1) : "";
397
- return /* @__PURE__ */ React12.createElement("div", { role: "tablist", "aria-label": "Search types", className: "flex items-center gap-2 border-b border-slate-200" }, orderedTypes.map((t) => {
383
+ return /* @__PURE__ */ React11.createElement("div", { role: "tablist", "aria-label": "Search types", className: "flex items-center gap-2 border-b border-slate-200" }, orderedTypes.map((t) => {
398
384
  const active = String(type).toLowerCase() === String(t).toLowerCase();
399
385
  const cRaw = counts && Object.prototype.hasOwnProperty.call(counts, t) ? counts[t] : void 0;
400
386
  const c = Number.isFinite(Number(cRaw)) ? Number(cRaw) : 0;
401
- return /* @__PURE__ */ React12.createElement(
387
+ return /* @__PURE__ */ React11.createElement(
402
388
  "button",
403
389
  {
404
390
  key: t,
@@ -406,7 +392,7 @@ function SearchTabs({ type = "all", onTypeChange, types = [], counts = {} }) {
406
392
  "aria-selected": active,
407
393
  type: "button",
408
394
  onClick: () => onTypeChange && onTypeChange(t),
409
- className: "px-3 py-1.5 text-sm rounded-t-md border-b-2 -mb-px transition-colors " + (active ? "border-brand-600 text-brand-700" : "border-transparent text-slate-600 hover:text-slate-900 hover:border-slate-300")
395
+ className: "px-3 py-2 text-sm rounded-t-md border-b-2 -mb-px transition-colors " + (active ? "border-brand-600 text-brand-700" : "border-transparent text-slate-600 hover:text-slate-900 hover:border-slate-300")
410
396
  },
411
397
  toLabel(t),
412
398
  " (",
@@ -417,14 +403,14 @@ function SearchTabs({ type = "all", onTypeChange, types = [], counts = {} }) {
417
403
  }
418
404
 
419
405
  // ui/src/command/MdxCommandPalette.jsx
420
- import React16 from "react";
406
+ import React15 from "react";
421
407
 
422
408
  // ui/src/Icons.jsx
423
- import React13 from "react";
424
- var MagnifyingGlassIcon = (props) => /* @__PURE__ */ React13.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 512 512", ...props }, /* @__PURE__ */ React13.createElement("path", { d: "M456.69 421.39L362.6 327.3a173.81 173.81 0 0034.84-104.58C397.44 126.38 319.06 48 222.72 48S48 126.38 48 222.72s78.38 174.72 174.72 174.72A173.81 173.81 0 00327.3 362.6l94.09 94.09a25 25 0 0035.3-35.3zM97.92 222.72a124.8 124.8 0 11124.8 124.8 124.95 124.95 0 01-124.8-124.8z" }));
409
+ import React12 from "react";
410
+ var MagnifyingGlassIcon = (props) => /* @__PURE__ */ React12.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 512 512", ...props }, /* @__PURE__ */ React12.createElement("path", { d: "M456.69 421.39L362.6 327.3a173.81 173.81 0 0034.84-104.58C397.44 126.38 319.06 48 222.72 48S48 126.38 48 222.72s78.38 174.72 174.72 174.72A173.81 173.81 0 00327.3 362.6l94.09 94.09a25 25 0 0035.3-35.3zM97.92 222.72a124.8 124.8 0 11124.8 124.8 124.95 124.95 0 01-124.8-124.8z" }));
425
411
 
426
412
  // ui/src/search/SearchPanelForm.jsx
427
- import React14 from "react";
413
+ import React13 from "react";
428
414
  function readBasePath() {
429
415
  const normalize = (val) => {
430
416
  const raw = typeof val === "string" ? val.trim() : "";
@@ -482,14 +468,42 @@ function SearchPanelForm(props = {}) {
482
468
  placeholder = "Search\u2026",
483
469
  buttonLabel = "Search",
484
470
  label,
485
- searchPath = "/search"
471
+ searchPath = "/search",
472
+ inputId: inputIdProp
486
473
  } = props || {};
487
474
  const text = typeof label === "string" && label.trim() ? label.trim() : buttonLabel;
488
- const action = React14.useMemo(
475
+ const action = React13.useMemo(
489
476
  () => resolveSearchPath(searchPath),
490
477
  [searchPath]
491
478
  );
492
- return /* @__PURE__ */ React14.createElement(
479
+ const autoId = typeof React13.useId === "function" ? React13.useId() : void 0;
480
+ const [fallbackId] = React13.useState(
481
+ () => `canopy-cmdk-${Math.random().toString(36).slice(2, 10)}`
482
+ );
483
+ const inputId = inputIdProp || autoId || fallbackId;
484
+ const inputRef = React13.useRef(null);
485
+ const focusInput = React13.useCallback(() => {
486
+ const el = inputRef.current;
487
+ if (!el) return;
488
+ if (document.activeElement === el) return;
489
+ try {
490
+ el.focus({ preventScroll: true });
491
+ } catch (_) {
492
+ try {
493
+ el.focus();
494
+ } catch (_2) {
495
+ }
496
+ }
497
+ }, []);
498
+ const handlePointerDown = React13.useCallback((event) => {
499
+ const target = event.target;
500
+ if (target && typeof target.closest === "function") {
501
+ if (target.closest("[data-canopy-command-trigger]")) return;
502
+ }
503
+ event.preventDefault();
504
+ focusInput();
505
+ }, [focusInput]);
506
+ return /* @__PURE__ */ React13.createElement(
493
507
  "form",
494
508
  {
495
509
  action,
@@ -497,35 +511,47 @@ function SearchPanelForm(props = {}) {
497
511
  role: "search",
498
512
  autoComplete: "off",
499
513
  spellCheck: "false",
500
- className: "group flex items-center gap-2 px-2 py-1.5 rounded-lg border border-slate-300 bg-white/95 backdrop-blur text-slate-700 shadow-sm hover:shadow transition w-full focus-within:ring-2 focus-within:ring-brand-500"
514
+ className: "group flex items-center gap-2 rounded-lg border border-slate-300 text-slate-700 shadow-sm transition w-full focus-within:ring-2 focus-within:ring-brand-500 canopy-cmdk-form",
515
+ onPointerDown: handlePointerDown,
516
+ "data-placeholder": placeholder || ""
501
517
  },
502
- /* @__PURE__ */ React14.createElement(MagnifyingGlassIcon, { className: "w-5 h-5 text-slate-400 group-focus-within:text-brand-500" }),
503
- /* @__PURE__ */ React14.createElement(
504
- "input",
518
+ /* @__PURE__ */ React13.createElement(
519
+ "label",
505
520
  {
506
- type: "search",
507
- name: "q",
508
- inputMode: "search",
509
- "data-canopy-command-input": true,
510
- placeholder,
511
- className: "flex-1 bg-transparent outline-none placeholder:text-slate-400 py-0.5 min-w-0",
512
- "aria-label": "Search"
513
- }
521
+ htmlFor: inputId,
522
+ className: "flex items-center gap-2 flex-1 min-w-0 cursor-text canopy-cmdk-label"
523
+ },
524
+ /* @__PURE__ */ React13.createElement(MagnifyingGlassIcon, { className: "w-5 h-5 text-slate-400 group-focus-within:text-brand-500 pointer-events-none" }),
525
+ /* @__PURE__ */ React13.createElement(
526
+ "input",
527
+ {
528
+ id: inputId,
529
+ type: "search",
530
+ name: "q",
531
+ inputMode: "search",
532
+ "data-canopy-command-input": true,
533
+ placeholder,
534
+ className: "flex-1 bg-transparent outline-none placeholder:text-slate-400 py-1 min-w-0",
535
+ "aria-label": "Search",
536
+ ref: inputRef
537
+ }
538
+ )
514
539
  ),
515
- /* @__PURE__ */ React14.createElement(
540
+ /* @__PURE__ */ React13.createElement(
516
541
  "button",
517
542
  {
518
- type: "submit",
519
- "data-canopy-command-link": true,
520
- className: "inline-flex items-center gap-1 px-2 py-1 rounded-md border border-slate-200 bg-slate-50 hover:bg-slate-100 text-slate-700"
543
+ type: "button",
544
+ "data-canopy-command-trigger": true,
545
+ className: "inline-flex items-center gap-2 rounded-md border border-transparent bg-brand px-2 py-1 text-sm font-medium text-white shadow-sm transition hover:bg-brand-700 focus:outline-none focus-visible:ring-2 focus-visible:ring-brand focus-visible:ring-offset-2"
521
546
  },
522
- /* @__PURE__ */ React14.createElement("span", null, text)
547
+ /* @__PURE__ */ React13.createElement("span", null, text),
548
+ /* @__PURE__ */ React13.createElement("span", { "aria-hidden": true, className: "hidden sm:inline-flex items-center gap-1 text-xs font-semibold canopy-cmdk-shortcut" }, /* @__PURE__ */ React13.createElement("span", null, "\u2318"), /* @__PURE__ */ React13.createElement("span", null, "K"))
523
549
  )
524
550
  );
525
551
  }
526
552
 
527
553
  // ui/src/search/SearchPanelTeaserResults.jsx
528
- import React15 from "react";
554
+ import React14 from "react";
529
555
  function SearchPanelTeaserResults(props = {}) {
530
556
  const { style } = props || {};
531
557
  const baseStyle = {
@@ -542,7 +568,7 @@ function SearchPanelTeaserResults(props = {}) {
542
568
  overflow: "auto",
543
569
  maxHeight: "60vh"
544
570
  };
545
- return /* @__PURE__ */ React15.createElement("div", { "data-canopy-command-panel": true, style: { ...baseStyle, ...style || {} } }, /* @__PURE__ */ React15.createElement("div", { id: "cplist" }));
571
+ return /* @__PURE__ */ React14.createElement("div", { "data-canopy-command-panel": true, style: { ...baseStyle, ...style || {} } }, /* @__PURE__ */ React14.createElement("div", { id: "cplist" }));
546
572
  }
547
573
 
548
574
  // ui/src/command/MdxCommandPalette.jsx
@@ -561,17 +587,17 @@ function MdxCommandPalette(props = {}) {
561
587
  const text = typeof label === "string" && label.trim() ? label.trim() : buttonLabel;
562
588
  const resolvedSearchPath = resolveSearchPath(searchPath);
563
589
  const data = { placeholder, hotkey, maxResults, groupOrder, label: text, searchPath: resolvedSearchPath };
564
- return /* @__PURE__ */ React16.createElement("div", { "data-canopy-command": true, className: "flex-1 min-w-0" }, /* @__PURE__ */ React16.createElement("div", { className: "relative w-full" }, /* @__PURE__ */ React16.createElement("style", null, `.relative[data-canopy-panel-auto='1']:focus-within [data-canopy-command-panel]{display:block}`), /* @__PURE__ */ React16.createElement(SearchPanelForm, { placeholder, buttonLabel, label, searchPath: resolvedSearchPath }), /* @__PURE__ */ React16.createElement(SearchPanelTeaserResults, null)), /* @__PURE__ */ React16.createElement("script", { type: "application/json", dangerouslySetInnerHTML: { __html: JSON.stringify(data) } }));
590
+ return /* @__PURE__ */ React15.createElement("div", { "data-canopy-command": true, className: "flex-1 min-w-0" }, /* @__PURE__ */ React15.createElement("div", { className: "relative w-full" }, /* @__PURE__ */ React15.createElement("style", null, `.relative[data-canopy-panel-auto='1']:focus-within [data-canopy-command-panel]{display:block}`), /* @__PURE__ */ React15.createElement(SearchPanelForm, { placeholder, buttonLabel, label, searchPath: resolvedSearchPath }), /* @__PURE__ */ React15.createElement(SearchPanelTeaserResults, null)), /* @__PURE__ */ React15.createElement("script", { type: "application/json", dangerouslySetInnerHTML: { __html: JSON.stringify(data) } }));
565
591
  }
566
592
 
567
593
  // ui/src/search/SearchPanel.jsx
568
- import React17 from "react";
594
+ import React16 from "react";
569
595
  function SearchPanel(props = {}) {
570
596
  const {
571
597
  placeholder = "Search\u2026",
572
598
  hotkey = "mod+k",
573
599
  maxResults = 8,
574
- groupOrder = ["work", "page"],
600
+ groupOrder = ["work", "docs", "page"],
575
601
  // Kept for backward compat; form always renders submit
576
602
  button = true,
577
603
  // eslint-disable-line no-unused-vars
@@ -582,12 +608,11 @@ function SearchPanel(props = {}) {
582
608
  const text = typeof label === "string" && label.trim() ? label.trim() : buttonLabel;
583
609
  const resolvedSearchPath = resolveSearchPath(searchPath);
584
610
  const data = { placeholder, hotkey, maxResults, groupOrder, label: text, searchPath: resolvedSearchPath };
585
- return /* @__PURE__ */ React17.createElement("div", { "data-canopy-command": true, className: "flex-1 min-w-0" }, /* @__PURE__ */ React17.createElement("div", { className: "relative w-full" }, /* @__PURE__ */ React17.createElement("style", null, `.relative[data-canopy-panel-auto='1']:focus-within [data-canopy-command-panel]{display:block}`), /* @__PURE__ */ React17.createElement(SearchPanelForm, { placeholder, buttonLabel, label, searchPath: resolvedSearchPath }), /* @__PURE__ */ React17.createElement(SearchPanelTeaserResults, null)), /* @__PURE__ */ React17.createElement("script", { type: "application/json", dangerouslySetInnerHTML: { __html: JSON.stringify(data) } }));
611
+ return /* @__PURE__ */ React16.createElement("div", { "data-canopy-command": true, className: "flex-1 min-w-0" }, /* @__PURE__ */ React16.createElement("div", { className: "relative w-full" }, /* @__PURE__ */ React16.createElement("style", null, `.relative[data-canopy-panel-auto='1']:focus-within [data-canopy-command-panel]{display:block}`), /* @__PURE__ */ React16.createElement(SearchPanelForm, { placeholder, buttonLabel, label, searchPath: resolvedSearchPath }), /* @__PURE__ */ React16.createElement(SearchPanelTeaserResults, null)), /* @__PURE__ */ React16.createElement("script", { type: "application/json", dangerouslySetInnerHTML: { __html: JSON.stringify(data) } }));
586
612
  }
587
613
  export {
588
614
  Card,
589
615
  MdxCommandPalette as CommandPalette,
590
- Fallback,
591
616
  Grid,
592
617
  GridItem,
593
618
  HelloWorld,