@riverbankcms/sdk 0.95.0 → 0.98.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 +47 -5
- package/dist/{PreviewEditorSidebar-6FQYKOSB.mjs → PreviewEditorSidebar-CG3SSJND.mjs} +3 -3
- package/dist/{PreviewEditorUI-NPO2XMFB.mjs → PreviewEditorUI-RHNGKAAU.mjs} +3 -3
- package/dist/SdkPreviewModeRuntime-OV5PNJBB.mjs +8 -0
- package/dist/_dts/ai/src/contracts/proposals.d.ts +10 -10
- package/dist/_dts/api/src/bookingManagementEndpoints.d.ts +35 -1
- package/dist/_dts/api/src/bookingOperations.d.ts +246 -0
- package/dist/_dts/api/src/contentRuntime.d.ts +109 -40
- package/dist/_dts/api/src/endpoints.d.ts +80 -0
- package/dist/_dts/api/src/index.d.ts +3 -2
- package/dist/_dts/api/src/public/endpoints.d.ts +1 -1
- package/dist/_dts/api/src/publicExperienceEndpoints.d.ts +10 -0
- package/dist/_dts/api/src/sdkContracts.d.ts +2 -0
- package/dist/_dts/api/src/siteManagementEndpoints.d.ts +2 -1
- package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +7 -1
- package/dist/_dts/block-form/src/client/index.d.ts +1 -1
- package/dist/_dts/block-form/src/fields/types.d.ts +9 -1
- package/dist/_dts/block-form/src/registry/schemas.d.ts +4 -0
- package/dist/_dts/block-form/src/registry/widgets.d.ts +1 -0
- package/dist/_dts/block-form/src/widgets/InlineTextField/InlineTextField.d.ts +4 -0
- package/dist/_dts/block-form/src/widgets/InlineTextField/index.d.ts +3 -0
- package/dist/_dts/block-form/src/widgets/InlineTextField/inlineTextFieldDefaults.d.ts +2 -0
- package/dist/_dts/block-form/src/widgets/InlineTextField/inlineTextFieldSchema.d.ts +3 -0
- package/dist/_dts/blocks/src/PageRenderer.d.ts +2 -1
- package/dist/_dts/blocks/src/bindings/index.d.ts +1 -0
- package/dist/_dts/blocks/src/bindings/types.d.ts +1 -4
- package/dist/_dts/blocks/src/client/site-chrome.d.ts +7 -0
- package/dist/_dts/blocks/src/contracts/index.d.ts +1 -0
- package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +12 -12
- package/dist/_dts/blocks/src/index.d.ts +2 -0
- package/dist/_dts/blocks/src/primitives/content/primitives.d.ts +4 -0
- package/dist/_dts/blocks/src/system/blocks/appointment-booking.d.ts +2 -29631
- package/dist/_dts/blocks/src/system/blocks/blog-listing.d.ts +2 -29614
- package/dist/_dts/blocks/src/system/blocks/cart.d.ts +2 -29634
- package/dist/_dts/blocks/src/system/blocks/checkout.d.ts +2 -29627
- package/dist/_dts/blocks/src/system/blocks/collection.d.ts +2 -29585
- package/dist/_dts/blocks/src/system/blocks/events/shared/index.d.ts +1 -0
- package/dist/_dts/blocks/src/system/blocks/events/shared/layout.d.ts +2 -0
- package/dist/_dts/blocks/src/system/blocks/faq.d.ts +2 -29677
- package/dist/_dts/blocks/src/system/blocks/gifting.d.ts +2 -29655
- package/dist/_dts/blocks/src/system/blocks/index.d.ts +1 -0
- package/dist/_dts/blocks/src/system/blocks/media-text.d.ts +220 -0
- package/dist/_dts/blocks/src/system/blocks/product-detail.d.ts +2 -29655
- package/dist/_dts/blocks/src/system/blocks/product-list.d.ts +2 -29685
- package/dist/_dts/blocks/src/system/blocks/shop.d.ts +2 -29761
- package/dist/_dts/blocks/src/system/blocks/weekly-slot-availability.d.ts +34 -0
- package/dist/_dts/blocks/src/system/componentFactory.d.ts +1 -0
- package/dist/_dts/blocks/src/system/constants/blockKinds.d.ts +1 -1
- package/dist/_dts/blocks/src/system/customize/facets.d.ts +2 -2
- package/dist/_dts/blocks/src/system/data/loaderEndpoints.d.ts +1 -1
- package/dist/_dts/blocks/src/system/data/prefetchBlockData.d.ts +4 -1
- package/dist/_dts/blocks/src/system/fragments/library/heroCopy.d.ts +9 -0
- package/dist/_dts/blocks/src/system/inlineText.d.ts +78 -0
- package/dist/_dts/blocks/src/system/manifest/derivedContent.d.ts +3 -1
- package/dist/_dts/blocks/src/system/manifest/fieldValidation/index.d.ts +15 -3
- package/dist/_dts/blocks/src/system/manifest/schema.d.ts +188 -7
- package/dist/_dts/blocks/src/system/node/builder.d.ts +2 -0
- package/dist/_dts/blocks/src/system/node/schema.d.ts +13 -0
- package/dist/_dts/blocks/src/system/node/validation-constants.d.ts +1 -1
- package/dist/_dts/blocks/src/system/registry.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/api/client.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/api/endpoints.d.ts +8 -0
- package/dist/_dts/blocks/src/system/runtime/api/types.d.ts +24 -0
- package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +6 -0
- package/dist/_dts/blocks/src/system/runtime/hooks/useAppointmentCheckoutVerification.d.ts +7 -0
- package/dist/_dts/blocks/src/system/runtime/hooks/useAvailableSlots.d.ts +2 -2
- package/dist/_dts/blocks/src/system/runtime/hooks/useHeadlessEventRegistrationFlow.d.ts +4 -0
- package/dist/_dts/blocks/src/system/runtime/hooks/usePaymentVerification.d.ts +5 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/basic.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/hooks.d.ts +14 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationSubmit.d.ts +8 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationWizard.d.ts +133 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/renderInlineText.d.ts +3 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/weekly-slot-availability.client.controller.d.ts +3 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/weekly-slot-availability.client.d.ts +9 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/weekly-slot-availability.client.state.d.ts +14 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/weekly-slot-availability.server.d.ts +10 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/weekly-slot-availability.view.d.ts +11 -0
- package/dist/_dts/blocks/src/system/runtime/resolver.d.ts +31 -1
- package/dist/_dts/blocks/src/system/runtime/shared/useWaitlistClaim.d.ts +5 -0
- package/dist/_dts/blocks/src/utils/date-formatting.d.ts +1 -1
- package/dist/_dts/content-editor/src/index.d.ts +1 -0
- package/dist/_dts/content-editor/src/primitives/PreviewInlineTextEditor.d.ts +9 -0
- package/dist/_dts/content-editor/src/primitives/PreviewRichTextEditor.d.ts +1 -1
- package/dist/_dts/content-model/src/templates/bindingTypeCompatibility.d.ts +1 -1
- package/dist/_dts/content-model/src/templates/defaults.d.ts +30 -0
- package/dist/_dts/content-model/src/templates/types.d.ts +3 -6
- package/dist/_dts/core/src/branded.d.ts +8 -0
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +505 -2
- package/dist/_dts/editor/src/inline/FloatingToolbar.d.ts +18 -0
- package/dist/_dts/editor/src/inline/InlineTextEditor.d.ts +18 -1
- package/dist/_dts/editor/src/inline/InlineTextEditorStyles.d.ts +1 -0
- package/dist/_dts/editor/src/inline/domParse.d.ts +3 -0
- package/dist/_dts/editor/src/inline/presentation.d.ts +48 -0
- package/dist/_dts/editor/src/inline/selection.d.ts +12 -0
- package/dist/_dts/editor-blocks/src/widgets/index.d.ts +1 -0
- package/dist/_dts/editor-blocks/src/widgets/inline-text/InlineTextField.d.ts +3 -0
- package/dist/_dts/editor-blocks/src/widgets/inline-text/index.d.ts +1 -0
- package/dist/_dts/field-primitives/src/bindings/index.d.ts +8 -0
- package/dist/_dts/path-utils/src/index.d.ts +1 -0
- package/dist/_dts/preview-next/src/client/widgets/widgetOverrides.d.ts +1 -0
- package/dist/_dts/sdk/src/cli/commands/content.d.ts +56 -0
- package/dist/_dts/sdk/src/cli/commands/push/options.d.ts +4 -0
- package/dist/_dts/sdk/src/cli/commands/push/publishGuidance.d.ts +15 -0
- package/dist/_dts/sdk/src/cli/commands/push/scopes/commandBackedDatedOfferingScope.d.ts +4 -7
- package/dist/_dts/sdk/src/cli/commands/push/scopes/types.d.ts +5 -1
- package/dist/_dts/sdk/src/cli/commands/push/stale-resolution.d.ts +9 -3
- package/dist/_dts/sdk/src/cli/commands/push/verification.d.ts +56 -0
- package/dist/_dts/sdk/src/cli/commands/push/workflowPlan.d.ts +34 -0
- package/dist/_dts/sdk/src/cli/commands/push-execute.d.ts +2 -1
- package/dist/_dts/sdk/src/cli/commands/setup.d.ts +2 -0
- package/dist/_dts/sdk/src/cli/config-loader.d.ts +2 -0
- package/dist/_dts/sdk/src/cli/content/edit/format.d.ts +2 -0
- package/dist/_dts/sdk/src/cli/content/edit/path.d.ts +14 -0
- package/dist/_dts/sdk/src/cli/content/edit/planner.d.ts +46 -0
- package/dist/_dts/sdk/src/cli/content/fs-utils.d.ts +4 -0
- package/dist/_dts/sdk/src/cli/content/metadataStore.d.ts +29 -0
- package/dist/_dts/sdk/src/cli/content/reader.d.ts +16 -14
- package/dist/_dts/sdk/src/cli/content/writer.d.ts +8 -4
- package/dist/_dts/sdk/src/cli/env-scope.d.ts +2 -0
- package/dist/_dts/sdk/src/cli/helpers.d.ts +6 -7
- package/dist/_dts/sdk/src/cli/merge-remote/entryMergePush.d.ts +2 -0
- package/dist/_dts/sdk/src/cli/merge-remote/mergeFieldChanges.d.ts +22 -0
- package/dist/_dts/sdk/src/cli/merge-remote/pageLocal.d.ts +3 -0
- package/dist/_dts/sdk/src/cli/merge-remote/pageMerge.d.ts +78 -0
- package/dist/_dts/sdk/src/cli/merge-remote/pageMergePlan.d.ts +36 -0
- package/dist/_dts/sdk/src/cli/merge-remote/pageMergePush.d.ts +23 -0
- package/dist/_dts/sdk/src/cli/merge-remote/pageMergeReport.d.ts +29 -0
- package/dist/_dts/sdk/src/cli/merge-remote/pageSnapshots.d.ts +48 -0
- package/dist/_dts/sdk/src/cli/push-config.d.ts +13 -2
- package/dist/_dts/sdk/src/cli/setup/setupPlan.d.ts +51 -0
- package/dist/_dts/sdk/src/cli/site-commands/commandRuntime.d.ts +21 -0
- package/dist/_dts/sdk/src/cli/sync/diff.d.ts +3 -6
- package/dist/_dts/sdk/src/cli/sync/field-diff.d.ts +39 -0
- package/dist/_dts/sdk/src/cli/sync/index.d.ts +1 -0
- package/dist/_dts/sdk/src/client/runtimeCachePolicy.d.ts +1 -1
- package/dist/_dts/sdk/src/client/types.d.ts +18 -2
- package/dist/_dts/sdk/src/config/field-definitions.d.ts +8 -3
- package/dist/_dts/sdk/src/config/typed-entries.d.ts +5 -3
- package/dist/_dts/sdk/src/config/types.d.ts +1 -1
- package/dist/_dts/sdk/src/config/validation.d.ts +3 -0
- package/dist/_dts/sdk/src/contracts/bindings.d.ts +4 -7
- package/dist/_dts/sdk/src/contracts/content.d.ts +18 -0
- package/dist/_dts/sdk/src/contracts/index.d.ts +1 -1
- package/dist/_dts/sdk/src/contracts/system-block-content.d.ts +16 -2
- package/dist/_dts/sdk/src/next/route-outcome-proxy.d.ts +3 -3
- package/dist/_dts/sdk/src/public-api/contracts.d.ts +174 -78
- package/dist/_dts/sdk/src/public-api/runtime.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/helpers/bindings.d.ts +4 -3
- package/dist/_dts/sdk/src/rendering/helpers/loadContent.d.ts +52 -1
- package/dist/_dts/sdk/src/rendering/hooks/usePage.d.ts +2 -2
- package/dist/_dts/sdk/src/rendering/islands/types.d.ts +18 -66
- package/dist/_dts/sdk/src/types/block-kinds.d.ts +1 -1
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/_dts/theme-core/src/accordions/types.d.ts +1 -1
- package/dist/_dts/theme-core/src/buttons/types.d.ts +1 -1
- package/dist/_dts/theme-core/src/cards/types.d.ts +15 -15
- package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
- package/dist/_dts/theme-core/src/inputs/types.d.ts +1 -1
- package/dist/_dts/theme-core/src/mock-themes/all.d.ts +42 -42
- package/dist/_dts/theme-core/src/palette/variants/types.d.ts +2 -2
- package/dist/_dts/theme-core/src/schema.d.ts +44 -44
- package/dist/_dts/theme-core/src/site-styles/backgroundAppearance.d.ts +2 -2
- package/dist/_dts/theme-core/src/site-styles/designState.d.ts +16 -16
- package/dist/_dts/theme-core/src/site-styles/pageDesignIntent.d.ts +4 -4
- package/dist/_dts/theme-core/src/site-styles/tokenRecipes.d.ts +1 -1
- package/dist/_dts/theme-core/src/tokens/themeColorTokens.d.ts +1 -1
- package/dist/{chunk-4A6NWO3X.mjs → chunk-6WDBXCPX.mjs} +73 -12
- package/dist/{chunk-VZBSD4AJ.mjs → chunk-DBRI3PQF.mjs} +2281 -322
- package/dist/{chunk-PJPFTVZG.mjs → chunk-H24OU7WG.mjs} +106 -4
- package/dist/{chunk-K2SJTZMX.mjs → chunk-PKDPQHB5.mjs} +2 -2
- package/dist/{chunk-VTPPVAOL.mjs → chunk-QPXE2OUZ.mjs} +1 -1
- package/dist/{chunk-7ED5UNHL.mjs → chunk-V2BYFSPW.mjs} +109 -0
- package/dist/cli/index.mjs +4182 -1165
- package/dist/cli/init-docs/content/cli-reference.md +72 -5
- package/dist/cli/init-docs/content/content-management.md +22 -0
- package/dist/cli/init-docs/content/getting-started.md +8 -0
- package/dist/cli/init-docs/content/workflow-agent-safe-sync.md +3 -1
- package/dist/cli/init-docs/content/workflow-preview-mode.md +6 -0
- package/dist/cli/init-docs/content/workflow-remote-setup.md +51 -0
- package/dist/client/{accordion-LGO4IO5U.mjs → accordion-Q2BDNL53.mjs} +1 -1
- package/dist/client/{bookingForm-MWLS4LGU.mjs → bookingForm-ZMP4P7EK.mjs} +16 -6
- package/dist/client/bookings.mjs +98 -18
- package/dist/client/{carousel-6AHNP5HA.mjs → carousel-LW3UXPWO.mjs} +1 -1
- package/dist/client/{cart-CIXGYAZB.mjs → cart-Z6D3KS6K.mjs} +5 -5
- package/dist/client/{checkout-OTX6O3DN.mjs → checkout-YMT2QJQM.mjs} +5 -5
- package/dist/client/{chunk-Y2PMKCXO.mjs → chunk-26ZBRXFR.mjs} +9 -3
- package/dist/client/{chunk-MYCXAKWP.mjs → chunk-DRRQ7QSL.mjs} +2 -2
- package/dist/client/{chunk-TREIML53.mjs → chunk-ET2MDQQT.mjs} +4 -4
- package/dist/client/{chunk-AVBQSUIS.mjs → chunk-HBQEAOG4.mjs} +1 -1
- package/dist/client/{chunk-INRIT6DP.mjs → chunk-IEOECM7U.mjs} +62 -43
- package/dist/client/{chunk-TNGL2WJF.mjs → chunk-KDP7ZRZV.mjs} +16 -0
- package/dist/client/{chunk-V67AT7ZW.mjs → chunk-R4XK3CKR.mjs} +18 -1
- package/dist/client/{chunk-R3NQTBWE.mjs → chunk-SK2BMD22.mjs} +2 -2
- package/dist/client/{chunk-HOP7MKAZ.mjs → chunk-XNTHVZ25.mjs} +1 -1
- package/dist/client/client.mjs +5172 -4177
- package/dist/client/{courseRegistration-2LU6C3JL.mjs → courseRegistration-DGKCMC77.mjs} +4 -4
- package/dist/client/{eventCalendar-OKUSISBZ.mjs → eventCalendar-74Z2NNFM.mjs} +7 -7
- package/dist/client/{eventCombined-CMF6CD4S.mjs → eventCombined-GK2ODOX2.mjs} +7 -7
- package/dist/client/{eventDetails-XYWH7WXI.mjs → eventDetails-MONAGT3N.mjs} +7 -7
- package/dist/client/{eventListing-EK5DJTAH.mjs → eventListing-SKGAO6PS.mjs} +7 -7
- package/dist/client/{eventRegistration-XDOSICV6.mjs → eventRegistration-6KISGXRD.mjs} +7 -7
- package/dist/client/{form-J6GOHKYG.mjs → form-FXPRTXHI.mjs} +2 -2
- package/dist/client/{headerSection-C5SYJTRW.mjs → headerSection-7NAN5WNB.mjs} +2 -2
- package/dist/client/hooks.mjs +1681 -1337
- package/dist/client/{locationMap-QSQIFVVT.mjs → locationMap-UERN74U4.mjs} +2 -2
- package/dist/client/{newsletterForm-47VXJRWK.mjs → newsletterForm-SGWXMJ7U.mjs} +2 -2
- package/dist/client/{productDetail-5U6ISCC2.mjs → productDetail-HN3HWZQZ.mjs} +5 -5
- package/dist/client/{productList-XDZUMR3P.mjs → productList-YT22Z5UR.mjs} +5 -5
- package/dist/client/rendering/client.mjs +4796 -4288
- package/dist/client/rendering/islands.mjs +18 -18
- package/dist/client/rendering.mjs +2120 -1106
- package/dist/client/{shop-ZSZKIY3R.mjs → shop-TKEDNWUS.mjs} +5 -5
- package/dist/preview-next/before-render.mjs +109 -0
- package/dist/preview-next/client/runtime.mjs +5 -5
- package/dist/preview-next/middleware.mjs +109 -0
- package/dist/{sdk-runtime-PHNM7MRD.mjs → sdk-runtime-LWNYCQF2.mjs} +6 -6
- package/dist/server/components.mjs +3777 -2981
- package/dist/server/config-template-validation.mjs +35 -22
- package/dist/server/config-validation.mjs +1883 -1565
- package/dist/server/config.mjs +1883 -1565
- package/dist/server/data.mjs +1667 -1334
- package/dist/server/index.mjs +208 -9
- package/dist/server/next/middleware.mjs +2 -2
- package/dist/server/next.mjs +4077 -3060
- package/dist/server/page-converter.mjs +1481 -1279
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +3806 -2993
- package/dist/server/rendering.mjs +4000 -3060
- package/dist/server/routing.mjs +1737 -1357
- package/dist/server/server.mjs +2918 -2276
- package/dist/server/theme-bridge.mjs +43 -0
- package/dist/styles/index.css +44 -0
- package/package.json +1 -1
- package/dist/SdkPreviewModeRuntime-PBEFH5AL.mjs +0 -8
|
@@ -1 +1,18 @@
|
|
|
1
|
-
|
|
1
|
+
import { type ElementType } from 'react';
|
|
2
|
+
import { type InlineText } from '../../../blocks/src/index';
|
|
3
|
+
import { type InlineTextEditorTone } from './FloatingToolbar';
|
|
4
|
+
export type InlineTextEditorProps = {
|
|
5
|
+
value: InlineText;
|
|
6
|
+
onChange: (nextValue: InlineText, plainText: string) => void;
|
|
7
|
+
as?: ElementType;
|
|
8
|
+
id?: string;
|
|
9
|
+
className?: string;
|
|
10
|
+
placeholder?: string;
|
|
11
|
+
maxLength?: number;
|
|
12
|
+
ariaLabel?: string;
|
|
13
|
+
ariaDescribedBy?: string;
|
|
14
|
+
toolbarTone?: InlineTextEditorTone;
|
|
15
|
+
onFocus?: () => void;
|
|
16
|
+
onBlur?: () => void;
|
|
17
|
+
};
|
|
18
|
+
export declare function InlineTextEditor({ value, onChange, as: Comp, id, className, placeholder, maxLength, ariaLabel, ariaDescribedBy, toolbarTone, onFocus, onBlur, }: InlineTextEditorProps): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function InlineTextEditorStyles(): import("react").JSX.Element;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { CSSProperties } from 'react';
|
|
2
|
+
import { type InlineTextAccentTone, type InlineTextHighlightTone } from '../../../blocks/src/index';
|
|
3
|
+
import type { InlineTextEditorTone } from './FloatingToolbar';
|
|
4
|
+
type RgbaColor = Readonly<{
|
|
5
|
+
r: number;
|
|
6
|
+
g: number;
|
|
7
|
+
b: number;
|
|
8
|
+
a: number;
|
|
9
|
+
}>;
|
|
10
|
+
export type InlineTextTypographySnapshot = Pick<CSSProperties, 'fontFamily' | 'fontSize' | 'fontStyle' | 'fontWeight' | 'letterSpacing' | 'lineHeight' | 'textTransform'>;
|
|
11
|
+
export type InlineTextSurface = Readonly<{
|
|
12
|
+
kind: 'block-solid';
|
|
13
|
+
color: string;
|
|
14
|
+
rgba: RgbaColor;
|
|
15
|
+
}> | Readonly<{
|
|
16
|
+
kind: 'image-overlay';
|
|
17
|
+
color: string;
|
|
18
|
+
rgba: RgbaColor;
|
|
19
|
+
}> | Readonly<{
|
|
20
|
+
kind: 'theme-fallback';
|
|
21
|
+
color: string;
|
|
22
|
+
rgba: RgbaColor;
|
|
23
|
+
}> | Readonly<{
|
|
24
|
+
kind: 'toolbar-fallback';
|
|
25
|
+
color: string;
|
|
26
|
+
rgba: RgbaColor;
|
|
27
|
+
}>;
|
|
28
|
+
export type InlineTextPresentationContext = Readonly<{
|
|
29
|
+
surface: InlineTextSurface;
|
|
30
|
+
selectedTextColor: string;
|
|
31
|
+
selectedTextRgba: RgbaColor;
|
|
32
|
+
accentTextRgbaByTone: Readonly<Record<InlineTextAccentTone, RgbaColor | null>>;
|
|
33
|
+
typography: InlineTextTypographySnapshot;
|
|
34
|
+
}>;
|
|
35
|
+
export type InlineTextTonePreview = Readonly<{
|
|
36
|
+
surfaceStyle: CSSProperties;
|
|
37
|
+
textStyle: CSSProperties;
|
|
38
|
+
surfaceRgba: RgbaColor;
|
|
39
|
+
textRgba: RgbaColor;
|
|
40
|
+
lowContrast: boolean;
|
|
41
|
+
}>;
|
|
42
|
+
export declare function defaultInlineTextPresentationContext(tone: InlineTextEditorTone): InlineTextPresentationContext;
|
|
43
|
+
export declare function readInlineTextPresentationContext(editable: HTMLElement, toolbarTone: InlineTextEditorTone): InlineTextPresentationContext;
|
|
44
|
+
export declare function buildAccentTonePreview(tone: InlineTextAccentTone, context: InlineTextPresentationContext): InlineTextTonePreview;
|
|
45
|
+
export declare function buildHighlightTonePreview(tone: InlineTextHighlightTone, context: InlineTextPresentationContext): InlineTextTonePreview;
|
|
46
|
+
export declare function buildPlainTonePreview(context: InlineTextPresentationContext): InlineTextTonePreview;
|
|
47
|
+
export declare function inlineTextTonePreviewLooksSame(left: InlineTextTonePreview, right: InlineTextTonePreview): boolean;
|
|
48
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type InlineText, type InlineTextMark } from '../../../blocks/src/index';
|
|
2
|
+
export type InlineTextSelection = Readonly<{
|
|
3
|
+
start: number;
|
|
4
|
+
end: number;
|
|
5
|
+
rect: DOMRect;
|
|
6
|
+
}>;
|
|
7
|
+
export declare function readSelection(root: HTMLElement | null): InlineTextSelection | null;
|
|
8
|
+
export declare function readSelectionRange(root: HTMLElement | null): InlineTextSelection | null;
|
|
9
|
+
export declare function rangeHasMark(value: InlineText, range: Readonly<{
|
|
10
|
+
start: number;
|
|
11
|
+
end: number;
|
|
12
|
+
}>, kind: InlineTextMark['kind']): boolean;
|
|
@@ -2,6 +2,7 @@ export * from './button/index';
|
|
|
2
2
|
export * from './content-type-select/index';
|
|
3
3
|
export * from './entry-picker/index';
|
|
4
4
|
export * from './icon-picker/index';
|
|
5
|
+
export * from './inline-text/index';
|
|
5
6
|
export * from './link/index';
|
|
6
7
|
export * from './offerings-preview/index';
|
|
7
8
|
export * from './reference/index';
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { FieldWidgetProps, InlineTextFieldConfig } from '../../../../block-form/src/client/index';
|
|
2
|
+
import { type InlineText } from '../../../../blocks/src/index';
|
|
3
|
+
export declare function InlineTextField({ path, backend, config, }: FieldWidgetProps<InlineText, InlineTextFieldConfig>): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { InlineTextField } from './InlineTextField';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const BINDING_TRANSFORMS: {
|
|
2
|
+
readonly RICHTEXT_FIRST_PARAGRAPH: "richtext.firstParagraph";
|
|
3
|
+
readonly DATE_FORMAT_SHORT: "date.formatShort";
|
|
4
|
+
readonly DATE_FORMAT_LONG: "date.formatLong";
|
|
5
|
+
readonly TEXT_INLINE_TEXT: "text.inlineText";
|
|
6
|
+
};
|
|
7
|
+
export type BindingTransformName = (typeof BINDING_TRANSFORMS)[keyof typeof BINDING_TRANSFORMS];
|
|
8
|
+
export declare const BINDING_TRANSFORM_VALUES: [BindingTransformName, ...BindingTransformName[]];
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export type PathSegment = string | number;
|
|
2
2
|
export declare function parsePath(path: string | Array<PathSegment>): Array<PathSegment>;
|
|
3
3
|
export declare function segmentsToPath(segments: Array<PathSegment>): string | undefined;
|
|
4
|
+
export declare function siblingPath(path: string, siblingFieldPath: string): string;
|
|
4
5
|
export declare function getAtPath<T = unknown>(source: unknown, path: string | Array<PathSegment>): T | undefined;
|
|
5
6
|
export declare function setAtPath(target: Record<string, unknown> | Array<unknown>, path: string | Array<PathSegment>, value: unknown): void;
|
|
6
7
|
export declare function toAbsolutePath(base: string | undefined | null, path: string): string;
|
|
@@ -20,6 +20,7 @@ export declare const previewWidgetOverrides: {
|
|
|
20
20
|
readonly file: FieldWidgetComponent;
|
|
21
21
|
readonly media: FieldWidgetComponent;
|
|
22
22
|
readonly richText: FieldWidgetComponent;
|
|
23
|
+
readonly inlineText: FieldWidgetComponent;
|
|
23
24
|
readonly reference: FieldWidgetComponent;
|
|
24
25
|
readonly backgroundColor: FieldWidgetComponent;
|
|
25
26
|
readonly backgroundGradient: FieldWidgetComponent;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { Command } from 'commander';
|
|
2
|
+
import { type ContentEditOperation, type ContentEditPlan, type PageBlockMoveTarget } from '../content/edit/planner';
|
|
3
|
+
import { type OutputContext } from '../output';
|
|
4
|
+
type CommonEditOptions = Readonly<{
|
|
5
|
+
contentDir?: string;
|
|
6
|
+
write?: boolean;
|
|
7
|
+
}>;
|
|
8
|
+
type FieldSetOptions = CommonEditOptions & Readonly<{
|
|
9
|
+
value?: string;
|
|
10
|
+
jsonValue?: string;
|
|
11
|
+
}>;
|
|
12
|
+
type MoveBlockOptions = CommonEditOptions & Readonly<{
|
|
13
|
+
before?: string;
|
|
14
|
+
after?: string;
|
|
15
|
+
toStart?: boolean;
|
|
16
|
+
toEnd?: boolean;
|
|
17
|
+
}>;
|
|
18
|
+
export type RunContentEditErrorCode = 'missing_file' | 'invalid_json' | 'read_failed';
|
|
19
|
+
export type RunContentEditError = Readonly<{
|
|
20
|
+
code: RunContentEditErrorCode;
|
|
21
|
+
message: string;
|
|
22
|
+
}>;
|
|
23
|
+
export type RunContentEditResult = Readonly<{
|
|
24
|
+
success: true;
|
|
25
|
+
plan: ContentEditPlan;
|
|
26
|
+
filePath: string;
|
|
27
|
+
written: boolean;
|
|
28
|
+
}> | Readonly<{
|
|
29
|
+
success: false;
|
|
30
|
+
plan?: ContentEditPlan;
|
|
31
|
+
filePath: string;
|
|
32
|
+
written: false;
|
|
33
|
+
error?: RunContentEditError;
|
|
34
|
+
}>;
|
|
35
|
+
export declare function runPageContentEdit(input: Readonly<{
|
|
36
|
+
operation: ContentEditOperation;
|
|
37
|
+
contentDir?: string;
|
|
38
|
+
write: boolean;
|
|
39
|
+
output: OutputContext;
|
|
40
|
+
}>): Promise<RunContentEditResult>;
|
|
41
|
+
export declare function parseContentEditValue(options: FieldSetOptions): Readonly<{
|
|
42
|
+
ok: true;
|
|
43
|
+
value: unknown;
|
|
44
|
+
} | {
|
|
45
|
+
ok: false;
|
|
46
|
+
error: string;
|
|
47
|
+
}>;
|
|
48
|
+
export declare function parseMoveTarget(options: MoveBlockOptions): Readonly<{
|
|
49
|
+
ok: true;
|
|
50
|
+
target: PageBlockMoveTarget;
|
|
51
|
+
} | {
|
|
52
|
+
ok: false;
|
|
53
|
+
error: string;
|
|
54
|
+
}>;
|
|
55
|
+
export declare const contentCommand: Command;
|
|
56
|
+
export {};
|
|
@@ -22,4 +22,8 @@ export interface PushOptions {
|
|
|
22
22
|
meta?: boolean;
|
|
23
23
|
/** Show human-readable field-level diff (requires --dry-run) */
|
|
24
24
|
diff?: boolean;
|
|
25
|
+
/** Re-fetch after an applied push and fail if changes remain */
|
|
26
|
+
verifyNoop?: boolean;
|
|
27
|
+
/** Continue event scoped pushes when local media identifiers are missing */
|
|
28
|
+
allowMissingMedia?: boolean;
|
|
25
29
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { LocalContent } from '../../content/reader';
|
|
2
|
+
import type { ContentDiff } from '../../sync';
|
|
3
|
+
import type { EnvTarget } from '../../helpers';
|
|
4
|
+
export type PublishGuidanceEntry = Readonly<{
|
|
5
|
+
contentType: string;
|
|
6
|
+
identifier: string;
|
|
7
|
+
}>;
|
|
8
|
+
export declare function collectUpdatedPublishedEntriesForGuidance(input: Readonly<{
|
|
9
|
+
diff: Pick<ContentDiff, 'entries'>;
|
|
10
|
+
local: Pick<LocalContent, 'entries'>;
|
|
11
|
+
}>): readonly PublishGuidanceEntry[];
|
|
12
|
+
export declare function buildPublishAllSuggestion(input: Readonly<{
|
|
13
|
+
entries: readonly PublishGuidanceEntry[];
|
|
14
|
+
target: EnvTarget;
|
|
15
|
+
}>): string;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { SiteId } from '../../../../../../core/src/index';
|
|
2
|
-
import { type JsonDiffMode } from '../../../sync';
|
|
2
|
+
import { type FieldChange, type JsonDiffMode } from '../../../sync';
|
|
3
3
|
import { type CliDatedOfferingCommandBatchSource, type CliDatedOfferingCommandCompileInput, type DatedOfferingReportSubject, type DatedOfferingUpsertItem } from '../../../site-commands';
|
|
4
4
|
import type { WriterOptions } from '../../../content/writer';
|
|
5
|
+
import type { ContentMetadataTarget } from '../../../content/metadataStore';
|
|
5
6
|
import type { PushScopeResult, ScopePushContext } from './types';
|
|
6
7
|
import type { LocalMediaPushReport } from '../../../media/local-sync';
|
|
7
8
|
type CommandBackedDatedOfferingScopeConfig<TLocal, TRemote> = Readonly<{
|
|
@@ -13,7 +14,7 @@ type CommandBackedDatedOfferingScopeConfig<TLocal, TRemote> = Readonly<{
|
|
|
13
14
|
getDisplayLabel: (item: TLocal) => string;
|
|
14
15
|
shouldPushItem?: (item: TLocal) => boolean;
|
|
15
16
|
readLocal: (contentDir: string) => Promise<TLocal[]>;
|
|
16
|
-
readMeta: (contentDir: string) => Promise<Record<string, {
|
|
17
|
+
readMeta: (contentDir: string, metadataTarget?: ContentMetadataTarget) => Promise<Record<string, {
|
|
17
18
|
updatedAt?: string;
|
|
18
19
|
}> | null>;
|
|
19
20
|
fetchRemote: () => Promise<TRemote[]>;
|
|
@@ -38,11 +39,7 @@ export type DatedOfferingDryRunItem = Readonly<{
|
|
|
38
39
|
identifier: string;
|
|
39
40
|
label: string;
|
|
40
41
|
status: DatedOfferingDryRunItemStatus;
|
|
41
|
-
changes: readonly
|
|
42
|
-
path: string;
|
|
43
|
-
before: unknown;
|
|
44
|
-
after: unknown;
|
|
45
|
-
}>[];
|
|
42
|
+
changes: readonly FieldChange[];
|
|
46
43
|
}>;
|
|
47
44
|
export type DatedOfferingDryRunSummary = Readonly<{
|
|
48
45
|
created: number;
|
|
@@ -5,11 +5,14 @@ import type { SiteId } from '../../../../../../core/src/index';
|
|
|
5
5
|
import type { EnvTarget } from '../../../helpers';
|
|
6
6
|
import type { JsonDiffMode } from '../../../sync';
|
|
7
7
|
import type { LocalMediaPushReport } from '../../../media/local-sync';
|
|
8
|
+
import type { ContentMetadataTarget } from '../../../content/metadataStore';
|
|
9
|
+
export type PushMediaPolicy = 'require' | 'allow-missing';
|
|
8
10
|
export interface ScopePushContext {
|
|
9
11
|
output: OutputContext;
|
|
10
12
|
contentDir: string;
|
|
11
13
|
siteId: SiteId;
|
|
12
14
|
targetEnv: EnvTarget;
|
|
15
|
+
metadataTarget: ContentMetadataTarget;
|
|
13
16
|
client: ManagementClient;
|
|
14
17
|
dryRun: boolean;
|
|
15
18
|
force: boolean;
|
|
@@ -21,6 +24,7 @@ export interface ScopePushContext {
|
|
|
21
24
|
autoPullStale: boolean;
|
|
22
25
|
skipMeta: boolean;
|
|
23
26
|
humanDiff: boolean;
|
|
27
|
+
mediaPolicy: PushMediaPolicy;
|
|
24
28
|
}
|
|
25
29
|
export type PushScopeResultStatus = 'noop' | 'dry-run' | 'aborted' | 'failed' | 'pushed';
|
|
26
30
|
export interface PushScopeItemError {
|
|
@@ -58,7 +62,7 @@ export interface PushScopeConfig<TLocal, TRemote> {
|
|
|
58
62
|
/** Read local items from content directory */
|
|
59
63
|
readLocal: (contentDir: string) => Promise<TLocal[]>;
|
|
60
64
|
/** Read local metadata for stale detection */
|
|
61
|
-
readMeta: (contentDir: string) => Promise<Record<string, {
|
|
65
|
+
readMeta: (contentDir: string, metadataTarget?: ContentMetadataTarget) => Promise<Record<string, {
|
|
62
66
|
updatedAt?: string;
|
|
63
67
|
}> | null>;
|
|
64
68
|
/** Fetch remote items */
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type ContentMetadataTarget } from '../../content/metadataStore';
|
|
1
2
|
import type { OutputContext } from '../../output';
|
|
2
3
|
import type { PulledContent } from '../../../client/management/types';
|
|
3
4
|
import type { StaleItem } from './stale';
|
|
@@ -18,7 +19,7 @@ export declare function resolveStaleOrAbort(opts: {
|
|
|
18
19
|
yes: boolean;
|
|
19
20
|
}): Promise<'resolve' | 'abort'>;
|
|
20
21
|
/**
|
|
21
|
-
* Write only the stale entries/pages/navigation/forms from the already-fetched
|
|
22
|
+
* Write only the stale entries/pages/navigation/forms/settings from the already-fetched
|
|
22
23
|
* remoteContent to disk and update their metadata. Non-stale local content is
|
|
23
24
|
* preserved — we only touch the specific items identified as stale.
|
|
24
25
|
*
|
|
@@ -29,14 +30,19 @@ export declare function resolveStaleOrAbort(opts: {
|
|
|
29
30
|
*/
|
|
30
31
|
export declare function writeStaleItems(contentDir: string, remoteContent: PulledContent, staleItems: StaleItem[], output: OutputContext, options?: {
|
|
31
32
|
skipMeta?: boolean;
|
|
33
|
+
metadataTarget?: ContentMetadataTarget;
|
|
32
34
|
}): Promise<void>;
|
|
33
35
|
/**
|
|
34
36
|
* Update only the theme metadata timestamp without touching the theme content file.
|
|
35
37
|
* Used when the local theme IS the content being pushed — we just need to acknowledge
|
|
36
38
|
* the remote is newer so stale detection passes on the next push.
|
|
37
39
|
*/
|
|
38
|
-
export declare function updateStaleThemeMeta(contentDir: string, themeName: string, remoteUpdatedAt: string
|
|
40
|
+
export declare function updateStaleThemeMeta(contentDir: string, themeName: string, remoteUpdatedAt: string, options?: {
|
|
41
|
+
metadataTarget?: ContentMetadataTarget;
|
|
42
|
+
}): Promise<void>;
|
|
39
43
|
/**
|
|
40
44
|
* Update only the footer metadata timestamp without touching the footer content file.
|
|
41
45
|
*/
|
|
42
|
-
export declare function updateStaleFooterMeta(contentDir: string, remoteUpdatedAt: string
|
|
46
|
+
export declare function updateStaleFooterMeta(contentDir: string, remoteUpdatedAt: string, options?: {
|
|
47
|
+
metadataTarget?: ContentMetadataTarget;
|
|
48
|
+
}): Promise<void>;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import type { EnvTarget } from '../../helpers';
|
|
2
|
+
import type { OutputContext } from '../../output';
|
|
3
|
+
import type { PushOptions } from './options';
|
|
4
|
+
import { type PushScope } from './consts';
|
|
5
|
+
export type PushVerificationStatus = 'clean' | 'dirty' | 'fetch_failed' | 'unsupported_scope';
|
|
6
|
+
export type PushVerificationDirtyScope = Readonly<{
|
|
7
|
+
scope: string;
|
|
8
|
+
summary: Readonly<Record<string, number>>;
|
|
9
|
+
}>;
|
|
10
|
+
export type PushVerificationResult = Readonly<{
|
|
11
|
+
status: 'clean';
|
|
12
|
+
target: EnvTarget;
|
|
13
|
+
}> | Readonly<{
|
|
14
|
+
status: 'dirty';
|
|
15
|
+
target: EnvTarget;
|
|
16
|
+
dirtyScopes: readonly PushVerificationDirtyScope[];
|
|
17
|
+
}> | Readonly<{
|
|
18
|
+
status: 'fetch_failed';
|
|
19
|
+
target: EnvTarget;
|
|
20
|
+
error: string;
|
|
21
|
+
}> | Readonly<{
|
|
22
|
+
status: 'unsupported_scope';
|
|
23
|
+
target: EnvTarget;
|
|
24
|
+
scope: string;
|
|
25
|
+
}>;
|
|
26
|
+
export type PushVerificationInput = Readonly<{
|
|
27
|
+
target: EnvTarget;
|
|
28
|
+
scope: string | undefined;
|
|
29
|
+
type: string | undefined;
|
|
30
|
+
identifier: string | undefined;
|
|
31
|
+
options: PushOptions;
|
|
32
|
+
}>;
|
|
33
|
+
export type PushVerificationDeps = Readonly<{
|
|
34
|
+
verifyGeneric: (input: PushVerificationInput & {
|
|
35
|
+
pushScope: PushScope;
|
|
36
|
+
}) => Promise<readonly PushVerificationDirtyScope[]>;
|
|
37
|
+
verifyDatedOffering: (input: PushVerificationInput & {
|
|
38
|
+
pushScope: 'venues' | 'event-categories' | 'events' | 'courses';
|
|
39
|
+
}) => Promise<readonly PushVerificationDirtyScope[]>;
|
|
40
|
+
}>;
|
|
41
|
+
export declare function collectDatedOfferingVerificationOrphans<TLocal, TRemote>(input: Readonly<{
|
|
42
|
+
deleteOrphaned: boolean;
|
|
43
|
+
hasScopedSelector: boolean;
|
|
44
|
+
allLocalItems: readonly TLocal[];
|
|
45
|
+
remoteItems: readonly TRemote[];
|
|
46
|
+
getLocalIdentifier: (item: TLocal) => string;
|
|
47
|
+
getRemoteIdentifier: (item: TRemote) => string;
|
|
48
|
+
}>): readonly string[];
|
|
49
|
+
export declare function verifyGenericPushNoop(input: PushVerificationInput & {
|
|
50
|
+
pushScope: PushScope;
|
|
51
|
+
}): Promise<readonly PushVerificationDirtyScope[]>;
|
|
52
|
+
export declare function createProductionPushVerificationDeps(): PushVerificationDeps;
|
|
53
|
+
export declare function verifyPushNoopForEnvWithDeps(deps: PushVerificationDeps, input: PushVerificationInput): Promise<PushVerificationResult>;
|
|
54
|
+
export declare function verifyPushNoopForEnv(input: PushVerificationInput): Promise<PushVerificationResult>;
|
|
55
|
+
export declare function isPushVerificationClean(result: PushVerificationResult): boolean;
|
|
56
|
+
export declare function emitPushVerificationResult(output: OutputContext, result: PushVerificationResult, jsonOutput: boolean): void;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { PushScope } from './consts';
|
|
2
|
+
export type PushWorkflowStep = Readonly<{
|
|
3
|
+
tag: 'config';
|
|
4
|
+
mode: 'apply';
|
|
5
|
+
}> | Readonly<{
|
|
6
|
+
tag: 'content';
|
|
7
|
+
}>;
|
|
8
|
+
export type PushWorkflowPreContentStep = Extract<PushWorkflowStep, {
|
|
9
|
+
tag: 'config';
|
|
10
|
+
}>;
|
|
11
|
+
export type PushWorkflowPlan = Readonly<{
|
|
12
|
+
steps: readonly PushWorkflowStep[];
|
|
13
|
+
warnings: readonly PushWorkflowWarning[];
|
|
14
|
+
}>;
|
|
15
|
+
export type PushWorkflowWarning = Readonly<{
|
|
16
|
+
tag: 'with_config_ignored_for_scope';
|
|
17
|
+
pushScope: PushScope;
|
|
18
|
+
}>;
|
|
19
|
+
export type PlanPushWorkflowInput = Readonly<{
|
|
20
|
+
pushScope: PushScope;
|
|
21
|
+
withConfig: boolean;
|
|
22
|
+
dryRun: boolean;
|
|
23
|
+
}>;
|
|
24
|
+
export declare function planPushWorkflow(input: PlanPushWorkflowInput): PushWorkflowPlan;
|
|
25
|
+
export declare function shouldApplyConfigBeforeContent(plan: PushWorkflowPlan): boolean;
|
|
26
|
+
export declare function preContentWorkflowSteps(plan: PushWorkflowPlan): readonly PushWorkflowPreContentStep[];
|
|
27
|
+
export type PushWorkflowPreContentHandlers = Readonly<{
|
|
28
|
+
[TStep in PushWorkflowPreContentStep as TStep['tag']]: (step: TStep) => Promise<boolean>;
|
|
29
|
+
}>;
|
|
30
|
+
export declare function runPushWorkflowPreContentSteps(plan: PushWorkflowPlan, handlers: PushWorkflowPreContentHandlers): Promise<Readonly<{
|
|
31
|
+
success: true;
|
|
32
|
+
}> | Readonly<{
|
|
33
|
+
success: false;
|
|
34
|
+
}>>;
|
|
@@ -28,7 +28,8 @@ type MergeRemoteValidationError = Readonly<{
|
|
|
28
28
|
suggestion: string;
|
|
29
29
|
}>;
|
|
30
30
|
}>;
|
|
31
|
-
export declare function
|
|
31
|
+
export declare function validateMergeRemotePushOptions(input: MergeRemoteValidationInput): MergeRemoteValidationError | null;
|
|
32
|
+
export declare const validateMergeRemoteEntryPushOptions: typeof validateMergeRemotePushOptions;
|
|
32
33
|
/**
|
|
33
34
|
* Execute push for a single environment.
|
|
34
35
|
* Extracted to support --env=both multi-environment operations.
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* Loads riverbank.config.ts and extracts CLI-relevant configuration
|
|
5
5
|
* (contentDir and sync settings) with appropriate defaults.
|
|
6
6
|
*/
|
|
7
|
+
import type { EnvTarget } from './helpers';
|
|
7
8
|
import type { SyncConfig, BlockFieldExtensionsMap, SdkCustomBlock } from '../config/types';
|
|
8
9
|
/**
|
|
9
10
|
* Loaded CLI configuration with defaults applied.
|
|
@@ -36,6 +37,7 @@ export interface LoadedCliConfig {
|
|
|
36
37
|
* ```
|
|
37
38
|
*/
|
|
38
39
|
export declare function loadCliConfig(configPath?: string): Promise<LoadedCliConfig>;
|
|
40
|
+
export declare function loadCliConfigForEnv(target: EnvTarget, configPath?: string): Promise<LoadedCliConfig>;
|
|
39
41
|
/**
|
|
40
42
|
* Check if a CLI config file exists.
|
|
41
43
|
*
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type FieldPathSegment } from '../../sync/field-diff';
|
|
2
|
+
export type ContentFieldPathSegment = Extract<FieldPathSegment, Readonly<{
|
|
3
|
+
type: 'property' | 'index';
|
|
4
|
+
}>>;
|
|
5
|
+
export type ContentFieldPath = readonly ContentFieldPathSegment[];
|
|
6
|
+
export type ParseContentFieldPathResult = Readonly<{
|
|
7
|
+
ok: true;
|
|
8
|
+
path: ContentFieldPath;
|
|
9
|
+
}> | Readonly<{
|
|
10
|
+
ok: false;
|
|
11
|
+
error: string;
|
|
12
|
+
}>;
|
|
13
|
+
export declare function parseContentFieldPath(value: string): ParseContentFieldPathResult;
|
|
14
|
+
export declare function formatContentFieldPath(path: ContentFieldPath): string;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { LocalPage } from '../reader';
|
|
2
|
+
import { type FieldChange } from '../../sync/field-diff';
|
|
3
|
+
import { type ContentFieldPath } from './path';
|
|
4
|
+
export type PageBlockMoveTarget = Readonly<{
|
|
5
|
+
tag: 'to_start';
|
|
6
|
+
}> | Readonly<{
|
|
7
|
+
tag: 'to_end';
|
|
8
|
+
}> | Readonly<{
|
|
9
|
+
tag: 'before';
|
|
10
|
+
blockIdentifier: string;
|
|
11
|
+
}> | Readonly<{
|
|
12
|
+
tag: 'after';
|
|
13
|
+
blockIdentifier: string;
|
|
14
|
+
}>;
|
|
15
|
+
export type ContentEditOperation = Readonly<{
|
|
16
|
+
tag: 'remove_page_block';
|
|
17
|
+
pageIdentifier: string;
|
|
18
|
+
blockIdentifier: string;
|
|
19
|
+
}> | Readonly<{
|
|
20
|
+
tag: 'move_page_block';
|
|
21
|
+
pageIdentifier: string;
|
|
22
|
+
blockIdentifier: string;
|
|
23
|
+
target: PageBlockMoveTarget;
|
|
24
|
+
}> | Readonly<{
|
|
25
|
+
tag: 'update_page_field';
|
|
26
|
+
pageIdentifier: string;
|
|
27
|
+
path: ContentFieldPath;
|
|
28
|
+
value: unknown;
|
|
29
|
+
}>;
|
|
30
|
+
export type ContentEditErrorCode = 'wrong_page' | 'missing_blocks' | 'missing_block' | 'duplicate_block_identifier' | 'missing_move_target' | 'move_target_is_source' | 'invalid_field_path' | 'noop';
|
|
31
|
+
export type ContentEditError = Readonly<{
|
|
32
|
+
code: ContentEditErrorCode;
|
|
33
|
+
message: string;
|
|
34
|
+
}>;
|
|
35
|
+
export type ContentEditPlan = Readonly<{
|
|
36
|
+
tag: 'will_change';
|
|
37
|
+
operation: ContentEditOperation;
|
|
38
|
+
before: LocalPage;
|
|
39
|
+
after: LocalPage;
|
|
40
|
+
changes: readonly FieldChange[];
|
|
41
|
+
}> | Readonly<{
|
|
42
|
+
tag: 'invalid';
|
|
43
|
+
operation: ContentEditOperation;
|
|
44
|
+
error: ContentEditError;
|
|
45
|
+
}>;
|
|
46
|
+
export declare function planPageContentEdit(page: LocalPage, operation: ContentEditOperation): ContentEditPlan;
|
|
@@ -29,6 +29,10 @@ export declare function readJsonFile<T>(filePath: string): Promise<T>;
|
|
|
29
29
|
* Write JSON file with pretty formatting
|
|
30
30
|
*/
|
|
31
31
|
export declare function writeJsonFile(filePath: string, data: unknown): Promise<void>;
|
|
32
|
+
/**
|
|
33
|
+
* Write JSON file via a same-directory temp file and atomic rename.
|
|
34
|
+
*/
|
|
35
|
+
export declare function writeJsonFileAtomic(filePath: string, data: unknown): Promise<void>;
|
|
32
36
|
/**
|
|
33
37
|
* Ensure directory exists, creating it if necessary
|
|
34
38
|
*/
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { SdkEnvironment } from '../env';
|
|
2
|
+
export type ContentMetadataEnv = 'local' | 'remote';
|
|
3
|
+
export type ContentMetadataTarget = Readonly<{
|
|
4
|
+
env: ContentMetadataEnv;
|
|
5
|
+
siteId: string;
|
|
6
|
+
dashboardUrl: string;
|
|
7
|
+
}>;
|
|
8
|
+
export type ContentMetadataReadPath = Readonly<{
|
|
9
|
+
path: string;
|
|
10
|
+
source: 'scoped' | 'legacy';
|
|
11
|
+
}>;
|
|
12
|
+
export declare function metadataTargetFromEnvironment(env: ContentMetadataEnv, environment: Pick<SdkEnvironment, 'siteId' | 'dashboardUrl'>): ContentMetadataTarget;
|
|
13
|
+
export declare function legacyMetadataDir(contentDir: string): string;
|
|
14
|
+
export declare function scopedMetadataDir(contentDir: string, target: ContentMetadataTarget): string;
|
|
15
|
+
export declare function metadataFilePath(contentDir: string, fileName: string, target?: ContentMetadataTarget): string;
|
|
16
|
+
export declare function legacyMetadataFilePath(contentDir: string, fileName: string): string;
|
|
17
|
+
export declare function ensureMetadataDir(contentDir: string, target?: ContentMetadataTarget): Promise<string>;
|
|
18
|
+
export declare function writeMetadataFile(contentDir: string, fileName: string, value: unknown, target?: ContentMetadataTarget): Promise<string>;
|
|
19
|
+
export declare function readMetadataFile<T>(contentDir: string, fileName: string, target?: ContentMetadataTarget): Promise<T | null>;
|
|
20
|
+
export declare function listMetadataFiles(contentDir: string, target?: ContentMetadataTarget): Promise<string[]>;
|
|
21
|
+
export declare function writeMetadataRecordMap<TRecord>(contentDir: string, fileName: string, recordKey: string, next: Readonly<{
|
|
22
|
+
pulledAt: string;
|
|
23
|
+
records: Readonly<Record<string, TRecord>>;
|
|
24
|
+
extra?: Readonly<Record<string, unknown>>;
|
|
25
|
+
}>, options?: Readonly<{
|
|
26
|
+
mode?: 'replace' | 'merge';
|
|
27
|
+
target?: ContentMetadataTarget;
|
|
28
|
+
}>): Promise<string>;
|
|
29
|
+
export declare function resolveMetadataReadPath(contentDir: string, fileName: string, target?: ContentMetadataTarget): Promise<ContentMetadataReadPath | null>;
|