@pantheon-systems/puck-css 0.11.1 → 0.13.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.
- package/README.md +1 -1
- package/dist/agent/components/AgentActionButton.js +0 -13
- package/dist/agent/components/AgentActionButton.js.map +1 -1
- package/dist/agent/components/AgentActionModal.js +0 -13
- package/dist/agent/components/AgentActionModal.js.map +1 -1
- package/dist/agent/components/AgentStatusPanel.js +0 -10
- package/dist/agent/components/AgentStatusPanel.js.map +1 -1
- package/dist/agent/components/index.js +0 -5
- package/dist/agent/components/index.js.map +1 -1
- package/dist/agent/useAgentEdit.js +0 -12
- package/dist/agent/useAgentEdit.js.map +1 -1
- package/dist/agent/useAgentTrigger.js +0 -29
- package/dist/agent/useAgentTrigger.js.map +1 -1
- package/dist/auth/P1AuthProvider.d.ts +9 -2
- package/dist/auth/P1AuthProvider.d.ts.map +1 -1
- package/dist/auth/P1AuthProvider.js +21 -44
- package/dist/auth/P1AuthProvider.js.map +1 -1
- package/dist/auth/P1LoginPage.js +0 -18
- package/dist/auth/P1LoginPage.js.map +1 -1
- package/dist/auth/index.d.ts +2 -0
- package/dist/auth/index.d.ts.map +1 -1
- package/dist/auth/index.js +1 -9
- package/dist/auth/index.js.map +1 -1
- package/dist/auth/logout.d.ts +23 -0
- package/dist/auth/logout.d.ts.map +1 -0
- package/dist/auth/logout.js +14 -0
- package/dist/auth/logout.js.map +1 -0
- package/dist/auth/storage-keys.d.ts +5 -0
- package/dist/auth/storage-keys.d.ts.map +1 -0
- package/dist/auth/storage-keys.js +3 -0
- package/dist/auth/storage-keys.js.map +1 -0
- package/dist/collaboration/components/AgentActivityBanner.js +0 -15
- package/dist/collaboration/components/AgentActivityBanner.js.map +1 -1
- package/dist/collaboration/components/CollaboratorAvatars.js +0 -17
- package/dist/collaboration/components/CollaboratorAvatars.js.map +1 -1
- package/dist/collaboration/components/FocusRegionHighlight.js +0 -9
- package/dist/collaboration/components/FocusRegionHighlight.js.map +1 -1
- package/dist/collaboration/components/PresenceIndicator.js +0 -9
- package/dist/collaboration/components/PresenceIndicator.js.map +1 -1
- package/dist/collaboration/useBranchPresence.js +0 -36
- package/dist/collaboration/useBranchPresence.js.map +1 -1
- package/dist/collaboration/useFocusRegionReporting.js +0 -75
- package/dist/collaboration/useFocusRegionReporting.js.map +1 -1
- package/dist/collaboration/usePresence.js +0 -37
- package/dist/collaboration/usePresence.js.map +1 -1
- package/dist/collaboration/useSitePresence.js +0 -36
- package/dist/collaboration/useSitePresence.js.map +1 -1
- package/dist/collaboration/utils/avatarColor.js +0 -3
- package/dist/collaboration/utils/avatarColor.js.map +1 -1
- package/dist/collaboration/utils/focusHighlightConfig.js +0 -61
- package/dist/collaboration/utils/focusHighlightConfig.js.map +1 -1
- package/dist/collaboration/utils/focusRegionMap.js +1 -80
- package/dist/collaboration/utils/focusRegionMap.js.map +1 -1
- package/dist/collaboration/utils/initials.js +0 -14
- package/dist/collaboration/utils/initials.js.map +1 -1
- package/dist/collaboration/utils/presenceIdentity.js +0 -26
- package/dist/collaboration/utils/presenceIdentity.js.map +1 -1
- package/dist/core/FocusHighlightContext.js +0 -31
- package/dist/core/FocusHighlightContext.js.map +1 -1
- package/dist/core/NotificationContext.js +2 -67
- package/dist/core/NotificationContext.js.map +1 -1
- package/dist/core/P1PuckContext.js +0 -31
- package/dist/core/P1PuckContext.js.map +1 -1
- package/dist/core/PresenceContext.js +0 -18
- package/dist/core/PresenceContext.js.map +1 -1
- package/dist/core/config.d.ts +9 -0
- package/dist/core/config.d.ts.map +1 -1
- package/dist/core/config.js +6 -2
- package/dist/core/config.js.map +1 -1
- package/dist/core/featureConfig.js +0 -32
- package/dist/core/featureConfig.js.map +1 -1
- package/dist/core/types.d.ts +18 -5
- package/dist/core/types.d.ts.map +1 -1
- package/dist/core/types.js +0 -3
- package/dist/core/types.js.map +1 -1
- package/dist/core/utils/debounce.js +0 -18
- package/dist/core/utils/debounce.js.map +1 -1
- package/dist/core/utils/requestError.d.ts +7 -0
- package/dist/core/utils/requestError.d.ts.map +1 -0
- package/dist/core/utils/requestError.js +7 -0
- package/dist/core/utils/requestError.js.map +1 -0
- package/dist/core/utils/retry.js +0 -31
- package/dist/core/utils/retry.js.map +1 -1
- package/dist/core/utils/throttle.js +0 -24
- package/dist/core/utils/throttle.js.map +1 -1
- package/dist/data/cross-reference-resolve.js +0 -6
- package/dist/data/cross-reference-resolve.js.map +1 -1
- package/dist/data/cross-reference.js +0 -15
- package/dist/data/cross-reference.js.map +1 -1
- package/dist/data/css-queries/css-query-registry.d.ts +2 -2
- package/dist/data/css-queries/css-query-registry.js +1 -1
- package/dist/data/css-queries/css-query-registry.js.map +1 -1
- package/dist/data/dal/index.js +0 -21
- package/dist/data/dal/index.js.map +1 -1
- package/dist/data/dal/init.d.ts.map +1 -1
- package/dist/data/dal/init.js +4 -39
- package/dist/data/dal/init.js.map +1 -1
- package/dist/data/dal/p1-store.d.ts +1 -1
- package/dist/data/dal/p1-store.d.ts.map +1 -1
- package/dist/data/dal/p1-store.js +50 -38
- package/dist/data/dal/p1-store.js.map +1 -1
- package/dist/data/data-list-block/create-data-list-block.js +0 -7
- package/dist/data/data-list-block/create-data-list-block.js.map +1 -1
- package/dist/data/data-list-block/utils.js +0 -1
- package/dist/data/data-list-block/utils.js.map +1 -1
- package/dist/data/fields/pds-field-helpers.js +1 -4
- package/dist/data/fields/pds-field-helpers.js.map +1 -1
- package/dist/data/fields/visible-when.js +0 -5
- package/dist/data/fields/visible-when.js.map +1 -1
- package/dist/data/fields.d.ts.map +1 -1
- package/dist/data/fields.js +1 -3
- package/dist/data/fields.js.map +1 -1
- package/dist/data/get-page.js +0 -1
- package/dist/data/get-page.js.map +1 -1
- package/dist/data/page-editor-meta.js +0 -7
- package/dist/data/page-editor-meta.js.map +1 -1
- package/dist/data/page-store.js +0 -32
- package/dist/data/page-store.js.map +1 -1
- package/dist/data/page-structure.js +0 -3
- package/dist/data/page-structure.js.map +1 -1
- package/dist/data/paths.js +0 -16
- package/dist/data/paths.js.map +1 -1
- package/dist/data/remote-datasources/fetch-http-json.js +0 -5
- package/dist/data/remote-datasources/fetch-http-json.js.map +1 -1
- package/dist/data/remote-datasources/loader.js +0 -21
- package/dist/data/remote-datasources/loader.js.map +1 -1
- package/dist/data/remote-datasources/remote-datasource-registry.js +0 -4
- package/dist/data/remote-datasources/remote-datasource-registry.js.map +1 -1
- package/dist/data/resolve-data-templates.js +0 -24
- package/dist/data/resolve-data-templates.js.map +1 -1
- package/dist/data/route-templates.js +0 -29
- package/dist/data/route-templates.js.map +1 -1
- package/dist/data/semantic-ops.js +0 -11
- package/dist/data/semantic-ops.js.map +1 -1
- package/dist/data/styles.js +0 -2
- package/dist/data/styles.js.map +1 -1
- package/dist/data/template-autocomplete.js +0 -8
- package/dist/data/template-autocomplete.js.map +1 -1
- package/dist/data/utils.d.ts +2 -0
- package/dist/data/utils.d.ts.map +1 -1
- package/dist/data/utils.js +3 -1
- package/dist/data/utils.js.map +1 -1
- package/dist/editor/P1App.d.ts.map +1 -1
- package/dist/editor/P1App.js +6 -45
- package/dist/editor/P1App.js.map +1 -1
- package/dist/editor/P1PuckProvider.d.ts +1 -1
- package/dist/editor/P1PuckProvider.d.ts.map +1 -1
- package/dist/editor/P1PuckProvider.js +63 -548
- package/dist/editor/P1PuckProvider.js.map +1 -1
- package/dist/editor/aiPanelStore.js +0 -7
- package/dist/editor/aiPanelStore.js.map +1 -1
- package/dist/editor/components/BranchSelector.js +0 -21
- package/dist/editor/components/BranchSelector.js.map +1 -1
- package/dist/editor/components/CollapsibleSectionHeader.js +1 -4
- package/dist/editor/components/CollapsibleSectionHeader.js.map +1 -1
- package/dist/editor/components/DraggableRow.js +0 -1
- package/dist/editor/components/DraggableRow.js.map +1 -1
- package/dist/editor/components/EditorReloadOverlay.d.ts +16 -0
- package/dist/editor/components/EditorReloadOverlay.d.ts.map +1 -0
- package/dist/editor/components/EditorReloadOverlay.js +13 -0
- package/dist/editor/components/EditorReloadOverlay.js.map +1 -0
- package/dist/editor/components/NotificationContainer.js +0 -20
- package/dist/editor/components/NotificationContainer.js.map +1 -1
- package/dist/editor/components/OutlinePanel.js +1 -12
- package/dist/editor/components/OutlinePanel.js.map +1 -1
- package/dist/editor/components/P1InspectorFields.d.ts.map +1 -1
- package/dist/editor/components/P1InspectorFields.js +12 -14
- package/dist/editor/components/P1InspectorFields.js.map +1 -1
- package/dist/editor/components/P1TemplateFields.js +6 -12
- package/dist/editor/components/P1TemplateFields.js.map +1 -1
- package/dist/editor/components/PanelHeader.d.ts.map +1 -1
- package/dist/editor/components/PanelHeader.js +3 -2
- package/dist/editor/components/PanelHeader.js.map +1 -1
- package/dist/editor/components/PublishButton.js +0 -21
- package/dist/editor/components/PublishButton.js.map +1 -1
- package/dist/editor/components/PuckDataCapture.js +0 -14
- package/dist/editor/components/PuckDataCapture.js.map +1 -1
- package/dist/editor/components/PuckDataSynchronizer.js +0 -67
- package/dist/editor/components/PuckDataSynchronizer.js.map +1 -1
- package/dist/editor/components/PuckSelectionTracker.js +0 -62
- package/dist/editor/components/PuckSelectionTracker.js.map +1 -1
- package/dist/editor/components/SaveIndicator.js +0 -41
- package/dist/editor/components/SaveIndicator.js.map +1 -1
- package/dist/editor/components/Toast.js +1 -32
- package/dist/editor/components/Toast.js.map +1 -1
- package/dist/editor/components/VersionBannerOverride.js +2 -14
- package/dist/editor/components/VersionBannerOverride.js.map +1 -1
- package/dist/editor/components/collapsibleSectionContext.js +0 -10
- package/dist/editor/components/collapsibleSectionContext.js.map +1 -1
- package/dist/editor/components/componentIconName.js +0 -23
- package/dist/editor/components/componentIconName.js.map +1 -1
- package/dist/editor/components/connectable.js +0 -5
- package/dist/editor/components/connectable.js.map +1 -1
- package/dist/editor/components/merge-preview/MergePreviewRenderer.js +2 -74
- package/dist/editor/components/merge-preview/MergePreviewRenderer.js.map +1 -1
- package/dist/editor/components/merge-preview/ScaledContent.js +0 -6
- package/dist/editor/components/merge-preview/ScaledContent.js.map +1 -1
- package/dist/editor/components/merge-preview/index.js +0 -5
- package/dist/editor/components/merge-preview/index.js.map +1 -1
- package/dist/editor/components/outlineTree.js +0 -31
- package/dist/editor/components/outlineTree.js.map +1 -1
- package/dist/editor/components/useDragReorder.js +0 -1
- package/dist/editor/components/useDragReorder.js.map +1 -1
- package/dist/editor/defaultPlugins.d.ts +1 -1
- package/dist/editor/defaultPlugins.js +1 -1
- package/dist/editor/logout-store.d.ts +13 -0
- package/dist/editor/logout-store.d.ts.map +1 -0
- package/dist/editor/logout-store.js +23 -0
- package/dist/editor/logout-store.js.map +1 -0
- package/dist/editor/plugin/P1Plugin.d.ts +6 -3
- package/dist/editor/plugin/P1Plugin.d.ts.map +1 -1
- package/dist/editor/plugin/P1Plugin.js +20 -170
- package/dist/editor/plugin/P1Plugin.js.map +1 -1
- package/dist/editor/plugin/context-sync-key.js +0 -19
- package/dist/editor/plugin/context-sync-key.js.map +1 -1
- package/dist/editor/plugin/createP1Overrides.js +1 -49
- package/dist/editor/plugin/createP1Overrides.js.map +1 -1
- package/dist/editor/plugin/document-sync-plugin.js +0 -50
- package/dist/editor/plugin/document-sync-plugin.js.map +1 -1
- package/dist/editor/plugin/fieldGuidance.js +0 -5
- package/dist/editor/plugin/fieldGuidance.js.map +1 -1
- package/dist/editor/plugin/index.js +0 -6
- package/dist/editor/plugin/index.js.map +1 -1
- package/dist/editor/plugin/selectHeaderCollaborators.js +0 -8
- package/dist/editor/plugin/selectHeaderCollaborators.js.map +1 -1
- package/dist/editor/presets.js +2 -2
- package/dist/editor/thumbnails/LiveThumbnail.js +1 -49
- package/dist/editor/thumbnails/LiveThumbnail.js.map +1 -1
- package/dist/editor/thumbnails/ThumbnailCard.js +0 -25
- package/dist/editor/thumbnails/ThumbnailCard.js.map +1 -1
- package/dist/editor/thumbnails/buildLiveThumbnailDrawer.js +0 -21
- package/dist/editor/thumbnails/buildLiveThumbnailDrawer.js.map +1 -1
- package/dist/editor/thumbnails/humanizeComponentName.js +0 -17
- package/dist/editor/thumbnails/humanizeComponentName.js.map +1 -1
- package/dist/editor/thumbnails/resolveLiveThumbnailDrawer.js +0 -11
- package/dist/editor/thumbnails/resolveLiveThumbnailDrawer.js.map +1 -1
- package/dist/editor/thumbnails/thumbnailCache.js +0 -38
- package/dist/editor/thumbnails/thumbnailCache.js.map +1 -1
- package/dist/editor/useAutoSave.js +0 -32
- package/dist/editor/useAutoSave.js.map +1 -1
- package/dist/editor/useBranches.js +0 -30
- package/dist/editor/useBranches.js.map +1 -1
- package/dist/editor/useComponentRegistry.d.ts +1 -1
- package/dist/editor/useComponentRegistry.js +0 -28
- package/dist/editor/useComponentRegistry.js.map +1 -1
- package/dist/editor/useDocuments.js +0 -51
- package/dist/editor/useDocuments.js.map +1 -1
- package/dist/editor/useMergePreview.js +8 -12
- package/dist/editor/useMergePreview.js.map +1 -1
- package/dist/editor/useP1Editor.d.ts +27 -7
- package/dist/editor/useP1Editor.d.ts.map +1 -1
- package/dist/editor/useP1Editor.js +107 -233
- package/dist/editor/useP1Editor.js.map +1 -1
- package/dist/editor/useP1Overrides.js +15 -50
- package/dist/editor/useP1Overrides.js.map +1 -1
- package/dist/editor/useP1Plugin.d.ts +7 -3
- package/dist/editor/useP1Plugin.d.ts.map +1 -1
- package/dist/editor/useP1Plugin.js +28 -56
- package/dist/editor/useP1Plugin.js.map +1 -1
- package/dist/editor/useRealtime.d.ts +15 -3
- package/dist/editor/useRealtime.d.ts.map +1 -1
- package/dist/editor/useRealtime.js +12 -91
- package/dist/editor/useRealtime.js.map +1 -1
- package/dist/editor/useResponsivePanels.js +2 -35
- package/dist/editor/useResponsivePanels.js.map +1 -1
- package/dist/editor/useSidebarScrollPreservation.js +0 -14
- package/dist/editor/useSidebarScrollPreservation.js.map +1 -1
- package/dist/editor/utils/buildThumbnailOverride.js +0 -9
- package/dist/editor/utils/buildThumbnailOverride.js.map +1 -1
- package/dist/editor/utils/componentRegistry.d.ts +6 -11
- package/dist/editor/utils/componentRegistry.d.ts.map +1 -1
- package/dist/editor/utils/componentRegistry.js +1 -71
- package/dist/editor/utils/componentRegistry.js.map +1 -1
- package/dist/editor/utils/createStablePluginArray.js +0 -27
- package/dist/editor/utils/createStablePluginArray.js.map +1 -1
- package/dist/editor/utils/path.js +0 -6
- package/dist/editor/utils/path.js.map +1 -1
- package/dist/editor/utils/puckYjsBinding.d.ts +1 -1
- package/dist/editor/utils/puckYjsBinding.js +0 -99
- package/dist/editor/utils/puckYjsBinding.js.map +1 -1
- package/dist/editor/utils/restoreDocumentVersion.js +0 -12
- package/dist/editor/utils/restoreDocumentVersion.js.map +1 -1
- package/dist/editor/utils/sanitizeRichtextDefaults.js +0 -26
- package/dist/editor/utils/sanitizeRichtextDefaults.js.map +1 -1
- package/dist/editor/utils/snapshotToPuckData.js +0 -8
- package/dist/editor/utils/snapshotToPuckData.js.map +1 -1
- package/dist/editor/utils/syncComponentRegistry.d.ts +2 -2
- package/dist/editor/utils/syncComponentRegistry.js +1 -76
- package/dist/editor/utils/syncComponentRegistry.js.map +1 -1
- package/dist/editor/utils/syncComponentRegistryWriteOnly.d.ts +7 -7
- package/dist/editor/utils/syncComponentRegistryWriteOnly.js +0 -22
- package/dist/editor/utils/syncComponentRegistryWriteOnly.js.map +1 -1
- package/dist/editor/utils/templatePath.js +0 -5
- package/dist/editor/utils/templatePath.js.map +1 -1
- package/dist/features/content-type-templates/editor/useTemplatePermissions.js +0 -3
- package/dist/features/content-type-templates/editor/useTemplatePermissions.js.map +1 -1
- package/dist/features/content-type-templates/hooks/useTemplateList.d.ts.map +1 -1
- package/dist/features/content-type-templates/hooks/useTemplateList.js +1 -29
- package/dist/features/content-type-templates/hooks/useTemplateList.js.map +1 -1
- package/dist/features/content-type-templates/index.js +0 -8
- package/dist/features/content-type-templates/index.js.map +1 -1
- package/dist/features/content-type-templates/permissions/createPuckPermissions.js +1 -43
- package/dist/features/content-type-templates/permissions/createPuckPermissions.js.map +1 -1
- package/dist/features/content-type-templates/permissions/role-permissions.d.ts +1 -0
- package/dist/features/content-type-templates/permissions/role-permissions.d.ts.map +1 -1
- package/dist/features/content-type-templates/permissions/role-permissions.js +1 -28
- package/dist/features/content-type-templates/permissions/role-permissions.js.map +1 -1
- package/dist/features/content-type-templates/permissions/useContentRole.js +0 -24
- package/dist/features/content-type-templates/permissions/useContentRole.js.map +1 -1
- package/dist/features/content-type-templates/permissions/useResolveContentRole.d.ts +5 -5
- package/dist/features/content-type-templates/permissions/useResolveContentRole.js +2 -22
- package/dist/features/content-type-templates/permissions/useResolveContentRole.js.map +1 -1
- package/dist/features/content-type-templates/stores/index.js +0 -5
- package/dist/features/content-type-templates/stores/index.js.map +1 -1
- package/dist/features/content-type-templates/stores/template-store-api.js +0 -14
- package/dist/features/content-type-templates/stores/template-store-api.js.map +1 -1
- package/dist/features/content-type-templates/stores/template-store.d.ts +1 -1
- package/dist/features/content-type-templates/stores/template-store.js +0 -12
- package/dist/features/content-type-templates/stores/template-store.js.map +1 -1
- package/dist/features/content-type-templates/types.d.ts +2 -1
- package/dist/features/content-type-templates/types.d.ts.map +1 -1
- package/dist/features/content-type-templates/types.js +0 -5
- package/dist/features/content-type-templates/types.js.map +1 -1
- package/dist/features/content-type-templates/ui/ActionBarPinButton.js +12 -21
- package/dist/features/content-type-templates/ui/ActionBarPinButton.js.map +1 -1
- package/dist/features/content-type-templates/ui/TemplateDetailsPanel.js +0 -23
- package/dist/features/content-type-templates/ui/TemplateDetailsPanel.js.map +1 -1
- package/dist/features/content-type-templates/ui/TemplateSelector.js +0 -19
- package/dist/features/content-type-templates/ui/TemplateSelector.js.map +1 -1
- package/dist/features/content-type-templates/validation/structural-validation.js +0 -40
- package/dist/features/content-type-templates/validation/structural-validation.js.map +1 -1
- package/dist/index.d.ts +6 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -43
- package/dist/index.js.map +1 -1
- package/dist/merge/components/conflict-notifications/ConflictNotificationToast.js +0 -19
- package/dist/merge/components/conflict-notifications/ConflictNotificationToast.js.map +1 -1
- package/dist/merge/components/conflict-notifications/index.js +0 -5
- package/dist/merge/components/conflict-notifications/index.js.map +1 -1
- package/dist/merge/components/conflict-notifications/useConflictNotifications.js +0 -48
- package/dist/merge/components/conflict-notifications/useConflictNotifications.js.map +1 -1
- package/dist/merge/components/conflict-resolution/ComponentConflictGroup.js +0 -36
- package/dist/merge/components/conflict-resolution/ComponentConflictGroup.js.map +1 -1
- package/dist/merge/components/conflict-resolution/PuckFieldResolutionPanel.js +0 -40
- package/dist/merge/components/conflict-resolution/PuckFieldResolutionPanel.js.map +1 -1
- package/dist/merge/components/conflict-resolution/RenderedResolutionPreview.js +0 -21
- package/dist/merge/components/conflict-resolution/RenderedResolutionPreview.js.map +1 -1
- package/dist/merge/components/conflict-resolution/index.js +0 -5
- package/dist/merge/components/conflict-resolution/index.js.map +1 -1
- package/dist/merge/components/merge-resolution/CherryPickVisualPanel.js +0 -44
- package/dist/merge/components/merge-resolution/CherryPickVisualPanel.js.map +1 -1
- package/dist/merge/components/merge-resolution/ComponentClickOverlay.js +0 -24
- package/dist/merge/components/merge-resolution/ComponentClickOverlay.js.map +1 -1
- package/dist/merge/components/merge-resolution/DocumentResolutionDetail.d.ts.map +1 -1
- package/dist/merge/components/merge-resolution/DocumentResolutionDetail.js +6 -31
- package/dist/merge/components/merge-resolution/DocumentResolutionDetail.js.map +1 -1
- package/dist/merge/components/merge-resolution/index.js +0 -3
- package/dist/merge/components/merge-resolution/index.js.map +1 -1
- package/dist/merge/useMergeResolution.d.ts +1 -1
- package/dist/merge/useMergeResolution.d.ts.map +1 -1
- package/dist/merge/useMergeResolution.js +6 -75
- package/dist/merge/useMergeResolution.js.map +1 -1
- package/dist/merge/utils/namespacePuckData.d.ts.map +1 -1
- package/dist/merge/utils/namespacePuckData.js +8 -8
- package/dist/merge/utils/namespacePuckData.js.map +1 -1
- package/dist/merge/utils/puckFieldClassifier.js +0 -183
- package/dist/merge/utils/puckFieldClassifier.js.map +1 -1
- package/dist/p1/editor/connect/connect-preview-config.js +0 -5
- package/dist/p1/editor/connect/connect-preview-config.js.map +1 -1
- package/dist/p1/editor/connect/field-connect-plugin.d.ts +8 -2
- package/dist/p1/editor/connect/field-connect-plugin.d.ts.map +1 -1
- package/dist/p1/editor/connect/field-connect-plugin.js +6 -2
- package/dist/p1/editor/connect/field-connect-plugin.js.map +1 -1
- package/dist/p1/editor/editor-preview-resolve.js +0 -13
- package/dist/p1/editor/editor-preview-resolve.js.map +1 -1
- package/dist/p1/editor/hooks/api-hooks.js +0 -7
- package/dist/p1/editor/hooks/api-hooks.js.map +1 -1
- package/dist/p1/editor/hooks/index.d.ts +1 -0
- package/dist/p1/editor/hooks/index.d.ts.map +1 -1
- package/dist/p1/editor/hooks/index.js +1 -0
- package/dist/p1/editor/hooks/index.js.map +1 -1
- package/dist/p1/editor/hooks/useLiveEditorContext.d.ts +24 -0
- package/dist/p1/editor/hooks/useLiveEditorContext.d.ts.map +1 -0
- package/dist/p1/editor/hooks/useLiveEditorContext.js +24 -0
- package/dist/p1/editor/hooks/useLiveEditorContext.js.map +1 -0
- package/dist/p1/editor/hooks/useLiveRemoteDatasources.d.ts +11 -7
- package/dist/p1/editor/hooks/useLiveRemoteDatasources.d.ts.map +1 -1
- package/dist/p1/editor/hooks/useLiveRemoteDatasources.js +4 -35
- package/dist/p1/editor/hooks/useLiveRemoteDatasources.js.map +1 -1
- package/dist/p1/editor/hooks/useP1Plugins.d.ts +5 -0
- package/dist/p1/editor/hooks/useP1Plugins.d.ts.map +1 -1
- package/dist/p1/editor/hooks/useP1Plugins.js +5 -18
- package/dist/p1/editor/hooks/useP1Plugins.js.map +1 -1
- package/dist/p1/editor/remote-datasources/remote-datasource-explorer-plugin.js +0 -7
- package/dist/p1/editor/remote-datasources/remote-datasource-explorer-plugin.js.map +1 -1
- package/dist/p1/editor/template-autocomplete-layer.js +0 -4
- package/dist/p1/editor/template-autocomplete-layer.js.map +1 -1
- package/dist/pds/components/AgentChip.js +0 -3
- package/dist/pds/components/AgentChip.js.map +1 -1
- package/dist/pds/components/CreatePageModal.js +1 -97
- package/dist/pds/components/CreatePageModal.js.map +1 -1
- package/dist/pds/components/LoadingMessage.d.ts.map +1 -1
- package/dist/pds/components/LoadingMessage.js +2 -1
- package/dist/pds/components/LoadingMessage.js.map +1 -1
- package/dist/pds/components/LoadingMessage.module.css +2 -21
- package/dist/pds/components/LoadingOverlay.d.ts +17 -0
- package/dist/pds/components/LoadingOverlay.d.ts.map +1 -0
- package/dist/pds/components/LoadingOverlay.js +7 -0
- package/dist/pds/components/LoadingOverlay.js.map +1 -0
- package/dist/pds/components/LoadingOverlay.module.css +28 -0
- package/dist/pds/components/P1EditorHeader.d.ts +9 -2
- package/dist/pds/components/P1EditorHeader.d.ts.map +1 -1
- package/dist/pds/components/P1EditorHeader.js +6 -26
- package/dist/pds/components/P1EditorHeader.js.map +1 -1
- package/dist/pds/components/P1EditorHeader.module.css +26 -0
- package/dist/pds/components/PageNavigator.js +0 -16
- package/dist/pds/components/PageNavigator.js.map +1 -1
- package/dist/pds/components/PresenceStack.js +0 -9
- package/dist/pds/components/PresenceStack.js.map +1 -1
- package/dist/pds/components/PublishControl.js +0 -6
- package/dist/pds/components/PublishControl.js.map +1 -1
- package/dist/pds/components/WorkstreamSwitcher.js +1 -25
- package/dist/pds/components/WorkstreamSwitcher.js.map +1 -1
- package/dist/pds/index.d.ts +2 -0
- package/dist/pds/index.d.ts.map +1 -1
- package/dist/pds/index.js +1 -29
- package/dist/pds/index.js.map +1 -1
- package/dist/pds/theme/pds-core-content.js +0 -5
- package/dist/pds/theme/pds-core-content.js.map +1 -1
- package/dist/pds/utils/deriveDocState.js +0 -1
- package/dist/pds/utils/deriveDocState.js.map +1 -1
- package/dist/pds/utils/deriveLiveDocState.js +0 -13
- package/dist/pds/utils/deriveLiveDocState.js.map +1 -1
- package/dist/registry-sync.js +0 -4
- package/dist/registry-sync.js.map +1 -1
- package/dist/server.js +0 -7
- package/dist/server.js.map +1 -1
- package/dist/versioning/components/ReadOnlyFieldsGuard.js +0 -3
- package/dist/versioning/components/ReadOnlyFieldsGuard.js.map +1 -1
- package/dist/versioning/components/VersionBannerActions.js +0 -1
- package/dist/versioning/components/VersionBannerActions.js.map +1 -1
- package/dist/versioning/components/version-compare/BranchDiffHeader.js +0 -7
- package/dist/versioning/components/version-compare/BranchDiffHeader.js.map +1 -1
- package/dist/versioning/components/version-compare/BranchMergeCompare.js +0 -19
- package/dist/versioning/components/version-compare/BranchMergeCompare.js.map +1 -1
- package/dist/versioning/components/version-compare/ComponentNode.js +0 -8
- package/dist/versioning/components/version-compare/ComponentNode.js.map +1 -1
- package/dist/versioning/components/version-compare/ComponentTree.js +0 -10
- package/dist/versioning/components/version-compare/ComponentTree.js.map +1 -1
- package/dist/versioning/components/version-compare/DiffHeader.js +0 -3
- package/dist/versioning/components/version-compare/DiffHeader.js.map +1 -1
- package/dist/versioning/components/version-compare/DocumentDiffList.js +0 -14
- package/dist/versioning/components/version-compare/DocumentDiffList.js.map +1 -1
- package/dist/versioning/components/version-compare/PropDiffPanel.js +0 -7
- package/dist/versioning/components/version-compare/PropDiffPanel.js.map +1 -1
- package/dist/versioning/components/version-compare/PropDiffRow.js +0 -3
- package/dist/versioning/components/version-compare/PropDiffRow.js.map +1 -1
- package/dist/versioning/components/version-compare/PropValueDisplay.js +0 -22
- package/dist/versioning/components/version-compare/PropValueDisplay.js.map +1 -1
- package/dist/versioning/components/version-compare/VersionComparePage.js +0 -13
- package/dist/versioning/components/version-compare/VersionComparePage.js.map +1 -1
- package/dist/versioning/components/version-compare/VisualBranchCompare.js +0 -17
- package/dist/versioning/components/version-compare/VisualBranchCompare.js.map +1 -1
- package/dist/versioning/components/version-compare/VisualVersionCompare.js +0 -23
- package/dist/versioning/components/version-compare/VisualVersionCompare.js.map +1 -1
- package/dist/versioning/components/version-compare/index.js +0 -5
- package/dist/versioning/components/version-compare/index.js.map +1 -1
- package/dist/versioning/components/version-history/AgentCheckpointBadge.js +0 -14
- package/dist/versioning/components/version-history/AgentCheckpointBadge.js.map +1 -1
- package/dist/versioning/components/version-history/VersionItem.js +0 -7
- package/dist/versioning/components/version-history/VersionItem.js.map +1 -1
- package/dist/versioning/components/version-history/index.js +0 -5
- package/dist/versioning/components/version-history/index.js.map +1 -1
- package/dist/versioning/useCheckpoints.js +0 -28
- package/dist/versioning/useCheckpoints.js.map +1 -1
- package/dist/versioning/useVersions.js +0 -31
- package/dist/versioning/useVersions.js.map +1 -1
- package/dist/versioning/utils/branchDiff.js +0 -93
- package/dist/versioning/utils/branchDiff.js.map +1 -1
- package/dist/versioning/utils/diff.js +0 -79
- package/dist/versioning/utils/diff.js.map +1 -1
- package/dist/versioning/utils/formatVersionDate.js +0 -12
- package/dist/versioning/utils/formatVersionDate.js.map +1 -1
- package/dist/versioning/utils/highlightConfig.js +0 -42
- package/dist/versioning/utils/highlightConfig.js.map +1 -1
- package/dist/versioning/utils/versionKind.js +0 -10
- package/dist/versioning/utils/versionKind.js.map +1 -1
- package/package.json +7 -7
- package/src/pds/theme/PuckEditorTheme.css +23 -5
- package/src/styles.css +1 -1
- package/src/pds/theme/PuckEditorTheme.test.ts +0 -186
- package/src/pds/theme/pds-core-content.ts +0 -8
package/dist/auth/index.js
CHANGED
|
@@ -1,12 +1,4 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* P1 Auth module
|
|
3
|
-
*
|
|
4
|
-
* Reusable authentication components for P1-integrated React apps.
|
|
5
|
-
* Exports P1AuthProvider, useP1Auth, and P1LoginPage.
|
|
6
|
-
*
|
|
7
|
-
* For standalone apps, use P1LoginPage as a ready-made login screen.
|
|
8
|
-
* For embedded apps, use useP1Auth() to build your own login UI.
|
|
9
|
-
*/
|
|
10
1
|
export { P1AuthProvider, useP1Auth, useOptionalP1Auth, DEMO_USERS, P1_LOGGED_IN_KEY, } from './P1AuthProvider.js';
|
|
11
2
|
export { P1LoginPage } from './P1LoginPage.js';
|
|
3
|
+
export { performLogout } from './logout.js';
|
|
12
4
|
//# sourceMappingURL=index.js.map
|
package/dist/auth/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/auth/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/auth/index.ts"],"names":[],"mappings":"AAUA,OAAO,EACL,cAAc,EACd,SAAS,EACT,iBAAiB,EACjB,UAAU,EACV,gBAAgB,GACjB,MAAM,qBAAqB,CAAC;AAQ7B,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAG/C,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { LogoutOutcome } from '@pantheon-systems/css-client';
|
|
2
|
+
export type { LogoutOutcome };
|
|
3
|
+
export interface PerformLogoutConfig {
|
|
4
|
+
cssBaseUrl: string;
|
|
5
|
+
siteApiToken?: string;
|
|
6
|
+
/**
|
|
7
|
+
* The puck-css token key, matching P1AuthProvider's `tokenStorageKey` prop.
|
|
8
|
+
* Not the broker JWT key — css-client owns that one and resolves it itself.
|
|
9
|
+
*/
|
|
10
|
+
tokenStorageKey?: string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Canonical logout for P1 broker-mode apps. Owns the full sequence:
|
|
14
|
+
* 1. POST to the backend to obtain the Auth0 logout URL (token still present).
|
|
15
|
+
* 2. On success: clear broker token (inside brokerLogout) and puck-css keys.
|
|
16
|
+
* 3. Return the outcome — caller navigates on `signed_out`.
|
|
17
|
+
*
|
|
18
|
+
* On `error`, credentials are left intact so the caller can retry or fall back.
|
|
19
|
+
* Puck-css keys are cleared on `no_session` too — the broker session is gone,
|
|
20
|
+
* so local state should match.
|
|
21
|
+
*/
|
|
22
|
+
export declare function performLogout(config: PerformLogoutConfig): Promise<LogoutOutcome>;
|
|
23
|
+
//# sourceMappingURL=logout.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logout.d.ts","sourceRoot":"","sources":["../../src/auth/logout.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAGlE,YAAY,EAAE,aAAa,EAAE,CAAC;AAE9B,MAAM,WAAW,mBAAmB;IAClC,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED;;;;;;;;;GASG;AACH,wBAAsB,aAAa,CAAC,MAAM,EAAE,mBAAmB,GAAG,OAAO,CAAC,aAAa,CAAC,CAevF"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { brokerLogout } from '@pantheon-systems/css-client';
|
|
2
|
+
import { DEFAULT_TOKEN_KEY, P1_LOGGED_IN_KEY } from './storage-keys.js';
|
|
3
|
+
export async function performLogout(config) {
|
|
4
|
+
const { tokenStorageKey, ...brokerConfig } = config;
|
|
5
|
+
const outcome = await brokerLogout(brokerConfig);
|
|
6
|
+
if (outcome.status === 'signed_out' || outcome.status === 'no_session') {
|
|
7
|
+
if (typeof window !== 'undefined') {
|
|
8
|
+
window.localStorage.removeItem(tokenStorageKey ?? DEFAULT_TOKEN_KEY);
|
|
9
|
+
window.localStorage.removeItem(P1_LOGGED_IN_KEY);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
return outcome;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=logout.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logout.js","sourceRoot":"","sources":["../../src/auth/logout.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAE5D,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAwBxE,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,MAA2B;IAI7D,MAAM,EAAE,eAAe,EAAE,GAAG,YAAY,EAAE,GAAG,MAAM,CAAC;IACpD,MAAM,OAAO,GAAG,MAAM,YAAY,CAAC,YAAY,CAAC,CAAC;IAEjD,IAAI,OAAO,CAAC,MAAM,KAAK,YAAY,IAAI,OAAO,CAAC,MAAM,KAAK,YAAY,EAAE,CAAC;QACvE,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE,CAAC;YAClC,MAAM,CAAC,YAAY,CAAC,UAAU,CAAC,eAAe,IAAI,iBAAiB,CAAC,CAAC;YACrE,MAAM,CAAC,YAAY,CAAC,UAAU,CAAC,gBAAgB,CAAC,CAAC;QACnD,CAAC;IACH,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/** localStorage key holding the auth token, unless the consumer overrides it. */
|
|
2
|
+
export declare const DEFAULT_TOKEN_KEY = "p1_auth_token";
|
|
3
|
+
/** Set once a user is authenticated; read by host apps to show signed-in UI. */
|
|
4
|
+
export declare const P1_LOGGED_IN_KEY = "p1_logged_in";
|
|
5
|
+
//# sourceMappingURL=storage-keys.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"storage-keys.d.ts","sourceRoot":"","sources":["../../src/auth/storage-keys.ts"],"names":[],"mappings":"AAGA,iFAAiF;AACjF,eAAO,MAAM,iBAAiB,kBAAkB,CAAC;AAEjD,gFAAgF;AAChF,eAAO,MAAM,gBAAgB,iBAAiB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"storage-keys.js","sourceRoot":"","sources":["../../src/auth/storage-keys.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,MAAM,iBAAiB,GAAG,eAAe,CAAC;AAGjD,MAAM,CAAC,MAAM,gBAAgB,GAAG,cAAc,CAAC"}
|
|
@@ -1,16 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
/**
|
|
3
|
-
* AgentActivityBanner Component
|
|
4
|
-
*
|
|
5
|
-
* Banner shown when an agent is actively editing the document.
|
|
6
|
-
* Displays agent name, intent, and affected regions.
|
|
7
|
-
*/
|
|
8
2
|
import { useState } from 'react';
|
|
9
3
|
import { getAvatarColor } from '../utils/avatarColor.js';
|
|
10
4
|
const baseClass = 'css-puck-agent-banner';
|
|
11
|
-
/**
|
|
12
|
-
* Get initials from a name.
|
|
13
|
-
*/
|
|
14
5
|
function getInitials(name) {
|
|
15
6
|
return name
|
|
16
7
|
.split(' ')
|
|
@@ -18,17 +9,11 @@ function getInitials(name) {
|
|
|
18
9
|
.map((word) => word.charAt(0).toUpperCase())
|
|
19
10
|
.join('');
|
|
20
11
|
}
|
|
21
|
-
/**
|
|
22
|
-
* Banner shown when an agent is actively editing the document.
|
|
23
|
-
* Displays agent name, intent, and affected regions.
|
|
24
|
-
*/
|
|
25
12
|
export function AgentActivityBanner({ agent, showIdle = false, dismissible = false, onStopAgent, className, }) {
|
|
26
13
|
const [isDismissed, setIsDismissed] = useState(false);
|
|
27
|
-
// Don't show if agent is idle and showIdle is false
|
|
28
14
|
if (agent.state === 'idle' && !showIdle) {
|
|
29
15
|
return null;
|
|
30
16
|
}
|
|
31
|
-
// Don't show if dismissed
|
|
32
17
|
if (isDismissed) {
|
|
33
18
|
return null;
|
|
34
19
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AgentActivityBanner.js","sourceRoot":"","sources":["../../../src/collaboration/components/AgentActivityBanner.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"AgentActivityBanner.js","sourceRoot":"","sources":["../../../src/collaboration/components/AgentActivityBanner.tsx"],"names":[],"mappings":";AAOA,OAAc,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAExC,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAezD,MAAM,SAAS,GAAG,uBAAuB,CAAC;AAK1C,SAAS,WAAW,CAAC,IAAY;IAC/B,OAAO,I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,SAAS,YAAY,YAAG,WAAW,CAAC,KAAK,CAAC,IAAI,CAAC,GAAQ,EAC3E,eAAM,SAAS,EAAE,GAAG,SAAS,cAAc,iBAAc,MAAM,GAAG,IAC9D,EAEN,eAAK,SAAS,EAAE,GAAG,SAAS,QAAQ,aAClC,eAAM,SAAS,EAAE,GAAG,SAAS,QAAQ,YAAG,KAAK,CAAC,IAAI,GAAQ,EACzD,KAAK,CAAC,MAAM,IAAI,CACf,eAAM,SAAS,EAAE,GAAG,SAAS,UAAU,YAAG,KAAK,CAAC,MAAM,GAAQ,CAC/D,IACG,EAEL,KAAK,CAAC,YAAY,IAAI,KAAK,CAAC,YAAY,CAAC,MAAM,GAAG,CAAC,IAAI,CACtD,eAAK,SAAS,EAAE,GAAG,SAAS,WAAW,aACrC,eAAM,SAAS,EAAE,GAAG,SAAS,iBAAiB,yBAAiB,EAC9D,KAAK,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAClC,eAAmB,SAAS,EAAE,GAAG,SAAS,UAAU,YACjD,MAAM,IADE,MAAM,CAEV,CACR,CAAC,IACE,CACP,IACG,EAEN,eAAK,SAAS,EAAE,GAAG,SAAS,WAAW,aACrC,iBACE,IAAI,EAAC,QAAQ,EACb,SAAS,EAAE,4DAA4D,SAAS,YAAY,EAC5F,OAAO,EAAE,eAAe,gBACb,YAAY,2BAGhB,EAER,WAAW,IAAI,CACd,iBACE,IAAI,EAAC,QAAQ,EACb,SAAS,EAAE,gDAAgD,SAAS,eAAe,EACnF,OAAO,EAAE,aAAa,gBACX,SAAS,wBAGb,CACV,IACG,IACF,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { getAvatarColor } from '../utils/avatarColor.js';
|
|
3
3
|
const baseClass = 'css-puck-collaborator-avatars';
|
|
4
|
-
/**
|
|
5
|
-
* Get initials from a name (first letter of first two words).
|
|
6
|
-
*/
|
|
7
4
|
function getInitials(name) {
|
|
8
5
|
return name
|
|
9
6
|
.split(' ')
|
|
@@ -11,9 +8,6 @@ function getInitials(name) {
|
|
|
11
8
|
.map((word) => word.charAt(0).toUpperCase())
|
|
12
9
|
.join('');
|
|
13
10
|
}
|
|
14
|
-
/**
|
|
15
|
-
* Build tooltip text for an actor.
|
|
16
|
-
*/
|
|
17
11
|
function getTooltip(actor) {
|
|
18
12
|
const parts = [actor.name];
|
|
19
13
|
if (actor.role === 'agent' && actor.intent) {
|
|
@@ -24,9 +18,6 @@ function getTooltip(actor) {
|
|
|
24
18
|
}
|
|
25
19
|
return parts.join('\n');
|
|
26
20
|
}
|
|
27
|
-
/**
|
|
28
|
-
* Renders a single avatar.
|
|
29
|
-
*/
|
|
30
21
|
function Avatar({ actor, onClick, }) {
|
|
31
22
|
const isEditing = actor.state === 'editing';
|
|
32
23
|
const isAgent = actor.role === 'agent';
|
|
@@ -40,26 +31,18 @@ function Avatar({ actor, onClick, }) {
|
|
|
40
31
|
const handleClick = () => {
|
|
41
32
|
onClick?.(actor);
|
|
42
33
|
};
|
|
43
|
-
// Generate a consistent color based on the actor's actual ID (not presence record ID)
|
|
44
|
-
// This ensures colors match the demo UserSwitcher and are consistent across sessions
|
|
45
34
|
const backgroundColor = getAvatarColor(actor.actorId);
|
|
46
35
|
return (_jsxs("div", { className: avatarClasses, style: { backgroundColor }, "data-tooltip": getTooltip(actor), onClick: handleClick, role: "button", tabIndex: 0, onKeyDown: (e) => e.key === 'Enter' && handleClick(), children: [actor.avatar ? (_jsx("img", { src: actor.avatar, alt: actor.name, className: `${baseClass}__image`, referrerPolicy: "no-referrer" })) : (_jsx("span", { className: `${baseClass}__initials`, children: getInitials(actor.name) })), isAgent && _jsx("span", { className: `${baseClass}__agent-badge`, "aria-hidden": "true" })] }));
|
|
47
36
|
}
|
|
48
|
-
/**
|
|
49
|
-
* Displays stacked avatars of collaborators with tooltips showing names/intents.
|
|
50
|
-
* Automatically updates based on usePresence hook.
|
|
51
|
-
*/
|
|
52
37
|
export function CollaboratorAvatars({ actors, maxVisible = 5, separateAgents = false, onAvatarClick, className, }) {
|
|
53
38
|
if (actors.length === 0) {
|
|
54
39
|
return _jsx("div", { className: [baseClass, className].filter(Boolean).join(' ') });
|
|
55
40
|
}
|
|
56
41
|
const humans = actors.filter((a) => a.role === 'human');
|
|
57
42
|
const agents = actors.filter((a) => a.role === 'agent');
|
|
58
|
-
// Determine which actors to display
|
|
59
43
|
let displayActors;
|
|
60
44
|
let overflowCount;
|
|
61
45
|
if (separateAgents) {
|
|
62
|
-
// Show humans first, then separator, then agents
|
|
63
46
|
const visibleHumans = humans.slice(0, Math.ceil(maxVisible / 2));
|
|
64
47
|
const visibleAgents = agents.slice(0, Math.floor(maxVisible / 2));
|
|
65
48
|
displayActors = [...visibleHumans, ...visibleAgents];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CollaboratorAvatars.js","sourceRoot":"","sources":["../../../src/collaboration/components/CollaboratorAvatars.tsx"],"names":[],"mappings":";AAQA,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAezD,MAAM,SAAS,GAAG,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"CollaboratorAvatars.js","sourceRoot":"","sources":["../../../src/collaboration/components/CollaboratorAvatars.tsx"],"names":[],"mappings":";AAQA,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAezD,MAAM,SAAS,GAAG,+BAA+B,CAAC;AAKlD,SAAS,WAAW,CAAC,IAAY;IAC/B,OAAO,IAAI;SACR,KAAK,CAAC,GAAG,CAAC;SACV,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC;SACX,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;SAC3C,IAAI,CAAC,EAAE,CAAC,CAAC;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AAO,EAAE,aAAa,IAA9C,KAAK,CAAC,EAAE,CAA0C,CAChE,CAAC,GACE,IACL,CACJ,IACA,CACJ,CAAC,CAAC,CAAC,CACF,aAAa,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAC3B,KAAC,MAAM,IAAgB,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,aAAa,IAA9C,KAAK,CAAC,EAAE,CAA0C,CAChE,CAAC,CACH,EACA,aAAa,GAAG,CAAC,IAAI,CACpB,eAAK,SAAS,EAAE,GAAG,SAAS,YAAY,kBAAI,aAAa,IAAO,CACjE,IACG,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
const baseClass = 'css-puck-focus-highlight';
|
|
3
|
-
/**
|
|
4
|
-
* Generate a consistent color based on actor ID.
|
|
5
|
-
*/
|
|
6
3
|
function generateColorFromId(id) {
|
|
7
|
-
// Simple hash to generate a hue value
|
|
8
4
|
let hash = 0;
|
|
9
5
|
for (let i = 0; i < id.length; i++) {
|
|
10
6
|
hash = id.charCodeAt(i) + ((hash << 5) - hash);
|
|
@@ -12,13 +8,8 @@ function generateColorFromId(id) {
|
|
|
12
8
|
const hue = Math.abs(hash % 360);
|
|
13
9
|
return `hsl(${hue}, 70%, 60%)`;
|
|
14
10
|
}
|
|
15
|
-
/**
|
|
16
|
-
* Overlays visual highlights on Puck components that match actor's focusRegions.
|
|
17
|
-
* Integrates with Puck's component tree.
|
|
18
|
-
*/
|
|
19
11
|
export function FocusRegionHighlight({ actor, color, }) {
|
|
20
12
|
const { focusRegions, state, name } = actor;
|
|
21
|
-
// Don't render if no focus regions
|
|
22
13
|
if (!focusRegions || focusRegions.length === 0) {
|
|
23
14
|
return null;
|
|
24
15
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FocusRegionHighlight.js","sourceRoot":"","sources":["../../../src/collaboration/components/FocusRegionHighlight.tsx"],"names":[],"mappings":";AAiBA,MAAM,SAAS,GAAG,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"FocusRegionHighlight.js","sourceRoot":"","sources":["../../../src/collaboration/components/FocusRegionHighlight.tsx"],"names":[],"mappings":";AAiBA,MAAM,SAAS,GAAG,0BAA0B,CAAC;AAK7C,SAAS,mBAAmB,CAAC,EAAU;IAErC,IAAI,IAAI,GAAG,CAAC,CAAC;IACb,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACnC,IAAI,GAAG,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;IACjD,CAAC;IACD,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,GAAG,GAAG,CAAC,CAAC;IACjC,OAAO,OAAO,GAAG,aAAa,CAAC;AACjC,CAAC;AAMD,MAAM,UAAU,oBAAoB,CAAC,EACnC,KAAK,EACL,KAAK,GACqB;IAC1B,MAAM,EAAE,YAAY,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,KAAK,CAAC;IAG5C,IAAI,CAAC,YAAY,IAAI,YAAY,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC/C,OAAO,IAAI,CAAC;IACd,CAAC;IAED,MAAM,SAAS,GAAG,KAAK,KAAK,SAAS,CAAC;IACtC,MAAM,cAAc,GAAG,KAAK,IAAI,mBAAmB,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IAEnE,MAAM,gBAAgB,GAAG;QACvB,SAAS;QACT,SAAS,IAAI,GAAG,SAAS,WAAW;KACrC;SACE,MAAM,CAAC,OAAO,CAAC;SACf,IAAI,CAAC,GAAG,CAAC,CAAC;IAEb,OAAO,CACL,cACE,SAAS,EAAE,gBAAgB,EAC3B,KAAK,EAAE,EAAE,mBAAmB,EAAE,cAAc,EAAyB,gBACzD,qBAAqB,IAAI,EAAE,YAEtC,YAAY,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAC5B,cAEE,SAAS,EAAE,GAAG,SAAS,UAAU,iBACpB,MAAM,IAFd,MAAM,CAGX,CACH,CAAC,GACE,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -1,15 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
/**
|
|
3
|
-
* PresenceIndicator Component
|
|
4
|
-
*
|
|
5
|
-
* Compact indicator showing presence count with expandable details panel.
|
|
6
|
-
*/
|
|
7
2
|
import { useState } from 'react';
|
|
8
3
|
const baseClass = 'css-puck-presence-indicator';
|
|
9
|
-
/**
|
|
10
|
-
* Compact indicator showing presence count with expandable details panel.
|
|
11
|
-
* Shows: "3 collaborators" with breakdown on expand.
|
|
12
|
-
*/
|
|
13
4
|
export function PresenceIndicator({ actors, expandable = true, panelPosition = 'bottom', className, }) {
|
|
14
5
|
const [isExpanded, setIsExpanded] = useState(false);
|
|
15
6
|
const count = actors.length;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PresenceIndicator.js","sourceRoot":"","sources":["../../../src/collaboration/components/PresenceIndicator.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"PresenceIndicator.js","sourceRoot":"","sources":["../../../src/collaboration/components/PresenceIndicator.tsx"],"names":[],"mappings":";AAMA,OAAc,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAcxC,MAAM,SAAS,GAAG,6BAA6B,CAAC;AAMhD,MAAM,UAAU,iBAAiB,CAAC,EAChC,MAAM,EACN,UAAU,GAAG,IAAI,EACjB,aAAa,GAAG,QAAQ,EACxB,SAAS,GACc;IACvB,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAEpD,MAAM,KAAK,GAAG,MA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IACH,EACL,KAAK,CAAC,YAAY,IAAI,KAAK,CAAC,YAAY,CAAC,MAAM,GAAG,CAAC,IAAI,CACtD,cAAK,SAAS,EAAE,GAAG,SAAS,WAAW,YACpC,KAAK,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAClC,eAAmB,SAAS,EAAE,GAAG,SAAS,UAAU,YACjD,MAAM,IADE,MAAM,CAEV,CACR,CAAC,GACE,CACP,KAjBM,KAAK,CAAC,EAAE,CAkBZ,CACN,CAAC,GACC,GACD,CACP,IACG,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -1,43 +1,13 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* useBranchPresence Hook
|
|
3
|
-
*
|
|
4
|
-
* Provides branch-level presence aggregation with polling.
|
|
5
|
-
*/
|
|
6
1
|
import { useState, useCallback, useEffect, useRef } from 'react';
|
|
7
2
|
import { usePresenceContext } from '../core/PresenceContext.js';
|
|
8
|
-
/**
|
|
9
|
-
* Hook for consuming branch-level presence data.
|
|
10
|
-
*
|
|
11
|
-
* @param options - Configuration options
|
|
12
|
-
* @returns Branch presence state and operations
|
|
13
|
-
*
|
|
14
|
-
* @example
|
|
15
|
-
* ```tsx
|
|
16
|
-
* function BranchCollaborators() {
|
|
17
|
-
* const { presence, activeDocuments, totalActors } = useBranchPresence();
|
|
18
|
-
*
|
|
19
|
-
* return (
|
|
20
|
-
* <div>
|
|
21
|
-
* <span>{totalActors} collaborators on this branch</span>
|
|
22
|
-
* {activeDocuments.map(doc => (
|
|
23
|
-
* <DocumentBadge key={doc.documentId} path={doc.documentPath} />
|
|
24
|
-
* ))}
|
|
25
|
-
* </div>
|
|
26
|
-
* );
|
|
27
|
-
* }
|
|
28
|
-
* ```
|
|
29
|
-
*/
|
|
30
3
|
export function useBranchPresence(options = {}) {
|
|
31
4
|
const { pollingInterval = 10000 } = options;
|
|
32
5
|
const { client, siteId, branchId } = usePresenceContext();
|
|
33
6
|
const [presence, setPresence] = useState(null);
|
|
34
7
|
const [isLoading, setIsLoading] = useState(true);
|
|
35
8
|
const [error, setError] = useState(null);
|
|
36
|
-
// Track mounted state to avoid state updates after unmount
|
|
37
9
|
const mountedRef = useRef(true);
|
|
38
|
-
// Ref for fetchPresence to avoid restarting polling interval
|
|
39
10
|
const fetchPresenceRef = useRef(async () => { });
|
|
40
|
-
// Fetch presence data
|
|
41
11
|
const fetchPresence = useCallback(async () => {
|
|
42
12
|
try {
|
|
43
13
|
const branchPresence = await client.presence.getBranchPresence(siteId, branchId);
|
|
@@ -57,20 +27,15 @@ export function useBranchPresence(options = {}) {
|
|
|
57
27
|
}
|
|
58
28
|
}
|
|
59
29
|
}, [client, siteId, branchId]);
|
|
60
|
-
// Keep ref in sync with callback
|
|
61
30
|
useEffect(() => {
|
|
62
31
|
fetchPresenceRef.current = fetchPresence;
|
|
63
32
|
}, [fetchPresence]);
|
|
64
|
-
// Manual refresh function
|
|
65
33
|
const refresh = useCallback(async () => {
|
|
66
34
|
await fetchPresence();
|
|
67
35
|
}, [fetchPresence]);
|
|
68
|
-
// Initial fetch and polling
|
|
69
36
|
useEffect(() => {
|
|
70
37
|
mountedRef.current = true;
|
|
71
|
-
// Initial fetch
|
|
72
38
|
void fetchPresenceRef.current();
|
|
73
|
-
// Set up polling - use ref to avoid restarting interval when callback changes
|
|
74
39
|
const intervalId = setInterval(() => {
|
|
75
40
|
void fetchPresenceRef.current();
|
|
76
41
|
}, pollingInterval);
|
|
@@ -79,7 +44,6 @@ export function useBranchPresence(options = {}) {
|
|
|
79
44
|
clearInterval(intervalId);
|
|
80
45
|
};
|
|
81
46
|
}, [pollingInterval]);
|
|
82
|
-
// Derived values
|
|
83
47
|
const activeDocuments = presence?.documentSummary ?? [];
|
|
84
48
|
const totalActors = presence?.summary.totalActors ?? 0;
|
|
85
49
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useBranchPresence.js","sourceRoot":"","sources":["../../src/collaboration/useBranchPresence.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C"}
|
|
@@ -1,91 +1,41 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* useFocusRegionReporting Hook
|
|
3
|
-
*
|
|
4
|
-
* Manages debounced reporting of focus regions to the backend.
|
|
5
|
-
* Used to inform the server which components a human has selected in the editor,
|
|
6
|
-
* enabling proactive collision detection before actual edits occur.
|
|
7
|
-
*/
|
|
8
1
|
import { useState, useCallback, useEffect, useRef } from 'react';
|
|
9
2
|
import { usePresenceContext } from '../core/PresenceContext.js';
|
|
10
|
-
/**
|
|
11
|
-
* Hook for reporting focus regions to the backend.
|
|
12
|
-
*
|
|
13
|
-
* Manages debounced updates, heartbeat keep-alive, and cleanup on unmount.
|
|
14
|
-
* Focus regions tell the server which components the user has selected,
|
|
15
|
-
* allowing agents to avoid editing those regions proactively.
|
|
16
|
-
*
|
|
17
|
-
* @param options - Configuration options
|
|
18
|
-
* @returns Focus state and operations
|
|
19
|
-
*
|
|
20
|
-
* @example
|
|
21
|
-
* ```tsx
|
|
22
|
-
* function SelectionReporter() {
|
|
23
|
-
* const { setFocusRegions, clearFocus } = useFocusRegionReporting();
|
|
24
|
-
*
|
|
25
|
-
* // When Puck selection changes
|
|
26
|
-
* useEffect(() => {
|
|
27
|
-
* if (selectedItem) {
|
|
28
|
-
* setFocusRegions([`/content/${selectedItem.index}`]);
|
|
29
|
-
* } else {
|
|
30
|
-
* clearFocus();
|
|
31
|
-
* }
|
|
32
|
-
* }, [selectedItem, setFocusRegions, clearFocus]);
|
|
33
|
-
*
|
|
34
|
-
* return null;
|
|
35
|
-
* }
|
|
36
|
-
* ```
|
|
37
|
-
*/
|
|
38
3
|
export function useFocusRegionReporting(options = {}) {
|
|
39
4
|
const { enabled = true, debounceMs = 300, heartbeatMs = 15000, sendViaWebSocket } = options;
|
|
40
5
|
const { client, siteId, branchId, documentPath, userId } = usePresenceContext();
|
|
41
|
-
// Ref for sendViaWebSocket to avoid callback recreation
|
|
42
6
|
const sendViaWebSocketRef = useRef(sendViaWebSocket);
|
|
43
7
|
useEffect(() => {
|
|
44
8
|
sendViaWebSocketRef.current = sendViaWebSocket;
|
|
45
9
|
}, [sendViaWebSocket]);
|
|
46
|
-
// Local state
|
|
47
10
|
const [focusRegions, setFocusRegionsState] = useState([]);
|
|
48
11
|
const [isReporting, setIsReporting] = useState(false);
|
|
49
|
-
// Refs for managing timers and cleanup
|
|
50
12
|
const debounceTimerRef = useRef(null);
|
|
51
13
|
const heartbeatTimerRef = useRef(null);
|
|
52
14
|
const mountedRef = useRef(true);
|
|
53
15
|
const lastReportedRef = useRef(null);
|
|
54
16
|
const focusRegionsRef = useRef([]);
|
|
55
|
-
// Keep ref in sync with state
|
|
56
17
|
useEffect(() => {
|
|
57
18
|
focusRegionsRef.current = focusRegions;
|
|
58
19
|
}, [focusRegions]);
|
|
59
|
-
// Ref for reportFocusRegions to avoid restarting heartbeat interval
|
|
60
20
|
const reportFocusRegionsRef = useRef(async () => { });
|
|
61
|
-
/**
|
|
62
|
-
* Send focus regions to the server.
|
|
63
|
-
* Tries WebSocket first if available, falls back to HTTP.
|
|
64
|
-
*/
|
|
65
21
|
const reportFocusRegions = useCallback(async (regions) => {
|
|
66
|
-
// Deduplicate - don't report if regions haven't changed
|
|
67
22
|
const serialized = JSON.stringify(regions);
|
|
68
23
|
if (serialized === lastReportedRef.current) {
|
|
69
24
|
return;
|
|
70
25
|
}
|
|
71
|
-
// Skip if disabled, unmounted, or no document path
|
|
72
26
|
if (!enabled || !mountedRef.current || !documentPath) {
|
|
73
27
|
return;
|
|
74
28
|
}
|
|
75
|
-
// Try WebSocket first if available, fall back to HTTP
|
|
76
29
|
if (sendViaWebSocketRef.current?.(regions)) {
|
|
77
30
|
lastReportedRef.current = serialized;
|
|
78
31
|
return;
|
|
79
32
|
}
|
|
80
|
-
// Fall back to HTTP
|
|
81
33
|
try {
|
|
82
34
|
setIsReporting(true);
|
|
83
35
|
await client.presence.updateFocusRegions(siteId, branchId, documentPath, userId, regions);
|
|
84
36
|
lastReportedRef.current = serialized;
|
|
85
37
|
}
|
|
86
38
|
catch {
|
|
87
|
-
// Silently handle errors - focus reporting is not critical
|
|
88
|
-
// Log for debugging if needed
|
|
89
39
|
}
|
|
90
40
|
finally {
|
|
91
41
|
if (mountedRef.current) {
|
|
@@ -93,57 +43,41 @@ export function useFocusRegionReporting(options = {}) {
|
|
|
93
43
|
}
|
|
94
44
|
}
|
|
95
45
|
}, [client, siteId, branchId, documentPath, userId, enabled]);
|
|
96
|
-
// Keep ref in sync with callback
|
|
97
46
|
useEffect(() => {
|
|
98
47
|
reportFocusRegionsRef.current = reportFocusRegions;
|
|
99
48
|
}, [reportFocusRegions]);
|
|
100
|
-
/**
|
|
101
|
-
* Set focus regions with debouncing.
|
|
102
|
-
*/
|
|
103
49
|
const setFocusRegions = useCallback((regions) => {
|
|
104
|
-
// Update local state immediately
|
|
105
50
|
setFocusRegionsState(regions);
|
|
106
51
|
if (!enabled) {
|
|
107
52
|
return;
|
|
108
53
|
}
|
|
109
|
-
// Cancel any pending debounced call
|
|
110
54
|
if (debounceTimerRef.current) {
|
|
111
55
|
clearTimeout(debounceTimerRef.current);
|
|
112
56
|
}
|
|
113
|
-
// Schedule debounced report
|
|
114
57
|
debounceTimerRef.current = setTimeout(() => {
|
|
115
58
|
void reportFocusRegions(regions);
|
|
116
59
|
}, debounceMs);
|
|
117
60
|
}, [enabled, debounceMs, reportFocusRegions]);
|
|
118
|
-
/**
|
|
119
|
-
* Clear focus regions.
|
|
120
|
-
*/
|
|
121
61
|
const clearFocus = useCallback(() => {
|
|
122
62
|
setFocusRegionsState([]);
|
|
123
63
|
if (!enabled) {
|
|
124
64
|
return;
|
|
125
65
|
}
|
|
126
|
-
// Cancel any pending debounced call
|
|
127
66
|
if (debounceTimerRef.current) {
|
|
128
67
|
clearTimeout(debounceTimerRef.current);
|
|
129
68
|
}
|
|
130
|
-
// Schedule debounced report
|
|
131
69
|
debounceTimerRef.current = setTimeout(() => {
|
|
132
70
|
void reportFocusRegions([]);
|
|
133
71
|
}, debounceMs);
|
|
134
72
|
}, [enabled, debounceMs, reportFocusRegions]);
|
|
135
|
-
// Heartbeat to keep focus alive
|
|
136
73
|
useEffect(() => {
|
|
137
74
|
if (!enabled) {
|
|
138
75
|
return;
|
|
139
76
|
}
|
|
140
77
|
heartbeatTimerRef.current = setInterval(() => {
|
|
141
|
-
// Only send heartbeat if we have focus regions
|
|
142
78
|
if (focusRegionsRef.current.length > 0) {
|
|
143
|
-
// Reset lastReported to force the heartbeat through
|
|
144
79
|
const serialized = JSON.stringify(focusRegionsRef.current);
|
|
145
80
|
if (lastReportedRef.current === serialized) {
|
|
146
|
-
// Same regions - force through by clearing last reported temporarily
|
|
147
81
|
lastReportedRef.current = null;
|
|
148
82
|
}
|
|
149
83
|
void reportFocusRegionsRef.current(focusRegionsRef.current);
|
|
@@ -156,35 +90,26 @@ export function useFocusRegionReporting(options = {}) {
|
|
|
156
90
|
}
|
|
157
91
|
};
|
|
158
92
|
}, [enabled, heartbeatMs]);
|
|
159
|
-
// Cleanup on unmount
|
|
160
93
|
useEffect(() => {
|
|
161
94
|
mountedRef.current = true;
|
|
162
95
|
return () => {
|
|
163
96
|
mountedRef.current = false;
|
|
164
|
-
// Cancel pending debounced call
|
|
165
97
|
if (debounceTimerRef.current) {
|
|
166
98
|
clearTimeout(debounceTimerRef.current);
|
|
167
99
|
debounceTimerRef.current = null;
|
|
168
100
|
}
|
|
169
|
-
// Cancel heartbeat
|
|
170
101
|
if (heartbeatTimerRef.current) {
|
|
171
102
|
clearInterval(heartbeatTimerRef.current);
|
|
172
103
|
heartbeatTimerRef.current = null;
|
|
173
104
|
}
|
|
174
|
-
// Send final clear (fire-and-forget)
|
|
175
|
-
// Only if we have a document path to clear
|
|
176
105
|
if (enabled && documentPath) {
|
|
177
|
-
// Reset lastReported to ensure the clear goes through
|
|
178
106
|
lastReportedRef.current = null;
|
|
179
|
-
// Try WebSocket first if available
|
|
180
107
|
if (sendViaWebSocketRef.current?.([])) {
|
|
181
108
|
return;
|
|
182
109
|
}
|
|
183
|
-
// Fall back to HTTP
|
|
184
110
|
void client.presence
|
|
185
111
|
.updateFocusRegions(siteId, branchId, documentPath, userId, [])
|
|
186
112
|
.catch(() => {
|
|
187
|
-
// Ignore errors on unmount
|
|
188
113
|
});
|
|
189
114
|
}
|
|
190
115
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFocusRegionReporting.js","sourceRoot":"","sources":["../../src/collaboration/useFocusRegionReporting.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useFocusRegionReporting.js","sourceRoot":"","sources":["../../src/collaboration/useFocusRegionReporting.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACjE,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAgEhE,MAAM,UAAU,uBAAuB,CACrC,UAA0C,EAAE;IAE5C,MAAM,EAAE,OAAO,GAAG,IAAI,EAAE,UAAU,GAAG,GAAG,EAAE,WAAW,GAAG,KAAK,EAAE,gBAAgB,EAAE,GAAG,OAAO,CAAC;IAC5F,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,EAAE,GAAG,kBAAkB,EAAE,CAAC;IAGhF,MAAM,mBAAmB,GAAG,MAAM,CAAC,gBAAgB,CAAC,CAAC;IACrD,SAAS,CAAC,GAAG,EAAE;QACb,mBAAmB,CAAC,OAAO,GAAG,gBAAgB,CAAC;IACjD,CAAC,EAAE,CAAC,gBAAgB,CAAC,CAAC,CAAC;IAGvB,MAAM,CAAC,YAAY,EAAE,oBAAoB,CAAC,GAAG,QAAQ,CAAW,EAAE,CAAC,CAAC;IACpE,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAGtD,MAAM,gBAAgB,GAAG,MAAM,CAAuC,IAAI,CAAC,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