@osdk/react-devtools 0.5.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 (443) hide show
  1. package/CHANGELOG.md +79 -0
  2. package/build/esm/DevToolsContext.js +19 -0
  3. package/build/esm/DevToolsContext.js.map +1 -0
  4. package/build/esm/components/ActionMetrics.js +89 -0
  5. package/build/esm/components/ActionMetrics.js.map +1 -0
  6. package/build/esm/components/BubbleChart.js +175 -0
  7. package/build/esm/components/BubbleChart.js.map +1 -0
  8. package/build/esm/components/BubbleChart.module.scss.js +6 -0
  9. package/build/esm/components/CacheInspectorTab.js +291 -0
  10. package/build/esm/components/CacheInspectorTab.js.map +1 -0
  11. package/build/esm/components/CacheInspectorTab.module.scss.js +39 -0
  12. package/build/esm/components/CacheMetrics.js +55 -0
  13. package/build/esm/components/CacheMetrics.js.map +1 -0
  14. package/build/esm/components/ComponentCard.js +124 -0
  15. package/build/esm/components/ComponentCard.js.map +1 -0
  16. package/build/esm/components/ComponentCard.module.scss.js +31 -0
  17. package/build/esm/components/ComputeTab.js +175 -0
  18. package/build/esm/components/ComputeTab.js.map +1 -0
  19. package/build/esm/components/CopyableCodeBlock.js +49 -0
  20. package/build/esm/components/CopyableCodeBlock.js.map +1 -0
  21. package/build/esm/components/CopyableCodeBlock.module.scss.js +10 -0
  22. package/build/esm/components/DebuggingTab.js +342 -0
  23. package/build/esm/components/DebuggingTab.js.map +1 -0
  24. package/build/esm/components/DebuggingTab.module.scss.js +18 -0
  25. package/build/esm/components/HookRow.js +180 -0
  26. package/build/esm/components/HookRow.js.map +1 -0
  27. package/build/esm/components/HookRow.module.scss.js +16 -0
  28. package/build/esm/components/ImprovementsTab.js +138 -0
  29. package/build/esm/components/ImprovementsTab.js.map +1 -0
  30. package/build/esm/components/ImprovementsTab.module.scss.js +30 -0
  31. package/build/esm/components/InspectorSelectionHeader.js +65 -0
  32. package/build/esm/components/InspectorSelectionHeader.js.map +1 -0
  33. package/build/esm/components/InterceptTab.js +862 -0
  34. package/build/esm/components/InterceptTab.js.map +1 -0
  35. package/build/esm/components/InterceptTab.module.scss.js +49 -0
  36. package/build/esm/components/IssueCard.js +115 -0
  37. package/build/esm/components/IssueCard.js.map +1 -0
  38. package/build/esm/components/IssueCard.module.scss.js +24 -0
  39. package/build/esm/components/LogEntryCard.js +94 -0
  40. package/build/esm/components/LogEntryCard.js.map +1 -0
  41. package/build/esm/components/LogEntryCard.module.scss.js +19 -0
  42. package/build/esm/components/MockEditor.js +316 -0
  43. package/build/esm/components/MockEditor.js.map +1 -0
  44. package/build/esm/components/MonitorErrorBoundary.js +64 -0
  45. package/build/esm/components/MonitorErrorBoundary.js.map +1 -0
  46. package/build/esm/components/MonitorErrorBoundary.module.scss.js +9 -0
  47. package/build/esm/components/MonitoringPanel.js +434 -0
  48. package/build/esm/components/MonitoringPanel.js.map +1 -0
  49. package/build/esm/components/MonitoringPanel.module.scss.js +81 -0
  50. package/build/esm/components/ObjectLoadingMetrics.js +60 -0
  51. package/build/esm/components/ObjectLoadingMetrics.js.map +1 -0
  52. package/build/esm/components/OsdkAppErrorBoundary.js +68 -0
  53. package/build/esm/components/OsdkAppErrorBoundary.js.map +1 -0
  54. package/build/esm/components/OsdkDevTools.js +40 -0
  55. package/build/esm/components/OsdkDevTools.js.map +1 -0
  56. package/build/esm/components/OverrideEditor.js +197 -0
  57. package/build/esm/components/OverrideEditor.js.map +1 -0
  58. package/build/esm/components/PerformanceTab.js +297 -0
  59. package/build/esm/components/PerformanceTab.js.map +1 -0
  60. package/build/esm/components/PrimitiveSelectionPanel.js +220 -0
  61. package/build/esm/components/PrimitiveSelectionPanel.js.map +1 -0
  62. package/build/esm/components/PrimitiveSelectionPanel.module.scss.js +26 -0
  63. package/build/esm/components/issueTypes.js +2 -0
  64. package/build/esm/components/issueTypes.js.map +1 -0
  65. package/build/esm/components/resolveComponentName.js +57 -0
  66. package/build/esm/components/resolveComponentName.js.map +1 -0
  67. package/build/esm/components/testHelpers.js +312 -0
  68. package/build/esm/components/testHelpers.js.map +1 -0
  69. package/build/esm/css.d.ts +20 -0
  70. package/build/esm/fiber/DegradationNotice.js +193 -0
  71. package/build/esm/fiber/DegradationNotice.js.map +1 -0
  72. package/build/esm/fiber/DevtoolsHook.js +252 -0
  73. package/build/esm/fiber/DevtoolsHook.js.map +1 -0
  74. package/build/esm/fiber/FiberAccess.js +65 -0
  75. package/build/esm/fiber/FiberAccess.js.map +1 -0
  76. package/build/esm/fiber/FiberInspection.js +140 -0
  77. package/build/esm/fiber/FiberInspection.js.map +1 -0
  78. package/build/esm/fiber/FiberTags.js +52 -0
  79. package/build/esm/fiber/FiberTags.js.map +1 -0
  80. package/build/esm/fiber/HookStateInspector.js +254 -0
  81. package/build/esm/fiber/HookStateInspector.js.map +1 -0
  82. package/build/esm/fiber/SafeFiberOperation.js +35 -0
  83. package/build/esm/fiber/SafeFiberOperation.js.map +1 -0
  84. package/build/esm/fiber/capabilities.js +180 -0
  85. package/build/esm/fiber/capabilities.js.map +1 -0
  86. package/build/esm/fiber/traverseFiber.js +129 -0
  87. package/build/esm/fiber/traverseFiber.js.map +1 -0
  88. package/build/esm/fiber/types.js +2 -0
  89. package/build/esm/fiber/types.js.map +1 -0
  90. package/build/esm/fiber/validation.js +155 -0
  91. package/build/esm/fiber/validation.js.map +1 -0
  92. package/build/esm/hooks/createPollingStore.js +81 -0
  93. package/build/esm/hooks/createPollingStore.js.map +1 -0
  94. package/build/esm/hooks/useActiveComponents.js +27 -0
  95. package/build/esm/hooks/useActiveComponents.js.map +1 -0
  96. package/build/esm/hooks/useComponentRegistry.js +25 -0
  97. package/build/esm/hooks/useComponentRegistry.js.map +1 -0
  98. package/build/esm/hooks/useComputeSelectors.js +43 -0
  99. package/build/esm/hooks/useComputeSelectors.js.map +1 -0
  100. package/build/esm/hooks/useConsoleLogs.js +46 -0
  101. package/build/esm/hooks/useConsoleLogs.js.map +1 -0
  102. package/build/esm/hooks/useInspectorSelection.js +93 -0
  103. package/build/esm/hooks/useInspectorSelection.js.map +1 -0
  104. package/build/esm/hooks/useMetrics.js +23 -0
  105. package/build/esm/hooks/useMetrics.js.map +1 -0
  106. package/build/esm/hooks/usePersistedState.js +89 -0
  107. package/build/esm/hooks/usePersistedState.js.map +1 -0
  108. package/build/esm/hooks/useRecommendations.js +123 -0
  109. package/build/esm/hooks/useRecommendations.js.map +1 -0
  110. package/build/esm/hooks/useSharedTick.js +49 -0
  111. package/build/esm/hooks/useSharedTick.js.map +1 -0
  112. package/build/esm/hooks/useTimeElapsed.js +51 -0
  113. package/build/esm/hooks/useTimeElapsed.js.map +1 -0
  114. package/build/esm/hooks/useTrackerSubscription.js +97 -0
  115. package/build/esm/hooks/useTrackerSubscription.js.map +1 -0
  116. package/build/esm/hooks/useUnusedFieldAnalysis.js +99 -0
  117. package/build/esm/hooks/useUnusedFieldAnalysis.js.map +1 -0
  118. package/build/esm/index.js +31 -0
  119. package/build/esm/index.js.map +1 -0
  120. package/build/esm/inspector/ClickToInspectSystem.js +228 -0
  121. package/build/esm/inspector/ClickToInspectSystem.js.map +1 -0
  122. package/build/esm/inspector/components/ComponentLabel.js +175 -0
  123. package/build/esm/inspector/components/ComponentLabel.js.map +1 -0
  124. package/build/esm/inspector/components/ComponentLabel.module.scss.js +12 -0
  125. package/build/esm/inspector/components/InspectorBanner.js +79 -0
  126. package/build/esm/inspector/components/InspectorBanner.js.map +1 -0
  127. package/build/esm/inspector/components/InspectorOverlay.js +149 -0
  128. package/build/esm/inspector/components/InspectorOverlay.js.map +1 -0
  129. package/build/esm/inspector/components/SelectionHighlight.js +74 -0
  130. package/build/esm/inspector/components/SelectionHighlight.js.map +1 -0
  131. package/build/esm/inspector/createClickToInspect.js +21 -0
  132. package/build/esm/inspector/createClickToInspect.js.map +1 -0
  133. package/build/esm/inspector/hooks/useAnimatedBounds.js +167 -0
  134. package/build/esm/inspector/hooks/useAnimatedBounds.js.map +1 -0
  135. package/build/esm/inspector/index.js +40 -0
  136. package/build/esm/inspector/index.js.map +1 -0
  137. package/build/esm/inspector/inspectorController.js +328 -0
  138. package/build/esm/inspector/inspectorController.js.map +1 -0
  139. package/build/esm/inspector/types.js +2 -0
  140. package/build/esm/inspector/types.js.map +1 -0
  141. package/build/esm/inspector/utils/elementBounds.js +72 -0
  142. package/build/esm/inspector/utils/elementBounds.js.map +1 -0
  143. package/build/esm/inspector/utils/interpolation.js +26 -0
  144. package/build/esm/inspector/utils/interpolation.js.map +1 -0
  145. package/build/esm/inspector/utils/labelPositioning.js +62 -0
  146. package/build/esm/inspector/utils/labelPositioning.js.map +1 -0
  147. package/build/esm/mocking/MockCacheKeyGenerator.js +109 -0
  148. package/build/esm/mocking/MockCacheKeyGenerator.js.map +1 -0
  149. package/build/esm/mocking/MockManager.js +281 -0
  150. package/build/esm/mocking/MockManager.js.map +1 -0
  151. package/build/esm/prototyping/PrototypeOverrideStore.js +66 -0
  152. package/build/esm/prototyping/PrototypeOverrideStore.js.map +1 -0
  153. package/build/esm/prototyping/index.js +18 -0
  154. package/build/esm/prototyping/index.js.map +1 -0
  155. package/build/esm/public/vite.js +19 -0
  156. package/build/esm/public/vite.js.map +1 -0
  157. package/build/esm/register.js +41 -0
  158. package/build/esm/register.js.map +1 -0
  159. package/build/esm/scss.d.ts +20 -0
  160. package/build/esm/store/ComputeStore.js +269 -0
  161. package/build/esm/store/ComputeStore.js.map +1 -0
  162. package/build/esm/store/ConsoleLogStore.js +289 -0
  163. package/build/esm/store/ConsoleLogStore.js.map +1 -0
  164. package/build/esm/store/MetricsStore.js +428 -0
  165. package/build/esm/store/MetricsStore.js.map +1 -0
  166. package/build/esm/store/MonitorStore.js +288 -0
  167. package/build/esm/store/MonitorStore.js.map +1 -0
  168. package/build/esm/store/SubscribableStore.js +38 -0
  169. package/build/esm/store/SubscribableStore.js.map +1 -0
  170. package/build/esm/store/WindowErrorStore.js +195 -0
  171. package/build/esm/store/WindowErrorStore.js.map +1 -0
  172. package/build/esm/styles.css +19441 -0
  173. package/build/esm/styles.js +31 -0
  174. package/build/esm/styles.js.map +1 -0
  175. package/build/esm/types/compute.js +2 -0
  176. package/build/esm/types/compute.js.map +1 -0
  177. package/build/esm/types/emissions.js +2 -0
  178. package/build/esm/types/emissions.js.map +1 -0
  179. package/build/esm/types/index.js +23 -0
  180. package/build/esm/types/index.js.map +1 -0
  181. package/build/esm/utils/ActionLifecycleTracker.js +178 -0
  182. package/build/esm/utils/ActionLifecycleTracker.js.map +1 -0
  183. package/build/esm/utils/CacheEfficiencyAnalyzer.js +198 -0
  184. package/build/esm/utils/CacheEfficiencyAnalyzer.js.map +1 -0
  185. package/build/esm/utils/CircularBuffer.js +96 -0
  186. package/build/esm/utils/CircularBuffer.js.map +1 -0
  187. package/build/esm/utils/ComponentContextCapture.js +215 -0
  188. package/build/esm/utils/ComponentContextCapture.js.map +1 -0
  189. package/build/esm/utils/ComponentPrimitiveDiscovery.js +173 -0
  190. package/build/esm/utils/ComponentPrimitiveDiscovery.js.map +1 -0
  191. package/build/esm/utils/ComponentQueryRegistry.js +340 -0
  192. package/build/esm/utils/ComponentQueryRegistry.js.map +1 -0
  193. package/build/esm/utils/ComputeMonitor.js +199 -0
  194. package/build/esm/utils/ComputeMonitor.js.map +1 -0
  195. package/build/esm/utils/EventTimeline.js +130 -0
  196. package/build/esm/utils/EventTimeline.js.map +1 -0
  197. package/build/esm/utils/LinkTraversalTracker.js +116 -0
  198. package/build/esm/utils/LinkTraversalTracker.js.map +1 -0
  199. package/build/esm/utils/MockDataGenerator.js +473 -0
  200. package/build/esm/utils/MockDataGenerator.js.map +1 -0
  201. package/build/esm/utils/ObservableClientMonitor.js +768 -0
  202. package/build/esm/utils/ObservableClientMonitor.js.map +1 -0
  203. package/build/esm/utils/PerformanceRecommendationEngine.js +185 -0
  204. package/build/esm/utils/PerformanceRecommendationEngine.js.map +1 -0
  205. package/build/esm/utils/PropertyAccessTracker.js +238 -0
  206. package/build/esm/utils/PropertyAccessTracker.js.map +1 -0
  207. package/build/esm/utils/RecommendationMatcher.js +53 -0
  208. package/build/esm/utils/RecommendationMatcher.js.map +1 -0
  209. package/build/esm/utils/SubscriptionTracker.js +132 -0
  210. package/build/esm/utils/SubscriptionTracker.js.map +1 -0
  211. package/build/esm/utils/UnusedFieldAnalyzer.js +186 -0
  212. package/build/esm/utils/UnusedFieldAnalyzer.js.map +1 -0
  213. package/build/esm/utils/WaterfallDetector.js +200 -0
  214. package/build/esm/utils/WaterfallDetector.js.map +1 -0
  215. package/build/esm/utils/computePayload.js +37 -0
  216. package/build/esm/utils/computePayload.js.map +1 -0
  217. package/build/esm/utils/computeRequest.js +29 -0
  218. package/build/esm/utils/computeRequest.js.map +1 -0
  219. package/build/esm/utils/format.js +69 -0
  220. package/build/esm/utils/format.js.map +1 -0
  221. package/build/esm/utils/logger.js +31 -0
  222. package/build/esm/utils/logger.js.map +1 -0
  223. package/build/esm/vite/constants.js +18 -0
  224. package/build/esm/vite/constants.js.map +1 -0
  225. package/build/esm/vite/hookInstaller.js +99 -0
  226. package/build/esm/vite/hookInstaller.js.map +1 -0
  227. package/build/esm/vite/index.js +77 -0
  228. package/build/esm/vite/index.js.map +1 -0
  229. package/build/types/DevToolsContext.d.ts +3 -0
  230. package/build/types/DevToolsContext.d.ts.map +1 -0
  231. package/build/types/components/ActionMetrics.d.ts +6 -0
  232. package/build/types/components/ActionMetrics.d.ts.map +1 -0
  233. package/build/types/components/BubbleChart.d.ts +10 -0
  234. package/build/types/components/BubbleChart.d.ts.map +1 -0
  235. package/build/types/components/CacheInspectorTab.d.ts +6 -0
  236. package/build/types/components/CacheInspectorTab.d.ts.map +1 -0
  237. package/build/types/components/CacheMetrics.d.ts +6 -0
  238. package/build/types/components/CacheMetrics.d.ts.map +1 -0
  239. package/build/types/components/ComponentCard.d.ts +13 -0
  240. package/build/types/components/ComponentCard.d.ts.map +1 -0
  241. package/build/types/components/ComputeTab.d.ts +6 -0
  242. package/build/types/components/ComputeTab.d.ts.map +1 -0
  243. package/build/types/components/CopyableCodeBlock.d.ts +7 -0
  244. package/build/types/components/CopyableCodeBlock.d.ts.map +1 -0
  245. package/build/types/components/DebuggingTab.d.ts +6 -0
  246. package/build/types/components/DebuggingTab.d.ts.map +1 -0
  247. package/build/types/components/HookRow.d.ts +9 -0
  248. package/build/types/components/HookRow.d.ts.map +1 -0
  249. package/build/types/components/ImprovementsTab.d.ts +7 -0
  250. package/build/types/components/ImprovementsTab.d.ts.map +1 -0
  251. package/build/types/components/InspectorSelectionHeader.d.ts +12 -0
  252. package/build/types/components/InspectorSelectionHeader.d.ts.map +1 -0
  253. package/build/types/components/InterceptTab.d.ts +126 -0
  254. package/build/types/components/InterceptTab.d.ts.map +1 -0
  255. package/build/types/components/IssueCard.d.ts +8 -0
  256. package/build/types/components/IssueCard.d.ts.map +1 -0
  257. package/build/types/components/LogEntryCard.d.ts +7 -0
  258. package/build/types/components/LogEntryCard.d.ts.map +1 -0
  259. package/build/types/components/MockEditor.d.ts +58 -0
  260. package/build/types/components/MockEditor.d.ts.map +1 -0
  261. package/build/types/components/MonitorErrorBoundary.d.ts +16 -0
  262. package/build/types/components/MonitorErrorBoundary.d.ts.map +1 -0
  263. package/build/types/components/MonitoringPanel.d.ts +8 -0
  264. package/build/types/components/MonitoringPanel.d.ts.map +1 -0
  265. package/build/types/components/ObjectLoadingMetrics.d.ts +7 -0
  266. package/build/types/components/ObjectLoadingMetrics.d.ts.map +1 -0
  267. package/build/types/components/OsdkAppErrorBoundary.d.ts +18 -0
  268. package/build/types/components/OsdkAppErrorBoundary.d.ts.map +1 -0
  269. package/build/types/components/OsdkDevTools.d.ts +2 -0
  270. package/build/types/components/OsdkDevTools.d.ts.map +1 -0
  271. package/build/types/components/OverrideEditor.d.ts +26 -0
  272. package/build/types/components/OverrideEditor.d.ts.map +1 -0
  273. package/build/types/components/PerformanceTab.d.ts +8 -0
  274. package/build/types/components/PerformanceTab.d.ts.map +1 -0
  275. package/build/types/components/PrimitiveSelectionPanel.d.ts +28 -0
  276. package/build/types/components/PrimitiveSelectionPanel.d.ts.map +1 -0
  277. package/build/types/components/issueTypes.d.ts +16 -0
  278. package/build/types/components/issueTypes.d.ts.map +1 -0
  279. package/build/types/components/resolveComponentName.d.ts +3 -0
  280. package/build/types/components/resolveComponentName.d.ts.map +1 -0
  281. package/build/types/components/testHelpers.d.ts +2 -0
  282. package/build/types/components/testHelpers.d.ts.map +1 -0
  283. package/build/types/css.d.d.ts +4 -0
  284. package/build/types/css.d.d.ts.map +1 -0
  285. package/build/types/fiber/DegradationNotice.d.ts +8 -0
  286. package/build/types/fiber/DegradationNotice.d.ts.map +1 -0
  287. package/build/types/fiber/DevtoolsHook.d.ts +7 -0
  288. package/build/types/fiber/DevtoolsHook.d.ts.map +1 -0
  289. package/build/types/fiber/FiberAccess.d.ts +2 -0
  290. package/build/types/fiber/FiberAccess.d.ts.map +1 -0
  291. package/build/types/fiber/FiberInspection.d.ts +6 -0
  292. package/build/types/fiber/FiberInspection.d.ts.map +1 -0
  293. package/build/types/fiber/FiberTags.d.ts +33 -0
  294. package/build/types/fiber/FiberTags.d.ts.map +1 -0
  295. package/build/types/fiber/HookStateInspector.d.ts +45 -0
  296. package/build/types/fiber/HookStateInspector.d.ts.map +1 -0
  297. package/build/types/fiber/SafeFiberOperation.d.ts +7 -0
  298. package/build/types/fiber/SafeFiberOperation.d.ts.map +1 -0
  299. package/build/types/fiber/capabilities.d.ts +38 -0
  300. package/build/types/fiber/capabilities.d.ts.map +1 -0
  301. package/build/types/fiber/traverseFiber.d.ts +5 -0
  302. package/build/types/fiber/traverseFiber.d.ts.map +1 -0
  303. package/build/types/fiber/types.d.ts +87 -0
  304. package/build/types/fiber/types.d.ts.map +1 -0
  305. package/build/types/fiber/validation.d.ts +10 -0
  306. package/build/types/fiber/validation.d.ts.map +1 -0
  307. package/build/types/hooks/createPollingStore.d.ts +5 -0
  308. package/build/types/hooks/createPollingStore.d.ts.map +1 -0
  309. package/build/types/hooks/useActiveComponents.d.ts +3 -0
  310. package/build/types/hooks/useActiveComponents.d.ts.map +1 -0
  311. package/build/types/hooks/useComponentRegistry.d.ts +3 -0
  312. package/build/types/hooks/useComponentRegistry.d.ts.map +1 -0
  313. package/build/types/hooks/useComputeSelectors.d.ts +7 -0
  314. package/build/types/hooks/useComputeSelectors.d.ts.map +1 -0
  315. package/build/types/hooks/useConsoleLogs.d.ts +7 -0
  316. package/build/types/hooks/useConsoleLogs.d.ts.map +1 -0
  317. package/build/types/hooks/useInspectorSelection.d.ts +9 -0
  318. package/build/types/hooks/useInspectorSelection.d.ts.map +1 -0
  319. package/build/types/hooks/useMetrics.d.ts +3 -0
  320. package/build/types/hooks/useMetrics.d.ts.map +1 -0
  321. package/build/types/hooks/usePersistedState.d.ts +1 -0
  322. package/build/types/hooks/usePersistedState.d.ts.map +1 -0
  323. package/build/types/hooks/useRecommendations.d.ts +10 -0
  324. package/build/types/hooks/useRecommendations.d.ts.map +1 -0
  325. package/build/types/hooks/useSharedTick.d.ts +1 -0
  326. package/build/types/hooks/useSharedTick.d.ts.map +1 -0
  327. package/build/types/hooks/useTimeElapsed.d.ts +1 -0
  328. package/build/types/hooks/useTimeElapsed.d.ts.map +1 -0
  329. package/build/types/hooks/useTrackerSubscription.d.ts +16 -0
  330. package/build/types/hooks/useTrackerSubscription.d.ts.map +1 -0
  331. package/build/types/hooks/useUnusedFieldAnalysis.d.ts +8 -0
  332. package/build/types/hooks/useUnusedFieldAnalysis.d.ts.map +1 -0
  333. package/build/types/index.d.ts +21 -0
  334. package/build/types/index.d.ts.map +1 -0
  335. package/build/types/inspector/ClickToInspectSystem.d.ts +40 -0
  336. package/build/types/inspector/ClickToInspectSystem.d.ts.map +1 -0
  337. package/build/types/inspector/components/ComponentLabel.d.ts +3 -0
  338. package/build/types/inspector/components/ComponentLabel.d.ts.map +1 -0
  339. package/build/types/inspector/components/InspectorBanner.d.ts +5 -0
  340. package/build/types/inspector/components/InspectorBanner.d.ts.map +1 -0
  341. package/build/types/inspector/components/InspectorOverlay.d.ts +3 -0
  342. package/build/types/inspector/components/InspectorOverlay.d.ts.map +1 -0
  343. package/build/types/inspector/components/SelectionHighlight.d.ts +3 -0
  344. package/build/types/inspector/components/SelectionHighlight.d.ts.map +1 -0
  345. package/build/types/inspector/createClickToInspect.d.ts +3 -0
  346. package/build/types/inspector/createClickToInspect.d.ts.map +1 -0
  347. package/build/types/inspector/hooks/useAnimatedBounds.d.ts +2 -0
  348. package/build/types/inspector/hooks/useAnimatedBounds.d.ts.map +1 -0
  349. package/build/types/inspector/index.d.ts +13 -0
  350. package/build/types/inspector/index.d.ts.map +1 -0
  351. package/build/types/inspector/inspectorController.d.ts +2 -0
  352. package/build/types/inspector/inspectorController.d.ts.map +1 -0
  353. package/build/types/inspector/types.d.ts +94 -0
  354. package/build/types/inspector/types.d.ts.map +1 -0
  355. package/build/types/inspector/utils/elementBounds.d.ts +3 -0
  356. package/build/types/inspector/utils/elementBounds.d.ts.map +1 -0
  357. package/build/types/inspector/utils/interpolation.d.ts +7 -0
  358. package/build/types/inspector/utils/interpolation.d.ts.map +1 -0
  359. package/build/types/inspector/utils/labelPositioning.d.ts +3 -0
  360. package/build/types/inspector/utils/labelPositioning.d.ts.map +1 -0
  361. package/build/types/mocking/MockCacheKeyGenerator.d.ts +41 -0
  362. package/build/types/mocking/MockCacheKeyGenerator.d.ts.map +1 -0
  363. package/build/types/mocking/MockManager.d.ts +103 -0
  364. package/build/types/mocking/MockManager.d.ts.map +1 -0
  365. package/build/types/prototyping/PrototypeOverrideStore.d.ts +33 -0
  366. package/build/types/prototyping/PrototypeOverrideStore.d.ts.map +1 -0
  367. package/build/types/prototyping/index.d.ts +1 -0
  368. package/build/types/prototyping/index.d.ts.map +1 -0
  369. package/build/types/public/vite.d.ts +2 -0
  370. package/build/types/public/vite.d.ts.map +1 -0
  371. package/build/types/register.d.ts +1 -0
  372. package/build/types/register.d.ts.map +1 -0
  373. package/build/types/scss.d.d.ts +6 -0
  374. package/build/types/scss.d.d.ts.map +1 -0
  375. package/build/types/store/ComputeStore.d.ts +47 -0
  376. package/build/types/store/ComputeStore.d.ts.map +1 -0
  377. package/build/types/store/ConsoleLogStore.d.ts +29 -0
  378. package/build/types/store/ConsoleLogStore.d.ts.map +1 -0
  379. package/build/types/store/MetricsStore.d.ts +42 -0
  380. package/build/types/store/MetricsStore.d.ts.map +1 -0
  381. package/build/types/store/MonitorStore.d.ts +86 -0
  382. package/build/types/store/MonitorStore.d.ts.map +1 -0
  383. package/build/types/store/SubscribableStore.d.ts +6 -0
  384. package/build/types/store/SubscribableStore.d.ts.map +1 -0
  385. package/build/types/store/WindowErrorStore.d.ts +32 -0
  386. package/build/types/store/WindowErrorStore.d.ts.map +1 -0
  387. package/build/types/styles.d.ts +1 -0
  388. package/build/types/styles.d.ts.map +1 -0
  389. package/build/types/types/compute.d.ts +73 -0
  390. package/build/types/types/compute.d.ts.map +1 -0
  391. package/build/types/types/emissions.d.ts +24 -0
  392. package/build/types/types/emissions.d.ts.map +1 -0
  393. package/build/types/types/index.d.ts +143 -0
  394. package/build/types/types/index.d.ts.map +1 -0
  395. package/build/types/utils/ActionLifecycleTracker.d.ts +39 -0
  396. package/build/types/utils/ActionLifecycleTracker.d.ts.map +1 -0
  397. package/build/types/utils/CacheEfficiencyAnalyzer.d.ts +45 -0
  398. package/build/types/utils/CacheEfficiencyAnalyzer.d.ts.map +1 -0
  399. package/build/types/utils/CircularBuffer.d.ts +18 -0
  400. package/build/types/utils/CircularBuffer.d.ts.map +1 -0
  401. package/build/types/utils/ComponentContextCapture.d.ts +29 -0
  402. package/build/types/utils/ComponentContextCapture.d.ts.map +1 -0
  403. package/build/types/utils/ComponentPrimitiveDiscovery.d.ts +62 -0
  404. package/build/types/utils/ComponentPrimitiveDiscovery.d.ts.map +1 -0
  405. package/build/types/utils/ComponentQueryRegistry.d.ts +91 -0
  406. package/build/types/utils/ComponentQueryRegistry.d.ts.map +1 -0
  407. package/build/types/utils/ComputeMonitor.d.ts +14 -0
  408. package/build/types/utils/ComputeMonitor.d.ts.map +1 -0
  409. package/build/types/utils/EventTimeline.d.ts +102 -0
  410. package/build/types/utils/EventTimeline.d.ts.map +1 -0
  411. package/build/types/utils/LinkTraversalTracker.d.ts +43 -0
  412. package/build/types/utils/LinkTraversalTracker.d.ts.map +1 -0
  413. package/build/types/utils/MockDataGenerator.d.ts +23 -0
  414. package/build/types/utils/MockDataGenerator.d.ts.map +1 -0
  415. package/build/types/utils/ObservableClientMonitor.d.ts +62 -0
  416. package/build/types/utils/ObservableClientMonitor.d.ts.map +1 -0
  417. package/build/types/utils/PerformanceRecommendationEngine.d.ts +67 -0
  418. package/build/types/utils/PerformanceRecommendationEngine.d.ts.map +1 -0
  419. package/build/types/utils/PropertyAccessTracker.d.ts +50 -0
  420. package/build/types/utils/PropertyAccessTracker.d.ts.map +1 -0
  421. package/build/types/utils/RecommendationMatcher.d.ts +5 -0
  422. package/build/types/utils/RecommendationMatcher.d.ts.map +1 -0
  423. package/build/types/utils/SubscriptionTracker.d.ts +17 -0
  424. package/build/types/utils/SubscriptionTracker.d.ts.map +1 -0
  425. package/build/types/utils/UnusedFieldAnalyzer.d.ts +46 -0
  426. package/build/types/utils/UnusedFieldAnalyzer.d.ts.map +1 -0
  427. package/build/types/utils/WaterfallDetector.d.ts +28 -0
  428. package/build/types/utils/WaterfallDetector.d.ts.map +1 -0
  429. package/build/types/utils/computePayload.d.ts +3 -0
  430. package/build/types/utils/computePayload.d.ts.map +1 -0
  431. package/build/types/utils/computeRequest.d.ts +20 -0
  432. package/build/types/utils/computeRequest.d.ts.map +1 -0
  433. package/build/types/utils/format.d.ts +5 -0
  434. package/build/types/utils/format.d.ts.map +1 -0
  435. package/build/types/utils/logger.d.ts +2 -0
  436. package/build/types/utils/logger.d.ts.map +1 -0
  437. package/build/types/vite/constants.d.ts +1 -0
  438. package/build/types/vite/constants.d.ts.map +1 -0
  439. package/build/types/vite/hookInstaller.d.ts +1 -0
  440. package/build/types/vite/hookInstaller.d.ts.map +1 -0
  441. package/build/types/vite/index.d.ts +20 -0
  442. package/build/types/vite/index.d.ts.map +1 -0
  443. package/package.json +114 -0
@@ -0,0 +1,175 @@
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
+ import React, { useCallback, useRef, useState } from "react";
18
+ import { computeLabelPosition, OFFSCREEN_POSITION } from "../utils/labelPositioning.js";
19
+ import styles from "./ComponentLabel.module.scss.js";
20
+ const ARROW_HEIGHT = 8;
21
+ const COPY_FEEDBACK_DURATION_MS = 1500;
22
+ const EMPTY_SIZE = {
23
+ width: 0,
24
+ height: 0
25
+ };
26
+ function useElementSize(ref) {
27
+ const sizeRef = useRef(EMPTY_SIZE);
28
+ const subscribe = React.useCallback(onStoreChange => {
29
+ const el = ref.current;
30
+ if (!el) {
31
+ return () => {};
32
+ }
33
+ const measure = () => {
34
+ const rect = el.getBoundingClientRect();
35
+ const next = {
36
+ width: rect.width,
37
+ height: rect.height
38
+ };
39
+ if (next.width !== sizeRef.current.width || next.height !== sizeRef.current.height) {
40
+ sizeRef.current = next;
41
+ onStoreChange();
42
+ }
43
+ };
44
+ measure();
45
+ const observer = new ResizeObserver(measure);
46
+ observer.observe(el);
47
+ return () => observer.disconnect();
48
+ }, [ref]);
49
+ const getSnapshot = React.useCallback(() => sizeRef.current, []);
50
+ return React.useSyncExternalStore(subscribe, getSnapshot, getSnapshot);
51
+ }
52
+ export function ComponentLabel({
53
+ component,
54
+ bounds,
55
+ mouseX,
56
+ mouseY,
57
+ status,
58
+ onOpenSource,
59
+ visible
60
+ }) {
61
+ const containerRef = useRef(null);
62
+ const measuredSize = useElementSize(containerRef);
63
+ const [showCopied, setShowCopied] = useState(false);
64
+ const copyTimeoutRef = useRef(null);
65
+ const position = React.useMemo(() => {
66
+ if (!bounds || measuredSize.width === 0 || measuredSize.height === 0) {
67
+ return OFFSCREEN_POSITION;
68
+ }
69
+ return computeLabelPosition(bounds, measuredSize.width, measuredSize.height, mouseX);
70
+ }, [bounds, measuredSize.width, measuredSize.height, mouseX]);
71
+ const handleSourceClick = useCallback(() => {
72
+ if (component?.sourceLocation && onOpenSource) {
73
+ onOpenSource(component.sourceLocation);
74
+ }
75
+ }, [component?.sourceLocation, onOpenSource]);
76
+ const handleCopySourceLocation = useCallback(() => {
77
+ if (!component?.sourceLocation) {
78
+ return;
79
+ }
80
+ const loc = component.sourceLocation;
81
+ const fullPath = loc.columnNumber ? `${loc.fileName}:${loc.lineNumber}:${loc.columnNumber}` : `${loc.fileName}:${loc.lineNumber}`;
82
+ navigator.clipboard.writeText(fullPath).then(() => {
83
+ if (copyTimeoutRef.current) {
84
+ clearTimeout(copyTimeoutRef.current);
85
+ }
86
+ setShowCopied(true);
87
+ copyTimeoutRef.current = setTimeout(() => {
88
+ setShowCopied(false);
89
+ copyTimeoutRef.current = null;
90
+ }, COPY_FEEDBACK_DURATION_MS);
91
+ }).catch(() => {});
92
+ }, [component?.sourceLocation]);
93
+ if (!component || !visible) {
94
+ return null;
95
+ }
96
+ const arrowStyle = {
97
+ left: `${position.arrowLeft - 8}px`,
98
+ ...(position.arrowPosition === "bottom" ? {
99
+ top: `-${ARROW_HEIGHT}px`,
100
+ borderBottom: "8px solid rgba(30, 30, 30, 0.95)"
101
+ } : {
102
+ bottom: `-${ARROW_HEIGHT}px`,
103
+ borderTop: "8px solid rgba(30, 30, 30, 0.95)"
104
+ })
105
+ };
106
+ return /*#__PURE__*/React.createElement("div", {
107
+ ref: containerRef,
108
+ "data-osdk-devtools-ignore": true,
109
+ className: styles.label,
110
+ style: {
111
+ left: `${position.left}px`,
112
+ top: `${position.top}px`,
113
+ opacity: visible && position.left > -9000 ? 1 : 0
114
+ }
115
+ }, /*#__PURE__*/React.createElement("div", {
116
+ className: styles.arrow,
117
+ style: arrowStyle
118
+ }), /*#__PURE__*/React.createElement("div", {
119
+ className: styles.componentName
120
+ }, "<", component.name, " />", component.hookCount > 0 && /*#__PURE__*/React.createElement("span", {
121
+ className: styles.hookBadge
122
+ }, component.hookCount, " hook", component.hookCount !== 1 ? "s" : "")), component.sourceLocation && /*#__PURE__*/React.createElement("div", {
123
+ className: styles.sourceRow
124
+ }, /*#__PURE__*/React.createElement("div", {
125
+ className: styles.sourceLocation,
126
+ onClick: handleSourceClick
127
+ }, /*#__PURE__*/React.createElement("svg", {
128
+ width: "12",
129
+ height: "12",
130
+ viewBox: "0 0 24 24",
131
+ fill: "none",
132
+ stroke: "currentColor",
133
+ strokeWidth: "2"
134
+ }, /*#__PURE__*/React.createElement("path", {
135
+ d: "M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z"
136
+ }), /*#__PURE__*/React.createElement("polyline", {
137
+ points: "13 2 13 9 20 9"
138
+ })), (loc => {
139
+ const fileName = loc.fileName.split("/").pop() ?? loc.fileName;
140
+ return loc.columnNumber ? `${fileName}:${loc.lineNumber}:${loc.columnNumber}` : `${fileName}:${loc.lineNumber}`;
141
+ })(component.sourceLocation)), /*#__PURE__*/React.createElement("button", {
142
+ type: "button",
143
+ className: styles.copyButton,
144
+ onClick: handleCopySourceLocation,
145
+ title: "Copy source location"
146
+ }, showCopied ? /*#__PURE__*/React.createElement("svg", {
147
+ width: "12",
148
+ height: "12",
149
+ viewBox: "0 0 24 24",
150
+ fill: "none",
151
+ stroke: "#22c55e",
152
+ strokeWidth: "2"
153
+ }, /*#__PURE__*/React.createElement("polyline", {
154
+ points: "20 6 9 17 4 12"
155
+ })) : /*#__PURE__*/React.createElement("svg", {
156
+ width: "12",
157
+ height: "12",
158
+ viewBox: "0 0 24 24",
159
+ fill: "none",
160
+ stroke: "currentColor",
161
+ strokeWidth: "2"
162
+ }, /*#__PURE__*/React.createElement("rect", {
163
+ x: "9",
164
+ y: "9",
165
+ width: "13",
166
+ height: "13",
167
+ rx: "2",
168
+ ry: "2"
169
+ }), /*#__PURE__*/React.createElement("path", {
170
+ d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"
171
+ }))), showCopied && /*#__PURE__*/React.createElement("span", {
172
+ className: styles.copiedText
173
+ }, "Copied!")));
174
+ }
175
+ //# sourceMappingURL=ComponentLabel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ComponentLabel.js","names":["React","useCallback","useRef","useState","computeLabelPosition","OFFSCREEN_POSITION","styles","ARROW_HEIGHT","COPY_FEEDBACK_DURATION_MS","EMPTY_SIZE","width","height","useElementSize","ref","sizeRef","subscribe","onStoreChange","el","current","measure","rect","getBoundingClientRect","next","observer","ResizeObserver","observe","disconnect","getSnapshot","useSyncExternalStore","ComponentLabel","component","bounds","mouseX","mouseY","status","onOpenSource","visible","containerRef","measuredSize","showCopied","setShowCopied","copyTimeoutRef","position","useMemo","handleSourceClick","sourceLocation","handleCopySourceLocation","loc","fullPath","columnNumber","fileName","lineNumber","navigator","clipboard","writeText","then","clearTimeout","setTimeout","catch","arrowStyle","left","arrowLeft","arrowPosition","top","borderBottom","bottom","borderTop","createElement","className","label","style","opacity","arrow","componentName","name","hookCount","hookBadge","sourceRow","onClick","viewBox","fill","stroke","strokeWidth","d","points","split","pop","type","copyButton","title","x","y","rx","ry","copiedText"],"sources":["ComponentLabel.tsx"],"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 React, { useCallback, useRef, useState } from \"react\";\nimport type { SourceLocation } from \"../../fiber/types.js\";\nimport type { ComponentLabelProps, LabelPosition } from \"../types.js\";\nimport {\n computeLabelPosition,\n OFFSCREEN_POSITION,\n} from \"../utils/labelPositioning.js\";\nimport styles from \"./ComponentLabel.module.scss\";\n\nconst ARROW_HEIGHT = 8;\nconst COPY_FEEDBACK_DURATION_MS = 1500;\n\ninterface SizeSnapshot {\n width: number;\n height: number;\n}\n\nconst EMPTY_SIZE: SizeSnapshot = { width: 0, height: 0 };\n\nfunction useElementSize(\n ref: React.RefObject<HTMLDivElement | null>,\n): SizeSnapshot {\n const sizeRef = useRef<SizeSnapshot>(EMPTY_SIZE);\n\n const subscribe = React.useCallback((onStoreChange: () => void) => {\n const el = ref.current;\n if (!el) {\n return () => {};\n }\n\n const measure = () => {\n const rect = el.getBoundingClientRect();\n const next = { width: rect.width, height: rect.height };\n if (\n next.width !== sizeRef.current.width\n || next.height !== sizeRef.current.height\n ) {\n sizeRef.current = next;\n onStoreChange();\n }\n };\n\n measure();\n\n const observer = new ResizeObserver(measure);\n observer.observe(el);\n return () => observer.disconnect();\n }, [ref]);\n\n const getSnapshot = React.useCallback(() => sizeRef.current, []);\n\n return React.useSyncExternalStore(subscribe, getSnapshot, getSnapshot);\n}\n\nexport function ComponentLabel({\n component,\n bounds,\n mouseX,\n mouseY,\n status,\n onOpenSource,\n visible,\n}: ComponentLabelProps): React.ReactElement | null {\n const containerRef = useRef<HTMLDivElement>(null);\n const measuredSize = useElementSize(containerRef);\n const [showCopied, setShowCopied] = useState(false);\n const copyTimeoutRef = useRef<ReturnType<typeof setTimeout> | null>(null);\n\n const position: LabelPosition = React.useMemo(() => {\n if (!bounds || measuredSize.width === 0 || measuredSize.height === 0) {\n return OFFSCREEN_POSITION;\n }\n\n return computeLabelPosition(\n bounds,\n measuredSize.width,\n measuredSize.height,\n mouseX,\n );\n }, [bounds, measuredSize.width, measuredSize.height, mouseX]);\n\n const handleSourceClick = useCallback(() => {\n if (component?.sourceLocation && onOpenSource) {\n onOpenSource(component.sourceLocation);\n }\n }, [component?.sourceLocation, onOpenSource]);\n\n const handleCopySourceLocation = useCallback(() => {\n if (!component?.sourceLocation) {\n return;\n }\n\n const loc = component.sourceLocation;\n const fullPath = loc.columnNumber\n ? `${loc.fileName}:${loc.lineNumber}:${loc.columnNumber}`\n : `${loc.fileName}:${loc.lineNumber}`;\n\n navigator.clipboard.writeText(fullPath).then(() => {\n if (copyTimeoutRef.current) {\n clearTimeout(copyTimeoutRef.current);\n }\n\n setShowCopied(true);\n copyTimeoutRef.current = setTimeout(() => {\n setShowCopied(false);\n copyTimeoutRef.current = null;\n }, COPY_FEEDBACK_DURATION_MS);\n }).catch(() => {\n });\n }, [component?.sourceLocation]);\n\n if (!component || !visible) {\n return null;\n }\n\n const arrowStyle: React.CSSProperties = {\n left: `${position.arrowLeft - 8}px`,\n ...(position.arrowPosition === \"bottom\"\n ? {\n top: `-${ARROW_HEIGHT}px`,\n borderBottom: \"8px solid rgba(30, 30, 30, 0.95)\",\n }\n : {\n bottom: `-${ARROW_HEIGHT}px`,\n borderTop: \"8px solid rgba(30, 30, 30, 0.95)\",\n }),\n };\n\n const formatSourceLocation = (loc: SourceLocation): string => {\n const fileName = loc.fileName.split(\"/\").pop() ?? loc.fileName;\n return loc.columnNumber\n ? `${fileName}:${loc.lineNumber}:${loc.columnNumber}`\n : `${fileName}:${loc.lineNumber}`;\n };\n\n return (\n <div\n ref={containerRef}\n data-osdk-devtools-ignore={true}\n className={styles.label}\n style={{\n left: `${position.left}px`,\n top: `${position.top}px`,\n opacity: visible && position.left > -9000 ? 1 : 0,\n }}\n >\n <div className={styles.arrow} style={arrowStyle} />\n <div className={styles.componentName}>\n {\"<\"}\n {component.name}\n {\" />\"}\n {component.hookCount > 0 && (\n <span className={styles.hookBadge}>\n {component.hookCount} hook{component.hookCount !== 1 ? \"s\" : \"\"}\n </span>\n )}\n </div>\n {component.sourceLocation && (\n <div className={styles.sourceRow}>\n <div\n className={styles.sourceLocation}\n onClick={handleSourceClick}\n >\n <svg\n width=\"12\"\n height=\"12\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n >\n <path d=\"M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z\" />\n <polyline points=\"13 2 13 9 20 9\" />\n </svg>\n {formatSourceLocation(component.sourceLocation)}\n </div>\n <button\n type=\"button\"\n className={styles.copyButton}\n onClick={handleCopySourceLocation}\n title=\"Copy source location\"\n >\n {showCopied\n ? (\n <svg\n width=\"12\"\n height=\"12\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"#22c55e\"\n strokeWidth=\"2\"\n >\n <polyline points=\"20 6 9 17 4 12\" />\n </svg>\n )\n : (\n <svg\n width=\"12\"\n height=\"12\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n >\n <rect x=\"9\" y=\"9\" width=\"13\" height=\"13\" rx=\"2\" ry=\"2\" />\n <path d=\"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1\" />\n </svg>\n )}\n </button>\n {showCopied && <span className={styles.copiedText}>Copied!</span>}\n </div>\n )}\n </div>\n );\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAOA,KAAK,IAAIC,WAAW,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AAG5D,SACEC,oBAAoB,EACpBC,kBAAkB,QACb,8BAA8B;AACrC,OAAOC,MAAM,MAAM,8BAA8B;AAEjD,MAAMC,YAAY,GAAG,CAAC;AACtB,MAAMC,y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@@
1
+ // AUTO-GENERATED by scripts/build-css.mjs. Do not edit by hand.
2
+ const styles = {
3
+ "label": "ComponentLabel-module__label___qAAah89L",
4
+ "arrow": "ComponentLabel-module__arrow___VUxHj0Ee",
5
+ "componentName": "ComponentLabel-module__componentName___HMiDPm5T",
6
+ "sourceLocation": "ComponentLabel-module__sourceLocation___Fv5T-QLB",
7
+ "sourceRow": "ComponentLabel-module__sourceRow___EA8MjY5g",
8
+ "hookBadge": "ComponentLabel-module__hookBadge___iew9gFQV",
9
+ "copyButton": "ComponentLabel-module__copyButton___0esaHS8-",
10
+ "copiedText": "ComponentLabel-module__copiedText___GMaasVOA"
11
+ };
12
+ export default styles;
@@ -0,0 +1,79 @@
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
+ import React from "react";
18
+ const bannerStyles = {
19
+ position: "fixed",
20
+ top: 0,
21
+ left: "50%",
22
+ transform: "translateX(-50%)",
23
+ background: "linear-gradient(135deg, #667eea 0%, #764ba2 100%)",
24
+ color: "white",
25
+ padding: "12px 24px",
26
+ borderRadius: "0 0 8px 8px",
27
+ fontSize: "14px",
28
+ fontWeight: 600,
29
+ fontFamily: "system-ui, -apple-system, sans-serif",
30
+ boxShadow: "0 4px 12px rgba(0, 0, 0, 0.3)",
31
+ pointerEvents: "none",
32
+ zIndex: 2147483648,
33
+ textAlign: "center",
34
+ transition: "opacity 150ms ease-out, transform 150ms ease-out"
35
+ };
36
+ const containerStyles = {
37
+ display: "flex",
38
+ alignItems: "center",
39
+ gap: "12px"
40
+ };
41
+ const kbdStyles = {
42
+ background: "rgba(0, 0, 0, 0.3)",
43
+ padding: "2px 6px",
44
+ borderRadius: "3px",
45
+ fontSize: "12px",
46
+ marginLeft: "8px"
47
+ };
48
+ const hintStyles = {
49
+ fontSize: "12px",
50
+ opacity: 0.9
51
+ };
52
+ export const InspectorBanner = ({
53
+ visible
54
+ }) => {
55
+ if (!visible) {
56
+ return null;
57
+ }
58
+ return /*#__PURE__*/React.createElement("div", {
59
+ style: bannerStyles
60
+ }, /*#__PURE__*/React.createElement("div", {
61
+ style: containerStyles
62
+ }, /*#__PURE__*/React.createElement("svg", {
63
+ width: "20",
64
+ height: "20",
65
+ viewBox: "0 0 20 20",
66
+ fill: "none",
67
+ xmlns: "http://www.w3.org/2000/svg"
68
+ }, /*#__PURE__*/React.createElement("path", {
69
+ d: "M10 2L3 6V10C3 14.5 6.5 18.5 10 19.5C13.5 18.5 17 14.5 17 10V6L10 2Z",
70
+ stroke: "white",
71
+ strokeWidth: "1.5",
72
+ fill: "rgba(255,255,255,0.2)"
73
+ })), /*#__PURE__*/React.createElement("span", null, "Click on a component to inspect its OSDK hooks"), /*#__PURE__*/React.createElement("kbd", {
74
+ style: kbdStyles
75
+ }, "ESC"), /*#__PURE__*/React.createElement("span", {
76
+ style: hintStyles
77
+ }, "to exit")));
78
+ };
79
+ //# sourceMappingURL=InspectorBanner.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InspectorBanner.js","names":["React","bannerStyles","position","top","left","transform","background","color","padding","borderRadius","fontSize","fontWeight","fontFamily","boxShadow","pointerEvents","zIndex","textAlign","transition","containerStyles","display","alignItems","gap","kbdStyles","marginLeft","hintStyles","opacity","InspectorBanner","visible","createElement","style","width","height","viewBox","fill","xmlns","d","stroke","strokeWidth"],"sources":["InspectorBanner.tsx"],"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 React from \"react\";\n\nexport interface InspectorBannerProps {\n visible: boolean;\n}\n\nconst bannerStyles: React.CSSProperties = {\n position: \"fixed\",\n top: 0,\n left: \"50%\",\n transform: \"translateX(-50%)\",\n background: \"linear-gradient(135deg, #667eea 0%, #764ba2 100%)\",\n color: \"white\",\n padding: \"12px 24px\",\n borderRadius: \"0 0 8px 8px\",\n fontSize: \"14px\",\n fontWeight: 600,\n fontFamily: \"system-ui, -apple-system, sans-serif\",\n boxShadow: \"0 4px 12px rgba(0, 0, 0, 0.3)\",\n pointerEvents: \"none\",\n zIndex: 2147483648,\n textAlign: \"center\",\n transition: \"opacity 150ms ease-out, transform 150ms ease-out\",\n};\n\nconst containerStyles: React.CSSProperties = {\n display: \"flex\",\n alignItems: \"center\",\n gap: \"12px\",\n};\n\nconst kbdStyles: React.CSSProperties = {\n background: \"rgba(0, 0, 0, 0.3)\",\n padding: \"2px 6px\",\n borderRadius: \"3px\",\n fontSize: \"12px\",\n marginLeft: \"8px\",\n};\n\nconst hintStyles: React.CSSProperties = {\n fontSize: \"12px\",\n opacity: 0.9,\n};\n\nexport const InspectorBanner: React.FC<InspectorBannerProps> = (\n { visible },\n) => {\n if (!visible) {\n return null;\n }\n\n return (\n <div style={bannerStyles}>\n <div style={containerStyles}>\n <svg\n width=\"20\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M10 2L3 6V10C3 14.5 6.5 18.5 10 19.5C13.5 18.5 17 14.5 17 10V6L10 2Z\"\n stroke=\"white\"\n strokeWidth=\"1.5\"\n fill=\"rgba(255,255,255,0.2)\"\n />\n </svg>\n <span>Click on a component to inspect its OSDK hooks</span>\n <kbd style={kbdStyles}>ESC</kbd>\n <span style={hintStyles}>to exit</span>\n </div>\n </div>\n );\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAOA,KAAK,MAAM,OAAO;AAMzB,MAAMC,YAAiC,GAAG;EACxCC,QAAQ,EAAE,OAAO;EACjBC,GAAG,EAAE,CAAC;EACNC,IAAI,EAAE,KAAK;EACXC,SAAS,EAAE,kBAAkB;EAC7BC,UAAU,EAAE,mDAAmD;EAC/DC,KAAK,EAAE,OAAO;EACdC,OAAO,EAAE,WAAW;EACpBC,YAAY,EAAE,aAAa;EAC3BC,QAAQ,EAAE,MAAM;EAChBC,UAAU,EAAE,GAAG;EACfC,UAAU,EAAE,sCAAsC;EAClDC,SAAS,EAAE,+BAA+B;EAC1CC,aAAa,EAAE,MAAM;EACrBC,MAAM,EAAE,UAAU;EAClBC,SAAS,EAAE,QAAQ;EACnBC,UAAU,EAAE;AACd,CAAC;AAED,MAAMC,eAAoC,GAAG;EAC3CC,OAAO,EAAE,MAAM;EACfC,UAAU,EAAE,QAAQ;EACpBC,GAAG,EAAE;AACP,CAAC;AAED,MAAMC,SAA8B,GAAG;EACrChB,UAAU,EAAE,oBAAoB;EAChCE,OAAO,EAAE,SAAS;EAClBC,YAAY,EAAE,KAAK;EACnBC,QAAQ,EAAE,MAAM;EAChBa,UAAU,EAAE;AACd,CAAC;AAED,MAAMC,UAA+B,GAAG;EACtCd,QAAQ,EAAE,MAAM;EAChBe,OAAO,EAAE;AACX,CAAC;AAED,OAAO,MAAMC,eAA+C,GAAGA,CAC7D;EAAEC;AAAQ,CAAC,KACR;EACH,IAAI,CAACA,OAAO,EAAE;IACZ,OAAO,IAAI;EACb;EAEA,oBACE3B,KAAA,CAAA4B,aAAA;IAAKC,KAAK,EAAE5B;EAAa,gBACvBD,KAAA,CAAA4B,aAAA;IAAKC,KAAK,EAAEX;EAAgB,gBAC1BlB,KAAA,CAAA4B,aAAA;IACEE,KAAK,EAAC,IAAI;IACVC,MAAM,EAAC,IAAI;IACXC,OAAO,EAAC,WAAW;IACnBC,IAAI,EAAC,MAAM;IACXC,KAAK,EAAC;EAA4B,gBAElClC,KAAA,CAAA4B,aAAA;IACEO,CAAC,EAAC,sEAAsE;IACxEC,MAAM,EAAC,OAAO;IACdC,WAAW,EAAC,KAAK;IACjBJ,IAAI,EAAC;EAAuB,CAC7B,CACE,CAAC,eACNjC,KAAA,CAAA4B,aAAA,eAAM,gDAAoD,CAAC,eAC3D5B,KAAA,CAAA4B,aAAA;IAAKC,KAAK,EAAEP;EAAU,GAAC,KAAQ,CAAC,eAChCtB,KAAA,CAAA4B,aAAA;IAAMC,KAAK,EAAEL;EAAW,GAAC,SAAa,CACnC,CACF,CAAC;AAEV,CAAC","ignoreList":[]}
@@ -0,0 +1,149 @@
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
+ import React, { useCallback, useMemo, useRef } from "react";
18
+ import { ComponentLabel } from "./ComponentLabel.js";
19
+ import { SelectionHighlight } from "./SelectionHighlight.js";
20
+ const FLASH_DURATION_MS = 500;
21
+ function GrabbedFlash({
22
+ bounds,
23
+ trigger
24
+ }) {
25
+ const previousTriggerRef = useRef(trigger);
26
+ const flashStateRef = useRef({
27
+ isVisible: false,
28
+ opacity: 0,
29
+ fadeTimer: null,
30
+ hideTimer: null
31
+ });
32
+ const subscribe = useCallback(onStoreChange => {
33
+ const state = flashStateRef.current;
34
+ if (trigger && !previousTriggerRef.current) {
35
+ if (state.fadeTimer) {
36
+ clearTimeout(state.fadeTimer);
37
+ }
38
+ if (state.hideTimer) {
39
+ clearTimeout(state.hideTimer);
40
+ }
41
+ state.isVisible = true;
42
+ state.opacity = 1;
43
+ state.fadeTimer = setTimeout(() => {
44
+ state.opacity = 0;
45
+ state.fadeTimer = null;
46
+ onStoreChange();
47
+ }, 50);
48
+ state.hideTimer = setTimeout(() => {
49
+ state.isVisible = false;
50
+ state.hideTimer = null;
51
+ onStoreChange();
52
+ }, FLASH_DURATION_MS);
53
+ onStoreChange();
54
+ }
55
+ previousTriggerRef.current = trigger;
56
+ return () => {
57
+ if (state.fadeTimer) {
58
+ clearTimeout(state.fadeTimer);
59
+ state.fadeTimer = null;
60
+ }
61
+ if (state.hideTimer) {
62
+ clearTimeout(state.hideTimer);
63
+ state.hideTimer = null;
64
+ }
65
+ };
66
+ }, [trigger]);
67
+ const getSnapshot = useCallback(() => {
68
+ return flashStateRef.current;
69
+ }, []);
70
+ const state = React.useSyncExternalStore(subscribe, getSnapshot, getSnapshot);
71
+ if (!state.isVisible || !bounds) {
72
+ return null;
73
+ }
74
+ return /*#__PURE__*/React.createElement("div", {
75
+ "data-osdk-devtools-ignore": true,
76
+ style: {
77
+ position: "fixed",
78
+ left: bounds.x,
79
+ top: bounds.y,
80
+ width: bounds.width,
81
+ height: bounds.height,
82
+ borderRadius: bounds.borderRadius,
83
+ transform: bounds.transform,
84
+ border: "3px solid #22c55e",
85
+ backgroundColor: "rgba(34, 197, 94, 0.2)",
86
+ pointerEvents: "none",
87
+ zIndex: 2147483645,
88
+ opacity: state.opacity,
89
+ transition: `opacity ${FLASH_DURATION_MS}ms ease-out`
90
+ }
91
+ });
92
+ }
93
+ const overlayContainerStyles = {
94
+ position: "fixed",
95
+ top: 0,
96
+ left: 0,
97
+ width: 0,
98
+ height: 0,
99
+ pointerEvents: "none",
100
+ zIndex: 2147483646
101
+ };
102
+ export function InspectorOverlay({
103
+ state,
104
+ eventHandlers,
105
+ animationOptions,
106
+ zIndex
107
+ }) {
108
+ const {
109
+ mode,
110
+ selectionBounds,
111
+ inspectedComponent,
112
+ mouseX,
113
+ mouseY,
114
+ labelStatus
115
+ } = state;
116
+ const isFrozen = mode === "frozen";
117
+ const effectiveZIndex = zIndex ?? 2147483646;
118
+ const handleOpenSource = useCallback(sourceLocation => {
119
+ eventHandlers?.onOpenSource?.(sourceLocation);
120
+ }, [eventHandlers]);
121
+ const containerStyle = useMemo(() => ({
122
+ ...overlayContainerStyles,
123
+ zIndex: effectiveZIndex
124
+ }), [effectiveZIndex]);
125
+ if (!(mode !== "inactive")) {
126
+ return null;
127
+ }
128
+ return /*#__PURE__*/React.createElement("div", {
129
+ "data-osdk-devtools-ignore": true,
130
+ style: containerStyle
131
+ }, /*#__PURE__*/React.createElement(GrabbedFlash, {
132
+ bounds: selectionBounds,
133
+ trigger: isFrozen
134
+ }), /*#__PURE__*/React.createElement(SelectionHighlight, {
135
+ bounds: selectionBounds,
136
+ variant: isFrozen ? "frozen" : "hover",
137
+ animationOptions: animationOptions,
138
+ visible: !!selectionBounds
139
+ }), /*#__PURE__*/React.createElement(ComponentLabel, {
140
+ component: inspectedComponent,
141
+ bounds: selectionBounds,
142
+ mouseX: mouseX,
143
+ mouseY: mouseY,
144
+ status: labelStatus,
145
+ onOpenSource: handleOpenSource,
146
+ visible: !!inspectedComponent && !!selectionBounds
147
+ }));
148
+ }
149
+ //# sourceMappingURL=InspectorOverlay.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InspectorOverlay.js","names":["React","useCallback","useMemo","useRef","ComponentLabel","SelectionHighlight","FLASH_DURATION_MS","GrabbedFlash","bounds","trigger","previousTriggerRef","flashStateRef","isVisible","opacity","fadeTimer","hideTimer","subscribe","onStoreChange","state","current","clearTimeout","setTimeout","getSnapshot","useSyncExternalStore","createElement","style","position","left","x","top","y","width","height","borderRadius","transform","border","backgroundColor","pointerEvents","zIndex","transition","overlayContainerStyles","InspectorOverlay","eventHandlers","animationOptions","mode","selectionBounds","inspectedComponent","mouseX","mouseY","labelStatus","isFrozen","effectiveZIndex","handleOpenSource","sourceLocation","onOpenSource","containerStyle","variant","visible","component","status"],"sources":["InspectorOverlay.tsx"],"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 React, { useCallback, useMemo, useRef } from \"react\";\nimport type { SourceLocation } from \"../../fiber/types.js\";\nimport type { InspectorOverlayProps, OverlayBounds } from \"../types.js\";\nimport { ComponentLabel } from \"./ComponentLabel.js\";\nimport { SelectionHighlight } from \"./SelectionHighlight.js\";\n\nconst FLASH_DURATION_MS = 500;\n\ninterface GrabbedFlashProps {\n bounds: OverlayBounds | null;\n trigger: boolean;\n}\n\nfunction GrabbedFlash(\n { bounds, trigger }: GrabbedFlashProps,\n): React.ReactElement | null {\n const previousTriggerRef = useRef(trigger);\n const flashStateRef = useRef<{\n isVisible: boolean;\n opacity: number;\n fadeTimer: ReturnType<typeof setTimeout> | null;\n hideTimer: ReturnType<typeof setTimeout> | null;\n }>({ isVisible: false, opacity: 0, fadeTimer: null, hideTimer: null });\n\n const subscribe = useCallback((onStoreChange: () => void) => {\n const state = flashStateRef.current;\n\n if (trigger && !previousTriggerRef.current) {\n if (state.fadeTimer) {\n clearTimeout(state.fadeTimer);\n }\n if (state.hideTimer) {\n clearTimeout(state.hideTimer);\n }\n\n state.isVisible = true;\n state.opacity = 1;\n\n state.fadeTimer = setTimeout(() => {\n state.opacity = 0;\n state.fadeTimer = null;\n onStoreChange();\n }, 50);\n\n state.hideTimer = setTimeout(() => {\n state.isVisible = false;\n state.hideTimer = null;\n onStoreChange();\n }, FLASH_DURATION_MS);\n\n onStoreChange();\n }\n\n previousTriggerRef.current = trigger;\n\n return () => {\n if (state.fadeTimer) {\n clearTimeout(state.fadeTimer);\n state.fadeTimer = null;\n }\n if (state.hideTimer) {\n clearTimeout(state.hideTimer);\n state.hideTimer = null;\n }\n };\n }, [trigger]);\n\n const getSnapshot = useCallback(() => {\n return flashStateRef.current;\n }, []);\n\n const state = React.useSyncExternalStore(subscribe, getSnapshot, getSnapshot);\n\n if (!state.isVisible || !bounds) {\n return null;\n }\n\n return (\n <div\n data-osdk-devtools-ignore\n style={{\n position: \"fixed\",\n left: bounds.x,\n top: bounds.y,\n width: bounds.width,\n height: bounds.height,\n borderRadius: bounds.borderRadius,\n transform: bounds.transform,\n border: \"3px solid #22c55e\",\n backgroundColor: \"rgba(34, 197, 94, 0.2)\",\n pointerEvents: \"none\",\n zIndex: 2147483645,\n opacity: state.opacity,\n transition: `opacity ${FLASH_DURATION_MS}ms ease-out`,\n }}\n />\n );\n}\n\nconst overlayContainerStyles: React.CSSProperties = {\n position: \"fixed\",\n top: 0,\n left: 0,\n width: 0,\n height: 0,\n pointerEvents: \"none\",\n zIndex: 2147483646,\n};\n\nexport function InspectorOverlay({\n state,\n eventHandlers,\n animationOptions,\n zIndex,\n}: InspectorOverlayProps): React.ReactElement | null {\n const {\n mode,\n selectionBounds,\n inspectedComponent,\n mouseX,\n mouseY,\n labelStatus,\n } = state;\n\n const isActive = mode !== \"inactive\";\n const isFrozen = mode === \"frozen\";\n\n const effectiveZIndex = zIndex ?? 2147483646;\n\n const handleOpenSource = useCallback(\n (sourceLocation: SourceLocation) => {\n eventHandlers?.onOpenSource?.(sourceLocation);\n },\n [eventHandlers],\n );\n\n const containerStyle = useMemo(\n () => ({\n ...overlayContainerStyles,\n zIndex: effectiveZIndex,\n }),\n [effectiveZIndex],\n );\n\n if (!isActive) {\n return null;\n }\n\n return (\n <div data-osdk-devtools-ignore style={containerStyle}>\n <GrabbedFlash bounds={selectionBounds} trigger={isFrozen} />\n\n <SelectionHighlight\n bounds={selectionBounds}\n variant={isFrozen ? \"frozen\" : \"hover\"}\n animationOptions={animationOptions}\n visible={!!selectionBounds}\n />\n\n <ComponentLabel\n component={inspectedComponent}\n bounds={selectionBounds}\n mouseX={mouseX}\n mouseY={mouseY}\n status={labelStatus}\n onOpenSource={handleOpenSource}\n visible={!!inspectedComponent && !!selectionBounds}\n />\n </div>\n );\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAOA,KAAK,IAAIC,WAAW,EAAEC,OAAO,EAAEC,MAAM,QAAQ,OAAO;AAG3D,SAASC,cAAc,QAAQ,qBAAqB;AACpD,SAASC,kBAAkB,QAAQ,yBAAyB;AAE5D,MAAMC,iBAAiB,GAAG,GAAG;AAO7B,SAASC,YAAYA,CACnB;EAAEC,MAAM;EAAEC;AAA2B,CAAC,EACX;EAC3B,MAAMC,kBAAkB,GAAGP,MAAM,CAACM,OAAO,CAAC;EAC1C,MAAME,aAAa,GAAGR,MAAM,CAKzB;IAAES,SAAS,EAAE,KAAK;IAAEC,OAAO,EAAE,CAAC;IAAEC,SAAS,EAAE,IAAI;IAAEC,SAAS,EAAE;EAAK,CAAC,CAAC;EAEtE,MAAMC,SAAS,GAAGf,WAAW,CAAEgB,aAAyB,IAAK;IAC3D,MAAMC,KAAK,GAAGP,aAAa,CAACQ,OAAO;IAEnC,IAAIV,OAAO,IAAI,CAACC,kBAAkB,CAACS,OAAO,EAAE;MAC1C,IAAID,KAAK,CAACJ,SAAS,EAAE;QACnBM,YAAY,CAACF,KAAK,CAACJ,SAAS,CAAC;MAC/B;MACA,IAAII,KAAK,CAACH,SAAS,EAAE;QACnBK,YAAY,CAACF,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,EACF,CAACA,eAAe,CAClB,CAAC;EAED,IAAI,EApBaP,IAAI,KAAK,UAAU,CAoBvB,EAAE;IACb,OAAO,IAAI;EACb;EAEA,oBACE5C,KAAA,CAAAwB,aAAA;IAAK,iCAAyB;IAACC,KAAK,EAAE8B;EAAe,gBACnDvD,KAAA,CAAAwB,aAAA,CAACjB,YAAY;IAACC,MAAM,EAAEqC,eAAgB;IAACpC,OAAO,EAAEyC;EAAS,CAAE,CAAC,eAE5DlD,KAAA,CAAAwB,aAAA,CAACnB,kBAAkB;IACjBG,MAAM,EAAEqC,eAAgB;IACxBW,OAAO,EAAEN,QAAQ,GAAG,QAAQ,GAAG,OAAQ;IACvCP,gBAAgB,EAAEA,gBAAiB;IACnCc,OAAO,EAAE,CAAC,CAACZ;EAAgB,CAC5B,CAAC,eAEF7C,KAAA,CAAAwB,aAAA,CAACpB,cAAc;IACbsD,SAAS,EAAEZ,kBAAmB;IAC9BtC,MAAM,EAAEqC,eAAgB;IACxBE,MAAM,EAAEA,MAAO;IACfC,MAAM,EAAEA,MAAO;IACfW,MAAM,EAAEV,WAAY;IACpBK,YAAY,EAAEF,gBAAiB;IAC/BK,OAAO,EAAE,CAAC,CAACX,kBAAkB,IAAI,CAAC,CAACD;EAAgB,CACpD,CACE,CAAC;AAEV","ignoreList":[]}
@@ -0,0 +1,74 @@
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
+ import React from "react";
18
+ import { useAnimatedBounds } from "../hooks/useAnimatedBounds.js";
19
+ import { INTERPOLATION_FACTORS } from "../utils/interpolation.js";
20
+ const variantColors = {
21
+ hover: {
22
+ border: "rgba(59, 130, 246, 0.8)",
23
+ bg: "rgba(59, 130, 246, 0.1)"
24
+ },
25
+ selected: {
26
+ border: "rgba(34, 197, 94, 0.8)",
27
+ bg: "rgba(34, 197, 94, 0.15)"
28
+ },
29
+ frozen: {
30
+ border: "rgba(168, 85, 247, 0.8)",
31
+ bg: "rgba(168, 85, 247, 0.1)"
32
+ }
33
+ };
34
+ const baseStyles = {
35
+ position: "fixed",
36
+ pointerEvents: "none",
37
+ zIndex: 2147483646,
38
+ boxSizing: "border-box",
39
+ transition: "opacity 150ms ease-out"
40
+ };
41
+ export function SelectionHighlight({
42
+ bounds,
43
+ variant,
44
+ animationOptions,
45
+ visible
46
+ }) {
47
+ const colors = variantColors[variant];
48
+ const effectiveAnimationOptions = {
49
+ interpolationFactor: animationOptions?.interpolationFactor ?? INTERPOLATION_FACTORS.selection,
50
+ convergenceThreshold: animationOptions?.convergenceThreshold,
51
+ enabled: animationOptions?.enabled ?? true
52
+ };
53
+ const animatedBounds = useAnimatedBounds(bounds, effectiveAnimationOptions);
54
+ if (!animatedBounds || !visible) {
55
+ return null;
56
+ }
57
+ const style = {
58
+ ...baseStyles,
59
+ left: `${animatedBounds.x}px`,
60
+ top: `${animatedBounds.y}px`,
61
+ width: `${animatedBounds.width}px`,
62
+ height: `${animatedBounds.height}px`,
63
+ borderRadius: bounds?.borderRadius ?? "0px",
64
+ transform: bounds?.transform ?? "",
65
+ border: `2px solid ${colors.border}`,
66
+ backgroundColor: colors.bg,
67
+ opacity: visible ? 1 : 0
68
+ };
69
+ return /*#__PURE__*/React.createElement("div", {
70
+ "data-osdk-devtools-ignore": true,
71
+ style: style
72
+ });
73
+ }
74
+ //# sourceMappingURL=SelectionHighlight.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SelectionHighlight.js","names":["React","useAnimatedBounds","INTERPOLATION_FACTORS","variantColors","hover","border","bg","selected","frozen","baseStyles","position","pointerEvents","zIndex","boxSizing","transition","SelectionHighlight","bounds","variant","animationOptions","visible","colors","effectiveAnimationOptions","interpolationFactor","selection","convergenceThreshold","enabled","animatedBounds","style","left","x","top","y","width","height","borderRadius","transform","backgroundColor","opacity","createElement"],"sources":["SelectionHighlight.tsx"],"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 React from \"react\";\nimport { useAnimatedBounds } from \"../hooks/useAnimatedBounds.js\";\nimport type { HighlightVariant, SelectionHighlightProps } from \"../types.js\";\nimport { INTERPOLATION_FACTORS } from \"../utils/interpolation.js\";\n\nconst variantColors: Record<HighlightVariant, { border: string; bg: string }> =\n {\n hover: {\n border: \"rgba(59, 130, 246, 0.8)\",\n bg: \"rgba(59, 130, 246, 0.1)\",\n },\n selected: {\n border: \"rgba(34, 197, 94, 0.8)\",\n bg: \"rgba(34, 197, 94, 0.15)\",\n },\n frozen: {\n border: \"rgba(168, 85, 247, 0.8)\",\n bg: \"rgba(168, 85, 247, 0.1)\",\n },\n };\n\nconst baseStyles: React.CSSProperties = {\n position: \"fixed\",\n pointerEvents: \"none\",\n zIndex: 2147483646,\n boxSizing: \"border-box\",\n transition: \"opacity 150ms ease-out\",\n};\n\nexport function SelectionHighlight({\n bounds,\n variant,\n animationOptions,\n visible,\n}: SelectionHighlightProps): React.ReactElement | null {\n const colors = variantColors[variant];\n\n const effectiveAnimationOptions = {\n interpolationFactor: animationOptions?.interpolationFactor\n ?? INTERPOLATION_FACTORS.selection,\n convergenceThreshold: animationOptions?.convergenceThreshold,\n enabled: animationOptions?.enabled ?? true,\n };\n\n const animatedBounds = useAnimatedBounds(bounds, effectiveAnimationOptions);\n\n if (!animatedBounds || !visible) {\n return null;\n }\n\n const style: React.CSSProperties = {\n ...baseStyles,\n left: `${animatedBounds.x}px`,\n top: `${animatedBounds.y}px`,\n width: `${animatedBounds.width}px`,\n height: `${animatedBounds.height}px`,\n borderRadius: bounds?.borderRadius ?? \"0px\",\n transform: bounds?.transform ?? \"\",\n border: `2px solid ${colors.border}`,\n backgroundColor: colors.bg,\n opacity: visible ? 1 : 0,\n };\n\n return <div data-osdk-devtools-ignore style={style} />;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,iBAAiB,QAAQ,+BAA+B;AAEjE,SAASC,qBAAqB,QAAQ,2BAA2B;AAEjE,MAAMC,aAAuE,GAC3E;EACEC,KAAK,EAAE;IACLC,MAAM,EAAE,yBAAyB;IACjCC,EAAE,EAAE;EACN,CAAC;EACDC,QAAQ,EAAE;IACRF,MAAM,EAAE,wBAAwB;IAChCC,EAAE,EAAE;EACN,CAAC;EACDE,MAAM,EAAE;IACNH,MAAM,EAAE,yBAAyB;IACjCC,EAAE,EAAE;EACN;AACF,CAAC;AAEH,MAAMG,UAA+B,GAAG;EACtCC,QAAQ,EAAE,OAAO;EACjBC,aAAa,EAAE,MAAM;EACrBC,MAAM,EAAE,UAAU;EAClBC,SAAS,EAAE,YAAY;EACvBC,UAAU,EAAE;AACd,CAAC;AAED,OAAO,SAASC,kBAAkBA,CAAC;EACjCC,MAAM;EACNC,OAAO;EACPC,gBAAgB;EAChBC;AACuB,CAAC,EAA6B;EACrD,MAAMC,MAAM,GAAGjB,aAAa,CAACc,OAAO,CAAC;EAErC,MAAMI,yBAAyB,GAAG;IAChCC,mBAAmB,EAAEJ,gBAAgB,EAAEI,mBAAmB,IACrDpB,qBAAqB,CAACqB,SAAS;IACpCC,oBAAoB,EAAEN,gBAAgB,EAAEM,oBAAoB;IAC5DC,OAAO,EAAEP,gBAAgB,EAAEO,OAAO,IAAI;EACxC,CAAC;EAED,MAAMC,cAAc,GAAGzB,iBAAiB,CAACe,MAAM,EAAEK,yBAAyB,CAAC;EAE3E,IAAI,CAACK,cAAc,IAAI,CAACP,OAAO,EAAE;IAC/B,OAAO,IAAI;EACb;EAEA,MAAMQ,KAA0B,GAAG;IACjC,GAAGlB,UAAU;IACbmB,IAAI,EAAE,GAAGF,cAAc,CAACG,CAAC,IAAI;IAC7BC,GAAG,EAAE,GAAGJ,cAAc,CAACK,CAAC,IAAI;IAC5BC,KAAK,EAAE,GAAGN,cAAc,CAACM,KAAK,IAAI;IAClCC,MAAM,EAAE,GAAGP,cAAc,CAACO,MAAM,IAAI;IACpCC,YAAY,EAAElB,MAAM,EAAEkB,YAAY,IAAI,KAAK;IAC3CC,SAAS,EAAEnB,MAAM,EAAEmB,SAAS,IAAI,EAAE;IAClC9B,MAAM,EAAE,aAAae,MAAM,CAACf,MAAM,EAAE;IACpC+B,eAAe,EAAEhB,MAAM,CAACd,EAAE;IAC1B+B,OAAO,EAAElB,OAAO,GAAG,CAAC,GAAG;EACzB,CAAC;EAED,oBAAOnB,KAAA,CAAAsC,aAAA;IAAK,iCAAyB;IAACX,KAAK,EAAEA;EAAM,CAAE,CAAC;AACxD","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
+ import { ClickToInspectSystem } from "./ClickToInspectSystem.js";
18
+ export function createClickToInspect(options = {}) {
19
+ return new ClickToInspectSystem(options);
20
+ }
21
+ //# sourceMappingURL=createClickToInspect.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createClickToInspect.js","names":["ClickToInspectSystem","createClickToInspect","options"],"sources":["createClickToInspect.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 {\n type ClickToInspectOptions,\n ClickToInspectSystem,\n} from \"./ClickToInspectSystem.js\";\n\nexport type { ClickToInspectOptions } from \"./ClickToInspectSystem.js\";\n\nexport function createClickToInspect(\n options: ClickToInspectOptions = {},\n): ClickToInspectSystem {\n return new ClickToInspectSystem(options);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAEEA,oBAAoB,QACf,2BAA2B;AAIlC,OAAO,SAASC,oBAAoBA,CAClCC,OAA8B,GAAG,CAAC,CAAC,EACb;EACtB,OAAO,IAAIF,oBAAoB,CAACE,OAAO,CAAC;AAC1C","ignoreList":[]}