@pantheon-systems/puck-css 0.8.0 → 0.10.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 +87 -0
- package/dist/agent/useAgentEdit.d.ts.map +1 -1
- package/dist/agent/useAgentEdit.js.map +1 -1
- package/dist/agent/useAgentTrigger.d.ts.map +1 -1
- package/dist/agent/useAgentTrigger.js.map +1 -1
- package/dist/auth/AuthGate.d.ts +1 -1
- package/dist/auth/AuthGate.d.ts.map +1 -1
- package/dist/auth/P1AuthProvider.d.ts.map +1 -1
- package/dist/auth/P1AuthProvider.js +52 -1
- package/dist/auth/P1AuthProvider.js.map +1 -1
- package/dist/collaboration/components/CollaboratorAvatars.d.ts.map +1 -1
- package/dist/collaboration/components/CollaboratorAvatars.js +1 -1
- package/dist/collaboration/components/CollaboratorAvatars.js.map +1 -1
- package/dist/collaboration/utils/avatarColor.d.ts +2 -8
- package/dist/collaboration/utils/avatarColor.d.ts.map +1 -1
- package/dist/collaboration/utils/avatarColor.js +4 -31
- package/dist/collaboration/utils/avatarColor.js.map +1 -1
- package/dist/collaboration/utils/focusHighlightConfig.d.ts.map +1 -1
- package/dist/collaboration/utils/focusHighlightConfig.js.map +1 -1
- package/dist/collaboration/utils/initials.d.ts +2 -0
- package/dist/collaboration/utils/initials.d.ts.map +1 -0
- package/dist/collaboration/utils/initials.js +27 -0
- package/dist/collaboration/utils/initials.js.map +1 -0
- package/dist/collaboration/utils/presenceIdentity.d.ts +29 -0
- package/dist/collaboration/utils/presenceIdentity.d.ts.map +1 -0
- package/dist/collaboration/utils/presenceIdentity.js +42 -0
- package/dist/collaboration/utils/presenceIdentity.js.map +1 -0
- package/dist/core/PuckConfigContext.d.ts +7 -0
- package/dist/core/PuckConfigContext.d.ts.map +1 -0
- package/dist/core/PuckConfigContext.js +11 -0
- package/dist/core/PuckConfigContext.js.map +1 -0
- package/dist/core/config.d.ts +1 -1
- package/dist/core/config.d.ts.map +1 -1
- package/dist/core/config.js.map +1 -1
- package/dist/core/index.d.ts +1 -0
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +1 -0
- package/dist/core/index.js.map +1 -1
- package/dist/core/types.d.ts +36 -3
- package/dist/core/types.d.ts.map +1 -1
- package/dist/data/collection-operators.d.ts +19 -0
- package/dist/data/collection-operators.d.ts.map +1 -0
- package/dist/data/collection-operators.js +97 -0
- package/dist/data/collection-operators.js.map +1 -0
- package/dist/data/css-queries/css-query-registry.d.ts +11 -0
- package/dist/data/css-queries/css-query-registry.d.ts.map +1 -0
- package/dist/data/css-queries/css-query-registry.js +30 -0
- package/dist/data/css-queries/css-query-registry.js.map +1 -0
- package/dist/data/dal/index.d.ts +1 -1
- package/dist/data/dal/index.d.ts.map +1 -1
- package/dist/data/dal/init.d.ts +5 -0
- package/dist/data/dal/init.d.ts.map +1 -1
- package/dist/data/dal/init.js +31 -4
- package/dist/data/dal/init.js.map +1 -1
- package/dist/data/dal/p1-store.d.ts +23 -0
- package/dist/data/dal/p1-store.d.ts.map +1 -1
- package/dist/data/dal/p1-store.js.map +1 -1
- package/dist/data/data-list-block/DataListFieldsGrouper.d.ts +7 -0
- package/dist/data/data-list-block/DataListFieldsGrouper.d.ts.map +1 -0
- package/dist/data/data-list-block/DataListFieldsGrouper.js +72 -0
- package/dist/data/data-list-block/DataListFieldsGrouper.js.map +1 -0
- package/dist/data/data-list-block/builtin-components/cards.d.ts +8 -0
- package/dist/data/data-list-block/builtin-components/cards.d.ts.map +1 -0
- package/dist/data/data-list-block/builtin-components/cards.js +35 -0
- package/dist/data/data-list-block/builtin-components/cards.js.map +1 -0
- package/dist/data/data-list-block/builtin-components/listing.d.ts +8 -0
- package/dist/data/data-list-block/builtin-components/listing.d.ts.map +1 -0
- package/dist/data/data-list-block/builtin-components/listing.js +11 -0
- package/dist/data/data-list-block/builtin-components/listing.js.map +1 -0
- package/dist/data/data-list-block/builtin-components/rows.d.ts +8 -0
- package/dist/data/data-list-block/builtin-components/rows.d.ts.map +1 -0
- package/dist/data/data-list-block/builtin-components/rows.js +9 -0
- package/dist/data/data-list-block/builtin-components/rows.js.map +1 -0
- package/dist/data/data-list-block/builtin-modes.d.ts +3 -0
- package/dist/data/data-list-block/builtin-modes.d.ts.map +1 -0
- package/dist/data/data-list-block/builtin-modes.js +53 -0
- package/dist/data/data-list-block/builtin-modes.js.map +1 -0
- package/dist/data/data-list-block/create-data-list-block.d.ts +3 -0
- package/dist/data/data-list-block/create-data-list-block.d.ts.map +1 -0
- package/dist/data/data-list-block/create-data-list-block.js +305 -0
- package/dist/data/data-list-block/create-data-list-block.js.map +1 -0
- package/dist/data/data-list-block/field-groups.d.ts +4 -0
- package/dist/data/data-list-block/field-groups.d.ts.map +1 -0
- package/dist/data/data-list-block/field-groups.js +28 -0
- package/dist/data/data-list-block/field-groups.js.map +1 -0
- package/dist/data/data-list-block/index.d.ts +8 -0
- package/dist/data/data-list-block/index.d.ts.map +1 -0
- package/dist/data/data-list-block/index.js +7 -0
- package/dist/data/data-list-block/index.js.map +1 -0
- package/dist/data/data-list-block/types.d.ts +53 -0
- package/dist/data/data-list-block/types.d.ts.map +1 -0
- package/dist/data/data-list-block/types.js +2 -0
- package/dist/data/data-list-block/types.js.map +1 -0
- package/dist/data/data-list-block/utils.d.ts +14 -0
- package/dist/data/data-list-block/utils.d.ts.map +1 -0
- package/dist/data/data-list-block/utils.js +65 -0
- package/dist/data/data-list-block/utils.js.map +1 -0
- package/dist/data/fields/datasource-select-field.d.ts +29 -0
- package/dist/data/fields/datasource-select-field.d.ts.map +1 -0
- package/dist/data/fields/datasource-select-field.js +40 -0
- package/dist/data/fields/datasource-select-field.js.map +1 -0
- package/dist/data/fields/field-section.d.ts +11 -0
- package/dist/data/fields/field-section.d.ts.map +1 -0
- package/dist/data/fields/field-section.js +6 -0
- package/dist/data/fields/field-section.js.map +1 -0
- package/dist/data/fields/image-position-field.d.ts +28 -0
- package/dist/data/fields/image-position-field.d.ts.map +1 -0
- package/dist/data/fields/image-position-field.js +69 -0
- package/dist/data/fields/image-position-field.js.map +1 -0
- package/dist/data/fields/pds-field-helpers.d.ts +34 -0
- package/dist/data/fields/pds-field-helpers.d.ts.map +1 -0
- package/dist/data/fields/pds-field-helpers.js +55 -0
- package/dist/data/fields/pds-field-helpers.js.map +1 -0
- package/dist/data/fields/schema-select-field.d.ts +32 -0
- package/dist/data/fields/schema-select-field.d.ts.map +1 -0
- package/dist/data/fields/schema-select-field.js +134 -0
- package/dist/data/fields/schema-select-field.js.map +1 -0
- package/dist/data/fields/template-select-field.d.ts +16 -0
- package/dist/data/fields/template-select-field.d.ts.map +1 -0
- package/dist/data/fields/template-select-field.js +31 -0
- package/dist/data/fields/template-select-field.js.map +1 -0
- package/dist/data/fields/view-mode-field.d.ts +21 -0
- package/dist/data/fields/view-mode-field.d.ts.map +1 -0
- package/dist/data/fields/view-mode-field.js +14 -0
- package/dist/data/fields/view-mode-field.js.map +1 -0
- package/dist/data/fields.d.ts +12 -0
- package/dist/data/fields.d.ts.map +1 -1
- package/dist/data/fields.js +10 -0
- package/dist/data/fields.js.map +1 -1
- package/dist/data/page-editor-meta.d.ts.map +1 -1
- package/dist/data/page-editor-meta.js +0 -1
- package/dist/data/page-editor-meta.js.map +1 -1
- package/dist/data/query-provider.d.ts +1 -1
- package/dist/data/query-provider.d.ts.map +1 -1
- package/dist/data/remote-datasources/fetch-http-json.d.ts.map +1 -1
- package/dist/data/remote-datasources/fetch-http-json.js.map +1 -1
- package/dist/data/remote-datasources/loader.d.ts.map +1 -1
- package/dist/data/remote-datasources/loader.js +3 -1
- package/dist/data/remote-datasources/loader.js.map +1 -1
- package/dist/data/resolve-data-templates.d.ts.map +1 -1
- package/dist/data/resolve-data-templates.js +31 -4
- package/dist/data/resolve-data-templates.js.map +1 -1
- package/dist/data/schema-heuristics.d.ts +5 -0
- package/dist/data/schema-heuristics.d.ts.map +1 -0
- package/dist/data/schema-heuristics.js +46 -0
- package/dist/data/schema-heuristics.js.map +1 -0
- package/dist/editor/P1App.d.ts.map +1 -1
- package/dist/editor/P1App.js +1 -1
- package/dist/editor/P1App.js.map +1 -1
- package/dist/editor/P1PuckProvider.d.ts.map +1 -1
- package/dist/editor/P1PuckProvider.js +170 -41
- package/dist/editor/P1PuckProvider.js.map +1 -1
- package/dist/editor/aiPanelStore.d.ts +15 -0
- package/dist/editor/aiPanelStore.d.ts.map +1 -0
- package/dist/editor/aiPanelStore.js +43 -0
- package/dist/editor/aiPanelStore.js.map +1 -0
- package/dist/editor/components/CollapsibleFieldSection.d.ts +10 -0
- package/dist/editor/components/CollapsibleFieldSection.d.ts.map +1 -0
- package/dist/editor/components/CollapsibleFieldSection.js +9 -0
- package/dist/editor/components/CollapsibleFieldSection.js.map +1 -0
- package/dist/editor/components/CollapsibleSection.module.css +70 -0
- package/dist/editor/components/CollapsibleSectionHeader.d.ts +20 -0
- package/dist/editor/components/CollapsibleSectionHeader.d.ts.map +1 -0
- package/dist/editor/components/CollapsibleSectionHeader.js +10 -0
- package/dist/editor/components/CollapsibleSectionHeader.js.map +1 -0
- package/dist/editor/components/DraggableRow.d.ts +13 -0
- package/dist/editor/components/DraggableRow.d.ts.map +1 -0
- package/dist/editor/components/DraggableRow.js +20 -0
- package/dist/editor/components/DraggableRow.js.map +1 -0
- package/dist/editor/components/FieldHelpText.d.ts +6 -0
- package/dist/editor/components/FieldHelpText.d.ts.map +1 -0
- package/dist/editor/components/FieldHelpText.js +6 -0
- package/dist/editor/components/FieldHelpText.js.map +1 -0
- package/dist/editor/components/FieldHelpText.module.css +13 -0
- package/dist/editor/components/InspectorTabHeader.js +1 -1
- package/dist/editor/components/InspectorTabHeader.js.map +1 -1
- package/dist/editor/components/OutlinePanel.d.ts +10 -0
- package/dist/editor/components/OutlinePanel.d.ts.map +1 -0
- package/dist/editor/components/OutlinePanel.js +64 -0
- package/dist/editor/components/OutlinePanel.js.map +1 -0
- package/dist/editor/components/OutlinePanel.module.css +111 -0
- package/dist/editor/components/P1InspectorFields.d.ts.map +1 -1
- package/dist/editor/components/P1InspectorFields.js +24 -5
- package/dist/editor/components/P1InspectorFields.js.map +1 -1
- package/dist/editor/components/PanelHeader.d.ts +25 -0
- package/dist/editor/components/PanelHeader.d.ts.map +1 -0
- package/dist/editor/components/PanelHeader.js +12 -0
- package/dist/editor/components/PanelHeader.js.map +1 -0
- package/dist/editor/components/PanelHeader.module.css +34 -0
- package/dist/editor/components/PanelShell.d.ts +10 -0
- package/dist/editor/components/PanelShell.d.ts.map +1 -0
- package/dist/editor/components/PanelShell.js +7 -0
- package/dist/editor/components/PanelShell.js.map +1 -0
- package/dist/editor/components/PanelShell.module.css +15 -0
- package/dist/editor/components/PreviewPanelOverlay.d.ts +12 -0
- package/dist/editor/components/PreviewPanelOverlay.d.ts.map +1 -0
- package/dist/editor/components/PreviewPanelOverlay.js +7 -0
- package/dist/editor/components/PreviewPanelOverlay.js.map +1 -0
- package/dist/editor/components/PublishedStatusBadge.d.ts +1 -1
- package/dist/editor/components/PublishedStatusBadge.d.ts.map +1 -1
- package/dist/editor/components/VersionBannerOverride.d.ts +5 -1
- package/dist/editor/components/VersionBannerOverride.d.ts.map +1 -1
- package/dist/editor/components/VersionBannerOverride.js +54 -5
- package/dist/editor/components/VersionBannerOverride.js.map +1 -1
- package/dist/editor/components/VersionTimeline.d.ts +20 -0
- package/dist/editor/components/VersionTimeline.d.ts.map +1 -0
- package/dist/editor/components/VersionTimeline.js +42 -0
- package/dist/editor/components/VersionTimeline.js.map +1 -0
- package/dist/editor/components/collapsibleSectionContext.d.ts +17 -0
- package/dist/editor/components/collapsibleSectionContext.d.ts.map +1 -0
- package/dist/editor/components/collapsibleSectionContext.js +13 -0
- package/dist/editor/components/collapsibleSectionContext.js.map +1 -0
- package/dist/editor/components/componentIconName.d.ts +15 -0
- package/dist/editor/components/componentIconName.d.ts.map +1 -0
- package/dist/editor/components/componentIconName.js +68 -0
- package/dist/editor/components/componentIconName.js.map +1 -0
- package/dist/editor/components/connectable.d.ts +1 -1
- package/dist/editor/components/connectable.d.ts.map +1 -1
- package/dist/editor/components/merge-preview/MergePreviewPanel.d.ts.map +1 -1
- package/dist/editor/components/merge-preview/MergePreviewPanel.js.map +1 -1
- package/dist/editor/components/merge-preview/MergePreviewRenderer.js +3 -15
- package/dist/editor/components/merge-preview/MergePreviewRenderer.js.map +1 -1
- package/dist/editor/components/outlineTree.d.ts +68 -0
- package/dist/editor/components/outlineTree.d.ts.map +1 -0
- package/dist/editor/components/outlineTree.js +72 -0
- package/dist/editor/components/outlineTree.js.map +1 -0
- package/dist/editor/components/useDragReorder.d.ts +16 -0
- package/dist/editor/components/useDragReorder.d.ts.map +1 -0
- package/dist/editor/components/useDragReorder.js +35 -0
- package/dist/editor/components/useDragReorder.js.map +1 -0
- package/dist/editor/index.d.ts +13 -0
- package/dist/editor/index.d.ts.map +1 -1
- package/dist/editor/index.js +8 -0
- package/dist/editor/index.js.map +1 -1
- package/dist/editor/plugin/P1Plugin.d.ts +19 -3
- package/dist/editor/plugin/P1Plugin.d.ts.map +1 -1
- package/dist/editor/plugin/P1Plugin.js +121 -98
- package/dist/editor/plugin/P1Plugin.js.map +1 -1
- package/dist/editor/plugin/context-sync-key.d.ts.map +1 -1
- package/dist/editor/plugin/context-sync-key.js +5 -5
- package/dist/editor/plugin/context-sync-key.js.map +1 -1
- package/dist/editor/plugin/createP1Overrides.d.ts +31 -43
- package/dist/editor/plugin/createP1Overrides.d.ts.map +1 -1
- package/dist/editor/plugin/createP1Overrides.js +47 -43
- package/dist/editor/plugin/createP1Overrides.js.map +1 -1
- package/dist/editor/plugin/document-sync-plugin.d.ts +23 -5
- package/dist/editor/plugin/document-sync-plugin.d.ts.map +1 -1
- package/dist/editor/plugin/document-sync-plugin.js +13 -6
- package/dist/editor/plugin/document-sync-plugin.js.map +1 -1
- package/dist/editor/plugin/fieldGuidance.d.ts +45 -0
- package/dist/editor/plugin/fieldGuidance.d.ts.map +1 -0
- package/dist/editor/plugin/fieldGuidance.js +24 -0
- package/dist/editor/plugin/fieldGuidance.js.map +1 -0
- package/dist/editor/plugin/mergePreviewPlugin.d.ts.map +1 -1
- package/dist/editor/plugin/mergePreviewPlugin.js.map +1 -1
- package/dist/editor/plugin/selectHeaderCollaborators.d.ts +12 -0
- package/dist/editor/plugin/selectHeaderCollaborators.d.ts.map +1 -0
- package/dist/editor/plugin/selectHeaderCollaborators.js +15 -0
- package/dist/editor/plugin/selectHeaderCollaborators.js.map +1 -0
- package/dist/editor/thumbnails/LiveThumbnail.d.ts +47 -0
- package/dist/editor/thumbnails/LiveThumbnail.d.ts.map +1 -0
- package/dist/editor/thumbnails/LiveThumbnail.js +120 -0
- package/dist/editor/thumbnails/LiveThumbnail.js.map +1 -0
- package/dist/editor/thumbnails/ThumbnailCard.d.ts +37 -0
- package/dist/editor/thumbnails/ThumbnailCard.d.ts.map +1 -0
- package/dist/editor/thumbnails/ThumbnailCard.js +91 -0
- package/dist/editor/thumbnails/ThumbnailCard.js.map +1 -0
- package/dist/editor/thumbnails/buildLiveThumbnailDrawer.d.ts +33 -0
- package/dist/editor/thumbnails/buildLiveThumbnailDrawer.d.ts.map +1 -0
- package/dist/editor/thumbnails/buildLiveThumbnailDrawer.js +79 -0
- package/dist/editor/thumbnails/buildLiveThumbnailDrawer.js.map +1 -0
- package/dist/editor/thumbnails/humanizeComponentName.d.ts +18 -0
- package/dist/editor/thumbnails/humanizeComponentName.d.ts.map +1 -0
- package/dist/editor/thumbnails/humanizeComponentName.js +32 -0
- package/dist/editor/thumbnails/humanizeComponentName.js.map +1 -0
- package/dist/editor/thumbnails/resolveLiveThumbnailDrawer.d.ts +15 -0
- package/dist/editor/thumbnails/resolveLiveThumbnailDrawer.d.ts.map +1 -0
- package/dist/editor/thumbnails/resolveLiveThumbnailDrawer.js +19 -0
- package/dist/editor/thumbnails/resolveLiveThumbnailDrawer.js.map +1 -0
- package/dist/editor/thumbnails/thumbnailCache.d.ts +39 -0
- package/dist/editor/thumbnails/thumbnailCache.d.ts.map +1 -0
- package/dist/editor/thumbnails/thumbnailCache.js +97 -0
- package/dist/editor/thumbnails/thumbnailCache.js.map +1 -0
- package/dist/editor/useP1Editor.d.ts +14 -4
- package/dist/editor/useP1Editor.d.ts.map +1 -1
- package/dist/editor/useP1Editor.js +81 -37
- package/dist/editor/useP1Editor.js.map +1 -1
- package/dist/editor/useP1Overrides.d.ts +1 -1
- package/dist/editor/useP1Overrides.d.ts.map +1 -1
- package/dist/editor/useP1Overrides.js.map +1 -1
- package/dist/editor/useP1Plugin.d.ts +15 -3
- package/dist/editor/useP1Plugin.d.ts.map +1 -1
- package/dist/editor/useP1Plugin.js +4 -0
- package/dist/editor/useP1Plugin.js.map +1 -1
- package/dist/editor/useRealtime.d.ts +2 -2
- package/dist/editor/useRealtime.d.ts.map +1 -1
- package/dist/editor/useRealtime.js.map +1 -1
- package/dist/editor/useResponsivePanels.d.ts +29 -0
- package/dist/editor/useResponsivePanels.d.ts.map +1 -0
- package/dist/editor/useResponsivePanels.js +175 -0
- package/dist/editor/useResponsivePanels.js.map +1 -0
- package/dist/editor/useSidebarScrollPreservation.d.ts +10 -0
- package/dist/editor/useSidebarScrollPreservation.d.ts.map +1 -0
- package/dist/editor/useSidebarScrollPreservation.js +39 -0
- package/dist/editor/useSidebarScrollPreservation.js.map +1 -0
- package/dist/editor/utils/componentRegistry.d.ts +4 -4
- package/dist/editor/utils/componentRegistry.d.ts.map +1 -1
- package/dist/editor/utils/componentRegistry.js +0 -1
- package/dist/editor/utils/componentRegistry.js.map +1 -1
- package/dist/editor/utils/restoreDocumentVersion.d.ts +18 -0
- package/dist/editor/utils/restoreDocumentVersion.d.ts.map +1 -0
- package/dist/editor/utils/restoreDocumentVersion.js +49 -0
- package/dist/editor/utils/restoreDocumentVersion.js.map +1 -0
- package/dist/editor/utils/sanitizeRichtextDefaults.d.ts +22 -0
- package/dist/editor/utils/sanitizeRichtextDefaults.d.ts.map +1 -0
- package/dist/editor/utils/sanitizeRichtextDefaults.js +98 -0
- package/dist/editor/utils/sanitizeRichtextDefaults.js.map +1 -0
- package/dist/features/content-type-templates/permissions/createPuckPermissions.d.ts +1 -3
- package/dist/features/content-type-templates/permissions/createPuckPermissions.d.ts.map +1 -1
- package/dist/features/content-type-templates/permissions/createPuckPermissions.js.map +1 -1
- package/dist/features/content-type-templates/stores/template-store-api.d.ts.map +1 -1
- package/dist/features/content-type-templates/ui/ActionBarPinButton.d.ts.map +1 -1
- package/dist/features/content-type-templates/ui/ActionBarPinButton.js +1 -1
- package/dist/features/content-type-templates/ui/ActionBarPinButton.js.map +1 -1
- package/dist/index.d.ts +14 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +13 -1
- package/dist/index.js.map +1 -1
- package/dist/merge/components/merge-resolution/CherryPickVisualPanel.js +1 -3
- package/dist/merge/components/merge-resolution/CherryPickVisualPanel.js.map +1 -1
- package/dist/merge/components/merge-resolution/DocumentResolutionDetail.js +2 -2
- package/dist/merge/components/merge-resolution/DocumentResolutionDetail.js.map +1 -1
- package/dist/p1/editor/client.d.ts +1 -5
- package/dist/p1/editor/client.d.ts.map +1 -1
- package/dist/p1/editor/client.js +11 -12
- package/dist/p1/editor/client.js.map +1 -1
- package/dist/p1/editor/connect/connect-field-modal.d.ts +1 -1
- package/dist/p1/editor/connect/connect-field-modal.d.ts.map +1 -1
- package/dist/p1/editor/connect/connect-field-modal.js +1 -1
- package/dist/p1/editor/connect/connect-field-modal.js.map +1 -1
- package/dist/p1/editor/connect/connect-preview-config.d.ts +1 -1
- package/dist/p1/editor/connect/connect-preview-config.d.ts.map +1 -1
- package/dist/p1/editor/connect/field-connect-plugin.js +1 -1
- package/dist/p1/editor/connect/field-connect-plugin.js.map +1 -1
- package/dist/p1/editor/editor-preview-resolve.d.ts +15 -4
- package/dist/p1/editor/editor-preview-resolve.d.ts.map +1 -1
- package/dist/p1/editor/editor-preview-resolve.js +30 -8
- package/dist/p1/editor/editor-preview-resolve.js.map +1 -1
- package/dist/p1/editor/hooks/api-hooks.d.ts +4 -4
- package/dist/p1/editor/hooks/api-hooks.d.ts.map +1 -1
- package/dist/p1/editor/hooks/api-hooks.js +57 -30
- 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/useEditorContext.d.ts +1 -1
- package/dist/p1/editor/hooks/useEditorContext.d.ts.map +1 -1
- package/dist/p1/editor/hooks/useEditorContext.js +12 -3
- package/dist/p1/editor/hooks/useEditorContext.js.map +1 -1
- package/dist/p1/editor/hooks/useLiveRemoteDatasources.d.ts +31 -0
- package/dist/p1/editor/hooks/useLiveRemoteDatasources.d.ts.map +1 -0
- package/dist/p1/editor/hooks/useLiveRemoteDatasources.js +45 -0
- package/dist/p1/editor/hooks/useLiveRemoteDatasources.js.map +1 -0
- package/dist/p1/editor/hooks/useP1Plugins.d.ts.map +1 -1
- package/dist/p1/editor/hooks/useP1Plugins.js +6 -12
- package/dist/p1/editor/hooks/useP1Plugins.js.map +1 -1
- package/dist/p1/editor/icons/button-block-icon.d.ts +1 -1
- package/dist/p1/editor/icons/button-block-icon.d.ts.map +1 -1
- package/dist/p1/editor/icons/data-list-block-icon.d.ts +2 -0
- package/dist/p1/editor/icons/data-list-block-icon.d.ts.map +1 -0
- package/dist/p1/editor/icons/data-list-block-icon.js +5 -0
- package/dist/p1/editor/icons/data-list-block-icon.js.map +1 -0
- package/dist/p1/editor/icons/default-block-icon.d.ts +1 -1
- package/dist/p1/editor/icons/default-block-icon.d.ts.map +1 -1
- package/dist/p1/editor/icons/divider-block-icon.d.ts +1 -1
- package/dist/p1/editor/icons/divider-block-icon.d.ts.map +1 -1
- package/dist/p1/editor/icons/grid-block-icon.d.ts +1 -1
- package/dist/p1/editor/icons/grid-block-icon.d.ts.map +1 -1
- package/dist/p1/editor/icons/heading-block-icon.d.ts +1 -1
- package/dist/p1/editor/icons/heading-block-icon.d.ts.map +1 -1
- package/dist/p1/editor/icons/image-block-icon.d.ts +1 -1
- package/dist/p1/editor/icons/image-block-icon.d.ts.map +1 -1
- package/dist/p1/editor/icons/list-block-icon.d.ts +1 -1
- package/dist/p1/editor/icons/list-block-icon.d.ts.map +1 -1
- package/dist/p1/editor/icons/paragraph-block-icon.d.ts +1 -1
- package/dist/p1/editor/icons/paragraph-block-icon.d.ts.map +1 -1
- package/dist/p1/editor/icons/quote-block-icon.d.ts +1 -1
- package/dist/p1/editor/icons/quote-block-icon.d.ts.map +1 -1
- package/dist/p1/editor/icons/spacer-block-icon.d.ts +1 -1
- package/dist/p1/editor/icons/spacer-block-icon.d.ts.map +1 -1
- package/dist/p1/editor/index.d.ts +1 -1
- package/dist/p1/editor/index.d.ts.map +1 -1
- package/dist/p1/editor/index.js +1 -1
- package/dist/p1/editor/index.js.map +1 -1
- package/dist/p1/editor/remote-datasources/remote-datasource-explorer-plugin.d.ts +6 -7
- package/dist/p1/editor/remote-datasources/remote-datasource-explorer-plugin.d.ts.map +1 -1
- package/dist/p1/editor/remote-datasources/remote-datasource-explorer-plugin.js +77 -73
- package/dist/p1/editor/remote-datasources/remote-datasource-explorer-plugin.js.map +1 -1
- package/dist/p1/editor/remote-datasources/remote-datasource-form-helpers.d.ts +4 -4
- package/dist/p1/editor/remote-datasources/remote-datasource-form-helpers.d.ts.map +1 -1
- package/dist/p1/editor/remote-datasources/remote-datasource-form-helpers.js.map +1 -1
- package/dist/p1/editor/remote-datasources/remote-datasource-manager.d.ts +1 -1
- package/dist/p1/editor/remote-datasources/remote-datasource-manager.d.ts.map +1 -1
- package/dist/p1/editor/remote-datasources/remote-datasource-manager.js +1 -1
- package/dist/p1/editor/remote-datasources/remote-datasource-manager.js.map +1 -1
- package/dist/p1/editor/remote-datasources/template-preview-params-toolbar.d.ts +1 -1
- package/dist/p1/editor/remote-datasources/template-preview-params-toolbar.d.ts.map +1 -1
- package/dist/p1/editor/remote-datasources/template-preview-params-toolbar.js +1 -1
- package/dist/p1/editor/remote-datasources/template-preview-params-toolbar.js.map +1 -1
- package/dist/p1/editor/template-autocomplete-layer.d.ts +2 -2
- package/dist/p1/editor/template-autocomplete-layer.d.ts.map +1 -1
- package/dist/p1/editor/template-autocomplete-layer.js +23 -3
- package/dist/p1/editor/template-autocomplete-layer.js.map +1 -1
- package/dist/p1/pages/render-client.d.ts +1 -1
- package/dist/p1/pages/render-client.d.ts.map +1 -1
- package/dist/p1/pages/render-client.js +2 -1
- package/dist/p1/pages/render-client.js.map +1 -1
- package/dist/pds/components/AgentChip.d.ts.map +1 -1
- package/dist/pds/components/AgentChip.js +1 -2
- package/dist/pds/components/AgentChip.js.map +1 -1
- package/dist/pds/components/CreatePageModal.d.ts +10 -1
- package/dist/pds/components/CreatePageModal.d.ts.map +1 -1
- package/dist/pds/components/CreatePageModal.js +29 -9
- package/dist/pds/components/CreatePageModal.js.map +1 -1
- package/dist/pds/components/CreatePageModal.module.css +34 -0
- package/dist/pds/components/DocStateBadge.d.ts +1 -1
- package/dist/pds/components/DocStateBadge.d.ts.map +1 -1
- package/dist/pds/components/DocStateBadge.js +1 -1
- package/dist/pds/components/DocStateBadge.js.map +1 -1
- package/dist/pds/components/NavIcon.js +1 -1
- package/dist/pds/components/NavIcon.js.map +1 -1
- package/dist/pds/components/P1EditorHeader.d.ts +10 -2
- package/dist/pds/components/P1EditorHeader.d.ts.map +1 -1
- package/dist/pds/components/P1EditorHeader.js +16 -7
- package/dist/pds/components/P1EditorHeader.js.map +1 -1
- package/dist/pds/components/P1EditorHeader.module.css +113 -35
- package/dist/pds/components/P1EditorSubheader.d.ts +1 -4
- package/dist/pds/components/P1EditorSubheader.d.ts.map +1 -1
- package/dist/pds/components/P1EditorSubheader.js +10 -21
- package/dist/pds/components/P1EditorSubheader.js.map +1 -1
- package/dist/pds/components/P1EditorSubheader.module.css +7 -5
- package/dist/pds/components/PageNavigator.d.ts.map +1 -1
- package/dist/pds/components/PageNavigator.js.map +1 -1
- package/dist/pds/components/PresenceStack.d.ts +6 -5
- package/dist/pds/components/PresenceStack.d.ts.map +1 -1
- package/dist/pds/components/PresenceStack.js +43 -4
- package/dist/pds/components/PresenceStack.js.map +1 -1
- package/dist/pds/components/PresenceStack.module.css +52 -7
- package/dist/pds/components/PublishControl.js +2 -2
- package/dist/pds/components/PublishControl.js.map +1 -1
- package/dist/pds/components/WorkstreamSwitcher.d.ts +7 -2
- package/dist/pds/components/WorkstreamSwitcher.d.ts.map +1 -1
- package/dist/pds/components/WorkstreamSwitcher.js +5 -3
- package/dist/pds/components/WorkstreamSwitcher.js.map +1 -1
- package/dist/server.d.ts +3 -1
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +4 -1
- package/dist/server.js.map +1 -1
- package/dist/versioning/components/HistoricalVersionBanner.d.ts +19 -21
- package/dist/versioning/components/HistoricalVersionBanner.d.ts.map +1 -1
- package/dist/versioning/components/HistoricalVersionBanner.js +9 -21
- package/dist/versioning/components/HistoricalVersionBanner.js.map +1 -1
- package/dist/versioning/components/HistoricalVersionBanner.module.css +174 -0
- package/dist/versioning/components/VersionBannerActions.d.ts +15 -0
- package/dist/versioning/components/VersionBannerActions.d.ts.map +1 -0
- package/dist/versioning/components/VersionBannerActions.js +38 -0
- package/dist/versioning/components/VersionBannerActions.js.map +1 -0
- package/dist/versioning/components/VersionPublishedBadge.d.ts +1 -1
- package/dist/versioning/components/VersionPublishedBadge.d.ts.map +1 -1
- package/dist/versioning/components/version-compare/VisualVersionCompare.d.ts +2 -2
- package/dist/versioning/components/version-compare/VisualVersionCompare.d.ts.map +1 -1
- package/dist/versioning/utils/formatVersionDate.d.ts +15 -0
- package/dist/versioning/utils/formatVersionDate.d.ts.map +1 -0
- package/dist/versioning/utils/formatVersionDate.js +41 -0
- package/dist/versioning/utils/formatVersionDate.js.map +1 -0
- package/dist/versioning/utils/versionKind.d.ts +19 -0
- package/dist/versioning/utils/versionKind.d.ts.map +1 -0
- package/dist/versioning/utils/versionKind.js +30 -0
- package/dist/versioning/utils/versionKind.js.map +1 -0
- package/package.json +11 -7
- package/src/pds/theme/PuckEditorTheme.css +81 -0
- package/src/pds/theme/PuckEditorTheme.test.ts +50 -1
- package/src/styles.css +609 -84
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
/* `flex: none` keeps the banner at its own height inside the canvas column. */
|
|
2
|
+
.slot {
|
|
3
|
+
flex: none;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
/* Grid rather than flex so the actions can never wrap onto a second line as the
|
|
7
|
+
canvas narrows — the banner would change height and shove the canvas down.
|
|
8
|
+
The middle column absorbs the squeeze; `error` gets its own row. */
|
|
9
|
+
.banner {
|
|
10
|
+
display: grid;
|
|
11
|
+
grid-template-columns: auto 1fr auto;
|
|
12
|
+
align-items: center;
|
|
13
|
+
gap: var(--pds-spacing-s);
|
|
14
|
+
padding: var(--pds-spacing-xs) var(--pds-spacing-m);
|
|
15
|
+
background: var(--pds-color-bg-default-secondary, #f9fafb);
|
|
16
|
+
border-top: 2px solid var(--pds-color-interactive-link-default, #3a5dfb);
|
|
17
|
+
border-bottom: var(--pds-border-width-default, 1px) solid var(--pds-color-border-secondary, #ececf0);
|
|
18
|
+
color: var(--pds-color-fg-default, #171717);
|
|
19
|
+
font-family: var(--pds-typography-ff-default, 'Inter', system-ui, sans-serif);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.icon {
|
|
23
|
+
display: flex;
|
|
24
|
+
align-items: center;
|
|
25
|
+
justify-content: center;
|
|
26
|
+
color: var(--pds-color-interactive-link-default, #3a5dfb);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/* `display: block` rather than flex because text-overflow does not apply to flex
|
|
30
|
+
children — the two spans sit inline in one truncation context, so the
|
|
31
|
+
timestamp erodes before the version number without needing a breakpoint. */
|
|
32
|
+
.content {
|
|
33
|
+
min-width: 0;
|
|
34
|
+
display: block;
|
|
35
|
+
white-space: nowrap;
|
|
36
|
+
overflow: hidden;
|
|
37
|
+
text-overflow: ellipsis;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.text {
|
|
41
|
+
font: 500 var(--pds-typography-size-s) var(--pds-typography-ff-default, 'Inter', system-ui, sans-serif);
|
|
42
|
+
color: var(--pds-color-fg-default, #171717);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.text strong {
|
|
46
|
+
font: 700 var(--pds-typography-size-s) var(--pds-typography-ff-compact, 'Inter Tight', 'Inter', system-ui, sans-serif);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.date {
|
|
50
|
+
font: 500 var(--pds-typography-size-s) var(--pds-typography-ff-default, 'Inter', system-ui, sans-serif);
|
|
51
|
+
color: var(--pds-color-fg-default, #171717);
|
|
52
|
+
margin-left: var(--pds-spacing-3xs);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.actions {
|
|
56
|
+
display: flex;
|
|
57
|
+
align-items: center;
|
|
58
|
+
gap: var(--pds-spacing-2xs);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.exitBtn {
|
|
62
|
+
/* Reset browser button defaults without wiping font (all:unset kills font too) */
|
|
63
|
+
appearance: none;
|
|
64
|
+
-webkit-appearance: none;
|
|
65
|
+
box-sizing: border-box;
|
|
66
|
+
display: inline-flex;
|
|
67
|
+
align-items: center;
|
|
68
|
+
justify-content: center;
|
|
69
|
+
border: var(--pds-border-width-default, 1px) solid var(--pds-color-border-default, #d4d4d4);
|
|
70
|
+
background: var(--pds-color-bg-surface, white);
|
|
71
|
+
border-radius: 9px;
|
|
72
|
+
padding: 9px 20px;
|
|
73
|
+
font: 600 var(--pds-typography-size-s) var(--pds-typography-ff-compact, 'Inter Tight', 'Inter', system-ui, sans-serif);
|
|
74
|
+
color: var(--pds-color-fg-default, #171717);
|
|
75
|
+
cursor: pointer;
|
|
76
|
+
white-space: nowrap;
|
|
77
|
+
transition: var(--pds-animation-transition-button);
|
|
78
|
+
line-height: 1;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.exitBtn:hover:not(:disabled) {
|
|
82
|
+
background: var(--pds-color-interactive-background-hover, #f5f5f5);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.exitBtn:disabled {
|
|
86
|
+
opacity: 0.5;
|
|
87
|
+
cursor: default;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.revertBtn {
|
|
91
|
+
display: inline-flex;
|
|
92
|
+
align-items: center;
|
|
93
|
+
justify-content: center;
|
|
94
|
+
gap: var(--pds-spacing-button-gap-inline-m);
|
|
95
|
+
border: none;
|
|
96
|
+
border-radius: var(--pds-border-radius-button);
|
|
97
|
+
background: var(--pds-color-fg-default, #171717);
|
|
98
|
+
color: white;
|
|
99
|
+
font: 700 var(--pds-typography-size-s) var(--pds-typography-ff-compact, 'Inter Tight', 'Inter', system-ui, sans-serif);
|
|
100
|
+
padding: 11px 18px;
|
|
101
|
+
cursor: pointer;
|
|
102
|
+
white-space: nowrap;
|
|
103
|
+
transition: var(--pds-animation-transition-button);
|
|
104
|
+
line-height: 1;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.revertBtn:hover:not(:disabled) {
|
|
108
|
+
filter: brightness(1.15);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.revertBtn:disabled {
|
|
112
|
+
opacity: 0.6;
|
|
113
|
+
cursor: default;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/* Its own row, so a revert failure never competes with the actions for width. */
|
|
117
|
+
.error {
|
|
118
|
+
grid-column: 1 / -1;
|
|
119
|
+
margin: 0;
|
|
120
|
+
padding: 0;
|
|
121
|
+
font-size: var(--pds-typography-size-s, 0.875rem);
|
|
122
|
+
color: var(--pds-color-status-error-icon, #c0392b);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.spinner {
|
|
126
|
+
display: inline-block;
|
|
127
|
+
width: 12px;
|
|
128
|
+
height: 12px;
|
|
129
|
+
border: 2px solid currentColor;
|
|
130
|
+
border-top-color: transparent;
|
|
131
|
+
border-radius: 50%;
|
|
132
|
+
animation: spin 0.6s linear infinite;
|
|
133
|
+
flex: none;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
@keyframes spin {
|
|
137
|
+
to {
|
|
138
|
+
transform: rotate(360deg);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.steppers {
|
|
143
|
+
display: flex;
|
|
144
|
+
gap: 2px;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
/* PDS wraps the trigger in its own element; the inline padding would push the
|
|
148
|
+
steppers apart. */
|
|
149
|
+
.steppers :global(.pds-tooltip) {
|
|
150
|
+
padding-inline: 0;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.stepperBtn {
|
|
154
|
+
display: flex;
|
|
155
|
+
align-items: center;
|
|
156
|
+
justify-content: center;
|
|
157
|
+
width: 32px;
|
|
158
|
+
height: 32px;
|
|
159
|
+
border-radius: 9px;
|
|
160
|
+
border: none;
|
|
161
|
+
background: transparent;
|
|
162
|
+
cursor: pointer;
|
|
163
|
+
color: var(--pds-color-fg-default, #1a1a1a);
|
|
164
|
+
transition: background 100ms ease;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.stepperBtn:hover:not(:disabled) {
|
|
168
|
+
background: var(--pds-color-interactive-background-hover, #f5f5f5);
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.stepperBtn:disabled {
|
|
172
|
+
opacity: 0.35;
|
|
173
|
+
cursor: not-allowed;
|
|
174
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { DocumentVersion } from '@pantheon-systems/css-client';
|
|
3
|
+
export interface VersionBannerActionsProps {
|
|
4
|
+
version?: DocumentVersion;
|
|
5
|
+
onReturnToLatest: () => void;
|
|
6
|
+
onRestoreVersion?: (version: DocumentVersion) => Promise<void>;
|
|
7
|
+
canRevert?: boolean;
|
|
8
|
+
isReturning?: boolean;
|
|
9
|
+
onPrevious?: () => void;
|
|
10
|
+
onNext?: () => void;
|
|
11
|
+
hasPrevious?: boolean;
|
|
12
|
+
hasNext?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export declare function VersionBannerActions({ version, onReturnToLatest, onRestoreVersion, canRevert, isReturning, onPrevious, onNext, hasPrevious, hasNext, }: VersionBannerActionsProps): React.ReactElement;
|
|
15
|
+
//# sourceMappingURL=VersionBannerActions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VersionBannerActions.d.ts","sourceRoot":"","sources":["../../../src/versioning/components/VersionBannerActions.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AACnD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAmBpE,MAAM,WAAW,yBAAyB;IACxC,OAAO,CAAC,EAAE,eAAe,CAAC;IAC1B,gBAAgB,EAAE,MAAM,IAAI,CAAC;IAC7B,gBAAgB,CAAC,EAAE,CAAC,OAAO,EAAE,eAAe,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/D,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,wBAAgB,oBAAoB,CAAC,EACnC,OAAO,EACP,gBAAgB,EAChB,gBAAgB,EAChB,SAAiB,EACjB,WAAmB,EACnB,UAAU,EACV,MAAM,EACN,WAAmB,EACnB,OAAe,GAChB,EAAE,yBAAyB,GAAG,KAAK,CAAC,YAAY,CAuGhD"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { useState, useEffect } from 'react';
|
|
3
|
+
import { Icon, Tooltip } from '@pantheon-systems/pds-toolkit-react';
|
|
4
|
+
import styles from './HistoricalVersionBanner.module.css';
|
|
5
|
+
const REVERT_ERROR_FALLBACK = 'Revert failed. Please try again.';
|
|
6
|
+
function StepperTooltip({ content, disabled, children, }) {
|
|
7
|
+
if (disabled)
|
|
8
|
+
return children;
|
|
9
|
+
return _jsx(Tooltip, { content: content, preferredPlacement: "top", customTrigger: children });
|
|
10
|
+
}
|
|
11
|
+
export function VersionBannerActions({ version, onReturnToLatest, onRestoreVersion, canRevert = false, isReturning = false, onPrevious, onNext, hasPrevious = false, hasNext = false, }) {
|
|
12
|
+
const [isReverting, setIsReverting] = useState(false);
|
|
13
|
+
const [revertError, setRevertError] = useState(null);
|
|
14
|
+
const busy = isReverting || isReturning;
|
|
15
|
+
const prevDisabled = !hasPrevious || busy;
|
|
16
|
+
const nextDisabled = !hasNext || busy;
|
|
17
|
+
useEffect(() => { setRevertError(null); }, [version?.id]);
|
|
18
|
+
const handleRevert = async () => {
|
|
19
|
+
if (!onRestoreVersion || !version)
|
|
20
|
+
return;
|
|
21
|
+
setIsReverting(true);
|
|
22
|
+
setRevertError(null);
|
|
23
|
+
try {
|
|
24
|
+
await onRestoreVersion(version);
|
|
25
|
+
}
|
|
26
|
+
catch (err) {
|
|
27
|
+
// Cap server error messages to avoid leaking internal details or long stack traces.
|
|
28
|
+
setRevertError(err instanceof Error && err.message.length < 80
|
|
29
|
+
? err.message
|
|
30
|
+
: REVERT_ERROR_FALLBACK);
|
|
31
|
+
}
|
|
32
|
+
finally {
|
|
33
|
+
setIsReverting(false);
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
return (_jsxs(_Fragment, { children: [_jsxs("div", { className: styles.actions, children: [(onPrevious || onNext) && (_jsxs("div", { className: styles.steppers, children: [onPrevious && (_jsx(StepperTooltip, { content: "Previous Version", disabled: prevDisabled, children: _jsx("button", { type: "button", className: styles.stepperBtn, "aria-label": "Previous version", disabled: prevDisabled, onClick: onPrevious, children: _jsx(Icon, { iconName: "angleLeft", size: "s", "aria-hidden": "true" }) }) })), onNext && (_jsx(StepperTooltip, { content: "Next Version", disabled: nextDisabled, children: _jsx("button", { type: "button", className: styles.stepperBtn, "aria-label": "Next version", disabled: nextDisabled, onClick: onNext, children: _jsx(Icon, { iconName: "angleRight", size: "s", "aria-hidden": "true" }) }) }))] })), _jsx("button", { type: "button", className: styles.exitBtn, disabled: isReverting || isReturning, "aria-busy": isReturning, onClick: onReturnToLatest, "aria-label": "Return to current", children: isReturning ? 'Returning…' : 'Exit preview' }), canRevert && onRestoreVersion && version && (_jsx("button", { type: "button", className: styles.revertBtn, disabled: isReverting || isReturning, "aria-busy": isReverting, onClick: () => { void handleRevert(); }, children: isReverting ? (_jsxs(_Fragment, { children: [_jsx("span", { className: styles.spinner, "aria-hidden": "true" }), "Reverting\u2026"] })) : (_jsxs(_Fragment, { children: [_jsx(Icon, { iconName: "rotateLeft", size: "s", "aria-hidden": "true" }), "Revert to this version"] })) }))] }), revertError && (_jsx("p", { className: styles.error, role: "alert", children: revertError }))] }));
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=VersionBannerActions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VersionBannerActions.js","sourceRoot":"","sources":["../../../src/versioning/components/VersionBannerActions.tsx"],"names":[],"mappings":"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"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export interface VersionPublishedBadgeProps {
|
|
2
2
|
isPublished?: boolean;
|
|
3
3
|
}
|
|
4
|
-
export declare function VersionPublishedBadge({ isPublished, }: VersionPublishedBadgeProps): import("react
|
|
4
|
+
export declare function VersionPublishedBadge({ isPublished, }: VersionPublishedBadgeProps): import("react").JSX.Element | null;
|
|
5
5
|
//# sourceMappingURL=VersionPublishedBadge.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VersionPublishedBadge.d.ts","sourceRoot":"","sources":["../../../src/versioning/components/VersionPublishedBadge.tsx"],"names":[],"mappings":"AAAA,MAAM,WAAW,0BAA0B;IACzC,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,wBAAgB,qBAAqB,CAAC,EACpC,WAAkB,GACnB,EAAE,0BAA0B,
|
|
1
|
+
{"version":3,"file":"VersionPublishedBadge.d.ts","sourceRoot":"","sources":["../../../src/versioning/components/VersionPublishedBadge.tsx"],"names":[],"mappings":"AAAA,MAAM,WAAW,0BAA0B;IACzC,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,wBAAgB,qBAAqB,CAAC,EACpC,WAAkB,GACnB,EAAE,0BAA0B,sCAU5B"}
|
|
@@ -10,12 +10,12 @@ import type { ComponentDiffWithPosition } from '../../../core/types.js';
|
|
|
10
10
|
* Puck Data structure (flexible to accept various sources)
|
|
11
11
|
*/
|
|
12
12
|
interface PuckData {
|
|
13
|
-
content:
|
|
13
|
+
content: {
|
|
14
14
|
type: string;
|
|
15
15
|
props: Record<string, unknown> & {
|
|
16
16
|
id: string;
|
|
17
17
|
};
|
|
18
|
-
}
|
|
18
|
+
}[];
|
|
19
19
|
root: {
|
|
20
20
|
props?: Record<string, unknown>;
|
|
21
21
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VisualVersionCompare.d.ts","sourceRoot":"","sources":["../../../../src/versioning/components/version-compare/VisualVersionCompare.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAkB,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AAGxE;;GAEG;AACH,UAAU,QAAQ;IAChB,OAAO,EAAE
|
|
1
|
+
{"version":3,"file":"VisualVersionCompare.d.ts","sourceRoot":"","sources":["../../../../src/versioning/components/version-compare/VisualVersionCompare.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAkB,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AAGxE;;GAEG;AACH,UAAU,QAAQ;IAChB,OAAO,EAAE;QACP,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG;YAAE,EAAE,EAAE,MAAM,CAAA;SAAE,CAAC;KACjD,EAAE,CAAC;IACJ,IAAI,EAAE;QAAE,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;KAAE,CAAC;CAC3C;AAED;;;GAGG;AAEH,KAAK,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAEtC,MAAM,WAAW,yBAAyB;IACxC;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,UAAU,EAAE,QAAQ,CAAC;IAErB;;OAEG;IACH,SAAS,EAAE,QAAQ,CAAC;IAEpB;;OAEG;IACH,MAAM,EAAE,UAAU,CAAC;IAEnB;;OAEG;IACH,KAAK,EAAE,yBAAyB,EAAE,CAAC;IAEnC;;OAEG;IACH,OAAO,EAAE,MAAM,IAAI,CAAC;IAEpB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AA+FD;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,EACnC,aAAa,EACb,YAAY,EACZ,UAAU,EACV,SAAS,EACT,MAAM,EACN,KAAK,EACL,OAAO,EACP,SAAc,GACf,EAAE,yBAAyB,GAAG,KAAK,CAAC,YAAY,CAgFhD"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Formats a DocumentVersion createdAt date string for display in the editor UI.
|
|
3
|
+
* Returns an empty string for invalid/missing dates (safe to use as a falsy guard).
|
|
4
|
+
*/
|
|
5
|
+
export declare function formatVersionDate(dateString: string): string;
|
|
6
|
+
/**
|
|
7
|
+
* Returns a human-readable day-group label for a version timestamp:
|
|
8
|
+
* 'Today', 'Yesterday', or a short date like 'Jul 15'.
|
|
9
|
+
*
|
|
10
|
+
* Day boundaries use local browser time. API timestamps are UTC ISO strings,
|
|
11
|
+
* so users near midnight in timezones ahead of UTC may see a version group
|
|
12
|
+
* under a different day than expected — this is intentional local-time behaviour.
|
|
13
|
+
*/
|
|
14
|
+
export declare function dayLabel(isoString: string): string;
|
|
15
|
+
//# sourceMappingURL=formatVersionDate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"formatVersionDate.d.ts","sourceRoot":"","sources":["../../../src/versioning/utils/formatVersionDate.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAS5D;AAED;;;;;;;GAOG;AACH,wBAAgB,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAmBlD"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Formats a DocumentVersion createdAt date string for display in the editor UI.
|
|
3
|
+
* Returns an empty string for invalid/missing dates (safe to use as a falsy guard).
|
|
4
|
+
*/
|
|
5
|
+
export function formatVersionDate(dateString) {
|
|
6
|
+
const date = new Date(dateString);
|
|
7
|
+
if (isNaN(date.getTime()))
|
|
8
|
+
return '';
|
|
9
|
+
return date.toLocaleDateString('en-US', {
|
|
10
|
+
month: 'short',
|
|
11
|
+
day: 'numeric',
|
|
12
|
+
hour: '2-digit',
|
|
13
|
+
minute: '2-digit',
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Returns a human-readable day-group label for a version timestamp:
|
|
18
|
+
* 'Today', 'Yesterday', or a short date like 'Jul 15'.
|
|
19
|
+
*
|
|
20
|
+
* Day boundaries use local browser time. API timestamps are UTC ISO strings,
|
|
21
|
+
* so users near midnight in timezones ahead of UTC may see a version group
|
|
22
|
+
* under a different day than expected — this is intentional local-time behaviour.
|
|
23
|
+
*/
|
|
24
|
+
export function dayLabel(isoString) {
|
|
25
|
+
const date = new Date(isoString);
|
|
26
|
+
if (isNaN(date.getTime()))
|
|
27
|
+
return '';
|
|
28
|
+
const ref = new Date();
|
|
29
|
+
const startOfToday = new Date(ref);
|
|
30
|
+
startOfToday.setHours(0, 0, 0, 0);
|
|
31
|
+
const startOfYesterday = new Date(startOfToday);
|
|
32
|
+
startOfYesterday.setDate(startOfYesterday.getDate() - 1);
|
|
33
|
+
const startOfDate = new Date(date);
|
|
34
|
+
startOfDate.setHours(0, 0, 0, 0);
|
|
35
|
+
if (startOfDate.getTime() === startOfToday.getTime())
|
|
36
|
+
return 'Today';
|
|
37
|
+
if (startOfDate.getTime() === startOfYesterday.getTime())
|
|
38
|
+
return 'Yesterday';
|
|
39
|
+
return date.toLocaleDateString('en-US', { month: 'short', day: 'numeric' });
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=formatVersionDate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"formatVersionDate.js","sourceRoot":"","sources":["../../../src/versioning/utils/formatVersionDate.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,UAAU,iBAAiB,CAAC,UAAkB;IAClD,MAAM,IAAI,GAAG,IAAI,IAAI,CAAC,UAAU,CAAC,CAAC;IAClC,IAAI,KAAK,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;QAAE,OAAO,EAAE,CAAC;IACrC,OAAO,IAAI,CAAC,kBAAkB,CAAC,OAAO,EAAE;QACtC,KAAK,EAAE,OAAO;QACd,GAAG,EAAE,SAAS;QACd,IAAI,EAAE,SAAS;QACf,MAAM,EAAE,SAAS;KAClB,CAAC,CAAC;AACL,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,QAAQ,CAAC,SAAiB;IACxC,MAAM,IAAI,GAAG,IAAI,IAAI,CAAC,SAAS,CAAC,CAAC;IACjC,IAAI,KAAK,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;QAAE,OAAO,EAAE,CAAC;IAErC,MAAM,GAAG,GAAG,IAAI,IAAI,EAAE,CAAC;IAEvB,MAAM,YAAY,GAAG,IAAI,IAAI,CAAC,GAAG,CAAC,CAAC;IACnC,YAAY,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;IAElC,MAAM,gBAAgB,GAAG,IAAI,IAAI,CAAC,YAAY,CAAC,CAAC;IAChD,gBAAgB,CAAC,OAAO,CAAC,gBAAgB,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC,CAAC;IAEzD,MAAM,WAAW,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC;IACnC,WAAW,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;IAEjC,IAAI,WAAW,CAAC,OAAO,EAAE,KAAK,YAAY,CAAC,OAAO,EAAE;QAAE,OAAO,OAAO,CAAC;IACrE,IAAI,WAAW,CAAC,OAAO,EAAE,KAAK,gBAAgB,CAAC,OAAO,EAAE;QAAE,OAAO,WAAW,CAAC;IAE7E,OAAO,IAAI,CAAC,kBAAkB,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,SAAS,EAAE,CAAC,CAAC;AAC9E,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { DocumentVersion } from '@pantheon-systems/css-client';
|
|
2
|
+
export type VersionKind = 'current' | 'published' | 'reverted' | 'autosave';
|
|
3
|
+
export declare const VERSION_KIND_META: Record<VersionKind, {
|
|
4
|
+
tag: string | null;
|
|
5
|
+
badgeClass: string;
|
|
6
|
+
milestone: boolean;
|
|
7
|
+
}>;
|
|
8
|
+
/**
|
|
9
|
+
* Returns all applicable display kinds for a version.
|
|
10
|
+
* current, published, and reverted are independent labels that can coexist.
|
|
11
|
+
* Returns ['autosave'] when none of the three apply.
|
|
12
|
+
*/
|
|
13
|
+
export declare function versionKinds(version: DocumentVersion, currentVersionId: string | undefined): VersionKind[];
|
|
14
|
+
/**
|
|
15
|
+
* Returns true for versions that represent a meaningful milestone:
|
|
16
|
+
* published checkpoints and revert points.
|
|
17
|
+
*/
|
|
18
|
+
export declare function isMilestone(version: DocumentVersion): boolean;
|
|
19
|
+
//# sourceMappingURL=versionKind.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"versionKind.d.ts","sourceRoot":"","sources":["../../../src/versioning/utils/versionKind.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAEpE,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,WAAW,GAAG,UAAU,GAAG,UAAU,CAAC;AAE5E,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,WAAW,EAAE;IAAE,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,UAAU,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,OAAO,CAAA;CAAE,CAKjH,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,YAAY,CAC1B,OAAO,EAAE,eAAe,EACxB,gBAAgB,EAAE,MAAM,GAAG,SAAS,GACnC,WAAW,EAAE,CAOf;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAE7D"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export const VERSION_KIND_META = {
|
|
2
|
+
current: { tag: 'Current', badgeClass: '', milestone: false },
|
|
3
|
+
published: { tag: 'Published', badgeClass: 'pds-badge pds-badge--info pds-badge--s', milestone: true },
|
|
4
|
+
reverted: { tag: 'Reverted', badgeClass: 'pds-badge pds-badge--warning pds-badge--s', milestone: true },
|
|
5
|
+
autosave: { tag: null, badgeClass: '', milestone: false },
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Returns all applicable display kinds for a version.
|
|
9
|
+
* current, published, and reverted are independent labels that can coexist.
|
|
10
|
+
* Returns ['autosave'] when none of the three apply.
|
|
11
|
+
*/
|
|
12
|
+
export function versionKinds(version, currentVersionId) {
|
|
13
|
+
const kinds = [];
|
|
14
|
+
// Order matters: kinds[0] drives the timeline dot color (highest → lowest priority).
|
|
15
|
+
if (version.id === currentVersionId)
|
|
16
|
+
kinds.push('current');
|
|
17
|
+
if (version.isPublished === true)
|
|
18
|
+
kinds.push('published');
|
|
19
|
+
if (version.source === 'revert')
|
|
20
|
+
kinds.push('reverted');
|
|
21
|
+
return kinds.length > 0 ? kinds : ['autosave'];
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Returns true for versions that represent a meaningful milestone:
|
|
25
|
+
* published checkpoints and revert points.
|
|
26
|
+
*/
|
|
27
|
+
export function isMilestone(version) {
|
|
28
|
+
return versionKinds(version, undefined).some((k) => VERSION_KIND_META[k].milestone);
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=versionKind.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"versionKind.js","sourceRoot":"","sources":["../../../src/versioning/utils/versionKind.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,MAAM,iBAAiB,GAAwF;IACpH,OAAO,EAAG,EAAE,GAAG,EAAE,SAAS,EAAI,UAAU,EAAE,EAAE,EAA0C,SAAS,EAAE,KAAK,EAAE;IACxG,SAAS,EAAE,EAAE,GAAG,EAAE,WAAW,EAAE,UAAU,EAAE,wCAAwC,EAAK,SAAS,EAAE,IAAI,EAAG;IAC1G,QAAQ,EAAG,EAAE,GAAG,EAAE,UAAU,EAAG,UAAU,EAAE,2CAA2C,EAAE,SAAS,EAAE,IAAI,EAAG;IAC1G,QAAQ,EAAG,EAAE,GAAG,EAAE,IAAI,EAAS,UAAU,EAAE,EAAE,EAA0C,SAAS,EAAE,KAAK,EAAE;CAC1G,CAAC;AAEF;;;;GAIG;AACH,MAAM,UAAU,YAAY,CAC1B,OAAwB,EACxB,gBAAoC;IAEpC,MAAM,KAAK,GAAkB,EAAE,CAAC;IAChC,qFAAqF;IACrF,IAAI,OAAO,CAAC,EAAE,KAAK,gBAAgB;QAAE,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IAC3D,IAAI,OAAO,CAAC,WAAW,KAAK,IAAI;QAAE,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IAC1D,IAAI,OAAO,CAAC,MAAM,KAAK,QAAQ;QAAE,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IACxD,OAAO,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC;AACjD,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,WAAW,CAAC,OAAwB;IAClD,OAAO,YAAY,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;AACtF,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pantheon-systems/puck-css",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.0",
|
|
4
4
|
"description": "Puck editor integration with Collaborative State System",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
},
|
|
10
10
|
"repository": {
|
|
11
11
|
"type": "git",
|
|
12
|
-
"url": "https://github.com/pantheon-systems/
|
|
12
|
+
"url": "git+https://github.com/pantheon-systems/p1-platform.git",
|
|
13
13
|
"directory": "packages/puck-css"
|
|
14
14
|
},
|
|
15
15
|
"type": "module",
|
|
@@ -87,7 +87,8 @@
|
|
|
87
87
|
},
|
|
88
88
|
"files": [
|
|
89
89
|
"dist",
|
|
90
|
-
"src
|
|
90
|
+
"src/**/*.css",
|
|
91
|
+
"!src/**/*.module.css",
|
|
91
92
|
"src/pds/theme"
|
|
92
93
|
],
|
|
93
94
|
"dependencies": {
|
|
@@ -95,7 +96,7 @@
|
|
|
95
96
|
"jsep": "^1.4.0",
|
|
96
97
|
"lodash.isequal": "^4.5.0",
|
|
97
98
|
"yjs": "^13.6.29",
|
|
98
|
-
"@pantheon-systems/css-client": "0.
|
|
99
|
+
"@pantheon-systems/css-client": "0.10.0"
|
|
99
100
|
},
|
|
100
101
|
"devDependencies": {
|
|
101
102
|
"@floating-ui/react": "^0.27.19",
|
|
@@ -107,7 +108,7 @@
|
|
|
107
108
|
"@types/lodash.isequal": "^4.5.8",
|
|
108
109
|
"@types/react": "^19.2.14",
|
|
109
110
|
"@types/react-dom": "^19.2.3",
|
|
110
|
-
"@vitejs/plugin-react": "^
|
|
111
|
+
"@vitejs/plugin-react": "^6.0.5",
|
|
111
112
|
"jsdom": "^24.1.3",
|
|
112
113
|
"react-toastify": "^11.0.5",
|
|
113
114
|
"typescript": "^5.9.3",
|
|
@@ -126,12 +127,15 @@
|
|
|
126
127
|
"node": ">=24.0.0"
|
|
127
128
|
},
|
|
128
129
|
"license": "MIT",
|
|
130
|
+
"homepage": "https://github.com/pantheon-systems/p1-platform/tree/main/packages/puck-css",
|
|
129
131
|
"scripts": {
|
|
130
|
-
"
|
|
131
|
-
"build": "tsc; find src -name '*.module.css' | while read f; do dest=\"dist/${f#src/}\"; mkdir -p \"$(dirname \"$dest\")\"; cp \"$f\" \"$dest\"; done; (cp node_modules/@pantheon-systems/pds-toolkit-react/dist/css/pds-core.css src/pds/theme/pds-core.css && node scripts/generate-pds-content.cjs) || true",
|
|
132
|
+
"build": "pnpm run clean && tsc && find src -name '*.module.css' | while read f; do dest=\"dist/${f#src/}\"; mkdir -p \"$(dirname \"$dest\")\"; cp \"$f\" \"$dest\"; done; (cp node_modules/@pantheon-systems/pds-toolkit-react/dist/css/pds-core.css src/pds/theme/pds-core.css && node scripts/generate-pds-content.cjs) || true",
|
|
132
133
|
"clean": "rm -rf dist *.tsbuildinfo",
|
|
134
|
+
"dev": "vite --config vite.config.preview.ts",
|
|
133
135
|
"lint": "eslint src",
|
|
136
|
+
"lint:fix": "eslint src --fix",
|
|
134
137
|
"test": "vitest run",
|
|
138
|
+
"test:spike:3406": "vitest run --config spike/pcc-3406/vitest.config.ts",
|
|
135
139
|
"test:watch": "vitest",
|
|
136
140
|
"typecheck": "tsc --noEmit"
|
|
137
141
|
}
|
|
@@ -142,6 +142,10 @@
|
|
|
142
142
|
--puck-color-grey-04: var(--pds-color-fg-default);
|
|
143
143
|
}
|
|
144
144
|
|
|
145
|
+
.puck-editor-theme [class*="_Sidebar"] {
|
|
146
|
+
scrollbar-gutter: stable;
|
|
147
|
+
}
|
|
148
|
+
|
|
145
149
|
/* ── Plugin rail nav icon normalization ─────────────────────────────────── */
|
|
146
150
|
/* All icons in the left nav rail must be a uniform 20×20px.
|
|
147
151
|
Puck's native SVGs, PDS Icon SVGs, and our mask-image pseudo-elements
|
|
@@ -277,3 +281,80 @@
|
|
|
277
281
|
background-color: #000000 !important;
|
|
278
282
|
color: #ffffff !important;
|
|
279
283
|
}
|
|
284
|
+
|
|
285
|
+
/* ── Canvas: grey gutter around a rounded page ────────────────────────────
|
|
286
|
+
The canvas (_PuckCanvas_) already has a grey background (grey-11), but in
|
|
287
|
+
full-screen mode Puck zeroes its padding so the page fills it edge-to-edge
|
|
288
|
+
and the grey never shows. Restoring a little padding reveals that grey as
|
|
289
|
+
a gutter around the page; rounding the inner _PuckCanvas-root_ gives the
|
|
290
|
+
floating-page look. The [class*="_PuckCanvas_"] selector matches only the
|
|
291
|
+
outer element (children use a hyphen after "Canvas"); higher specificity
|
|
292
|
+
than Puck's own ._PuckCanvas--fullScreen_ so the padding wins. */
|
|
293
|
+
.puck-editor-theme [class*="_PuckCanvas_"] {
|
|
294
|
+
padding: 8px;
|
|
295
|
+
}
|
|
296
|
+
.puck-editor-theme [class*="_PuckCanvas-root_"] {
|
|
297
|
+
border-radius: 8px;
|
|
298
|
+
overflow: hidden;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
/* ── Editor chrome text/background reset (PCC-3456) ──────────────────────
|
|
302
|
+
*
|
|
303
|
+
* Root cause: recent design-library "dark-canon" token waves make the host
|
|
304
|
+
* app's own body dark (e.g. body { color: var(--color-text); background:
|
|
305
|
+
* var(--color-surface) }, resolving to white-on-black). Puck ships plenty of
|
|
306
|
+
* chrome elements — e.g. @puckeditor/core's ._DrawerItem-name_ — that declare
|
|
307
|
+
* no color of their own and simply inherit whatever the ambient text color
|
|
308
|
+
* is. Nothing between <body> and those elements (including Puck's own
|
|
309
|
+
* `._Puck_` root, which sets layout vars but no color) intercepts that
|
|
310
|
+
* inheritance, so the new dark host theme cascades straight through and
|
|
311
|
+
* turns chrome text white-on-light — unreadable.
|
|
312
|
+
*
|
|
313
|
+
* Fix: pin an explicit light foreground/background on `.puck-editor-theme`
|
|
314
|
+
* itself using the same PDS light-theme tokens already used elsewhere in
|
|
315
|
+
* this file (grey-11/12 above), matching the pds `data-rm-theme="light"`
|
|
316
|
+
* editor chrome regardless of whatever theme the host page's <body> is on.
|
|
317
|
+
* `color` inherits down through every chrome descendant that doesn't set
|
|
318
|
+
* its own, exactly reversing the leak.
|
|
319
|
+
*
|
|
320
|
+
* Scoping: this file is a real <style>/<link> stylesheet in the parent
|
|
321
|
+
* document (unlike pds-core.css, which is loaded via adoptedStyleSheets
|
|
322
|
+
* specifically to stay invisible to Puck — see P1App.tsx), so Puck's canvas
|
|
323
|
+
* iframe scanner (`collectStyles()`) DOES copy it into the preview iframe's
|
|
324
|
+
* document, same as every other rule here. Scoping to `.puck-editor-theme`
|
|
325
|
+
* (never a bare `body` selector) is what keeps that copy inert: the iframe
|
|
326
|
+
* renders the previewed page's own DOM, which has no `.puck-editor-theme`
|
|
327
|
+
* element in it, so the selector simply never matches there and the
|
|
328
|
+
* preview keeps the site's own (possibly dark) theme untouched. A bare
|
|
329
|
+
* `body { color: #111; background: #fff }` rule — as originally proposed —
|
|
330
|
+
* would instead match the iframe's own <body> directly once copied in,
|
|
331
|
+
* forcing every preview into a light theme regardless of the real site's
|
|
332
|
+
* design and reintroducing the same class of leak in the opposite
|
|
333
|
+
* direction.
|
|
334
|
+
*/
|
|
335
|
+
.puck-editor-theme {
|
|
336
|
+
color: var(--pds-color-fg-default, #23232d);
|
|
337
|
+
background: var(--pds-color-bg-default, #fff);
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
/* ── AI chat panel: fill the inspector rail ──────────────────────────────────
|
|
341
|
+
* `SidebarSection-content` is a block container and Puck's fields <form> has no
|
|
342
|
+
* height of its own, so the panel stopped at its content height with the
|
|
343
|
+
* composer floating mid-rail. Flex columns carry the rail's height down to it;
|
|
344
|
+
* `min-height: 0` keeps the scrolling inside the transcript.
|
|
345
|
+
*
|
|
346
|
+
* Scoped to the panel's marker attribute: the ordinary field list relies on
|
|
347
|
+
* natural flow in the rail's scroll container, and stretching it would clip.
|
|
348
|
+
*/
|
|
349
|
+
.puck-editor-theme [class*='_SidebarSection_']:has([data-p1-ai-panel]) {
|
|
350
|
+
height: 100%;
|
|
351
|
+
min-height: 0;
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
.puck-editor-theme [class*='_SidebarSection-content_']:has([data-p1-ai-panel]),
|
|
355
|
+
.puck-editor-theme [class*='_PuckFields_']:has([data-p1-ai-panel]) {
|
|
356
|
+
display: flex;
|
|
357
|
+
flex-direction: column;
|
|
358
|
+
flex: 1;
|
|
359
|
+
min-height: 0;
|
|
360
|
+
}
|
|
@@ -9,10 +9,10 @@
|
|
|
9
9
|
* right layer of confidence here.
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
|
-
import { describe, it, expect } from 'vitest';
|
|
13
12
|
import { readFileSync } from 'fs';
|
|
14
13
|
import { dirname, join } from 'path';
|
|
15
14
|
import { fileURLToPath } from 'url';
|
|
15
|
+
import { describe, it, expect } from 'vitest';
|
|
16
16
|
|
|
17
17
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
18
18
|
const p1Path = join(__dirname, 'PuckEditorTheme.css');
|
|
@@ -121,6 +121,21 @@ describe('PuckEditorTheme.css', () => {
|
|
|
121
121
|
});
|
|
122
122
|
});
|
|
123
123
|
|
|
124
|
+
describe('canvas layout', () => {
|
|
125
|
+
it('reveals the canvas grey background as a gutter via padding', () => {
|
|
126
|
+
const css = readThemeCSS();
|
|
127
|
+
// Matches only the outer _PuckCanvas_ element (children use a hyphen).
|
|
128
|
+
expect(css).toMatch(/\[class\*="_PuckCanvas_"\]\s*\{[^}]*padding:\s*8px/);
|
|
129
|
+
});
|
|
130
|
+
|
|
131
|
+
it('rounds and clips the inner page (_PuckCanvas-root_)', () => {
|
|
132
|
+
const css = readThemeCSS();
|
|
133
|
+
expect(css).toMatch(
|
|
134
|
+
/\[class\*="_PuckCanvas-root_"\]\s*\{[^}]*border-radius:\s*8px[^}]*overflow:\s*hidden/,
|
|
135
|
+
);
|
|
136
|
+
});
|
|
137
|
+
});
|
|
138
|
+
|
|
124
139
|
describe('typography mappings', () => {
|
|
125
140
|
it('maps --puck-font-family to PDS default font family', () => {
|
|
126
141
|
const css = readThemeCSS();
|
|
@@ -134,4 +149,38 @@ describe('PuckEditorTheme.css', () => {
|
|
|
134
149
|
expect(css).toContain('var(--pds-typography-ff-code)');
|
|
135
150
|
});
|
|
136
151
|
});
|
|
152
|
+
|
|
153
|
+
describe('editor chrome text/background reset (PCC-3456)', () => {
|
|
154
|
+
it('pins an explicit light foreground and background on .puck-editor-theme itself', () => {
|
|
155
|
+
const css = readThemeCSS();
|
|
156
|
+
// Must be the bare `.puck-editor-theme` selector (not an attribute-scoped
|
|
157
|
+
// descendant), so `color` inherits down to every chrome element that
|
|
158
|
+
// declares no color of its own (e.g. @puckeditor/core's _DrawerItem-name_).
|
|
159
|
+
expect(css).toMatch(
|
|
160
|
+
/(?<![^\s{};])\.puck-editor-theme\s*\{[^}]*color:\s*var\(--pds-color-fg-default[^)]*\)[^}]*background:\s*var\(--pds-color-bg-default[^)]*\)[^}]*\}/,
|
|
161
|
+
);
|
|
162
|
+
});
|
|
163
|
+
|
|
164
|
+
it('reserves the sidebar scrollbar gutter so expanding a field group does not reflow', () => {
|
|
165
|
+
const css = readThemeCSS();
|
|
166
|
+
// The sidebar is the scroll container, so an arriving scrollbar reclaims
|
|
167
|
+
// its width and shifts every field. Reserving the gutter is what keeps a
|
|
168
|
+
// collapsible field group from moving the panel when it expands.
|
|
169
|
+
expect(css).toMatch(
|
|
170
|
+
/\.puck-editor-theme \[class\*="_Sidebar"\]\s*\{[^}]*scrollbar-gutter:\s*stable[^}]*\}/,
|
|
171
|
+
);
|
|
172
|
+
});
|
|
173
|
+
|
|
174
|
+
it('does not use a bare body selector, which would leak into the preview iframe', () => {
|
|
175
|
+
const css = readThemeCSS();
|
|
176
|
+
// The preview iframe renders its own <body>. Because this stylesheet is a
|
|
177
|
+
// real <style>/<link> tag that Puck's collectStyles() copies into that
|
|
178
|
+
// iframe, a bare `body { ... }` rule here would match the iframe's body
|
|
179
|
+
// directly and force every previewed page into this light theme.
|
|
180
|
+
// Strip comments first — the file's explanatory comments intentionally
|
|
181
|
+
// quote a `body { ... }` example of what NOT to do.
|
|
182
|
+
const cssWithoutComments = css.replace(/\/\*[\s\S]*?\*\//g, '');
|
|
183
|
+
expect(cssWithoutComments).not.toMatch(/(^|\s|\})body\s*\{/);
|
|
184
|
+
});
|
|
185
|
+
});
|
|
137
186
|
});
|