@inkbar/svelte 0.12.0 → 0.13.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.
package/README.md CHANGED
@@ -149,7 +149,7 @@ Inside `InkRoot`, `useHistory()` returns the same object. Its `batch(fn)` runs `
149
149
 
150
150
  `key` identifies the document. Reuse the same key when only the signed URL changes and the document is not reloaded.
151
151
 
152
- `InkRoot` takes a few more options. `password` opens an encrypted PDF. `storage` sets what the viewer keeps between visits (see [Storage](#storage)). `defaults` sets annotation colours; without it the theme's CSS variables apply. `fonts` sets the families the text style menu offers. `decorateAnnotation` adds attributes, classes and a screen-reader description to each annotation. `bind:page` and `bind:zoom` (or `onPageChange` and `onZoomChange`) follow and drive the viewport, and `bind:tool` (or `onToolChange`) does the same for the active tool. `onError` hears failed opens, form script errors and refused signings. `onActivate` hears the id of each activated annotation. `onFieldsChange` hears form value changes.
152
+ `InkRoot` takes a few more options. `password` opens an encrypted PDF. `storage` sets what the viewer keeps between visits (see [Storage](#storage)). `minDocumentWidth` sets how narrow the document may get before a rail sidebar's panel floats over it (see [Sidebars](#sidebars)). `defaults` sets annotation colours; without it the theme's CSS variables apply. `fonts` sets the families the text style menu offers. `decorateAnnotation` adds attributes, classes and a screen-reader description to each annotation. `bind:page` and `bind:zoom` (or `onPageChange` and `onZoomChange`) follow and drive the viewport, and `bind:tool` (or `onToolChange`) does the same for the active tool. `onError` hears failed opens, form script errors and refused signings. `onActivate` hears the id of each activated annotation. `onFieldsChange` hears form value changes.
153
153
 
154
154
  ## Viewport
155
155
 
@@ -159,7 +159,7 @@ On a touch screen, two fingers pinch to zoom the document and scroll it. With `d
159
159
 
160
160
  ## Forms
161
161
 
162
- `InkViewport` fills the PDF's form fields and runs the form's scripts. `useForm()` returns the fields, their values, and `set` and `reset`. Use `bind:fields` to hold the values in your own state. The form never submits, opens a link, sends mail or prints: `onaction` hands each request to you; so does a link to a URL. `onformaction` still works until 0.13.0. `formHighlight={false}` turns off the field tint, and a change applies to the open document in place.
162
+ `InkViewport` fills the PDF's form fields and runs the form's scripts. `useForm()` returns the fields, their values, and `set` and `reset`. Use `bind:fields` to hold the values in your own state. The form never submits, opens a link, sends mail or prints: `onaction` hands each request to you; so does a link to a URL. `formHighlight={false}` turns off the field tint, and a change applies to the open document in place.
163
163
 
164
164
  The [forms guide](https://inkbar.dev/docs/guides/forms/) covers controlled fields, form actions, scripts, signature fields and saving values as Gloss.
165
165
 
@@ -177,7 +177,7 @@ The highlight tool leaves `contents` free for the comment. `doc.text(page)` retu
177
177
 
178
178
  ## Signatures
179
179
 
180
- `InkSignatureMenu` lists saved signatures, picks one for the `signature` tool, removes them, and opens `InkSignatureDialog` to draw, type or upload a new one. The menu needs `signatureTool()` in `tools`. The dialog and signature form fields work without it; the dialog then only saves the signature. These are marks on the page, not cryptographic signatures. `InkRoot` keeps them in its `storage` under the key `signatures`, so without a store they last until reload. A `signatures` store of your own still works and wins over `storage` until 0.13.0, which removes it. `signatureFonts` lists the handwriting fonts the Type tab offers; load them with `@font-face`. A placed signature keeps its aspect ratio when resized.
180
+ `InkSignatureMenu` lists saved signatures, picks one for the `signature` tool, removes them, and opens `InkSignatureDialog` to draw, type or upload a new one. The menu needs `signatureTool()` in `tools`. The dialog and signature form fields work without it; the dialog then only saves the signature. These are marks on the page, not cryptographic signatures. `InkRoot` keeps them in its `storage` under the key `signatures`, so without a store they last until reload. `signatureFonts` lists the handwriting fonts the Type tab offers; load them with `@font-face`. A placed signature keeps its aspect ratio when resized.
181
181
 
182
182
  ## Storage
183
183
 
@@ -240,16 +240,24 @@ The bar handles Escape itself and stops it there, so an `onkeydown` you pass to
240
240
  </InkRoot>
241
241
  ```
242
242
 
243
- `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.
243
+ `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, unless the sidebar has no room (see below). 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.
244
244
 
245
245
  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 at its width with the open panel showing, the stack headers and the resize handle; rail and tab buttons follow once it has mounted.
246
246
 
247
- Each sidebar has a resize handle on its inner edge. Drag it, or focus it and use the arrow keys (16px a step), Home and End. Enter or a double-click resets the width. The width starts at `defaultWidth` (320) and stays between `minWidth` (240) and `maxWidth` (480), and never past half of the sidebar's container. The sidebar sets `--ink-sidebar-width` inline, so a CSS override of it no longer applies. Pass `defaultWidth` instead. Inside `InkRoot` the sidebar saves its width in the root's `storage` under `sidebar.<name>.width`, where `name` defaults to the side; give two sidebars on one side different names. Pass `storage` to the sidebar to use another store, or to save its width outside `InkRoot`. The sidebar reads `storage` and `name` once, when it is created. To control the width, bind `width` to a number: the handle then only updates the binding, and the sidebar neither reads nor writes storage. Bind it to a value that starts `undefined` and you only receive the width; the sidebar keeps saving it.
247
+ Each sidebar has a resize handle on its inner edge. Drag it, or focus it and use the arrow keys (16px a step), Home and End. Enter or a double-click resets the width. The width starts at `defaultWidth` (320) and stays between `minWidth` (240) and `maxWidth` (480). The handle is labelled "Resize left sidebar" or "Resize right sidebar"; pass `handleLabel` to name it yourself. The sidebar sets `--ink-sidebar-width` inline, so a CSS override of it no longer applies. Pass `defaultWidth` instead. Inside `InkRoot` the sidebar saves its width in the root's `storage` under `sidebar.<name>.width`, where `name` defaults to the side; give two sidebars on one side different names. Pass `storage` to the sidebar to use another store, or to save its width outside `InkRoot`. The sidebar reads `storage`, `name`, `minDocumentWidth` and `handleLabel` once, when it is created. To control the width, bind `width` to a number: the handle then only updates the binding, and the sidebar neither reads nor writes storage. Bind it to a value that starts `undefined` and you only receive the width; the sidebar keeps saving it.
248
248
 
249
249
  ```svelte
250
250
  <InkSidebar name="tools" side="right" defaultWidth={360} bind:width={toolsWidth}>
251
251
  ```
252
252
 
253
+ Sidebars that share a parent element make room for the document together. While the document beside them would be narrower than `minDocumentWidth` (480 by default), a rail sidebar's open panel floats over the pages like a drawer, and the rail stays in place to close and reopen it. When the parent grows again, the panel goes back beside the document. Tabs and stack sidebars never float: they narrow toward `minWidth` instead. Either way, the saved width and the bound `width` stay the width the reader chose. Set `minDocumentWidth` on `InkRoot` for every sidebar inside it, or on one `InkSidebar`, whose own wins.
254
+
255
+ A floating panel closes on a tap anywhere else in the parent (the pages, say), on `Escape`, or when the find bar opens. The closing tap does nothing else: no tool draws, no link is followed and no field takes focus. An unbound sidebar with no room when it mounts starts with its panel closed. A bound `open` is never changed for you: a close goes through `bind:open`, and a host that keeps it open keeps the panel floating. On the server the sidebar renders beside the document as usual; floating and starting closed are decided in the browser once it has mounted.
256
+
257
+ ```svelte
258
+ <InkRoot {src} {assets} minDocumentWidth={600}>
259
+ ```
260
+
253
261
  ## Thumbnails
254
262
 
255
263
  `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.
@@ -12,7 +12,6 @@
12
12
  InkError,
13
13
  InkStatus,
14
14
  PdfAssets,
15
- SignatureStore,
16
15
  } from '@inkbar/core'
17
16
  import type {
18
17
  DecorateAnnotation,
@@ -57,8 +56,6 @@
57
56
  * Inkbar does none of these.
58
57
  */
59
58
  onaction?: ((action: ViewerAction) => void) | undefined
60
- /** @deprecated Use `onaction`. Removed in 0.13.0. Ignored when `onaction` is given. */
61
- onformaction?: ((action: ViewerAction) => void) | undefined
62
59
  /** Tints fillable form fields. Default true. A change applies to the open document in place. */
63
60
  formHighlight?: boolean | undefined
64
61
  tool?: ToolId | undefined
@@ -99,11 +96,11 @@
99
96
  */
100
97
  storage?: InkStorage | undefined
101
98
  /**
102
- * Where saved signatures live, in place of `storage`. A new store takes effect at once, for
103
- * the menus and the `signature` tool alike.
104
- * @deprecated Pass `storage`; signatures are kept in it under `signatures`. Removed in 0.13.0.
99
+ * The narrowest the document may get beside the sidebars, in CSS px, before a rail
100
+ * sidebar's panel floats over the pages instead. Default 480 (`MIN_DOCUMENT_WIDTH`). Every
101
+ * `InkSidebar` inside takes it unless it has its own. Read once, when the root is created.
105
102
  */
106
- signatures?: SignatureStore | undefined
103
+ minDocumentWidth?: number | undefined
107
104
  /** The handwriting fonts a typed signature offers; the host loads them. */
108
105
  signatureFonts?: string[] | undefined
109
106
  page?: number | undefined
@@ -152,6 +149,7 @@
152
149
  FONT_FAMILIES,
153
150
  handleFindKey,
154
151
  keepHistoryFocus,
152
+ MIN_DOCUMENT_WIDTH,
155
153
  pageSelectionText,
156
154
  SIGNATURE_FONTS,
157
155
  trackToolStyle,
@@ -186,7 +184,6 @@
186
184
  fields = $bindable(),
187
185
  onFieldsChange,
188
186
  onaction,
189
- onformaction,
190
187
  formHighlight,
191
188
  tool = $bindable(),
192
189
  onToolChange,
@@ -195,7 +192,7 @@
195
192
  decorateAnnotation,
196
193
  fonts,
197
194
  storage: storageProp,
198
- signatures: signatureStore,
195
+ minDocumentWidth: minDocumentWidthProp,
199
196
  signatureFonts,
200
197
  page = $bindable(),
201
198
  onPageChange,
@@ -216,8 +213,9 @@
216
213
  // Read once, like `plugins`: the sidebars and the plugins load from it as they are created.
217
214
  const storage = untrack(() => storageProp ?? createMemoryStorage())
218
215
  const storageSignatures = createStorageSignatureStore(storage)
219
- // The deprecated `signatures` wins when both are given.
220
- const signatures = $derived(createSignatureLibrary(signatureStore ?? storageSignatures))
216
+ // Read once, like `storage`: each sidebar reads it as it is created.
217
+ const minDocumentWidth = untrack(() => minDocumentWidthProp ?? MIN_DOCUMENT_WIDTH)
218
+ const signatures = createSignatureLibrary(storageSignatures)
221
219
  $effect(() => {
222
220
  void signatures.refresh()
223
221
  })
@@ -687,6 +685,7 @@
687
685
  },
688
686
  toolOptions,
689
687
  storage,
688
+ minDocumentWidth,
690
689
  get signatures() {
691
690
  return signatures
692
691
  },
@@ -720,7 +719,7 @@
720
719
  get formHighlight() {
721
720
  return formHighlight
722
721
  },
723
- reportAction: (a) => (onaction ?? onformaction)?.(a),
722
+ reportAction: (a) => onaction?.(a),
724
723
  reportError: (e) => onError?.(e),
725
724
  }
726
725
  setInkContext(context, () => activatedNow)
@@ -1,5 +1,5 @@
1
1
  import type { ChildSnippet } from './child-snippet.js';
2
- import type { Annotation, AnnotationChange, AnnotationDefaults, DocumentSource, FieldsChange, FieldValues, ViewerAction, InkDocument, InkError, InkStatus, PdfAssets, SignatureStore } from '@inkbar/core';
2
+ import type { Annotation, AnnotationChange, AnnotationDefaults, DocumentSource, FieldsChange, FieldValues, ViewerAction, InkDocument, InkError, InkStatus, PdfAssets } from '@inkbar/core';
3
3
  import type { DecorateAnnotation, InkPlugin, Tool, ToolId, ZoomValue } from '@inkbar/core/dom';
4
4
  import type { Snippet } from 'svelte';
5
5
  import type { HTMLAttributes } from 'svelte/elements';
@@ -33,8 +33,6 @@ export interface InkRootProps extends Omit<HTMLAttributes<HTMLDivElement>, 'chil
33
33
  * Inkbar does none of these.
34
34
  */
35
35
  onaction?: ((action: ViewerAction) => void) | undefined;
36
- /** @deprecated Use `onaction`. Removed in 0.13.0. Ignored when `onaction` is given. */
37
- onformaction?: ((action: ViewerAction) => void) | undefined;
38
36
  /** Tints fillable form fields. Default true. A change applies to the open document in place. */
39
37
  formHighlight?: boolean | undefined;
40
38
  tool?: ToolId | undefined;
@@ -75,11 +73,11 @@ export interface InkRootProps extends Omit<HTMLAttributes<HTMLDivElement>, 'chil
75
73
  */
76
74
  storage?: InkStorage | undefined;
77
75
  /**
78
- * Where saved signatures live, in place of `storage`. A new store takes effect at once, for
79
- * the menus and the `signature` tool alike.
80
- * @deprecated Pass `storage`; signatures are kept in it under `signatures`. Removed in 0.13.0.
76
+ * The narrowest the document may get beside the sidebars, in CSS px, before a rail
77
+ * sidebar's panel floats over the pages instead. Default 480 (`MIN_DOCUMENT_WIDTH`). Every
78
+ * `InkSidebar` inside takes it unless it has its own. Read once, when the root is created.
81
79
  */
82
- signatures?: SignatureStore | undefined;
80
+ minDocumentWidth?: number | undefined;
83
81
  /** The handwriting fonts a typed signature offers; the host loads them. */
84
82
  signatureFonts?: string[] | undefined;
85
83
  page?: number | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"InkRoot.svelte.d.ts","sourceRoot":"","sources":["../../src/lib/components/InkRoot.svelte.ts"],"names":[],"mappings":"AAGE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AACtD,OAAO,KAAK,EACV,UAAU,EACV,gBAAgB,EAChB,kBAAkB,EAClB,cAAc,EACd,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,WAAW,EACX,QAAQ,EACR,SAAS,EACT,SAAS,EACT,cAAc,EACf,MAAM,cAAc,CAAA;AACrB,OAAO,KAAK,EACV,kBAAkB,EAClB,SAAS,EACT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UAAU,CAAC,OAAO,OAAO,CAAC,CAAC;AAC1C,eAAe,OAAO,CAAC"}
@@ -33,7 +33,7 @@
33
33
  defaultWidth?: number | undefined
34
34
  /** Default 240. */
35
35
  minWidth?: number | undefined
36
- /** Default 480. The shown width also stays within half the sidebar's container. */
36
+ /** Default 480. */
37
37
  maxWidth?: number | undefined
38
38
  /**
39
39
  * Bindable, in CSS px. Bind it to a number to control the width: the handle then only
@@ -41,6 +41,18 @@
41
41
  * starts undefined, it receives the width but the sidebar stays uncontrolled.
42
42
  */
43
43
  width?: number | undefined
44
+ /**
45
+ * The narrowest the document may get beside the sidebars sharing this one's parent, in CSS
46
+ * px, before a rail's open panel floats over the pages. Tabs and stack narrow toward
47
+ * `minWidth` instead. Default: InkRoot's `minDocumentWidth` inside InkRoot, else 480. Read
48
+ * once, when the sidebar is created.
49
+ */
50
+ minDocumentWidth?: number | undefined
51
+ /**
52
+ * The resize handle's accessible name. Default `Resize left sidebar` or `Resize right
53
+ * sidebar`. Read once, when the sidebar is created.
54
+ */
55
+ handleLabel?: string | undefined
44
56
  /** The `InkPanel`s. */
45
57
  children?: Snippet | undefined
46
58
  }
@@ -65,6 +77,11 @@
65
77
  * `sidebar.<name>.width`; inside `InkRoot` the root's storage is the default. `bind:width`
66
78
  * to a number makes the width the host's: drags and keys then only update the binding, and
67
79
  * storage is not read or written. The server renders the handle too.
80
+ *
81
+ * Once mounted, a rail's open panel floats over the pages while the document beside it would
82
+ * be narrower than `minDocumentWidth` (InkRoot's inside it), and a tap on the pages or Escape
83
+ * closes it, through `bind:open` too. The server renders it beside the document, open as
84
+ * usual; once mounted, an unbound sidebar with no room closes its panel.
68
85
  */
69
86
  import { createSidebarController } from '@inkbar/core/dom'
70
87
  import { untrack } from 'svelte'
@@ -86,6 +103,8 @@
86
103
  minWidth,
87
104
  maxWidth,
88
105
  width = $bindable(),
106
+ minDocumentWidth,
107
+ handleLabel,
89
108
  class: className,
90
109
  children,
91
110
  ...rest
@@ -98,7 +117,8 @@
98
117
  const infos = () => entries.map((e) => e.info())
99
118
 
100
119
  // Read once: the controller loads the saved width as it is created.
101
- const inheritedStorage = useOptionalInkContext()?.storage
120
+ const ink = useOptionalInkContext()
121
+ const minDocument = untrack(() => minDocumentWidth ?? ink?.minDocumentWidth)
102
122
 
103
123
  /*
104
124
  * `width` is the host's only while it holds a number the sidebar did not write itself. The
@@ -132,8 +152,10 @@
132
152
  panels: [],
133
153
  ...(open !== undefined && { open }),
134
154
  pending: true,
135
- ...((storage ?? inheritedStorage) && { storage: (storage ?? inheritedStorage)! }),
155
+ ...((storage ?? ink?.storage) && { storage: (storage ?? ink?.storage)! }),
136
156
  ...(name !== undefined && { name }),
157
+ ...(minDocument !== undefined && { minDocumentWidth: minDocument }),
158
+ ...(handleLabel !== undefined && { handleLabel }),
137
159
  ...widthOptions(),
138
160
  onWidthChange: (value) => {
139
161
  written = value
@@ -28,7 +28,7 @@ export interface InkSidebarProps extends Omit<HTMLAttributes<HTMLDivElement>, 'c
28
28
  defaultWidth?: number | undefined;
29
29
  /** Default 240. */
30
30
  minWidth?: number | undefined;
31
- /** Default 480. The shown width also stays within half the sidebar's container. */
31
+ /** Default 480. */
32
32
  maxWidth?: number | undefined;
33
33
  /**
34
34
  * Bindable, in CSS px. Bind it to a number to control the width: the handle then only
@@ -36,6 +36,18 @@ export interface InkSidebarProps extends Omit<HTMLAttributes<HTMLDivElement>, 'c
36
36
  * starts undefined, it receives the width but the sidebar stays uncontrolled.
37
37
  */
38
38
  width?: number | undefined;
39
+ /**
40
+ * The narrowest the document may get beside the sidebars sharing this one's parent, in CSS
41
+ * px, before a rail's open panel floats over the pages. Tabs and stack narrow toward
42
+ * `minWidth` instead. Default: InkRoot's `minDocumentWidth` inside InkRoot, else 480. Read
43
+ * once, when the sidebar is created.
44
+ */
45
+ minDocumentWidth?: number | undefined;
46
+ /**
47
+ * The resize handle's accessible name. Default `Resize left sidebar` or `Resize right
48
+ * sidebar`. Read once, when the sidebar is created.
49
+ */
50
+ handleLabel?: string | undefined;
39
51
  /** The `InkPanel`s. */
40
52
  children?: Snippet | undefined;
41
53
  }
@@ -1 +1 @@
1
- {"version":3,"file":"InkSidebar.svelte.d.ts","sourceRoot":"","sources":["../../src/lib/components/InkSidebar.svelte.ts"],"names":[],"mappings":"AAGE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAC9C,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAC/E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAA;AACrC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAErD,MAAM,WAAW,eAAgB,SAAQ,IAAI,CAC3C,cAAc,CAAC,cAAc,CAAC,EAC9B,UAAU,CACX;IACC,+DAA+D;IAC/D,IAAI,CAAC,EAAE,WAAW,GAAG,SAAS,CAAA;IAC9B,iDAAiD;IACjD,MAAM,CAAC,EAAE,aAAa,GAAG,SAAS,CAAA;IAClC,wHAAwH;IACxH,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;IAC7B;;;OAGG;IACH,IAAI,CAAC,EAAE,WAAW,GAAG,SAAS,CAAA;IAC9B;;;OAGG;IACH,OAAO,CAAC,EAAE,UAAU,GAAG,SAAS,CAAA;IAChC;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACzB,qFAAqF;IACrF,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACjC,mBAAmB;IACnB,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC7B,mFAAmF;IACnF,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC7B;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,uBAAuB;IACvB,QAAQ,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;CAC/B;AAmPH,QAAA,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AS,CAAA;IACrC;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAChC,uBAAuB;IACvB,QAAQ,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;CAC/B;AA6PH,QAAA,MAAM,UAAU,mEAAwC,CAAC;AACzD,KAAK,UAAU,GAAG,UAAU,CAAC,OAAO,UAAU,CAAC,CAAC;AAChD,eAAe,UAAU,CAAC"}
@@ -170,7 +170,6 @@
170
170
  toolHistory: { batch: (fn) => ctx.history.batch(fn) },
171
171
  toolOptions: ctx.toolOptions,
172
172
  fonts: [...ctx.fonts],
173
- // Read through, so a new `signatures` store reaches the tool as well as the menus.
174
173
  signatureLibrary: () => ctx.signatures,
175
174
  customAnnotations: custom,
176
175
  ...(ctx.formHighlight === undefined ? {} : { formHighlight: ctx.formHighlight }),
@@ -1 +1 @@
1
- {"version":3,"file":"InkViewport.svelte.d.ts","sourceRoot":"","sources":["../../src/lib/components/InkViewport.svelte.ts"],"names":[],"mappings":"AAGE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AAC5C,OAAO,KAAK,EAAE,mBAAmB,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AACrF,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAA;AACrC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAErD,MAAM,WAAW,gBAAiB,SAAQ,IAAI,CAC5C,cAAc,CAAC,cAAc,CAAC,EAC9B,UAAU,CACX;IACC,IAAI,CAAC,EAAE,UAAU,CAAA;IACjB,QAAQ,CAAC,EAAE,YAAY,CAAA;IACvB,iCAAiC;IACjC,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,0DAA0D;IAC1D,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,kFAAkF;IAClF,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CA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AA;IAC7B,KAAK,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;IAC3B,KAAK,CAAC,EAAE,OAAO,CAAC,CAAC;QAAE,KAAK,EAAE,QAAQ,CAAA;KAAE,CAAC,CAAC,GAAG,SAAS,CAAA;IAClD,UAAU,CAAC,EAAE,OAAO,CAAC,CAAC,mBAAmB,CAAC,CAAC,GAAG,SAAS,CAAA;IACvD,wFAAwF;IACxF,SAAS,CAAC,EAAE,OAAO,CAAC,CAAC;QAAE,KAAK,EAAE,QAAQ,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC,GAAG,SAAS,CAAA;CACrE;AA4XH,QAAA,MAAM,WAAW,sDAAwC,CAAC;AAC1D,KAAK,WAAW,GAAG,UAAU,CAAC,OAAO,WAAW,CAAC,CAAC;AAClD,eAAe,WAAW,CAAC"}
package/dist/context.d.ts CHANGED
@@ -75,7 +75,12 @@ export interface InkContext {
75
75
  * `InkSidebar`'s width and the plugins' settings. Read once, when the root is created.
76
76
  */
77
77
  readonly storage: InkStorage;
78
- /** The saved signatures: InkRoot's deprecated `signatures` store, else its `storage`. */
78
+ /**
79
+ * InkRoot's `minDocumentWidth` (`MIN_DOCUMENT_WIDTH` by default), fixed for the root's life.
80
+ * Each `InkSidebar` without its own takes it.
81
+ */
82
+ readonly minDocumentWidth: number;
83
+ /** The saved signatures: kept in InkRoot's `storage` under `signatures`. */
79
84
  readonly signatures: SignatureLibrary;
80
85
  /** The fonts a typed signature offers: InkRoot's `signatureFonts`, else `SIGNATURE_FONTS`. */
81
86
  readonly signatureFonts: readonly string[];
@@ -99,7 +104,7 @@ export interface InkContext {
99
104
  setViewport(viewport: Viewport | null, tools: ToolController | null): void;
100
105
  /** InkRoot's `formHighlight`; InkViewport reads it when it builds the viewer. */
101
106
  readonly formHighlight: boolean | undefined;
102
- /** Calls InkRoot's `onaction`, or the deprecated `onformaction`. */
107
+ /** Calls InkRoot's `onaction`. */
103
108
  reportAction(action: ViewerAction): void;
104
109
  /** Calls InkRoot's `onError`, for failures after the document opened (a refused signing). */
105
110
  reportError(error: InkError): void;
@@ -1 +1 @@
1
- {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../src/lib/context.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,UAAU,EACV,YAAY,EACZ,WAAW,EACX,QAAQ,EACR,SAAS,EACT,UAAU,EACV,SAAS,EACT,aAAa,EACb,gBAAgB,EAChB,QAAQ,EACT,MAAM,cAAc,CAAA;AACrB,OAAO,KAAK,EACV,kBAAkB,EAClB,UAAU,EACV,UAAU,EACV,gBAAgB,EAChB,IAAI,EACJ,cAAc,EACd,MAAM,EACN,WAAW,EACX,SAAS,EACT,QAAQ,EACR,SAAS,EACV,MAAM,kBAAkB,CAAA;AAEzB,YAAY,EAAE,SAAS,EAAE,CAAA;AAEzB;;;GAGG;AACH,MAAM,WAAW,UAAW,SAAQ,aAAa;IAC/C,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAA;IACzB,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAA;IACzB,IAAI,IAAI,IAAI,CAAA;IACZ,IAAI,IAAI,IAAI,CAAA;IACZ,KAAK,IAAI,IAAI,CAAA;IACb;;;;;OAKG;IACH,KAAK,CAAC,EAAE,EAAE,MAAM,IAAI,GAAG,IAAI,CAAA;CAC5B;AAED;;;GAGG;AACH,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAA;IAC1B,QAAQ,CAAC,QAAQ,EAAE,WAAW,GAAG,IAAI,CAAA;IACrC,2FAA2F;IAC3F,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAA;IAC1B,QAAQ,CAAC,WAAW,EAAE,SAAS,UAAU,EAAE,CAAA;IAC3C,QAAQ,CAAC,SAAS,EAAE,SAAS,MAAM,EAAE,CAAA;IACrC;;;;OAIG;IACH,QAAQ,CAAC,UAAU,EAAE,UAAU,GAAG,IAAI,CAAA;IACtC;;;;OAIG;IACH,QAA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S,CAAA;IACtC,UAAU,CAAC,CAAC,EAAE,SAAS,GAAG,IAAI,CAAA;IAC9B,UAAU,CAAC,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,gGAAgG;IAChG,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;IACjC;;;;OAIG;IACH,YAAY,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAAA;IACrC,QAAQ,CAAC,OAAO,EAAE,UAAU,CAAA;IAC5B,QAAQ,CAAC,MAAM,EAAE,WAAW,GAAG,IAAI,CAAA;IACnC,WAAW,CAAC,QAAQ,EAAE,QAAQ,GAAG,IAAI,EAAE,KAAK,EAAE,cAAc,GAAG,IAAI,GAAG,IAAI,CAAA;IAC1E,iFAAiF;IACjF,QAAQ,CAAC,aAAa,EAAE,OAAO,GAAG,SAAS,CAAA;IAC3C,kCAAkC;IAClC,YAAY,CAAC,MAAM,EAAE,YAAY,GAAG,IAAI,CAAA;IACxC,6FAA6F;IAC7F,WAAW,CAAC,KAAK,EAAE,QAAQ,GAAG,IAAI,CAAA;CACnC;AAWD,wDAAwD;AACxD,wBAAgB,aAAa,CAAC,GAAG,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,MAAM,GAAG,IAAI,GAAG,IAAI,CAGvF;AAED,4FAA4F;AAC5F,wBAAgB,aAAa,CAAC,GAAG,EAAE,UAAU,GAAG,MAAM,GAAG,IAAI,CAG5D;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,UAAU,CAY1D;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,IAAI,UAAU,GAAG,SAAS,CAM9D"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inkbar/svelte",
3
- "version": "0.12.0",
3
+ "version": "0.13.0",
4
4
  "description": "Svelte 5 components and hooks for Inkbar, the browser PDF viewer and editor.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://inkbar.dev",
@@ -26,19 +26,19 @@
26
26
  "./package.json": "./package.json"
27
27
  },
28
28
  "dependencies": {
29
- "@inkbar/icons": "^0.12.0",
29
+ "@inkbar/icons": "^0.13.0",
30
30
  "@internationalized/date": "^3.12.4",
31
31
  "bits-ui": "^2.19.5",
32
32
  "esm-env": "^1.2.0"
33
33
  },
34
34
  "peerDependencies": {
35
- "@inkbar/core": "^0.12.0",
35
+ "@inkbar/core": "^0.13.0",
36
36
  "svelte": "^5.46.4"
37
37
  },
38
38
  "devDependencies": {
39
- "@inkbar/core": "0.12.0",
39
+ "@inkbar/core": "0.13.0",
40
40
  "@inkbar/fixtures": "0.0.0",
41
- "@inkbar/theme": "0.12.0",
41
+ "@inkbar/theme": "0.13.0",
42
42
  "@sveltejs/package": "^3.0.0",
43
43
  "@sveltejs/vite-plugin-svelte": "^7.3.1",
44
44
  "@vitest/browser-playwright": "^5.0.4",