@riverbankcms/sdk 0.128.0 → 0.129.1
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 +52 -256
- package/dist/{PreviewEditorSidebar-Dbvb7GIr.mjs → PreviewEditorSidebar-DceRseRV.mjs} +3 -3
- package/dist/{PreviewEditorUI-e9O9l20X.mjs → PreviewEditorUI-BNunq3kk.mjs} +2 -2
- package/dist/{SdkPreviewModeRuntime-BZHt6e9w.mjs → SdkPreviewModeRuntime-Bt87-62u.mjs} +495 -292
- package/dist/{SiteChromeCustomizeContext-CvuGbHJX.mjs → SiteChromeCustomizeContext-BLl-OlL4.mjs} +600 -533
- package/dist/_dts/ai/src/contracts/commandExposure.d.ts +1 -1
- package/dist/_dts/ai/src/contracts/proposals.d.ts +4897 -4897
- package/dist/_dts/api/src/index.d.ts +2 -1
- package/dist/_dts/api/src/sdk-event-management.d.ts +53 -0
- package/dist/_dts/api/src/sdk-event-schedule.d.ts +3 -6
- package/dist/_dts/api/src/sdkContracts.d.ts +37 -50
- package/dist/_dts/api/src/sdkThemeWire.d.ts +2595 -0
- package/dist/_dts/api/src/sitePlatformEndpoints.d.ts +13 -29
- package/dist/_dts/blocks/src/PageRenderer.d.ts +20 -10
- package/dist/_dts/blocks/src/index.d.ts +2 -1
- package/dist/_dts/blocks/src/pageRendererBoundaries.d.ts +30 -0
- package/dist/_dts/blocks/src/pageRenderingMode.d.ts +37 -0
- package/dist/_dts/blocks/src/server.d.ts +1 -1
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +14 -0
- package/dist/_dts/media-core/src/index.d.ts +1 -0
- package/dist/_dts/preview-next/src/client/blocks/pageDesignRuntimePreview.d.ts +2 -0
- package/dist/_dts/preview-next/src/client/index.d.ts +47 -47
- package/dist/_dts/preview-next/src/client/preview/PreviewShell.d.ts +18 -6
- package/dist/_dts/preview-next/src/client/preview/PreviewShellLayout.d.ts +30 -21
- package/dist/_dts/preview-next/src/client/preview/PreviewThemedSiteDocument.d.ts +18 -5
- package/dist/_dts/preview-next/src/client/preview/themeRuntime.d.ts +9 -0
- package/dist/_dts/preview-next/src/client/sdk/SdkPreviewMode.d.ts +21 -6
- package/dist/_dts/preview-next/src/client/sdk-runtime.d.ts +8 -8
- package/dist/_dts/sdk/src/config/types.d.ts +4 -4
- package/dist/_dts/sdk/src/next/catch-all.d.ts +6 -0
- package/dist/_dts/sdk/src/next/index.d.ts +2 -1
- package/dist/_dts/sdk/src/next/renderSdkContent.d.ts +33 -0
- package/dist/_dts/sdk/src/next/types.d.ts +23 -9
- package/dist/_dts/sdk/src/preview-next/before-render.d.ts +4 -6
- package/dist/_dts/sdk/src/preview-next/client/index.d.ts +3 -3
- package/dist/_dts/sdk/src/preview-next/client/runtime.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/blocks-page-renderer.d.ts +25 -3
- package/dist/_dts/sdk/src/rendering/components/Block.shared.d.ts +13 -2
- package/dist/_dts/sdk/src/rendering/components/Layout.d.ts +31 -18
- package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +20 -9
- package/dist/_dts/sdk/src/rendering/index.d.ts +4 -2
- package/dist/_dts/sdk/src/rendering/renderingMode.d.ts +23 -0
- package/dist/_dts/sdk/src/rendering/server.d.ts +5 -3
- package/dist/_dts/sdk/src/rendering/themeRuntime.d.ts +6 -0
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/_dts/theme-core/src/buttons/index.d.ts +1 -0
- package/dist/_dts/theme-core/src/palette/index.d.ts +1 -0
- package/dist/_dts/theme-core/src/site-styles/headerLayoutStyleCatalog.d.ts +254 -0
- package/dist/_dts/theme-core/src/site-styles/headerLegacyLooks.d.ts +372 -0
- package/dist/_dts/theme-core/src/site-styles/headerLookBranding.d.ts +106 -0
- package/dist/_dts/theme-core/src/site-styles/headerLookSelection.d.ts +2 -0
- package/dist/_dts/theme-core/src/site-styles/headerLookTypes.d.ts +212 -0
- package/dist/_dts/theme-core/src/site-styles/headerLooks.d.ts +7 -841
- package/dist/_dts/theme-core/src/site-styles/headerStyleCompiler.d.ts +3 -0
- package/dist/_dts/theme-core/src/site-styles/headerStyleCompilerPrimitives.d.ts +23 -0
- package/dist/client/client.mjs +911 -762
- package/dist/client/hooks.mjs +59 -36
- package/dist/client/rendering/client.mjs +593 -547
- package/dist/client/rendering.mjs +994 -783
- package/dist/preview-next/before-render.mjs +10 -3
- package/dist/preview-next/client/runtime.mjs +3 -3
- package/dist/{sdk-runtime-Cn_QSCOg.mjs → sdk-runtime-C20CVWbb.mjs} +1 -1
- package/dist/{separator-CEoGABRc.mjs → separator-BE3NCquy.mjs} +1 -1
- package/dist/server/components.mjs +549 -399
- package/dist/server/config-validation.mjs +59 -36
- package/dist/server/config.mjs +59 -36
- package/dist/server/data.mjs +59 -36
- package/dist/server/index.mjs +1 -1
- package/dist/server/manifest.mjs +4966 -0
- package/dist/server/next.mjs +700 -537
- package/dist/server/page-converter.mjs +40 -36
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +571 -404
- package/dist/server/rendering.mjs +571 -404
- package/dist/server/routing.mjs +472 -402
- package/dist/server/server.mjs +60 -37
- package/dist/server/theme-bridge.mjs +70 -66
- package/package.json +9 -12
- package/dist/_dts/api/src/event-presentation.d.ts +0 -14
- package/dist/_dts/blocks/src/definitions.d.ts +0 -14
- package/dist/_dts/sdk/src/cli/canonical-entry-policy.d.ts +0 -53
- package/dist/_dts/sdk/src/cli/commands/audit.d.ts +0 -101
- package/dist/_dts/sdk/src/cli/commands/block.d.ts +0 -24
- package/dist/_dts/sdk/src/cli/commands/compare.d.ts +0 -62
- package/dist/_dts/sdk/src/cli/commands/content-type.d.ts +0 -10
- package/dist/_dts/sdk/src/cli/commands/content.d.ts +0 -56
- package/dist/_dts/sdk/src/cli/commands/delete.d.ts +0 -14
- package/dist/_dts/sdk/src/cli/commands/deploy.d.ts +0 -43
- package/dist/_dts/sdk/src/cli/commands/drafts.d.ts +0 -18
- package/dist/_dts/sdk/src/cli/commands/entry.d.ts +0 -55
- package/dist/_dts/sdk/src/cli/commands/env.d.ts +0 -31
- package/dist/_dts/sdk/src/cli/commands/event.d.ts +0 -23
- package/dist/_dts/sdk/src/cli/commands/eventOccurrenceSchedule.d.ts +0 -12
- package/dist/_dts/sdk/src/cli/commands/identifiers.d.ts +0 -10
- package/dist/_dts/sdk/src/cli/commands/init-docs.d.ts +0 -13
- package/dist/_dts/sdk/src/cli/commands/manifest.d.ts +0 -10
- package/dist/_dts/sdk/src/cli/commands/media-validation.d.ts +0 -3
- package/dist/_dts/sdk/src/cli/commands/migrate.d.ts +0 -11
- package/dist/_dts/sdk/src/cli/commands/navigation.d.ts +0 -12
- package/dist/_dts/sdk/src/cli/commands/page.d.ts +0 -14
- package/dist/_dts/sdk/src/cli/commands/publish-all.d.ts +0 -50
- package/dist/_dts/sdk/src/cli/commands/pull-dated-offering-scope.d.ts +0 -10
- package/dist/_dts/sdk/src/cli/commands/pull-dry-run.d.ts +0 -70
- package/dist/_dts/sdk/src/cli/commands/pull-scope-diff.d.ts +0 -8
- package/dist/_dts/sdk/src/cli/commands/pull.d.ts +0 -43
- package/dist/_dts/sdk/src/cli/commands/push/consts.d.ts +0 -3
- package/dist/_dts/sdk/src/cli/commands/push/execute/diff.d.ts +0 -19
- package/dist/_dts/sdk/src/cli/commands/push/execute/footer.d.ts +0 -42
- package/dist/_dts/sdk/src/cli/commands/push/execute/localMediaReporting.d.ts +0 -23
- package/dist/_dts/sdk/src/cli/commands/push/execute/media.d.ts +0 -22
- package/dist/_dts/sdk/src/cli/commands/push/execute/metadata.d.ts +0 -1
- package/dist/_dts/sdk/src/cli/commands/push/execute/reporting.d.ts +0 -7
- package/dist/_dts/sdk/src/cli/commands/push/execute/theme.d.ts +0 -63
- package/dist/_dts/sdk/src/cli/commands/push/filter.d.ts +0 -15
- package/dist/_dts/sdk/src/cli/commands/push/metadata.d.ts +0 -29
- package/dist/_dts/sdk/src/cli/commands/push/normalizeLocalContent.d.ts +0 -2
- package/dist/_dts/sdk/src/cli/commands/push/options.d.ts +0 -32
- package/dist/_dts/sdk/src/cli/commands/push/publishGuidance.d.ts +0 -15
- package/dist/_dts/sdk/src/cli/commands/push/pushAllExtras.d.ts +0 -25
- package/dist/_dts/sdk/src/cli/commands/push/scopes/commandBackedDatedOfferingScope.d.ts +0 -83
- package/dist/_dts/sdk/src/cli/commands/push/scopes/eventCategories.d.ts +0 -4
- package/dist/_dts/sdk/src/cli/commands/push/scopes/events.d.ts +0 -4
- package/dist/_dts/sdk/src/cli/commands/push/scopes/mediaPrep.d.ts +0 -14
- package/dist/_dts/sdk/src/cli/commands/push/scopes/pushScopeGeneric.d.ts +0 -6
- package/dist/_dts/sdk/src/cli/commands/push/scopes/types.d.ts +0 -87
- package/dist/_dts/sdk/src/cli/commands/push/scopes/venues.d.ts +0 -4
- package/dist/_dts/sdk/src/cli/commands/push/stale-resolution.d.ts +0 -48
- package/dist/_dts/sdk/src/cli/commands/push/stale.d.ts +0 -17
- package/dist/_dts/sdk/src/cli/commands/push/verification.d.ts +0 -56
- package/dist/_dts/sdk/src/cli/commands/push/workflowPlan.d.ts +0 -34
- package/dist/_dts/sdk/src/cli/commands/push-execute.d.ts +0 -54
- package/dist/_dts/sdk/src/cli/commands/push.d.ts +0 -40
- package/dist/_dts/sdk/src/cli/commands/setup.d.ts +0 -3
- package/dist/_dts/sdk/src/cli/commands/style.d.ts +0 -60
- package/dist/_dts/sdk/src/cli/commands/verify.d.ts +0 -11
- package/dist/_dts/sdk/src/cli/commands/webhooks.d.ts +0 -44
- package/dist/_dts/sdk/src/cli/config-loader.d.ts +0 -47
- package/dist/_dts/sdk/src/cli/content/collectionWriters.d.ts +0 -23
- package/dist/_dts/sdk/src/cli/content/edit/format.d.ts +0 -2
- package/dist/_dts/sdk/src/cli/content/edit/path.d.ts +0 -14
- package/dist/_dts/sdk/src/cli/content/edit/planner.d.ts +0 -46
- package/dist/_dts/sdk/src/cli/content/entryPaths.d.ts +0 -6
- package/dist/_dts/sdk/src/cli/content/footerFile.d.ts +0 -10
- package/dist/_dts/sdk/src/cli/content/fs-utils.d.ts +0 -39
- package/dist/_dts/sdk/src/cli/content/legacyEventScheduleShapeError.d.ts +0 -5
- package/dist/_dts/sdk/src/cli/content/localEventSchedule.d.ts +0 -17
- package/dist/_dts/sdk/src/cli/content/media-manifest.d.ts +0 -13
- package/dist/_dts/sdk/src/cli/content/metadataAfterPush.d.ts +0 -25
- package/dist/_dts/sdk/src/cli/content/metadataStore.d.ts +0 -29
- package/dist/_dts/sdk/src/cli/content/reader.d.ts +0 -488
- package/dist/_dts/sdk/src/cli/content/writer.d.ts +0 -142
- package/dist/_dts/sdk/src/cli/env-scope.d.ts +0 -2
- package/dist/_dts/sdk/src/cli/env.d.ts +0 -71
- package/dist/_dts/sdk/src/cli/errors.d.ts +0 -62
- package/dist/_dts/sdk/src/cli/helpers/ai-runtime.d.ts +0 -2
- package/dist/_dts/sdk/src/cli/helpers.d.ts +0 -399
- package/dist/_dts/sdk/src/cli/index.d.ts +0 -11
- package/dist/_dts/sdk/src/cli/init-docs/constants.d.ts +0 -16
- package/dist/_dts/sdk/src/cli/init-docs/index.d.ts +0 -12
- package/dist/_dts/sdk/src/cli/init-docs/templates.d.ts +0 -18
- package/dist/_dts/sdk/src/cli/init-docs/zod-to-markdown.d.ts +0 -28
- package/dist/_dts/sdk/src/cli/load-config.d.ts +0 -14
- package/dist/_dts/sdk/src/cli/media/identifiers.d.ts +0 -18
- package/dist/_dts/sdk/src/cli/media/local-media.d.ts +0 -14
- package/dist/_dts/sdk/src/cli/media/local-sync.d.ts +0 -91
- package/dist/_dts/sdk/src/cli/media/portable.d.ts +0 -11
- package/dist/_dts/sdk/src/cli/media/rich-text.d.ts +0 -12
- package/dist/_dts/sdk/src/cli/media/value-utils.d.ts +0 -15
- package/dist/_dts/sdk/src/cli/media/write-guard.d.ts +0 -52
- package/dist/_dts/sdk/src/cli/merge-remote/entryLocal.d.ts +0 -3
- package/dist/_dts/sdk/src/cli/merge-remote/entryMerge.d.ts +0 -78
- package/dist/_dts/sdk/src/cli/merge-remote/entryMergePlan.d.ts +0 -45
- package/dist/_dts/sdk/src/cli/merge-remote/entryMergePush.d.ts +0 -24
- package/dist/_dts/sdk/src/cli/merge-remote/entryMergeReport.d.ts +0 -18
- package/dist/_dts/sdk/src/cli/merge-remote/entryRemote.d.ts +0 -9
- package/dist/_dts/sdk/src/cli/merge-remote/entrySnapshots.d.ts +0 -48
- package/dist/_dts/sdk/src/cli/merge-remote/mergeFieldChanges.d.ts +0 -22
- package/dist/_dts/sdk/src/cli/merge-remote/pageLocal.d.ts +0 -3
- package/dist/_dts/sdk/src/cli/merge-remote/pageMerge.d.ts +0 -78
- package/dist/_dts/sdk/src/cli/merge-remote/pageMergePlan.d.ts +0 -36
- package/dist/_dts/sdk/src/cli/merge-remote/pageMergePush.d.ts +0 -23
- package/dist/_dts/sdk/src/cli/merge-remote/pageMergeReport.d.ts +0 -17
- package/dist/_dts/sdk/src/cli/merge-remote/pageSnapshots.d.ts +0 -46
- package/dist/_dts/sdk/src/cli/merge-remote/sharedBaseSnapshots.d.ts +0 -32
- package/dist/_dts/sdk/src/cli/merge-remote/sharedMergePlan.d.ts +0 -27
- package/dist/_dts/sdk/src/cli/merge-remote/sharedMergeReport.d.ts +0 -63
- package/dist/_dts/sdk/src/cli/migrations/entries.d.ts +0 -28
- package/dist/_dts/sdk/src/cli/migrations/events.d.ts +0 -73
- package/dist/_dts/sdk/src/cli/navigationIdentity.d.ts +0 -11
- package/dist/_dts/sdk/src/cli/output.d.ts +0 -133
- package/dist/_dts/sdk/src/cli/program.d.ts +0 -29
- package/dist/_dts/sdk/src/cli/push-config.d.ts +0 -49
- package/dist/_dts/sdk/src/cli/setup/setupPlan.d.ts +0 -51
- package/dist/_dts/sdk/src/cli/site-commands/commandKeys.d.ts +0 -13
- package/dist/_dts/sdk/src/cli/site-commands/commandRuntime.d.ts +0 -170
- package/dist/_dts/sdk/src/cli/site-commands/commandRuntimeCompat.d.ts +0 -21
- package/dist/_dts/sdk/src/cli/site-commands/commandSurfaceDispatch.d.ts +0 -32
- package/dist/_dts/sdk/src/cli/site-commands/datedOfferingCommands.d.ts +0 -53
- package/dist/_dts/sdk/src/cli/site-commands/entryCommands.d.ts +0 -65
- package/dist/_dts/sdk/src/cli/site-commands/eventScheduleCompiler.d.ts +0 -24
- package/dist/_dts/sdk/src/cli/site-commands/footerCommands.d.ts +0 -68
- package/dist/_dts/sdk/src/cli/site-commands/formCommands.d.ts +0 -53
- package/dist/_dts/sdk/src/cli/site-commands/index.d.ts +0 -8
- package/dist/_dts/sdk/src/cli/site-commands/localBlockManifestResolver.d.ts +0 -31
- package/dist/_dts/sdk/src/cli/site-commands/navigationCommands.d.ts +0 -57
- package/dist/_dts/sdk/src/cli/site-commands/oneOffCommands.d.ts +0 -82
- package/dist/_dts/sdk/src/cli/site-commands/pageCommands.d.ts +0 -84
- package/dist/_dts/sdk/src/cli/site-commands/pushExecution.d.ts +0 -39
- package/dist/_dts/sdk/src/cli/site-commands/pushExecutionPlan.d.ts +0 -8
- package/dist/_dts/sdk/src/cli/site-commands/pushExecutionTypes.d.ts +0 -97
- package/dist/_dts/sdk/src/cli/site-commands/residualSettingsTrimming.d.ts +0 -15
- package/dist/_dts/sdk/src/cli/sync/diff.d.ts +0 -222
- package/dist/_dts/sdk/src/cli/sync/executor.d.ts +0 -84
- package/dist/_dts/sdk/src/cli/sync/field-diff.d.ts +0 -39
- package/dist/_dts/sdk/src/cli/sync/index.d.ts +0 -10
- package/dist/_dts/sdk/src/cli/sync/mapper.d.ts +0 -41
- package/dist/_dts/sdk/src/cli/sync/media-sync.d.ts +0 -15
- package/dist/_dts/sdk/src/cli/sync/media.d.ts +0 -158
- package/dist/_dts/sdk/src/cli/sync/syncResultAggregation.d.ts +0 -4
- package/dist/_dts/sdk/src/cli/sync/validation.d.ts +0 -68
- package/dist/_dts/sdk/src/cli/utils/checksum.d.ts +0 -1
- package/dist/_dts/sdk/src/client/management/blocks.d.ts +0 -19
- package/dist/_dts/sdk/src/client/management/catalog.d.ts +0 -10
- package/dist/_dts/sdk/src/client/management/entries.d.ts +0 -6
- package/dist/_dts/sdk/src/client/management/eventCategories.d.ts +0 -6
- package/dist/_dts/sdk/src/client/management/events.d.ts +0 -7
- package/dist/_dts/sdk/src/client/management/footer.d.ts +0 -9
- package/dist/_dts/sdk/src/client/management/forms.d.ts +0 -6
- package/dist/_dts/sdk/src/client/management/http.d.ts +0 -79
- package/dist/_dts/sdk/src/client/management/identifiers.d.ts +0 -11
- package/dist/_dts/sdk/src/client/management/index.d.ts +0 -41
- package/dist/_dts/sdk/src/client/management/media.d.ts +0 -72
- package/dist/_dts/sdk/src/client/management/navigation.d.ts +0 -6
- package/dist/_dts/sdk/src/client/management/pages.d.ts +0 -6
- package/dist/_dts/sdk/src/client/management/pull.d.ts +0 -6
- package/dist/_dts/sdk/src/client/management/settings-branding.d.ts +0 -32
- package/dist/_dts/sdk/src/client/management/settings.d.ts +0 -6
- package/dist/_dts/sdk/src/client/management/theme.d.ts +0 -8
- package/dist/_dts/sdk/src/client/management/types.d.ts +0 -1069
- package/dist/_dts/sdk/src/client/management/venues.d.ts +0 -6
- package/dist/_dts/sdk/src/client/management/webhooks.d.ts +0 -3
- package/dist/_dts/sdk/src/test/env.d.ts +0 -4
- package/dist/_dts/site-commands/src/adapter.d.ts +0 -23
- package/dist/_dts/site-commands/src/appointmentCommandSchemas.d.ts +0 -100
- package/dist/_dts/site-commands/src/capabilityGaps.d.ts +0 -8
- package/dist/_dts/site-commands/src/commandContract.d.ts +0 -1277
- package/dist/_dts/site-commands/src/commandDomain.d.ts +0 -20
- package/dist/_dts/site-commands/src/commandIdentifiers.d.ts +0 -7
- package/dist/_dts/site-commands/src/commandValidation.d.ts +0 -10
- package/dist/_dts/site-commands/src/commands.d.ts +0 -1983
- package/dist/_dts/site-commands/src/domain.d.ts +0 -104
- package/dist/_dts/site-commands/src/eventCommandContent.d.ts +0 -11
- package/dist/_dts/site-commands/src/exposure.d.ts +0 -41
- package/dist/_dts/site-commands/src/guards.d.ts +0 -1
- package/dist/_dts/site-commands/src/index.d.ts +0 -18
- package/dist/_dts/site-commands/src/metadata.d.ts +0 -555
- package/dist/_dts/site-commands/src/pagePaths.d.ts +0 -6
- package/dist/_dts/site-commands/src/planner.d.ts +0 -58
- package/dist/_dts/site-commands/src/refContributions.d.ts +0 -11
- package/dist/_dts/site-commands/src/refs.d.ts +0 -90
- package/dist/_dts/site-commands/src/siteStyleCommandSchema.d.ts +0 -405
- package/dist/_dts/site-commands/src/siteStyleSelectionSchemaBuilder.d.ts +0 -46
- package/dist/_dts/site-commands/src/stableJson.d.ts +0 -5
- package/dist/_dts/site-commands/src/staticExecutionGaps.d.ts +0 -10
- package/dist/_dts/site-commands/src/venueCommandMapping.d.ts +0 -21
- package/dist/_dts/theme-core/src/data.d.ts +0 -12
- package/dist/_dts/theme-core/src/site-styles/headerStyleParts.d.ts +0 -4
- package/dist/cli/index.mjs +0 -162962
- package/dist/cli/init-docs/content/agents-section.md +0 -67
- package/dist/cli/init-docs/content/cli-reference.md +0 -1238
- package/dist/cli/init-docs/content/content-management.md +0 -792
- package/dist/cli/init-docs/content/context-brand.md +0 -125
- package/dist/cli/init-docs/content/context-brief.md +0 -77
- package/dist/cli/init-docs/content/context-knowledge.md +0 -111
- package/dist/cli/init-docs/content/getting-started.md +0 -171
- package/dist/cli/init-docs/content/site-workflows-readme.md +0 -96
- package/dist/cli/init-docs/content/workflow-add-block.md +0 -299
- package/dist/cli/init-docs/content/workflow-agent-safe-sync.md +0 -83
- package/dist/cli/init-docs/content/workflow-block-extensions.md +0 -370
- package/dist/cli/init-docs/content/workflow-cmsify-page.md +0 -357
- package/dist/cli/init-docs/content/workflow-content-types.md +0 -330
- package/dist/cli/init-docs/content/workflow-create-page.md +0 -212
- package/dist/cli/init-docs/content/workflow-custom-block.md +0 -470
- package/dist/cli/init-docs/content/workflow-editor-workflows.md +0 -130
- package/dist/cli/init-docs/content/workflow-isr-revalidation.md +0 -158
- package/dist/cli/init-docs/content/workflow-preview-mode.md +0 -239
- package/dist/cli/init-docs/content/workflow-publish.md +0 -285
- package/dist/cli/init-docs/content/workflow-remote-setup.md +0 -51
- package/dist/cli/init-docs/content/workflow-templates.md +0 -381
- /package/dist/_dts/{sdk/src/cli/utils/mime.d.ts → media-core/src/mimeType.d.ts} +0 -0
|
@@ -8066,32 +8066,17 @@ function parseBackgroundAppearanceColorToken(value) {
|
|
|
8066
8066
|
function uniqueStrings(values) {
|
|
8067
8067
|
return Array.from(new Set(values));
|
|
8068
8068
|
}
|
|
8069
|
-
const headerInteractionPaletteSchema = z$1.enum([
|
|
8070
|
-
"primary",
|
|
8071
|
-
"secondary",
|
|
8072
|
-
"accent"
|
|
8073
|
-
]);
|
|
8074
8069
|
//#endregion
|
|
8075
|
-
//#region ../theme-core/src/site-styles/
|
|
8076
|
-
|
|
8077
|
-
|
|
8078
|
-
|
|
8079
|
-
|
|
8080
|
-
|
|
8081
|
-
|
|
8082
|
-
|
|
8083
|
-
|
|
8084
|
-
|
|
8085
|
-
{
|
|
8086
|
-
id: "primary",
|
|
8087
|
-
label: "Primary"
|
|
8088
|
-
},
|
|
8089
|
-
{
|
|
8090
|
-
id: "secondary",
|
|
8091
|
-
label: "Secondary"
|
|
8092
|
-
}
|
|
8093
|
-
]
|
|
8094
|
-
});
|
|
8070
|
+
//#region ../theme-core/src/site-styles/headerLookTypes.ts
|
|
8071
|
+
function asHeaderLookId(value) {
|
|
8072
|
+
return value;
|
|
8073
|
+
}
|
|
8074
|
+
function asHeaderLayoutId(value) {
|
|
8075
|
+
return value;
|
|
8076
|
+
}
|
|
8077
|
+
function asHeaderStyleId(value) {
|
|
8078
|
+
return value;
|
|
8079
|
+
}
|
|
8095
8080
|
//#endregion
|
|
8096
8081
|
//#region ../theme-core/src/site-styles/logoBranding.ts
|
|
8097
8082
|
const logoTextConfidenceValues = [
|
|
@@ -8183,16 +8168,7 @@ const logoSizePolicyValues = [
|
|
|
8183
8168
|
"display"
|
|
8184
8169
|
];
|
|
8185
8170
|
//#endregion
|
|
8186
|
-
//#region ../theme-core/src/site-styles/
|
|
8187
|
-
function asHeaderLookId(value) {
|
|
8188
|
-
return value;
|
|
8189
|
-
}
|
|
8190
|
-
function asHeaderLayoutId(value) {
|
|
8191
|
-
return value;
|
|
8192
|
-
}
|
|
8193
|
-
function asHeaderStyleId(value) {
|
|
8194
|
-
return value;
|
|
8195
|
-
}
|
|
8171
|
+
//#region ../theme-core/src/site-styles/headerLookBranding.ts
|
|
8196
8172
|
const titleOnlyLogoAccommodation = {
|
|
8197
8173
|
pattern: "title-only",
|
|
8198
8174
|
supportedShapes: [
|
|
@@ -8311,21 +8287,34 @@ const overlayLogoAccommodations = [
|
|
|
8311
8287
|
inlineMarkWithTitleLogoAccommodation,
|
|
8312
8288
|
unbackedOverlayLogoAccommodation
|
|
8313
8289
|
];
|
|
8314
|
-
|
|
8315
|
-
|
|
8316
|
-
|
|
8317
|
-
|
|
8318
|
-
|
|
8319
|
-
|
|
8320
|
-
|
|
8321
|
-
|
|
8322
|
-
|
|
8323
|
-
|
|
8324
|
-
|
|
8325
|
-
|
|
8290
|
+
const headerInteractionPaletteSchema = z$1.enum([
|
|
8291
|
+
"primary",
|
|
8292
|
+
"secondary",
|
|
8293
|
+
"accent"
|
|
8294
|
+
]);
|
|
8295
|
+
//#endregion
|
|
8296
|
+
//#region ../theme-core/src/site-styles/headerInteractionPalette.ts
|
|
8297
|
+
const clearSplitInteractionPalette = defineLookOptionGroup({
|
|
8298
|
+
id: "interaction-palette",
|
|
8299
|
+
label: "Hover colour",
|
|
8300
|
+
defaultOptionId: "accent",
|
|
8301
|
+
options: [
|
|
8302
|
+
{
|
|
8303
|
+
id: "accent",
|
|
8304
|
+
label: "Accent"
|
|
8305
|
+
},
|
|
8306
|
+
{
|
|
8307
|
+
id: "primary",
|
|
8308
|
+
label: "Primary"
|
|
8309
|
+
},
|
|
8310
|
+
{
|
|
8311
|
+
id: "secondary",
|
|
8312
|
+
label: "Secondary"
|
|
8326
8313
|
}
|
|
8327
|
-
|
|
8328
|
-
}
|
|
8314
|
+
]
|
|
8315
|
+
});
|
|
8316
|
+
//#endregion
|
|
8317
|
+
//#region ../theme-core/src/site-styles/headerLayoutStyleCatalog.ts
|
|
8329
8318
|
const headerLayoutCatalog = defineExactCatalog()([
|
|
8330
8319
|
{
|
|
8331
8320
|
id: asHeaderLayoutId("classic"),
|
|
@@ -8730,6 +8719,19 @@ function getCompatibleHeaderStyleIds(layoutId) {
|
|
|
8730
8719
|
return isHeaderStyleCompatibleWithLayout(getHeaderStyleOrThrow(styleId), layoutId);
|
|
8731
8720
|
});
|
|
8732
8721
|
}
|
|
8722
|
+
//#endregion
|
|
8723
|
+
//#region ../theme-core/src/site-styles/headerStyleCompilerPrimitives.ts
|
|
8724
|
+
function baseHeader(theme) {
|
|
8725
|
+
const { navLinkStyle: _navLinkStyle, navFontRole: _navFontRole, navTypography: _navTypography, navTextSize: _navTextSize, interactionPalette: _interactionPalette, dropdownStyle: _dropdownStyle, ctaVariant: _ctaVariant, navContainer: _navContainer, container: _container, shadow: _shadow, logo: _logo, logoText: _logoText, border: _border, ...header } = theme.header;
|
|
8726
|
+
return {
|
|
8727
|
+
...header,
|
|
8728
|
+
navContainer: {
|
|
8729
|
+
type: "none",
|
|
8730
|
+
tint: null,
|
|
8731
|
+
opacity: .15
|
|
8732
|
+
}
|
|
8733
|
+
};
|
|
8734
|
+
}
|
|
8733
8735
|
function applyNavTypography(style, typography) {
|
|
8734
8736
|
switch (typography) {
|
|
8735
8737
|
case "plain": return style;
|
|
@@ -8783,6 +8785,8 @@ function themedHeaderShadow(theme) {
|
|
|
8783
8785
|
default: return assertNever$2(theme.shadow.elevation, "Unhandled theme shadow elevation");
|
|
8784
8786
|
}
|
|
8785
8787
|
}
|
|
8788
|
+
//#endregion
|
|
8789
|
+
//#region ../theme-core/src/site-styles/headerLegacyLooks.ts
|
|
8786
8790
|
function solidBrandHeader(theme) {
|
|
8787
8791
|
const ctaVariant = resolveHeaderCtaVariant(theme, "inverted");
|
|
8788
8792
|
return {
|
|
@@ -50985,6 +50989,213 @@ function renderBlock(manifest, content, options = {}) {
|
|
|
50985
50989
|
}, componentElement);
|
|
50986
50990
|
}
|
|
50987
50991
|
//#endregion
|
|
50992
|
+
//#region ../blocks/src/system/manifest/hydrateLinks.ts
|
|
50993
|
+
/**
|
|
50994
|
+
* Hydrates link objects within block content using the provided route map. Returns
|
|
50995
|
+
* the original content reference when no mutations are required to avoid unnecessary renders.
|
|
50996
|
+
*/
|
|
50997
|
+
function hydrateManifestLinks(manifest, content, routes, pagesByIdentifier, entriesByIdentifier) {
|
|
50998
|
+
if (!routes || !manifest?.fields?.length) return content;
|
|
50999
|
+
return hydrateValue(content, {
|
|
51000
|
+
routes,
|
|
51001
|
+
pagesByIdentifier,
|
|
51002
|
+
entriesByIdentifier
|
|
51003
|
+
});
|
|
51004
|
+
}
|
|
51005
|
+
function hydrateValue(value, context) {
|
|
51006
|
+
try {
|
|
51007
|
+
if (Array.isArray(value)) {
|
|
51008
|
+
const resolvedItems = value.map((item) => hydrateValue(item, context));
|
|
51009
|
+
return resolvedItems.every((item, index) => item === value[index]) ? value : resolvedItems;
|
|
51010
|
+
}
|
|
51011
|
+
if (isRecord$13(value)) {
|
|
51012
|
+
if (isInternalLink(value)) return hydrateInternalLink(value, context.routes);
|
|
51013
|
+
if (isPageLink(value)) return hydratePageLink(value, context);
|
|
51014
|
+
if (isEntryLink(value)) return hydrateEntryLink(value, context);
|
|
51015
|
+
const resolvedEntries = Object.entries(value).map(([key, entry]) => [key, hydrateValue(entry, context)]);
|
|
51016
|
+
return resolvedEntries.every(([key, entry]) => entry === value[key]) ? value : Object.fromEntries(resolvedEntries);
|
|
51017
|
+
}
|
|
51018
|
+
return value;
|
|
51019
|
+
} catch (err) {
|
|
51020
|
+
console.error("[hydrateLinks] Error hydrating value:", err, value);
|
|
51021
|
+
return value;
|
|
51022
|
+
}
|
|
51023
|
+
}
|
|
51024
|
+
function hydrateInternalLink(link, routes) {
|
|
51025
|
+
const resolved = resolveRouteTarget(link.routeId, routes);
|
|
51026
|
+
if (!resolved) return link;
|
|
51027
|
+
const nextHref = resolved.href;
|
|
51028
|
+
const currentHref = typeof link.href === "string" && link.href.length > 0 ? link.href : null;
|
|
51029
|
+
const nextUpdatedAt = resolved.updatedAt;
|
|
51030
|
+
const updates = {};
|
|
51031
|
+
if (nextHref && nextHref !== currentHref) updates.href = nextHref;
|
|
51032
|
+
if (nextUpdatedAt && link.updatedAt !== nextUpdatedAt) updates.updatedAt = nextUpdatedAt;
|
|
51033
|
+
return Object.keys(updates).length > 0 ? {
|
|
51034
|
+
...link,
|
|
51035
|
+
...updates
|
|
51036
|
+
} : link;
|
|
51037
|
+
}
|
|
51038
|
+
function isInternalLink(value) {
|
|
51039
|
+
if (value.kind !== "internal") return false;
|
|
51040
|
+
if (typeof value.routeId !== "string" || value.routeId.length === 0) return false;
|
|
51041
|
+
return true;
|
|
51042
|
+
}
|
|
51043
|
+
function isPageLink(value) {
|
|
51044
|
+
if (value.kind !== "page") return false;
|
|
51045
|
+
if (typeof value.identifier !== "string" || value.identifier.length === 0) return false;
|
|
51046
|
+
return true;
|
|
51047
|
+
}
|
|
51048
|
+
function hydratePageLink(link, context) {
|
|
51049
|
+
const resolved = resolvePageRouteTarget(link, context);
|
|
51050
|
+
if (!resolved) return link;
|
|
51051
|
+
return {
|
|
51052
|
+
...link,
|
|
51053
|
+
href: resolved.href,
|
|
51054
|
+
routeId: resolved.routeId
|
|
51055
|
+
};
|
|
51056
|
+
}
|
|
51057
|
+
function isEntryLink(value) {
|
|
51058
|
+
if (value.kind !== "entry") return false;
|
|
51059
|
+
if (typeof value.contentType !== "string" || value.contentType.length === 0) return false;
|
|
51060
|
+
if (typeof value.identifier !== "string" || value.identifier.length === 0) return false;
|
|
51061
|
+
return true;
|
|
51062
|
+
}
|
|
51063
|
+
function hydrateEntryLink(link, context) {
|
|
51064
|
+
const resolved = resolveEntryRouteTarget(link, context);
|
|
51065
|
+
if (!resolved) return link;
|
|
51066
|
+
return {
|
|
51067
|
+
...link,
|
|
51068
|
+
href: resolved.href,
|
|
51069
|
+
routeId: resolved.routeId
|
|
51070
|
+
};
|
|
51071
|
+
}
|
|
51072
|
+
//#endregion
|
|
51073
|
+
//#region ../blocks/src/sdkBlockTransform.ts
|
|
51074
|
+
/**
|
|
51075
|
+
* Transforms an SDK custom block into a BlockManifest.
|
|
51076
|
+
*
|
|
51077
|
+
* If the block has a `layout`, it can be rendered declaratively without React code.
|
|
51078
|
+
* If no layout, the block MUST use blockOverrides for rendering.
|
|
51079
|
+
*/
|
|
51080
|
+
function transformSdkBlockToManifest(sdkBlock) {
|
|
51081
|
+
const hasLayout = Boolean(sdkBlock.layout) || Boolean(sdkBlock.variants && Object.keys(sdkBlock.variants).length > 0);
|
|
51082
|
+
return augmentManifest({
|
|
51083
|
+
name: sdkBlock.id,
|
|
51084
|
+
version: "1.0.0",
|
|
51085
|
+
title: sdkBlock.title,
|
|
51086
|
+
titleSource: sdkBlock.titleSource,
|
|
51087
|
+
description: sdkBlock.description,
|
|
51088
|
+
component: sdkBlock.id,
|
|
51089
|
+
fields: sdkBlock.fields,
|
|
51090
|
+
slots: [],
|
|
51091
|
+
category: sdkBlock.category,
|
|
51092
|
+
tags: sdkBlock.tags,
|
|
51093
|
+
icon: sdkBlock.icon,
|
|
51094
|
+
layout: sdkBlock.layout,
|
|
51095
|
+
variants: sdkBlock.variants,
|
|
51096
|
+
defaultVariant: sdkBlock.defaultVariant,
|
|
51097
|
+
variantOptions: sdkBlock.variantOptions,
|
|
51098
|
+
previewCustomize: sdkBlock.previewCustomize,
|
|
51099
|
+
behaviours: {
|
|
51100
|
+
supportsThemeSwitching: true,
|
|
51101
|
+
inlineEditing: hasLayout,
|
|
51102
|
+
animation: hasLayout,
|
|
51103
|
+
paletteHidden: false
|
|
51104
|
+
}
|
|
51105
|
+
});
|
|
51106
|
+
}
|
|
51107
|
+
/**
|
|
51108
|
+
* Transforms an SDK custom block into a SystemBlockDefinition.
|
|
51109
|
+
*
|
|
51110
|
+
* This creates a minimal definition with just the manifest - no data loaders
|
|
51111
|
+
* or content normalizers since SDK blocks handle their own rendering.
|
|
51112
|
+
*/
|
|
51113
|
+
function transformSdkBlockToDefinition(sdkBlock) {
|
|
51114
|
+
return {
|
|
51115
|
+
manifest: transformSdkBlockToManifest(sdkBlock),
|
|
51116
|
+
dataLoaders: sdkBlock.dataLoaders
|
|
51117
|
+
};
|
|
51118
|
+
}
|
|
51119
|
+
//#endregion
|
|
51120
|
+
//#region ../blocks/src/customBlockRegistry.ts
|
|
51121
|
+
const defaultCustomBlockSourcePolicy = { kind: "canonical-db-fallback-sdk" };
|
|
51122
|
+
function isCustomBlockKind(blockKind) {
|
|
51123
|
+
return blockKind.startsWith("custom.");
|
|
51124
|
+
}
|
|
51125
|
+
function transformToBlockDescriptor(sdkBlock, source = "sdk") {
|
|
51126
|
+
return {
|
|
51127
|
+
name: sdkBlock.id,
|
|
51128
|
+
title: sdkBlock.title,
|
|
51129
|
+
description: sdkBlock.description,
|
|
51130
|
+
category: sdkBlock.category,
|
|
51131
|
+
tags: sdkBlock.tags,
|
|
51132
|
+
icon: sdkBlock.icon,
|
|
51133
|
+
definition: transformSdkBlockToDefinition(sdkBlock),
|
|
51134
|
+
source
|
|
51135
|
+
};
|
|
51136
|
+
}
|
|
51137
|
+
function toResolvedCustomBlock(manifest, source) {
|
|
51138
|
+
return {
|
|
51139
|
+
blockKind: manifest.id,
|
|
51140
|
+
manifest: transformSdkBlockToManifest(manifest),
|
|
51141
|
+
source,
|
|
51142
|
+
descriptor: transformToBlockDescriptor(manifest, source.kind === "managed-database" ? "database" : "sdk")
|
|
51143
|
+
};
|
|
51144
|
+
}
|
|
51145
|
+
function planCustomBlockRegistryResolution({ sdkConfig, customBlocks = [], policy = defaultCustomBlockSourcePolicy }) {
|
|
51146
|
+
switch (policy.kind) {
|
|
51147
|
+
case "canonical-db-fallback-sdk": {
|
|
51148
|
+
const entriesByKind = /* @__PURE__ */ new Map();
|
|
51149
|
+
const conflicts = [];
|
|
51150
|
+
for (const customBlock of customBlocks) entriesByKind.set(customBlock.manifest.id, toResolvedCustomBlock(customBlock.manifest, customBlock.source));
|
|
51151
|
+
for (const sdkBlock of sdkConfig?.customBlocks ?? []) {
|
|
51152
|
+
const existing = entriesByKind.get(sdkBlock.id);
|
|
51153
|
+
if (existing) {
|
|
51154
|
+
conflicts.push({
|
|
51155
|
+
kind: "conflict",
|
|
51156
|
+
blockKind: existing.blockKind,
|
|
51157
|
+
winner: existing.source,
|
|
51158
|
+
loser: { kind: "sdk-config" },
|
|
51159
|
+
reason: "db-canonical-sdk-fallback"
|
|
51160
|
+
});
|
|
51161
|
+
continue;
|
|
51162
|
+
}
|
|
51163
|
+
entriesByKind.set(sdkBlock.id, toResolvedCustomBlock(sdkBlock, { kind: "sdk-config" }));
|
|
51164
|
+
}
|
|
51165
|
+
return {
|
|
51166
|
+
policy,
|
|
51167
|
+
entries: Array.from(entriesByKind.values()),
|
|
51168
|
+
conflicts
|
|
51169
|
+
};
|
|
51170
|
+
}
|
|
51171
|
+
}
|
|
51172
|
+
}
|
|
51173
|
+
function createCustomBlockRegistry({ sdkConfig, customBlocks = [], policy = defaultCustomBlockSourcePolicy, onConflict }) {
|
|
51174
|
+
const plan = planCustomBlockRegistryResolution({
|
|
51175
|
+
sdkConfig,
|
|
51176
|
+
customBlocks,
|
|
51177
|
+
policy
|
|
51178
|
+
});
|
|
51179
|
+
const entriesByKind = new Map(plan.entries.map((entry) => [entry.blockKind, entry]));
|
|
51180
|
+
for (const conflict of plan.conflicts) onConflict?.(`Using ${sourceLabel(conflict.winner)} custom block "${conflict.blockKind}" - ${sourceLabel(conflict.loser)} block is fallback only`);
|
|
51181
|
+
return {
|
|
51182
|
+
entries: plan.entries,
|
|
51183
|
+
conflicts: plan.conflicts,
|
|
51184
|
+
findManifest: (blockKind) => {
|
|
51185
|
+
if (!isCustomBlockKind(blockKind)) return void 0;
|
|
51186
|
+
return entriesByKind.get(blockKind);
|
|
51187
|
+
}
|
|
51188
|
+
};
|
|
51189
|
+
}
|
|
51190
|
+
function sourceLabel(source) {
|
|
51191
|
+
switch (source.kind) {
|
|
51192
|
+
case "managed-database": return "DB";
|
|
51193
|
+
case "sdk-synced": return "SDK-synced DB";
|
|
51194
|
+
case "sdk-config": return "SDK config";
|
|
51195
|
+
default: return assertNever$4(source);
|
|
51196
|
+
}
|
|
51197
|
+
}
|
|
51198
|
+
//#endregion
|
|
50988
51199
|
//#region ../theme-core/src/runtime/fontFamily.ts
|
|
50989
51200
|
/**
|
|
50990
51201
|
* Font Family Formatting Utilities
|
|
@@ -54722,215 +54933,115 @@ function mapFontStyle(italic) {
|
|
|
54722
54933
|
return italic ? "italic" : "normal";
|
|
54723
54934
|
}
|
|
54724
54935
|
//#endregion
|
|
54725
|
-
//#region ../blocks/src/
|
|
54726
|
-
|
|
54727
|
-
|
|
54728
|
-
|
|
54729
|
-
|
|
54730
|
-
|
|
54731
|
-
|
|
54732
|
-
return hydrateValue(content, {
|
|
54733
|
-
routes,
|
|
54734
|
-
pagesByIdentifier,
|
|
54735
|
-
entriesByIdentifier
|
|
54736
|
-
});
|
|
54737
|
-
}
|
|
54738
|
-
function hydrateValue(value, context) {
|
|
54739
|
-
try {
|
|
54740
|
-
if (Array.isArray(value)) {
|
|
54741
|
-
const resolvedItems = value.map((item) => hydrateValue(item, context));
|
|
54742
|
-
return resolvedItems.every((item, index) => item === value[index]) ? value : resolvedItems;
|
|
54743
|
-
}
|
|
54744
|
-
if (isRecord$13(value)) {
|
|
54745
|
-
if (isInternalLink(value)) return hydrateInternalLink(value, context.routes);
|
|
54746
|
-
if (isPageLink(value)) return hydratePageLink(value, context);
|
|
54747
|
-
if (isEntryLink(value)) return hydrateEntryLink(value, context);
|
|
54748
|
-
const resolvedEntries = Object.entries(value).map(([key, entry]) => [key, hydrateValue(entry, context)]);
|
|
54749
|
-
return resolvedEntries.every(([key, entry]) => entry === value[key]) ? value : Object.fromEntries(resolvedEntries);
|
|
54750
|
-
}
|
|
54751
|
-
return value;
|
|
54752
|
-
} catch (err) {
|
|
54753
|
-
console.error("[hydrateLinks] Error hydrating value:", err, value);
|
|
54754
|
-
return value;
|
|
54936
|
+
//#region ../blocks/src/pageRenderingMode.ts
|
|
54937
|
+
var MissingBlockOverrideError$1 = class extends Error {
|
|
54938
|
+
constructor(blockKind) {
|
|
54939
|
+
super(`Override-only rendering requires an override for block kind "${blockKind}".`);
|
|
54940
|
+
this.blockKind = blockKind;
|
|
54941
|
+
this.code = "missing_block_override";
|
|
54942
|
+
this.name = "MissingBlockOverrideError";
|
|
54755
54943
|
}
|
|
54944
|
+
};
|
|
54945
|
+
function isOverrideOnlyResourceInput(props) {
|
|
54946
|
+
return props.rendering?.kind === "overrides-only";
|
|
54756
54947
|
}
|
|
54757
|
-
function
|
|
54758
|
-
|
|
54759
|
-
if (!resolved) return link;
|
|
54760
|
-
const nextHref = resolved.href;
|
|
54761
|
-
const currentHref = typeof link.href === "string" && link.href.length > 0 ? link.href : null;
|
|
54762
|
-
const nextUpdatedAt = resolved.updatedAt;
|
|
54763
|
-
const updates = {};
|
|
54764
|
-
if (nextHref && nextHref !== currentHref) updates.href = nextHref;
|
|
54765
|
-
if (nextUpdatedAt && link.updatedAt !== nextUpdatedAt) updates.updatedAt = nextUpdatedAt;
|
|
54766
|
-
return Object.keys(updates).length > 0 ? {
|
|
54767
|
-
...link,
|
|
54768
|
-
...updates
|
|
54769
|
-
} : link;
|
|
54770
|
-
}
|
|
54771
|
-
function isInternalLink(value) {
|
|
54772
|
-
if (value.kind !== "internal") return false;
|
|
54773
|
-
if (typeof value.routeId !== "string" || value.routeId.length === 0) return false;
|
|
54774
|
-
return true;
|
|
54775
|
-
}
|
|
54776
|
-
function isPageLink(value) {
|
|
54777
|
-
if (value.kind !== "page") return false;
|
|
54778
|
-
if (typeof value.identifier !== "string" || value.identifier.length === 0) return false;
|
|
54779
|
-
return true;
|
|
54780
|
-
}
|
|
54781
|
-
function hydratePageLink(link, context) {
|
|
54782
|
-
const resolved = resolvePageRouteTarget(link, context);
|
|
54783
|
-
if (!resolved) return link;
|
|
54948
|
+
function resolvePageThemeResources(props) {
|
|
54949
|
+
if (isOverrideOnlyResourceInput(props)) return { kind: "unavailable" };
|
|
54784
54950
|
return {
|
|
54785
|
-
|
|
54786
|
-
|
|
54787
|
-
|
|
54951
|
+
kind: "available",
|
|
54952
|
+
tokens: props.themeTokens ?? buildThemeRuntime$1(props.theme).tokens,
|
|
54953
|
+
config: props.theme
|
|
54788
54954
|
};
|
|
54789
54955
|
}
|
|
54790
|
-
function
|
|
54791
|
-
if (
|
|
54792
|
-
if (typeof value.contentType !== "string" || value.contentType.length === 0) return false;
|
|
54793
|
-
if (typeof value.identifier !== "string" || value.identifier.length === 0) return false;
|
|
54794
|
-
return true;
|
|
54956
|
+
function requireBlockOverride(resources, override, blockKind) {
|
|
54957
|
+
if (resources.kind === "unavailable" && !override) throw new MissingBlockOverrideError$1(blockKind);
|
|
54795
54958
|
}
|
|
54796
|
-
function
|
|
54797
|
-
|
|
54798
|
-
|
|
54799
|
-
|
|
54800
|
-
|
|
54801
|
-
|
|
54802
|
-
|
|
54803
|
-
|
|
54959
|
+
function overrideThemeProps(resources) {
|
|
54960
|
+
return resources.kind === "available" ? {
|
|
54961
|
+
theme: resources.tokens,
|
|
54962
|
+
themeConfig: resources.config
|
|
54963
|
+
} : {};
|
|
54964
|
+
}
|
|
54965
|
+
function requireThemeResources(resources, blockKind) {
|
|
54966
|
+
if (resources.kind === "unavailable") throw new MissingBlockOverrideError$1(blockKind);
|
|
54967
|
+
return resources;
|
|
54804
54968
|
}
|
|
54805
54969
|
//#endregion
|
|
54806
|
-
//#region ../blocks/src/
|
|
54807
|
-
|
|
54808
|
-
|
|
54809
|
-
|
|
54810
|
-
* If the block has a `layout`, it can be rendered declaratively without React code.
|
|
54811
|
-
* If no layout, the block MUST use blockOverrides for rendering.
|
|
54812
|
-
*/
|
|
54813
|
-
function transformSdkBlockToManifest(sdkBlock) {
|
|
54814
|
-
const hasLayout = Boolean(sdkBlock.layout) || Boolean(sdkBlock.variants && Object.keys(sdkBlock.variants).length > 0);
|
|
54815
|
-
return augmentManifest({
|
|
54816
|
-
name: sdkBlock.id,
|
|
54817
|
-
version: "1.0.0",
|
|
54818
|
-
title: sdkBlock.title,
|
|
54819
|
-
titleSource: sdkBlock.titleSource,
|
|
54820
|
-
description: sdkBlock.description,
|
|
54821
|
-
component: sdkBlock.id,
|
|
54822
|
-
fields: sdkBlock.fields,
|
|
54823
|
-
slots: [],
|
|
54824
|
-
category: sdkBlock.category,
|
|
54825
|
-
tags: sdkBlock.tags,
|
|
54826
|
-
icon: sdkBlock.icon,
|
|
54827
|
-
layout: sdkBlock.layout,
|
|
54828
|
-
variants: sdkBlock.variants,
|
|
54829
|
-
defaultVariant: sdkBlock.defaultVariant,
|
|
54830
|
-
variantOptions: sdkBlock.variantOptions,
|
|
54831
|
-
previewCustomize: sdkBlock.previewCustomize,
|
|
54832
|
-
behaviours: {
|
|
54833
|
-
supportsThemeSwitching: true,
|
|
54834
|
-
inlineEditing: hasLayout,
|
|
54835
|
-
animation: hasLayout,
|
|
54836
|
-
paletteHidden: false
|
|
54837
|
-
}
|
|
54838
|
-
});
|
|
54970
|
+
//#region ../blocks/src/pageRendererBoundaries.tsx
|
|
54971
|
+
const boundaryKey = (previousBlockId, nextBlockId) => `${previousBlockId}\u0000${nextBlockId}`;
|
|
54972
|
+
function isSiteStyleTransitionStyleGroup(value) {
|
|
54973
|
+
return value?.startsWith("site-style-transition-") === true;
|
|
54839
54974
|
}
|
|
54840
|
-
|
|
54841
|
-
|
|
54842
|
-
*
|
|
54843
|
-
* This creates a minimal definition with just the manifest - no data loaders
|
|
54844
|
-
* or content normalizers since SDK blocks handle their own rendering.
|
|
54845
|
-
*/
|
|
54846
|
-
function transformSdkBlockToDefinition(sdkBlock) {
|
|
54847
|
-
return {
|
|
54848
|
-
manifest: transformSdkBlockToManifest(sdkBlock),
|
|
54849
|
-
dataLoaders: sdkBlock.dataLoaders
|
|
54850
|
-
};
|
|
54975
|
+
function boundaryMapForAdjacentBlockIds(boundaries) {
|
|
54976
|
+
return new Map(boundaries.map((boundary) => [boundaryKey(boundary.previousBlockId, boundary.nextBlockId), boundary]));
|
|
54851
54977
|
}
|
|
54852
|
-
|
|
54853
|
-
|
|
54854
|
-
const
|
|
54855
|
-
|
|
54856
|
-
return
|
|
54978
|
+
function boundaryBetweenBlocks(previousBlock, nextBlock, boundaries) {
|
|
54979
|
+
const previousBlockId = previousBlock?.id ?? null;
|
|
54980
|
+
const nextBlockId = nextBlock?.id ?? null;
|
|
54981
|
+
if (!previousBlockId || !nextBlockId) return null;
|
|
54982
|
+
return boundaries.get(boundaryKey(previousBlockId, nextBlockId)) ?? null;
|
|
54857
54983
|
}
|
|
54858
|
-
function
|
|
54984
|
+
function renderBoundaryAfterBlock(input) {
|
|
54985
|
+
const previousBlockId = input.block.id;
|
|
54986
|
+
const nextBlockId = input.nextBlock?.id ?? null;
|
|
54987
|
+
if (!previousBlockId || !nextBlockId) return null;
|
|
54988
|
+
const boundary = input.boundaryByAdjacentBlockIds.get(boundaryKey(previousBlockId, nextBlockId));
|
|
54989
|
+
if (!boundary) return null;
|
|
54990
|
+
const rendered = /* @__PURE__ */ jsx("div", {
|
|
54991
|
+
"aria-hidden": "true",
|
|
54992
|
+
"data-block-boundary": "",
|
|
54993
|
+
"data-boundary-id": boundary.boundaryId,
|
|
54994
|
+
"data-boundary-previous-block-id": boundary.previousBlockId,
|
|
54995
|
+
"data-boundary-next-block-id": boundary.nextBlockId,
|
|
54996
|
+
"data-style-group": boundary.styleGroup,
|
|
54997
|
+
style: boundaryCssVarsStyle(boundary)
|
|
54998
|
+
}, `${input.blockKey}:boundary`);
|
|
54999
|
+
return input.wrapBoundary ? input.wrapBoundary(boundary, rendered) : rendered;
|
|
55000
|
+
}
|
|
55001
|
+
function boundaryCssVarsStyle(boundary) {
|
|
54859
55002
|
return {
|
|
54860
|
-
|
|
54861
|
-
|
|
54862
|
-
description: sdkBlock.description,
|
|
54863
|
-
category: sdkBlock.category,
|
|
54864
|
-
tags: sdkBlock.tags,
|
|
54865
|
-
icon: sdkBlock.icon,
|
|
54866
|
-
definition: transformSdkBlockToDefinition(sdkBlock),
|
|
54867
|
-
source
|
|
55003
|
+
"--site-style-transition-from": boundary.cssVars.from,
|
|
55004
|
+
"--site-style-transition-to": boundary.cssVars.to
|
|
54868
55005
|
};
|
|
54869
55006
|
}
|
|
54870
|
-
function
|
|
55007
|
+
function boundaryReserveCssVarsStyle(input) {
|
|
55008
|
+
const before = input.before?.metrics.reserveCss ?? null;
|
|
55009
|
+
const after = input.after?.metrics.reserveCss ?? null;
|
|
55010
|
+
if (!before && !after) return void 0;
|
|
54871
55011
|
return {
|
|
54872
|
-
|
|
54873
|
-
|
|
54874
|
-
source,
|
|
54875
|
-
descriptor: transformToBlockDescriptor(manifest, source.kind === "managed-database" ? "database" : "sdk")
|
|
55012
|
+
...before ? { "--site-style-boundary-before-reserve": before } : {},
|
|
55013
|
+
...after ? { "--site-style-boundary-after-reserve": after } : {}
|
|
54876
55014
|
};
|
|
54877
55015
|
}
|
|
54878
|
-
function
|
|
54879
|
-
|
|
54880
|
-
|
|
54881
|
-
|
|
54882
|
-
|
|
54883
|
-
|
|
54884
|
-
|
|
54885
|
-
|
|
54886
|
-
|
|
54887
|
-
|
|
54888
|
-
kind: "conflict",
|
|
54889
|
-
blockKind: existing.blockKind,
|
|
54890
|
-
winner: existing.source,
|
|
54891
|
-
loser: { kind: "sdk-config" },
|
|
54892
|
-
reason: "db-canonical-sdk-fallback"
|
|
54893
|
-
});
|
|
54894
|
-
continue;
|
|
54895
|
-
}
|
|
54896
|
-
entriesByKind.set(sdkBlock.id, toResolvedCustomBlock(sdkBlock, { kind: "sdk-config" }));
|
|
54897
|
-
}
|
|
54898
|
-
return {
|
|
54899
|
-
policy,
|
|
54900
|
-
entries: Array.from(entriesByKind.values()),
|
|
54901
|
-
conflicts
|
|
54902
|
-
};
|
|
54903
|
-
}
|
|
54904
|
-
}
|
|
55016
|
+
function transitionCssVarsStyle(content) {
|
|
55017
|
+
const transitionStyles = isObjectRecord$1(content._transitionStyles) ? content._transitionStyles : null;
|
|
55018
|
+
const cssVars = isObjectRecord$1(transitionStyles?.cssVars) ? transitionStyles.cssVars : null;
|
|
55019
|
+
const from = typeof cssVars?.from === "string" ? cssVars.from : null;
|
|
55020
|
+
const to = typeof cssVars?.to === "string" ? cssVars.to : null;
|
|
55021
|
+
if (!from && !to) return void 0;
|
|
55022
|
+
return {
|
|
55023
|
+
...from ? { "--site-style-transition-from": from } : {},
|
|
55024
|
+
...to ? { "--site-style-transition-to": to } : {}
|
|
55025
|
+
};
|
|
54905
55026
|
}
|
|
54906
|
-
function
|
|
54907
|
-
|
|
54908
|
-
|
|
54909
|
-
customBlocks,
|
|
54910
|
-
policy
|
|
54911
|
-
});
|
|
54912
|
-
const entriesByKind = new Map(plan.entries.map((entry) => [entry.blockKind, entry]));
|
|
54913
|
-
for (const conflict of plan.conflicts) onConflict?.(`Using ${sourceLabel(conflict.winner)} custom block "${conflict.blockKind}" - ${sourceLabel(conflict.loser)} block is fallback only`);
|
|
55027
|
+
function mergeStyleObjects(left, right) {
|
|
55028
|
+
if (!left) return right;
|
|
55029
|
+
if (!right) return left;
|
|
54914
55030
|
return {
|
|
54915
|
-
|
|
54916
|
-
|
|
54917
|
-
findManifest: (blockKind) => {
|
|
54918
|
-
if (!isCustomBlockKind(blockKind)) return void 0;
|
|
54919
|
-
return entriesByKind.get(blockKind);
|
|
54920
|
-
}
|
|
55031
|
+
...left,
|
|
55032
|
+
...right
|
|
54921
55033
|
};
|
|
54922
55034
|
}
|
|
54923
|
-
function
|
|
54924
|
-
|
|
54925
|
-
|
|
54926
|
-
|
|
54927
|
-
|
|
54928
|
-
default: return assertNever$4(source);
|
|
54929
|
-
}
|
|
55035
|
+
function pageBlockPosition(index, blockCount) {
|
|
55036
|
+
if (blockCount <= 1) return "only";
|
|
55037
|
+
if (index === 0) return "first";
|
|
55038
|
+
if (index === blockCount - 1) return "last";
|
|
55039
|
+
return "middle";
|
|
54930
55040
|
}
|
|
54931
55041
|
//#endregion
|
|
54932
55042
|
//#region ../blocks/src/PageRenderer.tsx
|
|
54933
|
-
function PageRenderer$1(
|
|
55043
|
+
function PageRenderer$1(props) {
|
|
55044
|
+
const { page, runtimeBoundaries, usePlaceholders = false, dataContext, wrapBlock, wrapBoundary, registry, routeMap, blockOverrides, sdkConfig, customBlocks, previewAuthoring } = props;
|
|
54934
55045
|
const imageResolveContext = React$1.useMemo(() => resolvePageRendererImageResolveContext(dataContext), [
|
|
54935
55046
|
dataContext?.imageResolveContext,
|
|
54936
55047
|
dataContext?.mediaAssets,
|
|
@@ -54939,12 +55050,16 @@ function PageRenderer$1({ theme, page, runtimeBoundaries, usePlaceholders = fals
|
|
|
54939
55050
|
]);
|
|
54940
55051
|
const boundaryByAdjacentBlockIds = React$1.useMemo(() => boundaryMapForAdjacentBlockIds(runtimeBoundaries ?? []), [runtimeBoundaries]);
|
|
54941
55052
|
const usesRuntimeBoundaries = runtimeBoundaries !== void 0;
|
|
55053
|
+
const themeResources = React$1.useMemo(() => resolvePageThemeResources(props), [
|
|
55054
|
+
props.rendering,
|
|
55055
|
+
props.theme,
|
|
55056
|
+
props.themeTokens
|
|
55057
|
+
]);
|
|
54942
55058
|
if (!page || page.blocks.length === 0) return /* @__PURE__ */ jsx("div", {
|
|
54943
55059
|
className: "rb-p-6 rb-caption",
|
|
54944
55060
|
style: textColorStyle("mutedText"),
|
|
54945
55061
|
children: "No blocks found."
|
|
54946
55062
|
});
|
|
54947
|
-
const themeTokens = providedThemeTokens ?? buildThemeRuntime$1(theme).tokens;
|
|
54948
55063
|
const resolvedRegistry = registry ?? getDefaultComponentRegistry();
|
|
54949
55064
|
setContextResolveImageUrlContext(imageResolveContext);
|
|
54950
55065
|
return /* @__PURE__ */ jsx("div", { children: page.blocks.map((block, index) => {
|
|
@@ -54967,22 +55082,14 @@ function PageRenderer$1({ theme, page, runtimeBoundaries, usePlaceholders = fals
|
|
|
54967
55082
|
const renderableContent = getRenderableContent(block, dataContext?.previewStage);
|
|
54968
55083
|
const variantKey = definition?.manifest ? resolveVariantKey(definition.manifest, renderableContent) : null;
|
|
54969
55084
|
const shouldUseWrapper = !managesOwnWrapper || Boolean(wrapBlock);
|
|
54970
|
-
const blockSectionProps = {
|
|
54971
|
-
|
|
54972
|
-
|
|
55085
|
+
const blockSectionProps = buildBlockSectionProps({
|
|
55086
|
+
props,
|
|
55087
|
+
themeResources,
|
|
54973
55088
|
block,
|
|
54974
|
-
usePlaceholders,
|
|
54975
|
-
dataContext,
|
|
54976
55089
|
blockKey,
|
|
54977
|
-
registry: resolvedRegistry,
|
|
54978
|
-
routeMap,
|
|
54979
|
-
wrapBlock,
|
|
54980
|
-
blockOverrides,
|
|
54981
|
-
sdkConfig,
|
|
54982
|
-
customBlocks,
|
|
54983
55090
|
imageResolveContext,
|
|
54984
|
-
|
|
54985
|
-
};
|
|
55091
|
+
registry: resolvedRegistry
|
|
55092
|
+
});
|
|
54986
55093
|
if (!shouldUseWrapper) {
|
|
54987
55094
|
const rendered = /* @__PURE__ */ jsx(MemoBlockSection, { ...blockSectionProps }, `${blockKey}:block`);
|
|
54988
55095
|
return boundaryElement ? /* @__PURE__ */ jsxs(React$1.Fragment, { children: [rendered, boundaryElement] }, blockKey) : rendered;
|
|
@@ -55024,81 +55131,6 @@ function PageRenderer$1({ theme, page, runtimeBoundaries, usePlaceholders = fals
|
|
|
55024
55131
|
})] }, blockKey);
|
|
55025
55132
|
}) });
|
|
55026
55133
|
}
|
|
55027
|
-
function isSiteStyleTransitionStyleGroup(value) {
|
|
55028
|
-
return value?.startsWith("site-style-transition-") === true;
|
|
55029
|
-
}
|
|
55030
|
-
function boundaryMapForAdjacentBlockIds(boundaries) {
|
|
55031
|
-
return new Map(boundaries.map((boundary) => [boundaryKey(boundary.previousBlockId, boundary.nextBlockId), boundary]));
|
|
55032
|
-
}
|
|
55033
|
-
function boundaryKey(previousBlockId, nextBlockId) {
|
|
55034
|
-
return `${previousBlockId}\u0000${nextBlockId}`;
|
|
55035
|
-
}
|
|
55036
|
-
function boundaryBetweenBlocks(previousBlock, nextBlock, boundaryByAdjacentBlockIds) {
|
|
55037
|
-
const previousBlockId = previousBlock?.id ?? null;
|
|
55038
|
-
const nextBlockId = nextBlock?.id ?? null;
|
|
55039
|
-
if (!previousBlockId || !nextBlockId) return null;
|
|
55040
|
-
return boundaryByAdjacentBlockIds.get(boundaryKey(previousBlockId, nextBlockId)) ?? null;
|
|
55041
|
-
}
|
|
55042
|
-
function renderBoundaryAfterBlock(input) {
|
|
55043
|
-
const previousBlockId = input.block.id;
|
|
55044
|
-
const nextBlockId = input.nextBlock?.id ?? null;
|
|
55045
|
-
if (!previousBlockId || !nextBlockId) return null;
|
|
55046
|
-
const boundary = input.boundaryByAdjacentBlockIds.get(boundaryKey(previousBlockId, nextBlockId));
|
|
55047
|
-
if (!boundary) return null;
|
|
55048
|
-
const rendered = /* @__PURE__ */ jsx("div", {
|
|
55049
|
-
"aria-hidden": "true",
|
|
55050
|
-
"data-block-boundary": "",
|
|
55051
|
-
"data-boundary-id": boundary.boundaryId,
|
|
55052
|
-
"data-boundary-previous-block-id": boundary.previousBlockId,
|
|
55053
|
-
"data-boundary-next-block-id": boundary.nextBlockId,
|
|
55054
|
-
"data-style-group": boundary.styleGroup,
|
|
55055
|
-
style: boundaryCssVarsStyle(boundary)
|
|
55056
|
-
}, `${input.blockKey}:boundary`);
|
|
55057
|
-
return input.wrapBoundary ? input.wrapBoundary(boundary, rendered) : rendered;
|
|
55058
|
-
}
|
|
55059
|
-
function boundaryCssVarsStyle(boundary) {
|
|
55060
|
-
return {
|
|
55061
|
-
"--site-style-transition-from": boundary.cssVars.from,
|
|
55062
|
-
"--site-style-transition-to": boundary.cssVars.to
|
|
55063
|
-
};
|
|
55064
|
-
}
|
|
55065
|
-
function boundaryReserveCssVarsStyle(input) {
|
|
55066
|
-
const before = input.before ? boundaryReserveValueForTreatment(input.before) : null;
|
|
55067
|
-
const after = input.after ? boundaryReserveValueForTreatment(input.after) : null;
|
|
55068
|
-
if (!before && !after) return void 0;
|
|
55069
|
-
return {
|
|
55070
|
-
...before ? { "--site-style-boundary-before-reserve": before } : {},
|
|
55071
|
-
...after ? { "--site-style-boundary-after-reserve": after } : {}
|
|
55072
|
-
};
|
|
55073
|
-
}
|
|
55074
|
-
function boundaryReserveValueForTreatment(boundary) {
|
|
55075
|
-
return boundary.metrics.reserveCss;
|
|
55076
|
-
}
|
|
55077
|
-
function transitionCssVarsStyle(content) {
|
|
55078
|
-
const transitionStyles = isObjectRecord$1(content._transitionStyles) ? content._transitionStyles : null;
|
|
55079
|
-
const cssVars = isObjectRecord$1(transitionStyles?.cssVars) ? transitionStyles.cssVars : null;
|
|
55080
|
-
const from = typeof cssVars?.from === "string" ? cssVars.from : null;
|
|
55081
|
-
const to = typeof cssVars?.to === "string" ? cssVars.to : null;
|
|
55082
|
-
if (!from && !to) return void 0;
|
|
55083
|
-
return {
|
|
55084
|
-
...from ? { "--site-style-transition-from": from } : {},
|
|
55085
|
-
...to ? { "--site-style-transition-to": to } : {}
|
|
55086
|
-
};
|
|
55087
|
-
}
|
|
55088
|
-
function mergeStyleObjects(left, right) {
|
|
55089
|
-
if (!left) return right;
|
|
55090
|
-
if (!right) return left;
|
|
55091
|
-
return {
|
|
55092
|
-
...left,
|
|
55093
|
-
...right
|
|
55094
|
-
};
|
|
55095
|
-
}
|
|
55096
|
-
function pageBlockPosition(index, blockCount) {
|
|
55097
|
-
if (blockCount <= 1) return "only";
|
|
55098
|
-
if (index === 0) return "first";
|
|
55099
|
-
if (index === blockCount - 1) return "last";
|
|
55100
|
-
return "middle";
|
|
55101
|
-
}
|
|
55102
55134
|
function resolvePageRendererImageResolveContext(dataContext) {
|
|
55103
55135
|
const input = dataContext?.imageResolveContext;
|
|
55104
55136
|
return buildResolveImageUrlContext({
|
|
@@ -55108,6 +55140,23 @@ function resolvePageRendererImageResolveContext(dataContext) {
|
|
|
55108
55140
|
mediaAssets: input?.mediaAssets ?? dataContext?.mediaAssets
|
|
55109
55141
|
});
|
|
55110
55142
|
}
|
|
55143
|
+
function buildBlockSectionProps(input) {
|
|
55144
|
+
return {
|
|
55145
|
+
themeResources: input.themeResources,
|
|
55146
|
+
block: input.block,
|
|
55147
|
+
usePlaceholders: input.props.usePlaceholders ?? false,
|
|
55148
|
+
dataContext: input.props.dataContext,
|
|
55149
|
+
blockKey: input.blockKey,
|
|
55150
|
+
registry: input.registry,
|
|
55151
|
+
routeMap: input.props.routeMap,
|
|
55152
|
+
wrapBlock: input.props.wrapBlock,
|
|
55153
|
+
blockOverrides: input.props.blockOverrides,
|
|
55154
|
+
sdkConfig: input.props.sdkConfig,
|
|
55155
|
+
customBlocks: input.props.customBlocks,
|
|
55156
|
+
imageResolveContext: input.imageResolveContext,
|
|
55157
|
+
previewAuthoring: input.props.previewAuthoring
|
|
55158
|
+
};
|
|
55159
|
+
}
|
|
55111
55160
|
/**
|
|
55112
55161
|
* Look up a block override component by block kind.
|
|
55113
55162
|
* Supports both full ("block.hero") and short ("hero") keys.
|
|
@@ -55174,7 +55223,7 @@ function getCachedValidator(manifest, flavour) {
|
|
|
55174
55223
|
* referential equality of all props that affect rendering. Standard React.memo
|
|
55175
55224
|
* wouldn't catch all the render triggers from the editor store.
|
|
55176
55225
|
*/
|
|
55177
|
-
const MemoBlockSection = React$1.memo(function MemoBlockSection({
|
|
55226
|
+
const MemoBlockSection = React$1.memo(function MemoBlockSection({ themeResources, block, usePlaceholders, dataContext, registry, routeMap, wrapBlock, blockOverrides, sdkConfig, customBlocks, imageResolveContext, previewAuthoring }) {
|
|
55178
55227
|
const perfStart = globalThis.process?.env?.DEBUG_PERF === "1" && typeof window === "undefined" ? Date.now() : 0;
|
|
55179
55228
|
const fallbackImageResolveContext = getCurrentResolveImageUrlContext();
|
|
55180
55229
|
const resolvedImageResolveContext = imageResolveContext ?? fallbackImageResolveContext;
|
|
@@ -55195,6 +55244,7 @@ const MemoBlockSection = React$1.memo(function MemoBlockSection({ themeTokens, t
|
|
|
55195
55244
|
return node;
|
|
55196
55245
|
}
|
|
55197
55246
|
const OverrideComponent = getBlockOverride(block.kind, blockOverrides);
|
|
55247
|
+
requireBlockOverride(themeResources, OverrideComponent, block.kind);
|
|
55198
55248
|
let definition = getBlockDefinition(block.kind);
|
|
55199
55249
|
if (!definition && block.kind.startsWith("custom.")) definition = createCustomBlockRegistry({
|
|
55200
55250
|
sdkConfig,
|
|
@@ -55207,8 +55257,7 @@ const MemoBlockSection = React$1.memo(function MemoBlockSection({ themeTokens, t
|
|
|
55207
55257
|
if (OverrideComponent) {
|
|
55208
55258
|
const rendered = /* @__PURE__ */ jsx(OverrideComponent, {
|
|
55209
55259
|
content: getRenderableContent(block, dataContext?.previewStage),
|
|
55210
|
-
|
|
55211
|
-
themeConfig,
|
|
55260
|
+
...overrideThemeProps(themeResources),
|
|
55212
55261
|
data: void 0,
|
|
55213
55262
|
siteId: dataContext?.siteId,
|
|
55214
55263
|
apiBaseUrl: dataContext?.apiBaseUrl,
|
|
@@ -55307,8 +55356,7 @@ const MemoBlockSection = React$1.memo(function MemoBlockSection({ themeTokens, t
|
|
|
55307
55356
|
const hasResolvedData = !!resolved && typeof resolved === "object" && Object.keys(resolved).length > 0;
|
|
55308
55357
|
const baseProps = {
|
|
55309
55358
|
content: hydratedContent,
|
|
55310
|
-
|
|
55311
|
-
themeConfig,
|
|
55359
|
+
...overrideThemeProps(themeResources),
|
|
55312
55360
|
data: resolved,
|
|
55313
55361
|
siteId: dataContext?.siteId,
|
|
55314
55362
|
apiBaseUrl: dataContext?.apiBaseUrl,
|
|
@@ -55328,6 +55376,7 @@ const MemoBlockSection = React$1.memo(function MemoBlockSection({ themeTokens, t
|
|
|
55328
55376
|
let rendered;
|
|
55329
55377
|
if (OverrideComponent) rendered = /* @__PURE__ */ jsx(OverrideComponent, { ...baseProps });
|
|
55330
55378
|
else {
|
|
55379
|
+
requireThemeResources(themeResources, block.kind);
|
|
55331
55380
|
const BlockComponent = getCachedBlockComponent(definition.manifest);
|
|
55332
55381
|
const pathBase = typeof block.id === "string" && block.id.length > 0 ? `blocks.${block.id}.` : void 0;
|
|
55333
55382
|
const rootContext = { $root: {
|
|
@@ -55377,7 +55426,7 @@ const MemoBlockSection = React$1.memo(function MemoBlockSection({ themeTokens, t
|
|
|
55377
55426
|
});
|
|
55378
55427
|
}
|
|
55379
55428
|
}, (prev, next) => {
|
|
55380
|
-
return prev.block === next.block && prev.registry === next.registry && prev.dataContext === next.dataContext && prev.
|
|
55429
|
+
return prev.block === next.block && prev.registry === next.registry && prev.dataContext === next.dataContext && prev.themeResources === next.themeResources && prev.routeMap === next.routeMap && prev.usePlaceholders === next.usePlaceholders && prev.wrapBlock === next.wrapBlock && prev.blockOverrides === next.blockOverrides && prev.sdkConfig === next.sdkConfig && prev.customBlocks === next.customBlocks && prev.imageResolveContext === next.imageResolveContext && prev.previewAuthoring === next.previewAuthoring;
|
|
55381
55430
|
});
|
|
55382
55431
|
function fallback(message) {
|
|
55383
55432
|
return /* @__PURE__ */ jsx("div", {
|
|
@@ -68596,6 +68645,10 @@ function toBlocksImageResolveContextInput(context) {
|
|
|
68596
68645
|
}
|
|
68597
68646
|
//#endregion
|
|
68598
68647
|
//#region src/rendering/blocks-page-renderer.ts
|
|
68648
|
+
const MissingBlockOverrideError = MissingBlockOverrideError$1;
|
|
68649
|
+
function isOverrideOnlyPageRenderer(props) {
|
|
68650
|
+
return props.rendering?.kind === "overrides-only";
|
|
68651
|
+
}
|
|
68599
68652
|
function normalizeSdkCustomBlocks(customBlocks) {
|
|
68600
68653
|
if (!customBlocks) return void 0;
|
|
68601
68654
|
return customBlocks.map((block) => {
|
|
@@ -68626,15 +68679,23 @@ function toBlocksPageRendererDataContext(dataContext) {
|
|
|
68626
68679
|
}
|
|
68627
68680
|
function PageRenderer(props) {
|
|
68628
68681
|
const blocksSdkConfig = props.sdkConfig ? { customBlocks: normalizeSdkCustomBlocks(props.sdkConfig.customBlocks) } : props.sdkConfig;
|
|
68629
|
-
const
|
|
68630
|
-
const
|
|
68631
|
-
...
|
|
68632
|
-
theme: blocksTheme,
|
|
68682
|
+
const { rendering: _rendering, theme: _theme, themeTokens: _themeTokens, ...commonProps } = props;
|
|
68683
|
+
const commonBlocksProps = {
|
|
68684
|
+
...commonProps,
|
|
68633
68685
|
dataContext: props.dataContext ? toBlocksPageRendererDataContext(props.dataContext) : void 0,
|
|
68634
68686
|
blockOverrides: toBlocksBlockOverrides(props.blockOverrides),
|
|
68635
68687
|
sdkConfig: blocksSdkConfig,
|
|
68636
68688
|
customBlocks: normalizeSdkCustomBlocks(props.customBlocks)
|
|
68637
68689
|
};
|
|
68690
|
+
const blocksProps = isOverrideOnlyPageRenderer(props) ? {
|
|
68691
|
+
...commonBlocksProps,
|
|
68692
|
+
rendering: { kind: "overrides-only" },
|
|
68693
|
+
blockOverrides: toBlocksBlockOverrides(props.blockOverrides) ?? {}
|
|
68694
|
+
} : {
|
|
68695
|
+
...commonBlocksProps,
|
|
68696
|
+
theme: parseBlocksTheme(props.theme),
|
|
68697
|
+
themeTokens: props.themeTokens
|
|
68698
|
+
};
|
|
68638
68699
|
return React$1.createElement(PageRenderer$1, blocksProps);
|
|
68639
68700
|
}
|
|
68640
68701
|
//#endregion
|
|
@@ -68676,57 +68737,85 @@ function renderWithSdkThemeRuntime({ themeRuntime, theme, children }) {
|
|
|
68676
68737
|
default: return assertNever$4(themeRuntime);
|
|
68677
68738
|
}
|
|
68678
68739
|
}
|
|
68740
|
+
function renderWithOverrideOnlyRuntime({ runtime, children }) {
|
|
68741
|
+
switch (runtime.kind) {
|
|
68742
|
+
case "responsive-only": return /* @__PURE__ */ jsx(ResponsiveScope, {
|
|
68743
|
+
responsiveMode: runtime.responsiveMode,
|
|
68744
|
+
children
|
|
68745
|
+
});
|
|
68746
|
+
case "none": return /* @__PURE__ */ jsx(Fragment, { children });
|
|
68747
|
+
default: return assertNever$4(runtime);
|
|
68748
|
+
}
|
|
68749
|
+
}
|
|
68679
68750
|
//#endregion
|
|
68680
68751
|
//#region src/rendering/components/pageShared.tsx
|
|
68681
|
-
function
|
|
68682
|
-
|
|
68683
|
-
|
|
68684
|
-
|
|
68685
|
-
|
|
68686
|
-
|
|
68687
|
-
|
|
68688
|
-
|
|
68689
|
-
|
|
68690
|
-
|
|
68691
|
-
|
|
68692
|
-
|
|
68693
|
-
|
|
68694
|
-
|
|
68695
|
-
|
|
68696
|
-
|
|
68697
|
-
|
|
68698
|
-
|
|
68752
|
+
function isOverrideOnlyPage(props) {
|
|
68753
|
+
return props.rendering?.kind === "overrides-only";
|
|
68754
|
+
}
|
|
68755
|
+
function resolvePageThemeTokens(props) {
|
|
68756
|
+
const baseTokens = props.themeTokens ?? buildThemeRuntime(props.theme).tokens;
|
|
68757
|
+
return props.sdkConfig?.theme?.palette ? {
|
|
68758
|
+
...baseTokens,
|
|
68759
|
+
palette: {
|
|
68760
|
+
...baseTokens.palette,
|
|
68761
|
+
...props.sdkConfig.theme.palette
|
|
68762
|
+
}
|
|
68763
|
+
} : baseTokens;
|
|
68764
|
+
}
|
|
68765
|
+
function PageContent(props) {
|
|
68766
|
+
const { page, runtimeBoundaries, siteId, resolvedData, bookingOfferingPresets, routeMap, pagesByIdentifier, entriesByIdentifier, wrapBlock, registry, usePlaceholders = false, blockOverrides, sdkConfig, customBlocks, supabaseUrl, mediaAssets, apiBaseUrl, portalToken, previewToken, dataContext } = props;
|
|
68767
|
+
const rendererCommonProps = {
|
|
68768
|
+
page,
|
|
68769
|
+
runtimeBoundaries,
|
|
68770
|
+
usePlaceholders,
|
|
68771
|
+
dataContext: {
|
|
68772
|
+
siteId,
|
|
68773
|
+
apiBaseUrl,
|
|
68774
|
+
portalToken,
|
|
68775
|
+
previewToken,
|
|
68776
|
+
resolvedData,
|
|
68777
|
+
bookingOfferingPresets: bookingOfferingPresets ?? [],
|
|
68778
|
+
routes: routeMap,
|
|
68779
|
+
pagesByIdentifier,
|
|
68780
|
+
entriesByIdentifier,
|
|
68781
|
+
occurrenceContext: dataContext?.occurrenceContext ?? null,
|
|
68782
|
+
entrySubrouteContext: dataContext?.entrySubrouteContext ?? null,
|
|
68783
|
+
contentEntry: dataContext?.contentEntry ?? null,
|
|
68784
|
+
pageSurface: dataContext?.pageSurface ?? null,
|
|
68785
|
+
subject: dataContext?.subject ?? null,
|
|
68786
|
+
editableRouteMetadataFieldIds: dataContext?.editableRouteMetadataFieldIds ?? null,
|
|
68787
|
+
previewStage: dataContext?.previewStage,
|
|
68788
|
+
supabaseUrl,
|
|
68789
|
+
mediaAssets,
|
|
68790
|
+
imageResolveContext: {
|
|
68699
68791
|
siteId,
|
|
68700
|
-
apiBaseUrl,
|
|
68701
|
-
portalToken,
|
|
68702
|
-
previewToken,
|
|
68703
|
-
resolvedData,
|
|
68704
|
-
bookingOfferingPresets: bookingOfferingPresets ?? [],
|
|
68705
|
-
routes: routeMap,
|
|
68706
|
-
pagesByIdentifier,
|
|
68707
|
-
entriesByIdentifier,
|
|
68708
|
-
occurrenceContext: dataContext?.occurrenceContext ?? null,
|
|
68709
|
-
entrySubrouteContext: dataContext?.entrySubrouteContext ?? null,
|
|
68710
|
-
contentEntry: dataContext?.contentEntry ?? null,
|
|
68711
|
-
pageSurface: dataContext?.pageSurface ?? null,
|
|
68712
|
-
subject: dataContext?.subject ?? null,
|
|
68713
|
-
editableRouteMetadataFieldIds: dataContext?.editableRouteMetadataFieldIds ?? null,
|
|
68714
|
-
previewStage: dataContext?.previewStage,
|
|
68715
68792
|
supabaseUrl,
|
|
68716
|
-
mediaAssets
|
|
68717
|
-
|
|
68718
|
-
|
|
68719
|
-
|
|
68720
|
-
|
|
68721
|
-
|
|
68722
|
-
|
|
68723
|
-
|
|
68724
|
-
|
|
68725
|
-
|
|
68726
|
-
|
|
68727
|
-
|
|
68728
|
-
|
|
68729
|
-
|
|
68793
|
+
mediaAssets
|
|
68794
|
+
}
|
|
68795
|
+
},
|
|
68796
|
+
routeMap,
|
|
68797
|
+
wrapBlock,
|
|
68798
|
+
registry,
|
|
68799
|
+
sdkConfig: sdkConfig ? { customBlocks: sdkConfig.customBlocks } : null,
|
|
68800
|
+
customBlocks
|
|
68801
|
+
};
|
|
68802
|
+
const content = isOverrideOnlyPage(props) ? /* @__PURE__ */ jsx(PageRenderer, {
|
|
68803
|
+
...rendererCommonProps,
|
|
68804
|
+
rendering: { kind: "overrides-only" },
|
|
68805
|
+
blockOverrides: props.blockOverrides
|
|
68806
|
+
}) : /* @__PURE__ */ jsx(PageRenderer, {
|
|
68807
|
+
...rendererCommonProps,
|
|
68808
|
+
theme: props.theme,
|
|
68809
|
+
themeTokens: resolvePageThemeTokens(props),
|
|
68810
|
+
blockOverrides
|
|
68811
|
+
});
|
|
68812
|
+
return isOverrideOnlyPage(props) ? renderWithOverrideOnlyRuntime({
|
|
68813
|
+
runtime: props.rendering.runtime,
|
|
68814
|
+
children: content
|
|
68815
|
+
}) : renderWithSdkThemeRuntime({
|
|
68816
|
+
themeRuntime: props.themeRuntime ?? defaultPageThemeRuntime,
|
|
68817
|
+
theme: props.theme,
|
|
68818
|
+
children: content
|
|
68730
68819
|
});
|
|
68731
68820
|
}
|
|
68732
68821
|
//#endregion
|
|
@@ -69205,12 +69294,48 @@ function buildLogo(logo, fallbackAlt) {
|
|
|
69205
69294
|
return result;
|
|
69206
69295
|
}
|
|
69207
69296
|
//#endregion
|
|
69297
|
+
//#region src/rendering/renderingMode.ts
|
|
69298
|
+
const defaultOverrideOnlyRuntime = { kind: "responsive-only" };
|
|
69299
|
+
//#endregion
|
|
69208
69300
|
//#region src/rendering/components/Layout.tsx
|
|
69209
69301
|
/**
|
|
69210
69302
|
* Layout component with header and footer
|
|
69211
69303
|
*
|
|
69212
69304
|
* Renders site header and footer around content. Fetches site data if not provided.
|
|
69213
69305
|
*/
|
|
69306
|
+
function isOverrideOnlyLayout(props) {
|
|
69307
|
+
return props.rendering?.kind === "overrides-only";
|
|
69308
|
+
}
|
|
69309
|
+
var UnsupportedOverrideOnlyLayoutChromeError = class extends Error {
|
|
69310
|
+
constructor(surface) {
|
|
69311
|
+
super(`Override-only Layout requires a custom or disabled ${surface}; SDK default chrome is unavailable.`);
|
|
69312
|
+
this.surface = surface;
|
|
69313
|
+
this.code = "unsupported_override_only_layout_chrome";
|
|
69314
|
+
this.name = "UnsupportedOverrideOnlyLayoutChromeError";
|
|
69315
|
+
}
|
|
69316
|
+
};
|
|
69317
|
+
async function resolveLayoutSiteData(props) {
|
|
69318
|
+
if (props.siteData) return props.siteData;
|
|
69319
|
+
if (!props.client) throw new Error("Layout: must provide either siteData or client");
|
|
69320
|
+
if (!props.siteId && !props.slug && !props.domain) throw new Error("Layout: must provide siteId, slug, or domain when using client");
|
|
69321
|
+
return props.client.getSite({
|
|
69322
|
+
id: props.siteId,
|
|
69323
|
+
slug: props.slug,
|
|
69324
|
+
domain: props.domain
|
|
69325
|
+
});
|
|
69326
|
+
}
|
|
69327
|
+
function renderOverrideOnlyLayout(props, data) {
|
|
69328
|
+
if (data.header === true) throw new UnsupportedOverrideOnlyLayoutChromeError("header");
|
|
69329
|
+
if (data.footer === true) throw new UnsupportedOverrideOnlyLayoutChromeError("footer");
|
|
69330
|
+
return renderWithOverrideOnlyRuntime({
|
|
69331
|
+
runtime: props.rendering.runtime ?? defaultOverrideOnlyRuntime,
|
|
69332
|
+
children: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
69333
|
+
typeof props.header === "function" ? props.header(data.headerData) : null,
|
|
69334
|
+
props.children,
|
|
69335
|
+
typeof props.footer === "function" ? props.footer(data.footerData) : null
|
|
69336
|
+
] })
|
|
69337
|
+
});
|
|
69338
|
+
}
|
|
69214
69339
|
/**
|
|
69215
69340
|
* Layout component that wraps content with site header and footer.
|
|
69216
69341
|
*
|
|
@@ -69246,20 +69371,13 @@ function buildLogo(logo, fallbackAlt) {
|
|
|
69246
69371
|
* </Layout>
|
|
69247
69372
|
* ```
|
|
69248
69373
|
*/
|
|
69249
|
-
async function Layout(
|
|
69250
|
-
|
|
69251
|
-
|
|
69252
|
-
|
|
69253
|
-
|
|
69254
|
-
|
|
69255
|
-
id: siteId,
|
|
69256
|
-
slug,
|
|
69257
|
-
domain
|
|
69258
|
-
});
|
|
69259
|
-
}
|
|
69260
|
-
const { site, theme, navigation, layout, routes } = siteData;
|
|
69374
|
+
async function Layout(props) {
|
|
69375
|
+
const { children, hasPortalSession = false, previewStage = "published" } = props;
|
|
69376
|
+
const header = props.header ?? true;
|
|
69377
|
+
const footer = props.footer ?? true;
|
|
69378
|
+
const siteData = await resolveLayoutSiteData(props);
|
|
69379
|
+
const { site, navigation, layout, routes } = siteData;
|
|
69261
69380
|
const footerBlocks = siteData.footerBlocks ?? [];
|
|
69262
|
-
const builtThemeRuntime = buildThemeRuntime(theme);
|
|
69263
69381
|
const navigationOptions = {
|
|
69264
69382
|
hasPortalSession,
|
|
69265
69383
|
previewStage,
|
|
@@ -69273,22 +69391,38 @@ async function Layout({ siteData: providedSiteData, client, siteId, slug, domain
|
|
|
69273
69391
|
const footerMenuViewModel = buildFooterMenu(navigation, routes, navigationOptions);
|
|
69274
69392
|
const legalFooterMenuViewModel = buildFooterMenuForRole(navigation, routes, "legal-policy", navigationOptions);
|
|
69275
69393
|
const logoViewModel = buildLogo(layout.logo ?? null, site.title);
|
|
69276
|
-
const
|
|
69394
|
+
const customHeaderData = {
|
|
69277
69395
|
menu: menuViewModel,
|
|
69278
69396
|
logo: logoViewModel,
|
|
69279
69397
|
site,
|
|
69280
|
-
theme,
|
|
69281
69398
|
routes
|
|
69282
69399
|
};
|
|
69283
|
-
const
|
|
69400
|
+
const customFooterData = {
|
|
69284
69401
|
menu: menuViewModel,
|
|
69285
69402
|
footerMenu: footerMenuViewModel,
|
|
69286
69403
|
legalFooterMenu: legalFooterMenuViewModel,
|
|
69287
69404
|
logo: logoViewModel,
|
|
69288
69405
|
site,
|
|
69289
|
-
theme,
|
|
69290
69406
|
routes
|
|
69291
69407
|
};
|
|
69408
|
+
if (isOverrideOnlyLayout(props)) return renderOverrideOnlyLayout(props, {
|
|
69409
|
+
header: props.header ?? true,
|
|
69410
|
+
footer: props.footer ?? true,
|
|
69411
|
+
headerData: customHeaderData,
|
|
69412
|
+
footerData: customFooterData
|
|
69413
|
+
});
|
|
69414
|
+
const { theme } = siteData;
|
|
69415
|
+
const builtThemeRuntime = buildThemeRuntime(theme);
|
|
69416
|
+
const headerVariant = props.headerVariant;
|
|
69417
|
+
const themeRuntime = props.themeRuntime;
|
|
69418
|
+
const headerData = {
|
|
69419
|
+
...customHeaderData,
|
|
69420
|
+
theme
|
|
69421
|
+
};
|
|
69422
|
+
const footerData = {
|
|
69423
|
+
...customFooterData,
|
|
69424
|
+
theme
|
|
69425
|
+
};
|
|
69292
69426
|
const headerContent = headerVariant ? {
|
|
69293
69427
|
...layout.header,
|
|
69294
69428
|
variant: headerVariant
|
|
@@ -71396,6 +71530,25 @@ z$1.object({
|
|
|
71396
71530
|
mode: z$1.enum(["apply", "preview"]).optional()
|
|
71397
71531
|
}).strict();
|
|
71398
71532
|
//#endregion
|
|
71533
|
+
//#region ../api/src/sdkThemeWire.ts
|
|
71534
|
+
/**
|
|
71535
|
+
* Validate a wire value without replacing it with the schema's parsed output.
|
|
71536
|
+
* The returned type is deliberately the schema input, not its canonical output.
|
|
71537
|
+
*/
|
|
71538
|
+
function losslessValidatedSchema(schema) {
|
|
71539
|
+
return z$1.unknown().superRefine((value, ctx) => {
|
|
71540
|
+
const parsed = schema.safeParse(value);
|
|
71541
|
+
if (parsed.success) return;
|
|
71542
|
+
for (const issue of parsed.error.issues) ctx.addIssue({
|
|
71543
|
+
code: "custom",
|
|
71544
|
+
path: issue.path,
|
|
71545
|
+
message: issue.message,
|
|
71546
|
+
params: { validationCode: issue.code }
|
|
71547
|
+
});
|
|
71548
|
+
}).transform((value) => value);
|
|
71549
|
+
}
|
|
71550
|
+
losslessValidatedSchema(themeSchema);
|
|
71551
|
+
//#endregion
|
|
71399
71552
|
//#region ../api/src/siteOnboarding.ts
|
|
71400
71553
|
const LAUNCH_REQUIREMENT_OVERRIDE_DEFINITIONS = { configure_appointments: {
|
|
71401
71554
|
requirementId: "configure_appointments",
|
|
@@ -72353,6 +72506,17 @@ async function prefetchBlockDataWithDeps(deps, page, context, client, options) {
|
|
|
72353
72506
|
}
|
|
72354
72507
|
//#endregion
|
|
72355
72508
|
//#region src/rendering/components/Block.shared.tsx
|
|
72509
|
+
function isOverrideOnlyBlock(props) {
|
|
72510
|
+
return props.rendering?.kind === "overrides-only";
|
|
72511
|
+
}
|
|
72512
|
+
var MissingStandaloneBlockOverrideError = class extends Error {
|
|
72513
|
+
constructor(blockKind) {
|
|
72514
|
+
super(`Override-only standalone rendering requires an override for block kind "${blockKind}".`);
|
|
72515
|
+
this.blockKind = blockKind;
|
|
72516
|
+
this.code = "missing_standalone_block_override";
|
|
72517
|
+
this.name = "MissingStandaloneBlockOverrideError";
|
|
72518
|
+
}
|
|
72519
|
+
};
|
|
72356
72520
|
function renderUnknownBlock(blockKind) {
|
|
72357
72521
|
return /* @__PURE__ */ jsx("div", {
|
|
72358
72522
|
className: "p-4 border border-red-300 bg-red-50 rounded",
|
|
@@ -72415,14 +72579,16 @@ function buildStandaloneBlockViewModel({ siteId, pageId, previewStage, apiBaseUr
|
|
|
72415
72579
|
function renderBlockOverride({ OverrideComponent, props, runtime, resolvedData }) {
|
|
72416
72580
|
return /* @__PURE__ */ jsx(OverrideComponent, {
|
|
72417
72581
|
content: props.content,
|
|
72418
|
-
theme
|
|
72419
|
-
|
|
72582
|
+
...runtime && "theme" in props ? {
|
|
72583
|
+
theme: runtime.themeRuntime.tokens,
|
|
72584
|
+
themeConfig: props.theme
|
|
72585
|
+
} : {},
|
|
72420
72586
|
data: resolvedData,
|
|
72421
72587
|
siteId: props.siteId,
|
|
72422
72588
|
apiBaseUrl: props.apiBaseUrl,
|
|
72423
72589
|
portalToken: props.portalToken ?? null,
|
|
72424
72590
|
supabaseUrl: props.supabaseUrl,
|
|
72425
|
-
imageResolveContext: runtime
|
|
72591
|
+
imageResolveContext: runtime?.imageResolveContext,
|
|
72426
72592
|
blockId: props.blockId ?? null,
|
|
72427
72593
|
blockKind: props.blockKind
|
|
72428
72594
|
});
|
|
@@ -72451,8 +72617,8 @@ function renderManifestBlock({ definition, props, runtime, resolvedData }) {
|
|
|
72451
72617
|
async function BlockContent(props) {
|
|
72452
72618
|
const definition = getBlockDefinition(props.blockKind);
|
|
72453
72619
|
const OverrideComponent = props.override;
|
|
72620
|
+
if (isOverrideOnlyBlock(props) && !OverrideComponent) throw new MissingStandaloneBlockOverrideError(props.blockKind);
|
|
72454
72621
|
if (!definition && !OverrideComponent) return renderUnknownBlock(props.blockKind);
|
|
72455
|
-
const runtime = buildBlockContentRuntime(props);
|
|
72456
72622
|
const resolvedData = await loadStandaloneBlockData({
|
|
72457
72623
|
...props,
|
|
72458
72624
|
hasDefinition: Boolean(definition)
|
|
@@ -72460,13 +72626,14 @@ async function BlockContent(props) {
|
|
|
72460
72626
|
if (OverrideComponent) return renderBlockOverride({
|
|
72461
72627
|
OverrideComponent,
|
|
72462
72628
|
props,
|
|
72463
|
-
runtime,
|
|
72629
|
+
runtime: isOverrideOnlyBlock(props) ? void 0 : buildBlockContentRuntime(props),
|
|
72464
72630
|
resolvedData
|
|
72465
72631
|
});
|
|
72632
|
+
if (isOverrideOnlyBlock(props)) throw new MissingStandaloneBlockOverrideError(props.blockKind);
|
|
72466
72633
|
return renderManifestBlock({
|
|
72467
72634
|
definition,
|
|
72468
72635
|
props,
|
|
72469
|
-
runtime,
|
|
72636
|
+
runtime: buildBlockContentRuntime(props),
|
|
72470
72637
|
resolvedData
|
|
72471
72638
|
});
|
|
72472
72639
|
}
|
|
@@ -72583,4 +72750,4 @@ async function resolveBlockOverridesForPage(registrations, page) {
|
|
|
72583
72750
|
return resolved;
|
|
72584
72751
|
}
|
|
72585
72752
|
//#endregion
|
|
72586
|
-
export { Block, Layout, Page, buildPageBlockKindIndex, collectUsedBlockKindsFromPageOutline, defineBlockOverrideRegistrations, defineBlockOverrides, defineLazyBlockOverride, resolveBlockOverridesForPage };
|
|
72753
|
+
export { Block, Layout, MissingBlockOverrideError, Page, UnsupportedOverrideOnlyLayoutChromeError, buildPageBlockKindIndex, collectUsedBlockKindsFromPageOutline, defineBlockOverrideRegistrations, defineBlockOverrides, defineLazyBlockOverride, resolveBlockOverridesForPage };
|