@arbidocs/react 0.5.120 → 0.5.121
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/dist/PdfViewerImpl-ZVJZ4KNW.cjs +22 -0
- package/dist/PdfViewerImpl-ZVJZ4KNW.cjs.map +1 -0
- package/dist/{PdfViewerImpl.d-B28hLEuj.d.ts → PdfViewerImpl.d-CqnEzQO7.d.ts} +9 -1
- package/dist/annotations/freeze/index.d.ts +1 -1
- package/dist/artifacts/artifact-kind.js +1 -0
- package/dist/artifacts/artifact-kind.js.map +2 -2
- package/dist/artifacts/index.cjs +3 -2
- package/dist/artifacts/index.cjs.map +1 -1
- package/dist/artifacts/index.d.ts +3 -2
- package/dist/calls/livekit/index.cjs +41 -41
- package/dist/chat/turn-flush.js +16 -0
- package/dist/chat/turn-flush.js.map +7 -0
- package/dist/chat/useConversationActions.js +3 -0
- package/dist/chat/useConversationActions.js.map +2 -2
- package/dist/{chunk-QP3WQSAA.cjs → chunk-4B2GW3AY.cjs} +3 -3
- package/dist/{chunk-QP3WQSAA.cjs.map → chunk-4B2GW3AY.cjs.map} +1 -1
- package/dist/{chunk-YMB6XUR2.cjs → chunk-7L7QRIQ2.cjs} +11 -7
- package/dist/chunk-7L7QRIQ2.cjs.map +1 -0
- package/dist/{chunk-KDYYAZXP.cjs → chunk-DLEHM4IA.cjs} +227 -155
- package/dist/chunk-DLEHM4IA.cjs.map +1 -0
- package/dist/{PdfViewerImpl-QUSDLNNM.cjs → chunk-ICBT2XGF.cjs} +5 -2
- package/dist/chunk-ICBT2XGF.cjs.map +1 -0
- package/dist/{chunk-AJRYZ3IC.cjs → chunk-K6ELFSG6.cjs} +3 -3
- package/dist/{chunk-AJRYZ3IC.cjs.map → chunk-K6ELFSG6.cjs.map} +1 -1
- package/dist/chunk-MAOGK7IC.cjs +61 -0
- package/dist/chunk-MAOGK7IC.cjs.map +1 -0
- package/dist/{chunk-5TRUFWKT.cjs → chunk-X5OZRLFZ.cjs} +5 -5
- package/dist/{chunk-5TRUFWKT.cjs.map → chunk-X5OZRLFZ.cjs.map} +1 -1
- package/dist/{chunk-C72FSQUE.cjs → chunk-Z3W4XFWB.cjs} +3 -3
- package/dist/{chunk-C72FSQUE.cjs.map → chunk-Z3W4XFWB.cjs.map} +1 -1
- package/dist/datasets/sources/documents.js +1 -1
- package/dist/datasets/sources/documents.js.map +2 -2
- package/dist/document-tools/core.cjs +80 -80
- package/dist/document-tools/images-to-pdf.js +43 -0
- package/dist/document-tools/images-to-pdf.js.map +7 -0
- package/dist/document-tools/index.cjs +184 -80
- package/dist/document-tools/index.cjs.map +1 -1
- package/dist/document-tools/index.d.ts +41 -1
- package/dist/document-tools/index.js +6 -1
- package/dist/document-tools/index.js.map +2 -2
- package/dist/document-tools/pdf-attachments.js +63 -0
- package/dist/document-tools/pdf-attachments.js.map +7 -0
- package/dist/entities/DocumentEntity.js +7 -2
- package/dist/entities/DocumentEntity.js.map +2 -2
- package/dist/entities/file-type.js +14 -2
- package/dist/entities/file-type.js.map +2 -2
- package/dist/entities/index.js +9 -1
- package/dist/entities/index.js.map +2 -2
- package/dist/icons/PresIcon.js +53 -0
- package/dist/icons/PresIcon.js.map +7 -0
- package/dist/icons/colors.js +2 -0
- package/dist/icons/colors.js.map +2 -2
- package/dist/icons/file-type.js +3 -0
- package/dist/icons/file-type.js.map +2 -2
- package/dist/icons/index.js +2 -0
- package/dist/icons/index.js.map +2 -2
- package/dist/index.cjs +898 -865
- package/dist/index.cjs.map +1 -1
- package/dist/{index.d-DYlUprG9.d.ts → index.d-D2puqWeN.d.ts} +17 -3
- package/dist/index.d.ts +41 -8
- package/dist/index.js +1 -0
- package/dist/index.js.map +2 -2
- package/dist/pdf-region-impl-ZG5G2OX2.cjs +98 -0
- package/dist/pdf-region-impl-ZG5G2OX2.cjs.map +1 -0
- package/dist/session/documents.js +9 -5
- package/dist/session/documents.js.map +2 -2
- package/dist/shell/index.cjs +37 -37
- package/dist/ui/index.cjs +182 -170
- package/dist/ui/index.d.ts +1 -1
- package/dist/ui/slider.js +7 -1
- package/dist/ui/slider.js.map +2 -2
- package/dist/viewers/PdfViewer.cjs +3 -3
- package/dist/viewers/PdfViewer.d.ts +2 -2
- package/dist/viewers/PdfViewerImpl.js +4 -1
- package/dist/viewers/PdfViewerImpl.js.map +2 -2
- package/dist/viewers/index.cjs +28 -3
- package/dist/viewers/index.cjs.map +1 -1
- package/dist/viewers/index.d.ts +68 -2
- package/dist/viewers/index.js +14 -0
- package/dist/viewers/index.js.map +2 -2
- package/dist/viewers/pdf-region-impl.js +96 -0
- package/dist/viewers/pdf-region-impl.js.map +7 -0
- package/dist/viewers/pdf-region.js +57 -0
- package/dist/viewers/pdf-region.js.map +7 -0
- package/package.json +3 -3
- package/dist/PdfViewerImpl-QUSDLNNM.cjs.map +0 -1
- package/dist/chunk-KDYYAZXP.cjs.map +0 -1
- package/dist/chunk-YMB6XUR2.cjs.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/viewers/pdf-region.ts"],"names":["lazyChunk"],"mappings":";;;;;AA2CO,SAAS,oBAAoB,KAAA,EAAgD;AAClF,EAAA,IAAI,CAAC,KAAA,EAAO;AACZ,EAAA,IAAI,OAAA,IAAW,KAAA,EAAO,KAAA,CAAM,KAAA,EAAM;AAAA,OAC7B,KAAA,CAAM,KAAA,GAAQ,KAAA,CAAM,MAAA,GAAS,CAAA;AACpC;AAEO,IAAM,qBAAA,GAAwB;AAG9B,SAAS,cAAA,CACd,IAAA,EACA,IAAA,EACA,KAAA,EACA,YAAY,qBAAA,EACwE;AACpF,EAAA,MAAM,WAAA,GAAc,IAAA,CAAK,CAAA,GAAI,IAAA,CAAK,KAAA;AAClC,EAAA,MAAM,YAAA,GAAe,IAAA,CAAK,CAAA,GAAI,IAAA,CAAK,MAAA;AACnC,EAAA,IAAI,EAAE,cAAc,CAAA,CAAA,IAAM,EAAE,eAAe,CAAA,CAAA,IAAM,EAAE,QAA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;AACvD,EAAA,WAAA,CAAY,MAAA,EAAO,EAAG,aAAA,CAAc,IAAI,CAAA;AAC1C","file":"chunk-MAOGK7IC.cjs","sourcesContent":["/**\n * One rectangle of a PDF page drawn at a chosen pixel width: a presentation clip. It is rendered\n * again from the PDF (vector text, embedded images at their own resolution) for the size it is\n * shown at, never scaled up from a screenshot, so it stays sharp on a large screen.\n *\n * The geometry is here (pure, tested); the pdf.js work (a few at a time, cancellable) is in\n * `pdf-region-impl`, in the PDF engine's chunk, loaded the first time a region renders.\n */\n\nimport { lazyChunk } from '../lazy-chunk'\nimport type { PdfViewerAssets } from './PdfViewerImpl'\n\n/** Fractions of the displayed (rotated) page, origin top-left. */\nexport interface PdfRegionRect {\n x: number\n y: number\n w: number\n h: number\n}\n\nexport interface PdfRegionRequest {\n file: Blob\n /** 1-based page number. */\n page: number\n rect: PdfRegionRect\n /** Width of the output in device pixels. */\n width: number\n /** Rectangles of the page (same fractions) painted solid black over the output: redactions. */\n masks?: readonly PdfRegionRect[]\n assets?: PdfViewerAssets\n /** Cap on output pixels (canvas limits, memory). Default 16 megapixels. */\n maxPixels?: number\n /** Aborting drops the render (before it starts) or cancels it (while it runs). */\n signal?: AbortSignal\n}\n\n/**\n * A rendered region: a bitmap (or, without `createImageBitmap`, a canvas), ready to draw into a\n * canvas in any window. Its `width` × `height` are the output pixels. A bitmap holds memory until\n * closed: `closePdfRegionImage` when it is replaced.\n */\nexport type PdfRegionImage = ImageBitmap | HTMLCanvasElement\n\nexport function closePdfRegionImage(image: PdfRegionImage | null | undefined): void {\n if (!image) return\n if ('close' in image) image.close()\n else image.width = image.height = 0\n}\n\nexport const PDF_REGION_MAX_PIXELS = 16_000_000\n\n/** The scale and output size for a region of a `pageWidth × pageHeight` (points) page. */\nexport function regionGeometry(\n page: { width: number; height: number },\n rect: PdfRegionRect,\n width: number,\n maxPixels = PDF_REGION_MAX_PIXELS\n): { scale: number; width: number; height: number; offsetX: number; offsetY: number } {\n const regionWidth = rect.w * page.width\n const regionHeight = rect.h * page.height\n if (!(regionWidth > 0) || !(regionHeight > 0) || !(width > 0)) {\n return { scale: 0, width: 0, height: 0, offsetX: 0, offsetY: 0 }\n }\n let scale = width / regionWidth\n const pixels = regionWidth * scale * regionHeight * scale\n if (pixels > maxPixels) scale *= Math.sqrt(maxPixels / pixels)\n return {\n scale,\n width: Math.max(1, Math.round(regionWidth * scale)),\n height: Math.max(1, Math.round(regionHeight * scale)),\n offsetX: -rect.x * page.width * scale,\n offsetY: -rect.y * page.height * scale,\n }\n}\n\n/** The masks that fall in the region, in output pixels. */\nexport function regionMasks(\n rect: PdfRegionRect,\n masks: readonly PdfRegionRect[],\n out: { width: number; height: number }\n): { x: number; y: number; width: number; height: number }[] {\n const result: { x: number; y: number; width: number; height: number }[] = []\n for (const m of masks) {\n const x1 = Math.max(m.x, rect.x)\n const y1 = Math.max(m.y, rect.y)\n const x2 = Math.min(m.x + m.w, rect.x + rect.w)\n const y2 = Math.min(m.y + m.h, rect.y + rect.h)\n if (x2 <= x1 || y2 <= y1) continue\n // Rounded outwards: a mask never leaves a sliver of what it covers.\n const left = Math.floor(((x1 - rect.x) / rect.w) * out.width)\n const top = Math.floor(((y1 - rect.y) / rect.h) * out.height)\n const right = Math.ceil(((x2 - rect.x) / rect.w) * out.width)\n const bottom = Math.ceil(((y2 - rect.y) / rect.h) * out.height)\n result.push({ x: left, y: top, width: right - left, height: bottom - top })\n }\n return result\n}\n\nconst regionChunk = lazyChunk(() => import('./pdf-region-impl'))\n\n/** The region, drawn. */\nexport async function renderPdfRegion(request: PdfRegionRequest): Promise<PdfRegionImage> {\n const { renderRegion } = await regionChunk.load()\n return renderRegion(request)\n}\n\n/** Free the PDF engine's copy of a file no clip shows any more. */\nexport function releasePdfRegionSource(file: Blob): void {\n regionChunk.loaded()?.releaseSource(file)\n}\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunk7L7QRIQ2_cjs = require('./chunk-7L7QRIQ2.cjs');
|
|
4
4
|
var chunkO32T7XRD_cjs = require('./chunk-O32T7XRD.cjs');
|
|
5
5
|
var chunkRLSBRZ6Z_cjs = require('./chunk-RLSBRZ6Z.cjs');
|
|
6
6
|
var chunkEEIYXVM4_cjs = require('./chunk-EEIYXVM4.cjs');
|
|
@@ -1087,7 +1087,7 @@ function arbiAccountClient(arbi, overrides = {}) {
|
|
|
1087
1087
|
if (everywhere) await arbi.sessions.logoutAll();
|
|
1088
1088
|
else await arbi.logout();
|
|
1089
1089
|
} finally {
|
|
1090
|
-
|
|
1090
|
+
chunk7L7QRIQ2_cjs.clearSealedDrafts();
|
|
1091
1091
|
chunkRLSBRZ6Z_cjs.clearChatArtifacts();
|
|
1092
1092
|
await wipeOfflineMail().catch(() => {
|
|
1093
1093
|
});
|
|
@@ -2721,7 +2721,7 @@ function isWorkspaceGuestOf(workspaces, workspaceExtId, me) {
|
|
|
2721
2721
|
function useMeetingReadOnly(lockedWorkspaceExtId) {
|
|
2722
2722
|
const arbi = chunkO32T7XRD_cjs.useArbi();
|
|
2723
2723
|
const me = arbi.isLoggedIn ? arbi.user.identity()?.externalId ?? null : null;
|
|
2724
|
-
const { data: workspaces } =
|
|
2724
|
+
const { data: workspaces } = chunk7L7QRIQ2_cjs.useWorkspaces({
|
|
2725
2725
|
enabled: !!lockedWorkspaceExtId && arbi.isLoggedIn
|
|
2726
2726
|
});
|
|
2727
2727
|
return isWorkspaceGuestOf(
|
|
@@ -2983,5 +2983,5 @@ exports.useUserSettings = useUserSettings;
|
|
|
2983
2983
|
exports.wipeOfflineMail = wipeOfflineMail;
|
|
2984
2984
|
exports.wrapTrackKey = wrapTrackKey;
|
|
2985
2985
|
exports.writeSamples = writeSamples;
|
|
2986
|
-
//# sourceMappingURL=chunk-
|
|
2987
|
-
//# sourceMappingURL=chunk-
|
|
2986
|
+
//# sourceMappingURL=chunk-X5OZRLFZ.cjs.map
|
|
2987
|
+
//# sourceMappingURL=chunk-X5OZRLFZ.cjs.map
|