@k2b/ui 0.54.0 → 0.56.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 (145) hide show
  1. package/dist/browser/actions/Toolbar.js +16 -7
  2. package/dist/browser/actions/Toolbar.js.map +1 -1
  3. package/dist/browser/chat/ChatComposer.js +28 -27
  4. package/dist/browser/chat/ChatComposer.js.map +1 -1
  5. package/dist/browser/content/Lightbox.js +917 -283
  6. package/dist/browser/content/Lightbox.js.map +1 -1
  7. package/dist/browser/content/MapDialog.js +686 -0
  8. package/dist/browser/content/MapDialog.js.map +1 -0
  9. package/dist/browser/content/MapTile.js +139 -0
  10. package/dist/browser/content/MapTile.js.map +1 -0
  11. package/dist/browser/content/MapView.js +19 -8
  12. package/dist/browser/content/MapView.js.map +1 -1
  13. package/dist/browser/content/PdfPages.js +9 -4
  14. package/dist/browser/content/PdfPages.js.map +1 -1
  15. package/dist/browser/content/PdfThumbnails.js +271 -0
  16. package/dist/browser/content/PdfThumbnails.js.map +1 -0
  17. package/dist/browser/content/PdfViewer.js +11 -3
  18. package/dist/browser/content/PdfViewer.js.map +1 -1
  19. package/dist/browser/content/Timeline.js +116 -117
  20. package/dist/browser/content/Timeline.js.map +1 -1
  21. package/dist/browser/content/code-highlight.js +24 -11
  22. package/dist/browser/content/code-highlight.js.map +1 -1
  23. package/dist/browser/content/index.js +8 -1
  24. package/dist/browser/content/index.js.map +1 -1
  25. package/dist/browser/content/lightbox-messages.js +64 -18
  26. package/dist/browser/content/lightbox-messages.js.map +1 -1
  27. package/dist/browser/content/lightbox-renderers.js +6 -0
  28. package/dist/browser/content/lightbox-renderers.js.map +1 -0
  29. package/dist/browser/content/map-dialog-messages.js +47 -0
  30. package/dist/browser/content/map-dialog-messages.js.map +1 -0
  31. package/dist/browser/content/map-navigation.js +15 -0
  32. package/dist/browser/content/map-navigation.js.map +1 -0
  33. package/dist/browser/content/map-view-messages.js +4 -0
  34. package/dist/browser/content/map-view-messages.js.map +1 -1
  35. package/dist/browser/content/map-view-types.js.map +1 -1
  36. package/dist/browser/content/map-view-worker.js +3 -3
  37. package/dist/browser/content/pdf-messages.js +16 -2
  38. package/dist/browser/content/pdf-messages.js.map +1 -1
  39. package/dist/browser/content/pdf-viewer-engine.js +15 -15
  40. package/dist/browser/content/pdf-viewer-worker.js +4 -5
  41. package/dist/browser/feedback/dialog-core.js +21 -9
  42. package/dist/browser/feedback/dialog-core.js.map +1 -1
  43. package/dist/browser/feedback/prompt-confirm.js +2 -0
  44. package/dist/browser/feedback/prompt-confirm.js.map +1 -1
  45. package/dist/browser/internal/truncated-title.js +9 -0
  46. package/dist/browser/internal/truncated-title.js.map +1 -0
  47. package/dist/browser/layout/Breadcrumbs.js +97 -0
  48. package/dist/browser/layout/Breadcrumbs.js.map +1 -0
  49. package/dist/browser/layout/DetailPanel.js +3 -5
  50. package/dist/browser/layout/DetailPanel.js.map +1 -1
  51. package/dist/browser/layout/PanelDialog.js +3 -1
  52. package/dist/browser/layout/PanelDialog.js.map +1 -1
  53. package/dist/browser/layout/index.js +1 -0
  54. package/dist/browser/layout/index.js.map +1 -1
  55. package/dist/browser/surfaces/Skeleton.js +32 -0
  56. package/dist/browser/surfaces/Skeleton.js.map +1 -1
  57. package/dist/browser/surfaces/index.js +1 -1
  58. package/dist/browser/surfaces/index.js.map +1 -1
  59. package/dist/ssr/actions/CommandMenu.js +2 -2
  60. package/dist/ssr/actions/CommandMenu.js.map +1 -1
  61. package/dist/ssr/actions/Toolbar.js +16 -7
  62. package/dist/ssr/actions/Toolbar.js.map +1 -1
  63. package/dist/ssr/chat/ChatComposer.js +31 -30
  64. package/dist/ssr/chat/ChatComposer.js.map +1 -1
  65. package/dist/ssr/content/Lightbox.js +659 -150
  66. package/dist/ssr/content/Lightbox.js.map +1 -1
  67. package/dist/ssr/content/MapDialog.js +469 -0
  68. package/dist/ssr/content/MapDialog.js.map +1 -0
  69. package/dist/ssr/content/MapTile.js +92 -0
  70. package/dist/ssr/content/MapTile.js.map +1 -0
  71. package/dist/ssr/content/MapView.js +12 -8
  72. package/dist/ssr/content/MapView.js.map +1 -1
  73. package/dist/ssr/content/PdfPages.js +9 -4
  74. package/dist/ssr/content/PdfPages.js.map +1 -1
  75. package/dist/ssr/content/PdfThumbnails.js +189 -0
  76. package/dist/ssr/content/PdfThumbnails.js.map +1 -0
  77. package/dist/ssr/content/PdfViewer.js +11 -3
  78. package/dist/ssr/content/PdfViewer.js.map +1 -1
  79. package/dist/ssr/content/Timeline.js +2 -5
  80. package/dist/ssr/content/Timeline.js.map +1 -1
  81. package/dist/ssr/content/code-highlight.js +24 -11
  82. package/dist/ssr/content/code-highlight.js.map +1 -1
  83. package/dist/ssr/content/index.js +8 -1
  84. package/dist/ssr/content/index.js.map +1 -1
  85. package/dist/ssr/content/lightbox-messages.js +64 -18
  86. package/dist/ssr/content/lightbox-messages.js.map +1 -1
  87. package/dist/ssr/content/lightbox-renderers.js +6 -0
  88. package/dist/ssr/content/lightbox-renderers.js.map +1 -0
  89. package/dist/ssr/content/map-dialog-messages.js +47 -0
  90. package/dist/ssr/content/map-dialog-messages.js.map +1 -0
  91. package/dist/ssr/content/map-navigation.js +15 -0
  92. package/dist/ssr/content/map-navigation.js.map +1 -0
  93. package/dist/ssr/content/map-view-messages.js +4 -0
  94. package/dist/ssr/content/map-view-messages.js.map +1 -1
  95. package/dist/ssr/content/map-view-types.js.map +1 -1
  96. package/dist/ssr/content/pdf-messages.js +16 -2
  97. package/dist/ssr/content/pdf-messages.js.map +1 -1
  98. package/dist/ssr/feedback/dialog-core.js +21 -9
  99. package/dist/ssr/feedback/dialog-core.js.map +1 -1
  100. package/dist/ssr/feedback/prompt-confirm.js +1 -0
  101. package/dist/ssr/feedback/prompt-confirm.js.map +1 -1
  102. package/dist/ssr/inputs/ChoiceInputs.js +2 -2
  103. package/dist/ssr/inputs/ChoiceInputs.js.map +1 -1
  104. package/dist/ssr/inputs/SignatureInput.js +2 -2
  105. package/dist/ssr/inputs/SignatureInput.js.map +1 -1
  106. package/dist/ssr/inputs/markdown/SlashCommands.js +2 -2
  107. package/dist/ssr/inputs/markdown/SlashCommands.js.map +1 -1
  108. package/dist/ssr/internal/truncated-title.js +9 -0
  109. package/dist/ssr/internal/truncated-title.js.map +1 -0
  110. package/dist/ssr/layout/Breadcrumbs.js +62 -0
  111. package/dist/ssr/layout/Breadcrumbs.js.map +1 -0
  112. package/dist/ssr/layout/DetailPanel.js +1 -4
  113. package/dist/ssr/layout/DetailPanel.js.map +1 -1
  114. package/dist/ssr/layout/PanelDialog.js +1 -0
  115. package/dist/ssr/layout/PanelDialog.js.map +1 -1
  116. package/dist/ssr/layout/index.js +1 -0
  117. package/dist/ssr/layout/index.js.map +1 -1
  118. package/dist/ssr/surfaces/Skeleton.js +32 -0
  119. package/dist/ssr/surfaces/Skeleton.js.map +1 -1
  120. package/dist/ssr/surfaces/index.js +1 -1
  121. package/dist/ssr/surfaces/index.js.map +1 -1
  122. package/dist/styles.css +1 -1
  123. package/dist/types/actions/Toolbar.d.ts +6 -0
  124. package/dist/types/chat/ChatComposer.d.ts +1 -0
  125. package/dist/types/content/Lightbox.d.ts +54 -14
  126. package/dist/types/content/MapDialog.d.ts +105 -0
  127. package/dist/types/content/MapTile.d.ts +37 -0
  128. package/dist/types/content/PdfPages.d.ts +7 -1
  129. package/dist/types/content/PdfThumbnails.d.ts +26 -0
  130. package/dist/types/content/PdfViewer.d.ts +12 -3
  131. package/dist/types/content/index.d.ts +7 -2
  132. package/dist/types/content/lightbox-messages.d.ts +31 -8
  133. package/dist/types/content/lightbox-renderers.d.ts +3 -0
  134. package/dist/types/content/map-dialog-messages.d.ts +19 -0
  135. package/dist/types/content/map-navigation.d.ts +13 -0
  136. package/dist/types/content/map-view-messages.d.ts +2 -0
  137. package/dist/types/content/map-view-types.d.ts +5 -0
  138. package/dist/types/content/pdf-messages.d.ts +7 -0
  139. package/dist/types/feedback/dialog-core.d.ts +6 -0
  140. package/dist/types/internal/truncated-title.d.ts +7 -0
  141. package/dist/types/layout/Breadcrumbs.d.ts +19 -0
  142. package/dist/types/layout/index.d.ts +1 -0
  143. package/dist/types/surfaces/Skeleton.d.ts +13 -1
  144. package/dist/types/surfaces/index.d.ts +1 -1
  145. package/package.json +20 -20
@@ -1,4 +1,5 @@
1
1
  import { type JSX } from "solid-js";
2
+ import { type DropdownItem } from "./Dropdown";
2
3
  export type ToolbarProps = {
3
4
  children: JSX.Element;
4
5
  label: string;
@@ -14,6 +15,11 @@ export type ToolbarProps = {
14
15
  * ignore it.
15
16
  */
16
17
  tone?: "danger";
18
+ /**
19
+ * Rarer commands of a floating toolbar that always live in More, such as Copy to or Move to trash for a selection.
20
+ * More then always shows; actions that move there on a narrow row come first, these follow in their own group.
21
+ */
22
+ moreItems?: readonly DropdownItem[];
17
23
  class?: string;
18
24
  };
19
25
  export type ToolbarActionProps = {
@@ -218,6 +218,7 @@ export type ChatComposerProps = {
218
218
  submitDisabled?: boolean;
219
219
  error?: string;
220
220
  focusToken?: unknown;
221
+ /** Names the draft. A new value starts another draft and closes the open lists; the same value keeps them. */
221
222
  draftKey?: unknown;
222
223
  class?: string;
223
224
  /**
@@ -1,26 +1,66 @@
1
- /** One more thing to do with the shown image, beside Download: a short label, its icon class, and what it does. */
1
+ import { type JSX } from "solid-js";
2
+ import type { FileViewContent } from "./FileView";
3
+ import { type FileViewFile } from "./file-view-preview";
4
+ /** One more command for the shown file, in the action pill before Download: a short label, its icon, and what it does. */
2
5
  export type LightboxAction = {
3
6
  label: string;
4
7
  icon: string;
5
8
  onClick: () => void;
6
9
  };
7
- export type LightboxImage = {
8
- src: string;
9
- alt?: string;
10
+ /**
11
+ * One file the Lightbox can show. Give what the file has: `src` for an image, video, audio file or PDF the browser
12
+ * reads from an address; `load` for text, Markdown, code or PDF bytes; `preview` for a document that only exists as
13
+ * a preview PDF, such as an Office file. `file` names the type when the name alone does not.
14
+ */
15
+ export type LightboxItem = {
16
+ /** The name in the pill at the top and in the dialog's accessible name. It never wraps. */
17
+ name: string;
18
+ /** Quiet facts after the name, such as "PDF · 5.1 MB". */
19
+ meta?: string;
20
+ /** Path, media type and size; they choose the renderer as in `FileView`. Defaults to the name. */
21
+ file?: FileViewFile;
22
+ /**
23
+ * An address on this site the browser reads directly: an image, video, audio file, or PDF. A function resolves it
24
+ * when the file is shown, such as a short-lived signed address; "Try again" and a video that runs past its address
25
+ * ask it for a fresh one. Every loader receives a signal that aborts when the person moves on or closes.
26
+ */
27
+ src?: string | ((signal: AbortSignal) => Promise<string>);
28
+ /** Loads text, Markdown, code, or a PDF's bytes. */
29
+ load?: (signal: AbortSignal) => Promise<FileViewContent>;
30
+ /** Loads a preview PDF, such as one converted from an Office file. A rejection shows "Preview not possible". */
31
+ preview?: (signal: AbortSignal) => Promise<Blob>;
32
+ /** A small image for the film strip; without it the strip shows the file's type icon. */
33
+ thumbnail?: string;
34
+ /** Adds Download to the action pill. */
10
35
  downloadUrl?: string;
11
- /** Actions for this image, shown before Download in the same style. */
36
+ /** Adds Download for a file the app hands out itself, such as through a short-lived lease. */
37
+ onDownload?: () => void;
38
+ /** Adds the blue Open pill at the front, for an app that can open the file. The caller chooses where it leads. */
39
+ open?: {
40
+ label?: string;
41
+ onOpen: () => void;
42
+ };
43
+ /** More commands for this file, before Download. */
12
44
  actions?: readonly LightboxAction[];
13
- /** A small version for the thumbnail strip, shown from four images on; without it the strip loads `src`. */
14
- thumbnail?: string;
15
45
  };
16
- type LightboxProps = {
17
- images: LightboxImage[];
18
- initialIndex?: number;
46
+ export type LightboxProps = {
47
+ items: readonly LightboxItem[];
48
+ /** The shown item; the caller owns it, so it can follow a selection behind the Lightbox. */
49
+ index: number;
50
+ onIndexChange: (index: number) => void;
19
51
  onClose: () => void;
52
+ /** The caller's own control in the action pill after Open, such as "Select" in a file chooser. */
53
+ actions?: (item: LightboxItem) => JSX.Element;
20
54
  };
21
55
  /**
22
- * Minimal, accessible lightbox using native <dialog>.
23
- * Supports keyboard navigation, touch swipe gestures, and screen readers.
56
+ * The one large view of a file anywhere in Cloud: an image, PDF, video, audio file, text, Markdown, code, or a document
57
+ * shown through its preview PDF, and for anything else its icon, facts and Download. It loads the file itself and
58
+ * shows every state: a placeholder after a short wait, a failure with "Try again", and "Preview not possible".
59
+ *
60
+ * The name sits in a pill at the top left; Open (when the caller gives a target), the caller's commands, Download
61
+ * and Close in a pill at the top right. Large round buttons at the screen edges step between files, as do ← and →
62
+ * and the film strip from two files on; there is no "2 / 8" counter. The only pill at the bottom holds zoom and the
63
+ * page. Escape, Close, a press beside the file or a swipe down close it, and focus returns to the opener. On a phone
64
+ * it fills the screen and a swipe steps between files.
24
65
  */
25
- export default function Lightbox(props: LightboxProps): import("solid-js").JSX.Element;
26
- export {};
66
+ export default function Lightbox(props: LightboxProps): JSX.Element;
@@ -0,0 +1,105 @@
1
+ import { type JSX } from "solid-js";
2
+ import type { MapViewFit, MapViewLine, MapViewMarker, MapViewOwnLocation, MapViewPoint, MapViewTone } from "./map-view-types";
3
+ /** A link the host gives a place, such as "Open contact". Only http(s) and same-origin paths are rendered. */
4
+ export type MapPlaceLink = {
5
+ label: string;
6
+ href: string;
7
+ icon?: string;
8
+ };
9
+ /** Where a place's information comes from. `tone: "ai"` marks a suggestion that an account without a person made. */
10
+ export type MapPlaceSource = {
11
+ label: string;
12
+ icon?: string;
13
+ tone?: "ai";
14
+ };
15
+ export type MapPlace = {
16
+ id: string;
17
+ name: string;
18
+ /** Without a point the place is listed but has no pin; navigation then uses the address text. */
19
+ point?: MapViewPoint;
20
+ /** A number, a single letter, or "+", as on MapView markers. */
21
+ mark?: number | string;
22
+ tone?: MapViewTone;
23
+ /** The heading of the place's group in the list, such as the search that found it; shown where the group starts. */
24
+ group?: string;
25
+ /** Second line in the list. */
26
+ subtitle?: string;
27
+ /** Right column of the list row, for example a leg's minutes and kilometres. */
28
+ trailing?: string;
29
+ trailingDetail?: string;
30
+ address?: string;
31
+ hours?: string;
32
+ note?: string;
33
+ source?: MapPlaceSource;
34
+ links?: MapPlaceLink[];
35
+ /** `false` for a place that is not a destination yet, such as a candidate to choose: no navigation link. */
36
+ navigate?: boolean;
37
+ };
38
+ export type MapDialogFact = {
39
+ value: string;
40
+ label: string;
41
+ };
42
+ export type MapDialogMenuItem = {
43
+ label: string;
44
+ icon?: string;
45
+ disabled?: boolean;
46
+ onSelect: () => void;
47
+ };
48
+ /** What the host's map needs; spread it onto MapView or a wrapper of it. */
49
+ export type MapDialogMapView = {
50
+ height: number;
51
+ padding: number;
52
+ markers: MapViewMarker[];
53
+ lines?: MapViewLine[];
54
+ fit?: MapViewFit;
55
+ selectedId?: string;
56
+ onSelect: (id: string) => void;
57
+ ownLocation?: MapViewOwnLocation;
58
+ onLocate: () => void;
59
+ /** A message about the own location, for MapView's `notice`. */
60
+ notice?: JSX.Element;
61
+ };
62
+ export type MapDialogProps = {
63
+ title: string;
64
+ /** Large figures under the title, such as distance and driving time. */
65
+ facts?: MapDialogFact[];
66
+ /** A chip under the title when there are no facts, such as "12 places". */
67
+ count?: string;
68
+ /** Name of the list for assistive technology, such as "Stops". */
69
+ listLabel?: string;
70
+ places: MapPlace[];
71
+ lines?: MapViewLine[];
72
+ /** Pins beyond the places, such as a proposed stop; drawn but not listed. */
73
+ markers?: MapViewMarker[];
74
+ fit?: MapViewFit;
75
+ /** Controlled selection; otherwise the first place is selected. */
76
+ selectedId?: string;
77
+ onSelect?: (id: string) => void;
78
+ loading?: boolean;
79
+ /** Replaces the list when there are no places, for example with an action that widens the search. */
80
+ empty?: JSX.Element;
81
+ /** Renders the map; the dialog supplies its height, pins, lines, and selection. */
82
+ map: (view: MapDialogMapView) => JSX.Element;
83
+ menu?: MapDialogMenuItem[];
84
+ /** More actions beside the navigation link of the selected place. */
85
+ placeActions?: (place: MapPlace) => JSX.Element;
86
+ /** A short line under the actions, such as why one of them is unavailable right now. */
87
+ placeHint?: (place: MapPlace) => string | undefined;
88
+ /** Host content above the list, such as a confirmation or a recovery. */
89
+ notice?: JSX.Element;
90
+ /** The source line at the bottom. */
91
+ provenance?: JSX.Element;
92
+ /** The person's location after "Show my location", for example to start a route there. */
93
+ onLocation?: (location: MapViewOwnLocation) => void;
94
+ onClose: () => void;
95
+ };
96
+ /** Only web links and same-origin paths; any other scheme is dropped. */
97
+ export declare const safeMapLink: (href: string) => {
98
+ href: string;
99
+ external: boolean;
100
+ } | null;
101
+ /**
102
+ * The full map: map and list side by side in a dialog, on a phone the map on the whole screen with the list as a
103
+ * sheet. Map and list share one selection; the selected place shows its details and a navigation link.
104
+ */
105
+ export declare function MapDialog(props: MapDialogProps): JSX.Element;
@@ -0,0 +1,37 @@
1
+ import { type JSX } from "solid-js";
2
+ /** The query parameter that names the open map dialog, so a reload opens it again. */
3
+ export declare const MAP_DIALOG_PARAM = "map";
4
+ /** Dialog options for MapDialog: a large dialog, the whole screen below 48rem; Back closes it. */
5
+ export declare const mapDialogOptions: {
6
+ panelClassName: string;
7
+ contentClassName: string;
8
+ history: true;
9
+ };
10
+ export type MapTileProps = {
11
+ /** Accessible name of the whole tile, such as "Open map: Delivery Thursday, 86.4 km, 4 stops". */
12
+ label: string;
13
+ /** The short summary in the pill, such as "86.4 km · 1 h 32 min · A → B → C". */
14
+ summary: JSX.Element;
15
+ /** The places are still loading: the pill shows progress and the tile does not open yet. */
16
+ loading?: boolean;
17
+ /** Renders the dialog content, normally a MapDialog; `close` closes the dialog. */
18
+ dialog: (close: () => void) => JSX.Element;
19
+ /**
20
+ * A stable id of this map on the page. While its dialog is open the URL carries `?map=<restoreId>`, and a reload
21
+ * opens the dialog again. Omit it for maps without a stable id; their dialog stays closed after a reload.
22
+ */
23
+ restoreId?: string;
24
+ /**
25
+ * More query parameters the dialog's address carries with `restoreId`, so a reload reaches the tile again, such as
26
+ * the message of a long conversation that holds the map.
27
+ */
28
+ restoreQuery?: Record<string, string>;
29
+ /** The still map, for example `<MapView still … />`, in the size of the tile. */
30
+ children: JSX.Element;
31
+ class?: string;
32
+ };
33
+ /**
34
+ * A small map that is one button: the map image with a summary pill on it. Activating it opens the full map in a
35
+ * dialog. Back, Escape, and the close button close the dialog; focus returns to the tile.
36
+ */
37
+ export declare function MapTile(props: MapTileProps): JSX.Element;
@@ -14,6 +14,8 @@ export type PdfPagesProps = {
14
14
  title: string;
15
15
  /** Without the zoom bar, always fitted. Defaults to `true`. */
16
16
  zoom?: boolean;
17
+ /** With `zoom` false, a factor of the fitted width, for a host that zooms with its own controls. Defaults to 1. */
18
+ scale?: number;
17
19
  /**
18
20
  * How a fitted document fills the area: `"width"` (the default) fits each page to the area's width, for reading;
19
21
  * `"page"` shows the whole first page in the area's height, narrower, for a preview beside other content.
@@ -23,9 +25,13 @@ export type PdfPagesProps = {
23
25
  /** Shows only this page (zero-based) instead of all pages one below the other. */
24
26
  page?: number;
25
27
  /** The first visible page is drawn; a host can drop its loading state. */
26
- onReady?: () => void;
28
+ onReady?: (document: {
29
+ pages: number;
30
+ }) => void;
27
31
  /** The document could not be opened, or a page could not be drawn and has no image yet. */
28
32
  onError?: (error: unknown) => void;
33
+ /** The page in the middle of the view changed (zero-based), for a host that shows "Page 2 / 4" itself. */
34
+ onPage?: (index: number) => void;
29
35
  /** Icons after the fit, in this order. */
30
36
  actions?: readonly PdfPagesAction[];
31
37
  };
@@ -0,0 +1,26 @@
1
+ import { type JSX } from "solid-js";
2
+ export type PdfThumbnailsProps = {
3
+ /** The PDF's bytes; `null` while the host still loads them, which shows placeholders in place. */
4
+ data: Blob | ArrayBuffer | null;
5
+ /** The document's name, for the list's accessible name. */
6
+ title: string;
7
+ /** Shows at most this many pages; a quiet "+n" tile says how many follow. */
8
+ limit?: number;
9
+ /** `sm` is a strip of small tiles beside a name; `md` is a grid of pages to choose from. Defaults to `sm`. */
10
+ size?: "sm" | "md";
11
+ /** Zero-based pages that are chosen. With `onToggle`, every page is a toggle button. */
12
+ selected?: ReadonlySet<number>;
13
+ onToggle?: (index: number) => void;
14
+ /** The document's page count, once it opened. */
15
+ onPages?: (count: number) => void;
16
+ /** The document could not be opened; the tiles say so in place. */
17
+ onError?: (error: unknown) => void;
18
+ class?: string;
19
+ };
20
+ /**
21
+ * Small pictures of a PDF's pages, drawn by pdf.js in the browser: a strip beside a file in a list, or a grid of pages
22
+ * to pick. Every tile keeps the page's proportions from the moment the document opens, so nothing moves while pages
23
+ * are drawn one after another; a tile far below the view waits until it scrolls near.
24
+ */
25
+ export declare function PdfThumbnails(props: PdfThumbnailsProps): JSX.Element;
26
+ export default PdfThumbnails;
@@ -26,6 +26,11 @@ export type PdfViewerProps = {
26
26
  open?: boolean | string;
27
27
  /** Without the zoom controls, always fitted. Defaults to `true`. */
28
28
  zoom?: boolean;
29
+ /**
30
+ * With `zoom` false, a factor of the fitted width, such as 1.5, for a host that zooms with its own controls, like
31
+ * `Lightbox`. Defaults to 1.
32
+ */
33
+ scale?: number;
29
34
  /**
30
35
  * How a fitted document fills the area: `"width"` (the default) fits each page to the area's width, for reading;
31
36
  * `"page"` shows the whole first page in the area's height, narrower, for a preview beside other content.
@@ -34,10 +39,14 @@ export type PdfViewerProps = {
34
39
  fit?: "width" | "page";
35
40
  /** Shows only this page (zero-based) instead of all pages one below the other. */
36
41
  page?: number;
37
- /** The first visible page is drawn. */
38
- onReady?: () => void;
39
- /** pdf.js could not open or draw the document; the viewer shows its error state. */
42
+ /** The first visible page is drawn; `pages` counts the document's pages, such as for a host's "4 pages". */
43
+ onReady?: (document: {
44
+ pages: number;
45
+ }) => void;
46
+ /** The request failed, or pdf.js could not open or draw the document; the viewer shows its error state. */
40
47
  onError?: (error: unknown) => void;
48
+ /** The page in the middle of the view changed (zero-based), for a host that shows "Page 2 / 4" itself. */
49
+ onPage?: (index: number) => void;
41
50
  class?: string;
42
51
  };
43
52
  /**
@@ -34,25 +34,29 @@ export { FileBrowserPanel, type FileBrowserPanelProps, type FileSource, openFile
34
34
  export { FileGrid, type FileGridGroup, type FileGridOpenProps, type FileGridProps, type FileGridSelectableProps } from "./FileGrid";
35
35
  export { default as FileTree, type FileTreeActions, type FileTreeEntry, type FileTreeProps } from "./FileTree";
36
36
  export { type FileType, FileTypeIcon, type FileTypeIconProps, fileKindLabel, fileTypeOf } from "./FileTypeIcon";
37
- export { canPreviewFile, default as FileView, type FileViewContent, type FileViewFile, type FileViewPreviewKind, type FileViewProps, type FileViewRenderer, type FileViewRendererProps, formatFileViewSize, getFileViewPreviewKind, } from "./FileView";
37
+ export { default as FileView, type FileViewContent, type FileViewProps, type FileViewRenderer, type FileViewRendererProps, formatFileViewSize, } from "./FileView";
38
38
  export { FlowAmount, type FlowAmountDirection, type FlowAmountProps, flowDirection } from "./FlowAmount";
39
+ export { canPreviewFile, type FileViewFile, type FileViewPreviewKind, getFileViewPreviewKind } from "./file-view-preview";
39
40
  export type { KbdProps } from "./Kbd";
40
41
  export { Kbd } from "./Kbd";
41
42
  export type { LabelChipProps } from "./LabelChip";
42
43
  export { LabelChip } from "./LabelChip";
43
- export type { LightboxAction, LightboxImage } from "./Lightbox";
44
+ export type { LightboxAction, LightboxItem, LightboxProps } from "./Lightbox";
44
45
  export { default as Lightbox } from "./Lightbox";
45
46
  export type { LoadMoreProps } from "./LoadMore";
46
47
  export { LoadMore } from "./LoadMore";
47
48
  export type { LogTableEntry } from "./LogEntriesTable";
48
49
  export { default as LogEntriesTable } from "./LogEntriesTable";
49
50
  export { MapAttribution } from "./MapAttribution";
51
+ export { MapDialog, type MapDialogFact, type MapDialogMapView, type MapDialogMenuItem, type MapDialogProps, type MapPlace, type MapPlaceLink, type MapPlaceSource, } from "./MapDialog";
52
+ export { MAP_DIALOG_PARAM, MapTile, type MapTileProps, mapDialogOptions } from "./MapTile";
50
53
  export { MapView } from "./MapView";
51
54
  export { MapViewFrame } from "./MapViewFrame";
52
55
  export { default as MarkdownView, type MarkdownRenderOptions, type MarkdownViewProps, renderSafeMarkdown } from "./MarkdownView";
53
56
  export { type MatchRange, MatchText, type MatchTextProps, matchParts } from "./MatchText";
54
57
  export type { MessageEventGroupProps, MessageEventRowProps, MessageGroupEntry, MessageRowAction, MessageRowAttachment, MessageRowAuthor, MessageRowFile, MessageRowMedia, MessageRowOrigin, MessageRowProgress, MessageRowProps, MessageRowQuote, MessageRowReaction, MessageRowStatus, MessageRowThread, MessageSystemRowProps, } from "./MessageRow";
55
58
  export { MessageEventGroup, MessageEventRow, MessageRow, MessageSystemRow, startsMessageGroup } from "./MessageRow";
59
+ export { type GeoNavigationPlatform, geoNavigationHref, geoNavigationPlatform } from "./map-navigation";
56
60
  export { type MapPaletteColors, type MapTheme, mapPalette } from "./map-palette";
57
61
  export { type MapStyleOptions, mapAttribution, mapStyle } from "./map-style";
58
62
  export { MAP_SNAPSHOT_MAX_PIXELS, MapSnapshotError, type MapSnapshotErrorCode } from "./map-view-snapshot";
@@ -60,6 +64,7 @@ export type { MapViewArea, MapViewFit, MapViewFrameProps, MapViewHandle, MapView
60
64
  export { MARKDOWN_CALLOUT_CLASSES, MARKDOWN_CALLOUT_ICON_ATTRIBUTES, type MarkdownInfoBlock, type MarkdownInfoBlockRenderInput, type MarkdownInfoBlockType, markdownInfoBlocks, renderMarkdownInfoBlock, scanMarkdownInfoBlock, } from "./markdown-info-blocks";
61
65
  export { type MarkdownLinkInput, type MarkdownReference, type MarkdownReferenceKind, type MarkdownReferenceType, markdownLinkReference, markdownReferenceIcon, markdownReferenceType, markdownReferenceTypeLabel, markStandaloneLinks, renderMarkdownLink, } from "./markdown-links";
62
66
  export { Pagination, type PaginationProps } from "./Pagination";
67
+ export { PdfThumbnails, type PdfThumbnailsProps } from "./PdfThumbnails";
63
68
  export type { PdfViewerProps, PdfViewerRequest } from "./PdfViewer";
64
69
  export { default as PdfViewer } from "./PdfViewer";
65
70
  export type { RangeOption, RangePickerProps } from "./RangePicker";
@@ -1,13 +1,36 @@
1
1
  declare const lightboxMessages: import("@k2b/stdlib").Catalog<{
2
- closeLightbox: string;
3
- downloadImage: string;
4
- imageLightbox: string;
5
- imageNavigation: string;
6
- nextImage: string;
7
- previousImage: string;
8
- goToImage: ({ index }: {
9
- index: number;
2
+ actions: string;
3
+ close: string;
4
+ closeHint: string;
5
+ download: string;
6
+ open: string;
7
+ previous: string;
8
+ next: string;
9
+ files: string;
10
+ view: string;
11
+ zoomIn: string;
12
+ zoomOut: string;
13
+ percent: ({ value }: {
14
+ value: number;
10
15
  }) => string;
16
+ page: ({ number, total }: {
17
+ number: number;
18
+ total: number;
19
+ }) => string;
20
+ sheet: ({ number, total }: {
21
+ number: number;
22
+ total: number;
23
+ }) => string;
24
+ loading: string;
25
+ converting: string;
26
+ failed: string;
27
+ failedHint: string;
28
+ retry: string;
29
+ notPossible: string;
30
+ notPossibleHint: string;
31
+ noPreview: string;
32
+ noPreviewHint: string;
33
+ viewOnly: string;
11
34
  }>;
12
35
  export type LightboxMessages = ReturnType<(typeof lightboxMessages)["resolve"]>["t"];
13
36
  /** Resolved from the inherited render locale. */
@@ -0,0 +1,3 @@
1
+ export { default as FileView } from "./FileView";
2
+ export { default as PdfViewer } from "./PdfViewer";
3
+ export { default as VideoPlayer } from "./VideoPlayer";
@@ -0,0 +1,19 @@
1
+ import type { GeoNavigationPlatform } from "./map-navigation";
2
+ export declare const useMapDialogMessages: () => () => {
3
+ open: string;
4
+ close: string;
5
+ more: string;
6
+ places: string;
7
+ copyAddress: string;
8
+ copied: string;
9
+ navigate: ({ platform }: {
10
+ platform: GeoNavigationPlatform;
11
+ }) => string;
12
+ loading: string;
13
+ empty: string;
14
+ enlarge: string;
15
+ shrink: string;
16
+ noLocation: string;
17
+ locationFailed: string;
18
+ };
19
+ export declare const checkMapDialogMessages: () => import("@k2b/stdlib").CatalogIssue[];
@@ -0,0 +1,13 @@
1
+ import type { MapViewPoint } from "./map-view-types";
2
+ export type GeoNavigationPlatform = "android" | "ios" | "desktop";
3
+ /** Phones open their own maps app; everything else gets OpenStreetMap. */
4
+ export declare const geoNavigationPlatform: (userAgent: string) => GeoNavigationPlatform;
5
+ /**
6
+ * A link into a navigation app. There is no live navigation; the link leaves the page only on click and carries
7
+ * just the destination and an optional name. Without a point it navigates to the address text.
8
+ */
9
+ export declare const geoNavigationHref: (target: {
10
+ point?: MapViewPoint | null;
11
+ text: string;
12
+ name?: string;
13
+ }, platform: GeoNavigationPlatform) => string;
@@ -9,9 +9,11 @@ export declare const useMapViewMessages: () => () => {
9
9
  locate: string;
10
10
  loading: string;
11
11
  error: string;
12
+ errorShort: string;
12
13
  retry: string;
13
14
  reload: string;
14
15
  noWebgl: string;
16
+ noWebglShort: string;
15
17
  ownLocation: string;
16
18
  canvasTitle: string;
17
19
  gestureWindows: string;
@@ -68,6 +68,11 @@ export type MapViewProps = Omit<MapViewFrameProps, "attribution"> & {
68
68
  /** Browser-only handle; remains safely callable after disposal (rejects disposed). */
69
69
  ref?: (handle: MapViewHandle) => void;
70
70
  attribution: JSX.Element;
71
+ /**
72
+ * A calm picture: the map image loads, but there are no controls, gestures, pin selection, or info tile, and pins
73
+ * are labelled images. MapTile uses it; its own button opens the full map.
74
+ */
75
+ still?: boolean;
71
76
  onSelect?: (id: string) => void;
72
77
  infoTile?: (marker: MapViewMarker) => JSX.Element;
73
78
  notice?: JSX.Element;
@@ -26,6 +26,13 @@ declare const pdfMessages: import("@k2b/stdlib").Catalog<{
26
26
  }) => string;
27
27
  pdfFitWidthLabel: string;
28
28
  pdfFitPageLabel: string;
29
+ pdfThumbnailPage: ({ number }: {
30
+ number: number;
31
+ }) => string;
32
+ pdfThumbnailMore: ({ count }: {
33
+ count: number;
34
+ }) => string;
35
+ pdfThumbnailsFailed: string;
29
36
  }>;
30
37
  export type PdfMessages = ReturnType<(typeof pdfMessages)["resolve"]>["t"];
31
38
  /** Resolved from the inherited render locale. */
@@ -21,6 +21,12 @@ export type OpenDialogOptions = {
21
21
  * A traversal that `@k2b/ssr/nav` hides from popstate listeners reaches this core through `ssr:nav-popstate`.
22
22
  */
23
23
  history?: boolean;
24
+ /**
25
+ * With `history`, the URL of the dialog's own entry, such as the page URL with a query parameter that names the
26
+ * dialog. Closing returns to the entry below with its own URL. A reload on that entry keeps the URL; opening a
27
+ * dialog with the same `historyUrl` then resumes the entry instead of adding another above it.
28
+ */
29
+ historyUrl?: string;
24
30
  };
25
31
  export type DialogRender<T> = (close: DialogClose<T>, context: {
26
32
  dialog: HTMLDialogElement;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Titles in headers stay on one line and end with an ellipsis, so a long name never moves what follows. Pointing at a
3
+ * cut title shows all of it as the native hint; assistive technology reads the full text content either way.
4
+ */
5
+ export declare const showTruncatedTitle: (event: PointerEvent & {
6
+ currentTarget: HTMLElement;
7
+ }) => void;
@@ -0,0 +1,19 @@
1
+ import { type JSX } from "solid-js";
2
+ export type BreadcrumbItem = {
3
+ label: string;
4
+ };
5
+ export type BreadcrumbsProps = {
6
+ /** The path from the top: every item but the last is a link, the last is the current place. */
7
+ items: readonly BreadcrumbItem[];
8
+ /** Names the path for assistive technology, for example "Path". */
9
+ label: string;
10
+ /** Called with the index of the link that was activated; never for the current place. */
11
+ onSelect: (index: number) => void;
12
+ disabled?: boolean;
13
+ class?: string;
14
+ };
15
+ /**
16
+ * A path inside a dialog or panel: the levels above as blue text links, the current level as text. It stays on one
17
+ * line; a long path scrolls sideways with a fade on the side where more follows, and shows its end after each change.
18
+ */
19
+ export declare function Breadcrumbs(props: BreadcrumbsProps): JSX.Element;
@@ -10,6 +10,7 @@ export { installAppWorkspaceController, parkWorkspaceDetailDrawers } from "./app
10
10
  export type { AppWorkspaceLayoutState, AppWorkspaceResizeKind, } from "./app-workspace-state";
11
11
  export { APP_WORKSPACE_DETAIL_DEFAULT, APP_WORKSPACE_DETAIL_MAX, APP_WORKSPACE_DETAIL_MIN, APP_WORKSPACE_DRAWER_DEFAULT, APP_WORKSPACE_DRAWER_MAX, APP_WORKSPACE_DRAWER_MIN, APP_WORKSPACE_MAIN_MIN, APP_WORKSPACE_MAIN_MIN_HEIGHT, APP_WORKSPACE_PANE_DEFAULT, APP_WORKSPACE_PANE_MAX, APP_WORKSPACE_PANE_MIN, APP_WORKSPACE_SIDEBAR_COLLAPSE_THRESHOLD, APP_WORKSPACE_SIDEBAR_COLLAPSED, APP_WORKSPACE_SIDEBAR_DEFAULT, APP_WORKSPACE_SIDEBAR_MAX, APP_WORKSPACE_SIDEBAR_MIN, appWorkspaceLayoutStyle, appWorkspacePanelVariable, appWorkspaceResizeLimits, normalizeAppWorkspaceLayoutState, parseAppWorkspaceLayoutState, resolveAppWorkspaceSidebarWidth, safeAppWorkspacePanelId, serializeAppWorkspaceLayoutState, shouldCollapseAppWorkspaceSidebar, } from "./app-workspace-state";
12
12
  export { type BottomSheetProps, bottomSheetAdaptiveOptions, bottomSheetOptions, default as BottomSheet } from "./BottomSheet";
13
+ export { type BreadcrumbItem, Breadcrumbs, type BreadcrumbsProps } from "./Breadcrumbs";
13
14
  export type { DataPanelProps } from "./DataPanel";
14
15
  export { DataPanel } from "./DataPanel";
15
16
  export type { DetailPanelActionButtonProps, DetailPanelActionCheckbox, DetailPanelActionLinkProps, DetailPanelActionProps, DetailPanelActionSecondary, DetailPanelBodyProps, DetailPanelGroupProps, DetailPanelHeaderProps, DetailPanelProps, DetailPanelRowProps, DetailPanelSummaryProps, } from "./DetailPanel";
@@ -1,6 +1,18 @@
1
- import type { JSX } from "solid-js";
1
+ import { type Accessor, type JSX } from "solid-js";
2
2
  export type SkeletonProps = {
3
3
  class?: string;
4
4
  };
5
5
  /** Decorative loading geometry. The consumer owns dimensions and one accessible loading status. */
6
6
  export declare function Skeleton(props: SkeletonProps): JSX.Element;
7
+ export type DelayedLoadingOptions = {
8
+ /** How long `pending` must last before the loading state shows. Defaults to 200 ms. */
9
+ delay?: number;
10
+ /** How long a shown loading state stays at least, also when the answer arrives sooner. Defaults to 300 ms. */
11
+ minimum?: number;
12
+ };
13
+ /**
14
+ * Whether a loading state, such as `Skeleton` rows, should show for `pending`: only once it lasted `delay`, then for at
15
+ * least `minimum`. A fast answer never flashes placeholders, and a slow one never blinks them away. Until it is true,
16
+ * keep the previous content in place. It starts false, so server and first client render agree.
17
+ */
18
+ export declare function createDelayedLoading(pending: Accessor<boolean>, options?: DelayedLoadingOptions): Accessor<boolean>;
@@ -32,7 +32,7 @@ export type { ResourceCardColor, ResourceCardProps, ResourceCardState } from "./
32
32
  export { ResourceCard } from "./ResourceCard";
33
33
  export type { SectionFrame, SectionPartProps, SectionProps, SectionSize, SectionState, SectionTone } from "./Section";
34
34
  export { Section } from "./Section";
35
- export { Skeleton, type SkeletonProps } from "./Skeleton";
35
+ export { createDelayedLoading, type DelayedLoadingOptions, Skeleton, type SkeletonProps } from "./Skeleton";
36
36
  export type { StatCellAccent, StatCellCompare, StatCellDelta, StatCellProps, StatCellSize, StatCellTone } from "./StatCell";
37
37
  export { StatCell } from "./StatCell";
38
38
  export type { StatGridAction, StatGridColumns, StatGridProps, StatGridSize, StatGridSurface, } from "./StatGrid";