@osdk/react-components 0.22.1-main-ceeabb580a7cde55b2ae85dd02c5782dff66c08b → 0.23.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 (51) hide show
  1. package/CHANGELOG.md +2 -7
  2. package/build/browser/util/UserAgent.js +1 -1
  3. package/build/browser/util/UserAgent.js.map +1 -1
  4. package/build/cjs/chunk-44Q6YNJY.cjs +11 -0
  5. package/build/cjs/{chunk-YDWD6TP5.cjs.map → chunk-44Q6YNJY.cjs.map} +1 -1
  6. package/build/cjs/{chunk-RMWSZVV2.cjs → chunk-CDKWDUSS.cjs} +4 -4
  7. package/build/cjs/{chunk-RMWSZVV2.cjs.map → chunk-CDKWDUSS.cjs.map} +1 -1
  8. package/build/cjs/chunk-F4J3FXNK.cjs +11 -0
  9. package/build/cjs/{chunk-DJFLYZBS.cjs.map → chunk-F4J3FXNK.cjs.map} +1 -1
  10. package/build/cjs/chunk-JNIYR5HQ.cjs +11 -0
  11. package/build/cjs/{chunk-H2XNBPOA.cjs.map → chunk-JNIYR5HQ.cjs.map} +1 -1
  12. package/build/cjs/chunk-KNMWCCZY.cjs +11 -0
  13. package/build/cjs/{chunk-6EELIQRV.cjs.map → chunk-KNMWCCZY.cjs.map} +1 -1
  14. package/build/cjs/chunk-LXYK5HUR.cjs +11 -0
  15. package/build/cjs/{chunk-WR5WRYGF.cjs.map → chunk-LXYK5HUR.cjs.map} +1 -1
  16. package/build/cjs/{chunk-T537RXLM.cjs → chunk-M2B7X4UP.cjs} +4 -4
  17. package/build/cjs/{chunk-T537RXLM.cjs.map → chunk-M2B7X4UP.cjs.map} +1 -1
  18. package/build/cjs/{chunk-GYKYHJPC.cjs → chunk-MOL6BDEN.cjs} +4 -4
  19. package/build/cjs/{chunk-GYKYHJPC.cjs.map → chunk-MOL6BDEN.cjs.map} +1 -1
  20. package/build/cjs/{chunk-XRPVRX3K.cjs → chunk-NP2OODWG.cjs} +4 -4
  21. package/build/cjs/{chunk-XRPVRX3K.cjs.map → chunk-NP2OODWG.cjs.map} +1 -1
  22. package/build/cjs/{chunk-AKL37QN2.cjs → chunk-UG5QG75Y.cjs} +4 -4
  23. package/build/cjs/{chunk-AKL37QN2.cjs.map → chunk-UG5QG75Y.cjs.map} +1 -1
  24. package/build/cjs/{chunk-6YAMH33T.cjs → chunk-WYDFI4D2.cjs} +4 -4
  25. package/build/cjs/{chunk-6YAMH33T.cjs.map → chunk-WYDFI4D2.cjs.map} +1 -1
  26. package/build/cjs/{chunk-QXV7I44P.cjs → chunk-Z6F6MHWG.cjs} +4 -4
  27. package/build/cjs/{chunk-QXV7I44P.cjs.map → chunk-Z6F6MHWG.cjs.map} +1 -1
  28. package/build/cjs/{chunk-KJS4QZ6O.cjs → chunk-ZIYQXEEB.cjs} +3 -3
  29. package/build/cjs/chunk-ZIYQXEEB.cjs.map +1 -0
  30. package/build/cjs/public/experimental/action-form.cjs +4 -4
  31. package/build/cjs/public/experimental/document-viewer.cjs +4 -4
  32. package/build/cjs/public/experimental/email-viewer.cjs +3 -3
  33. package/build/cjs/public/experimental/excel-viewer.cjs +3 -3
  34. package/build/cjs/public/experimental/filter-list.cjs +14 -14
  35. package/build/cjs/public/experimental/image-viewer.cjs +3 -3
  36. package/build/cjs/public/experimental/markdown-renderer.cjs +3 -3
  37. package/build/cjs/public/experimental/object-table.cjs +8 -8
  38. package/build/cjs/public/experimental/pdf-viewer.cjs +7 -7
  39. package/build/cjs/public/experimental/tiff-renderer.cjs +3 -3
  40. package/build/cjs/public/experimental/video-viewer.cjs +3 -3
  41. package/build/cjs/public/experimental/xml-viewer.cjs +3 -3
  42. package/build/cjs/public/experimental.cjs +47 -47
  43. package/build/esm/util/UserAgent.js +1 -1
  44. package/build/esm/util/UserAgent.js.map +1 -1
  45. package/package.json +7 -7
  46. package/build/cjs/chunk-6EELIQRV.cjs +0 -11
  47. package/build/cjs/chunk-DJFLYZBS.cjs +0 -11
  48. package/build/cjs/chunk-H2XNBPOA.cjs +0 -11
  49. package/build/cjs/chunk-KJS4QZ6O.cjs.map +0 -1
  50. package/build/cjs/chunk-WR5WRYGF.cjs +0 -11
  51. package/build/cjs/chunk-YDWD6TP5.cjs +0 -11
@@ -1,11 +1,11 @@
1
1
  'use strict';
2
2
 
3
3
  var chunkIISDOJPR_cjs = require('./chunk-IISDOJPR.cjs');
4
- var chunkKJS4QZ6O_cjs = require('./chunk-KJS4QZ6O.cjs');
4
+ var chunkZIYQXEEB_cjs = require('./chunk-ZIYQXEEB.cjs');
5
5
 
6
6
  // src/public/experimental/tiff-renderer.ts
7
- var TiffViewerMedia2 = chunkKJS4QZ6O_cjs.withOsdkMetrics(chunkIISDOJPR_cjs.TiffViewerMedia, "TiffViewerMedia");
7
+ var TiffViewerMedia2 = chunkZIYQXEEB_cjs.withOsdkMetrics(chunkIISDOJPR_cjs.TiffViewerMedia, "TiffViewerMedia");
8
8
 
9
9
  exports.TiffViewerMedia = TiffViewerMedia2;
10
- //# sourceMappingURL=chunk-AKL37QN2.cjs.map
11
- //# sourceMappingURL=chunk-AKL37QN2.cjs.map
10
+ //# sourceMappingURL=chunk-UG5QG75Y.cjs.map
11
+ //# sourceMappingURL=chunk-UG5QG75Y.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/public/experimental/tiff-renderer.ts"],"names":["TiffViewerMedia","withOsdkMetrics"],"mappings":";;;;;;AAqBO,IAAMA,gBAAAA,GAAkBC,iCAAA,CAAgBD,iCAAA,EAAkB,iBAAiB","file":"chunk-AKL37QN2.cjs","sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// TiffRenderer\nexport { TiffRenderer } from \"../../images/tiff-renderer/TiffRenderer.js\";\n// TiffViewerMedia (Media wrapper)\nimport { TiffViewerMedia as _TiffViewerMedia } from \"../../images/tiff-renderer/TiffViewerMedia.js\";\nimport { withOsdkMetrics } from \"../../util/withOsdkMetrics.js\";\nexport const TiffViewerMedia = withOsdkMetrics(_TiffViewerMedia, \"TiffViewerMedia\");"]}
1
+ {"version":3,"sources":["../../src/public/experimental/tiff-renderer.ts"],"names":["TiffViewerMedia","withOsdkMetrics"],"mappings":";;;;;;AAqBO,IAAMA,gBAAAA,GAAkBC,iCAAA,CAAgBD,iCAAA,EAAkB,iBAAiB","file":"chunk-UG5QG75Y.cjs","sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// TiffRenderer\nexport { TiffRenderer } from \"../../images/tiff-renderer/TiffRenderer.js\";\n// TiffViewerMedia (Media wrapper)\nimport { TiffViewerMedia as _TiffViewerMedia } from \"../../images/tiff-renderer/TiffViewerMedia.js\";\nimport { withOsdkMetrics } from \"../../util/withOsdkMetrics.js\";\nexport const TiffViewerMedia = withOsdkMetrics(_TiffViewerMedia, \"TiffViewerMedia\");"]}
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var chunkFWZS3WQ4_cjs = require('./chunk-FWZS3WQ4.cjs');
4
- var chunkKJS4QZ6O_cjs = require('./chunk-KJS4QZ6O.cjs');
4
+ var chunkZIYQXEEB_cjs = require('./chunk-ZIYQXEEB.cjs');
5
5
  var icons = require('@blueprintjs/icons');
6
6
  var classnames = require('classnames');
7
7
  require('pdfjs-dist/web/pdf_viewer.css');
@@ -179,12 +179,12 @@ function usePdfViewerInstance(options) {
179
179
  }
180
180
 
181
181
  // src/public/experimental/pdf-viewer.ts
182
- var PdfViewer2 = chunkKJS4QZ6O_cjs.withOsdkMetrics(chunkFWZS3WQ4_cjs.PdfViewer, "PdfViewer");
182
+ var PdfViewer2 = chunkZIYQXEEB_cjs.withOsdkMetrics(chunkFWZS3WQ4_cjs.PdfViewer, "PdfViewer");
183
183
 
184
184
  exports.PdfViewer = PdfViewer2;
185
185
  exports.PdfViewerContent = PdfViewerContent;
186
186
  exports.PdfViewerProvider = PdfViewerProvider;
187
187
  exports.usePdfViewerContext = usePdfViewerContext;
188
188
  exports.usePdfViewerInstance = usePdfViewerInstance;
189
- //# sourceMappingURL=chunk-6YAMH33T.cjs.map
190
- //# sourceMappingURL=chunk-6YAMH33T.cjs.map
189
+ //# sourceMappingURL=chunk-WYDFI4D2.cjs.map
190
+ //# sourceMappingURL=chunk-WYDFI4D2.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/pdf-viewer/components/PdfViewerContent.tsx","../../src/pdf-viewer/PdfViewerContext.tsx","../../src/public/experimental/pdf-viewer.ts"],"names":["EMPTY_ANNOTATION_ARRAY","usePdfViewerCore","usePdfAnnotationsByPage","usePdfFormFields","useRef","useEffect","classnames","PdfViewer_default","React","Spin","ErrorIcon","PdfAnnotationOverlay","useContext","usePdfViewerState","usePdfHighlightMode","useMemo","PdfViewer","withOsdkMetrics"],"mappings":";;;;;;;;;;;;;;AA0BO,SAAS,gBAAA,CAAiB;AAAA,EAC/B,GAAA;AAAA,EACA,WAAA,GAAcA,wCAAA;AAAA,EACd,iBAAA;AAAA,EACA,WAAA,GAAc,CAAA;AAAA,EACd,YAAA,GAAe,CAAA;AAAA,EACf,YAAA,EAAc,gBAAA;AAAA,EACd,aAAA,EAAe,iBAAA;AAAA,EACf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AAI,OAAA;AACJ,EAAA,OAAOa,cAAQ,OAAO;AAAA,IACpB,GAAG,MAAA;AAAA,IACH,gBAAA;AAAA,IACA,mBAAA;AAAA,IACA,mBAAA;AAAA,IACA,aAAA;AAAA,IACA,cAAA;AAAA,IACA,WAAA;AAAA,IACA,iBAAA;AAAA,IACA,iBAAA;AAAA,IACA,cAAA;AAAA,IACA,cAAA;AAAA,IACA;AAAA,GACF,CAAA,EAAI,CAAC,MAAA,EAAQ,gBAAA,EAAkB,qBAAqB,mBAAA,EAAqB,aAAA,EAAe,cAAA,EAAgB,WAAA,EAAa,iBAAA,EAAmB,iBAAA,EAAmB,cAAA,EAAgB,cAAA,EAAgB,YAAY,CAAC,CAAA;AAC1M;;;AC9DO,IAAMC,UAAAA,GAAYC,iCAAA,CAAgBD,2BAAA,EAAY,WAAW","file":"chunk-6YAMH33T.cjs","sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Error as ErrorIcon, Spin } from \"@blueprintjs/icons\";\nimport classnames from \"classnames\";\nimport \"pdfjs-dist/web/pdf_viewer.css\";\nimport React, { useEffect, useRef } from \"react\";\nimport { EMPTY_ANNOTATION_ARRAY } from \"../constants.js\";\nimport { usePdfAnnotationsByPage } from \"../hooks/usePdfAnnotationsByPage.js\";\nimport { usePdfFormFields } from \"../hooks/usePdfFormFields.js\";\nimport { usePdfViewerCore } from \"../hooks/usePdfViewerCore.js\";\nimport styles from \"../PdfViewer.module.css\";\nimport { PdfAnnotationOverlay } from \"./PdfAnnotationOverlay.js\";\nexport function PdfViewerContent({\n src,\n annotations = EMPTY_ANNOTATION_ARRAY,\n onAnnotationClick,\n initialPage = 1,\n initialScale = 1.0,\n onPageChange: onPageChangeProp,\n onScaleChange: onScaleChangeProp,\n formData,\n onFormChange,\n className\n}) {\n const viewer = usePdfViewerCore({\n src,\n initialPage,\n initialScale\n });\n const annotationsByPage = usePdfAnnotationsByPage(annotations);\n usePdfFormFields({\n pdfViewerRef: viewer.pdfViewerRef,\n eventBusRef: viewer.eventBusRef,\n document: viewer.document,\n formData,\n onFormChange\n });\n\n // Use refs for callbacks to avoid firing on initial mount\n const onPageChangeRef = useRef(onPageChangeProp);\n onPageChangeRef.current = onPageChangeProp;\n const onScaleChangeRef = useRef(onScaleChangeProp);\n onScaleChangeRef.current = onScaleChangeProp;\n const isInitialMountRef = useRef(true);\n useEffect(function notifyPageChange() {\n if (isInitialMountRef.current) {\n return;\n }\n onPageChangeRef.current?.(viewer.currentPage);\n }, [viewer.currentPage]);\n useEffect(function notifyScaleChange() {\n if (isInitialMountRef.current) {\n return;\n }\n onScaleChangeRef.current?.(viewer.scale);\n }, [viewer.scale]);\n useEffect(function clearInitialMount() {\n isInitialMountRef.current = false;\n }, []);\n const rootClassName = classnames(styles.pdfViewer, className);\n if (viewer.loading) {\n return /*#__PURE__*/React.createElement(\"div\", {\n className: rootClassName\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: styles.loadingContainer\n }, /*#__PURE__*/React.createElement(Spin, {\n className: styles.spinnerIcon\n }), \"Loading\\u2026\"));\n }\n if (viewer.error != null) {\n return /*#__PURE__*/React.createElement(\"div\", {\n className: rootClassName\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: styles.errorContainer\n }, /*#__PURE__*/React.createElement(ErrorIcon, {\n className: styles.errorIcon\n }), \"Failed to load PDF: \", viewer.error.message));\n }\n if (viewer.document == null) {\n return /*#__PURE__*/React.createElement(\"div\", {\n className: rootClassName\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: styles.loadingContainer\n }, \"No document\"));\n }\n return /*#__PURE__*/React.createElement(\"div\", {\n className: rootClassName\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: styles.scrollContainerWrapper\n }, /*#__PURE__*/React.createElement(\"div\", {\n ref: viewer.containerRef,\n className: styles.scrollContainer\n }, /*#__PURE__*/React.createElement(\"div\", {\n ref: viewer.viewerRef,\n className: \"pdfViewer\"\n }), viewer.portalTargets.map(target => {\n const pageAnnotations = annotationsByPage[target.pageNumber] ?? EMPTY_ANNOTATION_ARRAY;\n if (pageAnnotations.length === 0) {\n return null;\n }\n return /*#__PURE__*/React.createElement(PdfAnnotationOverlay, {\n key: target.pageNumber,\n target: target,\n annotations: pageAnnotations,\n onAnnotationClick: onAnnotationClick\n });\n }))));\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { createContext, useContext, useMemo } from \"react\";\nimport { EMPTY_ANNOTATION_ARRAY } from \"./constants.js\";\nimport { usePdfAnnotationsByPage } from \"./hooks/usePdfAnnotationsByPage.js\";\nimport { usePdfFormFields } from \"./hooks/usePdfFormFields.js\";\nimport { usePdfHighlightMode } from \"./hooks/usePdfHighlightMode.js\";\nimport { usePdfViewerState } from \"./hooks/usePdfViewerState.js\";\n\n/** The shape of the value provided by {@link PdfViewerProvider}. */\n\nconst PdfViewerContext = /*#__PURE__*/createContext(null);\n/** Provides {@link PdfViewerContextValue} to descendant components. */\nexport function PdfViewerProvider({\n value,\n children\n}) {\n return /*#__PURE__*/React.createElement(PdfViewerContext.Provider, {\n value: value\n }, children);\n}\n\n/**\n * Returns the nearest {@link PdfViewerContextValue} from a {@link PdfViewerProvider}.\n * Throws if called outside a provider.\n */\nexport function usePdfViewerContext() {\n const ctx = useContext(PdfViewerContext);\n if (ctx == null) {\n throw new Error(\"usePdfViewerContext must be used within a PdfViewerProvider\");\n }\n return ctx;\n}\n\n/**\n * Consumer-facing setup hook analogous to react-hook-form's `useForm()`.\n * Accepts viewer options and returns a {@link PdfViewerContextValue} suitable\n * for passing to {@link PdfViewerProvider}.\n */\nexport function usePdfViewerInstance(options) {\n const viewer = usePdfViewerState({\n src: options.src,\n initialPage: options.initialPage,\n initialScale: options.initialScale,\n initialAutoSize: options.initialAutoSize,\n initialSidebarOpen: options.initialSidebarOpen,\n sidebarMode: options.sidebarMode,\n onDownload: options.onDownload\n });\n const {\n highlightModeActive,\n toggleHighlightMode\n } = usePdfHighlightMode({\n pdfViewerRef: viewer.pdfViewerRef,\n document: viewer.document,\n enabled: options.highlightEnabled ?? false,\n onTextHighlight: options.onTextHighlight,\n onHighlightDelete: options.onHighlightDelete\n });\n const {\n hasFormFields,\n submitFormData\n } = usePdfFormFields({\n pdfViewerRef: viewer.pdfViewerRef,\n eventBusRef: viewer.eventBusRef,\n document: viewer.document,\n formData: options.formData,\n onFormSubmit: options.onFormSubmit,\n onFormChange: options.onFormChange\n });\n const annotations = options.annotations ?? EMPTY_ANNOTATION_ARRAY;\n const annotationsByPage = usePdfAnnotationsByPage(annotations);\n const highlightEnabled = options.highlightEnabled ?? false;\n const enableDownload = options.enableDownload ?? false;\n const enableFormSave = options.onFormSubmit != null && hasFormFields;\n const {\n onAnnotationClick,\n outlineIcons\n } = options;\n return useMemo(() => ({\n ...viewer,\n highlightEnabled,\n highlightModeActive,\n toggleHighlightMode,\n hasFormFields,\n submitFormData,\n annotations,\n annotationsByPage,\n onAnnotationClick,\n enableDownload,\n enableFormSave,\n outlineIcons\n }), [viewer, highlightEnabled, highlightModeActive, toggleHighlightMode, hasFormFields, submitFormData, annotations, annotationsByPage, onAnnotationClick, enableDownload, enableFormSave, outlineIcons]);\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// PdfViewer\nexport { BasePdfViewer } from \"../../pdf-viewer/PdfViewer.js\";\n// PdfViewer building blocks\nexport { PdfViewerAnnotationLayer } from \"../../pdf-viewer/components/PdfViewerAnnotationLayer.js\";\nexport { PdfViewerContent } from \"../../pdf-viewer/components/PdfViewerContent.js\";\nexport { PdfViewerOutlineSidebar } from \"../../pdf-viewer/components/PdfViewerOutlineSidebar.js\";\nexport { PdfViewerSearchBar } from \"../../pdf-viewer/components/PdfViewerSearchBar.js\";\nexport { PdfViewerSidebar } from \"../../pdf-viewer/components/PdfViewerSidebar.js\";\nexport { PdfViewerToolbar } from \"../../pdf-viewer/components/PdfViewerToolbar.js\";\n\n// PdfViewer hooks — primitive\nexport { usePdfAnnotationPortals } from \"../../pdf-viewer/hooks/usePdfAnnotationPortals.js\";\nexport { usePdfAnnotationsByPage } from \"../../pdf-viewer/hooks/usePdfAnnotationsByPage.js\";\nexport { usePdfDocument } from \"../../pdf-viewer/hooks/usePdfDocument.js\";\nexport { usePdfFormFields } from \"../../pdf-viewer/hooks/usePdfFormFields.js\";\nexport { usePdfHighlightMode } from \"../../pdf-viewer/hooks/usePdfHighlightMode.js\";\nexport { usePdfOutline } from \"../../pdf-viewer/hooks/usePdfOutline.js\";\nexport { usePdfViewer } from \"../../pdf-viewer/hooks/usePdfViewer.js\";\nexport { usePdfViewerSearch } from \"../../pdf-viewer/hooks/usePdfViewerSearch.js\";\nexport { usePdfViewerSync } from \"../../pdf-viewer/hooks/usePdfViewerSync.js\";\n// PdfViewer context\nexport { PdfViewerProvider, usePdfViewerContext, usePdfViewerInstance } from \"../../pdf-viewer/PdfViewerContext.js\";\n// PdfViewer hooks — composition\nexport { usePdfViewerCore } from \"../../pdf-viewer/hooks/usePdfViewerCore.js\";\nexport { usePdfViewerState } from \"../../pdf-viewer/hooks/usePdfViewerState.js\";\n\n// PdfViewer (Media wrapper)\nimport { PdfViewer as _PdfViewer } from \"../../pdf-viewer/PdfRenderer.js\";\nimport { withOsdkMetrics } from \"../../util/withOsdkMetrics.js\";\nexport const PdfViewer = withOsdkMetrics(_PdfViewer, \"PdfViewer\");"]}
1
+ {"version":3,"sources":["../../src/pdf-viewer/components/PdfViewerContent.tsx","../../src/pdf-viewer/PdfViewerContext.tsx","../../src/public/experimental/pdf-viewer.ts"],"names":["EMPTY_ANNOTATION_ARRAY","usePdfViewerCore","usePdfAnnotationsByPage","usePdfFormFields","useRef","useEffect","classnames","PdfViewer_default","React","Spin","ErrorIcon","PdfAnnotationOverlay","useContext","usePdfViewerState","usePdfHighlightMode","useMemo","PdfViewer","withOsdkMetrics"],"mappings":";;;;;;;;;;;;;;AA0BO,SAAS,gBAAA,CAAiB;AAAA,EAC/B,GAAA;AAAA,EACA,WAAA,GAAcA,wCAAA;AAAA,EACd,iBAAA;AAAA,EACA,WAAA,GAAc,CAAA;AAAA,EACd,YAAA,GAAe,CAAA;AAAA,EACf,YAAA,EAAc,gBAAA;AAAA,EACd,aAAA,EAAe,iBAAA;AAAA,EACf,QAAA;AAAA,EACA,YAAA;AAAA,EACA;AACF,CAAA,EAAG;AACD,EAAA,MAAM,SAASC,kCAAA,CAAiB;AAAA,IAC9B,GAAA;AAAA,IACA,WAAA;AAAA,IACA;AAAA,GACD,CAAA;AACD,EAAA,MAAM,iBAAA,GAAoBC,0CAAwB,WAAW,CAAA;AAC7D,EAAAC,kCAAA,CAAiB;AAAA,IACf,cAAc,MAAA,CAAO,YAAA;AAAA,IACrB,aAAa,MAAA,CAAO,WA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EAAkB,qBAAqB,mBAAA,EAAqB,aAAA,EAAe,cAAA,EAAgB,WAAA,EAAa,iBAAA,EAAmB,iBAAA,EAAmB,cAAA,EAAgB,cAAA,EAAgB,YAAY,CAAC,CAAA;AAC1M;;;AC9DO,IAAMC,UAAAA,GAAYC,iCAAA,CAAgBD,2BAAA,EAAY,WAAW","file":"chunk-WYDFI4D2.cjs","sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Error as ErrorIcon, Spin } from \"@blueprintjs/icons\";\nimport classnames from \"classnames\";\nimport \"pdfjs-dist/web/pdf_viewer.css\";\nimport React, { useEffect, useRef } from \"react\";\nimport { EMPTY_ANNOTATION_ARRAY } from \"../constants.js\";\nimport { usePdfAnnotationsByPage } from \"../hooks/usePdfAnnotationsByPage.js\";\nimport { usePdfFormFields } from \"../hooks/usePdfFormFields.js\";\nimport { usePdfViewerCore } from \"../hooks/usePdfViewerCore.js\";\nimport styles from \"../PdfViewer.module.css\";\nimport { PdfAnnotationOverlay } from \"./PdfAnnotationOverlay.js\";\nexport function PdfViewerContent({\n src,\n annotations = EMPTY_ANNOTATION_ARRAY,\n onAnnotationClick,\n initialPage = 1,\n initialScale = 1.0,\n onPageChange: onPageChangeProp,\n onScaleChange: onScaleChangeProp,\n formData,\n onFormChange,\n className\n}) {\n const viewer = usePdfViewerCore({\n src,\n initialPage,\n initialScale\n });\n const annotationsByPage = usePdfAnnotationsByPage(annotations);\n usePdfFormFields({\n pdfViewerRef: viewer.pdfViewerRef,\n eventBusRef: viewer.eventBusRef,\n document: viewer.document,\n formData,\n onFormChange\n });\n\n // Use refs for callbacks to avoid firing on initial mount\n const onPageChangeRef = useRef(onPageChangeProp);\n onPageChangeRef.current = onPageChangeProp;\n const onScaleChangeRef = useRef(onScaleChangeProp);\n onScaleChangeRef.current = onScaleChangeProp;\n const isInitialMountRef = useRef(true);\n useEffect(function notifyPageChange() {\n if (isInitialMountRef.current) {\n return;\n }\n onPageChangeRef.current?.(viewer.currentPage);\n }, [viewer.currentPage]);\n useEffect(function notifyScaleChange() {\n if (isInitialMountRef.current) {\n return;\n }\n onScaleChangeRef.current?.(viewer.scale);\n }, [viewer.scale]);\n useEffect(function clearInitialMount() {\n isInitialMountRef.current = false;\n }, []);\n const rootClassName = classnames(styles.pdfViewer, className);\n if (viewer.loading) {\n return /*#__PURE__*/React.createElement(\"div\", {\n className: rootClassName\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: styles.loadingContainer\n }, /*#__PURE__*/React.createElement(Spin, {\n className: styles.spinnerIcon\n }), \"Loading\\u2026\"));\n }\n if (viewer.error != null) {\n return /*#__PURE__*/React.createElement(\"div\", {\n className: rootClassName\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: styles.errorContainer\n }, /*#__PURE__*/React.createElement(ErrorIcon, {\n className: styles.errorIcon\n }), \"Failed to load PDF: \", viewer.error.message));\n }\n if (viewer.document == null) {\n return /*#__PURE__*/React.createElement(\"div\", {\n className: rootClassName\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: styles.loadingContainer\n }, \"No document\"));\n }\n return /*#__PURE__*/React.createElement(\"div\", {\n className: rootClassName\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: styles.scrollContainerWrapper\n }, /*#__PURE__*/React.createElement(\"div\", {\n ref: viewer.containerRef,\n className: styles.scrollContainer\n }, /*#__PURE__*/React.createElement(\"div\", {\n ref: viewer.viewerRef,\n className: \"pdfViewer\"\n }), viewer.portalTargets.map(target => {\n const pageAnnotations = annotationsByPage[target.pageNumber] ?? EMPTY_ANNOTATION_ARRAY;\n if (pageAnnotations.length === 0) {\n return null;\n }\n return /*#__PURE__*/React.createElement(PdfAnnotationOverlay, {\n key: target.pageNumber,\n target: target,\n annotations: pageAnnotations,\n onAnnotationClick: onAnnotationClick\n });\n }))));\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { createContext, useContext, useMemo } from \"react\";\nimport { EMPTY_ANNOTATION_ARRAY } from \"./constants.js\";\nimport { usePdfAnnotationsByPage } from \"./hooks/usePdfAnnotationsByPage.js\";\nimport { usePdfFormFields } from \"./hooks/usePdfFormFields.js\";\nimport { usePdfHighlightMode } from \"./hooks/usePdfHighlightMode.js\";\nimport { usePdfViewerState } from \"./hooks/usePdfViewerState.js\";\n\n/** The shape of the value provided by {@link PdfViewerProvider}. */\n\nconst PdfViewerContext = /*#__PURE__*/createContext(null);\n/** Provides {@link PdfViewerContextValue} to descendant components. */\nexport function PdfViewerProvider({\n value,\n children\n}) {\n return /*#__PURE__*/React.createElement(PdfViewerContext.Provider, {\n value: value\n }, children);\n}\n\n/**\n * Returns the nearest {@link PdfViewerContextValue} from a {@link PdfViewerProvider}.\n * Throws if called outside a provider.\n */\nexport function usePdfViewerContext() {\n const ctx = useContext(PdfViewerContext);\n if (ctx == null) {\n throw new Error(\"usePdfViewerContext must be used within a PdfViewerProvider\");\n }\n return ctx;\n}\n\n/**\n * Consumer-facing setup hook analogous to react-hook-form's `useForm()`.\n * Accepts viewer options and returns a {@link PdfViewerContextValue} suitable\n * for passing to {@link PdfViewerProvider}.\n */\nexport function usePdfViewerInstance(options) {\n const viewer = usePdfViewerState({\n src: options.src,\n initialPage: options.initialPage,\n initialScale: options.initialScale,\n initialAutoSize: options.initialAutoSize,\n initialSidebarOpen: options.initialSidebarOpen,\n sidebarMode: options.sidebarMode,\n onDownload: options.onDownload\n });\n const {\n highlightModeActive,\n toggleHighlightMode\n } = usePdfHighlightMode({\n pdfViewerRef: viewer.pdfViewerRef,\n document: viewer.document,\n enabled: options.highlightEnabled ?? false,\n onTextHighlight: options.onTextHighlight,\n onHighlightDelete: options.onHighlightDelete\n });\n const {\n hasFormFields,\n submitFormData\n } = usePdfFormFields({\n pdfViewerRef: viewer.pdfViewerRef,\n eventBusRef: viewer.eventBusRef,\n document: viewer.document,\n formData: options.formData,\n onFormSubmit: options.onFormSubmit,\n onFormChange: options.onFormChange\n });\n const annotations = options.annotations ?? EMPTY_ANNOTATION_ARRAY;\n const annotationsByPage = usePdfAnnotationsByPage(annotations);\n const highlightEnabled = options.highlightEnabled ?? false;\n const enableDownload = options.enableDownload ?? false;\n const enableFormSave = options.onFormSubmit != null && hasFormFields;\n const {\n onAnnotationClick,\n outlineIcons\n } = options;\n return useMemo(() => ({\n ...viewer,\n highlightEnabled,\n highlightModeActive,\n toggleHighlightMode,\n hasFormFields,\n submitFormData,\n annotations,\n annotationsByPage,\n onAnnotationClick,\n enableDownload,\n enableFormSave,\n outlineIcons\n }), [viewer, highlightEnabled, highlightModeActive, toggleHighlightMode, hasFormFields, submitFormData, annotations, annotationsByPage, onAnnotationClick, enableDownload, enableFormSave, outlineIcons]);\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// PdfViewer\nexport { BasePdfViewer } from \"../../pdf-viewer/PdfViewer.js\";\n// PdfViewer building blocks\nexport { PdfViewerAnnotationLayer } from \"../../pdf-viewer/components/PdfViewerAnnotationLayer.js\";\nexport { PdfViewerContent } from \"../../pdf-viewer/components/PdfViewerContent.js\";\nexport { PdfViewerOutlineSidebar } from \"../../pdf-viewer/components/PdfViewerOutlineSidebar.js\";\nexport { PdfViewerSearchBar } from \"../../pdf-viewer/components/PdfViewerSearchBar.js\";\nexport { PdfViewerSidebar } from \"../../pdf-viewer/components/PdfViewerSidebar.js\";\nexport { PdfViewerToolbar } from \"../../pdf-viewer/components/PdfViewerToolbar.js\";\n\n// PdfViewer hooks — primitive\nexport { usePdfAnnotationPortals } from \"../../pdf-viewer/hooks/usePdfAnnotationPortals.js\";\nexport { usePdfAnnotationsByPage } from \"../../pdf-viewer/hooks/usePdfAnnotationsByPage.js\";\nexport { usePdfDocument } from \"../../pdf-viewer/hooks/usePdfDocument.js\";\nexport { usePdfFormFields } from \"../../pdf-viewer/hooks/usePdfFormFields.js\";\nexport { usePdfHighlightMode } from \"../../pdf-viewer/hooks/usePdfHighlightMode.js\";\nexport { usePdfOutline } from \"../../pdf-viewer/hooks/usePdfOutline.js\";\nexport { usePdfViewer } from \"../../pdf-viewer/hooks/usePdfViewer.js\";\nexport { usePdfViewerSearch } from \"../../pdf-viewer/hooks/usePdfViewerSearch.js\";\nexport { usePdfViewerSync } from \"../../pdf-viewer/hooks/usePdfViewerSync.js\";\n// PdfViewer context\nexport { PdfViewerProvider, usePdfViewerContext, usePdfViewerInstance } from \"../../pdf-viewer/PdfViewerContext.js\";\n// PdfViewer hooks — composition\nexport { usePdfViewerCore } from \"../../pdf-viewer/hooks/usePdfViewerCore.js\";\nexport { usePdfViewerState } from \"../../pdf-viewer/hooks/usePdfViewerState.js\";\n\n// PdfViewer (Media wrapper)\nimport { PdfViewer as _PdfViewer } from \"../../pdf-viewer/PdfRenderer.js\";\nimport { withOsdkMetrics } from \"../../util/withOsdkMetrics.js\";\nexport const PdfViewer = withOsdkMetrics(_PdfViewer, \"PdfViewer\");"]}
@@ -6,7 +6,7 @@ var chunkE5OKIBYJ_cjs = require('./chunk-E5OKIBYJ.cjs');
6
6
  var chunkNE7GRF7G_cjs = require('./chunk-NE7GRF7G.cjs');
7
7
  var chunk7LXS66DW_cjs = require('./chunk-7LXS66DW.cjs');
8
8
  var chunkUCTQICPR_cjs = require('./chunk-UCTQICPR.cjs');
9
- var chunkKJS4QZ6O_cjs = require('./chunk-KJS4QZ6O.cjs');
9
+ var chunkZIYQXEEB_cjs = require('./chunk-ZIYQXEEB.cjs');
10
10
  var button = require('@base-ui/react/button');
11
11
  var classnames3 = require('classnames');
12
12
  var React13 = require('react');
@@ -5331,7 +5331,7 @@ function summarizeFilterValue(definition, state) {
5331
5331
  }
5332
5332
 
5333
5333
  // src/public/experimental/filter-list.ts
5334
- var FilterList2 = chunkKJS4QZ6O_cjs.withOsdkMetrics(FilterList, "FilterList");
5334
+ var FilterList2 = chunkZIYQXEEB_cjs.withOsdkMetrics(FilterList, "FilterList");
5335
5335
 
5336
5336
  exports.BaseFilterList = BaseFilterList;
5337
5337
  exports.FilterInput = FilterInput;
@@ -5345,5 +5345,5 @@ exports.narrowObjectSet = narrowObjectSet;
5345
5345
  exports.serializeFilterStates = serializeFilterStates;
5346
5346
  exports.summarizeFilterValue = summarizeFilterValue;
5347
5347
  exports.useFilterListState = useFilterListState;
5348
- //# sourceMappingURL=chunk-QXV7I44P.cjs.map
5349
- //# sourceMappingURL=chunk-QXV7I44P.cjs.map
5348
+ //# sourceMappingURL=chunk-Z6F6MHWG.cjs.map
5349
+ //# sourceMappingURL=chunk-Z6F6MHWG.cjs.map