@riverbankcms/sdk 0.67.0 → 0.68.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 +21 -11
- package/dist/_dts/api/src/aiPlayground.d.ts +62 -14
- package/dist/_dts/api/src/billing.d.ts +7 -40
- package/dist/_dts/api/src/bookingManagementEndpoints.d.ts +4 -1
- package/dist/_dts/api/src/bookingOperations.d.ts +32 -1
- package/dist/_dts/api/src/endpoints.d.ts +7 -0
- package/dist/_dts/api/src/public/types.d.ts +1 -1
- package/dist/_dts/billing/src/components/index.d.ts +426 -0
- package/dist/_dts/blocks/src/PageRenderer.d.ts +4 -0
- package/dist/_dts/blocks/src/client.d.ts +6 -0
- package/dist/_dts/blocks/src/system/runtime/hooks/useAvailableDates.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/hooks/useAvailableSlots.d.ts +3 -1
- package/dist/_dts/blocks/src/system/runtime/hooks/useHeadlessBookingFlow.d.ts +140 -0
- package/dist/_dts/blocks/src/system/runtime/hooks/useHeadlessBookingFlow.state.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/hooks/useVisibleTabPolling.d.ts +10 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.default-ui.d.ts +8 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.headless.state.d.ts +484 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.state.d.ts +5 -2
- package/dist/_dts/sdk/src/bookings/index.d.ts +5 -2
- package/dist/_dts/sdk/src/bookings/types.d.ts +2 -0
- package/dist/_dts/sdk/src/cli/commands/push/scopes/commandBackedDatedOfferingScope.d.ts +32 -0
- package/dist/_dts/sdk/src/cli/commands/push/scopes/types.d.ts +5 -1
- package/dist/_dts/sdk/src/cli/site-commands/commandRuntime.d.ts +41 -11
- package/dist/_dts/sdk/src/cli/site-commands/commandRuntimeCompat.d.ts +21 -0
- package/dist/_dts/sdk/src/cli/site-commands/commandSurfaceDispatch.d.ts +27 -0
- package/dist/_dts/sdk/src/cli/site-commands/datedOfferingCommands.d.ts +56 -0
- package/dist/_dts/sdk/src/cli/site-commands/entryCommands.d.ts +3 -1
- package/dist/_dts/sdk/src/cli/site-commands/footerCommands.d.ts +7 -1
- package/dist/_dts/sdk/src/cli/site-commands/formCommands.d.ts +4 -8
- package/dist/_dts/sdk/src/cli/site-commands/index.d.ts +1 -0
- package/dist/_dts/sdk/src/cli/site-commands/navigationCommands.d.ts +4 -8
- package/dist/_dts/sdk/src/cli/site-commands/pageCommands.d.ts +4 -8
- package/dist/_dts/sdk/src/cli/site-commands/pushExecution.d.ts +14 -68
- package/dist/_dts/sdk/src/cli/site-commands/pushExecutionPlan.d.ts +8 -0
- package/dist/_dts/sdk/src/cli/site-commands/pushExecutionTypes.d.ts +97 -0
- package/dist/_dts/sdk/src/cli/site-commands/residualSettingsTrimming.d.ts +15 -0
- package/dist/_dts/sdk/src/cli/sync/index.d.ts +1 -0
- package/dist/_dts/sdk/src/cli/sync/syncResultAggregation.d.ts +4 -0
- package/dist/_dts/sdk/src/rendering/overrides.d.ts +2 -0
- package/dist/_dts/sdk/src/theme-bridge/ThemeBridgeProvider.d.ts +4 -4
- package/dist/_dts/sdk/src/theme-bridge/generateCssVars.d.ts +4 -12
- package/dist/_dts/sdk/src/theme-bridge/index.d.ts +1 -1
- package/dist/_dts/sdk/src/theme-bridge/types.d.ts +17 -9
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/_dts/site-commands/src/commands.d.ts +228 -1
- package/dist/_dts/site-commands/src/domain.d.ts +1 -1
- package/dist/_dts/site-commands/src/index.d.ts +1 -0
- package/dist/_dts/site-commands/src/metadata.d.ts +66 -1
- package/dist/_dts/site-commands/src/refContributions.d.ts +1 -0
- package/dist/_dts/site-commands/src/refs.d.ts +7 -1
- package/dist/_dts/{sdk/src/cli/merge-remote → site-commands/src}/stableJson.d.ts +2 -0
- package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
- package/dist/_dts/theme-core/src/index.d.ts +1 -1
- package/dist/_dts/theme-core/src/runtime/buildThemeRuntimeFromBridge.d.ts +30 -23
- package/dist/cli/index.mjs +1699 -766
- package/dist/client/bookings.mjs +5107 -3348
- package/dist/client/client.mjs +4004 -3522
- package/dist/client/hooks.mjs +14 -0
- package/dist/client/rendering/client.mjs +4185 -3721
- package/dist/client/rendering/islands.mjs +4317 -3853
- package/dist/client/rendering.mjs +4076 -3592
- package/dist/preview-next/before-render.mjs +14 -0
- package/dist/preview-next/client/runtime.mjs +2770 -2268
- package/dist/preview-next/middleware.mjs +14 -0
- package/dist/server/components.mjs +172 -58
- package/dist/server/config-validation.mjs +14 -0
- package/dist/server/config.mjs +14 -0
- package/dist/server/data.mjs +14 -0
- package/dist/server/index.mjs +15 -1
- package/dist/server/next.mjs +166 -52
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +174 -58
- package/dist/server/rendering.mjs +174 -58
- package/dist/server/routing.mjs +14 -0
- package/dist/server/server.mjs +15 -1
- package/dist/server/theme-bridge.mjs +1247 -4825
- package/dist/styles/index.css +38 -38
- package/package.json +1 -1
- package/dist/_dts/blocks/src/system/runtime/components/booking/DateTimeSelectionStep.d.ts +0 -18
- package/dist/_dts/blocks/src/system/runtime/components/booking/PaymentOptionSelectionStep.d.ts +0 -9
- package/dist/_dts/blocks/src/system/runtime/components/booking/ServiceResourceSelector.d.ts +0 -44
- package/dist/_dts/blocks/src/system/runtime/components/booking/ServiceResourceSelector.state.d.ts +0 -23
- package/dist/_dts/blocks/src/system/runtime/components/booking/ServiceSelectionStep.d.ts +0 -18
- package/dist/_dts/blocks/src/system/runtime/components/booking/slotDisplay.d.ts +0 -2
- package/dist/_dts/blocks/src/system/runtime/components/multi-step/MultiStepForm.d.ts +0 -21
- package/dist/_dts/blocks/src/system/runtime/components/multi-step/useMultiStep.d.ts +0 -15
- package/dist/_dts/blocks/src/system/runtime/components/multi-step/useMultiStep.state.d.ts +0 -51
- package/dist/_dts/blocks/src/system/runtime/hooks/useBookingSteps.d.ts +0 -22
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type SyncResult } from '../sync';
|
|
2
|
+
import { type CliCommandExecutionReport } from './commandRuntime';
|
|
3
|
+
export declare function commandReportToSyncResult<TSubject>(input: Readonly<{
|
|
4
|
+
report: CliCommandExecutionReport<TSubject>;
|
|
5
|
+
incrementSuccess: (result: SyncResult, subject: TSubject) => void;
|
|
6
|
+
recordFailure: (result: SyncResult, identifier: string, message: string, subject: TSubject | undefined) => void;
|
|
7
|
+
}>): SyncResult;
|
|
8
|
+
export declare function executeCompiledCliCommandPlanAsSyncResult<TCompiledPlan extends Readonly<{
|
|
9
|
+
plan: Readonly<{
|
|
10
|
+
commands: readonly unknown[];
|
|
11
|
+
}>;
|
|
12
|
+
}>, TExecutionResult, TSubject>(input: Readonly<{
|
|
13
|
+
compiledPlan: TCompiledPlan;
|
|
14
|
+
onBeforeExecute?: (commandCount: number) => void;
|
|
15
|
+
executePlan: (plan: TCompiledPlan['plan']) => Promise<TExecutionResult>;
|
|
16
|
+
executionToReport: (input: Readonly<{
|
|
17
|
+
execution: TExecutionResult;
|
|
18
|
+
compiledPlan: TCompiledPlan;
|
|
19
|
+
}>) => CliCommandExecutionReport<TSubject>;
|
|
20
|
+
reportToSyncResult: (report: CliCommandExecutionReport<TSubject>) => SyncResult;
|
|
21
|
+
}>): Promise<SyncResult>;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { type Result, type SiteId } from '@riverbankcms/core';
|
|
2
|
+
import type { ManagementClient } from '../../client/management/types';
|
|
3
|
+
import type { LocalContent } from '../content/reader';
|
|
4
|
+
import type { EnvTarget } from '../helpers';
|
|
5
|
+
import type { ContentDiff, SyncResult } from '../sync';
|
|
6
|
+
import { compilePagePushCommands } from './pageCommands';
|
|
7
|
+
import type { CommandSurface, CommandSurfaceCompileResult, CommandSurfaceCompileSuccess, CommandSurfaceExecutionReport, CompiledContentPushExecutionPlan, CompiledContentPushExecutionStep, ContentPushExecutionPlan, ContentPushExecutionReport } from './pushExecutionTypes';
|
|
8
|
+
export type CommandSurfaceDispatchInput = Readonly<{
|
|
9
|
+
siteId: SiteId;
|
|
10
|
+
target: EnvTarget;
|
|
11
|
+
diff: ContentDiff;
|
|
12
|
+
local: LocalContent;
|
|
13
|
+
client: ManagementClient;
|
|
14
|
+
blockFieldExtensions: Parameters<typeof compilePagePushCommands>[0]['blockFieldExtensions'];
|
|
15
|
+
onEntryCommandCount?: (commandCount: number) => void;
|
|
16
|
+
onFormCommandCount?: (commandCount: number) => void;
|
|
17
|
+
onNavigationCommandCount?: (commandCount: number) => void;
|
|
18
|
+
onPageCommandCount?: (commandCount: number) => void;
|
|
19
|
+
}>;
|
|
20
|
+
export type CommandSurfaceDispatchDependencies = Readonly<{
|
|
21
|
+
compileCommandSurface?: (surface: CommandSurface, input: CommandSurfaceDispatchInput) => CommandSurfaceCompileResult;
|
|
22
|
+
executeCommandSurfaceAsReport?: (surface: CommandSurfaceCompileSuccess, input: CommandSurfaceDispatchInput) => Promise<CommandSurfaceExecutionReport>;
|
|
23
|
+
}>;
|
|
24
|
+
export declare function compileContentPushExecutionPlan(plan: ContentPushExecutionPlan, input: CommandSurfaceDispatchInput, dependencies?: CommandSurfaceDispatchDependencies): Result<CompiledContentPushExecutionPlan, ContentPushExecutionReport>;
|
|
25
|
+
export declare function executeCommandSurfaceAsReport(surface: CommandSurfaceCompileSuccess, input: CommandSurfaceDispatchInput): Promise<CommandSurfaceExecutionReport>;
|
|
26
|
+
export declare function skippedRemainingCommandReports(steps: readonly CompiledContentPushExecutionStep[]): CommandSurfaceExecutionReport[];
|
|
27
|
+
export declare function commandSurfaceReportToSyncResult(report: CommandSurfaceExecutionReport): SyncResult;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { type Result, type SiteId } from '@riverbankcms/core';
|
|
2
|
+
import type { ManagementClient } from '../../client/management/types';
|
|
3
|
+
import type { LocalCourse, LocalEvent, LocalEventCategory, LocalVenue } from '../content/reader';
|
|
4
|
+
import type { EnvTarget } from '../helpers';
|
|
5
|
+
import type { PushScopeResult } from '../commands/push/scopes/types';
|
|
6
|
+
import { type CliCommandCompileBatchSuccessWithReports, type CliCommandValidationCompileError } from './commandRuntime';
|
|
7
|
+
export type CliDatedOfferingCommandBatchSource = 'push_venues' | 'push_event_categories' | 'push_events' | 'push_courses' | 'push_all_dated_offerings';
|
|
8
|
+
export type DatedOfferingSiteCommandType = 'upsertVenue' | 'deleteVenue' | 'upsertEventCategory' | 'deleteEventCategory' | 'upsertEventSeries' | 'deleteEventSeries' | 'upsertCourse' | 'deleteCourse';
|
|
9
|
+
type DatedOfferingCounter = 'created' | 'updated' | 'deleted';
|
|
10
|
+
export type DatedOfferingReportSubject = Readonly<{
|
|
11
|
+
scopeCommand: 'venues' | 'event-categories' | 'events' | 'courses';
|
|
12
|
+
scopeName: string;
|
|
13
|
+
itemLabelSingular: string;
|
|
14
|
+
identifier: string;
|
|
15
|
+
counter: DatedOfferingCounter;
|
|
16
|
+
}>;
|
|
17
|
+
export type CliDatedOfferingCommandCompileError = Readonly<{
|
|
18
|
+
code: 'unsupported_local_shape';
|
|
19
|
+
identifier: string;
|
|
20
|
+
message: string;
|
|
21
|
+
}> | CliCommandValidationCompileError;
|
|
22
|
+
export type CliDatedOfferingCommandCompileInput = Readonly<{
|
|
23
|
+
source: CliDatedOfferingCommandBatchSource;
|
|
24
|
+
siteId: SiteId;
|
|
25
|
+
targetEnv: EnvTarget;
|
|
26
|
+
venues?: DatedOfferingUpsertInput<LocalVenue>;
|
|
27
|
+
eventCategories?: DatedOfferingUpsertInput<LocalEventCategory>;
|
|
28
|
+
events?: DatedOfferingUpsertInput<LocalEvent>;
|
|
29
|
+
courses?: DatedOfferingUpsertInput<LocalCourse>;
|
|
30
|
+
delete?: DatedOfferingDeleteInput;
|
|
31
|
+
}>;
|
|
32
|
+
export type DatedOfferingUpsertInput<TItem> = Readonly<{
|
|
33
|
+
items: readonly DatedOfferingUpsertItem<TItem>[];
|
|
34
|
+
}>;
|
|
35
|
+
export type DatedOfferingUpsertItem<TItem> = Readonly<{
|
|
36
|
+
item: TItem;
|
|
37
|
+
exists: boolean;
|
|
38
|
+
}>;
|
|
39
|
+
export type DatedOfferingDeleteInput = Readonly<{
|
|
40
|
+
venues?: readonly string[];
|
|
41
|
+
eventCategories?: readonly string[];
|
|
42
|
+
events?: readonly string[];
|
|
43
|
+
courses?: readonly string[];
|
|
44
|
+
}>;
|
|
45
|
+
export type CliDatedOfferingCommandCompileSuccess = CliCommandCompileBatchSuccessWithReports<DatedOfferingSiteCommandType, DatedOfferingReportSubject>;
|
|
46
|
+
export declare const datedOfferingSiteCommandTypes: readonly ["upsertVenue", "deleteVenue", "upsertEventCategory", "deleteEventCategory", "upsertEventSeries", "deleteEventSeries", "upsertCourse", "deleteCourse"];
|
|
47
|
+
export declare function compileDatedOfferingPushCommands(input: CliDatedOfferingCommandCompileInput): Result<CliDatedOfferingCommandCompileSuccess, CliDatedOfferingCommandCompileError>;
|
|
48
|
+
export declare function executeDatedOfferingCommandPlanAsPushScopeResult(input: Readonly<{
|
|
49
|
+
client: Pick<ManagementClient, 'venues' | 'eventCategories' | 'events' | 'courses'>;
|
|
50
|
+
compiledPlan: CliDatedOfferingCommandCompileSuccess;
|
|
51
|
+
scopeCommand: DatedOfferingReportSubject['scopeCommand'];
|
|
52
|
+
scopeName: string;
|
|
53
|
+
}>): Promise<PushScopeResult>;
|
|
54
|
+
export declare function syncResultForDatedOfferingCommandCompileError(error: CliDatedOfferingCommandCompileError, scopeCommand: DatedOfferingReportSubject['scopeCommand'], scopeName: string): PushScopeResult;
|
|
55
|
+
export declare function courseSessionConflictMessage(error: unknown): string;
|
|
56
|
+
export {};
|
|
@@ -4,7 +4,7 @@ import type { ManagementClient } from '../../client/management/types';
|
|
|
4
4
|
import type { LocalContent } from '../content/reader';
|
|
5
5
|
import type { EnvTarget } from '../helpers';
|
|
6
6
|
import type { ContentDiff } from '../sync/diff';
|
|
7
|
-
import {
|
|
7
|
+
import type { SyncResult } from '../sync';
|
|
8
8
|
import { type CliContentTypeKey, type CliEntryIdentifier } from './commandKeys';
|
|
9
9
|
import { type CliCommandCompileBatchSuccessWithReports, type CliCommandValidationCompileError, type CliCommandExecutionError, type CliCommandExecutionReport, type CliCommandExecutionResult } from './commandRuntime';
|
|
10
10
|
export type CliEntryCommandBatchSource = 'push_entries' | 'merge_remote_entries';
|
|
@@ -49,7 +49,9 @@ export declare function executeEntryCommandPlan(input: Readonly<{
|
|
|
49
49
|
plan: Pick<EntrySiteCommandPlan, 'commands'>;
|
|
50
50
|
}>): Promise<CliEntryCommandExecutionResult>;
|
|
51
51
|
export declare function executeEntryCommandPlanAsSyncResult(input: CliEntryCommandSyncInput): Promise<SyncResult>;
|
|
52
|
+
export declare function executeEntryCommandPlanAsReport(input: CliEntryCommandSyncInput): Promise<EntryCommandExecutionReport>;
|
|
52
53
|
export declare function syncResultForEntryCommandCompileError(error: CliCommandCompileError): SyncResult;
|
|
54
|
+
export declare function entryCommandCompileErrorToReport(error: CliCommandCompileError): EntryCommandExecutionReport;
|
|
53
55
|
export declare function entryCommandExecutionToSyncResult(input: Readonly<{
|
|
54
56
|
execution: CliEntryCommandExecutionResult;
|
|
55
57
|
compiledPlan: EntryCommandCompiledPlan;
|
|
@@ -4,7 +4,7 @@ import type { ManagementClient } from '../../client/management/types';
|
|
|
4
4
|
import type { LocalFooterContent } from '../content/reader';
|
|
5
5
|
import type { EnvTarget } from '../helpers';
|
|
6
6
|
import type { FooterDiff } from '../sync/diff';
|
|
7
|
-
import {
|
|
7
|
+
import type { SyncResult } from '../sync';
|
|
8
8
|
import { type CliCommandCompileBatchSuccessWithReports, type CliCommandExecutionError, type CliCommandExecutionReport, type CliCommandExecutionResult, type CliCommandValidationCompileError } from './commandRuntime';
|
|
9
9
|
export type CliFooterCommandBatchSource = 'push_footer';
|
|
10
10
|
export type CliFooterCommandCompileError = CliCommandValidationCompileError;
|
|
@@ -37,7 +37,13 @@ export declare function executeFooterCommandPlanAsSyncResult(input: Readonly<{
|
|
|
37
37
|
compiledPlan: FooterCommandCompiledPlan;
|
|
38
38
|
onBeforeExecute?: (commandCount: number) => void;
|
|
39
39
|
}>): Promise<SyncResult>;
|
|
40
|
+
export declare function executeFooterCommandPlanAsReport(input: Readonly<{
|
|
41
|
+
client: Pick<ManagementClient, 'footer'>;
|
|
42
|
+
compiledPlan: FooterCommandCompiledPlan;
|
|
43
|
+
onBeforeExecute?: (commandCount: number) => void;
|
|
44
|
+
}>): Promise<FooterCommandExecutionReport>;
|
|
40
45
|
export declare function syncResultForFooterCommandCompileError(error: CliFooterCommandCompileError): SyncResult;
|
|
46
|
+
export declare function footerCommandCompileErrorToReport(error: CliFooterCommandCompileError): FooterCommandExecutionReport;
|
|
41
47
|
export declare function footerCommandExecutionToSyncResult(input: Readonly<{
|
|
42
48
|
execution: CliFooterCommandExecutionResult;
|
|
43
49
|
compiledPlan: FooterCommandCompiledPlan;
|
|
@@ -4,7 +4,7 @@ import type { ManagementClient } from '../../client/management/types';
|
|
|
4
4
|
import type { LocalContent } from '../content/reader';
|
|
5
5
|
import type { EnvTarget } from '../helpers';
|
|
6
6
|
import type { ContentDiff } from '../sync/diff';
|
|
7
|
-
import {
|
|
7
|
+
import type { SyncResult } from '../sync';
|
|
8
8
|
import { type CliFormSlug } from './commandKeys';
|
|
9
9
|
import { type CliCommandCompileBatchSuccessWithReports, type CliCommandExecutionError, type CliCommandExecutionReport, type CliCommandExecutionResult, type CliCommandValidationCompileError } from './commandRuntime';
|
|
10
10
|
export type CliFormCommandBatchSource = 'push_forms';
|
|
@@ -39,16 +39,12 @@ export declare function executeFormCommandPlan(input: Readonly<{
|
|
|
39
39
|
client: Pick<ManagementClient, 'forms'>;
|
|
40
40
|
plan: Pick<FormSiteCommandPlan, 'commands'>;
|
|
41
41
|
}>): Promise<CliFormCommandExecutionResult>;
|
|
42
|
-
export declare function
|
|
42
|
+
export declare function executeFormCommandPlanAsReport(input: Readonly<{
|
|
43
43
|
client: Pick<ManagementClient, 'forms'>;
|
|
44
44
|
compiledPlan: FormCommandCompiledPlan;
|
|
45
45
|
onBeforeExecute?: (commandCount: number) => void;
|
|
46
|
-
}>): Promise<
|
|
47
|
-
export declare function
|
|
48
|
-
export declare function formCommandExecutionToSyncResult(input: Readonly<{
|
|
49
|
-
execution: CliFormCommandExecutionResult;
|
|
50
|
-
compiledPlan: FormCommandCompiledPlan;
|
|
51
|
-
}>): SyncResult;
|
|
46
|
+
}>): Promise<FormCommandExecutionReport>;
|
|
47
|
+
export declare function formCommandCompileErrorToReport(error: CliFormCommandCompileError): FormCommandExecutionReport;
|
|
52
48
|
export declare function formCommandExecutionToReport(input: Readonly<{
|
|
53
49
|
execution: CliFormCommandExecutionResult;
|
|
54
50
|
compiledPlan: FormCommandCompiledPlan;
|
|
@@ -4,7 +4,7 @@ import type { ManagementClient } from '../../client/management/types';
|
|
|
4
4
|
import type { LocalContent } from '../content/reader';
|
|
5
5
|
import type { EnvTarget } from '../helpers';
|
|
6
6
|
import type { NavigationDiff } from '../sync/diff';
|
|
7
|
-
import {
|
|
7
|
+
import type { SyncResult } from '../sync';
|
|
8
8
|
import { type CliNavigationMenuName } from './commandKeys';
|
|
9
9
|
import { type CliCommandCompileBatchSuccessWithReports, type CliCommandExecutionError, type CliCommandExecutionReport, type CliCommandExecutionResult, type CliCommandValidationCompileError } from './commandRuntime';
|
|
10
10
|
export type CliNavigationCommandBatchSource = 'push_navigation';
|
|
@@ -39,16 +39,12 @@ export declare function executeNavigationCommandPlan(input: Readonly<{
|
|
|
39
39
|
client: Pick<ManagementClient, 'navigation'>;
|
|
40
40
|
plan: Pick<NavigationSiteCommandPlan, 'commands'>;
|
|
41
41
|
}>): Promise<CliNavigationCommandExecutionResult>;
|
|
42
|
-
export declare function
|
|
42
|
+
export declare function executeNavigationCommandPlanAsReport(input: Readonly<{
|
|
43
43
|
client: Pick<ManagementClient, 'navigation'>;
|
|
44
44
|
compiledPlan: NavigationCommandCompiledPlan;
|
|
45
45
|
onBeforeExecute?: (commandCount: number) => void;
|
|
46
|
-
}>): Promise<
|
|
47
|
-
export declare function
|
|
48
|
-
export declare function navigationCommandExecutionToSyncResult(input: Readonly<{
|
|
49
|
-
execution: CliNavigationCommandExecutionResult;
|
|
50
|
-
compiledPlan: NavigationCommandCompiledPlan;
|
|
51
|
-
}>): SyncResult;
|
|
46
|
+
}>): Promise<NavigationCommandExecutionReport>;
|
|
47
|
+
export declare function navigationCommandCompileErrorToReport(error: CliNavigationCommandCompileError): NavigationCommandExecutionReport;
|
|
52
48
|
export declare function navigationCommandExecutionToReport(input: Readonly<{
|
|
53
49
|
execution: CliNavigationCommandExecutionResult;
|
|
54
50
|
compiledPlan: NavigationCommandCompiledPlan;
|
|
@@ -5,7 +5,7 @@ import type { LocalContent } from '../content/reader';
|
|
|
5
5
|
import type { EnvTarget } from '../helpers';
|
|
6
6
|
import type { BlockFieldExtensionsMap } from '../../config/types';
|
|
7
7
|
import type { ContentDiff } from '../sync/diff';
|
|
8
|
-
import {
|
|
8
|
+
import type { SyncResult } from '../sync';
|
|
9
9
|
import { type CliBlockIdentifier, type CliPageIdentifier } from './commandKeys';
|
|
10
10
|
import { type CliCommandCompileBatchSuccessWithReports, type CliCommandExecutionError, type CliCommandExecutionReport, type CliCommandExecutionResult, type CliCommandValidationCompileError } from './commandRuntime';
|
|
11
11
|
export type CliPageCommandBatchSource = 'push_pages';
|
|
@@ -65,16 +65,12 @@ export declare function executePageCommandPlan(input: Readonly<{
|
|
|
65
65
|
client: Pick<ManagementClient, 'pages' | 'blocks'>;
|
|
66
66
|
plan: Pick<PageSiteCommandPlan, 'commands'>;
|
|
67
67
|
}>): Promise<CliPageCommandExecutionResult>;
|
|
68
|
-
export declare function
|
|
68
|
+
export declare function executePageCommandPlanAsReport(input: Readonly<{
|
|
69
69
|
client: Pick<ManagementClient, 'pages' | 'blocks'>;
|
|
70
70
|
compiledPlan: PageCommandCompiledPlan;
|
|
71
71
|
onBeforeExecute?: (commandCount: number) => void;
|
|
72
|
-
}>): Promise<
|
|
73
|
-
export declare function
|
|
74
|
-
export declare function pageCommandExecutionToSyncResult(input: Readonly<{
|
|
75
|
-
execution: CliPageCommandExecutionResult;
|
|
76
|
-
compiledPlan: PageCommandCompiledPlan;
|
|
77
|
-
}>): SyncResult;
|
|
72
|
+
}>): Promise<PageCommandExecutionReport>;
|
|
73
|
+
export declare function pageCommandCompileErrorToReport(error: CliPageCommandCompileError): PageCommandExecutionReport;
|
|
78
74
|
export declare function pageCommandExecutionToReport(input: Readonly<{
|
|
79
75
|
execution: CliPageCommandExecutionResult;
|
|
80
76
|
compiledPlan: PageCommandCompiledPlan;
|
|
@@ -1,65 +1,17 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
import { compileEntryPushCommands } from './entryCommands';
|
|
3
|
-
import { compileFormPushCommands } from './formCommands';
|
|
4
|
-
import { compileNavigationPushCommands } from './navigationCommands';
|
|
5
|
-
import { compilePagePushCommands } from './pageCommands';
|
|
1
|
+
import { type SiteId } from '@riverbankcms/core';
|
|
6
2
|
import type { ManagementClient } from '../../client/management/types';
|
|
7
|
-
import type { PushScope } from '../commands/push/consts';
|
|
8
3
|
import type { LocalContent } from '../content/reader';
|
|
9
4
|
import type { EnvTarget } from '../helpers';
|
|
10
5
|
import type { OutputContext } from '../output';
|
|
11
|
-
import { type ContentDiff, type
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}
|
|
17
|
-
type
|
|
18
|
-
export type
|
|
19
|
-
|
|
20
|
-
compileResult: ReturnType<typeof compileEntryPushCommands>;
|
|
21
|
-
}> | Readonly<{
|
|
22
|
-
surface: 'page';
|
|
23
|
-
compileResult: ReturnType<typeof compilePagePushCommands>;
|
|
24
|
-
}> | Readonly<{
|
|
25
|
-
surface: 'form';
|
|
26
|
-
compileResult: ReturnType<typeof compileFormPushCommands>;
|
|
27
|
-
}> | Readonly<{
|
|
28
|
-
surface: 'navigation';
|
|
29
|
-
compileResult: ReturnType<typeof compileNavigationPushCommands>;
|
|
30
|
-
}>;
|
|
31
|
-
export type CommandSurfaceCompileSuccess = Readonly<{
|
|
32
|
-
surface: 'entry';
|
|
33
|
-
compileValue: OkValue<ReturnType<typeof compileEntryPushCommands>>;
|
|
34
|
-
}> | Readonly<{
|
|
35
|
-
surface: 'page';
|
|
36
|
-
compileValue: OkValue<ReturnType<typeof compilePagePushCommands>>;
|
|
37
|
-
}> | Readonly<{
|
|
38
|
-
surface: 'form';
|
|
39
|
-
compileValue: OkValue<ReturnType<typeof compileFormPushCommands>>;
|
|
40
|
-
}> | Readonly<{
|
|
41
|
-
surface: 'navigation';
|
|
42
|
-
compileValue: OkValue<ReturnType<typeof compileNavigationPushCommands>>;
|
|
43
|
-
}>;
|
|
44
|
-
type OkValue<T> = T extends Readonly<{
|
|
45
|
-
ok: true;
|
|
46
|
-
value: infer TValue;
|
|
47
|
-
}> ? TValue : never;
|
|
48
|
-
export type ContentPushExecutionStep = Readonly<{
|
|
49
|
-
kind: 'residual-settings-sync';
|
|
50
|
-
residual: ResidualSettingsPushPlan;
|
|
51
|
-
onFailure: CommandSurfaceFailurePolicy;
|
|
52
|
-
}> | Readonly<{
|
|
53
|
-
kind: 'command-surface';
|
|
54
|
-
surface: CommandSurfaceCompileSuccess;
|
|
55
|
-
onFailure: CommandSurfaceFailurePolicy;
|
|
56
|
-
}>;
|
|
57
|
-
export type ContentPushExecutionPlan = Readonly<{
|
|
58
|
-
kind: 'sync-steps';
|
|
59
|
-
steps: readonly ContentPushExecutionStep[];
|
|
60
|
-
}>;
|
|
61
|
-
export declare function executeContentPushPlan(input: Readonly<{
|
|
62
|
-
pushScope: PushScope;
|
|
6
|
+
import { type ContentDiff, type SyncResult } from '../sync';
|
|
7
|
+
import { type CommandSurfaceDispatchDependencies } from './commandSurfaceDispatch';
|
|
8
|
+
import { planContentPushExecution } from './pushExecutionPlan';
|
|
9
|
+
import type { CommandSurface, CommandSurfaceCompileResult, CommandSurfaceCompileSuccess, CommandSurfaceExecutionReport, ContentPushScope, ContentPushExecutionPlan, ContentPushExecutionReport, ContentPushExecutionStep } from './pushExecutionTypes';
|
|
10
|
+
import type { compilePagePushCommands } from './pageCommands';
|
|
11
|
+
export { planContentPushExecution };
|
|
12
|
+
export type { CommandSurface, CommandSurfaceCompileResult, CommandSurfaceCompileSuccess, CommandSurfaceExecutionReport, ContentPushScope, ContentPushExecutionPlan, ContentPushExecutionReport, ContentPushExecutionStep, };
|
|
13
|
+
export type ContentPushExecutionInput = Readonly<{
|
|
14
|
+
pushScope: ContentPushScope;
|
|
63
15
|
siteId: SiteId;
|
|
64
16
|
target: EnvTarget;
|
|
65
17
|
diff: ContentDiff;
|
|
@@ -71,13 +23,7 @@ export declare function executeContentPushPlan(input: Readonly<{
|
|
|
71
23
|
onFormCommandCount?: (commandCount: number) => void;
|
|
72
24
|
onNavigationCommandCount?: (commandCount: number) => void;
|
|
73
25
|
onPageCommandCount?: (commandCount: number) => void;
|
|
74
|
-
}
|
|
75
|
-
export declare function
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
target: EnvTarget;
|
|
79
|
-
diff: ContentDiff;
|
|
80
|
-
local: LocalContent;
|
|
81
|
-
blockFieldExtensions?: Parameters<typeof compilePagePushCommands>[0]['blockFieldExtensions'];
|
|
82
|
-
}>): Result<ContentPushExecutionPlan, SyncResult>;
|
|
83
|
-
export {};
|
|
26
|
+
}>;
|
|
27
|
+
export declare function executeContentPushPlan(input: ContentPushExecutionInput): Promise<SyncResult>;
|
|
28
|
+
export declare function executeContentPushPlanAsCommandReport(input: ContentPushExecutionInput, dependencies?: CommandSurfaceDispatchDependencies): Promise<ContentPushExecutionReport>;
|
|
29
|
+
export declare function contentPushExecutionReportToSyncResult(report: ContentPushExecutionReport): SyncResult;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { LocalContent } from '../content/reader';
|
|
2
|
+
import type { ContentDiff } from '../sync';
|
|
3
|
+
import type { ContentPushScope, ContentPushExecutionPlan } from './pushExecutionTypes';
|
|
4
|
+
export declare function planContentPushExecution(input: Readonly<{
|
|
5
|
+
pushScope: ContentPushScope;
|
|
6
|
+
diff: ContentDiff;
|
|
7
|
+
local: LocalContent;
|
|
8
|
+
}>): ContentPushExecutionPlan;
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import type { SiteCommandRef, SiteCommandType } from '@riverbankcms/site-commands';
|
|
2
|
+
import type { SyncResult, ResidualSettingsDiff, ResidualSettingsLocalContent } from '../sync';
|
|
3
|
+
import type { PushScope } from '../commands/push/consts';
|
|
4
|
+
import type { compileEntryPushCommands, EntryCommandExecutionReport } from './entryCommands';
|
|
5
|
+
import type { compileFormPushCommands, FormCommandExecutionReport } from './formCommands';
|
|
6
|
+
import type { compileNavigationPushCommands, NavigationCommandExecutionReport } from './navigationCommands';
|
|
7
|
+
import type { compilePagePushCommands, PageCommandExecutionReport } from './pageCommands';
|
|
8
|
+
export type CommandSurface = 'entry' | 'page' | 'form' | 'navigation';
|
|
9
|
+
export type CommandSurfaceFailurePolicy = 'continue' | 'stop';
|
|
10
|
+
export type ContentPushScope = Extract<PushScope, 'entries' | 'pages' | 'navigation' | 'forms' | 'all'>;
|
|
11
|
+
export type ResidualSettingsPushPlan = Readonly<{
|
|
12
|
+
diff: ResidualSettingsDiff;
|
|
13
|
+
local: ResidualSettingsLocalContent;
|
|
14
|
+
}>;
|
|
15
|
+
export type CommandSurfaceCompileResult = Readonly<{
|
|
16
|
+
surface: 'entry';
|
|
17
|
+
compileResult: ReturnType<typeof compileEntryPushCommands>;
|
|
18
|
+
}> | Readonly<{
|
|
19
|
+
surface: 'page';
|
|
20
|
+
compileResult: ReturnType<typeof compilePagePushCommands>;
|
|
21
|
+
}> | Readonly<{
|
|
22
|
+
surface: 'form';
|
|
23
|
+
compileResult: ReturnType<typeof compileFormPushCommands>;
|
|
24
|
+
}> | Readonly<{
|
|
25
|
+
surface: 'navigation';
|
|
26
|
+
compileResult: ReturnType<typeof compileNavigationPushCommands>;
|
|
27
|
+
}>;
|
|
28
|
+
export type CommandSurfaceCompileSuccess = Readonly<{
|
|
29
|
+
surface: 'entry';
|
|
30
|
+
compileValue: OkValue<ReturnType<typeof compileEntryPushCommands>>;
|
|
31
|
+
}> | Readonly<{
|
|
32
|
+
surface: 'page';
|
|
33
|
+
compileValue: OkValue<ReturnType<typeof compilePagePushCommands>>;
|
|
34
|
+
}> | Readonly<{
|
|
35
|
+
surface: 'form';
|
|
36
|
+
compileValue: OkValue<ReturnType<typeof compileFormPushCommands>>;
|
|
37
|
+
}> | Readonly<{
|
|
38
|
+
surface: 'navigation';
|
|
39
|
+
compileValue: OkValue<ReturnType<typeof compileNavigationPushCommands>>;
|
|
40
|
+
}>;
|
|
41
|
+
type OkValue<T> = T extends Readonly<{
|
|
42
|
+
ok: true;
|
|
43
|
+
value: infer TValue;
|
|
44
|
+
}> ? TValue : never;
|
|
45
|
+
export type ContentPushExecutionStep = Readonly<{
|
|
46
|
+
kind: 'residual-settings-sync';
|
|
47
|
+
residual: ResidualSettingsPushPlan;
|
|
48
|
+
onFailure: CommandSurfaceFailurePolicy;
|
|
49
|
+
}> | Readonly<{
|
|
50
|
+
kind: 'command-surface';
|
|
51
|
+
surface: CommandSurface;
|
|
52
|
+
onFailure: CommandSurfaceFailurePolicy;
|
|
53
|
+
}>;
|
|
54
|
+
export type CompiledContentPushExecutionStep = Readonly<{
|
|
55
|
+
kind: 'residual-settings-sync';
|
|
56
|
+
residual: ResidualSettingsPushPlan;
|
|
57
|
+
onFailure: CommandSurfaceFailurePolicy;
|
|
58
|
+
}> | Readonly<{
|
|
59
|
+
kind: 'command-surface';
|
|
60
|
+
surface: CommandSurfaceCompileSuccess;
|
|
61
|
+
onFailure: CommandSurfaceFailurePolicy;
|
|
62
|
+
}>;
|
|
63
|
+
export type ContentPushExecutionPlan = Readonly<{
|
|
64
|
+
kind: 'sync-steps';
|
|
65
|
+
steps: readonly ContentPushExecutionStep[];
|
|
66
|
+
}>;
|
|
67
|
+
export type CompiledContentPushExecutionPlan = Readonly<{
|
|
68
|
+
kind: 'compiled-sync-steps';
|
|
69
|
+
steps: readonly CompiledContentPushExecutionStep[];
|
|
70
|
+
}>;
|
|
71
|
+
export type CommandSurfaceExecutionReport = Readonly<{
|
|
72
|
+
surface: 'entry';
|
|
73
|
+
report: EntryCommandExecutionReport;
|
|
74
|
+
}> | Readonly<{
|
|
75
|
+
surface: 'page';
|
|
76
|
+
report: PageCommandExecutionReport;
|
|
77
|
+
}> | Readonly<{
|
|
78
|
+
surface: 'form';
|
|
79
|
+
report: FormCommandExecutionReport;
|
|
80
|
+
}> | Readonly<{
|
|
81
|
+
surface: 'navigation';
|
|
82
|
+
report: NavigationCommandExecutionReport;
|
|
83
|
+
}>;
|
|
84
|
+
export type ContentPushExecutionReport = Readonly<{
|
|
85
|
+
commandReports: readonly CommandSurfaceExecutionReport[];
|
|
86
|
+
residualSyncResults: readonly SyncResult[];
|
|
87
|
+
}>;
|
|
88
|
+
export type ReportedCommandWithSubject<TSubject> = Readonly<{
|
|
89
|
+
plannedCommand: Readonly<{
|
|
90
|
+
command: Readonly<{
|
|
91
|
+
ref: SiteCommandRef;
|
|
92
|
+
type: SiteCommandType;
|
|
93
|
+
}>;
|
|
94
|
+
}>;
|
|
95
|
+
reportSubject: TSubject;
|
|
96
|
+
}>;
|
|
97
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { LocalContent } from '../content/reader';
|
|
2
|
+
import type { ContentDiff } from '../sync';
|
|
3
|
+
import type { CommandSurface, ResidualSettingsPushPlan } from './pushExecutionTypes';
|
|
4
|
+
export declare const baselineResidualOmittedCommandSurfaces: readonly ["navigation"];
|
|
5
|
+
export declare const baselineResidualOmittedCommandSurfaceSet: ReadonlySet<CommandSurface>;
|
|
6
|
+
export declare function syncPlanResidual(input: Readonly<{
|
|
7
|
+
diff: ContentDiff;
|
|
8
|
+
local: LocalContent;
|
|
9
|
+
omitSurfaces: ReadonlySet<CommandSurface>;
|
|
10
|
+
}>): ResidualSettingsPushPlan;
|
|
11
|
+
export declare function residualSettingsPlan(input: Readonly<{
|
|
12
|
+
diff: ContentDiff;
|
|
13
|
+
local: LocalContent;
|
|
14
|
+
commandSurfaces: readonly CommandSurface[];
|
|
15
|
+
}>): ResidualSettingsPushPlan | null;
|
|
@@ -5,4 +5,5 @@
|
|
|
5
5
|
*/
|
|
6
6
|
export { calculateDiff, calculatePullDiff, hasPendingChanges, formatDiffSummary, formatDiffDetail, buildJsonDiff, type ContentDiff, type EntryDiff, type PageDiff, type BlockDiff, type NavigationDiff, type DiffType, type DiffOptions, type JsonDiff, type JsonDiffMode, type JsonDiffChange, type JsonDiffChangeType, type JsonDiffOperation, type PullJsonDiff, type PullJsonDiffChange, type FieldChange, findChangedFieldsWithValues, formatValue, formatHumanDiff, } from './diff';
|
|
7
7
|
export { executeResidualSettingsSyncPlan, createEmptySyncResult, formatSyncResult, type SyncOptions, type SyncResult, type ResidualSettingsDiff, type ResidualSettingsLocalContent, } from './executor';
|
|
8
|
+
export { addCounters, mergeManySyncResults, mergeSyncResults, } from './syncResultAggregation';
|
|
8
9
|
export { extractMediaPaths, buildStorageUrl, downloadMedia, syncMedia, type MediaSyncResult, type MediaSyncSummary, type MediaSyncOptions, type MediaUploadClient, } from './media';
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { type SyncResult } from './executor';
|
|
2
|
+
export declare function mergeManySyncResults(results: readonly SyncResult[]): SyncResult;
|
|
3
|
+
export declare function mergeSyncResults(first: SyncResult, second: SyncResult): SyncResult;
|
|
4
|
+
export declare function addCounters<TCounters extends Record<string, number>>(first: TCounters, second: TCounters, keys: readonly (keyof TCounters)[]): TCounters;
|
|
@@ -13,6 +13,8 @@ export type BlockOverrideProps<TContent = Record<string, unknown>, TData = Recor
|
|
|
13
13
|
themeConfig?: Theme;
|
|
14
14
|
data?: TData;
|
|
15
15
|
siteId?: string;
|
|
16
|
+
apiBaseUrl?: string;
|
|
17
|
+
portalToken?: string | null;
|
|
16
18
|
supabaseUrl?: string;
|
|
17
19
|
imageResolveContext?: ResolveImageUrlContext;
|
|
18
20
|
blockId: string | null;
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
* tokens: {
|
|
35
35
|
* primary: '#6d28d9',
|
|
36
36
|
* secondary: '#4c1d95',
|
|
37
|
-
*
|
|
37
|
+
* primaryForeground: '#ffffff',
|
|
38
38
|
* surface: '#f8fafc',
|
|
39
39
|
* text: '#1e293b',
|
|
40
40
|
* border: '#e2e8f0',
|
|
@@ -60,8 +60,8 @@
|
|
|
60
60
|
* primary: 'var(--brand-purple)',
|
|
61
61
|
* secondary: 'var(--brand-navy)',
|
|
62
62
|
* background: 'var(--ds-bg)',
|
|
63
|
+
* foreground: 'var(--ds-text)',
|
|
63
64
|
* },
|
|
64
|
-
* components: { buttons: true },
|
|
65
65
|
* }}
|
|
66
66
|
* >
|
|
67
67
|
* {children}
|
|
@@ -88,8 +88,8 @@ export interface ThemeBridgeProviderProps {
|
|
|
88
88
|
* Uses ThemeScopeCore from @riverbankcms/blocks for consistent DOM structure
|
|
89
89
|
* with the full CMS theme system.
|
|
90
90
|
*
|
|
91
|
-
* Optionally generates component CSS for buttons, cards, and inputs when
|
|
92
|
-
*
|
|
91
|
+
* Optionally generates component CSS for buttons, cards, and inputs when those
|
|
92
|
+
* component buckets are explicitly enabled.
|
|
93
93
|
*/
|
|
94
94
|
export declare function ThemeBridgeProvider({ config, children, className, }: ThemeBridgeProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
95
95
|
/**
|
|
@@ -1,17 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* CSS
|
|
2
|
+
* CSS generator for SDK ThemeBridge manual injection.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* Key differences from the full CMS theme system:
|
|
8
|
-
* - No shade generation (SDK sites define their own tokens)
|
|
9
|
-
* - Supports arbitrary token names
|
|
10
|
-
* - Supports pass-through of CSS variable references
|
|
11
|
-
* - Opt-in component CSS generation using core generators from @riverbankcms/blocks
|
|
4
|
+
* React consumers should prefer ThemeBridgeProvider. This helper remains useful
|
|
5
|
+
* for SDK sites that manually inject a style tag; it delegates to the shared
|
|
6
|
+
* theme-core bridge runtime so there is one runtime contract.
|
|
12
7
|
*/
|
|
13
8
|
import type { ThemeBridgeConfig, ThemeBridgeOutput } from './types';
|
|
14
|
-
/**
|
|
15
|
-
* Generate CSS variables from a ThemeBridgeConfig.
|
|
16
|
-
*/
|
|
17
9
|
export declare function generateThemeBridgeCss(config: ThemeBridgeConfig): ThemeBridgeOutput;
|
|
@@ -87,7 +87,7 @@ export interface ThemeBridgeComponents {
|
|
|
87
87
|
* tokens: {
|
|
88
88
|
* primary: '#6d28d9',
|
|
89
89
|
* secondary: '#4c1d95',
|
|
90
|
-
*
|
|
90
|
+
* primaryForeground: '#ffffff',
|
|
91
91
|
* surface: '#f8fafc',
|
|
92
92
|
* text: '#1e293b',
|
|
93
93
|
* border: '#e2e8f0',
|
|
@@ -112,8 +112,8 @@ export interface ThemeBridgeComponents {
|
|
|
112
112
|
* primary: 'var(--brand-purple)',
|
|
113
113
|
* secondary: 'var(--brand-navy)',
|
|
114
114
|
* background: 'var(--ds-bg)',
|
|
115
|
+
* foreground: 'var(--ds-text)',
|
|
115
116
|
* },
|
|
116
|
-
* components: { buttons: true },
|
|
117
117
|
* }}
|
|
118
118
|
* >
|
|
119
119
|
* {children}
|
|
@@ -124,7 +124,7 @@ export interface ThemeBridgeConfig {
|
|
|
124
124
|
/**
|
|
125
125
|
* Color tokens as key-value pairs.
|
|
126
126
|
*
|
|
127
|
-
* Keys become CSS
|
|
127
|
+
* Keys become runtime CSS variables such as `--tb-primary`.
|
|
128
128
|
*
|
|
129
129
|
* Values can be:
|
|
130
130
|
* - Hex colors: `'#6d28d9'` (converted to RGB: `109 40 217`)
|
|
@@ -134,10 +134,16 @@ export interface ThemeBridgeConfig {
|
|
|
134
134
|
* Common token names used by blocks:
|
|
135
135
|
* - `primary`, `secondary` - Brand colors
|
|
136
136
|
* - `background`, `surface` - Background colors
|
|
137
|
-
* - `
|
|
137
|
+
* - `foreground`, `mutedForeground` - Preferred text colors
|
|
138
|
+
* - `text`, `mutedText` - Accepted aliases for text colors
|
|
138
139
|
* - `border` - Border color
|
|
139
|
-
* - `
|
|
140
|
-
* - `
|
|
140
|
+
* - `primaryForeground` - Preferred text color on primary backgrounds
|
|
141
|
+
* - `white` - Accepted alias for `primaryForeground`
|
|
142
|
+
* - `success`, `warning`, `destructive`, `info` - Status colors
|
|
143
|
+
* - `danger` - Accepted alias for `destructive`
|
|
144
|
+
*
|
|
145
|
+
* Canonical token names win over aliases when both are present. Empty
|
|
146
|
+
* canonical values are treated as missing, so aliases or defaults can fill in.
|
|
141
147
|
*/
|
|
142
148
|
tokens: Record<string, string>;
|
|
143
149
|
/** Typography settings */
|
|
@@ -151,8 +157,10 @@ export interface ThemeBridgeConfig {
|
|
|
151
157
|
/**
|
|
152
158
|
* Opt-in component CSS generation.
|
|
153
159
|
*
|
|
154
|
-
* By default,
|
|
155
|
-
*
|
|
160
|
+
* By default, ThemeBridgeProvider generates the structural runtime CSS used
|
|
161
|
+
* by system blocks, including status, progress, and block-specific vars.
|
|
162
|
+
* Enable components only when you also want generated visual skins for
|
|
163
|
+
* `.button-*`, `.card-*`, or `.form-*` classes.
|
|
156
164
|
*/
|
|
157
165
|
components?: ThemeBridgeComponents;
|
|
158
166
|
/**
|
|
@@ -176,7 +184,7 @@ export interface ThemeBridgeConfig {
|
|
|
176
184
|
*/
|
|
177
185
|
export interface ThemeBridgeOutput {
|
|
178
186
|
/** CSS variables as inline style object */
|
|
179
|
-
cssVars: Record<string, string>;
|
|
187
|
+
cssVars: Record<string, string | number>;
|
|
180
188
|
/** Complete CSS string for injection */
|
|
181
189
|
css: string;
|
|
182
190
|
}
|