@ai-matrx/office 0.8.49 → 0.8.50

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/CHANGELOG.md CHANGED
@@ -1,10 +1,20 @@
1
1
  # Changelog
2
2
 
3
- ## 0.8.49
3
+ ## 0.8.50
4
4
 
5
5
  UNVERIFIED: this release has no Unreleased entry and the source comparison could not be made (the caller supplied no source comparison). Whether source changed is unknown; consumer action is unknown.
6
6
  Check the package's gitHead on npm against this version's gitHead: `git diff <previous gitHead> <this gitHead> -- apps/shared/office/src`.
7
7
 
8
+ ## 0.8.49
9
+
10
+ SOURCE CHANGED WITH NO RELEASE NOTE. This release shipped source changes that nobody described in an Unreleased entry,
11
+ so they may include breaking API changes. Consumer action is UNKNOWN: read the diff before upgrading.
12
+ Diff: `git diff 184cfc8959 90e2be3bbc -- apps/shared/office/src`
13
+
14
+ Changed shipped source files (2):
15
+ - `apps/shared/office/src/pdf/PdfWorkspace.tsx`
16
+ - `apps/shared/office/src/pdf/ports.ts`
17
+
8
18
  ## 0.8.48
9
19
 
10
20
  Automatic changed-only republish (docs/metadata drift since the last published version; verified: `git diff 5da59424ae 184cfc8959 -- apps/shared/office/src`
@@ -246,6 +246,8 @@ interface PdfWorkspaceHost {
246
246
  renderViewer(state: PdfViewerState): ReactNode;
247
247
  /** One page thumbnail (the left panel). Absent: the panel numbers its pages only. */
248
248
  renderThumbnail?(page: number, widthPx: number): ReactNode;
249
+ /** A small badge drawn in the corner of one page's thumbnail (the app's annotation count, for example). Null or absent: none. */
250
+ renderPageBadge?(page: number): ReactNode;
249
251
  /** Run one tool on the server. Rejects with a sentence on failure. */
250
252
  run(request: PdfRunRequest): Promise<PdfRunResult>;
251
253
  /** Open another page of the app for the same file (Scan, Sign). */
@@ -246,6 +246,8 @@ interface PdfWorkspaceHost {
246
246
  renderViewer(state: PdfViewerState): ReactNode;
247
247
  /** One page thumbnail (the left panel). Absent: the panel numbers its pages only. */
248
248
  renderThumbnail?(page: number, widthPx: number): ReactNode;
249
+ /** A small badge drawn in the corner of one page's thumbnail (the app's annotation count, for example). Null or absent: none. */
250
+ renderPageBadge?(page: number): ReactNode;
249
251
  /** Run one tool on the server. Rejects with a sentence on failure. */
250
252
  run(request: PdfRunRequest): Promise<PdfRunResult>;
251
253
  /** Open another page of the app for the same file (Scan, Sign). */
package/dist/pdf.cjs CHANGED
@@ -157,6 +157,7 @@ function LeftPanel(p) {
157
157
  const turn = p.decisions.turns[page] ?? 0;
158
158
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "relative flex h-full w-full items-center justify-center overflow-hidden bg-card", children: [
159
159
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: { transform: turn ? `rotate(${turn}deg)` : void 0 }, className: "flex h-full w-full items-center justify-center", children: p.host.renderThumbnail ? p.host.renderThumbnail(page, THUMB_W) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "text-xs text-muted-foreground", children: page }) }),
160
+ p.host.renderPageBadge ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "pointer-events-none absolute right-1 top-1 z-10", "data-pdf-page-badge": page, children: p.host.renderPageBadge(page) }) : null,
160
161
  page === p.currentPage ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "pointer-events-none absolute inset-0 border-2 border-primary" }) : null,
161
162
  gone.has(page) ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "absolute inset-0 flex items-center justify-center bg-background/80 text-xs font-medium text-destructive", children: "Deleted" }) : null
162
163
  ] });