@pantheon-systems/puck-css 0.4.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/dist/agent/agentPlugin.d.ts +3 -0
- package/dist/agent/agentPlugin.d.ts.map +1 -0
- package/dist/agent/agentPlugin.js +6 -0
- package/dist/agent/agentPlugin.js.map +1 -0
- package/dist/agent/components/AgentActionButton.d.ts +38 -0
- package/dist/agent/components/AgentActionButton.d.ts.map +1 -0
- package/dist/agent/components/AgentActionButton.js +76 -0
- package/dist/agent/components/AgentActionButton.js.map +1 -0
- package/dist/agent/components/AgentActionModal.d.ts +28 -0
- package/dist/agent/components/AgentActionModal.d.ts.map +1 -0
- package/dist/agent/components/AgentActionModal.js +85 -0
- package/dist/agent/components/AgentActionModal.js.map +1 -0
- package/dist/agent/components/AgentStatusPanel.d.ts +27 -0
- package/dist/agent/components/AgentStatusPanel.d.ts.map +1 -0
- package/dist/agent/components/AgentStatusPanel.js +51 -0
- package/dist/agent/components/AgentStatusPanel.js.map +1 -0
- package/dist/agent/components/index.d.ts +12 -0
- package/dist/agent/components/index.d.ts.map +1 -0
- package/dist/agent/components/index.js +9 -0
- package/dist/agent/components/index.js.map +1 -0
- package/dist/agent/index.d.ts +6 -0
- package/dist/agent/index.d.ts.map +1 -0
- package/dist/agent/index.js +4 -0
- package/dist/agent/index.js.map +1 -0
- package/dist/agent/useAgentEdit.d.ts +68 -0
- package/dist/agent/useAgentEdit.d.ts.map +1 -0
- package/dist/agent/useAgentEdit.js +125 -0
- package/dist/agent/useAgentEdit.js.map +1 -0
- package/dist/agent/useAgentTrigger.d.ts +69 -0
- package/dist/agent/useAgentTrigger.d.ts.map +1 -0
- package/dist/agent/useAgentTrigger.js +131 -0
- package/dist/agent/useAgentTrigger.js.map +1 -0
- package/dist/auth/AuthGate.d.ts +5 -0
- package/dist/auth/AuthGate.d.ts.map +1 -0
- package/dist/auth/AuthGate.js +17 -0
- package/dist/auth/AuthGate.js.map +1 -0
- package/dist/auth/P1AuthProvider.d.ts +59 -0
- package/dist/auth/P1AuthProvider.d.ts.map +1 -0
- package/dist/auth/P1AuthProvider.js +254 -0
- package/dist/auth/P1AuthProvider.js.map +1 -0
- package/dist/auth/P1LoginPage.d.ts +26 -0
- package/dist/auth/P1LoginPage.d.ts.map +1 -0
- package/dist/auth/P1LoginPage.js +105 -0
- package/dist/auth/P1LoginPage.js.map +1 -0
- package/dist/auth/index.d.ts +14 -0
- package/dist/auth/index.d.ts.map +1 -0
- package/dist/auth/index.js +12 -0
- package/dist/auth/index.js.map +1 -0
- package/dist/collaboration/collaborationPlugin.d.ts +3 -0
- package/dist/collaboration/collaborationPlugin.d.ts.map +1 -0
- package/dist/collaboration/collaborationPlugin.js +6 -0
- package/dist/collaboration/collaborationPlugin.js.map +1 -0
- package/dist/collaboration/components/AgentActivityBanner.d.ts +26 -0
- package/dist/collaboration/components/AgentActivityBanner.d.ts.map +1 -0
- package/dist/collaboration/components/AgentActivityBanner.js +50 -0
- package/dist/collaboration/components/AgentActivityBanner.js.map +1 -0
- package/dist/collaboration/components/CollaboratorAvatars.d.ts +25 -0
- package/dist/collaboration/components/CollaboratorAvatars.d.ts.map +1 -0
- package/dist/collaboration/components/CollaboratorAvatars.js +75 -0
- package/dist/collaboration/components/CollaboratorAvatars.js.map +1 -0
- package/dist/collaboration/components/FocusRegionHighlight.d.ts +20 -0
- package/dist/collaboration/components/FocusRegionHighlight.d.ts.map +1 -0
- package/dist/collaboration/components/FocusRegionHighlight.js +35 -0
- package/dist/collaboration/components/FocusRegionHighlight.js.map +1 -0
- package/dist/collaboration/components/PresenceIndicator.d.ts +23 -0
- package/dist/collaboration/components/PresenceIndicator.d.ts.map +1 -0
- package/dist/collaboration/components/PresenceIndicator.js +25 -0
- package/dist/collaboration/components/PresenceIndicator.js.map +1 -0
- package/dist/collaboration/index.d.ts +21 -0
- package/dist/collaboration/index.d.ts.map +1 -0
- package/dist/collaboration/index.js +12 -0
- package/dist/collaboration/index.js.map +1 -0
- package/dist/collaboration/useBranchPresence.d.ts +54 -0
- package/dist/collaboration/useBranchPresence.d.ts.map +1 -0
- package/dist/collaboration/useBranchPresence.js +94 -0
- package/dist/collaboration/useBranchPresence.js.map +1 -0
- package/dist/collaboration/useFocusRegionReporting.d.ts +69 -0
- package/dist/collaboration/useFocusRegionReporting.d.ts.map +1 -0
- package/dist/collaboration/useFocusRegionReporting.js +199 -0
- package/dist/collaboration/useFocusRegionReporting.js.map +1 -0
- package/dist/collaboration/usePresence.d.ts +62 -0
- package/dist/collaboration/usePresence.d.ts.map +1 -0
- package/dist/collaboration/usePresence.js +105 -0
- package/dist/collaboration/usePresence.js.map +1 -0
- package/dist/collaboration/useSitePresence.d.ts +54 -0
- package/dist/collaboration/useSitePresence.d.ts.map +1 -0
- package/dist/collaboration/useSitePresence.js +94 -0
- package/dist/collaboration/useSitePresence.js.map +1 -0
- package/dist/collaboration/utils/avatarColor.d.ts +11 -0
- package/dist/collaboration/utils/avatarColor.d.ts.map +1 -0
- package/dist/collaboration/utils/avatarColor.js +42 -0
- package/dist/collaboration/utils/avatarColor.js.map +1 -0
- package/dist/collaboration/utils/focusHighlightConfig.d.ts +54 -0
- package/dist/collaboration/utils/focusHighlightConfig.d.ts.map +1 -0
- package/dist/collaboration/utils/focusHighlightConfig.js +98 -0
- package/dist/collaboration/utils/focusHighlightConfig.js.map +1 -0
- package/dist/collaboration/utils/focusRegionMap.d.ts +82 -0
- package/dist/collaboration/utils/focusRegionMap.d.ts.map +1 -0
- package/dist/collaboration/utils/focusRegionMap.js +188 -0
- package/dist/collaboration/utils/focusRegionMap.js.map +1 -0
- package/dist/core/FocusHighlightContext.d.ts +54 -0
- package/dist/core/FocusHighlightContext.d.ts.map +1 -0
- package/dist/core/FocusHighlightContext.js +46 -0
- package/dist/core/FocusHighlightContext.js.map +1 -0
- package/dist/core/NotificationContext.d.ts +63 -0
- package/dist/core/NotificationContext.d.ts.map +1 -0
- package/dist/core/NotificationContext.js +194 -0
- package/dist/core/NotificationContext.js.map +1 -0
- package/dist/core/P1PuckContext.d.ts +36 -0
- package/dist/core/P1PuckContext.d.ts.map +1 -0
- package/dist/core/P1PuckContext.js +44 -0
- package/dist/core/P1PuckContext.js.map +1 -0
- package/dist/core/PresenceContext.d.ts +70 -0
- package/dist/core/PresenceContext.d.ts.map +1 -0
- package/dist/core/PresenceContext.js +31 -0
- package/dist/core/PresenceContext.js.map +1 -0
- package/dist/core/config.d.ts +26 -0
- package/dist/core/config.d.ts.map +1 -0
- package/dist/core/config.js +78 -0
- package/dist/core/config.js.map +1 -0
- package/dist/core/featureConfig.d.ts +56 -0
- package/dist/core/featureConfig.d.ts.map +1 -0
- package/dist/core/featureConfig.js +77 -0
- package/dist/core/featureConfig.js.map +1 -0
- package/dist/core/index.d.ts +17 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/index.js +11 -0
- package/dist/core/index.js.map +1 -0
- package/dist/core/plugin-types.d.ts +30 -0
- package/dist/core/plugin-types.d.ts.map +1 -0
- package/dist/core/plugin-types.js +2 -0
- package/dist/core/plugin-types.js.map +1 -0
- package/dist/core/types.d.ts +710 -0
- package/dist/core/types.d.ts.map +1 -0
- package/dist/core/types.js +5 -0
- package/dist/core/types.js.map +1 -0
- package/dist/core/utils/debounce.d.ts +27 -0
- package/dist/core/utils/debounce.d.ts.map +1 -0
- package/dist/core/utils/debounce.js +77 -0
- package/dist/core/utils/debounce.js.map +1 -0
- package/dist/core/utils/retry.d.ts +57 -0
- package/dist/core/utils/retry.d.ts.map +1 -0
- package/dist/core/utils/retry.js +70 -0
- package/dist/core/utils/retry.js.map +1 -0
- package/dist/core/utils/throttle.d.ts +29 -0
- package/dist/core/utils/throttle.d.ts.map +1 -0
- package/dist/core/utils/throttle.js +66 -0
- package/dist/core/utils/throttle.js.map +1 -0
- package/dist/data/cross-reference-resolve.d.ts +6 -0
- package/dist/data/cross-reference-resolve.d.ts.map +1 -0
- package/dist/data/cross-reference-resolve.js +58 -0
- package/dist/data/cross-reference-resolve.js.map +1 -0
- package/dist/data/cross-reference.d.ts +32 -0
- package/dist/data/cross-reference.d.ts.map +1 -0
- package/dist/data/cross-reference.js +188 -0
- package/dist/data/cross-reference.js.map +1 -0
- package/dist/data/dal/index.d.ts +32 -0
- package/dist/data/dal/index.d.ts.map +1 -0
- package/dist/data/dal/index.js +72 -0
- package/dist/data/dal/index.js.map +1 -0
- package/dist/data/dal/init.d.ts +28 -0
- package/dist/data/dal/init.d.ts.map +1 -0
- package/dist/data/dal/init.js +76 -0
- package/dist/data/dal/init.js.map +1 -0
- package/dist/data/dal/p1-store.d.ts +52 -0
- package/dist/data/dal/p1-store.d.ts.map +1 -0
- package/dist/data/dal/p1-store.js +121 -0
- package/dist/data/dal/p1-store.js.map +1 -0
- package/dist/data/dal/request-auth.d.ts +3 -0
- package/dist/data/dal/request-auth.d.ts.map +1 -0
- package/dist/data/dal/request-auth.js +9 -0
- package/dist/data/dal/request-auth.js.map +1 -0
- package/dist/data/dal/types.d.ts +31 -0
- package/dist/data/dal/types.d.ts.map +1 -0
- package/dist/data/dal/types.js +2 -0
- package/dist/data/dal/types.js.map +1 -0
- package/dist/data/get-page.d.ts +5 -0
- package/dist/data/get-page.d.ts.map +1 -0
- package/dist/data/get-page.js +5 -0
- package/dist/data/get-page.js.map +1 -0
- package/dist/data/page-editor-meta.d.ts +16 -0
- package/dist/data/page-editor-meta.d.ts.map +1 -0
- package/dist/data/page-editor-meta.js +99 -0
- package/dist/data/page-editor-meta.js.map +1 -0
- package/dist/data/page-store.d.ts +65 -0
- package/dist/data/page-store.d.ts.map +1 -0
- package/dist/data/page-store.js +302 -0
- package/dist/data/page-store.js.map +1 -0
- package/dist/data/page-structure.d.ts +13 -0
- package/dist/data/page-structure.d.ts.map +1 -0
- package/dist/data/page-structure.js +95 -0
- package/dist/data/page-structure.js.map +1 -0
- package/dist/data/paths.d.ts +16 -0
- package/dist/data/paths.d.ts.map +1 -0
- package/dist/data/paths.js +36 -0
- package/dist/data/paths.js.map +1 -0
- package/dist/data/query-provider.d.ts +5 -0
- package/dist/data/query-provider.d.ts.map +1 -0
- package/dist/data/query-provider.js +16 -0
- package/dist/data/query-provider.js.map +1 -0
- package/dist/data/remote-datasources/fetch-http-json.d.ts +8 -0
- package/dist/data/remote-datasources/fetch-http-json.d.ts.map +1 -0
- package/dist/data/remote-datasources/fetch-http-json.js +89 -0
- package/dist/data/remote-datasources/fetch-http-json.js.map +1 -0
- package/dist/data/remote-datasources/index.d.ts +5 -0
- package/dist/data/remote-datasources/index.d.ts.map +1 -0
- package/dist/data/remote-datasources/index.js +3 -0
- package/dist/data/remote-datasources/index.js.map +1 -0
- package/dist/data/remote-datasources/loader.d.ts +44 -0
- package/dist/data/remote-datasources/loader.d.ts.map +1 -0
- package/dist/data/remote-datasources/loader.js +126 -0
- package/dist/data/remote-datasources/loader.js.map +1 -0
- package/dist/data/remote-datasources/remote-datasource-registry.d.ts +21 -0
- package/dist/data/remote-datasources/remote-datasource-registry.d.ts.map +1 -0
- package/dist/data/remote-datasources/remote-datasource-registry.js +15 -0
- package/dist/data/remote-datasources/remote-datasource-registry.js.map +1 -0
- package/dist/data/remote-datasources/user-remote-datasource-store.d.ts +14 -0
- package/dist/data/remote-datasources/user-remote-datasource-store.d.ts.map +1 -0
- package/dist/data/remote-datasources/user-remote-datasource-store.js +125 -0
- package/dist/data/remote-datasources/user-remote-datasource-store.js.map +1 -0
- package/dist/data/remote-datasources/user-remote-datasource-types.d.ts +15 -0
- package/dist/data/remote-datasources/user-remote-datasource-types.d.ts.map +1 -0
- package/dist/data/remote-datasources/user-remote-datasource-types.js +2 -0
- package/dist/data/remote-datasources/user-remote-datasource-types.js.map +1 -0
- package/dist/data/resolve-data-templates.d.ts +12 -0
- package/dist/data/resolve-data-templates.d.ts.map +1 -0
- package/dist/data/resolve-data-templates.js +286 -0
- package/dist/data/resolve-data-templates.js.map +1 -0
- package/dist/data/route-templates.d.ts +43 -0
- package/dist/data/route-templates.d.ts.map +1 -0
- package/dist/data/route-templates.js +146 -0
- package/dist/data/route-templates.js.map +1 -0
- package/dist/data/semantic-ops.d.ts +47 -0
- package/dist/data/semantic-ops.d.ts.map +1 -0
- package/dist/data/semantic-ops.js +335 -0
- package/dist/data/semantic-ops.js.map +1 -0
- package/dist/data/styles.d.ts +87 -0
- package/dist/data/styles.d.ts.map +1 -0
- package/dist/data/styles.js +87 -0
- package/dist/data/styles.js.map +1 -0
- package/dist/data/template-autocomplete.d.ts +22 -0
- package/dist/data/template-autocomplete.d.ts.map +1 -0
- package/dist/data/template-autocomplete.js +71 -0
- package/dist/data/template-autocomplete.js.map +1 -0
- package/dist/data/template-functions.d.ts +5 -0
- package/dist/data/template-functions.d.ts.map +1 -0
- package/dist/data/template-functions.js +90 -0
- package/dist/data/template-functions.js.map +1 -0
- package/dist/data/utils.d.ts +3 -0
- package/dist/data/utils.d.ts.map +1 -0
- package/dist/data/utils.js +11 -0
- package/dist/data/utils.js.map +1 -0
- package/dist/editor/P1App.d.ts +14 -0
- package/dist/editor/P1App.d.ts.map +1 -0
- package/dist/editor/P1App.js +138 -0
- package/dist/editor/P1App.js.map +1 -0
- package/dist/editor/P1PuckProvider.d.ts +69 -0
- package/dist/editor/P1PuckProvider.d.ts.map +1 -0
- package/dist/editor/P1PuckProvider.js +1473 -0
- package/dist/editor/P1PuckProvider.js.map +1 -0
- package/dist/editor/components/BranchSelector.d.ts +49 -0
- package/dist/editor/components/BranchSelector.d.ts.map +1 -0
- package/dist/editor/components/BranchSelector.js +55 -0
- package/dist/editor/components/BranchSelector.js.map +1 -0
- package/dist/editor/components/NotificationContainer.d.ts +41 -0
- package/dist/editor/components/NotificationContainer.d.ts.map +1 -0
- package/dist/editor/components/NotificationContainer.js +32 -0
- package/dist/editor/components/NotificationContainer.js.map +1 -0
- package/dist/editor/components/PublishButton.d.ts +52 -0
- package/dist/editor/components/PublishButton.d.ts.map +1 -0
- package/dist/editor/components/PublishButton.js +58 -0
- package/dist/editor/components/PublishButton.js.map +1 -0
- package/dist/editor/components/PublishedStatusBadge.d.ts +6 -0
- package/dist/editor/components/PublishedStatusBadge.d.ts.map +1 -0
- package/dist/editor/components/PublishedStatusBadge.js +25 -0
- package/dist/editor/components/PublishedStatusBadge.js.map +1 -0
- package/dist/editor/components/PuckDataCapture.d.ts +22 -0
- package/dist/editor/components/PuckDataCapture.d.ts.map +1 -0
- package/dist/editor/components/PuckDataCapture.js +30 -0
- package/dist/editor/components/PuckDataCapture.js.map +1 -0
- package/dist/editor/components/PuckDataSynchronizer.d.ts +49 -0
- package/dist/editor/components/PuckDataSynchronizer.d.ts.map +1 -0
- package/dist/editor/components/PuckDataSynchronizer.js +126 -0
- package/dist/editor/components/PuckDataSynchronizer.js.map +1 -0
- package/dist/editor/components/PuckSelectionTracker.d.ts +47 -0
- package/dist/editor/components/PuckSelectionTracker.d.ts.map +1 -0
- package/dist/editor/components/PuckSelectionTracker.js +93 -0
- package/dist/editor/components/PuckSelectionTracker.js.map +1 -0
- package/dist/editor/components/SaveIndicator.d.ts +77 -0
- package/dist/editor/components/SaveIndicator.d.ts.map +1 -0
- package/dist/editor/components/SaveIndicator.js +114 -0
- package/dist/editor/components/SaveIndicator.js.map +1 -0
- package/dist/editor/components/Toast.d.ts +40 -0
- package/dist/editor/components/Toast.d.ts.map +1 -0
- package/dist/editor/components/Toast.js +92 -0
- package/dist/editor/components/Toast.js.map +1 -0
- package/dist/editor/components/VersionBannerOverride.d.ts +10 -0
- package/dist/editor/components/VersionBannerOverride.d.ts.map +1 -0
- package/dist/editor/components/VersionBannerOverride.js +22 -0
- package/dist/editor/components/VersionBannerOverride.js.map +1 -0
- package/dist/editor/components/connectable.d.ts +22 -0
- package/dist/editor/components/connectable.d.ts.map +1 -0
- package/dist/editor/components/connectable.js +84 -0
- package/dist/editor/components/connectable.js.map +1 -0
- package/dist/editor/components/merge-preview/MergePreviewPanel.d.ts +13 -0
- package/dist/editor/components/merge-preview/MergePreviewPanel.d.ts.map +1 -0
- package/dist/editor/components/merge-preview/MergePreviewPanel.js +32 -0
- package/dist/editor/components/merge-preview/MergePreviewPanel.js.map +1 -0
- package/dist/editor/components/merge-preview/MergePreviewRenderer.d.ts +58 -0
- package/dist/editor/components/merge-preview/MergePreviewRenderer.d.ts.map +1 -0
- package/dist/editor/components/merge-preview/MergePreviewRenderer.js +150 -0
- package/dist/editor/components/merge-preview/MergePreviewRenderer.js.map +1 -0
- package/dist/editor/components/merge-preview/ScaledContent.d.ts +11 -0
- package/dist/editor/components/merge-preview/ScaledContent.d.ts.map +1 -0
- package/dist/editor/components/merge-preview/ScaledContent.js +31 -0
- package/dist/editor/components/merge-preview/ScaledContent.js.map +1 -0
- package/dist/editor/components/merge-preview/ViewModeSelector.d.ts +8 -0
- package/dist/editor/components/merge-preview/ViewModeSelector.d.ts.map +1 -0
- package/dist/editor/components/merge-preview/ViewModeSelector.js +11 -0
- package/dist/editor/components/merge-preview/ViewModeSelector.js.map +1 -0
- package/dist/editor/components/merge-preview/index.d.ts +12 -0
- package/dist/editor/components/merge-preview/index.d.ts.map +1 -0
- package/dist/editor/components/merge-preview/index.js +9 -0
- package/dist/editor/components/merge-preview/index.js.map +1 -0
- package/dist/editor/composePlugins.d.ts +10 -0
- package/dist/editor/composePlugins.d.ts.map +1 -0
- package/dist/editor/composePlugins.js +47 -0
- package/dist/editor/composePlugins.js.map +1 -0
- package/dist/editor/defaultPlugins.d.ts +3 -0
- package/dist/editor/defaultPlugins.d.ts.map +1 -0
- package/dist/editor/defaultPlugins.js +7 -0
- package/dist/editor/defaultPlugins.js.map +1 -0
- package/dist/editor/icons/GenericThumbnailIcon.d.ts +3 -0
- package/dist/editor/icons/GenericThumbnailIcon.d.ts.map +1 -0
- package/dist/editor/icons/GenericThumbnailIcon.js +5 -0
- package/dist/editor/icons/GenericThumbnailIcon.js.map +1 -0
- package/dist/editor/icons/GripHandleIcon.d.ts +3 -0
- package/dist/editor/icons/GripHandleIcon.d.ts.map +1 -0
- package/dist/editor/icons/GripHandleIcon.js +5 -0
- package/dist/editor/icons/GripHandleIcon.js.map +1 -0
- package/dist/editor/icons/MergePreviewIcon.d.ts +3 -0
- package/dist/editor/icons/MergePreviewIcon.d.ts.map +1 -0
- package/dist/editor/icons/MergePreviewIcon.js +5 -0
- package/dist/editor/icons/MergePreviewIcon.js.map +1 -0
- package/dist/editor/icons/WarningTriangleIcon.d.ts +3 -0
- package/dist/editor/icons/WarningTriangleIcon.d.ts.map +1 -0
- package/dist/editor/icons/WarningTriangleIcon.js +5 -0
- package/dist/editor/icons/WarningTriangleIcon.js.map +1 -0
- package/dist/editor/icons/index.d.ts +5 -0
- package/dist/editor/icons/index.d.ts.map +1 -0
- package/dist/editor/icons/index.js +5 -0
- package/dist/editor/icons/index.js.map +1 -0
- package/dist/editor/index.d.ts +43 -0
- package/dist/editor/index.d.ts.map +1 -0
- package/dist/editor/index.js +30 -0
- package/dist/editor/index.js.map +1 -0
- package/dist/editor/plugin/P1Plugin.d.ts +161 -0
- package/dist/editor/plugin/P1Plugin.d.ts.map +1 -0
- package/dist/editor/plugin/P1Plugin.js +358 -0
- package/dist/editor/plugin/P1Plugin.js.map +1 -0
- package/dist/editor/plugin/createP1Overrides.d.ts +161 -0
- package/dist/editor/plugin/createP1Overrides.d.ts.map +1 -0
- package/dist/editor/plugin/createP1Overrides.js +103 -0
- package/dist/editor/plugin/createP1Overrides.js.map +1 -0
- package/dist/editor/plugin/index.d.ts +13 -0
- package/dist/editor/plugin/index.d.ts.map +1 -0
- package/dist/editor/plugin/index.js +10 -0
- package/dist/editor/plugin/index.js.map +1 -0
- package/dist/editor/plugin/mergePreviewPlugin.d.ts +9 -0
- package/dist/editor/plugin/mergePreviewPlugin.d.ts.map +1 -0
- package/dist/editor/plugin/mergePreviewPlugin.js +26 -0
- package/dist/editor/plugin/mergePreviewPlugin.js.map +1 -0
- package/dist/editor/presets.d.ts +8 -0
- package/dist/editor/presets.d.ts.map +1 -0
- package/dist/editor/presets.js +24 -0
- package/dist/editor/presets.js.map +1 -0
- package/dist/editor/useAutoSave.d.ts +37 -0
- package/dist/editor/useAutoSave.d.ts.map +1 -0
- package/dist/editor/useAutoSave.js +118 -0
- package/dist/editor/useAutoSave.js.map +1 -0
- package/dist/editor/useBranches.d.ts +67 -0
- package/dist/editor/useBranches.d.ts.map +1 -0
- package/dist/editor/useBranches.js +78 -0
- package/dist/editor/useBranches.js.map +1 -0
- package/dist/editor/useComponentRegistry.d.ts +31 -0
- package/dist/editor/useComponentRegistry.d.ts.map +1 -0
- package/dist/editor/useComponentRegistry.js +237 -0
- package/dist/editor/useComponentRegistry.js.map +1 -0
- package/dist/editor/useDocuments.d.ts +66 -0
- package/dist/editor/useDocuments.d.ts.map +1 -0
- package/dist/editor/useDocuments.js +112 -0
- package/dist/editor/useDocuments.js.map +1 -0
- package/dist/editor/useMergePreview.d.ts +15 -0
- package/dist/editor/useMergePreview.d.ts.map +1 -0
- package/dist/editor/useMergePreview.js +56 -0
- package/dist/editor/useMergePreview.js.map +1 -0
- package/dist/editor/useP1Editor.d.ts +125 -0
- package/dist/editor/useP1Editor.d.ts.map +1 -0
- package/dist/editor/useP1Editor.js +339 -0
- package/dist/editor/useP1Editor.js.map +1 -0
- package/dist/editor/useP1Overrides.d.ts +52 -0
- package/dist/editor/useP1Overrides.d.ts.map +1 -0
- package/dist/editor/useP1Overrides.js +74 -0
- package/dist/editor/useP1Overrides.js.map +1 -0
- package/dist/editor/useP1Plugin.d.ts +95 -0
- package/dist/editor/useP1Plugin.d.ts.map +1 -0
- package/dist/editor/useP1Plugin.js +112 -0
- package/dist/editor/useP1Plugin.js.map +1 -0
- package/dist/editor/useRealtime.d.ts +148 -0
- package/dist/editor/useRealtime.d.ts.map +1 -0
- package/dist/editor/useRealtime.js +244 -0
- package/dist/editor/useRealtime.js.map +1 -0
- package/dist/editor/utils/buildThumbnailOverride.d.ts +28 -0
- package/dist/editor/utils/buildThumbnailOverride.d.ts.map +1 -0
- package/dist/editor/utils/buildThumbnailOverride.js +39 -0
- package/dist/editor/utils/buildThumbnailOverride.js.map +1 -0
- package/dist/editor/utils/componentRegistry.d.ts +141 -0
- package/dist/editor/utils/componentRegistry.d.ts.map +1 -0
- package/dist/editor/utils/componentRegistry.js +238 -0
- package/dist/editor/utils/componentRegistry.js.map +1 -0
- package/dist/editor/utils/createStablePluginArray.d.ts +27 -0
- package/dist/editor/utils/createStablePluginArray.d.ts.map +1 -0
- package/dist/editor/utils/createStablePluginArray.js +40 -0
- package/dist/editor/utils/createStablePluginArray.js.map +1 -0
- package/dist/editor/utils/path.d.ts +2 -0
- package/dist/editor/utils/path.d.ts.map +1 -0
- package/dist/editor/utils/path.js +20 -0
- package/dist/editor/utils/path.js.map +1 -0
- package/dist/editor/utils/puckYjsBinding.d.ts +66 -0
- package/dist/editor/utils/puckYjsBinding.d.ts.map +1 -0
- package/dist/editor/utils/puckYjsBinding.js +272 -0
- package/dist/editor/utils/puckYjsBinding.js.map +1 -0
- package/dist/index.d.ts +121 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +109 -0
- package/dist/index.js.map +1 -0
- package/dist/merge/components/conflict-notifications/ConflictNotificationToast.d.ts +35 -0
- package/dist/merge/components/conflict-notifications/ConflictNotificationToast.d.ts.map +1 -0
- package/dist/merge/components/conflict-notifications/ConflictNotificationToast.js +59 -0
- package/dist/merge/components/conflict-notifications/ConflictNotificationToast.js.map +1 -0
- package/dist/merge/components/conflict-notifications/index.d.ts +10 -0
- package/dist/merge/components/conflict-notifications/index.d.ts.map +1 -0
- package/dist/merge/components/conflict-notifications/index.js +8 -0
- package/dist/merge/components/conflict-notifications/index.js.map +1 -0
- package/dist/merge/components/conflict-notifications/useConflictNotifications.d.ts +69 -0
- package/dist/merge/components/conflict-notifications/useConflictNotifications.d.ts.map +1 -0
- package/dist/merge/components/conflict-notifications/useConflictNotifications.js +151 -0
- package/dist/merge/components/conflict-notifications/useConflictNotifications.js.map +1 -0
- package/dist/merge/components/conflict-resolution/ComponentConflictGroup.d.ts +55 -0
- package/dist/merge/components/conflict-resolution/ComponentConflictGroup.d.ts.map +1 -0
- package/dist/merge/components/conflict-resolution/ComponentConflictGroup.js +112 -0
- package/dist/merge/components/conflict-resolution/ComponentConflictGroup.js.map +1 -0
- package/dist/merge/components/conflict-resolution/PuckFieldResolutionPanel.d.ts +51 -0
- package/dist/merge/components/conflict-resolution/PuckFieldResolutionPanel.d.ts.map +1 -0
- package/dist/merge/components/conflict-resolution/PuckFieldResolutionPanel.js +75 -0
- package/dist/merge/components/conflict-resolution/PuckFieldResolutionPanel.js.map +1 -0
- package/dist/merge/components/conflict-resolution/RenderedResolutionPreview.d.ts +37 -0
- package/dist/merge/components/conflict-resolution/RenderedResolutionPreview.d.ts.map +1 -0
- package/dist/merge/components/conflict-resolution/RenderedResolutionPreview.js +42 -0
- package/dist/merge/components/conflict-resolution/RenderedResolutionPreview.js.map +1 -0
- package/dist/merge/components/conflict-resolution/index.d.ts +12 -0
- package/dist/merge/components/conflict-resolution/index.d.ts.map +1 -0
- package/dist/merge/components/conflict-resolution/index.js +9 -0
- package/dist/merge/components/conflict-resolution/index.js.map +1 -0
- package/dist/merge/components/merge-resolution/CherryPickVisualPanel.d.ts +44 -0
- package/dist/merge/components/merge-resolution/CherryPickVisualPanel.d.ts.map +1 -0
- package/dist/merge/components/merge-resolution/CherryPickVisualPanel.js +186 -0
- package/dist/merge/components/merge-resolution/CherryPickVisualPanel.js.map +1 -0
- package/dist/merge/components/merge-resolution/ComponentClickOverlay.d.ts +34 -0
- package/dist/merge/components/merge-resolution/ComponentClickOverlay.d.ts.map +1 -0
- package/dist/merge/components/merge-resolution/ComponentClickOverlay.js +141 -0
- package/dist/merge/components/merge-resolution/ComponentClickOverlay.js.map +1 -0
- package/dist/merge/components/merge-resolution/DocumentResolutionDetail.d.ts +26 -0
- package/dist/merge/components/merge-resolution/DocumentResolutionDetail.d.ts.map +1 -0
- package/dist/merge/components/merge-resolution/DocumentResolutionDetail.js +167 -0
- package/dist/merge/components/merge-resolution/DocumentResolutionDetail.js.map +1 -0
- package/dist/merge/components/merge-resolution/DocumentResolutionList.d.ts +21 -0
- package/dist/merge/components/merge-resolution/DocumentResolutionList.d.ts.map +1 -0
- package/dist/merge/components/merge-resolution/DocumentResolutionList.js +106 -0
- package/dist/merge/components/merge-resolution/DocumentResolutionList.js.map +1 -0
- package/dist/merge/components/merge-resolution/MergeResolutionPage.d.ts +15 -0
- package/dist/merge/components/merge-resolution/MergeResolutionPage.d.ts.map +1 -0
- package/dist/merge/components/merge-resolution/MergeResolutionPage.js +90 -0
- package/dist/merge/components/merge-resolution/MergeResolutionPage.js.map +1 -0
- package/dist/merge/components/merge-resolution/MergeResolutionToolbar.d.ts +26 -0
- package/dist/merge/components/merge-resolution/MergeResolutionToolbar.d.ts.map +1 -0
- package/dist/merge/components/merge-resolution/MergeResolutionToolbar.js +23 -0
- package/dist/merge/components/merge-resolution/MergeResolutionToolbar.js.map +1 -0
- package/dist/merge/components/merge-resolution/MergeReviewPage.d.ts +11 -0
- package/dist/merge/components/merge-resolution/MergeReviewPage.d.ts.map +1 -0
- package/dist/merge/components/merge-resolution/MergeReviewPage.js +26 -0
- package/dist/merge/components/merge-resolution/MergeReviewPage.js.map +1 -0
- package/dist/merge/components/merge-resolution/ResolutionStrategyPicker.d.ts +16 -0
- package/dist/merge/components/merge-resolution/ResolutionStrategyPicker.d.ts.map +1 -0
- package/dist/merge/components/merge-resolution/ResolutionStrategyPicker.js +15 -0
- package/dist/merge/components/merge-resolution/ResolutionStrategyPicker.js.map +1 -0
- package/dist/merge/components/merge-resolution/index.d.ts +20 -0
- package/dist/merge/components/merge-resolution/index.d.ts.map +1 -0
- package/dist/merge/components/merge-resolution/index.js +12 -0
- package/dist/merge/components/merge-resolution/index.js.map +1 -0
- package/dist/merge/index.d.ts +8 -0
- package/dist/merge/index.d.ts.map +1 -0
- package/dist/merge/index.js +6 -0
- package/dist/merge/index.js.map +1 -0
- package/dist/merge/useMergeResolution.d.ts +65 -0
- package/dist/merge/useMergeResolution.d.ts.map +1 -0
- package/dist/merge/useMergeResolution.js +444 -0
- package/dist/merge/useMergeResolution.js.map +1 -0
- package/dist/merge/utils/puckFieldClassifier.d.ts +151 -0
- package/dist/merge/utils/puckFieldClassifier.d.ts.map +1 -0
- package/dist/merge/utils/puckFieldClassifier.js +427 -0
- package/dist/merge/utils/puckFieldClassifier.js.map +1 -0
- package/dist/p1/editor/client.d.ts +17 -0
- package/dist/p1/editor/client.d.ts.map +1 -0
- package/dist/p1/editor/client.js +79 -0
- package/dist/p1/editor/client.js.map +1 -0
- package/dist/p1/editor/connect/connect-field-modal.d.ts +11 -0
- package/dist/p1/editor/connect/connect-field-modal.d.ts.map +1 -0
- package/dist/p1/editor/connect/connect-field-modal.js +127 -0
- package/dist/p1/editor/connect/connect-field-modal.js.map +1 -0
- package/dist/p1/editor/connect/connect-preview-config.d.ts +7 -0
- package/dist/p1/editor/connect/connect-preview-config.d.ts.map +1 -0
- package/dist/p1/editor/connect/connect-preview-config.js +76 -0
- package/dist/p1/editor/connect/connect-preview-config.js.map +1 -0
- package/dist/p1/editor/connect/field-connect-plugin.d.ts +10 -0
- package/dist/p1/editor/connect/field-connect-plugin.d.ts.map +1 -0
- package/dist/p1/editor/connect/field-connect-plugin.js +46 -0
- package/dist/p1/editor/connect/field-connect-plugin.js.map +1 -0
- package/dist/p1/editor/editor-preview-resolve.d.ts +11 -0
- package/dist/p1/editor/editor-preview-resolve.d.ts.map +1 -0
- package/dist/p1/editor/editor-preview-resolve.js +115 -0
- package/dist/p1/editor/editor-preview-resolve.js.map +1 -0
- package/dist/p1/editor/hooks.d.ts +42 -0
- package/dist/p1/editor/hooks.d.ts.map +1 -0
- package/dist/p1/editor/hooks.js +219 -0
- package/dist/p1/editor/hooks.js.map +1 -0
- package/dist/p1/editor/icons/button-block-icon.d.ts +2 -0
- package/dist/p1/editor/icons/button-block-icon.d.ts.map +1 -0
- package/dist/p1/editor/icons/button-block-icon.js +5 -0
- package/dist/p1/editor/icons/button-block-icon.js.map +1 -0
- package/dist/p1/editor/icons/default-block-icon.d.ts +2 -0
- package/dist/p1/editor/icons/default-block-icon.d.ts.map +1 -0
- package/dist/p1/editor/icons/default-block-icon.js +5 -0
- package/dist/p1/editor/icons/default-block-icon.js.map +1 -0
- package/dist/p1/editor/icons/divider-block-icon.d.ts +2 -0
- package/dist/p1/editor/icons/divider-block-icon.d.ts.map +1 -0
- package/dist/p1/editor/icons/divider-block-icon.js +5 -0
- package/dist/p1/editor/icons/divider-block-icon.js.map +1 -0
- package/dist/p1/editor/icons/grid-block-icon.d.ts +2 -0
- package/dist/p1/editor/icons/grid-block-icon.d.ts.map +1 -0
- package/dist/p1/editor/icons/grid-block-icon.js +5 -0
- package/dist/p1/editor/icons/grid-block-icon.js.map +1 -0
- package/dist/p1/editor/icons/heading-block-icon.d.ts +2 -0
- package/dist/p1/editor/icons/heading-block-icon.d.ts.map +1 -0
- package/dist/p1/editor/icons/heading-block-icon.js +5 -0
- package/dist/p1/editor/icons/heading-block-icon.js.map +1 -0
- package/dist/p1/editor/icons/image-block-icon.d.ts +2 -0
- package/dist/p1/editor/icons/image-block-icon.d.ts.map +1 -0
- package/dist/p1/editor/icons/image-block-icon.js +5 -0
- package/dist/p1/editor/icons/image-block-icon.js.map +1 -0
- package/dist/p1/editor/icons/list-block-icon.d.ts +2 -0
- package/dist/p1/editor/icons/list-block-icon.d.ts.map +1 -0
- package/dist/p1/editor/icons/list-block-icon.js +5 -0
- package/dist/p1/editor/icons/list-block-icon.js.map +1 -0
- package/dist/p1/editor/icons/paragraph-block-icon.d.ts +2 -0
- package/dist/p1/editor/icons/paragraph-block-icon.d.ts.map +1 -0
- package/dist/p1/editor/icons/paragraph-block-icon.js +5 -0
- package/dist/p1/editor/icons/paragraph-block-icon.js.map +1 -0
- package/dist/p1/editor/icons/quote-block-icon.d.ts +2 -0
- package/dist/p1/editor/icons/quote-block-icon.d.ts.map +1 -0
- package/dist/p1/editor/icons/quote-block-icon.js +5 -0
- package/dist/p1/editor/icons/quote-block-icon.js.map +1 -0
- package/dist/p1/editor/icons/spacer-block-icon.d.ts +2 -0
- package/dist/p1/editor/icons/spacer-block-icon.d.ts.map +1 -0
- package/dist/p1/editor/icons/spacer-block-icon.js +5 -0
- package/dist/p1/editor/icons/spacer-block-icon.js.map +1 -0
- package/dist/p1/editor/index.d.ts +9 -0
- package/dist/p1/editor/index.d.ts.map +1 -0
- package/dist/p1/editor/index.js +9 -0
- package/dist/p1/editor/index.js.map +1 -0
- package/dist/p1/editor/json-tree.d.ts +6 -0
- package/dist/p1/editor/json-tree.d.ts.map +1 -0
- package/dist/p1/editor/json-tree.js +64 -0
- package/dist/p1/editor/json-tree.js.map +1 -0
- package/dist/p1/editor/remote-datasources/remote-datasource-explorer-plugin.d.ts +11 -0
- package/dist/p1/editor/remote-datasources/remote-datasource-explorer-plugin.d.ts.map +1 -0
- package/dist/p1/editor/remote-datasources/remote-datasource-explorer-plugin.js +62 -0
- package/dist/p1/editor/remote-datasources/remote-datasource-explorer-plugin.js.map +1 -0
- package/dist/p1/editor/remote-datasources/remote-datasource-form-helpers.d.ts +23 -0
- package/dist/p1/editor/remote-datasources/remote-datasource-form-helpers.d.ts.map +1 -0
- package/dist/p1/editor/remote-datasources/remote-datasource-form-helpers.js +39 -0
- package/dist/p1/editor/remote-datasources/remote-datasource-form-helpers.js.map +1 -0
- package/dist/p1/editor/remote-datasources/remote-datasource-manager.d.ts +4 -0
- package/dist/p1/editor/remote-datasources/remote-datasource-manager.d.ts.map +1 -0
- package/dist/p1/editor/remote-datasources/remote-datasource-manager.js +72 -0
- package/dist/p1/editor/remote-datasources/remote-datasource-manager.js.map +1 -0
- package/dist/p1/editor/remote-datasources/template-preview-params-toolbar.d.ts +6 -0
- package/dist/p1/editor/remote-datasources/template-preview-params-toolbar.d.ts.map +1 -0
- package/dist/p1/editor/remote-datasources/template-preview-params-toolbar.js +67 -0
- package/dist/p1/editor/remote-datasources/template-preview-params-toolbar.js.map +1 -0
- package/dist/p1/editor/template-autocomplete-layer.d.ts +11 -0
- package/dist/p1/editor/template-autocomplete-layer.d.ts.map +1 -0
- package/dist/p1/editor/template-autocomplete-layer.js +386 -0
- package/dist/p1/editor/template-autocomplete-layer.js.map +1 -0
- package/dist/p1/pages/add-override-for-template.d.ts +4 -0
- package/dist/p1/pages/add-override-for-template.d.ts.map +1 -0
- package/dist/p1/pages/add-override-for-template.js +47 -0
- package/dist/p1/pages/add-override-for-template.js.map +1 -0
- package/dist/p1/pages/create-page-form.d.ts +2 -0
- package/dist/p1/pages/create-page-form.d.ts.map +1 -0
- package/dist/p1/pages/create-page-form.js +28 -0
- package/dist/p1/pages/create-page-form.js.map +1 -0
- package/dist/p1/pages/create-template-form.d.ts +2 -0
- package/dist/p1/pages/create-template-form.d.ts.map +1 -0
- package/dist/p1/pages/create-template-form.js +36 -0
- package/dist/p1/pages/create-template-form.js.map +1 -0
- package/dist/p1/pages/delete-row-button.d.ts +7 -0
- package/dist/p1/pages/delete-row-button.d.ts.map +1 -0
- package/dist/p1/pages/delete-row-button.js +23 -0
- package/dist/p1/pages/delete-row-button.js.map +1 -0
- package/dist/p1/pages/hooks.d.ts +5 -0
- package/dist/p1/pages/hooks.d.ts.map +1 -0
- package/dist/p1/pages/hooks.js +55 -0
- package/dist/p1/pages/hooks.js.map +1 -0
- package/dist/p1/pages/index.d.ts +7 -0
- package/dist/p1/pages/index.d.ts.map +1 -0
- package/dist/p1/pages/index.js +7 -0
- package/dist/p1/pages/index.js.map +1 -0
- package/dist/p1/pages/render-client.d.ts +6 -0
- package/dist/p1/pages/render-client.d.ts.map +1 -0
- package/dist/p1/pages/render-client.js +7 -0
- package/dist/p1/pages/render-client.js.map +1 -0
- package/dist/p1/pages/structure-page.d.ts +2 -0
- package/dist/p1/pages/structure-page.d.ts.map +1 -0
- package/dist/p1/pages/structure-page.js +46 -0
- package/dist/p1/pages/structure-page.js.map +1 -0
- package/dist/p1/router-context.d.ts +11 -0
- package/dist/p1/router-context.d.ts.map +1 -0
- package/dist/p1/router-context.js +11 -0
- package/dist/p1/router-context.js.map +1 -0
- package/dist/pds/components/AgentChip.d.ts +26 -0
- package/dist/pds/components/AgentChip.d.ts.map +1 -0
- package/dist/pds/components/AgentChip.js +15 -0
- package/dist/pds/components/AgentChip.js.map +1 -0
- package/dist/pds/components/AgentChip.module.css +141 -0
- package/dist/pds/components/DocStateBadge.d.ts +7 -0
- package/dist/pds/components/DocStateBadge.d.ts.map +1 -0
- package/dist/pds/components/DocStateBadge.js +24 -0
- package/dist/pds/components/DocStateBadge.js.map +1 -0
- package/dist/pds/components/NavIcon.d.ts +7 -0
- package/dist/pds/components/NavIcon.d.ts.map +1 -0
- package/dist/pds/components/NavIcon.js +6 -0
- package/dist/pds/components/NavIcon.js.map +1 -0
- package/dist/pds/components/P1EditorHeader.d.ts +41 -0
- package/dist/pds/components/P1EditorHeader.d.ts.map +1 -0
- package/dist/pds/components/P1EditorHeader.js +138 -0
- package/dist/pds/components/P1EditorHeader.js.map +1 -0
- package/dist/pds/components/P1EditorHeader.module.css +253 -0
- package/dist/pds/components/P1EditorSubheader.d.ts +42 -0
- package/dist/pds/components/P1EditorSubheader.d.ts.map +1 -0
- package/dist/pds/components/P1EditorSubheader.js +27 -0
- package/dist/pds/components/P1EditorSubheader.js.map +1 -0
- package/dist/pds/components/P1EditorSubheader.module.css +81 -0
- package/dist/pds/components/PageNavigator.d.ts +38 -0
- package/dist/pds/components/PageNavigator.d.ts.map +1 -0
- package/dist/pds/components/PageNavigator.js +60 -0
- package/dist/pds/components/PageNavigator.js.map +1 -0
- package/dist/pds/components/PageNavigator.module.css +276 -0
- package/dist/pds/components/PresenceStack.d.ts +17 -0
- package/dist/pds/components/PresenceStack.d.ts.map +1 -0
- package/dist/pds/components/PresenceStack.js +14 -0
- package/dist/pds/components/PresenceStack.js.map +1 -0
- package/dist/pds/components/PresenceStack.module.css +48 -0
- package/dist/pds/components/PublishControl.d.ts +15 -0
- package/dist/pds/components/PublishControl.d.ts.map +1 -0
- package/dist/pds/components/PublishControl.js +46 -0
- package/dist/pds/components/PublishControl.js.map +1 -0
- package/dist/pds/components/PublishControl.module.css +36 -0
- package/dist/pds/components/WorkstreamSwitcher.d.ts +26 -0
- package/dist/pds/components/WorkstreamSwitcher.d.ts.map +1 -0
- package/dist/pds/components/WorkstreamSwitcher.js +134 -0
- package/dist/pds/components/WorkstreamSwitcher.js.map +1 -0
- package/dist/pds/components/WorkstreamSwitcher.module.css +320 -0
- package/dist/pds/index.d.ts +33 -0
- package/dist/pds/index.d.ts.map +1 -0
- package/dist/pds/index.js +46 -0
- package/dist/pds/index.js.map +1 -0
- package/dist/pds/theme/pds-core-content.d.ts +2 -0
- package/dist/pds/theme/pds-core-content.d.ts.map +1 -0
- package/dist/pds/theme/pds-core-content.js +8 -0
- package/dist/pds/theme/pds-core-content.js.map +1 -0
- package/dist/pds/types.d.ts +7 -0
- package/dist/pds/types.d.ts.map +1 -0
- package/dist/pds/types.js +2 -0
- package/dist/pds/types.js.map +1 -0
- package/dist/pds/utils/deriveDocState.d.ts +8 -0
- package/dist/pds/utils/deriveDocState.d.ts.map +1 -0
- package/dist/pds/utils/deriveDocState.js +14 -0
- package/dist/pds/utils/deriveDocState.js.map +1 -0
- package/dist/server.d.ts +23 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +24 -0
- package/dist/server.js.map +1 -0
- package/dist/versioning/components/HistoricalVersionBanner.d.ts +28 -0
- package/dist/versioning/components/HistoricalVersionBanner.d.ts.map +1 -0
- package/dist/versioning/components/HistoricalVersionBanner.js +23 -0
- package/dist/versioning/components/HistoricalVersionBanner.js.map +1 -0
- package/dist/versioning/components/VersionPublishedBadge.d.ts +5 -0
- package/dist/versioning/components/VersionPublishedBadge.d.ts.map +1 -0
- package/dist/versioning/components/VersionPublishedBadge.js +8 -0
- package/dist/versioning/components/VersionPublishedBadge.js.map +1 -0
- package/dist/versioning/components/version-compare/BranchDiffHeader.d.ts +53 -0
- package/dist/versioning/components/version-compare/BranchDiffHeader.d.ts.map +1 -0
- package/dist/versioning/components/version-compare/BranchDiffHeader.js +15 -0
- package/dist/versioning/components/version-compare/BranchDiffHeader.js.map +1 -0
- package/dist/versioning/components/version-compare/BranchMergeCompare.d.ts +43 -0
- package/dist/versioning/components/version-compare/BranchMergeCompare.d.ts.map +1 -0
- package/dist/versioning/components/version-compare/BranchMergeCompare.js +70 -0
- package/dist/versioning/components/version-compare/BranchMergeCompare.js.map +1 -0
- package/dist/versioning/components/version-compare/ComponentNode.d.ts +34 -0
- package/dist/versioning/components/version-compare/ComponentNode.d.ts.map +1 -0
- package/dist/versioning/components/version-compare/ComponentNode.js +40 -0
- package/dist/versioning/components/version-compare/ComponentNode.js.map +1 -0
- package/dist/versioning/components/version-compare/ComponentTree.d.ts +34 -0
- package/dist/versioning/components/version-compare/ComponentTree.d.ts.map +1 -0
- package/dist/versioning/components/version-compare/ComponentTree.js +35 -0
- package/dist/versioning/components/version-compare/ComponentTree.js.map +1 -0
- package/dist/versioning/components/version-compare/DiffHeader.d.ts +45 -0
- package/dist/versioning/components/version-compare/DiffHeader.d.ts.map +1 -0
- package/dist/versioning/components/version-compare/DiffHeader.js +11 -0
- package/dist/versioning/components/version-compare/DiffHeader.js.map +1 -0
- package/dist/versioning/components/version-compare/DocumentDiffList.d.ts +39 -0
- package/dist/versioning/components/version-compare/DocumentDiffList.d.ts.map +1 -0
- package/dist/versioning/components/version-compare/DocumentDiffList.js +32 -0
- package/dist/versioning/components/version-compare/DocumentDiffList.js.map +1 -0
- package/dist/versioning/components/version-compare/PropDiffPanel.d.ts +30 -0
- package/dist/versioning/components/version-compare/PropDiffPanel.d.ts.map +1 -0
- package/dist/versioning/components/version-compare/PropDiffPanel.js +34 -0
- package/dist/versioning/components/version-compare/PropDiffPanel.js.map +1 -0
- package/dist/versioning/components/version-compare/PropDiffRow.d.ts +22 -0
- package/dist/versioning/components/version-compare/PropDiffRow.d.ts.map +1 -0
- package/dist/versioning/components/version-compare/PropDiffRow.js +12 -0
- package/dist/versioning/components/version-compare/PropDiffRow.js.map +1 -0
- package/dist/versioning/components/version-compare/PropValueDisplay.d.ts +36 -0
- package/dist/versioning/components/version-compare/PropValueDisplay.d.ts.map +1 -0
- package/dist/versioning/components/version-compare/PropValueDisplay.js +79 -0
- package/dist/versioning/components/version-compare/PropValueDisplay.js.map +1 -0
- package/dist/versioning/components/version-compare/VersionComparePage.d.ts +34 -0
- package/dist/versioning/components/version-compare/VersionComparePage.d.ts.map +1 -0
- package/dist/versioning/components/version-compare/VersionComparePage.js +61 -0
- package/dist/versioning/components/version-compare/VersionComparePage.js.map +1 -0
- package/dist/versioning/components/version-compare/VisualBranchCompare.d.ts +41 -0
- package/dist/versioning/components/version-compare/VisualBranchCompare.d.ts.map +1 -0
- package/dist/versioning/components/version-compare/VisualBranchCompare.js +84 -0
- package/dist/versioning/components/version-compare/VisualBranchCompare.js.map +1 -0
- package/dist/versioning/components/version-compare/VisualVersionCompare.d.ts +67 -0
- package/dist/versioning/components/version-compare/VisualVersionCompare.d.ts.map +1 -0
- package/dist/versioning/components/version-compare/VisualVersionCompare.js +84 -0
- package/dist/versioning/components/version-compare/VisualVersionCompare.js.map +1 -0
- package/dist/versioning/components/version-compare/index.d.ts +30 -0
- package/dist/versioning/components/version-compare/index.d.ts.map +1 -0
- package/dist/versioning/components/version-compare/index.js +18 -0
- package/dist/versioning/components/version-compare/index.js.map +1 -0
- package/dist/versioning/components/version-history/AgentCheckpointBadge.d.ts +22 -0
- package/dist/versioning/components/version-history/AgentCheckpointBadge.d.ts.map +1 -0
- package/dist/versioning/components/version-history/AgentCheckpointBadge.js +55 -0
- package/dist/versioning/components/version-history/AgentCheckpointBadge.js.map +1 -0
- package/dist/versioning/components/version-history/VersionItem.d.ts +30 -0
- package/dist/versioning/components/version-history/VersionItem.d.ts.map +1 -0
- package/dist/versioning/components/version-history/VersionItem.js +39 -0
- package/dist/versioning/components/version-history/VersionItem.js.map +1 -0
- package/dist/versioning/components/version-history/index.d.ts +10 -0
- package/dist/versioning/components/version-history/index.d.ts.map +1 -0
- package/dist/versioning/components/version-history/index.js +8 -0
- package/dist/versioning/components/version-history/index.js.map +1 -0
- package/dist/versioning/index.d.ts +17 -0
- package/dist/versioning/index.d.ts.map +1 -0
- package/dist/versioning/index.js +10 -0
- package/dist/versioning/index.js.map +1 -0
- package/dist/versioning/useCheckpoints.d.ts +66 -0
- package/dist/versioning/useCheckpoints.d.ts.map +1 -0
- package/dist/versioning/useCheckpoints.js +100 -0
- package/dist/versioning/useCheckpoints.js.map +1 -0
- package/dist/versioning/useVersions.d.ts +81 -0
- package/dist/versioning/useVersions.d.ts.map +1 -0
- package/dist/versioning/useVersions.js +110 -0
- package/dist/versioning/useVersions.js.map +1 -0
- package/dist/versioning/utils/branchDiff.d.ts +136 -0
- package/dist/versioning/utils/branchDiff.d.ts.map +1 -0
- package/dist/versioning/utils/branchDiff.js +172 -0
- package/dist/versioning/utils/branchDiff.js.map +1 -0
- package/dist/versioning/utils/diff.d.ts +63 -0
- package/dist/versioning/utils/diff.d.ts.map +1 -0
- package/dist/versioning/utils/diff.js +318 -0
- package/dist/versioning/utils/diff.js.map +1 -0
- package/dist/versioning/utils/highlightConfig.d.ts +41 -0
- package/dist/versioning/utils/highlightConfig.d.ts.map +1 -0
- package/dist/versioning/utils/highlightConfig.js +130 -0
- package/dist/versioning/utils/highlightConfig.js.map +1 -0
- package/package.json +113 -0
- package/src/pds/theme/PuckEditorTheme.css +277 -0
- package/src/pds/theme/PuckEditorTheme.test.ts +136 -0
- package/src/pds/theme/pds-core-content.ts +7 -0
- package/src/pds/theme/pds-core.css +2 -0
- package/src/styles.css +2366 -0
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* useSitePresence Hook
|
|
3
|
+
*
|
|
4
|
+
* Provides site-level presence aggregation with polling.
|
|
5
|
+
*/
|
|
6
|
+
import { useState, useCallback, useEffect, useRef } from 'react';
|
|
7
|
+
import { usePresenceContext } from '../core/PresenceContext.js';
|
|
8
|
+
/**
|
|
9
|
+
* Hook for consuming site-level presence data.
|
|
10
|
+
*
|
|
11
|
+
* @param options - Configuration options
|
|
12
|
+
* @returns Site presence state and operations
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```tsx
|
|
16
|
+
* function SiteCollaborators() {
|
|
17
|
+
* const { presence, activeBranches, totalActors } = useSitePresence();
|
|
18
|
+
*
|
|
19
|
+
* return (
|
|
20
|
+
* <div>
|
|
21
|
+
* <span>{totalActors} collaborators on this site</span>
|
|
22
|
+
* {activeBranches.map(branch => (
|
|
23
|
+
* <BranchBadge key={branch.branchId} name={branch.branchName} />
|
|
24
|
+
* ))}
|
|
25
|
+
* </div>
|
|
26
|
+
* );
|
|
27
|
+
* }
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
export function useSitePresence(options = {}) {
|
|
31
|
+
const { pollingInterval = 10000 } = options;
|
|
32
|
+
const { client, siteId } = usePresenceContext();
|
|
33
|
+
const [presence, setPresence] = useState(null);
|
|
34
|
+
const [isLoading, setIsLoading] = useState(true);
|
|
35
|
+
const [error, setError] = useState(null);
|
|
36
|
+
// Track mounted state to avoid state updates after unmount
|
|
37
|
+
const mountedRef = useRef(true);
|
|
38
|
+
// Ref for fetchPresence to avoid restarting polling interval
|
|
39
|
+
const fetchPresenceRef = useRef(async () => { });
|
|
40
|
+
// Fetch presence data
|
|
41
|
+
const fetchPresence = useCallback(async () => {
|
|
42
|
+
try {
|
|
43
|
+
const sitePresence = await client.presence.getSitePresence(siteId);
|
|
44
|
+
if (!mountedRef.current)
|
|
45
|
+
return;
|
|
46
|
+
setPresence(sitePresence);
|
|
47
|
+
setError(null);
|
|
48
|
+
}
|
|
49
|
+
catch (err) {
|
|
50
|
+
if (!mountedRef.current)
|
|
51
|
+
return;
|
|
52
|
+
setError(err instanceof Error ? err : new Error(String(err)));
|
|
53
|
+
}
|
|
54
|
+
finally {
|
|
55
|
+
if (mountedRef.current) {
|
|
56
|
+
setIsLoading(false);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}, [client, siteId]);
|
|
60
|
+
// Keep ref in sync with callback
|
|
61
|
+
useEffect(() => {
|
|
62
|
+
fetchPresenceRef.current = fetchPresence;
|
|
63
|
+
}, [fetchPresence]);
|
|
64
|
+
// Manual refresh function
|
|
65
|
+
const refresh = useCallback(async () => {
|
|
66
|
+
await fetchPresence();
|
|
67
|
+
}, [fetchPresence]);
|
|
68
|
+
// Initial fetch and polling
|
|
69
|
+
useEffect(() => {
|
|
70
|
+
mountedRef.current = true;
|
|
71
|
+
// Initial fetch
|
|
72
|
+
void fetchPresenceRef.current();
|
|
73
|
+
// Set up polling - use ref to avoid restarting interval when callback changes
|
|
74
|
+
const intervalId = setInterval(() => {
|
|
75
|
+
void fetchPresenceRef.current();
|
|
76
|
+
}, pollingInterval);
|
|
77
|
+
return () => {
|
|
78
|
+
mountedRef.current = false;
|
|
79
|
+
clearInterval(intervalId);
|
|
80
|
+
};
|
|
81
|
+
}, [pollingInterval]);
|
|
82
|
+
// Derived values
|
|
83
|
+
const activeBranches = presence?.branches ?? [];
|
|
84
|
+
const totalActors = presence?.summary.totalActors ?? 0;
|
|
85
|
+
return {
|
|
86
|
+
presence,
|
|
87
|
+
activeBranches,
|
|
88
|
+
totalActors,
|
|
89
|
+
isLoading,
|
|
90
|
+
error,
|
|
91
|
+
refresh,
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
//# sourceMappingURL=useSitePresence.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSitePresence.js","sourceRoot":"","sources":["../../src/collaboration/useSitePresence.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAEjE,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AA4BhE;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,UAAU,eAA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EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IAErB,iCAAiC;IACjC,SAAS,CAAC,GAAG,EAAE;QACb,gBAAgB,CAAC,OAAO,GAAG,aAAa,CAAC;IAC3C,CAAC,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC;IAEpB,0BAA0B;IAC1B,MAAM,OAAO,GAAG,WAAW,CAAC,KAAK,IAAI,EAAE;QACrC,MAAM,aAAa,EAAE,CAAC;IACxB,CAAC,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC;IAEpB,4BAA4B;IAC5B,SAAS,CAAC,GAAG,EAAE;QACb,UAAU,CAAC,OAAO,GAAG,IAAI,CAAC;QAE1B,gBAAgB;QAChB,KAAK,gBAAgB,CAAC,OAAO,EAAE,CAAC;QAEhC,8EAA8E;QAC9E,MAAM,UAAU,GAAG,WAAW,CAAC,GAAG,EAAE;YAClC,KAAK,gBAAgB,CAAC,OAAO,EAAE,CAAC;QAClC,CAAC,EAAE,eAAe,CAAC,CAAC;QAEpB,OAAO,GAAG,EAAE;YACV,UAAU,CAAC,OAAO,GAAG,KAAK,CAAC;YAC3B,aAAa,CAAC,UAAU,CAAC,CAAC;QAC5B,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,eAAe,CAAC,CAAC,CAAC;IAEtB,iBAAiB;IACjB,MAAM,cAAc,GAAG,QAAQ,EAAE,QAAQ,IAAI,EAAE,CAAC;IAChD,MAAM,WAAW,GAAG,QAAQ,EAAE,OAAO,CAAC,WAAW,IAAI,CAAC,CAAC;IAEvD,OAAO;QACL,QAAQ;QACR,cAAc;QACd,WAAW;QACX,SAAS;QACT,KAAK;QACL,OAAO;KACR,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
/** Returns a stable HSL color string for a given user/actor ID. */
|
|
3
|
+
export declare function getAvatarColor(id: string): string;
|
|
4
|
+
/**
|
|
5
|
+
* Returns a React style object that overrides all PDS Avatar gradient CSS custom
|
|
6
|
+
* properties with our stable per-user color. PDS Avatar v2 picks one of 16
|
|
7
|
+
* --pds-gradient-avatar-* variables based on uniqueId; overriding all of them
|
|
8
|
+
* ensures our color wins regardless of which the component selects.
|
|
9
|
+
*/
|
|
10
|
+
export declare function getAvatarStyleOverride(id: string): React.CSSProperties;
|
|
11
|
+
//# sourceMappingURL=avatarColor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"avatarColor.d.ts","sourceRoot":"","sources":["../../../src/collaboration/utils/avatarColor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAU/B,mEAAmE;AACnE,wBAAgB,cAAc,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAGjD;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,EAAE,EAAE,MAAM,GAAG,KAAK,CAAC,aAAa,CAsBtE"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
function hashString(str) {
|
|
2
|
+
let hash = 5381;
|
|
3
|
+
for (let i = 0; i < str.length; i++) {
|
|
4
|
+
hash = (hash * 33) ^ str.charCodeAt(i);
|
|
5
|
+
}
|
|
6
|
+
return hash >>> 0;
|
|
7
|
+
}
|
|
8
|
+
/** Returns a stable HSL color string for a given user/actor ID. */
|
|
9
|
+
export function getAvatarColor(id) {
|
|
10
|
+
const hue = hashString(id) % 360;
|
|
11
|
+
return `hsl(${hue}, 65%, 45%)`;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Returns a React style object that overrides all PDS Avatar gradient CSS custom
|
|
15
|
+
* properties with our stable per-user color. PDS Avatar v2 picks one of 16
|
|
16
|
+
* --pds-gradient-avatar-* variables based on uniqueId; overriding all of them
|
|
17
|
+
* ensures our color wins regardless of which the component selects.
|
|
18
|
+
*/
|
|
19
|
+
export function getAvatarStyleOverride(id) {
|
|
20
|
+
const color = getAvatarColor(id);
|
|
21
|
+
// PDS Avatar uses background-image, so the value must be a valid <image> type.
|
|
22
|
+
const gradient = `linear-gradient(${color}, ${color})`;
|
|
23
|
+
return {
|
|
24
|
+
'--pds-gradient-avatar-midnight': gradient,
|
|
25
|
+
'--pds-gradient-avatar-twilight': gradient,
|
|
26
|
+
'--pds-gradient-avatar-sunrise': gradient,
|
|
27
|
+
'--pds-gradient-avatar-dawn': gradient,
|
|
28
|
+
'--pds-gradient-avatar-sundown': gradient,
|
|
29
|
+
'--pds-gradient-avatar-dusk': gradient,
|
|
30
|
+
'--pds-gradient-avatar-plum': gradient,
|
|
31
|
+
'--pds-gradient-avatar-grape': gradient,
|
|
32
|
+
'--pds-gradient-avatar-dragonfruit': gradient,
|
|
33
|
+
'--pds-gradient-avatar-winter': gradient,
|
|
34
|
+
'--pds-gradient-avatar-spring': gradient,
|
|
35
|
+
'--pds-gradient-avatar-summer': gradient,
|
|
36
|
+
'--pds-gradient-avatar-fall': gradient,
|
|
37
|
+
'--pds-gradient-avatar-earth': gradient,
|
|
38
|
+
'--pds-gradient-avatar-moon': gradient,
|
|
39
|
+
'--pds-gradient-avatar-sun': gradient,
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=avatarColor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"avatarColor.js","sourceRoot":"","sources":["../../../src/collaboration/utils/avatarColor.ts"],"names":[],"mappings":"AAEA,SAAS,UAAU,CAAC,GAAW;IAC7B,IAAI,IAAI,GAAG,IAAI,CAAC;IAChB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACpC,IAAI,GAAG,CAAC,IAAI,GAAG,EAAE,CAAC,GAAG,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;IACzC,CAAC;IACD,OAAO,IAAI,KAAK,CAAC,CAAC;AACpB,CAAC;AAED,mEAAmE;AACnE,MAAM,UAAU,cAAc,CAAC,EAAU;IACvC,MAAM,GAAG,GAAG,UAAU,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC;IACjC,OAAO,OAAO,GAAG,aAAa,CAAC;AACjC,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,sBAAsB,CAAC,EAAU;IAC/C,MAAM,KAAK,GAAG,cAAc,CAAC,EAAE,CAAC,CAAC;IACjC,+EAA+E;IAC/E,MAAM,QAAQ,GAAG,mBAAmB,KAAK,KAAK,KAAK,GAAG,CAAC;IACvD,OAAO;QACL,gCAAgC,EAAE,QAAQ;QAC1C,gCAAgC,EAAE,QAAQ;QAC1C,+BAA+B,EAAE,QAAQ;QACzC,4BAA4B,EAAE,QAAQ;QACtC,+BAA+B,EAAE,QAAQ;QACzC,4BAA4B,EAAE,QAAQ;QACtC,4BAA4B,EAAE,QAAQ;QACtC,6BAA6B,EAAE,QAAQ;QACvC,mCAAmC,EAAE,QAAQ;QAC7C,8BAA8B,EAAE,QAAQ;QACxC,8BAA8B,EAAE,QAAQ;QACxC,8BAA8B,EAAE,QAAQ;QACxC,4BAA4B,EAAE,QAAQ;QACtC,6BAA6B,EAAE,QAAQ;QACvC,4BAA4B,EAAE,QAAQ;QACtC,2BAA2B,EAAE,QAAQ;KACf,CAAC;AAC3B,CAAC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Focus Highlight Config Utility
|
|
3
|
+
*
|
|
4
|
+
* Creates a Puck config wrapper that adds visual focus highlighting
|
|
5
|
+
* to show which components other actors are viewing or editing.
|
|
6
|
+
*
|
|
7
|
+
* IMPORTANT: This utility supports two modes:
|
|
8
|
+
* 1. Context-based (preferred): Create config once, use FocusHighlightProvider to update highlights
|
|
9
|
+
* 2. Direct focusMap (legacy): Pass focusMap directly, config recreated on each change
|
|
10
|
+
*
|
|
11
|
+
* The context-based approach prevents Puck re-renders when focus regions change.
|
|
12
|
+
*/
|
|
13
|
+
import type { FocusHighlight } from './focusRegionMap.js';
|
|
14
|
+
/**
|
|
15
|
+
* Puck Config structure (flexible to accept Puck's Config type)
|
|
16
|
+
*/
|
|
17
|
+
export type PuckConfig = Record<string, any>;
|
|
18
|
+
/**
|
|
19
|
+
* Creates a Puck config with focus highlight wrappers.
|
|
20
|
+
*
|
|
21
|
+
* When used with FocusHighlightProvider (context mode), the config only needs
|
|
22
|
+
* to be created once - highlights update via context without config recreation.
|
|
23
|
+
*
|
|
24
|
+
* When used without FocusHighlightProvider (legacy mode), pass focusMap directly
|
|
25
|
+
* but this will cause config recreation on every focusMap change.
|
|
26
|
+
*
|
|
27
|
+
* @param config - The original Puck config
|
|
28
|
+
* @param focusMap - Optional static focusMap for legacy mode (prefer using context instead)
|
|
29
|
+
* @returns A new config with wrapped render functions that add focus highlighting
|
|
30
|
+
*
|
|
31
|
+
* @example Context mode (preferred - no flicker):
|
|
32
|
+
* ```tsx
|
|
33
|
+
* // Create config once with no focusMap
|
|
34
|
+
* const highlightedConfig = useMemo(
|
|
35
|
+
* () => createFocusHighlightConfig(baseConfig),
|
|
36
|
+
* [baseConfig]
|
|
37
|
+
* );
|
|
38
|
+
*
|
|
39
|
+
* // Wrap Puck with provider that can update without config recreation
|
|
40
|
+
* <FocusHighlightProvider focusMap={focusMap}>
|
|
41
|
+
* <Puck config={highlightedConfig} data={data} />
|
|
42
|
+
* </FocusHighlightProvider>
|
|
43
|
+
* ```
|
|
44
|
+
*
|
|
45
|
+
* @example Legacy mode (may cause flicker):
|
|
46
|
+
* ```tsx
|
|
47
|
+
* const focusMap = createFocusRegionMap(puckData, otherActors);
|
|
48
|
+
* const highlightedConfig = createFocusHighlightConfig(baseConfig, focusMap);
|
|
49
|
+
*
|
|
50
|
+
* <Puck config={highlightedConfig} data={data} />
|
|
51
|
+
* ```
|
|
52
|
+
*/
|
|
53
|
+
export declare function createFocusHighlightConfig(config: PuckConfig, focusMap?: Map<string, FocusHighlight>): PuckConfig;
|
|
54
|
+
//# sourceMappingURL=focusHighlightConfig.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"focusHighlightConfig.d.ts","sourceRoot":"","sources":["../../../src/collaboration/utils/focusHighlightConfig.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAG1D;;GAEG;AAEH,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AA4C7C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,wBAAgB,0BAA0B,CACxC,MAAM,EAAE,UAAU,EAClB,QAAQ,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,cAAc,CAAC,GACrC,UAAU,CAmCZ"}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Focus Highlight Config Utility
|
|
3
|
+
*
|
|
4
|
+
* Creates a Puck config wrapper that adds visual focus highlighting
|
|
5
|
+
* to show which components other actors are viewing or editing.
|
|
6
|
+
*
|
|
7
|
+
* IMPORTANT: This utility supports two modes:
|
|
8
|
+
* 1. Context-based (preferred): Create config once, use FocusHighlightProvider to update highlights
|
|
9
|
+
* 2. Direct focusMap (legacy): Pass focusMap directly, config recreated on each change
|
|
10
|
+
*
|
|
11
|
+
* The context-based approach prevents Puck re-renders when focus regions change.
|
|
12
|
+
*/
|
|
13
|
+
import React from 'react';
|
|
14
|
+
import { FocusHighlightContext } from '../../core/FocusHighlightContext.js';
|
|
15
|
+
/**
|
|
16
|
+
* Component wrapper that renders focus highlight from context.
|
|
17
|
+
* This allows the highlight to change without recreating the config.
|
|
18
|
+
*/
|
|
19
|
+
function FocusHighlightWrapper({ id, children, staticFocus, }) {
|
|
20
|
+
// Try context first (for dynamic updates without config recreation)
|
|
21
|
+
const context = React.useContext(FocusHighlightContext);
|
|
22
|
+
const focus = context?.focusMap.get(id) ?? staticFocus;
|
|
23
|
+
// Always render a stable wrapper div AND badge to avoid DOM insertions/removals
|
|
24
|
+
// that can trigger browser scroll-into-view behavior.
|
|
25
|
+
// When not focused, the wrapper has no visual effect and badge is hidden via CSS.
|
|
26
|
+
const className = focus
|
|
27
|
+
? (focus.isEditing
|
|
28
|
+
? 'focus-region-highlight focus-region-highlight--editing'
|
|
29
|
+
: 'focus-region-highlight')
|
|
30
|
+
: 'focus-region-highlight focus-region-highlight--inactive';
|
|
31
|
+
return React.createElement('div', {
|
|
32
|
+
className,
|
|
33
|
+
style: focus ? { '--focus-color': focus.color } : undefined,
|
|
34
|
+
'data-actor-id': focus?.actorId,
|
|
35
|
+
}, children, React.createElement('div', { className: 'focus-region-highlight__badge' }, focus ? focus.actorName.charAt(0).toUpperCase() : ''));
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Creates a Puck config with focus highlight wrappers.
|
|
39
|
+
*
|
|
40
|
+
* When used with FocusHighlightProvider (context mode), the config only needs
|
|
41
|
+
* to be created once - highlights update via context without config recreation.
|
|
42
|
+
*
|
|
43
|
+
* When used without FocusHighlightProvider (legacy mode), pass focusMap directly
|
|
44
|
+
* but this will cause config recreation on every focusMap change.
|
|
45
|
+
*
|
|
46
|
+
* @param config - The original Puck config
|
|
47
|
+
* @param focusMap - Optional static focusMap for legacy mode (prefer using context instead)
|
|
48
|
+
* @returns A new config with wrapped render functions that add focus highlighting
|
|
49
|
+
*
|
|
50
|
+
* @example Context mode (preferred - no flicker):
|
|
51
|
+
* ```tsx
|
|
52
|
+
* // Create config once with no focusMap
|
|
53
|
+
* const highlightedConfig = useMemo(
|
|
54
|
+
* () => createFocusHighlightConfig(baseConfig),
|
|
55
|
+
* [baseConfig]
|
|
56
|
+
* );
|
|
57
|
+
*
|
|
58
|
+
* // Wrap Puck with provider that can update without config recreation
|
|
59
|
+
* <FocusHighlightProvider focusMap={focusMap}>
|
|
60
|
+
* <Puck config={highlightedConfig} data={data} />
|
|
61
|
+
* </FocusHighlightProvider>
|
|
62
|
+
* ```
|
|
63
|
+
*
|
|
64
|
+
* @example Legacy mode (may cause flicker):
|
|
65
|
+
* ```tsx
|
|
66
|
+
* const focusMap = createFocusRegionMap(puckData, otherActors);
|
|
67
|
+
* const highlightedConfig = createFocusHighlightConfig(baseConfig, focusMap);
|
|
68
|
+
*
|
|
69
|
+
* <Puck config={highlightedConfig} data={data} />
|
|
70
|
+
* ```
|
|
71
|
+
*/
|
|
72
|
+
export function createFocusHighlightConfig(config, focusMap) {
|
|
73
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
74
|
+
const wrappedComponents = {};
|
|
75
|
+
const components = config.components;
|
|
76
|
+
for (const [componentName, componentConfig] of Object.entries(components)) {
|
|
77
|
+
// Cast render to the function type we need
|
|
78
|
+
const originalRender = componentConfig.render;
|
|
79
|
+
wrappedComponents[componentName] = {
|
|
80
|
+
...componentConfig,
|
|
81
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
82
|
+
render: (props) => {
|
|
83
|
+
const id = props.id;
|
|
84
|
+
const renderedContent = originalRender(props);
|
|
85
|
+
// Use wrapper component for context-based focus detection
|
|
86
|
+
// Pass static focus for legacy mode fallback
|
|
87
|
+
// eslint-disable-next-line react/no-children-prop
|
|
88
|
+
return React.createElement(FocusHighlightWrapper, {
|
|
89
|
+
id,
|
|
90
|
+
staticFocus: focusMap?.get(id),
|
|
91
|
+
children: renderedContent,
|
|
92
|
+
});
|
|
93
|
+
},
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
return { ...config, components: wrappedComponents };
|
|
97
|
+
}
|
|
98
|
+
//# sourceMappingURL=focusHighlightConfig.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"focusHighlightConfig.js","sourceRoot":"","sources":["../../../src/collaboration/utils/focusHighlightConfig.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,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AC1E,2CAA2C;QAC3C,MAAM,cAAc,GAAG,eAAe,CAAC,MAGnB,CAAC;QAErB,iBAAiB,CAAC,aAAa,CAAC,GAAG;YACjC,GAAG,eAAe;YAClB,8DAA8D;YAC9D,MAAM,EAAE,CAAC,KAAU,EAAE,EAAE;gBACrB,MAAM,EAAE,GAAG,KAAK,CAAC,EAAY,CAAC;gBAC9B,MAAM,eAAe,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;gBAE9C,0DAA0D;gBAC1D,6CAA6C;gBAC7C,kDAAkD;gBAClD,OAAO,KAAK,CAAC,aAAa,CACxB,qBAAqB,EACrB;oBACE,EAAE;oBACF,WAAW,EAAE,QAAQ,EAAE,GAAG,CAAC,EAAE,CAAC;oBAC9B,QAAQ,EAAE,eAAe;iBAC1B,CACF,CAAC;YACJ,CAAC;SACF,CAAC;IACJ,CAAC;IAED,OAAO,EAAE,GAAG,MAAM,EAAE,UAAU,EAAE,iBAAiB,EAAE,CAAC;AACtD,CAAC"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Focus Region Map Utilities
|
|
3
|
+
*
|
|
4
|
+
* Utilities for mapping focus region paths to component IDs
|
|
5
|
+
* and creating focus highlight information from actor presence data.
|
|
6
|
+
*/
|
|
7
|
+
import type { PuckData, ActorPresence } from '@pantheon-systems/css-client';
|
|
8
|
+
/**
|
|
9
|
+
* Information about a focus highlight for a component.
|
|
10
|
+
*/
|
|
11
|
+
export interface FocusHighlight {
|
|
12
|
+
/** Actor ID who has focus on this component */
|
|
13
|
+
actorId: string;
|
|
14
|
+
/** Actor display name */
|
|
15
|
+
actorName: string;
|
|
16
|
+
/** Color to use for highlighting (hex format) */
|
|
17
|
+
color: string;
|
|
18
|
+
/** Whether the actor is actively editing (vs just viewing) */
|
|
19
|
+
isEditing: boolean;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Convert a focus region path to a component ID.
|
|
23
|
+
*
|
|
24
|
+
* Supported path formats:
|
|
25
|
+
* - "/content/N" - Content array at index N
|
|
26
|
+
* - "/zones/ZoneName/N" - Zone array at index N
|
|
27
|
+
*
|
|
28
|
+
* @param data - Puck data containing content and zones
|
|
29
|
+
* @param path - Focus region path (e.g., "/content/0" or "/zones/Header:left/1")
|
|
30
|
+
* @returns Component ID if found, null otherwise
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* ```typescript
|
|
34
|
+
* const id = pathToComponentId(puckData, '/content/0');
|
|
35
|
+
* // Returns the ID of the first component in content array
|
|
36
|
+
*
|
|
37
|
+
* const zoneId = pathToComponentId(puckData, '/zones/Header:left/0');
|
|
38
|
+
* // Returns the ID of the first component in Header:left zone
|
|
39
|
+
* ```
|
|
40
|
+
*/
|
|
41
|
+
export declare function pathToComponentId(data: PuckData, path: string): string | null;
|
|
42
|
+
/**
|
|
43
|
+
* Create a map of component IDs to focus highlight information.
|
|
44
|
+
*
|
|
45
|
+
* Processes actor presence data to determine which components are being
|
|
46
|
+
* focused on by which actors, including their display info and state.
|
|
47
|
+
*
|
|
48
|
+
* @param data - Puck data containing content and zones
|
|
49
|
+
* @param actors - Array of actor presence information
|
|
50
|
+
* @returns Map from component ID to focus highlight info
|
|
51
|
+
*
|
|
52
|
+
* @example
|
|
53
|
+
* ```typescript
|
|
54
|
+
* const focusMap = createFocusRegionMap(puckData, otherActors);
|
|
55
|
+
*
|
|
56
|
+
* // Check if a component is focused
|
|
57
|
+
* const highlight = focusMap.get('hero-component-1');
|
|
58
|
+
* if (highlight) {
|
|
59
|
+
* console.log(`${highlight.actorName} is ${highlight.isEditing ? 'editing' : 'viewing'}`);
|
|
60
|
+
* }
|
|
61
|
+
* ```
|
|
62
|
+
*/
|
|
63
|
+
export declare function createFocusRegionMap(data: PuckData, actors: ActorPresence[]): Map<string, FocusHighlight>;
|
|
64
|
+
/**
|
|
65
|
+
* Generate a consistent color from an actor ID.
|
|
66
|
+
*
|
|
67
|
+
* Uses the djb2 hash algorithm to generate a hex color that:
|
|
68
|
+
* - Is deterministic (same ID always produces same color)
|
|
69
|
+
* - Matches the avatar color algorithm in CollaboratorAvatars.tsx
|
|
70
|
+
* - Has consistent saturation (65%) and lightness (45%) for readability
|
|
71
|
+
*
|
|
72
|
+
* @param actorId - Actor identifier
|
|
73
|
+
* @returns Hex color string (e.g., "#6366f1")
|
|
74
|
+
*
|
|
75
|
+
* @example
|
|
76
|
+
* ```typescript
|
|
77
|
+
* const color = generateActorColor('user-alice');
|
|
78
|
+
* // Returns a consistent hex color for this actor
|
|
79
|
+
* ```
|
|
80
|
+
*/
|
|
81
|
+
export declare function generateActorColor(actorId: string): string;
|
|
82
|
+
//# sourceMappingURL=focusRegionMap.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"focusRegionMap.d.ts","sourceRoot":"","sources":["../../../src/collaboration/utils/focusRegionMap.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAE5E;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,+CAA+C;IAC/C,OAAO,EAAE,MAAM,CAAC;IAChB,yBAAyB;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,iDAAiD;IACjD,KAAK,EAAE,MAAM,CAAC;IACd,8DAA8D;IAC9D,SAAS,EAAE,OAAO,CAAC;CACpB;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CA4C7E;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,QAAQ,EACd,MAAM,EAAE,aAAa,EAAE,GACtB,GAAG,CAAC,MAAM,EAAE,cAAc,CAAC,CA0B7B;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAgB1D"}
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Focus Region Map Utilities
|
|
3
|
+
*
|
|
4
|
+
* Utilities for mapping focus region paths to component IDs
|
|
5
|
+
* and creating focus highlight information from actor presence data.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Convert a focus region path to a component ID.
|
|
9
|
+
*
|
|
10
|
+
* Supported path formats:
|
|
11
|
+
* - "/content/N" - Content array at index N
|
|
12
|
+
* - "/zones/ZoneName/N" - Zone array at index N
|
|
13
|
+
*
|
|
14
|
+
* @param data - Puck data containing content and zones
|
|
15
|
+
* @param path - Focus region path (e.g., "/content/0" or "/zones/Header:left/1")
|
|
16
|
+
* @returns Component ID if found, null otherwise
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```typescript
|
|
20
|
+
* const id = pathToComponentId(puckData, '/content/0');
|
|
21
|
+
* // Returns the ID of the first component in content array
|
|
22
|
+
*
|
|
23
|
+
* const zoneId = pathToComponentId(puckData, '/zones/Header:left/0');
|
|
24
|
+
* // Returns the ID of the first component in Header:left zone
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
export function pathToComponentId(data, path) {
|
|
28
|
+
if (!path || path.length === 0) {
|
|
29
|
+
return null;
|
|
30
|
+
}
|
|
31
|
+
// Parse content paths: /content/N
|
|
32
|
+
const contentMatch = path.match(/^\/content\/(\d+)$/);
|
|
33
|
+
if (contentMatch && contentMatch[1] !== undefined) {
|
|
34
|
+
const index = parseInt(contentMatch[1], 10);
|
|
35
|
+
const component = data.content[index];
|
|
36
|
+
return component?.props?.id ?? null;
|
|
37
|
+
}
|
|
38
|
+
// Parse Puck's root zone path: /root/default-zone/N
|
|
39
|
+
// Puck uses "root:default-zone" internally for the main content area
|
|
40
|
+
const rootZoneMatch = path.match(/^\/root\/default-zone\/(\d+)$/);
|
|
41
|
+
if (rootZoneMatch && rootZoneMatch[1] !== undefined) {
|
|
42
|
+
const index = parseInt(rootZoneMatch[1], 10);
|
|
43
|
+
const component = data.content[index];
|
|
44
|
+
return component?.props?.id ?? null;
|
|
45
|
+
}
|
|
46
|
+
// Parse zone paths: /zones/ZoneName/N
|
|
47
|
+
// Zone names can contain colons (e.g., "Header:left")
|
|
48
|
+
const zoneMatch = path.match(/^\/zones\/(.+)\/(\d+)$/);
|
|
49
|
+
if (zoneMatch && zoneMatch[1] !== undefined && zoneMatch[2] !== undefined) {
|
|
50
|
+
const zoneName = zoneMatch[1];
|
|
51
|
+
const index = parseInt(zoneMatch[2], 10);
|
|
52
|
+
if (!data.zones) {
|
|
53
|
+
return null;
|
|
54
|
+
}
|
|
55
|
+
const zone = data.zones[zoneName];
|
|
56
|
+
if (!zone) {
|
|
57
|
+
return null;
|
|
58
|
+
}
|
|
59
|
+
const component = zone[index];
|
|
60
|
+
return component?.props?.id ?? null;
|
|
61
|
+
}
|
|
62
|
+
// Unknown path format
|
|
63
|
+
return null;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Create a map of component IDs to focus highlight information.
|
|
67
|
+
*
|
|
68
|
+
* Processes actor presence data to determine which components are being
|
|
69
|
+
* focused on by which actors, including their display info and state.
|
|
70
|
+
*
|
|
71
|
+
* @param data - Puck data containing content and zones
|
|
72
|
+
* @param actors - Array of actor presence information
|
|
73
|
+
* @returns Map from component ID to focus highlight info
|
|
74
|
+
*
|
|
75
|
+
* @example
|
|
76
|
+
* ```typescript
|
|
77
|
+
* const focusMap = createFocusRegionMap(puckData, otherActors);
|
|
78
|
+
*
|
|
79
|
+
* // Check if a component is focused
|
|
80
|
+
* const highlight = focusMap.get('hero-component-1');
|
|
81
|
+
* if (highlight) {
|
|
82
|
+
* console.log(`${highlight.actorName} is ${highlight.isEditing ? 'editing' : 'viewing'}`);
|
|
83
|
+
* }
|
|
84
|
+
* ```
|
|
85
|
+
*/
|
|
86
|
+
export function createFocusRegionMap(data, actors) {
|
|
87
|
+
const map = new Map();
|
|
88
|
+
for (const actor of actors) {
|
|
89
|
+
const focusRegions = actor.focusRegions ?? [];
|
|
90
|
+
for (const path of focusRegions) {
|
|
91
|
+
const componentId = pathToComponentId(data, path);
|
|
92
|
+
if (componentId === null) {
|
|
93
|
+
// Skip invalid paths
|
|
94
|
+
continue;
|
|
95
|
+
}
|
|
96
|
+
// Create highlight info for this component
|
|
97
|
+
const highlight = {
|
|
98
|
+
actorId: actor.actorId,
|
|
99
|
+
actorName: actor.name,
|
|
100
|
+
color: generateActorColor(actor.actorId),
|
|
101
|
+
isEditing: actor.state === 'editing',
|
|
102
|
+
};
|
|
103
|
+
map.set(componentId, highlight);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
return map;
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Generate a consistent color from an actor ID.
|
|
110
|
+
*
|
|
111
|
+
* Uses the djb2 hash algorithm to generate a hex color that:
|
|
112
|
+
* - Is deterministic (same ID always produces same color)
|
|
113
|
+
* - Matches the avatar color algorithm in CollaboratorAvatars.tsx
|
|
114
|
+
* - Has consistent saturation (65%) and lightness (45%) for readability
|
|
115
|
+
*
|
|
116
|
+
* @param actorId - Actor identifier
|
|
117
|
+
* @returns Hex color string (e.g., "#6366f1")
|
|
118
|
+
*
|
|
119
|
+
* @example
|
|
120
|
+
* ```typescript
|
|
121
|
+
* const color = generateActorColor('user-alice');
|
|
122
|
+
* // Returns a consistent hex color for this actor
|
|
123
|
+
* ```
|
|
124
|
+
*/
|
|
125
|
+
export function generateActorColor(actorId) {
|
|
126
|
+
// djb2 hash algorithm - must match CollaboratorAvatars.tsx for consistent colors
|
|
127
|
+
let hash = 5381;
|
|
128
|
+
for (let i = 0; i < actorId.length; i++) {
|
|
129
|
+
hash = (hash * 33) ^ actorId.charCodeAt(i);
|
|
130
|
+
}
|
|
131
|
+
hash = hash >>> 0; // Convert to unsigned 32-bit integer
|
|
132
|
+
// Use hash to generate HSL color with fixed saturation/lightness
|
|
133
|
+
// Must match CollaboratorAvatars.tsx: hsl(hue, 65%, 45%)
|
|
134
|
+
const hue = hash % 360;
|
|
135
|
+
const saturation = 65;
|
|
136
|
+
const lightness = 45;
|
|
137
|
+
// Convert HSL to hex
|
|
138
|
+
return hslToHex(hue, saturation, lightness);
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* Convert HSL color to hex string.
|
|
142
|
+
*/
|
|
143
|
+
function hslToHex(h, s, l) {
|
|
144
|
+
const sNorm = s / 100;
|
|
145
|
+
const lNorm = l / 100;
|
|
146
|
+
const c = (1 - Math.abs(2 * lNorm - 1)) * sNorm;
|
|
147
|
+
const x = c * (1 - Math.abs((h / 60) % 2 - 1));
|
|
148
|
+
const m = lNorm - c / 2;
|
|
149
|
+
let r = 0;
|
|
150
|
+
let g = 0;
|
|
151
|
+
let b = 0;
|
|
152
|
+
if (h >= 0 && h < 60) {
|
|
153
|
+
r = c;
|
|
154
|
+
g = x;
|
|
155
|
+
b = 0;
|
|
156
|
+
}
|
|
157
|
+
else if (h >= 60 && h < 120) {
|
|
158
|
+
r = x;
|
|
159
|
+
g = c;
|
|
160
|
+
b = 0;
|
|
161
|
+
}
|
|
162
|
+
else if (h >= 120 && h < 180) {
|
|
163
|
+
r = 0;
|
|
164
|
+
g = c;
|
|
165
|
+
b = x;
|
|
166
|
+
}
|
|
167
|
+
else if (h >= 180 && h < 240) {
|
|
168
|
+
r = 0;
|
|
169
|
+
g = x;
|
|
170
|
+
b = c;
|
|
171
|
+
}
|
|
172
|
+
else if (h >= 240 && h < 300) {
|
|
173
|
+
r = x;
|
|
174
|
+
g = 0;
|
|
175
|
+
b = c;
|
|
176
|
+
}
|
|
177
|
+
else {
|
|
178
|
+
r = c;
|
|
179
|
+
g = 0;
|
|
180
|
+
b = x;
|
|
181
|
+
}
|
|
182
|
+
const toHex = (n) => {
|
|
183
|
+
const hex = Math.round((n + m) * 255).toString(16);
|
|
184
|
+
return hex.length === 1 ? '0' + hex : hex;
|
|
185
|
+
};
|
|
186
|
+
return `#${toHex(r)}${toHex(g)}${toHex(b)}`;
|
|
187
|
+
}
|
|
188
|
+
//# sourceMappingURL=focusRegionMap.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"focusRegionMap.js","sourceRoot":"","sources":["../../../src/collaboration/utils/focusRegionMap.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAkBH;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,UAAU,iBAAiB,CAAC,IAAc,EAAE,IAAY;IAC5D,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC/B,OAAO,IAAI,CAAC;IACd,CAAC;IAED,kCAAkC;IAClC,MAAM,YAAY,GAAG,IAAI,CAAC,KAAK,CAAC,oBAAoB,CAAC,CAAC;IACtD,IAAI,YAAY,IAAI,YAAY,CAAC,CAAC,CAAC,KAAK,SAAS,EAAE,CAAC;QAClD,MAAM,KAAK,GAAG,QAAQ,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;QAC5C,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QACtC,OAAO,SAAS,EAAE,KAAK,EAAE,EAAE,IAAI,IAAI,CAAC;IACtC,CAAC;IAED,oDAAoD;IACpD,qEAAqE;IACrE,MAAM,aAAa,GAAG,IAAI,CAAC,KAAK,CAAC,+BAA+B,CAAC,CAAC;IAClE,IAAI,aAAa,IAAI,aAAa,CAAC,CAAC,CAAC,KAAK,SAAS,EAAE,CAAC;QACpD,MAAM,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;QAC7C,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QACtC,OAAO,SAAS,EAAE,KAAK,EAAE,EAAE,IAAI,IAAI,CAAC;IACtC,CAAC;IAED,sCAAsC;IACtC,sDAA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AC,CAAC;IACtB,CAAC;IAED,MAAM,KAAK,GAAG,CAAC,CAAS,EAAU,EAAE;QAClC,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;QACnD,OAAO,GAAG,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC;IAC5C,CAAC,CAAC;IAEF,OAAO,IAAI,KAAK,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;AAC9C,CAAC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* FocusHighlightContext
|
|
3
|
+
*
|
|
4
|
+
* Provides focus highlight state to components without requiring config recreation.
|
|
5
|
+
* This context allows the focusMap to change without recreating Puck config,
|
|
6
|
+
* which prevents flickering during collaborative editing.
|
|
7
|
+
*/
|
|
8
|
+
import React from 'react';
|
|
9
|
+
import type { FocusHighlight } from '../collaboration/utils/focusRegionMap.js';
|
|
10
|
+
/**
|
|
11
|
+
* Context value for focus highlighting.
|
|
12
|
+
*/
|
|
13
|
+
export interface FocusHighlightContextValue {
|
|
14
|
+
/** Map of component IDs to their focus highlight info */
|
|
15
|
+
focusMap: Map<string, FocusHighlight>;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Context for providing focus highlight state to wrapped components.
|
|
19
|
+
*/
|
|
20
|
+
export declare const FocusHighlightContext: React.Context<FocusHighlightContextValue | null>;
|
|
21
|
+
/**
|
|
22
|
+
* Props for FocusHighlightProvider.
|
|
23
|
+
*/
|
|
24
|
+
export interface FocusHighlightProviderProps {
|
|
25
|
+
/** Map of component IDs to their focus highlight info */
|
|
26
|
+
focusMap: Map<string, FocusHighlight>;
|
|
27
|
+
/** Child components */
|
|
28
|
+
children: React.ReactNode;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Provider for focus highlight context.
|
|
32
|
+
* Wrap your Puck editor with this to enable focus highlighting without config recreation.
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```tsx
|
|
36
|
+
* const focusMap = createFocusRegionMap(data, otherActors);
|
|
37
|
+
*
|
|
38
|
+
* <FocusHighlightProvider focusMap={focusMap}>
|
|
39
|
+
* <Puck config={stableConfig} data={data} />
|
|
40
|
+
* </FocusHighlightProvider>
|
|
41
|
+
* ```
|
|
42
|
+
*/
|
|
43
|
+
export declare function FocusHighlightProvider({ focusMap, children, }: FocusHighlightProviderProps): React.ReactElement;
|
|
44
|
+
/**
|
|
45
|
+
* Hook to access focus highlight context.
|
|
46
|
+
* Returns null if not within a FocusHighlightProvider.
|
|
47
|
+
*/
|
|
48
|
+
export declare function useFocusHighlight(): FocusHighlightContextValue | null;
|
|
49
|
+
/**
|
|
50
|
+
* Hook to get focus highlight for a specific component ID.
|
|
51
|
+
* Returns undefined if the component has no focus highlight.
|
|
52
|
+
*/
|
|
53
|
+
export declare function useFocusHighlightForComponent(id: string): FocusHighlight | undefined;
|
|
54
|
+
//# sourceMappingURL=FocusHighlightContext.d.ts.map
|