@osdk/react-components 0.4.0 → 0.4.1-main-6b2c638658dbe4aad3cb1b827607371baec6fb32

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 (62) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/README.md +26 -0
  3. package/build/browser/public/experimental/action-form.js +3 -1
  4. package/build/browser/public/experimental/action-form.js.map +1 -1
  5. package/build/browser/public/experimental/filter-list.js +3 -1
  6. package/build/browser/public/experimental/filter-list.js.map +1 -1
  7. package/build/browser/public/experimental/object-table.js +3 -1
  8. package/build/browser/public/experimental/object-table.js.map +1 -1
  9. package/build/browser/public/experimental/pdf-viewer.js +3 -1
  10. package/build/browser/public/experimental/pdf-viewer.js.map +1 -1
  11. package/build/browser/util/UserAgent.js +21 -0
  12. package/build/browser/util/UserAgent.js.map +1 -0
  13. package/build/browser/util/withOsdkMetrics.js +33 -0
  14. package/build/browser/util/withOsdkMetrics.js.map +1 -0
  15. package/build/cjs/{chunk-2424DUP3.cjs → chunk-3CYEDIJI.cjs} +7 -3
  16. package/build/cjs/chunk-3CYEDIJI.cjs.map +1 -0
  17. package/build/cjs/chunk-3P65RY77.cjs +30 -0
  18. package/build/cjs/chunk-3P65RY77.cjs.map +1 -0
  19. package/build/cjs/{chunk-PT2EA5C2.cjs → chunk-FMM7IDUP.cjs} +7 -3
  20. package/build/cjs/chunk-FMM7IDUP.cjs.map +1 -0
  21. package/build/cjs/{chunk-32FWTU7M.cjs → chunk-SKOWDKUB.cjs} +7 -3
  22. package/build/cjs/chunk-SKOWDKUB.cjs.map +1 -0
  23. package/build/cjs/{chunk-ZZ5C3F3C.cjs → chunk-SVK2ZU4Q.cjs} +7 -3
  24. package/build/cjs/chunk-SVK2ZU4Q.cjs.map +1 -0
  25. package/build/cjs/public/experimental/action-form.cjs +4 -3
  26. package/build/cjs/public/experimental/action-form.d.cts +3 -1
  27. package/build/cjs/public/experimental/filter-list.cjs +6 -5
  28. package/build/cjs/public/experimental/filter-list.d.cts +3 -1
  29. package/build/cjs/public/experimental/object-table.cjs +6 -5
  30. package/build/cjs/public/experimental/object-table.d.cts +3 -1
  31. package/build/cjs/public/experimental/pdf-viewer.cjs +24 -23
  32. package/build/cjs/public/experimental/pdf-viewer.d.cts +3 -1
  33. package/build/cjs/public/experimental.cjs +37 -36
  34. package/build/esm/public/experimental/action-form.js +3 -1
  35. package/build/esm/public/experimental/action-form.js.map +1 -1
  36. package/build/esm/public/experimental/filter-list.js +3 -1
  37. package/build/esm/public/experimental/filter-list.js.map +1 -1
  38. package/build/esm/public/experimental/object-table.js +3 -1
  39. package/build/esm/public/experimental/object-table.js.map +1 -1
  40. package/build/esm/public/experimental/pdf-viewer.js +3 -1
  41. package/build/esm/public/experimental/pdf-viewer.js.map +1 -1
  42. package/build/esm/util/UserAgent.js +21 -0
  43. package/build/esm/util/UserAgent.js.map +1 -0
  44. package/build/esm/util/withOsdkMetrics.js +33 -0
  45. package/build/esm/util/withOsdkMetrics.js.map +1 -0
  46. package/build/types/public/experimental/action-form.d.ts +2 -1
  47. package/build/types/public/experimental/action-form.d.ts.map +1 -1
  48. package/build/types/public/experimental/filter-list.d.ts +2 -1
  49. package/build/types/public/experimental/filter-list.d.ts.map +1 -1
  50. package/build/types/public/experimental/object-table.d.ts +2 -1
  51. package/build/types/public/experimental/object-table.d.ts.map +1 -1
  52. package/build/types/public/experimental/pdf-viewer.d.ts +3 -1
  53. package/build/types/public/experimental/pdf-viewer.d.ts.map +1 -1
  54. package/build/types/util/UserAgent.d.ts +1 -0
  55. package/build/types/util/UserAgent.d.ts.map +1 -0
  56. package/build/types/util/withOsdkMetrics.d.ts +2 -0
  57. package/build/types/util/withOsdkMetrics.d.ts.map +1 -0
  58. package/package.json +8 -8
  59. package/build/cjs/chunk-2424DUP3.cjs.map +0 -1
  60. package/build/cjs/chunk-32FWTU7M.cjs.map +0 -1
  61. package/build/cjs/chunk-PT2EA5C2.cjs.map +0 -1
  62. package/build/cjs/chunk-ZZ5C3F3C.cjs.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # @osdk/react-components
2
2
 
3
+ ## 0.4.1-main-6b2c638658dbe4aad3cb1b827607371baec6fb32
4
+
5
+ ### Patch Changes
6
+
7
+ - e456da5: Add Fetch-User-Agent tracing headers for React layer network calls
8
+ - Updated dependencies [58248f8]
9
+ - Updated dependencies [e456da5]
10
+ - @osdk/react@0.12.1-main-6b2c638658dbe4aad3cb1b827607371baec6fb32
11
+ - @osdk/client@2.10.1-main-6b2c638658dbe4aad3cb1b827607371baec6fb32
12
+ - @osdk/api@2.10.1-main-6b2c638658dbe4aad3cb1b827607371baec6fb32
13
+
3
14
  ## 0.4.0
4
15
 
5
16
  ### Minor Changes
package/README.md CHANGED
@@ -177,6 +177,7 @@ When building new components:
177
177
  3. Keep the Base component API simple using primitive types
178
178
  4. For complex components, consider a building blocks tier with sub-components and hooks
179
179
  5. Document all layers for users who want to customize
180
+ 6. **Register a user agent for metrics** — wrap every OSDK component with `withOsdkMetrics` at the export barrel (see [Metrics](#metrics) below)
180
181
 
181
182
  ## Folder Structure
182
183
 
@@ -214,6 +215,31 @@ This package focuses on complex, Ontology-aware components with built-in data fe
214
215
  - Reduces maintenance burden
215
216
  - Encourages consistent use of existing design systems
216
217
 
218
+ ## Metrics
219
+
220
+ Every OSDK component (the outermost data-fetching layer, **not** the Base component) must register a user agent string so that network requests include a `Fetch-User-Agent` header identifying which component initiated them. This enables usage tracking and debugging.
221
+
222
+ This is handled automatically by the `withOsdkMetrics` HOC. Wrap your component at the **export barrel** (`public/experimental/*.ts`), not inside the component body:
223
+
224
+ ```ts
225
+ // public/experimental/my-component.ts
226
+ import { MyComponent as _MyComponent } from "../../my-component/MyComponent.js";
227
+ import { withOsdkMetrics } from "../../util/withOsdkMetrics.js";
228
+ export const MyComponent: typeof _MyComponent = withOsdkMetrics(
229
+ _MyComponent,
230
+ "MyComponent",
231
+ );
232
+ ```
233
+
234
+ `withOsdkMetrics` calls `useRegisterUserAgent` internally, producing a user agent string like `osdk-react-components/<version>/MyComponent`.
235
+
236
+ **Checklist for new components:**
237
+
238
+ - [ ] Wrap the OSDK component with `withOsdkMetrics` in the export barrel
239
+ - [ ] Add `typeof _Component` annotation to satisfy `--isolatedDeclarations`
240
+ - [ ] Do **not** wrap Base components — only the OSDK wrapper needs it
241
+ - [ ] Do **not** call `useRegisterUserAgent` directly inside the component body
242
+
217
243
  ## Custom Styling
218
244
 
219
245
  See the [CSS Variables Reference](./docs/CSSVariables.md) on how to apply custom themes and styling to the components.
@@ -14,6 +14,8 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- export { ActionForm } from "../../action-form/ActionForm.js";
17
+ import { ActionForm as _ActionForm } from "../../action-form/ActionForm.js";
18
+ import { withOsdkMetrics } from "../../util/withOsdkMetrics.js";
19
+ export const ActionForm = withOsdkMetrics(_ActionForm, "ActionForm");
18
20
  export { BaseForm } from "../../action-form/BaseForm.js";
19
21
  //# sourceMappingURL=action-form.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"action-form.js","names":["ActionForm","BaseForm"],"sources":["action-form.ts"],"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\nexport { ActionForm } from \"../../action-form/ActionForm.js\";\nexport type {\n ActionFormProps,\n BaseFormProps,\n FormError,\n FormState,\n} from \"../../action-form/ActionFormApi.js\";\nexport { BaseForm } from \"../../action-form/BaseForm.js\";\nexport type {\n ActionParameters,\n BaseFormFieldProps,\n CustomFieldProps,\n DateRange,\n DateRangeInputFieldProps,\n DatetimePickerFieldProps,\n DropdownFieldProps,\n FieldComponent,\n FieldValueType,\n FilePickerProps,\n FormFieldDefinition,\n FormFieldPropsByType,\n NumberInputFieldProps,\n ObjectSetFieldProps,\n Option,\n RadioButtonsFieldProps,\n RendererFieldDefinition,\n TextAreaFieldProps,\n TextInputFieldProps,\n ValidationError,\n} from \"../../action-form/FormFieldApi.js\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,UAAU,QAAQ,iCAAiC;AAO5D,SAASC,QAAQ,QAAQ,+BAA+B","ignoreList":[]}
1
+ {"version":3,"file":"action-form.js","names":["ActionForm","_ActionForm","withOsdkMetrics","BaseForm"],"sources":["action-form.ts"],"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 { ActionForm as _ActionForm } from \"../../action-form/ActionForm.js\";\nimport { withOsdkMetrics } from \"../../util/withOsdkMetrics.js\";\nexport const ActionForm: typeof _ActionForm = withOsdkMetrics(\n _ActionForm,\n \"ActionForm\",\n);\nexport type {\n ActionFormProps,\n BaseFormProps,\n FormError,\n FormState,\n} from \"../../action-form/ActionFormApi.js\";\nexport { BaseForm } from \"../../action-form/BaseForm.js\";\nexport type {\n ActionParameters,\n BaseFormFieldProps,\n CustomFieldProps,\n DateRange,\n DateRangeInputFieldProps,\n DatetimePickerFieldProps,\n DropdownFieldProps,\n FieldComponent,\n FieldValueType,\n FilePickerProps,\n FormFieldDefinition,\n FormFieldPropsByType,\n NumberInputFieldProps,\n ObjectSetFieldProps,\n Option,\n RadioButtonsFieldProps,\n RendererFieldDefinition,\n TextAreaFieldProps,\n TextInputFieldProps,\n ValidationError,\n} from \"../../action-form/FormFieldApi.js\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,UAAU,IAAIC,WAAW,QAAQ,iCAAiC;AAC3E,SAASC,eAAe,QAAQ,+BAA+B;AAC/D,OAAO,MAAMF,UAA8B,GAAGE,eAAe,CAC3DD,WAAW,EACX,YACF,CAAC;AAOD,SAASE,QAAQ,QAAQ,+BAA+B","ignoreList":[]}
@@ -15,6 +15,8 @@
15
15
  */
16
16
 
17
17
  export { BaseFilterList } from "../../filter-list/base/BaseFilterList.js";
18
- export { FilterList } from "../../filter-list/FilterList.js";
18
+ import { FilterList as _FilterList } from "../../filter-list/FilterList.js";
19
+ import { withOsdkMetrics } from "../../util/withOsdkMetrics.js";
20
+ export const FilterList = withOsdkMetrics(_FilterList, "FilterList");
19
21
  export { deserializeFilterStates, serializeFilterStates } from "../../filter-list/utils/filterStateSerialization.js";
20
22
  //# sourceMappingURL=filter-list.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"filter-list.js","names":["BaseFilterList","FilterList","deserializeFilterStates","serializeFilterStates"],"sources":["filter-list.ts"],"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\nexport { BaseFilterList } from \"../../filter-list/base/BaseFilterList.js\";\nexport type {\n BaseFilterListProps,\n RenderFilterInput,\n} from \"../../filter-list/base/BaseFilterListApi.js\";\nexport { FilterList } from \"../../filter-list/FilterList.js\";\n\nexport type {\n FilterDefinitionUnion,\n FilterListProps,\n} from \"../../filter-list/FilterListApi.js\";\nexport type {\n FilterComponentType,\n FilterListItemProps,\n FilterState,\n PropertyFilterDefinition,\n} from \"../../filter-list/FilterListItemApi.js\";\nexport {\n deserializeFilterStates,\n serializeFilterStates,\n} from \"../../filter-list/utils/filterStateSerialization.js\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,cAAc,QAAQ,0CAA0C;AAKzE,SAASC,UAAU,QAAQ,iCAAiC;AAY5D,SACEC,uBAAuB,EACvBC,qBAAqB,QAChB,qDAAqD","ignoreList":[]}
1
+ {"version":3,"file":"filter-list.js","names":["BaseFilterList","FilterList","_FilterList","withOsdkMetrics","deserializeFilterStates","serializeFilterStates"],"sources":["filter-list.ts"],"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\nexport { BaseFilterList } from \"../../filter-list/base/BaseFilterList.js\";\nexport type {\n BaseFilterListProps,\n RenderFilterInput,\n} from \"../../filter-list/base/BaseFilterListApi.js\";\nimport { FilterList as _FilterList } from \"../../filter-list/FilterList.js\";\nimport { withOsdkMetrics } from \"../../util/withOsdkMetrics.js\";\nexport const FilterList: typeof _FilterList = withOsdkMetrics(\n _FilterList,\n \"FilterList\",\n);\n\nexport type {\n FilterDefinitionUnion,\n FilterListProps,\n} from \"../../filter-list/FilterListApi.js\";\nexport type {\n FilterComponentType,\n FilterListItemProps,\n FilterState,\n PropertyFilterDefinition,\n} from \"../../filter-list/FilterListItemApi.js\";\nexport {\n deserializeFilterStates,\n serializeFilterStates,\n} from \"../../filter-list/utils/filterStateSerialization.js\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,cAAc,QAAQ,0CAA0C;AAKzE,SAASC,UAAU,IAAIC,WAAW,QAAQ,iCAAiC;AAC3E,SAASC,eAAe,QAAQ,+BAA+B;AAC/D,OAAO,MAAMF,UAA8B,GAAGE,eAAe,CAC3DD,WAAW,EACX,YACF,CAAC;AAYD,SACEE,uBAAuB,EACvBC,qBAAqB,QAChB,qDAAqD","ignoreList":[]}
@@ -15,7 +15,9 @@
15
15
  */
16
16
 
17
17
  // ObjectTable that loads and displays data for a given objectSet
18
- export { ObjectTable } from "../../object-table/ObjectTable.js";
18
+ import { ObjectTable as _ObjectTable } from "../../object-table/ObjectTable.js";
19
+ import { withOsdkMetrics } from "../../util/withOsdkMetrics.js";
20
+ export const ObjectTable = withOsdkMetrics(_ObjectTable, "ObjectTable");
19
21
 
20
22
  // BaseTable that does not handle data fetching
21
23
 
@@ -1 +1 @@
1
- {"version":3,"file":"object-table.js","names":["ObjectTable","BaseTable","ColumnConfigDialog","MultiColumnSortDialog"],"sources":["object-table.ts"],"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// ObjectTable that loads and displays data for a given objectSet\nexport { ObjectTable } from \"../../object-table/ObjectTable.js\";\nexport type {\n ColumnDefinition,\n ColumnDefinitionLocator,\n CustomColumnLocator,\n DatePickerEditConfig,\n DropdownEditConfig,\n EditFieldConfig,\n FunctionColumnLocator,\n ObjectTableProps,\n PropertyColumnLocator,\n RdpColumnLocator,\n} from \"../../object-table/ObjectTableApi.js\";\nexport type { CellEditInfo } from \"../../object-table/utils/types.js\";\n\n// BaseTable that does not handle data fetching\nexport type { BaseTableProps } from \"../../object-table/Table.js\";\nexport { BaseTable } from \"../../object-table/Table.js\";\n\nexport { ColumnConfigDialog } from \"../../object-table/ColumnConfigDialog.js\";\nexport type {\n ColumnConfigDialogProps,\n ColumnConfigOptions,\n} from \"../../object-table/ColumnConfigDialog.js\";\n\nexport { MultiColumnSortDialog } from \"../../object-table/MultiColumnSortDialog.js\";\nexport type {\n MultiColumnSortDialogProps,\n SortColumnItem,\n} from \"../../object-table/MultiColumnSortDialog.js\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,SAASA,WAAW,QAAQ,mCAAmC;;AAe/D;;AAEA,SAASC,SAAS,QAAQ,6BAA6B;AAEvD,SAASC,kBAAkB,QAAQ,0CAA0C;AAM7E,SAASC,qBAAqB,QAAQ,6CAA6C","ignoreList":[]}
1
+ {"version":3,"file":"object-table.js","names":["ObjectTable","_ObjectTable","withOsdkMetrics","BaseTable","ColumnConfigDialog","MultiColumnSortDialog"],"sources":["object-table.ts"],"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// ObjectTable that loads and displays data for a given objectSet\nimport { ObjectTable as _ObjectTable } from \"../../object-table/ObjectTable.js\";\nimport { withOsdkMetrics } from \"../../util/withOsdkMetrics.js\";\nexport const ObjectTable: typeof _ObjectTable = withOsdkMetrics(\n _ObjectTable,\n \"ObjectTable\",\n);\nexport type {\n ColumnDefinition,\n ColumnDefinitionLocator,\n CustomColumnLocator,\n DatePickerEditConfig,\n DropdownEditConfig,\n EditFieldConfig,\n FunctionColumnLocator,\n ObjectTableProps,\n PropertyColumnLocator,\n RdpColumnLocator,\n} from \"../../object-table/ObjectTableApi.js\";\nexport type { CellEditInfo } from \"../../object-table/utils/types.js\";\n\n// BaseTable that does not handle data fetching\nexport type { BaseTableProps } from \"../../object-table/Table.js\";\nexport { BaseTable } from \"../../object-table/Table.js\";\n\nexport { ColumnConfigDialog } from \"../../object-table/ColumnConfigDialog.js\";\nexport type {\n ColumnConfigDialogProps,\n ColumnConfigOptions,\n} from \"../../object-table/ColumnConfigDialog.js\";\n\nexport { MultiColumnSortDialog } from \"../../object-table/MultiColumnSortDialog.js\";\nexport type {\n MultiColumnSortDialogProps,\n SortColumnItem,\n} from \"../../object-table/MultiColumnSortDialog.js\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,SAASA,WAAW,IAAIC,YAAY,QAAQ,mCAAmC;AAC/E,SAASC,eAAe,QAAQ,+BAA+B;AAC/D,OAAO,MAAMF,WAAgC,GAAGE,eAAe,CAC7DD,YAAY,EACZ,aACF,CAAC;;AAeD;;AAEA,SAASE,SAAS,QAAQ,6BAA6B;AAEvD,SAASC,kBAAkB,QAAQ,0CAA0C;AAM7E,SAASC,qBAAqB,QAAQ,6CAA6C","ignoreList":[]}
@@ -41,5 +41,7 @@ export { usePdfViewerCore } from "../../pdf-viewer/hooks/usePdfViewerCore.js";
41
41
  export { usePdfViewerState } from "../../pdf-viewer/hooks/usePdfViewerState.js";
42
42
 
43
43
  // PdfViewer (Media wrapper)
44
- export { PdfViewer } from "../../pdf-viewer/PdfRenderer.js";
44
+ import { PdfViewer as _PdfViewer } from "../../pdf-viewer/PdfRenderer.js";
45
+ import { withOsdkMetrics } from "../../util/withOsdkMetrics.js";
46
+ export const PdfViewer = withOsdkMetrics(_PdfViewer, "PdfViewer");
45
47
  //# sourceMappingURL=pdf-viewer.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"pdf-viewer.js","names":["BasePdfViewer","PdfViewerAnnotationLayer","PdfViewerContent","PdfViewerOutlineSidebar","PdfViewerSearchBar","PdfViewerSidebar","PdfViewerToolbar","usePdfAnnotationPortals","usePdfAnnotationsByPage","usePdfDocument","usePdfFormFields","usePdfHighlightMode","usePdfOutline","usePdfViewer","usePdfViewerSearch","usePdfViewerSync","PdfViewerProvider","usePdfViewerContext","usePdfViewerInstance","usePdfViewerCore","usePdfViewerState","PdfViewer"],"sources":["pdf-viewer.ts"],"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// PdfViewer\nexport { BasePdfViewer } from \"../../pdf-viewer/PdfViewer.js\";\nexport type {\n AnnotationType,\n PdfAnnotation,\n PdfAnnotationRenderProps,\n PdfCustomAnnotation,\n PdfDownloadResult,\n PdfFormFieldValue,\n PdfRect,\n PdfTextHighlightEvent,\n PdfViewerProps,\n SidebarMode,\n} from \"../../pdf-viewer/types.js\";\n\n// PdfViewer building blocks\nexport {\n PdfViewerAnnotationLayer,\n type PdfViewerAnnotationLayerProps,\n} from \"../../pdf-viewer/components/PdfViewerAnnotationLayer.js\";\nexport {\n PdfViewerContent,\n type PdfViewerContentProps,\n} from \"../../pdf-viewer/components/PdfViewerContent.js\";\nexport {\n PdfViewerOutlineSidebar,\n type PdfViewerOutlineSidebarProps,\n} from \"../../pdf-viewer/components/PdfViewerOutlineSidebar.js\";\nexport {\n PdfViewerSearchBar,\n type PdfViewerSearchBarProps,\n} from \"../../pdf-viewer/components/PdfViewerSearchBar.js\";\nexport {\n PdfViewerSidebar,\n type PdfViewerSidebarProps,\n} from \"../../pdf-viewer/components/PdfViewerSidebar.js\";\nexport {\n PdfViewerToolbar,\n type PdfViewerToolbarProps,\n} from \"../../pdf-viewer/components/PdfViewerToolbar.js\";\n\n// PdfViewer hooks — primitive\nexport {\n type AnnotationPortalTarget,\n usePdfAnnotationPortals,\n} from \"../../pdf-viewer/hooks/usePdfAnnotationPortals.js\";\nexport { usePdfAnnotationsByPage } from \"../../pdf-viewer/hooks/usePdfAnnotationsByPage.js\";\nexport { usePdfDocument } from \"../../pdf-viewer/hooks/usePdfDocument.js\";\nexport {\n usePdfFormFields,\n type UsePdfFormFieldsOptions,\n type UsePdfFormFieldsResult,\n} from \"../../pdf-viewer/hooks/usePdfFormFields.js\";\nexport {\n usePdfHighlightMode,\n type UsePdfHighlightModeOptions,\n type UsePdfHighlightModeResult,\n} from \"../../pdf-viewer/hooks/usePdfHighlightMode.js\";\nexport { usePdfOutline } from \"../../pdf-viewer/hooks/usePdfOutline.js\";\nexport {\n usePdfViewer,\n type UsePdfViewerResult,\n} from \"../../pdf-viewer/hooks/usePdfViewer.js\";\nexport {\n usePdfViewerSearch,\n type UsePdfViewerSearchResult,\n} from \"../../pdf-viewer/hooks/usePdfViewerSearch.js\";\nexport { usePdfViewerSync } from \"../../pdf-viewer/hooks/usePdfViewerSync.js\";\nexport { type OutlineItem } from \"../../pdf-viewer/types.js\";\n\n// PdfViewer context\nexport {\n type PdfViewerContextValue,\n PdfViewerProvider,\n usePdfViewerContext,\n usePdfViewerInstance,\n} from \"../../pdf-viewer/PdfViewerContext.js\";\nexport type {\n PdfViewerHandle,\n PdfViewerInstanceOptions,\n} from \"../../pdf-viewer/types.js\";\n\n// PdfViewer hooks — composition\nexport {\n usePdfViewerCore,\n type UsePdfViewerCoreOptions,\n type UsePdfViewerCoreResult,\n} from \"../../pdf-viewer/hooks/usePdfViewerCore.js\";\nexport {\n usePdfViewerState,\n type UsePdfViewerStateOptions,\n type UsePdfViewerStateResult,\n} from \"../../pdf-viewer/hooks/usePdfViewerState.js\";\n\n// PdfViewer (Media wrapper)\nexport {\n PdfViewer,\n type PdfViewerMediaProps,\n} from \"../../pdf-viewer/PdfRenderer.js\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,SAASA,aAAa,QAAQ,+BAA+B;AAc7D;AACA,SACEC,wBAAwB,QAEnB,yDAAyD;AAChE,SACEC,gBAAgB,QAEX,iDAAiD;AACxD,SACEC,uBAAuB,QAElB,wDAAwD;AAC/D,SACEC,kBAAkB,QAEb,mDAAmD;AAC1D,SACEC,gBAAgB,QAEX,iDAAiD;AACxD,SACEC,gBAAgB,QAEX,iDAAiD;;AAExD;AACA,SAEEC,uBAAuB,QAClB,mDAAmD;AAC1D,SAASC,uBAAuB,QAAQ,mDAAmD;AAC3F,SAASC,cAAc,QAAQ,0CAA0C;AACzE,SACEC,gBAAgB,QAGX,4CAA4C;AACnD,SACEC,mBAAmB,QAGd,+CAA+C;AACtD,SAASC,aAAa,QAAQ,yCAAyC;AACvE,SACEC,YAAY,QAEP,wCAAwC;AAC/C,SACEC,kBAAkB,QAEb,8CAA8C;AACrD,SAASC,gBAAgB,QAAQ,4CAA4C;AAG7E;AACA,SAEEC,iBAAiB,EACjBC,mBAAmB,EACnBC,oBAAoB,QACf,sCAAsC;AAM7C;AACA,SACEC,gBAAgB,QAGX,4CAA4C;AACnD,SACEC,iBAAiB,QAGZ,6CAA6C;;AAEpD;AACA,SACEC,SAAS,QAEJ,iCAAiC","ignoreList":[]}
1
+ {"version":3,"file":"pdf-viewer.js","names":["BasePdfViewer","PdfViewerAnnotationLayer","PdfViewerContent","PdfViewerOutlineSidebar","PdfViewerSearchBar","PdfViewerSidebar","PdfViewerToolbar","usePdfAnnotationPortals","usePdfAnnotationsByPage","usePdfDocument","usePdfFormFields","usePdfHighlightMode","usePdfOutline","usePdfViewer","usePdfViewerSearch","usePdfViewerSync","PdfViewerProvider","usePdfViewerContext","usePdfViewerInstance","usePdfViewerCore","usePdfViewerState","PdfViewer","_PdfViewer","withOsdkMetrics"],"sources":["pdf-viewer.ts"],"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// PdfViewer\nexport { BasePdfViewer } from \"../../pdf-viewer/PdfViewer.js\";\nexport type {\n AnnotationType,\n PdfAnnotation,\n PdfAnnotationRenderProps,\n PdfCustomAnnotation,\n PdfDownloadResult,\n PdfFormFieldValue,\n PdfRect,\n PdfTextHighlightEvent,\n PdfViewerProps,\n SidebarMode,\n} from \"../../pdf-viewer/types.js\";\n\n// PdfViewer building blocks\nexport {\n PdfViewerAnnotationLayer,\n type PdfViewerAnnotationLayerProps,\n} from \"../../pdf-viewer/components/PdfViewerAnnotationLayer.js\";\nexport {\n PdfViewerContent,\n type PdfViewerContentProps,\n} from \"../../pdf-viewer/components/PdfViewerContent.js\";\nexport {\n PdfViewerOutlineSidebar,\n type PdfViewerOutlineSidebarProps,\n} from \"../../pdf-viewer/components/PdfViewerOutlineSidebar.js\";\nexport {\n PdfViewerSearchBar,\n type PdfViewerSearchBarProps,\n} from \"../../pdf-viewer/components/PdfViewerSearchBar.js\";\nexport {\n PdfViewerSidebar,\n type PdfViewerSidebarProps,\n} from \"../../pdf-viewer/components/PdfViewerSidebar.js\";\nexport {\n PdfViewerToolbar,\n type PdfViewerToolbarProps,\n} from \"../../pdf-viewer/components/PdfViewerToolbar.js\";\n\n// PdfViewer hooks — primitive\nexport {\n type AnnotationPortalTarget,\n usePdfAnnotationPortals,\n} from \"../../pdf-viewer/hooks/usePdfAnnotationPortals.js\";\nexport { usePdfAnnotationsByPage } from \"../../pdf-viewer/hooks/usePdfAnnotationsByPage.js\";\nexport { usePdfDocument } from \"../../pdf-viewer/hooks/usePdfDocument.js\";\nexport {\n usePdfFormFields,\n type UsePdfFormFieldsOptions,\n type UsePdfFormFieldsResult,\n} from \"../../pdf-viewer/hooks/usePdfFormFields.js\";\nexport {\n usePdfHighlightMode,\n type UsePdfHighlightModeOptions,\n type UsePdfHighlightModeResult,\n} from \"../../pdf-viewer/hooks/usePdfHighlightMode.js\";\nexport { usePdfOutline } from \"../../pdf-viewer/hooks/usePdfOutline.js\";\nexport {\n usePdfViewer,\n type UsePdfViewerResult,\n} from \"../../pdf-viewer/hooks/usePdfViewer.js\";\nexport {\n usePdfViewerSearch,\n type UsePdfViewerSearchResult,\n} from \"../../pdf-viewer/hooks/usePdfViewerSearch.js\";\nexport { usePdfViewerSync } from \"../../pdf-viewer/hooks/usePdfViewerSync.js\";\nexport { type OutlineItem } from \"../../pdf-viewer/types.js\";\n\n// PdfViewer context\nexport {\n type PdfViewerContextValue,\n PdfViewerProvider,\n usePdfViewerContext,\n usePdfViewerInstance,\n} from \"../../pdf-viewer/PdfViewerContext.js\";\nexport type {\n PdfViewerHandle,\n PdfViewerInstanceOptions,\n} from \"../../pdf-viewer/types.js\";\n\n// PdfViewer hooks — composition\nexport {\n usePdfViewerCore,\n type UsePdfViewerCoreOptions,\n type UsePdfViewerCoreResult,\n} from \"../../pdf-viewer/hooks/usePdfViewerCore.js\";\nexport {\n usePdfViewerState,\n type UsePdfViewerStateOptions,\n type UsePdfViewerStateResult,\n} 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: typeof _PdfViewer = withOsdkMetrics(\n _PdfViewer,\n \"PdfViewer\",\n);\nexport type { PdfViewerMediaProps } from \"../../pdf-viewer/PdfRenderer.js\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,SAASA,aAAa,QAAQ,+BAA+B;AAc7D;AACA,SACEC,wBAAwB,QAEnB,yDAAyD;AAChE,SACEC,gBAAgB,QAEX,iDAAiD;AACxD,SACEC,uBAAuB,QAElB,wDAAwD;AAC/D,SACEC,kBAAkB,QAEb,mDAAmD;AAC1D,SACEC,gBAAgB,QAEX,iDAAiD;AACxD,SACEC,gBAAgB,QAEX,iDAAiD;;AAExD;AACA,SAEEC,uBAAuB,QAClB,mDAAmD;AAC1D,SAASC,uBAAuB,QAAQ,mDAAmD;AAC3F,SAASC,cAAc,QAAQ,0CAA0C;AACzE,SACEC,gBAAgB,QAGX,4CAA4C;AACnD,SACEC,mBAAmB,QAGd,+CAA+C;AACtD,SAASC,aAAa,QAAQ,yCAAyC;AACvE,SACEC,YAAY,QAEP,wCAAwC;AAC/C,SACEC,kBAAkB,QAEb,8CAA8C;AACrD,SAASC,gBAAgB,QAAQ,4CAA4C;AAG7E;AACA,SAEEC,iBAAiB,EACjBC,mBAAmB,EACnBC,oBAAoB,QACf,sCAAsC;AAM7C;AACA,SACEC,gBAAgB,QAGX,4CAA4C;AACnD,SACEC,iBAAiB,QAGZ,6CAA6C;;AAEpD;AACA,SAASC,SAAS,IAAIC,UAAU,QAAQ,iCAAiC;AACzE,SAASC,eAAe,QAAQ,+BAA+B;AAC/D,OAAO,MAAMF,SAA4B,GAAGE,eAAe,CACzDD,UAAU,EACV,WACF,CAAC","ignoreList":[]}
@@ -0,0 +1,21 @@
1
+ /*
2
+ * Copyright 2025 Palantir Technologies, Inc. All rights reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ const PACKAGE_USER_AGENT = `osdk-react-components/${"0.4.1-main-6b2c638658dbe4aad3cb1b827607371baec6fb32"}`;
18
+ export function componentUserAgent(componentName) {
19
+ return `${PACKAGE_USER_AGENT}/${componentName}`;
20
+ }
21
+ //# sourceMappingURL=UserAgent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UserAgent.js","names":["PACKAGE_USER_AGENT","componentUserAgent","componentName"],"sources":["UserAgent.ts"],"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\nconst PACKAGE_USER_AGENT =\n `osdk-react-components/${process.env.PACKAGE_VERSION}`;\n\nexport function componentUserAgent(componentName: string): string {\n return `${PACKAGE_USER_AGENT}/${componentName}`;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAMA,kBAAkB,GACtB,gFAAsD;AAExD,OAAO,SAASC,kBAAkBA,CAACC,aAAqB,EAAU;EAChE,OAAO,GAAGF,kBAAkB,IAAIE,aAAa,EAAE;AACjD","ignoreList":[]}
@@ -0,0 +1,33 @@
1
+ /*
2
+ * Copyright 2026 Palantir Technologies, Inc. All rights reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ import { useRegisterUserAgent } from "@osdk/react/experimental";
18
+ import React from "react";
19
+ import { componentUserAgent } from "./UserAgent.js";
20
+
21
+ // `any` is required: FunctionComponent defaults to FunctionComponent<{}> which
22
+ // rejects components with required props. A generic P parameter doesn't help
23
+ // because TS can't infer both P and C simultaneously from a single argument.
24
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
25
+ export function withOsdkMetrics(Component, name) {
26
+ const Wrapped = props => {
27
+ useRegisterUserAgent(componentUserAgent(name));
28
+ return /*#__PURE__*/React.createElement(Component, props);
29
+ };
30
+ Wrapped.displayName = `withOsdkMetrics(${name})`;
31
+ return Wrapped;
32
+ }
33
+ //# sourceMappingURL=withOsdkMetrics.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"withOsdkMetrics.js","names":["useRegisterUserAgent","React","componentUserAgent","withOsdkMetrics","Component","name","Wrapped","props","createElement","displayName"],"sources":["withOsdkMetrics.ts"],"sourcesContent":["/*\n * Copyright 2026 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 { useRegisterUserAgent } from \"@osdk/react/experimental\";\nimport type { FunctionComponent } from \"react\";\nimport React from \"react\";\nimport { componentUserAgent } from \"./UserAgent.js\";\n\n// `any` is required: FunctionComponent defaults to FunctionComponent<{}> which\n// rejects components with required props. A generic P parameter doesn't help\n// because TS can't infer both P and C simultaneously from a single argument.\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function withOsdkMetrics<C extends FunctionComponent<any>>(\n Component: C,\n name: string,\n): C {\n const Wrapped = (props: React.ComponentProps<C>) => {\n useRegisterUserAgent(componentUserAgent(name));\n return React.createElement(Component, props);\n };\n Wrapped.displayName = `withOsdkMetrics(${name})`;\n return Wrapped as unknown as C;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,oBAAoB,QAAQ,0BAA0B;AAE/D,OAAOC,KAAK,MAAM,OAAO;AACzB,SAASC,kBAAkB,QAAQ,gBAAgB;;AAEnD;AACA;AACA;AACA;AACA,OAAO,SAASC,eAAeA,CAC7BC,SAAY,EACZC,IAAY,EACT;EACH,MAAMC,OAAO,GAAIC,KAA8B,IAAK;IAClDP,oBAAoB,CAACE,kBAAkB,CAACG,IAAI,CAAC,CAAC;IAC9C,oBAAOJ,KAAK,CAACO,aAAa,CAACJ,SAAS,EAAEG,KAAK,CAAC;EAC9C,CAAC;EACDD,OAAO,CAACG,WAAW,GAAG,mBAAmBJ,IAAI,GAAG;EAChD,OAAOC,OAAO;AAChB","ignoreList":[]}
@@ -1,5 +1,6 @@
1
1
  'use strict';
2
2
 
3
+ var chunk3P65RY77_cjs = require('./chunk-3P65RY77.cjs');
3
4
  var chunkQ2W6GYRK_cjs = require('./chunk-Q2W6GYRK.cjs');
4
5
  var icons = require('@blueprintjs/icons');
5
6
  var classnames = require('classnames');
@@ -2157,8 +2158,11 @@ function PdfViewer({
2157
2158
  }, pdfViewerProps));
2158
2159
  }
2159
2160
 
2161
+ // src/public/experimental/pdf-viewer.ts
2162
+ var PdfViewer2 = chunk3P65RY77_cjs.withOsdkMetrics(PdfViewer, "PdfViewer");
2163
+
2160
2164
  exports.BasePdfViewer = BasePdfViewer;
2161
- exports.PdfViewer = PdfViewer;
2165
+ exports.PdfViewer = PdfViewer2;
2162
2166
  exports.PdfViewerAnnotationLayer = PdfViewerAnnotationLayer;
2163
2167
  exports.PdfViewerContent = PdfViewerContent;
2164
2168
  exports.PdfViewerOutlineSidebar = PdfViewerOutlineSidebar;
@@ -2179,5 +2183,5 @@ exports.usePdfViewerInstance = usePdfViewerInstance;
2179
2183
  exports.usePdfViewerSearch = usePdfViewerSearch;
2180
2184
  exports.usePdfViewerState = usePdfViewerState;
2181
2185
  exports.usePdfViewerSync = usePdfViewerSync;
2182
- //# sourceMappingURL=chunk-2424DUP3.cjs.map
2183
- //# sourceMappingURL=chunk-2424DUP3.cjs.map
2186
+ //# sourceMappingURL=chunk-3CYEDIJI.cjs.map
2187
+ //# sourceMappingURL=chunk-3CYEDIJI.cjs.map