@inkbar/svelte 0.9.0 → 0.10.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 (56) hide show
  1. package/README.md +64 -3
  2. package/dist/components/InkDownloadButton.svelte +62 -0
  3. package/dist/components/InkDownloadButton.svelte.d.ts +14 -0
  4. package/dist/components/InkDownloadButton.svelte.d.ts.map +1 -0
  5. package/dist/components/InkFindBar.svelte +18 -15
  6. package/dist/components/InkFindBar.svelte.d.ts.map +1 -1
  7. package/dist/components/InkPanel.svelte +73 -0
  8. package/dist/components/InkPanel.svelte.d.ts +18 -0
  9. package/dist/components/InkPanel.svelte.d.ts.map +1 -0
  10. package/dist/components/InkPrintButton.svelte +57 -0
  11. package/dist/components/InkPrintButton.svelte.d.ts +12 -0
  12. package/dist/components/InkPrintButton.svelte.d.ts.map +1 -0
  13. package/dist/components/InkRecordList.svelte +91 -0
  14. package/dist/components/InkRecordList.svelte.d.ts +72 -0
  15. package/dist/components/InkRecordList.svelte.d.ts.map +1 -0
  16. package/dist/components/InkRoot.svelte +4 -0
  17. package/dist/components/InkRoot.svelte.d.ts.map +1 -1
  18. package/dist/components/InkSearchResults.svelte +72 -0
  19. package/dist/components/InkSearchResults.svelte.d.ts +9 -0
  20. package/dist/components/InkSearchResults.svelte.d.ts.map +1 -0
  21. package/dist/components/InkSidebar.svelte +179 -0
  22. package/dist/components/InkSidebar.svelte.d.ts +22 -0
  23. package/dist/components/InkSidebar.svelte.d.ts.map +1 -0
  24. package/dist/components/InkThumbnail.svelte +74 -0
  25. package/dist/components/InkThumbnail.svelte.d.ts +19 -0
  26. package/dist/components/InkThumbnail.svelte.d.ts.map +1 -0
  27. package/dist/components/InkThumbnails.svelte +146 -0
  28. package/dist/components/InkThumbnails.svelte.d.ts +24 -0
  29. package/dist/components/InkThumbnails.svelte.d.ts.map +1 -0
  30. package/dist/components/InkZoomSelect.svelte +1 -1
  31. package/dist/components/RecordCards.svelte +173 -0
  32. package/dist/components/RecordCards.svelte.d.ts +16 -0
  33. package/dist/components/RecordCards.svelte.d.ts.map +1 -0
  34. package/dist/components/SidebarTrigger.svelte +20 -0
  35. package/dist/components/SidebarTrigger.svelte.d.ts +9 -0
  36. package/dist/components/SidebarTrigger.svelte.d.ts.map +1 -0
  37. package/dist/components/sidebar-context.d.ts +24 -0
  38. package/dist/components/sidebar-context.d.ts.map +1 -0
  39. package/dist/components/sidebar-context.js +13 -0
  40. package/dist/hooks/useAnnotations.svelte.d.ts +78 -0
  41. package/dist/hooks/useAnnotations.svelte.d.ts.map +1 -1
  42. package/dist/hooks/useRecordSelection.svelte.d.ts +11 -0
  43. package/dist/hooks/useRecordSelection.svelte.d.ts.map +1 -0
  44. package/dist/hooks/useRecordSelection.svelte.js +19 -0
  45. package/dist/hooks/useRecords.svelte.d.ts +14 -0
  46. package/dist/hooks/useRecords.svelte.d.ts.map +1 -0
  47. package/dist/hooks/useRecords.svelte.js +24 -0
  48. package/dist/hooks/useSearch.svelte.d.ts.map +1 -1
  49. package/dist/hooks/useSearch.svelte.js +1 -0
  50. package/dist/index.d.ts +18 -0
  51. package/dist/index.d.ts.map +1 -1
  52. package/dist/index.js +10 -0
  53. package/dist/to-readable.svelte.d.ts +8 -0
  54. package/dist/to-readable.svelte.d.ts.map +1 -0
  55. package/dist/to-readable.svelte.js +15 -0
  56. package/package.json +5 -5
package/README.md CHANGED
@@ -191,11 +191,71 @@ Plugin stores undo with annotations. In controlled mode with `history`, each und
191
191
 
192
192
  The bar handles Escape itself and stops it there, so an `onkeydown` you pass to `InkFindBar` never sees Escape.
193
193
 
194
+ ## Sidebars
195
+
196
+ `InkSidebar` holds `InkPanel`s and places nothing itself: put it beside `InkViewport` with your own flex or grid layout. Each panel has an `id`, a `label`, an optional `icon` (an `IconNode` from `@inkbar/icons`) and an optional `badge`, a number or short string hidden when empty or 0. Its children are the panel's content, your own component or one of Inkbar's.
197
+
198
+ ```svelte
199
+ <InkRoot {src} {assets}>
200
+ <div class="app">
201
+ <InkSidebar side="left" layout="rail" bind:open>
202
+ <InkPanel id="pages" label="Pages" icon={Square}>
203
+ <InkThumbnails />
204
+ </InkPanel>
205
+ <InkPanel id="notes" label="Notes" icon={MessageSquare} badge={noteCount}>
206
+ <MyNotes />
207
+ </InkPanel>
208
+ </InkSidebar>
209
+ <InkViewport />
210
+ </div>
211
+ </InkRoot>
212
+ ```
213
+
214
+ `layout` is `rail` (default: icon buttons beside the document, and activating the open panel's button closes it), `tabs` (labelled tabs, one panel open) or `stack` (a header per panel, any number expanded). `side` (`left` by default) decides which edge the rail and border sit on. `bind:open` is the open panel's id, or `null`, for rail and tabs, and the expanded ids for stack. Left out, the first panel starts open. When the open panel goes (an `{#if}`), rail and tabs open the first one left and stack drops it, and the bound `open` receives the new value. In the rail, the open panel shows its label as a title above its content. `visible` (default `true`) shows or hides the whole sidebar; it keeps the open panel, its content and its scroll for when it shows again. Your code decides when: `visible={hits > 0}` keeps a results sidebar out of the way until a search finds something.
215
+
216
+ Panels take their place in the order they appear in the markup, including one added later with `{#if}`. A closed panel stays mounted and hidden, so its content keeps its state and scroll position, across layout changes too. The keys and ARIA are core's: see the [`@inkbar/core` README](https://github.com/inkbar/inkbar/tree/main/packages/core#sidebars). The sidebar needs no document and works outside `InkRoot`. On the server it renders its frame with the open panel showing, and the stack headers; rail and tab buttons follow once it has mounted.
217
+
218
+ ## Thumbnails
219
+
220
+ `InkThumbnail` draws one page (0-based `page`) as a small image, with its annotations and plugin marks. Give it a `width` or a `height` and the other follows the page; with neither it is 120px wide. `annotations={false}` and `marks={false}` leave those out, and `label` replaces its accessible name ("Page 4" for page 3). It is an image with no focus or click behaviour, so wrap it in the control you need, a checkbox label in a dialog for instance.
221
+
222
+ `InkThumbnails` lists the pages as thumbnails, each a button that scrolls the viewport to its page, with the current page marked `aria-current="page"`. It fills its parent's height and scrolls. `pages` lists the pages to show, in order. The thumbnails fill the list's width less a 16px gutter each side and follow it as it resizes; `width` fixes them at that many pixels instead. `annotations` and `marks` pass to each thumbnail. Only the items near the visible part are mounted. The `item` snippet adds to each item after its page number:
223
+
224
+ ```svelte
225
+ <InkThumbnails>
226
+ {#snippet item({ page, current })}
227
+ <span class="page-count">{counts[page]}</span>
228
+ {/snippet}
229
+ </InkThumbnails>
230
+ ```
231
+
232
+ An item's height is worked out from its page alone, so position what you add absolutely. The `item` snippet renders inside the item's `<button>`: keep it non-interactive, with no links, buttons or inputs. Both need `InkRoot` and render empty on the server.
233
+
234
+ ## Record lists
235
+
236
+ `InkRecordList` lists a plugin's records as cards, the same cards their marks open, with the same actions. Name the records `<plugin>.<name>`:
237
+
238
+ ```svelte
239
+ <InkPanel id="suggestions" label="Suggestions" icon={MessageSquare} badge={count}>
240
+ <InkRecordList records="review.suggestions" bind:count>
241
+ {#snippet empty()}No suggestions left.{/snippet}
242
+ </InkRecordList>
243
+ </InkPanel>
244
+ ```
245
+
246
+ The list and the marks share one selection: choosing a card selects its mark and scrolls the viewer there, and activating a mark selects its card. Each action runs in one undo step. `card`, `where` and `sort` replace the marks' card, filter and reading order. A new function rebuilds the list, so define them once in the script, never inline in the markup. `bind:count` receives the number listed whenever it changes, ready for a panel badge. The `empty` snippet replaces "Nothing here yet.". To list something of your own, pass a `source` (a `RecordListSource`, as core's `recordsSource` and `searchSource` build) in place of `records`: it gets the same cards, keys and selection. With both, `source` wins.
247
+
248
+ `InkSearchResults` is the same list over the document search: one card per hit, titled with its page ("Page 2"), with its place on that page ("Match 3") and the text around it. Choosing a card makes its hit current, as the find bar's next and previous do. It has its own field, labelled "Find in document", above the cards and the find bar's match count in a footer below them; `field={false}` leaves the field out when a find bar is on the page. Field and find bar share the search state, so they never disagree.
249
+
250
+ To build your own, `useRecords<T>(name)` returns the live `records` and the `handle` to read and write them, each write one undo step, and `useRecordSelection(name)` returns `selected` and `select(id | null)`. Both need `InkRoot`. Plugins are set up once it has mounted, so until then `handle` is null, `records` is empty and nothing is selected. Both lists fill their parent's height and render empty on the server. The keys, focus and announcements are core's: see the [`@inkbar/core` README](https://github.com/inkbar/inkbar/tree/main/packages/core#record-lists).
251
+
194
252
  ## Custom rendering
195
253
 
196
- Slots are snippets. `InkViewport` takes `loading`, `empty`, `error`, `annotation` and `pageError`. `InkThreadPopover` takes `children` as a snippet that receives the popover's props. `InkToolButton` takes `children` as a snippet of `{ active, label }`, and `InkCommand` one of `{ label, busy }`. The props each receives are typed as `AnnotationSlotProps` and `ThreadPopoverSlotProps`, the same types the Vue and React packages export.
254
+ Slots are snippets. `InkViewport` takes `loading`, `empty`, `error`, `annotation` and `pageError`. `InkThreadPopover` takes `children` as a snippet that receives the popover's props. `InkToolButton` takes `children` as a snippet of `{ active, label }`, and `InkCommand` one of `{ label, busy }`. `InkThumbnails` takes `item`, and `InkRecordList` takes `empty`. The props each receives are typed as `AnnotationSlotProps` and `ThreadPopoverSlotProps`, the same types the Vue and React packages export.
255
+
256
+ `InkDownloadButton` and `InkPrintButton` download and print the open PDF; `filename` names the download (the opened `File`'s name, else the URL's last segment, else `document.pdf`). Printing loads the file into a hidden frame and opens the browser's print dialog for it; on iOS the PDF opens in a new tab instead. Until saving into the PDF ships, both give the file as it was opened, without this session's annotations.
197
257
 
198
- `InkRoot`, `InkToolbar`, `InkToolButton`, `InkCommand`, `InkUndo`, `InkRedo`, `InkPrevPage`, `InkNextPage`, `InkZoomIn` and `InkZoomOut` take a `child` snippet to render your own element. Spread the `props` it gives you on that element. The snippet type is exported as `ChildSnippet`.
258
+ `InkRoot`, `InkToolbar`, `InkToolButton`, `InkCommand`, `InkUndo`, `InkRedo`, `InkDownloadButton`, `InkPrintButton`, `InkPrevPage`, `InkNextPage`, `InkZoomIn` and `InkZoomOut` take a `child` snippet to render your own element. Spread the `props` it gives you on that element. The snippet type is exported as `ChildSnippet`.
199
259
 
200
260
  ```svelte
201
261
  <InkToolbar>
@@ -213,6 +273,7 @@ The scroll area takes focus. From there:
213
273
  - With the `note` tool active, `Enter` places a note at the centre of the current page and opens it.
214
274
  - With the `signature` tool active, `Enter` places the chosen signature at the centre of the current page.
215
275
  - `Ctrl` or `Cmd` + `Z` undoes. `Ctrl` or `Cmd` + `Shift` + `Z`, or `Ctrl` + `Y`, redoes. `Ctrl` and `Cmd` both work on every platform. The keys do what `InkUndo` and `InkRedo` do, from anywhere in `InkRoot`, toolbars included, and act only while that button is enabled. In a text field or editable content the keys stay with the element, so a field keeps its own text undo. In a `<select>` they are left to the browser, which does nothing with them.
276
+ - `Ctrl` or `Cmd` + `P` prints the PDF and `Ctrl` or `Cmd` + `S` downloads it, as `InkPrintButton` and `InkDownloadButton` do, from anywhere in `InkRoot` once the document is ready. Outside `InkRoot` the browser keeps them.
216
277
 
217
278
  On a focused annotation:
218
279
 
@@ -230,7 +291,7 @@ Components carry state on data attributes, for example `[data-annotation][data-s
230
291
 
231
292
  ## Hooks
232
293
 
233
- `useDocument`, `useAnnotations`, `useTool`, `useSelection`, `useZoom`, `usePage`, `useHistory`, `useEmbedded` and `useCommand` read the state of the nearest `InkRoot`. Call them during component initialisation, as you would `getContext`. Each returns an object whose reactive members are getters: read `useZoom().zoom` in your template or an effect and it tracks; destructure it (`const { zoom } = useZoom()`) and you copy the value once. Keep the object and read through it. Tool options, such as the shape kind, last as long as `InkRoot`. The tool style that `useToolStyle` reads and sets (colours, line style, text style) belongs to the document: opening another one starts again from the theme's defaults.
294
+ `useDocument`, `useAnnotations`, `useTool`, `useSelection`, `useZoom`, `usePage`, `useHistory`, `useEmbedded`, `useCommand`, `useRecords` and `useRecordSelection` read the state of the nearest `InkRoot`. Call them during component initialisation, as you would `getContext`. Each returns an object whose reactive members are getters: read `useZoom().zoom` in your template or an effect and it tracks; destructure it (`const { zoom } = useZoom()`) and you copy the value once. Keep the object and read through it. Tool options, such as the shape kind, last as long as `InkRoot`. The tool style that `useToolStyle` reads and sets (colours, line style, text style) belongs to the document: opening another one starts again from the theme's defaults.
234
295
 
235
296
  ## Licence
236
297
 
@@ -0,0 +1,62 @@
1
+ <script lang="ts" module>
2
+ import type { ChildSnippet } from './child-snippet.js'
3
+ import type { Snippet } from 'svelte'
4
+ import type { HTMLButtonAttributes } from 'svelte/elements'
5
+
6
+ export interface InkDownloadButtonProps extends Omit<HTMLButtonAttributes, 'children'> {
7
+ children?: Snippet | undefined
8
+ /** Render your own button: spread `props` on it. */
9
+ child?: ChildSnippet | undefined
10
+ /** The name to save under. Default: the document's `fileName`. */
11
+ filename?: string | undefined
12
+ }
13
+ </script>
14
+
15
+ <script lang="ts">
16
+ /*
17
+ * Saves the open document's file through the browser's download, under its `fileName`
18
+ * or `filename`. Disabled until the document is ready. Today that is the file as it was opened,
19
+ * without this session's annotations.
20
+ */
21
+ import { downloadDocument } from '@inkbar/core/dom'
22
+ import { Download } from '@inkbar/icons'
23
+ import { Toolbar } from 'bits-ui'
24
+
25
+ import { useInkContext } from '../context.js'
26
+
27
+ import { asBitsProps } from './child-snippet.js'
28
+ import InkIcon from './InkIcon.svelte'
29
+
30
+ let {
31
+ class: className,
32
+ children,
33
+ child,
34
+ disabled,
35
+ onclick,
36
+ filename,
37
+ ...rest
38
+ }: InkDownloadButtonProps = $props()
39
+
40
+ const ctx = useInkContext('InkDownloadButton')
41
+ const ready = $derived(ctx.document !== null && ctx.status.state === 'ready')
42
+ </script>
43
+
44
+ <Toolbar.Button
45
+ class={['ink-download', className]}
46
+ data-ink-download=""
47
+ aria-label="Download"
48
+ title="Download"
49
+ disabled={!ready || !!disabled}
50
+ {...child ? { child } : {}}
51
+ {...asBitsProps(rest)}
52
+ onclick={(e) => {
53
+ onclick?.(e)
54
+ const doc = ctx.document
55
+ if (e.defaultPrevented || !doc) return
56
+ void downloadDocument(doc, filename === undefined ? {} : { filename }).catch(
57
+ () => undefined
58
+ )
59
+ }}
60
+ >
61
+ {#if children}{@render children()}{:else}<InkIcon icon={Download} />{/if}
62
+ </Toolbar.Button>
@@ -0,0 +1,14 @@
1
+ import type { ChildSnippet } from './child-snippet.js';
2
+ import type { Snippet } from 'svelte';
3
+ import type { HTMLButtonAttributes } from 'svelte/elements';
4
+ export interface InkDownloadButtonProps extends Omit<HTMLButtonAttributes, 'children'> {
5
+ children?: Snippet | undefined;
6
+ /** Render your own button: spread `props` on it. */
7
+ child?: ChildSnippet | undefined;
8
+ /** The name to save under. Default: the document's `fileName`. */
9
+ filename?: string | undefined;
10
+ }
11
+ declare const InkDownloadButton: import("svelte").Component<InkDownloadButtonProps, {}, "">;
12
+ type InkDownloadButton = ReturnType<typeof InkDownloadButton>;
13
+ export default InkDownloadButton;
14
+ //# sourceMappingURL=InkDownloadButton.svelte.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InkDownloadButton.svelte.d.ts","sourceRoot":"","sources":["../../src/lib/components/InkDownloadButton.svelte.ts"],"names":[],"mappings":"AAGE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AACtD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAA;AACrC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAA;AAE3D,MAAM,WAAW,sBAAuB,SAAQ,IAAI,CAAC,oBAAoB,EAAE,UAAU,CAAC;IACpF,QAAQ,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;IAC9B,oDAAoD;IACpD,KAAK,CAAC,EAAE,YAAY,GAAG,SAAS,CAAA;IAChC,kEAAkE;IAClE,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAC9B;AAyDH,QAAA,MAAM,iBAAiB,4DAAwC,CAAC;AAChE,KAAK,iBAAiB,GAAG,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAC9D,eAAe,iBAAiB,CAAC"}
@@ -18,7 +18,7 @@
18
18
  * Closing returns focus to where it was before the bar opened, else to the document.
19
19
  */
20
20
  import { findAnnouncer, findCountText } from '@inkbar/core/dom'
21
- import { CaseSensitive, ChevronDown, ChevronUp, X } from '@inkbar/icons'
21
+ import { CaseSensitive, ChevronDown, ChevronUp, Search, X } from '@inkbar/icons'
22
22
  import { untrack } from 'svelte'
23
23
 
24
24
  import { useInkContext } from '../context.js'
@@ -149,20 +149,23 @@
149
149
  hidden={!open}
150
150
  {@attach into(target)}
151
151
  >
152
- <input
153
- bind:this={field}
154
- type="text"
155
- aria-label="Find in document"
156
- autocomplete="off"
157
- spellcheck={false}
158
- oninput={(e) => search.setQuery(e.currentTarget.value)}
159
- onkeydown={(e) => {
160
- if (e.key !== 'Enter' || e.isComposing) return
161
- e.preventDefault()
162
- if (e.shiftKey) search.previous()
163
- else search.next()
164
- }}
165
- />
152
+ <div class="ink-input-group">
153
+ <span class="ink-input-accessory"><InkIcon icon={Search} /></span>
154
+ <input
155
+ bind:this={field}
156
+ type="text"
157
+ aria-label="Find in document"
158
+ autocomplete="off"
159
+ spellcheck={false}
160
+ oninput={(e) => search.setQuery(e.currentTarget.value)}
161
+ onkeydown={(e) => {
162
+ if (e.key !== 'Enter' || e.isComposing) return
163
+ e.preventDefault()
164
+ if (e.shiftKey) search.previous()
165
+ else search.next()
166
+ }}
167
+ />
168
+ </div>
166
169
  <span class="ink-find-count" data-ink-find-count=""
167
170
  >{findCountText(search.state)}</span
168
171
  >
@@ -1 +1 @@
1
- {"version":3,"file":"InkFindBar.svelte.d.ts","sourceRoot":"","sources":["../../src/lib/components/InkFindBar.svelte.ts"],"names":[],"mappings":"AAGE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAErD,MAAM,MAAM,eAAe,GAAG,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,UAAU,CAAC,CAC/E;AAmLD,QAAA,MAAM,UAAU,qDAAwC,CAAC;AACzD,KAAK,UAAU,GAAG,UAAU,CAAC,OAAO,UAAU,CAAC,CAAC;AAChD,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"InkFindBar.svelte.d.ts","sourceRoot":"","sources":["../../src/lib/components/InkFindBar.svelte.ts"],"names":[],"mappings":"AAGE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAErD,MAAM,MAAM,eAAe,GAAG,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,UAAU,CAAC,CAC/E;AAsLD,QAAA,MAAM,UAAU,qDAAwC,CAAC;AACzD,KAAK,UAAU,GAAG,UAAU,CAAC,OAAO,UAAU,CAAC,CAAC;AAChD,eAAe,UAAU,CAAC"}
@@ -0,0 +1,73 @@
1
+ <script module lang="ts">
2
+ import type { IconNode } from '@inkbar/icons'
3
+ import type { Snippet } from 'svelte'
4
+
5
+ export interface InkPanelProps {
6
+ /** Names the panel in the sidebar's `open`. */
7
+ id: string
8
+ /** Names its trigger. */
9
+ label: string
10
+ /** An `@inkbar/icons` node, shown on the rail. */
11
+ icon?: IconNode | undefined
12
+ /** A count or short text beside it, hidden when empty or 0. */
13
+ badge?: string | number | undefined
14
+ /** The panel's content. */
15
+ children?: Snippet | undefined
16
+ }
17
+ </script>
18
+
19
+ <script lang="ts">
20
+ /*
21
+ * One panel of an `InkSidebar`, holding `children` as its content. Closed, the panel stays
22
+ * mounted and hidden. In a stack it renders its own header above its content.
23
+ */
24
+ import { useSidebarContext } from './sidebar-context.js'
25
+ import SidebarTrigger from './SidebarTrigger.svelte'
26
+
27
+ import type { SidebarPanelInfo } from '@inkbar/core/dom'
28
+
29
+ let { id, label, icon, badge, children }: InkPanelProps = $props()
30
+
31
+ const ctx = useSidebarContext('InkPanel')
32
+ let wrapper = $state<HTMLDivElement | null>(null)
33
+
34
+ const info = (): SidebarPanelInfo => ({
35
+ id,
36
+ label,
37
+ ...(icon !== undefined && { icon }),
38
+ ...(badge !== undefined && { badge }),
39
+ })
40
+ // Registered now, so the server renders this panel's attributes; ordered once in the DOM.
41
+ const unregister = ctx.register({ info, element: () => wrapper })
42
+ $effect(() => {
43
+ ctx.arrange()
44
+ return unregister
45
+ })
46
+
47
+ const view = $derived.by(() => {
48
+ const s = ctx.state.current
49
+ return {
50
+ stack: s.layout === 'stack',
51
+ trigger: ctx.controller.triggerAttrs(id),
52
+ panel: ctx.controller.panelAttrs(id),
53
+ }
54
+ })
55
+ </script>
56
+
57
+ <!-- A section in a stack; in rail and tabs the theme leaves the layout to the panel. Kept in
58
+ every layout, so the content is never remounted. -->
59
+ <div
60
+ bind:this={wrapper}
61
+ class={['ink-sidebar-slot', view.stack && 'ink-sidebar-section']}
62
+ >
63
+ {#if view.stack}
64
+ <button class="ink-sidebar-header" {...view.trigger}>
65
+ <SidebarTrigger panel={info()} rail={false} />
66
+ </button>
67
+ {/if}
68
+ <div class="ink-sidebar-panel" {...view.panel}>
69
+ <!-- The rail button names the panel for assistive technology; this repeats it on screen. -->
70
+ <div class="ink-sidebar-panel-title" aria-hidden="true">{label}</div>
71
+ <div class="ink-sidebar-panel-body">{@render children?.()}</div>
72
+ </div>
73
+ </div>
@@ -0,0 +1,18 @@
1
+ import type { IconNode } from '@inkbar/icons';
2
+ import type { Snippet } from 'svelte';
3
+ export interface InkPanelProps {
4
+ /** Names the panel in the sidebar's `open`. */
5
+ id: string;
6
+ /** Names its trigger. */
7
+ label: string;
8
+ /** An `@inkbar/icons` node, shown on the rail. */
9
+ icon?: IconNode | undefined;
10
+ /** A count or short text beside it, hidden when empty or 0. */
11
+ badge?: string | number | undefined;
12
+ /** The panel's content. */
13
+ children?: Snippet | undefined;
14
+ }
15
+ declare const InkPanel: import("svelte").Component<InkPanelProps, {}, "">;
16
+ type InkPanel = ReturnType<typeof InkPanel>;
17
+ export default InkPanel;
18
+ //# sourceMappingURL=InkPanel.svelte.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InkPanel.svelte.d.ts","sourceRoot":"","sources":["../../src/lib/components/InkPanel.svelte.ts"],"names":[],"mappings":"AAGE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAC7C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAA;AAErC,MAAM,WAAW,aAAa;IAC5B,+CAA+C;IAC/C,EAAE,EAAE,MAAM,CAAA;IACV,yBAAyB;IACzB,KAAK,EAAE,MAAM,CAAA;IACb,kDAAkD;IAClD,IAAI,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAA;IAC3B,+DAA+D;IAC/D,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAA;IACnC,2BAA2B;IAC3B,QAAQ,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;CAC/B;AAiEH,QAAA,MAAM,QAAQ,mDAAwC,CAAC;AACvD,KAAK,QAAQ,GAAG,UAAU,CAAC,OAAO,QAAQ,CAAC,CAAC;AAC5C,eAAe,QAAQ,CAAC"}
@@ -0,0 +1,57 @@
1
+ <script lang="ts" module>
2
+ import type { ChildSnippet } from './child-snippet.js'
3
+ import type { Snippet } from 'svelte'
4
+ import type { HTMLButtonAttributes } from 'svelte/elements'
5
+
6
+ export interface InkPrintButtonProps extends Omit<HTMLButtonAttributes, 'children'> {
7
+ children?: Snippet | undefined
8
+ /** Render your own button: spread `props` on it. */
9
+ child?: ChildSnippet | undefined
10
+ }
11
+ </script>
12
+
13
+ <script lang="ts">
14
+ /*
15
+ * Prints the open document's file with the browser's own PDF viewer (on iOS, in a new
16
+ * tab). Disabled until the document is ready. Today that is the file as it was opened,
17
+ * without this session's annotations.
18
+ */
19
+ import { printDocument } from '@inkbar/core/dom'
20
+ import { Printer } from '@inkbar/icons'
21
+ import { Toolbar } from 'bits-ui'
22
+
23
+ import { useInkContext } from '../context.js'
24
+
25
+ import { asBitsProps } from './child-snippet.js'
26
+ import InkIcon from './InkIcon.svelte'
27
+
28
+ let {
29
+ class: className,
30
+ children,
31
+ child,
32
+ disabled,
33
+ onclick,
34
+ ...rest
35
+ }: InkPrintButtonProps = $props()
36
+
37
+ const ctx = useInkContext('InkPrintButton')
38
+ const ready = $derived(ctx.document !== null && ctx.status.state === 'ready')
39
+ </script>
40
+
41
+ <Toolbar.Button
42
+ class={['ink-print', className]}
43
+ data-ink-print=""
44
+ aria-label="Print"
45
+ title="Print"
46
+ disabled={!ready || !!disabled}
47
+ {...child ? { child } : {}}
48
+ {...asBitsProps(rest)}
49
+ onclick={(e) => {
50
+ onclick?.(e)
51
+ const doc = ctx.document
52
+ if (e.defaultPrevented || !doc) return
53
+ void printDocument(doc).catch(() => undefined)
54
+ }}
55
+ >
56
+ {#if children}{@render children()}{:else}<InkIcon icon={Printer} />{/if}
57
+ </Toolbar.Button>
@@ -0,0 +1,12 @@
1
+ import type { ChildSnippet } from './child-snippet.js';
2
+ import type { Snippet } from 'svelte';
3
+ import type { HTMLButtonAttributes } from 'svelte/elements';
4
+ export interface InkPrintButtonProps extends Omit<HTMLButtonAttributes, 'children'> {
5
+ children?: Snippet | undefined;
6
+ /** Render your own button: spread `props` on it. */
7
+ child?: ChildSnippet | undefined;
8
+ }
9
+ declare const InkPrintButton: import("svelte").Component<InkPrintButtonProps, {}, "">;
10
+ type InkPrintButton = ReturnType<typeof InkPrintButton>;
11
+ export default InkPrintButton;
12
+ //# sourceMappingURL=InkPrintButton.svelte.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InkPrintButton.svelte.d.ts","sourceRoot":"","sources":["../../src/lib/components/InkPrintButton.svelte.ts"],"names":[],"mappings":"AAGE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AACtD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAA;AACrC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAA;AAE3D,MAAM,WAAW,mBAAoB,SAAQ,IAAI,CAAC,oBAAoB,EAAE,UAAU,CAAC;IACjF,QAAQ,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;IAC9B,oDAAoD;IACpD,KAAK,CAAC,EAAE,YAAY,GAAG,SAAS,CAAA;CACjC;AAsDH,QAAA,MAAM,cAAc,yDAAwC,CAAC;AAC7D,KAAK,cAAc,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AACxD,eAAe,cAAc,CAAC"}
@@ -0,0 +1,91 @@
1
+ <script module lang="ts">
2
+ import type { RecordBase } from '@inkbar/core'
3
+ import type { CardSpec, RecordListSource } from '@inkbar/core/dom'
4
+ import type { Snippet } from 'svelte'
5
+ import type { HTMLAttributes } from 'svelte/elements'
6
+
7
+ export interface InkRecordListProps<
8
+ T extends RecordBase & { page: number } = RecordBase & { page: number },
9
+ > extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {
10
+ /** The records to list, as `<plugin>.<name>`. */
11
+ records?: string | undefined
12
+ /**
13
+ * A host's own source, listed in place of `records` with the same controller and cards.
14
+ * `card`, `where` and `sort` do not apply to it.
15
+ */
16
+ source?: RecordListSource | undefined
17
+ /** The card each record shows. Default: its mark's card. */
18
+ card?: ((record: T) => CardSpec) | undefined
19
+ /** Which records to list. Default: those that have a mark. */
20
+ where?: ((record: T) => boolean) | undefined
21
+ /** The order. Default: reading order by the marks' rects. */
22
+ sort?: ((a: T, b: T) => number) | undefined
23
+ /** Bindable, read-only: the number listed, from once the list has mounted. */
24
+ count?: number | undefined
25
+ /** Replaces "Nothing here yet.". */
26
+ empty?: Snippet | undefined
27
+ }
28
+ </script>
29
+
30
+ <script
31
+ lang="ts"
32
+ generics="T extends RecordBase & { page: number } = RecordBase & { page: number }"
33
+ >
34
+ /*
35
+ * The records a plugin keeps under `records` (`<plugin>.<name>`) as a list of cards, the same
36
+ * cards their marks open, with the same actions: `createRecordList` on core's record list
37
+ * controller. The list, the marks and `useRecordSelection` share one selection. `card`, `where`
38
+ * and `sort` replace the marks' card, filter and reading order; a new function rebuilds the
39
+ * list, so pass functions defined once rather than inline. `bind:count` gives the number
40
+ * listed whenever it changes; the `empty` snippet replaces "Nothing here yet.". It fills its
41
+ * parent's height. Inside `InkRoot`; it renders empty on the server.
42
+ *
43
+ * In place of `records`, `source` takes a host's own `RecordListSource` and lists it with the
44
+ * same controller and cards. Give one of the two: with both, `source` wins and a development
45
+ * build warns.
46
+ */
47
+ import { recordsSource, type RecordsSourceOptions } from '@inkbar/core/dom'
48
+ import { DEV } from 'esm-env'
49
+
50
+ import { useInkContext } from '../context.js'
51
+ import { toReadable } from '../to-readable.svelte.js'
52
+
53
+ import RecordCards from './RecordCards.svelte'
54
+
55
+ let {
56
+ records,
57
+ source,
58
+ card,
59
+ where,
60
+ sort,
61
+ // Written, never read: the list reports its count to the host.
62
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
63
+ count = $bindable(),
64
+ empty,
65
+ ...rest
66
+ }: InkRecordListProps<T> = $props()
67
+
68
+ const ctx = useInkContext('InkRecordList')
69
+ const viewport = toReadable(() => ctx.viewport)
70
+
71
+ if (DEV)
72
+ $effect(() => {
73
+ if (records !== undefined && source !== undefined)
74
+ console.warn(
75
+ '[inkbar] InkRecordList takes `records` or `source`, not both: it lists `source`.'
76
+ )
77
+ })
78
+
79
+ const listed = $derived.by((): RecordListSource | null => {
80
+ if (source) return source
81
+ const pluginHost = ctx.pluginHost
82
+ if (!pluginHost || records === undefined) return null
83
+ const opts: RecordsSourceOptions<T> = {}
84
+ if (card) opts.card = card
85
+ if (where) opts.where = where
86
+ if (sort) opts.sort = sort
87
+ return recordsSource<T>({ pluginHost, viewport }, records, opts)
88
+ })
89
+ </script>
90
+
91
+ <RecordCards {...rest} source={listed} {empty} oncount={(n) => (count = n)} />
@@ -0,0 +1,72 @@
1
+ import type { RecordBase } from '@inkbar/core';
2
+ import type { CardSpec, RecordListSource } from '@inkbar/core/dom';
3
+ import type { Snippet } from 'svelte';
4
+ import type { HTMLAttributes } from 'svelte/elements';
5
+ export interface InkRecordListProps<T extends RecordBase & {
6
+ page: number;
7
+ } = RecordBase & {
8
+ page: number;
9
+ }> extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {
10
+ /** The records to list, as `<plugin>.<name>`. */
11
+ records?: string | undefined;
12
+ /**
13
+ * A host's own source, listed in place of `records` with the same controller and cards.
14
+ * `card`, `where` and `sort` do not apply to it.
15
+ */
16
+ source?: RecordListSource | undefined;
17
+ /** The card each record shows. Default: its mark's card. */
18
+ card?: ((record: T) => CardSpec) | undefined;
19
+ /** Which records to list. Default: those that have a mark. */
20
+ where?: ((record: T) => boolean) | undefined;
21
+ /** The order. Default: reading order by the marks' rects. */
22
+ sort?: ((a: T, b: T) => number) | undefined;
23
+ /** Bindable, read-only: the number listed, from once the list has mounted. */
24
+ count?: number | undefined;
25
+ /** Replaces "Nothing here yet.". */
26
+ empty?: Snippet | undefined;
27
+ }
28
+ declare function $$render<T extends RecordBase & {
29
+ page: number;
30
+ } = RecordBase & {
31
+ page: number;
32
+ }>(): {
33
+ props: InkRecordListProps<T>;
34
+ exports: {};
35
+ bindings: "count";
36
+ slots: {};
37
+ events: {};
38
+ };
39
+ declare class __sveltets_Render<T extends RecordBase & {
40
+ page: number;
41
+ } = RecordBase & {
42
+ page: number;
43
+ }> {
44
+ props(): ReturnType<typeof $$render<T>>['props'];
45
+ events(): ReturnType<typeof $$render<T>>['events'];
46
+ slots(): ReturnType<typeof $$render<T>>['slots'];
47
+ bindings(): "count";
48
+ exports(): {};
49
+ }
50
+ interface $$IsomorphicComponent {
51
+ new <T extends RecordBase & {
52
+ page: number;
53
+ } = RecordBase & {
54
+ page: number;
55
+ }>(options: import('svelte').ComponentConstructorOptions<ReturnType<__sveltets_Render<T>['props']>>): import('svelte').SvelteComponent<ReturnType<__sveltets_Render<T>['props']>, ReturnType<__sveltets_Render<T>['events']>, ReturnType<__sveltets_Render<T>['slots']>> & {
56
+ $$bindings?: ReturnType<__sveltets_Render<T>['bindings']>;
57
+ } & ReturnType<__sveltets_Render<T>['exports']>;
58
+ <T extends RecordBase & {
59
+ page: number;
60
+ } = RecordBase & {
61
+ page: number;
62
+ }>(internal: unknown, props: ReturnType<__sveltets_Render<T>['props']> & {}): ReturnType<__sveltets_Render<T>['exports']>;
63
+ z_$$bindings?: ReturnType<__sveltets_Render<any>['bindings']>;
64
+ }
65
+ declare const InkRecordList: $$IsomorphicComponent;
66
+ type InkRecordList<T extends RecordBase & {
67
+ page: number;
68
+ } = RecordBase & {
69
+ page: number;
70
+ }> = InstanceType<typeof InkRecordList<T>>;
71
+ export default InkRecordList;
72
+ //# sourceMappingURL=InkRecordList.svelte.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InkRecordList.svelte.d.ts","sourceRoot":"","sources":["../../src/lib/components/InkRecordList.svelte.ts"],"names":[],"mappings":"AAGE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAC9C,OAAO,KAAK,EAAE,QAAQ,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAA;AAClE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAA;AACrC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAErD,MAAM,WAAW,kBAAkB,CACjC,CAAC,SAAS,UAAU,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG,UAAU,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CACvE,SAAQ,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,UAAU,CAAC;IACxD,iDAAiD;IACjD,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC5B;;;OAGG;IACH,MAAM,CAAC,EAAE,gBAAgB,GAAG,SAAS,CAAA;IACrC,4DAA4D;IAC5D,IAAI,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,QAAQ,CAAC,GAAG,SAAS,CAAA;IAC5C,8DAA8D;IAC9D,KAAK,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,OAAO,CAAC,GAAG,SAAS,CAAA;IAC5C,6DAA6D;IAC7D,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,MAAM,CAAC,GAAG,SAAS,CAAA;IAC3C,8EAA8E;IAC9E,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA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AAU,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAA;KAAE,GAAG,UAAU,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;IAClc,CAAC,CAAC,SAAS,UAAU,GAAG;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,GAAG,UAAU,GAAG;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,UAAU,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,GAAG,UAAU,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;IACjM,YAAY,CAAC,EAAE,UAAU,CAAC,iBAAiB,CAAC,GAAG,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC;CACjE;AACD,QAAA,MAAM,aAAa,EAAE,qBAAmC,CAAC;AACvC,KAAK,aAAa,CAAC,CAAC,SAAS,UAAU,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG,UAAU,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,IAAI,YAAY,CAAC,OAAO,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC;AACtI,eAAe,aAAa,CAAC"}
@@ -130,6 +130,7 @@
130
130
  writable,
131
131
  } from '@inkbar/core'
132
132
  import {
133
+ attachFileKeys,
133
134
  attachHistoryKeys,
134
135
  createPluginHost,
135
136
  createSearchController,
@@ -464,9 +465,12 @@
464
465
  const stopFocus = keepHistoryFocus(el, () =>
465
466
  el.querySelector<HTMLElement>('[data-ink-scroll]')
466
467
  )
468
+ // Ctrl or Cmd+P prints and +S downloads, as InkPrintButton and InkDownloadButton do.
469
+ const stopFileKeys = attachFileKeys(el, () => document)
467
470
  return () => {
468
471
  stopKeys()
469
472
  stopFocus()
473
+ stopFileKeys()
470
474
  }
471
475
  })
472
476
 
@@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