@nextlyhq/plugin-sdk 0.0.2-alpha.78 → 0.0.2-alpha.79

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/admin.d.ts CHANGED
@@ -1,10 +1,10 @@
1
1
  import { JsonObject, JsonValue, OverridableDocumentAction, PluginAdminContributions, PluginAdminPage, PluginAdminPanel, PluginCollectionView, PluginDocumentActionOverride, PluginDocumentActionOverrides, PluginDocumentView, PluginFieldTypeDocumentView, PluginItemCount, PluginMenuItem, PluginMenuItemFields, PluginPageStartupRead, PluginPanelGroup, PluginPanelSection } from "nextly";
2
2
  import { WEB_FONT_FORMATS } from "nextly/config";
3
- import { Alert, AlertDescription, AlertDescriptionProps, AlertProps, AlertTitle, AlertTitleProps, ApiError, Badge, BadgeProps, Button, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardProps, CardTitle, ChallengeResolveResult, ChallengeViewProps, Checkbox, ComponentPath, CustomEditViewProps, DevicePreferenceOptions, DevicePreferenceStore, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, DocumentActionReplacementProps, DocumentChangeResult, DocumentPanelSectionProps, DocumentTabProps, DocumentViewProps, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuCheckboxItemProps, DropdownMenuContent, DropdownMenuContentProps, DropdownMenuGroup, DropdownMenuItem, DropdownMenuItemProps, DropdownMenuLabel, DropdownMenuLabelProps, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuRadioItemProps, DropdownMenuSeparator, DropdownMenuSeparatorProps, DropdownMenuTrigger, FieldLayout, FieldShell, FieldShellProps, FieldShellRenderProps, FieldWidth, FormActions, FormActionsProps, FormSection, FormSectionProps, Grid, GridProps, Input, Label, PageFrame, PageFrameProps, PageHeader, PageHeaderProps, PageTab, PageTabProps, PageTabs, PageTabsProps, PageType, Progress, ProgressProps, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectSeparator, SelectTrigger, SelectValue, Sheet, SheetClose, SheetCloseProps, SheetContent, SheetContentProps, SheetDescription, SheetDescriptionProps, SheetFooter, SheetFooterProps, SheetHeader, SheetHeaderProps, SheetProps, SheetTitle, SheetTitleProps, SheetTrigger, SheetTriggerProps, SidebarSectionProps, SingleDocument, Stack, StackProps, Stat, StatProps, Switch, Tabs, TabsContent, TabsContentProps, TabsList, TabsListProps, TabsProps, TabsTrigger, TabsTriggerProps, Textarea, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TopBarPlace, TopBarPlaceName, TopBarPlaceProps, ValidationIssue, apiErrorMessage, devicePreferenceStore, humanizeFieldName, isApiError, navigateWithinAdmin as navigateTo, registerComponent, registerComponents, registerKnownPlugin, toastMutationResult, useCurrentUserId, useMediaItem, useMediaResolver, useMediaSearcher, usePluginTranslate, useSingleDocument, useUpdateSingleDocument, useUploadMedia, validationIssues } from "@nextlyhq/admin/kit/core";
4
- import { ActionGroup, ActionPlacement, AutosaveStatus, BeforeDocumentAction, DocumentAction, DocumentActionOutcome, DocumentActions, DocumentField, DocumentIdentity, DocumentLocale, DocumentLockGates, DocumentPreview, DocumentPrimaryAction, DocumentRestoreHandler, DocumentSaveIndicator, DocumentSaveState, DocumentStatus, FieldAddress, PILL_LABEL, PillState, StoreReadiness, SubmitRefusal, UseDocumentCheckpointOptions, UseDocumentCheckpointResult, pillStateFromForm, useBeforeDocumentAction, useDocumentActions, useDocumentCheckpoint, useDocumentField, useDocumentIdentity, useDocumentLocale, useDocumentPreview, useDocumentRestore, useDocumentStatus, useDocumentValues, useEntryFieldsPanel, useFieldAddress, useReportUnsavedWork, useTrackedWrite } from "@nextlyhq/admin/kit/document";
5
- import { ConditionOperatorName, ConditionRange, ConditionRow, ConditionRowProps, ConditionSource, ConditionSourceOption, ConditionValue, EDITABLE_VALIDATION_RULES, FieldDefaultOption, FieldDefaultValueInput, FieldDefaultValueInputProps, FieldGroupOption, FieldOption, FieldOptionsEditor, FieldOptionsEditorProps, FieldPicker, FieldPickerChoice, FieldPickerConfig, FieldPickerProps, FieldSettingsConditionsProps, FieldSettingsControlProps, FieldSettingsField, FieldSettingsPanel, FieldSettingsPanelProps, FieldSettingsSurface, FieldSettingsSurfaceControlProps, FieldSettingsTab, FieldTypeDescription, FieldTypePicker, FieldTypePickerProps, FieldTypeSettings, FixedFieldSetting, InlineRichTextAttachment, InlineRichTextEditor, InlineRichTextRefusal, InlineRichTextSession, RichTextEditorKit, ValidationNumberField, ValidationNumberFieldProps, ValidationRuleValues, ValidationRulesEditor, ValidationRulesEditorProps, describeFieldTypes, drawsAnyValidationRule, loadInlineRichTextEditor, loadRichTextEditorKit, operatorTakesValue, operatorsForType, usePluginClientConfig, usePluginFieldTypeEntries, withOptionIds } from "@nextlyhq/admin/kit/field-ui";
3
+ import { Alert, AlertDescription, AlertDescriptionProps, AlertProps, AlertTitle, AlertTitleProps, ApiError, Badge, BadgeProps, Button, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardProps, CardTitle, ChallengeResolveResult, ChallengeViewProps, Checkbox, ComponentPath, CustomEditViewProps, DevicePreferenceOptions, DevicePreferenceStore, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, DocumentActionReplacementProps, DocumentChangeResult, DocumentCreateDialogProps, DocumentPanelSectionProps, DocumentTabProps, DocumentViewProps, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuCheckboxItemProps, DropdownMenuContent, DropdownMenuContentProps, DropdownMenuGroup, DropdownMenuItem, DropdownMenuItemProps, DropdownMenuLabel, DropdownMenuLabelProps, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuRadioItemProps, DropdownMenuSeparator, DropdownMenuSeparatorProps, DropdownMenuTrigger, FieldLayout, FieldShell, FieldShellProps, FieldShellRenderProps, FieldWidth, FormActions, FormActionsProps, FormSection, FormSectionProps, Grid, GridProps, Input, Label, PageFrame, PageFrameProps, PageHeader, PageHeaderProps, PageTab, PageTabProps, PageTabs, PageTabsProps, PageType, Progress, ProgressProps, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectSeparator, SelectTrigger, SelectValue, Sheet, SheetClose, SheetCloseProps, SheetContent, SheetContentProps, SheetDescription, SheetDescriptionProps, SheetFooter, SheetFooterProps, SheetHeader, SheetHeaderProps, SheetProps, SheetTitle, SheetTitleProps, SheetTrigger, SheetTriggerProps, SidebarSectionProps, SingleDocument, Stack, StackProps, Stat, StatProps, Switch, Tabs, TabsContent, TabsContentProps, TabsList, TabsListProps, TabsProps, TabsTrigger, TabsTriggerProps, Textarea, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TopBarPlace, TopBarPlaceName, TopBarPlaceProps, ValidationIssue, apiErrorMessage, devicePreferenceStore, humanizeFieldName, isApiError, navigateWithinAdmin as navigateTo, onSchemaChange, registerComponent, registerComponents, registerKnownPlugin, schemaVersion, toastMutationResult, useCurrentUserId, useMediaItem, useMediaResolver, useMediaSearcher, usePluginTranslate, useSingleDocument, useUpdateSingleDocument, useUploadMedia, validationIssues } from "@nextlyhq/admin/kit/core";
4
+ import { ActionGroup, ActionPlacement, AutosaveStatus, BeforeDocumentAction, DocumentAction, DocumentActionOutcome, DocumentActions, DocumentField, DocumentIdentity, DocumentLifeStage, DocumentLocale, DocumentLockGates, DocumentOpensIn, DocumentPreview, DocumentPrimaryAction, DocumentRestoreHandler, DocumentSaveAndPublish, DocumentSaveIndicator, DocumentSaveState, DocumentSession, DocumentSessionLock, DocumentSessionOpen, DocumentSessionOutcome, DocumentSessionRefusal, DocumentSessionTarget, DocumentStatus, EntryContentField, EntryFieldTab, EntryFieldsGroup, EntryFieldsLayout, EntryFieldsOptions, EntryFieldsPresentation, FieldAddress, FieldReveal, PILL_LABEL, PIN_TO_DASHBOARD_ACTION, PillState, SavedPillState, StoreReadiness, SubmitRefusal, UseDocumentCheckpointOptions, UseDocumentCheckpointResult, pillStateFromForm, savedPillState, useBeforeDocumentAction, useDocumentActions, useDocumentCheckpoint, useDocumentField, useDocumentIdentity, useDocumentLifeStage, useDocumentLocale, useDocumentOpensIn, useDocumentPreview, useDocumentRestore, useDocumentSession, useDocumentStatus, useDocumentValues, useEntryFieldsLayout, useEntryFieldsPanel, useFieldAddress, useLeaveWithoutWarning, useReportUnsavedWork, useRevealField, useTrackedWrite } from "@nextlyhq/admin/kit/document";
5
+ import { ConditionOperatorName, ConditionRange, ConditionRow, ConditionRowProps, ConditionSource, ConditionSourceOption, ConditionValue, EDITABLE_VALIDATION_RULES, FieldDefaultOption, FieldDefaultValueInput, FieldDefaultValueInputProps, FieldGroupOption, FieldOption, FieldOptionsEditor, FieldOptionsEditorProps, FieldPicker, FieldPickerChoice, FieldPickerConfig, FieldPickerProps, FieldSettingsConditionsProps, FieldSettingsControlProps, FieldSettingsField, FieldSettingsPanel, FieldSettingsPanelProps, FieldSettingsSurface, FieldSettingsSurfaceControlProps, FieldSettingsTab, FieldTypeDescription, FieldTypePicker, FieldTypePickerProps, FieldTypeSettings, FixedFieldSetting, InlineRichTextAttachment, InlineRichTextEditor, InlineRichTextRefusal, InlineRichTextSession, NUMERIC_BOUND_RULES, NumericRule, RichTextEditorKit, ValidationNumberField, ValidationNumberFieldProps, ValidationRuleValues, ValidationRulesEditor, ValidationRulesEditorProps, boundProblem, describeFieldTypes, drawsAnyValidationRule, loadInlineRichTextEditor, loadRichTextEditorKit, operatorTakesValue, operatorsForType, usePluginClientConfig, usePluginFieldTypeEntries, withOptionIds } from "@nextlyhq/admin/kit/field-ui";
6
6
  import { CardEmptyContent, CardState, FrameState, SkeletonShape, Widget, WidgetBarChartGroup, WidgetBarChartProps, WidgetChartUnit, WidgetFigureProps, WidgetListProps, WidgetListTotal, WidgetRenderSize, WidgetRowAction, WidgetSeries, WidgetSeriesChartProps, WidgetSeriesInterval, WidgetSeriesPoint, WidgetTableColumn, WidgetTableProps, formatWidgetTime, useRefreshDashboard, useWidgetClock } from "@nextlyhq/admin/kit/widgets";
7
- import { AdminChromeLayer, BreadcrumbItem, Breadcrumbs, BreadcrumbsProps, Checklist, ChecklistDoneStyle, ChecklistItem, ChecklistItemProps, ChecklistMark, ChecklistMarkProps, ChecklistProgress, ChecklistProgressProps, ChecklistProps, ChecklistStatus, FileDropArea, FileDropAreaProps, PlaceContributionProps, PlaceProps, PlaceTabBadge, PlaceTabProps, PlaceTabs, PlaceTabsProps, PluginRouteInvalidation, PluginRouteMethod, PluginRouteRead, PluginRouteRequest, PluginRouteWrite, PluginRouteWriter, SegmentedChoice, SegmentedChoiceProps, SegmentedChoiceSize, SegmentedOption, SettingsRowGroup, SettingsRowGroupProps, StepState, Stepper, StepperProps, StepperStep, TargetSlot, TargetSlotProps, readPluginRoute, useFoldedPanel, usePluginRoute, usePluginRouteMutation, useSuppressAdminChrome, writePluginRoute } from "@nextlyhq/admin/kit/plugin-parts";
7
+ import { AdminChromeLayer, BreadcrumbItem, Breadcrumbs, BreadcrumbsProps, Checklist, ChecklistDoneStyle, ChecklistItem, ChecklistItemProps, ChecklistMark, ChecklistMarkProps, ChecklistProgress, ChecklistProgressProps, ChecklistProps, ChecklistStatus, ContributionDocument, FileDropArea, FileDropAreaProps, PlaceContributionProps, PlaceProps, PlaceTabBadge, PlaceTabEntry, PlaceTabProps, PlaceTabs, PlaceTabsProps, PluginRouteInvalidation, PluginRouteMethod, PluginRouteRead, PluginRouteRequest, PluginRouteWrite, PluginRouteWriter, SchemaTemplate, SchemaTemplateField, SchemaTemplateKind, SegmentedChoice, SegmentedChoiceProps, SegmentedChoiceSize, SegmentedOption, SettingsRowGroup, SettingsRowGroupProps, StepState, Stepper, StepperProps, StepperStep, TargetSlot, TargetSlotProps, UsePlaceTabsOptions, readPluginRoute, registerSchemaTemplates, useContributionApplies, useFoldedPanel, usePlaceTabs, usePluginRoute, usePluginRouteMutation, useSuppressAdminChrome, writePluginRoute } from "@nextlyhq/admin/kit/plugin-parts";
8
8
  import { BulkAction, CellContext, CellRenderer, CellRendererDefinition, ColumnProvider, ColumnTransform, DataTable, DataTableContext, DataTableGroup, DataTableGrouping, DataTableProps, DataTableRowDetail, DataTableSelection, DataTableTarget, DataTableView, DataTableViewProps, ListColumnsControl, ListColumnsMenu, ListEmpty, ListEmptyState, ListSearch, ListSlots, ListToolbar, ListToolbarProps, ListView, ListViewProps, NextlyColumn, NextlyFieldSchema, NextlyFieldType, RowAction, UseListColumnsOptions, UseTableColumnsOptions, UseTableColumnsResult, registerBulkAction, registerCellRenderer, registerColumns, registerRowAction, transformColumns, useListColumns, useTableColumns } from "@nextlyhq/admin/kit/table";
9
9
  import { MediaPickerDialog, MediaPickerDialogProps } from "@nextlyhq/admin/kit/media";
10
- export { type ActionGroup, type ActionPlacement, type AdminChromeLayer, Alert, AlertDescription, type AlertDescriptionProps, type AlertProps, AlertTitle, type AlertTitleProps, type ApiError, type AutosaveStatus, Badge, type BadgeProps, type BeforeDocumentAction, type BreadcrumbItem, Breadcrumbs, type BreadcrumbsProps, type BulkAction, Button, Card, CardAction, CardContent, CardDescription, type CardEmptyContent, CardFooter, CardHeader, type CardProps, type CardState, CardTitle, type CellContext, type CellRenderer, type CellRendererDefinition, type ChallengeResolveResult, type ChallengeViewProps, Checkbox, Checklist, type ChecklistDoneStyle, ChecklistItem, type ChecklistItemProps, ChecklistMark, type ChecklistMarkProps, ChecklistProgress, type ChecklistProgressProps, type ChecklistProps, type ChecklistStatus, type ColumnProvider, type ColumnTransform, type ComponentPath, type ConditionOperatorName, type ConditionRange, ConditionRow, type ConditionRowProps, type ConditionSource, type ConditionSourceOption, type ConditionValue, type CustomEditViewProps, DataTable, type DataTableContext, type DataTableGroup, type DataTableGrouping, type DataTableProps, type DataTableRowDetail, type DataTableSelection, type DataTableTarget, DataTableView, type DataTableViewProps, type DevicePreferenceOptions, type DevicePreferenceStore, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, type DocumentAction, type DocumentActionOutcome, type DocumentActionReplacementProps, type DocumentActions, type DocumentChangeResult, type DocumentField, type DocumentIdentity, type DocumentLocale, type DocumentLockGates, type DocumentPanelSectionProps, type DocumentPreview, DocumentPrimaryAction, type DocumentRestoreHandler, DocumentSaveIndicator, type DocumentSaveState, type DocumentStatus, type DocumentTabProps, type DocumentViewProps, DropdownMenu, DropdownMenuCheckboxItem, type DropdownMenuCheckboxItemProps, DropdownMenuContent, type DropdownMenuContentProps, DropdownMenuGroup, DropdownMenuItem, type DropdownMenuItemProps, DropdownMenuLabel, type DropdownMenuLabelProps, DropdownMenuRadioGroup, DropdownMenuRadioItem, type DropdownMenuRadioItemProps, DropdownMenuSeparator, type DropdownMenuSeparatorProps, DropdownMenuTrigger, EDITABLE_VALIDATION_RULES, type FieldAddress, type FieldDefaultOption, FieldDefaultValueInput, type FieldDefaultValueInputProps, type FieldGroupOption, type FieldLayout, type FieldOption, FieldOptionsEditor, type FieldOptionsEditorProps, FieldPicker, type FieldPickerChoice, type FieldPickerConfig, type FieldPickerProps, type FieldSettingsConditionsProps, type FieldSettingsControlProps, type FieldSettingsField, FieldSettingsPanel, type FieldSettingsPanelProps, type FieldSettingsSurface, type FieldSettingsSurfaceControlProps, type FieldSettingsTab, FieldShell, type FieldShellProps, type FieldShellRenderProps, type FieldTypeDescription, FieldTypePicker, type FieldTypePickerProps, type FieldTypeSettings, type FieldWidth, FileDropArea, type FileDropAreaProps, type FixedFieldSetting, FormActions, type FormActionsProps, FormSection, type FormSectionProps, FrameState, Grid, type GridProps, type InlineRichTextAttachment, type InlineRichTextEditor, type InlineRichTextRefusal, type InlineRichTextSession, Input, type JsonObject, type JsonValue, Label, type ListColumnsControl, ListColumnsMenu, type ListEmpty, ListEmptyState, type ListSearch, type ListSlots, ListToolbar, type ListToolbarProps, ListView, type ListViewProps, MediaPickerDialog, type MediaPickerDialogProps, type NextlyColumn, type NextlyFieldSchema, type NextlyFieldType, type OverridableDocumentAction, PILL_LABEL, PageFrame, type PageFrameProps, PageHeader, type PageHeaderProps, PageTab, type PageTabProps, PageTabs, type PageTabsProps, type PageType, type PillState, type PlaceContributionProps, type PlaceProps, type PlaceTabBadge, type PlaceTabProps, PlaceTabs, type PlaceTabsProps, type PluginAdminContributions, type PluginAdminPage, type PluginAdminPanel, type PluginCollectionView, type PluginDocumentActionOverride, type PluginDocumentActionOverrides, type PluginDocumentView, type PluginFieldTypeDocumentView, type PluginItemCount, type PluginMenuItem, type PluginMenuItemFields, type PluginPageStartupRead, type PluginPanelGroup, type PluginPanelSection, type PluginRouteInvalidation, type PluginRouteMethod, type PluginRouteRead, type PluginRouteRequest, type PluginRouteWrite, type PluginRouteWriter, Progress, type ProgressProps, type RichTextEditorKit, type RowAction, SegmentedChoice, type SegmentedChoiceProps, type SegmentedChoiceSize, type SegmentedOption, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectSeparator, SelectTrigger, SelectValue, SettingsRowGroup, type SettingsRowGroupProps, Sheet, SheetClose, type SheetCloseProps, SheetContent, type SheetContentProps, SheetDescription, type SheetDescriptionProps, SheetFooter, type SheetFooterProps, SheetHeader, type SheetHeaderProps, type SheetProps, SheetTitle, type SheetTitleProps, SheetTrigger, type SheetTriggerProps, type SidebarSectionProps, type SingleDocument, type SkeletonShape, Stack, type StackProps, Stat, type StatProps, type StepState, Stepper, type StepperProps, type StepperStep, type StoreReadiness, type SubmitRefusal, Switch, Tabs, TabsContent, type TabsContentProps, TabsList, type TabsListProps, type TabsProps, TabsTrigger, type TabsTriggerProps, TargetSlot, type TargetSlotProps, Textarea, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TopBarPlace, type TopBarPlaceName, type TopBarPlaceProps, type UseDocumentCheckpointOptions, type UseDocumentCheckpointResult, type UseListColumnsOptions, type UseTableColumnsOptions, type UseTableColumnsResult, type ValidationIssue, ValidationNumberField, type ValidationNumberFieldProps, type ValidationRuleValues, ValidationRulesEditor, type ValidationRulesEditorProps, WEB_FONT_FORMATS, Widget, type WidgetBarChartGroup, type WidgetBarChartProps, type WidgetChartUnit, type WidgetFigureProps, type WidgetListProps, type WidgetListTotal, type WidgetRenderSize, type WidgetRowAction, type WidgetSeries, type WidgetSeriesChartProps, type WidgetSeriesInterval, type WidgetSeriesPoint, type WidgetTableColumn, type WidgetTableProps, apiErrorMessage, describeFieldTypes, devicePreferenceStore, drawsAnyValidationRule, formatWidgetTime, humanizeFieldName, isApiError, loadInlineRichTextEditor, loadRichTextEditorKit, navigateTo, operatorTakesValue, operatorsForType, pillStateFromForm, readPluginRoute, registerBulkAction, registerCellRenderer, registerColumns, registerComponent, registerComponents, registerKnownPlugin, registerRowAction, toastMutationResult, transformColumns, useBeforeDocumentAction, useCurrentUserId, useDocumentActions, useDocumentCheckpoint, useDocumentField, useDocumentIdentity, useDocumentLocale, useDocumentPreview, useDocumentRestore, useDocumentStatus, useDocumentValues, useEntryFieldsPanel, useFieldAddress, useFoldedPanel, useListColumns, useMediaItem, useMediaResolver, useMediaSearcher, usePluginClientConfig, usePluginFieldTypeEntries, usePluginRoute, usePluginRouteMutation, usePluginTranslate, useRefreshDashboard, useReportUnsavedWork, useSingleDocument, useSuppressAdminChrome, useTableColumns, useTrackedWrite, useUpdateSingleDocument, useUploadMedia, useWidgetClock, validationIssues, withOptionIds, writePluginRoute };
10
+ export { type ActionGroup, type ActionPlacement, type AdminChromeLayer, Alert, AlertDescription, type AlertDescriptionProps, type AlertProps, AlertTitle, type AlertTitleProps, type ApiError, type AutosaveStatus, Badge, type BadgeProps, type BeforeDocumentAction, type BreadcrumbItem, Breadcrumbs, type BreadcrumbsProps, type BulkAction, Button, Card, CardAction, CardContent, CardDescription, type CardEmptyContent, CardFooter, CardHeader, type CardProps, type CardState, CardTitle, type CellContext, type CellRenderer, type CellRendererDefinition, type ChallengeResolveResult, type ChallengeViewProps, Checkbox, Checklist, type ChecklistDoneStyle, ChecklistItem, type ChecklistItemProps, ChecklistMark, type ChecklistMarkProps, ChecklistProgress, type ChecklistProgressProps, type ChecklistProps, type ChecklistStatus, type ColumnProvider, type ColumnTransform, type ComponentPath, type ConditionOperatorName, type ConditionRange, ConditionRow, type ConditionRowProps, type ConditionSource, type ConditionSourceOption, type ConditionValue, type ContributionDocument, type CustomEditViewProps, DataTable, type DataTableContext, type DataTableGroup, type DataTableGrouping, type DataTableProps, type DataTableRowDetail, type DataTableSelection, type DataTableTarget, DataTableView, type DataTableViewProps, type DevicePreferenceOptions, type DevicePreferenceStore, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, type DocumentAction, type DocumentActionOutcome, type DocumentActionReplacementProps, type DocumentActions, type DocumentChangeResult, type DocumentCreateDialogProps, type DocumentField, type DocumentIdentity, type DocumentLifeStage, type DocumentLocale, type DocumentLockGates, type DocumentOpensIn, type DocumentPanelSectionProps, type DocumentPreview, DocumentPrimaryAction, type DocumentRestoreHandler, DocumentSaveAndPublish, DocumentSaveIndicator, type DocumentSaveState, type DocumentSession, type DocumentSessionLock, type DocumentSessionOpen, type DocumentSessionOutcome, type DocumentSessionRefusal, type DocumentSessionTarget, type DocumentStatus, type DocumentTabProps, type DocumentViewProps, DropdownMenu, DropdownMenuCheckboxItem, type DropdownMenuCheckboxItemProps, DropdownMenuContent, type DropdownMenuContentProps, DropdownMenuGroup, DropdownMenuItem, type DropdownMenuItemProps, DropdownMenuLabel, type DropdownMenuLabelProps, DropdownMenuRadioGroup, DropdownMenuRadioItem, type DropdownMenuRadioItemProps, DropdownMenuSeparator, type DropdownMenuSeparatorProps, DropdownMenuTrigger, EDITABLE_VALIDATION_RULES, type EntryContentField, type EntryFieldTab, type EntryFieldsGroup, type EntryFieldsLayout, type EntryFieldsOptions, type EntryFieldsPresentation, type FieldAddress, type FieldDefaultOption, FieldDefaultValueInput, type FieldDefaultValueInputProps, type FieldGroupOption, type FieldLayout, type FieldOption, FieldOptionsEditor, type FieldOptionsEditorProps, FieldPicker, type FieldPickerChoice, type FieldPickerConfig, type FieldPickerProps, type FieldReveal, type FieldSettingsConditionsProps, type FieldSettingsControlProps, type FieldSettingsField, FieldSettingsPanel, type FieldSettingsPanelProps, type FieldSettingsSurface, type FieldSettingsSurfaceControlProps, type FieldSettingsTab, FieldShell, type FieldShellProps, type FieldShellRenderProps, type FieldTypeDescription, FieldTypePicker, type FieldTypePickerProps, type FieldTypeSettings, type FieldWidth, FileDropArea, type FileDropAreaProps, type FixedFieldSetting, FormActions, type FormActionsProps, FormSection, type FormSectionProps, FrameState, Grid, type GridProps, type InlineRichTextAttachment, type InlineRichTextEditor, type InlineRichTextRefusal, type InlineRichTextSession, Input, type JsonObject, type JsonValue, Label, type ListColumnsControl, ListColumnsMenu, type ListEmpty, ListEmptyState, type ListSearch, type ListSlots, ListToolbar, type ListToolbarProps, ListView, type ListViewProps, MediaPickerDialog, type MediaPickerDialogProps, NUMERIC_BOUND_RULES, type NextlyColumn, type NextlyFieldSchema, type NextlyFieldType, type NumericRule, type OverridableDocumentAction, PILL_LABEL, PIN_TO_DASHBOARD_ACTION, PageFrame, type PageFrameProps, PageHeader, type PageHeaderProps, PageTab, type PageTabProps, PageTabs, type PageTabsProps, type PageType, type PillState, type PlaceContributionProps, type PlaceProps, type PlaceTabBadge, type PlaceTabEntry, type PlaceTabProps, PlaceTabs, type PlaceTabsProps, type PluginAdminContributions, type PluginAdminPage, type PluginAdminPanel, type PluginCollectionView, type PluginDocumentActionOverride, type PluginDocumentActionOverrides, type PluginDocumentView, type PluginFieldTypeDocumentView, type PluginItemCount, type PluginMenuItem, type PluginMenuItemFields, type PluginPageStartupRead, type PluginPanelGroup, type PluginPanelSection, type PluginRouteInvalidation, type PluginRouteMethod, type PluginRouteRead, type PluginRouteRequest, type PluginRouteWrite, type PluginRouteWriter, Progress, type ProgressProps, type RichTextEditorKit, type RowAction, type SavedPillState, type SchemaTemplate, type SchemaTemplateField, type SchemaTemplateKind, SegmentedChoice, type SegmentedChoiceProps, type SegmentedChoiceSize, type SegmentedOption, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectSeparator, SelectTrigger, SelectValue, SettingsRowGroup, type SettingsRowGroupProps, Sheet, SheetClose, type SheetCloseProps, SheetContent, type SheetContentProps, SheetDescription, type SheetDescriptionProps, SheetFooter, type SheetFooterProps, SheetHeader, type SheetHeaderProps, type SheetProps, SheetTitle, type SheetTitleProps, SheetTrigger, type SheetTriggerProps, type SidebarSectionProps, type SingleDocument, type SkeletonShape, Stack, type StackProps, Stat, type StatProps, type StepState, Stepper, type StepperProps, type StepperStep, type StoreReadiness, type SubmitRefusal, Switch, Tabs, TabsContent, type TabsContentProps, TabsList, type TabsListProps, type TabsProps, TabsTrigger, type TabsTriggerProps, TargetSlot, type TargetSlotProps, Textarea, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TopBarPlace, type TopBarPlaceName, type TopBarPlaceProps, type UseDocumentCheckpointOptions, type UseDocumentCheckpointResult, type UseListColumnsOptions, type UsePlaceTabsOptions, type UseTableColumnsOptions, type UseTableColumnsResult, type ValidationIssue, ValidationNumberField, type ValidationNumberFieldProps, type ValidationRuleValues, ValidationRulesEditor, type ValidationRulesEditorProps, WEB_FONT_FORMATS, Widget, type WidgetBarChartGroup, type WidgetBarChartProps, type WidgetChartUnit, type WidgetFigureProps, type WidgetListProps, type WidgetListTotal, type WidgetRenderSize, type WidgetRowAction, type WidgetSeries, type WidgetSeriesChartProps, type WidgetSeriesInterval, type WidgetSeriesPoint, type WidgetTableColumn, type WidgetTableProps, apiErrorMessage, boundProblem, describeFieldTypes, devicePreferenceStore, drawsAnyValidationRule, formatWidgetTime, humanizeFieldName, isApiError, loadInlineRichTextEditor, loadRichTextEditorKit, navigateTo, onSchemaChange, operatorTakesValue, operatorsForType, pillStateFromForm, readPluginRoute, registerBulkAction, registerCellRenderer, registerColumns, registerComponent, registerComponents, registerKnownPlugin, registerRowAction, registerSchemaTemplates, savedPillState, schemaVersion, toastMutationResult, transformColumns, useBeforeDocumentAction, useContributionApplies, useCurrentUserId, useDocumentActions, useDocumentCheckpoint, useDocumentField, useDocumentIdentity, useDocumentLifeStage, useDocumentLocale, useDocumentOpensIn, useDocumentPreview, useDocumentRestore, useDocumentSession, useDocumentStatus, useDocumentValues, useEntryFieldsLayout, useEntryFieldsPanel, useFieldAddress, useFoldedPanel, useLeaveWithoutWarning, useListColumns, useMediaItem, useMediaResolver, useMediaSearcher, usePlaceTabs, usePluginClientConfig, usePluginFieldTypeEntries, usePluginRoute, usePluginRouteMutation, usePluginTranslate, useRefreshDashboard, useReportUnsavedWork, useRevealField, useSingleDocument, useSuppressAdminChrome, useTableColumns, useTrackedWrite, useUpdateSingleDocument, useUploadMedia, useWidgetClock, validationIssues, withOptionIds, writePluginRoute };
package/dist/admin.mjs CHANGED
@@ -1,9 +1,9 @@
1
1
  import { WEB_FONT_FORMATS } from "nextly/config";
2
- import { Alert, AlertDescription, AlertTitle, Badge, Button, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuTrigger, FieldShell, FormActions, FormSection, Grid, Input, Label, PageFrame, PageHeader, PageTab, PageTabs, Progress, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectSeparator, SelectTrigger, SelectValue, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Stack, Stat, Switch, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TopBarPlace, apiErrorMessage, devicePreferenceStore, humanizeFieldName, isApiError, navigateWithinAdmin as navigateTo, registerComponent, registerComponents, registerKnownPlugin, toastMutationResult, useCurrentUserId, useMediaItem, useMediaResolver, useMediaSearcher, usePluginTranslate, useSingleDocument, useUpdateSingleDocument, useUploadMedia, validationIssues } from "@nextlyhq/admin/kit/core";
3
- import { DocumentPrimaryAction, DocumentSaveIndicator, PILL_LABEL, pillStateFromForm, useBeforeDocumentAction, useDocumentActions, useDocumentCheckpoint, useDocumentField, useDocumentIdentity, useDocumentLocale, useDocumentPreview, useDocumentRestore, useDocumentStatus, useDocumentValues, useEntryFieldsPanel, useFieldAddress, useReportUnsavedWork, useTrackedWrite } from "@nextlyhq/admin/kit/document";
4
- import { ConditionRow, EDITABLE_VALIDATION_RULES, FieldDefaultValueInput, FieldOptionsEditor, FieldPicker, FieldSettingsPanel, FieldTypePicker, ValidationNumberField, ValidationRulesEditor, describeFieldTypes, drawsAnyValidationRule, loadInlineRichTextEditor, loadRichTextEditorKit, operatorTakesValue, operatorsForType, usePluginClientConfig, usePluginFieldTypeEntries, withOptionIds } from "@nextlyhq/admin/kit/field-ui";
2
+ import { Alert, AlertDescription, AlertTitle, Badge, Button, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuTrigger, FieldShell, FormActions, FormSection, Grid, Input, Label, PageFrame, PageHeader, PageTab, PageTabs, Progress, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectSeparator, SelectTrigger, SelectValue, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Stack, Stat, Switch, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TopBarPlace, apiErrorMessage, devicePreferenceStore, humanizeFieldName, isApiError, navigateWithinAdmin as navigateTo, onSchemaChange, registerComponent, registerComponents, registerKnownPlugin, schemaVersion, toastMutationResult, useCurrentUserId, useMediaItem, useMediaResolver, useMediaSearcher, usePluginTranslate, useSingleDocument, useUpdateSingleDocument, useUploadMedia, validationIssues } from "@nextlyhq/admin/kit/core";
3
+ import { DocumentPrimaryAction, DocumentSaveAndPublish, DocumentSaveIndicator, PILL_LABEL, PIN_TO_DASHBOARD_ACTION, pillStateFromForm, savedPillState, useBeforeDocumentAction, useDocumentActions, useDocumentCheckpoint, useDocumentField, useDocumentIdentity, useDocumentLifeStage, useDocumentLocale, useDocumentOpensIn, useDocumentPreview, useDocumentRestore, useDocumentSession, useDocumentStatus, useDocumentValues, useEntryFieldsLayout, useEntryFieldsPanel, useFieldAddress, useLeaveWithoutWarning, useReportUnsavedWork, useRevealField, useTrackedWrite } from "@nextlyhq/admin/kit/document";
4
+ import { ConditionRow, EDITABLE_VALIDATION_RULES, FieldDefaultValueInput, FieldOptionsEditor, FieldPicker, FieldSettingsPanel, FieldTypePicker, NUMERIC_BOUND_RULES, ValidationNumberField, ValidationRulesEditor, boundProblem, describeFieldTypes, drawsAnyValidationRule, loadInlineRichTextEditor, loadRichTextEditorKit, operatorTakesValue, operatorsForType, usePluginClientConfig, usePluginFieldTypeEntries, withOptionIds } from "@nextlyhq/admin/kit/field-ui";
5
5
  import { FrameState, Widget, formatWidgetTime, useRefreshDashboard, useWidgetClock } from "@nextlyhq/admin/kit/widgets";
6
- import { Breadcrumbs, Checklist, ChecklistItem, ChecklistMark, ChecklistProgress, FileDropArea, PlaceTabs, SegmentedChoice, SettingsRowGroup, Stepper, TargetSlot, readPluginRoute, useFoldedPanel, usePluginRoute, usePluginRouteMutation, useSuppressAdminChrome, writePluginRoute } from "@nextlyhq/admin/kit/plugin-parts";
6
+ import { Breadcrumbs, Checklist, ChecklistItem, ChecklistMark, ChecklistProgress, FileDropArea, PlaceTabs, SegmentedChoice, SettingsRowGroup, Stepper, TargetSlot, readPluginRoute, registerSchemaTemplates, useContributionApplies, useFoldedPanel, usePlaceTabs, usePluginRoute, usePluginRouteMutation, useSuppressAdminChrome, writePluginRoute } from "@nextlyhq/admin/kit/plugin-parts";
7
7
  import { DataTable, DataTableView, ListColumnsMenu, ListEmptyState, ListToolbar, ListView, registerBulkAction, registerCellRenderer, registerColumns, registerRowAction, transformColumns, useListColumns, useTableColumns } from "@nextlyhq/admin/kit/table";
8
8
  import { MediaPickerDialog } from "@nextlyhq/admin/kit/media";
9
- export { Alert, AlertDescription, AlertTitle, Badge, Breadcrumbs, Button, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, Checklist, ChecklistItem, ChecklistMark, ChecklistProgress, ConditionRow, DataTable, DataTableView, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, DocumentPrimaryAction, DocumentSaveIndicator, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuTrigger, EDITABLE_VALIDATION_RULES, FieldDefaultValueInput, FieldOptionsEditor, FieldPicker, FieldSettingsPanel, FieldShell, FieldTypePicker, FileDropArea, FormActions, FormSection, FrameState, Grid, Input, Label, ListColumnsMenu, ListEmptyState, ListToolbar, ListView, MediaPickerDialog, PILL_LABEL, PageFrame, PageHeader, PageTab, PageTabs, PlaceTabs, Progress, SegmentedChoice, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectSeparator, SelectTrigger, SelectValue, SettingsRowGroup, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Stack, Stat, Stepper, Switch, Tabs, TabsContent, TabsList, TabsTrigger, TargetSlot, Textarea, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TopBarPlace, ValidationNumberField, ValidationRulesEditor, WEB_FONT_FORMATS, Widget, apiErrorMessage, describeFieldTypes, devicePreferenceStore, drawsAnyValidationRule, formatWidgetTime, humanizeFieldName, isApiError, loadInlineRichTextEditor, loadRichTextEditorKit, navigateTo, operatorTakesValue, operatorsForType, pillStateFromForm, readPluginRoute, registerBulkAction, registerCellRenderer, registerColumns, registerComponent, registerComponents, registerKnownPlugin, registerRowAction, toastMutationResult, transformColumns, useBeforeDocumentAction, useCurrentUserId, useDocumentActions, useDocumentCheckpoint, useDocumentField, useDocumentIdentity, useDocumentLocale, useDocumentPreview, useDocumentRestore, useDocumentStatus, useDocumentValues, useEntryFieldsPanel, useFieldAddress, useFoldedPanel, useListColumns, useMediaItem, useMediaResolver, useMediaSearcher, usePluginClientConfig, usePluginFieldTypeEntries, usePluginRoute, usePluginRouteMutation, usePluginTranslate, useRefreshDashboard, useReportUnsavedWork, useSingleDocument, useSuppressAdminChrome, useTableColumns, useTrackedWrite, useUpdateSingleDocument, useUploadMedia, useWidgetClock, validationIssues, withOptionIds, writePluginRoute };
9
+ export { Alert, AlertDescription, AlertTitle, Badge, Breadcrumbs, Button, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, Checklist, ChecklistItem, ChecklistMark, ChecklistProgress, ConditionRow, DataTable, DataTableView, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, DocumentPrimaryAction, DocumentSaveAndPublish, DocumentSaveIndicator, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuTrigger, EDITABLE_VALIDATION_RULES, FieldDefaultValueInput, FieldOptionsEditor, FieldPicker, FieldSettingsPanel, FieldShell, FieldTypePicker, FileDropArea, FormActions, FormSection, FrameState, Grid, Input, Label, ListColumnsMenu, ListEmptyState, ListToolbar, ListView, MediaPickerDialog, NUMERIC_BOUND_RULES, PILL_LABEL, PIN_TO_DASHBOARD_ACTION, PageFrame, PageHeader, PageTab, PageTabs, PlaceTabs, Progress, SegmentedChoice, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectSeparator, SelectTrigger, SelectValue, SettingsRowGroup, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Stack, Stat, Stepper, Switch, Tabs, TabsContent, TabsList, TabsTrigger, TargetSlot, Textarea, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TopBarPlace, ValidationNumberField, ValidationRulesEditor, WEB_FONT_FORMATS, Widget, apiErrorMessage, boundProblem, describeFieldTypes, devicePreferenceStore, drawsAnyValidationRule, formatWidgetTime, humanizeFieldName, isApiError, loadInlineRichTextEditor, loadRichTextEditorKit, navigateTo, onSchemaChange, operatorTakesValue, operatorsForType, pillStateFromForm, readPluginRoute, registerBulkAction, registerCellRenderer, registerColumns, registerComponent, registerComponents, registerKnownPlugin, registerRowAction, registerSchemaTemplates, savedPillState, schemaVersion, toastMutationResult, transformColumns, useBeforeDocumentAction, useContributionApplies, useCurrentUserId, useDocumentActions, useDocumentCheckpoint, useDocumentField, useDocumentIdentity, useDocumentLifeStage, useDocumentLocale, useDocumentOpensIn, useDocumentPreview, useDocumentRestore, useDocumentSession, useDocumentStatus, useDocumentValues, useEntryFieldsLayout, useEntryFieldsPanel, useFieldAddress, useFoldedPanel, useLeaveWithoutWarning, useListColumns, useMediaItem, useMediaResolver, useMediaSearcher, usePlaceTabs, usePluginClientConfig, usePluginFieldTypeEntries, usePluginRoute, usePluginRouteMutation, usePluginTranslate, useRefreshDashboard, useReportUnsavedWork, useRevealField, useSingleDocument, useSuppressAdminChrome, useTableColumns, useTrackedWrite, useUpdateSingleDocument, useUploadMedia, useWidgetClock, validationIssues, withOptionIds, writePluginRoute };
package/dist/blocks.d.ts CHANGED
@@ -1,4 +1,6 @@
1
- import { AnyBlockDefinition, BlockDefinition as BlockDefinition$1, BlockEditorMeta, BlockExample, BlockIcon, BlockInspectorProps, BlockIsland, BlockPart, BlockRenderArgs as BlockRenderArgs$1, BlockSeoContribution, BlockSeoImage, BlockVariation, BooleanParam, ChoiceParam, ComponentPath, ContentKind, ContentModel, DayParam, EntryParam, InferBlockProps, NamedQueryChoice, NamedQueryDeclaration, NamedQueryDefinition, NamedQueryParam, NamedQueryParamValues, NamedQueryParams, NamedQueryReader, NamedQueryResult, NamedQueryRows, NamedQueryRunArgs, NamedReadFilter, NamedReadQuery, NodeStyles, NumberParam, PropSchema, SlotLock, SlotSpec, SupportDefinition, TextParam, defineNamedQuery, param } from "@nextlyhq/blocks-engine";
1
+ import { A as AuthenticatedScope, k as AuthUser } from "./index-BkyjglVd.js";
2
+ import { defineNamedQuery, param } from "@nextlyhq/blocks-engine/named-query";
3
+ import { AnyBlockDefinition, BlockDefinition as BlockDefinition$1, BlockEditorMeta, BlockExample, BlockIcon, BlockInspectorProps, BlockIsland, BlockNode, BlockNode as BlockNode$1, BlockPart, BlockRenderArgs as BlockRenderArgs$1, BlockSeoContribution, BlockSeoImage, BlockVariation, BooleanParam, ChoiceParam, ComponentPath, ContentKind, ContentModel, DayParam, EntryParam, InferBlockProps, NamedQueryChoice, NamedQueryDeclaration, NamedQueryDefinition, NamedQueryParam, NamedQueryParamValues, NamedQueryParams, NamedQueryReader, NamedQueryResult, NamedQueryRows, NamedQueryRunArgs, NamedReadFilter, NamedReadQuery, NodeStyles, NumberParam, PropGroup, PropSchema, SlotLock, SlotSpec, StyleSectionKey, SupportDefinition, TextParam } from "@nextlyhq/blocks-engine";
2
4
  import { ReactNode } from "react";
3
5
  /**
4
6
  * The support keys a block may declare.
@@ -52,8 +54,8 @@ export interface BlockSupportKeys {
52
54
  color: "text" | "link";
53
55
  /** Background colour, image and gradient. */
54
56
  background: "color" | "image" | "gradient";
55
- /** Border lines and corner rounding. */
56
- border: "line" | "radius";
57
+ /** Border lines, corner rounding and the outline. */
58
+ border: "line" | "radius" | "outline";
57
59
  /** Box and text shadows. */
58
60
  shadow: never;
59
61
  /** Opacity, filters and transforms. */
@@ -246,5 +248,372 @@ export declare function blockSupports<S extends BlockSupports>(supports: ExactSu
246
248
  * @experimental Carried by the same freeze as `defineBlock`.
247
249
  */
248
250
  export type BlockRenderResult = ReactNode | Promise<ReactNode>;
249
- export { type AnyBlockDefinition, type BlockEditorMeta, type BlockExample, type BlockIcon, type BlockInspectorProps, type BlockIsland, type BlockPart, type BlockSeoContribution, type BlockSeoImage, type BlockVariation, type BooleanParam, type ChoiceParam, type ComponentPath, type ContentKind, type ContentModel, type DayParam, type EntryParam, type InferBlockProps, type NamedQueryChoice, type NamedQueryDeclaration, type NamedQueryDefinition, type NamedQueryParam, type NamedQueryParamValues, type NamedQueryParams, type NamedQueryReader, type NamedQueryResult, type NamedQueryRows, type NamedQueryRunArgs, type NamedReadFilter, type NamedReadQuery, type NodeStyles, type NumberParam, type PropSchema, type SlotLock, type SlotSpec, type SupportDefinition, type TextParam, defineNamedQuery, param };
251
+ /**
252
+ * The controls a described form field may be drawn as: plain HTML controls,
253
+ * so the Form block draws every provider's form with the same markup and the
254
+ * same style parts.
255
+ *
256
+ * @experimental The form provider contract is new; its names and shape may
257
+ * change until the forms plugin and one outside provider have used it.
258
+ */
259
+ export type FormFieldKind = "text" | "email" | "tel" | "number" | "url" | "date" | "time" | "textarea" | "select" | "checkbox" | "radio" | "file" | "hidden";
260
+ /**
261
+ * One choice of a `select`, `radio` or `checkbox` field.
262
+ *
263
+ * @experimental Carried by the form provider contract's freeze.
264
+ */
265
+ export interface FormFieldOption {
266
+ /** What is sent when it is chosen. */
267
+ readonly value: string;
268
+ /** What a visitor reads. */
269
+ readonly label: string;
270
+ }
271
+ /**
272
+ * One field of a described form, in a neutral shape the Form block draws.
273
+ *
274
+ * @experimental Carried by the form provider contract's freeze. A new field
275
+ * feature needs a change here, which is why the contract stays experimental.
276
+ */
277
+ export interface FormFieldDescription {
278
+ /**
279
+ * The name its answer is sent under; unique within the form. A name
280
+ * starting with `_` is the form receiver's own, and a form naming a field
281
+ * with one is not drawn.
282
+ */
283
+ readonly name: string;
284
+ /** What its label says. */
285
+ readonly label: string;
286
+ /** Which control is drawn. */
287
+ readonly kind: FormFieldKind;
288
+ /** Whether an empty answer is refused. */
289
+ readonly required?: boolean;
290
+ /** A line of help under the control. */
291
+ readonly help?: string;
292
+ /** Example text shown in an empty control. */
293
+ readonly placeholder?: string;
294
+ /** The choices of a `select`, `radio` or `checkbox` field. */
295
+ readonly options?: readonly FormFieldOption[];
296
+ /** The file types a `file` field takes, as the `accept` attribute. */
297
+ readonly accept?: string;
298
+ /** The smallest number or earliest date accepted. */
299
+ readonly min?: number;
300
+ /** The largest number or latest date accepted. */
301
+ readonly max?: number;
302
+ /** A pattern the answer must match, as the `pattern` attribute. */
303
+ readonly pattern?: string;
304
+ /**
305
+ * Opaque values the provider's own script reads (drawn as `data-*`), such
306
+ * as a conditional field's condition. The page builder never reads them.
307
+ */
308
+ readonly provider?: Readonly<Record<string, string>>;
309
+ }
310
+ /**
311
+ * What a visitor sees once a send is accepted: a message in place of the
312
+ * form, or another page of the same site.
313
+ *
314
+ * @experimental Carried by the form provider contract's freeze.
315
+ */
316
+ export type FormAfterSending = {
317
+ readonly kind: "message";
318
+ readonly message: string;
319
+ } | {
320
+ readonly kind: "page";
321
+ /** A path of the same site; anything else sends the visitor back to the form's page. */
322
+ readonly href: string;
323
+ };
324
+ /**
325
+ * A form as its provider describes it, for the Form block to draw.
326
+ *
327
+ * @experimental Carried by the form provider contract's freeze.
328
+ */
329
+ export interface FormDescription {
330
+ /** The provider's own reference to the form, as stored in a block. */
331
+ readonly ref: string;
332
+ readonly title: string;
333
+ /** In display order. */
334
+ readonly fields: readonly FormFieldDescription[];
335
+ readonly submitText: string;
336
+ /** The form's own setting; a block may choose another. */
337
+ readonly afterSending: FormAfterSending;
338
+ /** How the browser sends it: `multipart` when a field takes a file. */
339
+ readonly encoding: "urlencoded" | "multipart";
340
+ /**
341
+ * A module the provider needs on pages drawing this form (a bot check's
342
+ * widget, say), and why. The page builder adds it only to those pages.
343
+ */
344
+ readonly script?: {
345
+ readonly module: string;
346
+ readonly reason: string;
347
+ };
348
+ }
349
+ /**
350
+ * Why a provider has no form to describe: it exists and takes no answers
351
+ * now (`closed`), or there is none by that reference for this reader
352
+ * (`missing`).
353
+ *
354
+ * @experimental Carried by the form provider contract's freeze.
355
+ */
356
+ export interface FormUnavailable {
357
+ readonly unavailable: "closed" | "missing";
358
+ /** What a visitor reads in place of a closed form, as its author wrote it. */
359
+ readonly message?: string;
360
+ }
361
+ /**
362
+ * One form a provider lists for an author to pick.
363
+ *
364
+ * @experimental Carried by the form provider contract's freeze.
365
+ */
366
+ export interface FormListing {
367
+ readonly ref: string;
368
+ readonly title: string;
369
+ readonly state: "draft" | "published" | "closed";
370
+ /** Where the author edits it in the admin. */
371
+ readonly editHref?: string;
372
+ }
373
+ /**
374
+ * Whom a provider reads a form as. Handed straight to `ctx.services` as its
375
+ * options: `public` is an anonymous visitor, with every access rule applied;
376
+ * `user` is a signed-in author, with their own rights.
377
+ *
378
+ * @experimental Carried by the form provider contract's freeze.
379
+ */
380
+ export type FormAccess = {
381
+ readonly as: "public";
382
+ } | {
383
+ readonly as: "user";
384
+ readonly user: AuthUser;
385
+ readonly authenticatedScope?: AuthenticatedScope;
386
+ };
387
+ /**
388
+ * A post's answers, by field name, each with every value sent under it.
389
+ * Only the fields the form describes reach a provider: the receiver trims
390
+ * every other name, its own hidden fields among them.
391
+ *
392
+ * @experimental Carried by the form provider contract's freeze.
393
+ */
394
+ export type FormAnswers = ReadonlyMap<string, readonly string[]>;
395
+ /**
396
+ * One post, as the page builder's receiver hands it to the provider.
397
+ *
398
+ * @experimental Carried by the form provider contract's freeze.
399
+ */
400
+ export interface FormPost {
401
+ readonly answers: FormAnswers;
402
+ /** The language of the page the form was sent from, when the site has several. */
403
+ readonly locale?: string;
404
+ /**
405
+ * The visitor's request, for the provider's own checks: its client address
406
+ * for a rate limit, its headers for a bot check. Its body is already read.
407
+ */
408
+ readonly request: Request;
409
+ }
410
+ /**
411
+ * What became of a post, as the provider says.
412
+ *
413
+ * - `sent`: accepted. `afterSending` overrides the form's own setting.
414
+ * - `invalid`: answers refused, each with the field it names.
415
+ * - `closed`: the form takes no answers now.
416
+ * - `failed`: anything else; the visitor is asked to try again.
417
+ *
418
+ * @experimental Carried by the form provider contract's freeze.
419
+ */
420
+ export type FormAcceptResult = {
421
+ readonly kind: "sent";
422
+ readonly afterSending?: FormAfterSending;
423
+ } | {
424
+ readonly kind: "invalid";
425
+ readonly issues: readonly {
426
+ readonly field: string;
427
+ readonly message: string;
428
+ }[];
429
+ } | {
430
+ readonly kind: "closed";
431
+ readonly message?: string;
432
+ } | {
433
+ readonly kind: "failed";
434
+ };
435
+ /**
436
+ * A source of forms the Form block can draw and the page builder's receiver
437
+ * hands posts to, such as the forms plugin.
438
+ *
439
+ * Every rule about a provider's forms — which exist, how answers are
440
+ * checked, stored and sent, spam checks beyond the receiver's own — stays in
441
+ * the provider. The page builder draws what `describe` gives and passes on
442
+ * what a visitor sent; it knows nothing else about a provider's forms.
443
+ *
444
+ * Registered from the provider plugin's `init` through the page builder's
445
+ * cross-plugin `forms` service ({@link FormProviderService}).
446
+ *
447
+ * @experimental The form provider contract is new; its names and shape may
448
+ * change until the forms plugin and one outside provider have used it.
449
+ */
450
+ export interface FormProvider {
451
+ /**
452
+ * Stable, and stored in every block that picks one of its forms: lower
453
+ * case letters, digits and `-`, 1 to 64 characters. `simple` is the page
454
+ * builder's own and cannot be registered.
455
+ */
456
+ readonly id: string;
457
+ /** What authors read: "Forms" in "Fields … come from Forms." */
458
+ readonly label: string;
459
+ /** The forms an author may pick, read with the author's own rights. */
460
+ list(access: FormAccess): Promise<readonly FormListing[]>;
461
+ /**
462
+ * One form, for the live page (as the public: published and open forms
463
+ * only) and for the canvas (as the author).
464
+ */
465
+ describe(ref: string, options: {
466
+ readonly access: FormAccess;
467
+ readonly locale?: string;
468
+ }): Promise<FormDescription | FormUnavailable>;
469
+ /**
470
+ * Take one post. Called by the receiver in the same process, after its own
471
+ * spam trap, size limits and field trim; the provider applies every rule of
472
+ * its own.
473
+ */
474
+ accept(ref: string, post: FormPost): Promise<FormAcceptResult>;
475
+ }
476
+ /**
477
+ * The page builder's cross-plugin `forms` service, as a provider plugin
478
+ * reaches it: `ctx.services.plugins["@nextlyhq/plugin-page-builder"].forms`.
479
+ * Resolve it from `init`. Registering an `id` already registered throws.
480
+ *
481
+ * @experimental Carried by the form provider contract's freeze.
482
+ */
483
+ export interface FormProviderService {
484
+ register(provider: FormProvider): void;
485
+ }
486
+ /**
487
+ * The group of the page builder's Page checks list a provider's findings are
488
+ * listed under: Accessibility, Content and data, Publishing, or Search.
489
+ *
490
+ * @experimental The page check provider contract is new; its names and shape
491
+ * may change before the page builder's checks are marked stable.
492
+ */
493
+ export type PageCheckGroupName = "accessibility" | "content" | "publishing" | "search";
494
+ /**
495
+ * The page a provider is asked about: the collection and entry being edited,
496
+ * its language, and its blocks as the editor holds them, unsaved changes
497
+ * included. A provider that judges what it stores reads the saved entry, and
498
+ * its findings then follow the last save.
499
+ *
500
+ * @experimental Carried by the page check provider contract.
501
+ */
502
+ export interface PageCheckRequest {
503
+ readonly collection: string;
504
+ /** The entry; null for a page not saved yet. */
505
+ readonly entryId: string | null;
506
+ readonly locale?: string;
507
+ /** The page's blocks as the editor holds them, read as stored data. */
508
+ readonly document: unknown;
509
+ }
510
+ /**
511
+ * Where a finding is fixed: a block's setting, by the tab it is on and its
512
+ * id as the inspector names it, or a tab of Page settings, by its id.
513
+ *
514
+ * @experimental Carried by the page check provider contract.
515
+ */
516
+ export type PageCheckFix = {
517
+ readonly tab: "content" | "style" | "advanced";
518
+ readonly id: string;
519
+ } | {
520
+ readonly settingsTab: string;
521
+ };
522
+ /**
523
+ * One problem a provider finds, in the plain words an author reads: what is
524
+ * wrong, why it matters, and what to do.
525
+ *
526
+ * @experimental Carried by the page check provider contract.
527
+ */
528
+ export interface PageCheckFinding {
529
+ /** The block it is about; absent for the page as a whole. */
530
+ readonly nodeId?: string;
531
+ /** Which of several problems on one block this is. */
532
+ readonly part?: string;
533
+ readonly what: string;
534
+ readonly why: string;
535
+ readonly todo: string;
536
+ /** Where choosing it takes the author; absent, only its block is selected. */
537
+ readonly fix?: PageCheckFix;
538
+ }
539
+ /**
540
+ * A plugin's page check: findings about the page being edited, listed in
541
+ * the page builder's Page checks with the built-in ones, in `group`. It runs
542
+ * on the server, as the person editing (`access`), and never blocks a save
543
+ * or a publish.
544
+ *
545
+ * @experimental The page check provider contract is new; its names and shape
546
+ * may change before the page builder's checks are marked stable.
547
+ */
548
+ export interface PageCheckProvider {
549
+ /** Lower case letters, digits and `-`, unique among a site's providers. */
550
+ readonly id: string;
551
+ readonly group: PageCheckGroupName;
552
+ check(page: PageCheckRequest, options: {
553
+ readonly access: Extract<FormAccess, {
554
+ as: "user";
555
+ }>;
556
+ }): Promise<readonly PageCheckFinding[]>;
557
+ }
558
+ /**
559
+ * The page builder's cross-plugin `pageChecks` service, as a provider plugin
560
+ * reaches it: `ctx.services.plugins["@nextlyhq/plugin-page-builder"].pageChecks`.
561
+ * Resolve it from `init`, before or after the page builder's own. Registering
562
+ * an `id` already registered throws.
563
+ *
564
+ * @experimental Carried by the page check provider contract.
565
+ */
566
+ export interface PageCheckProviderService {
567
+ register(provider: PageCheckProvider): void;
568
+ }
569
+ /**
570
+ * A starter page: a ready-made page body an author can start a new page
571
+ * from, in the New page dialog's "Start from" and on an empty page's
572
+ * "or start from a page" row.
573
+ *
574
+ * A starter is copied once. Its blocks become the page's own, each with a
575
+ * new id, so a later change to the starter in code never reaches a page made
576
+ * from it, and a change on the page never reaches the starter. It fills the
577
+ * page's body only: the header and footer are the ones the author chose.
578
+ *
579
+ * Its preview is drawn from its blocks, in the site's own colours and fonts,
580
+ * so style its blocks with the site's variables (`{ $token: "color.primary" }`)
581
+ * rather than raw colours.
582
+ *
583
+ * A site registers its own with `pageBuilder({ starterPages })`; a plugin
584
+ * declares them under
585
+ * `contributes.declarations["@nextlyhq/plugin-page-builder"].starterPages`.
586
+ * Each is checked at start-up, and the site does not start while one is
587
+ * refused: an id that is malformed or used twice, a block the site doesn't
588
+ * have, a placed component, a picture or an address to load from, or blocks
589
+ * the page builder's own validation refuses. Leave an Image empty: the author
590
+ * picks the site's own picture.
591
+ *
592
+ * A starter whose blocks, variables or shared styles the site no longer has
593
+ * is left out of the list, never offered half-drawn.
594
+ *
595
+ * @experimental The starter page contract is new; its names and shape may
596
+ * change before the page builder's starter pages are marked stable.
597
+ */
598
+ export interface StarterPageDefinition {
599
+ /**
600
+ * Lower case letters, digits and `-`, 1 to 64 characters, unique among a
601
+ * site's starter pages.
602
+ */
603
+ readonly id: string;
604
+ /** Its name, as the author reads it: "Landing", "About us". */
605
+ readonly label: string;
606
+ /** One short sentence saying what the page holds. */
607
+ readonly description: string;
608
+ /** The page body's blocks, top to bottom. */
609
+ readonly blocks: readonly BlockNode$1[];
610
+ }
611
+ /**
612
+ * Declare a starter page. Returns its argument unchanged; it exists so an
613
+ * editor checks the shape where the starter is written.
614
+ *
615
+ * @experimental Carried by the starter page contract.
616
+ */
617
+ export declare function defineStarterPage(starter: StarterPageDefinition): StarterPageDefinition;
618
+ export { type AnyBlockDefinition, type BlockEditorMeta, type BlockExample, type BlockIcon, type BlockInspectorProps, type BlockIsland, type BlockNode, type BlockPart, type BlockSeoContribution, type BlockSeoImage, type BlockVariation, type BooleanParam, type ChoiceParam, type ComponentPath, type ContentKind, type ContentModel, type DayParam, type EntryParam, type InferBlockProps, type NamedQueryChoice, type NamedQueryDeclaration, type NamedQueryDefinition, type NamedQueryParam, type NamedQueryParamValues, type NamedQueryParams, type NamedQueryReader, type NamedQueryResult, type NamedQueryRows, type NamedQueryRunArgs, type NamedReadFilter, type NamedReadQuery, type NodeStyles, type NumberParam, type PropGroup, type PropSchema, type SlotLock, type SlotSpec, type StyleSectionKey, type SupportDefinition, type TextParam, defineNamedQuery, param };
250
619
  //# sourceMappingURL=blocks.d.ts.map
package/dist/blocks.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { defineNamedQuery, param } from "@nextlyhq/blocks-engine";
1
+ import { defineNamedQuery, param } from "@nextlyhq/blocks-engine/named-query";
2
2
  // src/blocks.ts
3
3
  /**
4
4
  * Declare a block.
@@ -48,6 +48,15 @@ function defineBlock(definition) {
48
48
  function blockSupports(supports) {
49
49
  return supports;
50
50
  }
51
- export { blockSupports, defineBlock, defineNamedQuery, param };
51
+ /**
52
+ * Declare a starter page. Returns its argument unchanged; it exists so an
53
+ * editor checks the shape where the starter is written.
54
+ *
55
+ * @experimental Carried by the starter page contract.
56
+ */
57
+ function defineStarterPage(starter) {
58
+ return starter;
59
+ }
60
+ export { blockSupports, defineBlock, defineNamedQuery, defineStarterPage, param };
52
61
 
53
62
  //# sourceMappingURL=blocks.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"blocks.mjs","names":[],"sources":["../src/blocks.ts"],"sourcesContent":["/**\n * Block authoring — the contracts a plugin contributing blocks to the page\n * builder needs.\n *\n * A subpath rather than the SDK's main entry, so a plugin that has nothing to\n * do with blocks never pulls the block engine into its type graph. The SDK\n * remains the single stable import surface a plugin author is offered; this\n * simply keeps a page-builder-specific vocabulary out of everyone else's way.\n *\n * The engine is a real dependency of this package rather than an optional peer,\n * because the types below are built on top of its own: they have to resolve for\n * an author who installed only the SDK, and under a strict `node_modules`\n * layout the page builder's copy is not reachable from their package. The\n * engine's registry is pinned to `globalThis`, so even a duplicated install\n * still reads and writes the one registry the page builder consumes.\n *\n * What an author writes is declared here rather than re-exported. `defineBlock`\n * and `BlockSupports` are this module's own so that `BlockSupportKeys` can be\n * augmented from a plugin's source, which only works for a module that plugin\n * can name.\n *\n * The registration side is not here. Contributing a block means calling the\n * page builder's own service — it is that plugin's registry, not core's — so\n * `blockRegistry` comes from `@nextlyhq/plugin-page-builder/blocks`, which is\n * also where a contributor already declares its `dependsOn`.\n *\n * @packageDocumentation\n */\n\nimport type {\n BlockDefinition as EngineBlockDefinition,\n BlockRenderArgs as EngineBlockRenderArgs,\n} from \"@nextlyhq/blocks-engine\";\nimport type { ReactNode } from \"react\";\n\n/**\n * The support keys a block may declare.\n *\n * Declared HERE rather than in the engine, and that placement is the whole\n * point. A module augmentation has to name a module that resolves from the file\n * doing the augmenting, and a plugin author installs this package: under a\n * strict `node_modules` layout the engine is a nested transitive dependency\n * their own source cannot name, so an augmentation pointed at it fails to\n * compile and the custom support silently never arrives.\n *\n * A plugin that calls `registerSupport()` adds its key to the vocabulary the\n * compiler checks against:\n *\n * ```ts\n * declare module \"@nextlyhq/plugin-sdk/blocks\" {\n * interface BlockSupportKeys {\n * animation: \"enter\" | \"exit\";\n * parallax: true;\n * }\n * }\n * ```\n *\n * Declaration merging rather than an index signature: an index signature accepts\n * every key, which is what leaves a misspelled `spaceing` to be found at boot,\n * in someone else's app, instead of while it is being written.\n *\n * One rule reads the value: a union of strings names the sub-flags the support\n * recognises, and anything else means the support is all-or-nothing. So a nested\n * typo is caught in the same breath as a top-level one — `{ spacing: { paddding:\n * true } }` enables nothing at all, and finding that out at boot is exactly what\n * this exists to prevent — while a support with no finer granularity can be\n * written the way it reads, as `never` or as `true`.\n *\n * The built-in keys are the style catalog's groups plus the capabilities that\n * have no catalog group of their own. A test holds both the keys and their\n * flags to what the registry actually accepts, so the two cannot drift.\n *\n * @experimental Carried by the same freeze as `defineBlock`.\n */\nexport interface BlockSupportKeys {\n /** Padding and margin. */\n spacing: \"margin\" | \"padding\";\n /** Flow, alignment and gap. */\n layout: never;\n /** Width, height and their limits. */\n dimensions: never;\n /** Font, size, weight, line height and letter spacing. */\n typography: never;\n /** Text and link colours. */\n color: \"text\" | \"link\";\n /** Background colour, image and gradient. */\n background: \"color\" | \"image\" | \"gradient\";\n /** Border lines and corner rounding. */\n border: \"line\" | \"radius\";\n /** Box and text shadows. */\n shadow: never;\n /** Opacity, filters and transforms. */\n effects: never;\n /** Positioning and stacking. */\n position: never;\n /** Container-query behaviour. */\n container: never;\n /** Marker style on a list. */\n list: never;\n /** The icon a block's disclosure children show, and which side it sits on. */\n disclosure: never;\n /** Author-written CSS on this block. Gates a capability, not a style group. */\n customCss: never;\n}\n\n/**\n * What one support key accepts, given the sub-flags it declares.\n *\n * The two cases are kept apart rather than both handed to `Record`, because\n * `Record` demands a property key and a support that declares no flags has none\n * to give. Feeding it either sentinel is unsound in opposite directions: `true`\n * is not a property key at all, so the mapped type stops instantiating and an\n * augmenting plugin's build fails on the declaration rather than on anything it\n * wrote; `never` produces `Partial<Record<never, boolean>>`, which is `{}`, and\n * `{}` accepts every object — so `{ layout: { typo: true } }` type-checks and is\n * refused only later, by the registry, at boot.\n *\n * `[F] extends [never]` is asked first and in tuple form. Bare `F extends never`\n * distributes and answers for the empty union rather than about it, and\n * `[never] extends [string]` is true, so a `never` reaching the string case\n * would rebuild the same `{}`.\n */\ntype SupportSetting<F> = [F] extends [never]\n ? boolean\n : [F] extends [string]\n ? boolean | Partial<Record<F & string, boolean>>\n : boolean;\n\n/**\n * Style capabilities a block opts into: `true` for a whole group, or an object\n * naming the sub-flags it wants.\n *\n * @experimental Carried by the same freeze as `defineBlock`.\n */\nexport type BlockSupports = {\n [K in keyof BlockSupportKeys]?: SupportSetting<BlockSupportKeys[K]>;\n};\n\n/**\n * Supports as written at a definition, with unknown keys refused.\n *\n * TypeScript checks for excess properties only on a literal written in place,\n * so lifting settings into a shared object skips it: `const shared = { spacing:\n * true, spaceing: true }` assigns to `BlockSupports` without complaint, and the\n * typo survives to be caught at boot in someone else's app — which is the whole\n * failure this vocabulary exists to move earlier.\n *\n * Naming the offending key as `never` refuses it wherever it was written.\n */\ntype ExactSupports<S> = S & {\n [K in Exclude<keyof S, keyof BlockSupportKeys>]: never;\n};\n\n/**\n * Everything a renderer makes available to every block it draws.\n *\n * ONE description per app, rather than each block inventing its own. A block\n * author writes `defineBlock<MyProps>` and `ctx` is already typed as whatever\n * this app's renderer provides, with no type written by hand; a block that\n * needs something unusual has to add it here, which is an app-wide statement\n * anyone can see rather than a quiet assumption inside one file.\n *\n * A renderer declares what it supplies by augmenting this from its own package:\n *\n * ```ts\n * declare module \"@nextlyhq/plugin-sdk/blocks\" {\n * interface BlockRenderContext {\n * data?: DataProvider;\n * }\n * }\n * ```\n *\n * `locale` is here because every renderer of localized content has one, and a\n * block that varies its own output by language should not have to reach past\n * this interface to find out which.\n *\n * @experimental Carried by the same freeze as `defineBlock`.\n */\nexport interface BlockRenderContext {\n /** The locale being rendered, when the renderer is rendering one. */\n locale?: string;\n}\n\n/**\n * What a block's `render` receives.\n *\n * The engine's own version leaves both the context and the output unnamed,\n * because the engine serves any renderer and cannot know either. This one names\n * both: the context is what THIS app's renderer provides, which is what lets a\n * block read `ctx.data` with no type written by hand, and the output is React,\n * which is what lets a block place a slot straight into its JSX instead of\n * asserting a type over it.\n *\n * @experimental Carried by the same freeze as `defineBlock`.\n */\nexport interface BlockRenderArgs<P>\n extends Omit<EngineBlockRenderArgs<P, BlockRenderContext>, \"renderSlot\"> {\n /**\n * Render one of this block's slots, optionally under a different context.\n *\n * `ReactNode` rather than the `ReactNode | Promise<ReactNode>` that `render`\n * returns, and the asymmetry is deliberate: this value is one a block places\n * into its own JSX, and that union is not a legal child. React admits only\n * `Promise<AwaitedReactNode>`, a promise of a settled node, so a promise that\n * may itself yield a promise is refused. Widening here would move the error\n * onto every block that draws a slot.\n *\n * It still admits a pending slot, because React counts\n * `Promise<AwaitedReactNode>` as a `ReactNode`: a renderer may hand one back\n * and the block places it unchanged.\n */\n renderSlot(this: void, name: string, ctx?: BlockRenderContext): ReactNode;\n}\n\n/**\n * One block type, as an author writes it.\n *\n * The engine's own definition leaves `supports` open, because its registry holds\n * blocks from every source and checks their keys at boot against whatever is\n * registered. Authoring is the moment a typo is cheap to catch, so this narrows\n * that one member and changes nothing else.\n *\n * @experimental Carried by the same freeze as `defineBlock`.\n */\nexport interface BlockDefinition<P extends object = Record<string, unknown>>\n extends Omit<\n EngineBlockDefinition<P, BlockRenderContext>,\n // `conditionalSlots` is withheld ON PURPOSE. It exists because a core block\n // needs it, and what a block author should write is a Block API freeze\n // decision — but an `@internal` tag removes nothing from a published type,\n // and this `Omit` inherits every property it does not name. Reserving it\n // takes naming it here; anything less lets a plugin compile against a\n // provisional shape and be broken when the freeze settles it.\n \"supports\" | \"render\" | \"conditionalSlots\"\n > {\n supports?: BlockSupports;\n /**\n * Renders the block.\n *\n * The promise is spelled out rather than left to `ReactNode`, which admits\n * only a promise of a settled node: an async block's `render` returns a\n * promise of anything it could return synchronously, and spelling it out\n * says so.\n */\n render(args: BlockRenderArgs<P>): BlockRenderResult;\n}\n\n/**\n * Declare a block.\n *\n * Returns its argument. It exists to infer the prop type from what is written\n * and to check the rest against the definition shape, which is what makes a\n * mistyped prop name or an unknown support key a compile error rather than a\n * boot one.\n *\n * There is deliberately no per-block context parameter. What a renderer\n * provides is one description per app, and a block that needs something unusual\n * declares it on `BlockRenderContext` where the whole app can see it. A block\n * naming its own context would be asserting privately that it will be handed\n * something, which nothing checks and no registry can honour.\n *\n * @experimental The block API is frozen at the end of the engine phase, not\n * now. Until then a contributed block may need changes when the definition\n * shape settles.\n */\nexport function defineBlock<P extends object>(\n definition: BlockDefinition<P>\n): BlockDefinition<P> {\n return definition;\n}\n\n/**\n * Supports settings meant to be shared between blocks.\n *\n * Written straight into a definition, a typo is caught: TypeScript checks a\n * literal for keys the target does not declare. Lifted into a variable first,\n * it is not, because that check applies only where the literal is written. This\n * puts the check back at the declaration, which is where the settings are.\n *\n * ```ts\n * const layoutSupports = blockSupports({ spacing: true, layout: true });\n * defineBlock<MyProps>({ …, supports: layoutSupports });\n * ```\n *\n * `satisfies BlockSupports` does the same thing and needs nothing from this\n * package; the helper exists because it reads as the obvious move and cannot be\n * forgotten halfway through.\n *\n * It cannot live on `defineBlock` itself: catching this needs the supplied\n * object's own keys inferred, and TypeScript infers nothing once any type\n * argument is written by hand, so `defineBlock<MyProps>` — the form nearly\n * every block uses — would stop checking anything at all.\n *\n * @experimental Carried by the same freeze as `defineBlock`.\n */\nexport function blockSupports<S extends BlockSupports>(\n supports: ExactSupports<S>\n): BlockSupports {\n return supports;\n}\n\n/**\n * @experimental Carried by the same freeze as `defineBlock`: these describe the\n * definition shape, so they change with it.\n */\nexport type {\n AnyBlockDefinition,\n InferBlockProps,\n PropSchema,\n SupportDefinition,\n} from \"@nextlyhq/blocks-engine\";\n\n/**\n * What a block's `render` returns.\n *\n * Declared here rather than re-exported. The engine's own is `unknown`, because\n * the engine serves any renderer and cannot name an output type; naming it there\n * would tie a runtime-free package to React. That leaves the re-exported name\n * useless for the thing an author would reach for it to do — a helper typed\n * `(args: BlockRenderArgs<P>) => BlockRenderResult` returns `unknown`, which does\n * not satisfy `BlockDefinition[\"render\"]`, so handing that helper to\n * `defineBlock` failed to compile.\n *\n * The promise is spelled out for the same reason `render` spells it out.\n *\n * @experimental Carried by the same freeze as `defineBlock`.\n */\nexport type BlockRenderResult = ReactNode | Promise<ReactNode>;\n\n/**\n * What a block's own inspector (`editor.component`) is given: the selected\n * node, its props, `commit(name, value)` through the editor's own write path,\n * and whether the block is read-only. The editor refuses a commit while it is,\n * and one to a non-content prop inside a `contentOnly` area, whatever the\n * component does.\n *\n * @experimental The contract will grow with the editor's controls registry.\n */\nexport type { BlockInspectorProps } from \"@nextlyhq/blocks-engine\";\n\n/**\n * The rest of the definition's own vocabulary. Every one of these names a field\n * a block author fills in, so leaving them off this surface meant writing a slot\n * template, an example, or an editor entry against a type that could only be\n * reached by importing the engine directly — which is the one thing this subpath\n * exists to make unnecessary.\n *\n * `BlockSupportValue` is deliberately NOT among them. The engine's is\n * `boolean | Record<string, boolean>`, which is what its registry stores from\n * every source; offered here as authoring vocabulary it would undo the check\n * this module exists for, since `const spacing: BlockSupportValue = { paddding:\n * true }` accepts the typo the per-key flag unions refuse. A shared setting for\n * one key is written as `BlockSupports[\"spacing\"]`, which is checked, and a\n * whole object goes through `blockSupports()`.\n *\n * `ContentKind` and `ContentModel` are what `contentModel(props)` answers\n * with, so a block author declares what their block is as HTML content\n * without importing the engine.\n *\n * @experimental Carried by the same freeze as `defineBlock`.\n */\nexport type {\n BlockEditorMeta,\n BlockExample,\n BlockIcon,\n BlockIsland,\n BlockPart,\n BlockSeoContribution,\n BlockSeoImage,\n BlockVariation,\n ComponentPath,\n ContentKind,\n ContentModel,\n NodeStyles,\n SlotLock,\n SlotSpec,\n} from \"@nextlyhq/blocks-engine\";\n\n/**\n * Named queries: a collection list's custom source. A developer declares one\n * with `defineNamedQuery`, its typed inputs made with `param`, every\n * collection, Single and site setting it reads, and the shape of its rows.\n * The site registers its own with `pageBuilder({ namedQueries })`; a plugin\n * declares them under `contributes.declarations[\"@nextlyhq/plugin-page-builder\"].namedQueries`.\n *\n * Re-exported from the engine, where the validator and the renderer read the\n * same declaration. Its `run` function receives a reader that reads as an\n * anonymous visitor, limited to what the query declares; the Direct API\n * refuses any other read made while it runs.\n *\n * @experimental A collection list's custom source settles with the editor\n * that offers it.\n */\nexport { defineNamedQuery, param } from \"@nextlyhq/blocks-engine\";\n/** @experimental Settles with `defineNamedQuery`. */\nexport type {\n BooleanParam,\n ChoiceParam,\n DayParam,\n EntryParam,\n NamedQueryChoice,\n NamedQueryDeclaration,\n NamedQueryDefinition,\n NamedQueryParam,\n NamedQueryParams,\n NamedQueryParamValues,\n NamedQueryReader,\n NamedQueryResult,\n NamedQueryRows,\n NamedQueryRunArgs,\n NamedReadFilter,\n NamedReadQuery,\n NumberParam,\n TextParam,\n} from \"@nextlyhq/blocks-engine\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAyQA,SAAgB,YACd,YACoB;CACpB,OAAO;AACT;;;;;;;;;;;;;;;;;;;;;;;;;AA0BA,SAAgB,cACd,UACe;CACf,OAAO;AACT"}
1
+ {"version":3,"file":"blocks.mjs","names":[],"sources":["../src/blocks.ts"],"sourcesContent":["/**\n * Block authoring — the contracts a plugin contributing blocks to the page\n * builder needs.\n *\n * A subpath rather than the SDK's main entry, so a plugin that has nothing to\n * do with blocks never pulls the block engine into its type graph. The SDK\n * remains the single stable import surface a plugin author is offered; this\n * simply keeps a page-builder-specific vocabulary out of everyone else's way.\n *\n * The engine is a real dependency of this package rather than an optional peer,\n * because the types below are built on top of its own: they have to resolve for\n * an author who installed only the SDK, and under a strict `node_modules`\n * layout the page builder's copy is not reachable from their package. Nothing\n * here reads or writes a registry: a plugin's blocks reach a site through the\n * page builder (`contributes.declarations`, or its `blocks` service), which\n * holds that site's registry.\n *\n * What an author writes is declared here rather than re-exported. `defineBlock`\n * and `BlockSupports` are this module's own so that `BlockSupportKeys` can be\n * augmented from a plugin's source, which only works for a module that plugin\n * can name.\n *\n * The registration side is not here. Contributing a block means calling the\n * page builder's own service — it is that plugin's registry, not core's — so\n * `blockRegistry` comes from `@nextlyhq/plugin-page-builder/blocks`, which is\n * also where a contributor already declares its `dependsOn`.\n *\n * @packageDocumentation\n */\n\nimport type {\n BlockDefinition as EngineBlockDefinition,\n BlockNode as EngineBlockNode,\n BlockRenderArgs as EngineBlockRenderArgs,\n} from \"@nextlyhq/blocks-engine\";\nimport type { ReactNode } from \"react\";\n\nimport type { AuthenticatedScope, AuthUser } from \"./index\";\n\n/**\n * The support keys a block may declare.\n *\n * Declared HERE rather than in the engine, and that placement is the whole\n * point. A module augmentation has to name a module that resolves from the file\n * doing the augmenting, and a plugin author installs this package: under a\n * strict `node_modules` layout the engine is a nested transitive dependency\n * their own source cannot name, so an augmentation pointed at it fails to\n * compile and the custom support silently never arrives.\n *\n * A plugin that calls `registerSupport()` adds its key to the vocabulary the\n * compiler checks against:\n *\n * ```ts\n * declare module \"@nextlyhq/plugin-sdk/blocks\" {\n * interface BlockSupportKeys {\n * animation: \"enter\" | \"exit\";\n * parallax: true;\n * }\n * }\n * ```\n *\n * Declaration merging rather than an index signature: an index signature accepts\n * every key, which is what leaves a misspelled `spaceing` to be found at boot,\n * in someone else's app, instead of while it is being written.\n *\n * One rule reads the value: a union of strings names the sub-flags the support\n * recognises, and anything else means the support is all-or-nothing. So a nested\n * typo is caught in the same breath as a top-level one — `{ spacing: { paddding:\n * true } }` enables nothing at all, and finding that out at boot is exactly what\n * this exists to prevent — while a support with no finer granularity can be\n * written the way it reads, as `never` or as `true`.\n *\n * The built-in keys are the style catalog's groups plus the capabilities that\n * have no catalog group of their own. A test holds both the keys and their\n * flags to what the registry actually accepts, so the two cannot drift.\n *\n * @experimental Carried by the same freeze as `defineBlock`.\n */\nexport interface BlockSupportKeys {\n /** Padding and margin. */\n spacing: \"margin\" | \"padding\";\n /** Flow, alignment and gap. */\n layout: never;\n /** Width, height and their limits. */\n dimensions: never;\n /** Font, size, weight, line height and letter spacing. */\n typography: never;\n /** Text and link colours. */\n color: \"text\" | \"link\";\n /** Background colour, image and gradient. */\n background: \"color\" | \"image\" | \"gradient\";\n /** Border lines, corner rounding and the outline. */\n border: \"line\" | \"radius\" | \"outline\";\n /** Box and text shadows. */\n shadow: never;\n /** Opacity, filters and transforms. */\n effects: never;\n /** Positioning and stacking. */\n position: never;\n /** Container-query behaviour. */\n container: never;\n /** Marker style on a list. */\n list: never;\n /** The icon a block's disclosure children show, and which side it sits on. */\n disclosure: never;\n /** Author-written CSS on this block. Gates a capability, not a style group. */\n customCss: never;\n}\n\n/**\n * What one support key accepts, given the sub-flags it declares.\n *\n * The two cases are kept apart rather than both handed to `Record`, because\n * `Record` demands a property key and a support that declares no flags has none\n * to give. Feeding it either sentinel is unsound in opposite directions: `true`\n * is not a property key at all, so the mapped type stops instantiating and an\n * augmenting plugin's build fails on the declaration rather than on anything it\n * wrote; `never` produces `Partial<Record<never, boolean>>`, which is `{}`, and\n * `{}` accepts every object — so `{ layout: { typo: true } }` type-checks and is\n * refused only later, by the registry, at boot.\n *\n * `[F] extends [never]` is asked first and in tuple form. Bare `F extends never`\n * distributes and answers for the empty union rather than about it, and\n * `[never] extends [string]` is true, so a `never` reaching the string case\n * would rebuild the same `{}`.\n */\ntype SupportSetting<F> = [F] extends [never]\n ? boolean\n : [F] extends [string]\n ? boolean | Partial<Record<F & string, boolean>>\n : boolean;\n\n/**\n * Style capabilities a block opts into: `true` for a whole group, or an object\n * naming the sub-flags it wants.\n *\n * @experimental Carried by the same freeze as `defineBlock`.\n */\nexport type BlockSupports = {\n [K in keyof BlockSupportKeys]?: SupportSetting<BlockSupportKeys[K]>;\n};\n\n/**\n * Supports as written at a definition, with unknown keys refused.\n *\n * TypeScript checks for excess properties only on a literal written in place,\n * so lifting settings into a shared object skips it: `const shared = { spacing:\n * true, spaceing: true }` assigns to `BlockSupports` without complaint, and the\n * typo survives to be caught at boot in someone else's app — which is the whole\n * failure this vocabulary exists to move earlier.\n *\n * Naming the offending key as `never` refuses it wherever it was written.\n */\ntype ExactSupports<S> = S & {\n [K in Exclude<keyof S, keyof BlockSupportKeys>]: never;\n};\n\n/**\n * Everything a renderer makes available to every block it draws.\n *\n * ONE description per app, rather than each block inventing its own. A block\n * author writes `defineBlock<MyProps>` and `ctx` is already typed as whatever\n * this app's renderer provides, with no type written by hand; a block that\n * needs something unusual has to add it here, which is an app-wide statement\n * anyone can see rather than a quiet assumption inside one file.\n *\n * A renderer declares what it supplies by augmenting this from its own package:\n *\n * ```ts\n * declare module \"@nextlyhq/plugin-sdk/blocks\" {\n * interface BlockRenderContext {\n * data?: DataProvider;\n * }\n * }\n * ```\n *\n * `locale` is here because every renderer of localized content has one, and a\n * block that varies its own output by language should not have to reach past\n * this interface to find out which.\n *\n * @experimental Carried by the same freeze as `defineBlock`.\n */\nexport interface BlockRenderContext {\n /** The locale being rendered, when the renderer is rendering one. */\n locale?: string;\n}\n\n/**\n * What a block's `render` receives.\n *\n * The engine's own version leaves both the context and the output unnamed,\n * because the engine serves any renderer and cannot know either. This one names\n * both: the context is what THIS app's renderer provides, which is what lets a\n * block read `ctx.data` with no type written by hand, and the output is React,\n * which is what lets a block place a slot straight into its JSX instead of\n * asserting a type over it.\n *\n * @experimental Carried by the same freeze as `defineBlock`.\n */\nexport interface BlockRenderArgs<P>\n extends Omit<EngineBlockRenderArgs<P, BlockRenderContext>, \"renderSlot\"> {\n /**\n * Render one of this block's slots, optionally under a different context.\n *\n * `ReactNode` rather than the `ReactNode | Promise<ReactNode>` that `render`\n * returns, and the asymmetry is deliberate: this value is one a block places\n * into its own JSX, and that union is not a legal child. React admits only\n * `Promise<AwaitedReactNode>`, a promise of a settled node, so a promise that\n * may itself yield a promise is refused. Widening here would move the error\n * onto every block that draws a slot.\n *\n * It still admits a pending slot, because React counts\n * `Promise<AwaitedReactNode>` as a `ReactNode`: a renderer may hand one back\n * and the block places it unchanged.\n */\n renderSlot(this: void, name: string, ctx?: BlockRenderContext): ReactNode;\n}\n\n/**\n * One block type, as an author writes it.\n *\n * The engine's own definition leaves `supports` open, because its registry holds\n * blocks from every source and checks their keys at boot against whatever is\n * registered. Authoring is the moment a typo is cheap to catch, so this narrows\n * that one member and changes nothing else.\n *\n * @experimental Carried by the same freeze as `defineBlock`.\n */\nexport interface BlockDefinition<P extends object = Record<string, unknown>>\n extends Omit<\n EngineBlockDefinition<P, BlockRenderContext>,\n // `conditionalSlots` is withheld ON PURPOSE. It exists because a core block\n // needs it, and what a block author should write is a Block API freeze\n // decision — but an `@internal` tag removes nothing from a published type,\n // and this `Omit` inherits every property it does not name. Reserving it\n // takes naming it here; anything less lets a plugin compile against a\n // provisional shape and be broken when the freeze settles it.\n \"supports\" | \"render\" | \"conditionalSlots\"\n > {\n supports?: BlockSupports;\n /**\n * Renders the block.\n *\n * The promise is spelled out rather than left to `ReactNode`, which admits\n * only a promise of a settled node: an async block's `render` returns a\n * promise of anything it could return synchronously, and spelling it out\n * says so.\n */\n render(args: BlockRenderArgs<P>): BlockRenderResult;\n}\n\n/**\n * Declare a block.\n *\n * Returns its argument. It exists to infer the prop type from what is written\n * and to check the rest against the definition shape, which is what makes a\n * mistyped prop name or an unknown support key a compile error rather than a\n * boot one.\n *\n * There is deliberately no per-block context parameter. What a renderer\n * provides is one description per app, and a block that needs something unusual\n * declares it on `BlockRenderContext` where the whole app can see it. A block\n * naming its own context would be asserting privately that it will be handed\n * something, which nothing checks and no registry can honour.\n *\n * @experimental The block API is frozen at the end of the engine phase, not\n * now. Until then a contributed block may need changes when the definition\n * shape settles.\n */\nexport function defineBlock<P extends object>(\n definition: BlockDefinition<P>\n): BlockDefinition<P> {\n return definition;\n}\n\n/**\n * Supports settings meant to be shared between blocks.\n *\n * Written straight into a definition, a typo is caught: TypeScript checks a\n * literal for keys the target does not declare. Lifted into a variable first,\n * it is not, because that check applies only where the literal is written. This\n * puts the check back at the declaration, which is where the settings are.\n *\n * ```ts\n * const layoutSupports = blockSupports({ spacing: true, layout: true });\n * defineBlock<MyProps>({ …, supports: layoutSupports });\n * ```\n *\n * `satisfies BlockSupports` does the same thing and needs nothing from this\n * package; the helper exists because it reads as the obvious move and cannot be\n * forgotten halfway through.\n *\n * It cannot live on `defineBlock` itself: catching this needs the supplied\n * object's own keys inferred, and TypeScript infers nothing once any type\n * argument is written by hand, so `defineBlock<MyProps>` — the form nearly\n * every block uses — would stop checking anything at all.\n *\n * @experimental Carried by the same freeze as `defineBlock`.\n */\nexport function blockSupports<S extends BlockSupports>(\n supports: ExactSupports<S>\n): BlockSupports {\n return supports;\n}\n\n/**\n * @experimental Carried by the same freeze as `defineBlock`: these describe the\n * definition shape, so they change with it. `PropGroup` and\n * `StyleSectionKey` are added deliberately, as experimental, for the\n * `group` and `section` hints a prop already carries through `PropSchema`.\n */\nexport type {\n AnyBlockDefinition,\n InferBlockProps,\n PropGroup,\n PropSchema,\n StyleSectionKey,\n SupportDefinition,\n} from \"@nextlyhq/blocks-engine\";\n\n/**\n * What a block's `render` returns.\n *\n * Declared here rather than re-exported. The engine's own is `unknown`, because\n * the engine serves any renderer and cannot name an output type; naming it there\n * would tie a runtime-free package to React. That leaves the re-exported name\n * useless for the thing an author would reach for it to do — a helper typed\n * `(args: BlockRenderArgs<P>) => BlockRenderResult` returns `unknown`, which does\n * not satisfy `BlockDefinition[\"render\"]`, so handing that helper to\n * `defineBlock` failed to compile.\n *\n * The promise is spelled out for the same reason `render` spells it out.\n *\n * @experimental Carried by the same freeze as `defineBlock`.\n */\nexport type BlockRenderResult = ReactNode | Promise<ReactNode>;\n\n/**\n * What a block's own inspector (`editor.component`) is given: the selected\n * node, its props, `commit(name, value)` through the editor's own write path,\n * and whether the block is read-only. The editor refuses a commit while it is,\n * and one to a non-content prop inside a `contentOnly` area, whatever the\n * component does.\n *\n * @experimental The contract will grow with the editor's controls registry.\n */\nexport type { BlockInspectorProps } from \"@nextlyhq/blocks-engine\";\n\n/**\n * The rest of the definition's own vocabulary. Every one of these names a field\n * a block author fills in, so leaving them off this surface meant writing a slot\n * template, an example, or an editor entry against a type that could only be\n * reached by importing the engine directly — which is the one thing this subpath\n * exists to make unnecessary.\n *\n * `BlockSupportValue` is deliberately NOT among them. The engine's is\n * `boolean | Record<string, boolean>`, which is what its registry stores from\n * every source; offered here as authoring vocabulary it would undo the check\n * this module exists for, since `const spacing: BlockSupportValue = { paddding:\n * true }` accepts the typo the per-key flag unions refuse. A shared setting for\n * one key is written as `BlockSupports[\"spacing\"]`, which is checked, and a\n * whole object goes through `blockSupports()`.\n *\n * `ContentKind` and `ContentModel` are what `contentModel(props)` answers\n * with, so a block author declares what their block is as HTML content\n * without importing the engine.\n *\n * @experimental Carried by the same freeze as `defineBlock`.\n */\nexport type {\n BlockEditorMeta,\n BlockExample,\n BlockIcon,\n BlockIsland,\n BlockPart,\n BlockSeoContribution,\n BlockSeoImage,\n BlockVariation,\n ComponentPath,\n ContentKind,\n ContentModel,\n NodeStyles,\n SlotLock,\n SlotSpec,\n} from \"@nextlyhq/blocks-engine\";\n\n/**\n * Named queries: a collection list's custom source. A developer declares one\n * with `defineNamedQuery`, its typed inputs made with `param`, every\n * collection, Single and site setting it reads, and the shape of its rows.\n * The site registers its own with `pageBuilder({ namedQueries })`; a plugin\n * declares them under `contributes.declarations[\"@nextlyhq/plugin-page-builder\"].namedQueries`.\n *\n * Re-exported from the engine, where the validator and the renderer read the\n * same declaration. Its `run` function receives a reader that reads as an\n * anonymous visitor, limited to what the query declares; the Direct API\n * refuses any other read made while it runs.\n *\n * @experimental A collection list's custom source settles with the editor\n * that offers it.\n */\n// From the engine's narrow entry, not its root: a plugin importing this module\n// would otherwise bring the whole engine and its CSS parser to every admin\n// screen. The same module the root re-exports, so one registry either way.\nexport { defineNamedQuery, param } from \"@nextlyhq/blocks-engine/named-query\";\n/** @experimental Settles with `defineNamedQuery`. */\nexport type {\n BooleanParam,\n ChoiceParam,\n DayParam,\n EntryParam,\n NamedQueryChoice,\n NamedQueryDeclaration,\n NamedQueryDefinition,\n NamedQueryParam,\n NamedQueryParams,\n NamedQueryParamValues,\n NamedQueryReader,\n NamedQueryResult,\n NamedQueryRows,\n NamedQueryRunArgs,\n NamedReadFilter,\n NamedReadQuery,\n NumberParam,\n TextParam,\n} from \"@nextlyhq/blocks-engine\";\n\n// ---------------------------------------------------------------------------\n// Form providers\n// ---------------------------------------------------------------------------\n\n/**\n * The controls a described form field may be drawn as: plain HTML controls,\n * so the Form block draws every provider's form with the same markup and the\n * same style parts.\n *\n * @experimental The form provider contract is new; its names and shape may\n * change until the forms plugin and one outside provider have used it.\n */\nexport type FormFieldKind =\n | \"text\"\n | \"email\"\n | \"tel\"\n | \"number\"\n | \"url\"\n | \"date\"\n | \"time\"\n | \"textarea\"\n | \"select\"\n | \"checkbox\"\n | \"radio\"\n | \"file\"\n | \"hidden\";\n\n/**\n * One choice of a `select`, `radio` or `checkbox` field.\n *\n * @experimental Carried by the form provider contract's freeze.\n */\nexport interface FormFieldOption {\n /** What is sent when it is chosen. */\n readonly value: string;\n /** What a visitor reads. */\n readonly label: string;\n}\n\n/**\n * One field of a described form, in a neutral shape the Form block draws.\n *\n * @experimental Carried by the form provider contract's freeze. A new field\n * feature needs a change here, which is why the contract stays experimental.\n */\nexport interface FormFieldDescription {\n /**\n * The name its answer is sent under; unique within the form. A name\n * starting with `_` is the form receiver's own, and a form naming a field\n * with one is not drawn.\n */\n readonly name: string;\n /** What its label says. */\n readonly label: string;\n /** Which control is drawn. */\n readonly kind: FormFieldKind;\n /** Whether an empty answer is refused. */\n readonly required?: boolean;\n /** A line of help under the control. */\n readonly help?: string;\n /** Example text shown in an empty control. */\n readonly placeholder?: string;\n /** The choices of a `select`, `radio` or `checkbox` field. */\n readonly options?: readonly FormFieldOption[];\n /** The file types a `file` field takes, as the `accept` attribute. */\n readonly accept?: string;\n /** The smallest number or earliest date accepted. */\n readonly min?: number;\n /** The largest number or latest date accepted. */\n readonly max?: number;\n /** A pattern the answer must match, as the `pattern` attribute. */\n readonly pattern?: string;\n /**\n * Opaque values the provider's own script reads (drawn as `data-*`), such\n * as a conditional field's condition. The page builder never reads them.\n */\n readonly provider?: Readonly<Record<string, string>>;\n}\n\n/**\n * What a visitor sees once a send is accepted: a message in place of the\n * form, or another page of the same site.\n *\n * @experimental Carried by the form provider contract's freeze.\n */\nexport type FormAfterSending =\n | { readonly kind: \"message\"; readonly message: string }\n | {\n readonly kind: \"page\";\n /** A path of the same site; anything else sends the visitor back to the form's page. */\n readonly href: string;\n };\n\n/**\n * A form as its provider describes it, for the Form block to draw.\n *\n * @experimental Carried by the form provider contract's freeze.\n */\nexport interface FormDescription {\n /** The provider's own reference to the form, as stored in a block. */\n readonly ref: string;\n readonly title: string;\n /** In display order. */\n readonly fields: readonly FormFieldDescription[];\n readonly submitText: string;\n /** The form's own setting; a block may choose another. */\n readonly afterSending: FormAfterSending;\n /** How the browser sends it: `multipart` when a field takes a file. */\n readonly encoding: \"urlencoded\" | \"multipart\";\n /**\n * A module the provider needs on pages drawing this form (a bot check's\n * widget, say), and why. The page builder adds it only to those pages.\n */\n readonly script?: { readonly module: string; readonly reason: string };\n}\n\n/**\n * Why a provider has no form to describe: it exists and takes no answers\n * now (`closed`), or there is none by that reference for this reader\n * (`missing`).\n *\n * @experimental Carried by the form provider contract's freeze.\n */\nexport interface FormUnavailable {\n readonly unavailable: \"closed\" | \"missing\";\n /** What a visitor reads in place of a closed form, as its author wrote it. */\n readonly message?: string;\n}\n\n/**\n * One form a provider lists for an author to pick.\n *\n * @experimental Carried by the form provider contract's freeze.\n */\nexport interface FormListing {\n readonly ref: string;\n readonly title: string;\n readonly state: \"draft\" | \"published\" | \"closed\";\n /** Where the author edits it in the admin. */\n readonly editHref?: string;\n}\n\n/**\n * Whom a provider reads a form as. Handed straight to `ctx.services` as its\n * options: `public` is an anonymous visitor, with every access rule applied;\n * `user` is a signed-in author, with their own rights.\n *\n * @experimental Carried by the form provider contract's freeze.\n */\nexport type FormAccess =\n | { readonly as: \"public\" }\n | {\n readonly as: \"user\";\n readonly user: AuthUser;\n readonly authenticatedScope?: AuthenticatedScope;\n };\n\n/**\n * A post's answers, by field name, each with every value sent under it.\n * Only the fields the form describes reach a provider: the receiver trims\n * every other name, its own hidden fields among them.\n *\n * @experimental Carried by the form provider contract's freeze.\n */\nexport type FormAnswers = ReadonlyMap<string, readonly string[]>;\n\n/**\n * One post, as the page builder's receiver hands it to the provider.\n *\n * @experimental Carried by the form provider contract's freeze.\n */\nexport interface FormPost {\n readonly answers: FormAnswers;\n /** The language of the page the form was sent from, when the site has several. */\n readonly locale?: string;\n /**\n * The visitor's request, for the provider's own checks: its client address\n * for a rate limit, its headers for a bot check. Its body is already read.\n */\n readonly request: Request;\n}\n\n/**\n * What became of a post, as the provider says.\n *\n * - `sent`: accepted. `afterSending` overrides the form's own setting.\n * - `invalid`: answers refused, each with the field it names.\n * - `closed`: the form takes no answers now.\n * - `failed`: anything else; the visitor is asked to try again.\n *\n * @experimental Carried by the form provider contract's freeze.\n */\nexport type FormAcceptResult =\n | { readonly kind: \"sent\"; readonly afterSending?: FormAfterSending }\n | {\n readonly kind: \"invalid\";\n readonly issues: readonly {\n readonly field: string;\n readonly message: string;\n }[];\n }\n | { readonly kind: \"closed\"; readonly message?: string }\n | { readonly kind: \"failed\" };\n\n/**\n * A source of forms the Form block can draw and the page builder's receiver\n * hands posts to, such as the forms plugin.\n *\n * Every rule about a provider's forms — which exist, how answers are\n * checked, stored and sent, spam checks beyond the receiver's own — stays in\n * the provider. The page builder draws what `describe` gives and passes on\n * what a visitor sent; it knows nothing else about a provider's forms.\n *\n * Registered from the provider plugin's `init` through the page builder's\n * cross-plugin `forms` service ({@link FormProviderService}).\n *\n * @experimental The form provider contract is new; its names and shape may\n * change until the forms plugin and one outside provider have used it.\n */\nexport interface FormProvider {\n /**\n * Stable, and stored in every block that picks one of its forms: lower\n * case letters, digits and `-`, 1 to 64 characters. `simple` is the page\n * builder's own and cannot be registered.\n */\n readonly id: string;\n /** What authors read: \"Forms\" in \"Fields … come from Forms.\" */\n readonly label: string;\n /** The forms an author may pick, read with the author's own rights. */\n list(access: FormAccess): Promise<readonly FormListing[]>;\n /**\n * One form, for the live page (as the public: published and open forms\n * only) and for the canvas (as the author).\n */\n describe(\n ref: string,\n options: { readonly access: FormAccess; readonly locale?: string }\n ): Promise<FormDescription | FormUnavailable>;\n /**\n * Take one post. Called by the receiver in the same process, after its own\n * spam trap, size limits and field trim; the provider applies every rule of\n * its own.\n */\n accept(ref: string, post: FormPost): Promise<FormAcceptResult>;\n}\n\n/**\n * The page builder's cross-plugin `forms` service, as a provider plugin\n * reaches it: `ctx.services.plugins[\"@nextlyhq/plugin-page-builder\"].forms`.\n * Resolve it from `init`. Registering an `id` already registered throws.\n *\n * @experimental Carried by the form provider contract's freeze.\n */\nexport interface FormProviderService {\n register(provider: FormProvider): void;\n}\n\n/**\n * The group of the page builder's Page checks list a provider's findings are\n * listed under: Accessibility, Content and data, Publishing, or Search.\n *\n * @experimental The page check provider contract is new; its names and shape\n * may change before the page builder's checks are marked stable.\n */\nexport type PageCheckGroupName =\n | \"accessibility\"\n | \"content\"\n | \"publishing\"\n | \"search\";\n\n/**\n * The page a provider is asked about: the collection and entry being edited,\n * its language, and its blocks as the editor holds them, unsaved changes\n * included. A provider that judges what it stores reads the saved entry, and\n * its findings then follow the last save.\n *\n * @experimental Carried by the page check provider contract.\n */\nexport interface PageCheckRequest {\n readonly collection: string;\n /** The entry; null for a page not saved yet. */\n readonly entryId: string | null;\n readonly locale?: string;\n /** The page's blocks as the editor holds them, read as stored data. */\n readonly document: unknown;\n}\n\n/**\n * Where a finding is fixed: a block's setting, by the tab it is on and its\n * id as the inspector names it, or a tab of Page settings, by its id.\n *\n * @experimental Carried by the page check provider contract.\n */\nexport type PageCheckFix =\n | {\n readonly tab: \"content\" | \"style\" | \"advanced\";\n readonly id: string;\n }\n | { readonly settingsTab: string };\n\n/**\n * One problem a provider finds, in the plain words an author reads: what is\n * wrong, why it matters, and what to do.\n *\n * @experimental Carried by the page check provider contract.\n */\nexport interface PageCheckFinding {\n /** The block it is about; absent for the page as a whole. */\n readonly nodeId?: string;\n /** Which of several problems on one block this is. */\n readonly part?: string;\n readonly what: string;\n readonly why: string;\n readonly todo: string;\n /** Where choosing it takes the author; absent, only its block is selected. */\n readonly fix?: PageCheckFix;\n}\n\n/**\n * A plugin's page check: findings about the page being edited, listed in\n * the page builder's Page checks with the built-in ones, in `group`. It runs\n * on the server, as the person editing (`access`), and never blocks a save\n * or a publish.\n *\n * @experimental The page check provider contract is new; its names and shape\n * may change before the page builder's checks are marked stable.\n */\nexport interface PageCheckProvider {\n /** Lower case letters, digits and `-`, unique among a site's providers. */\n readonly id: string;\n readonly group: PageCheckGroupName;\n check(\n page: PageCheckRequest,\n options: { readonly access: Extract<FormAccess, { as: \"user\" }> }\n ): Promise<readonly PageCheckFinding[]>;\n}\n\n/**\n * The page builder's cross-plugin `pageChecks` service, as a provider plugin\n * reaches it: `ctx.services.plugins[\"@nextlyhq/plugin-page-builder\"].pageChecks`.\n * Resolve it from `init`, before or after the page builder's own. Registering\n * an `id` already registered throws.\n *\n * @experimental Carried by the page check provider contract.\n */\nexport interface PageCheckProviderService {\n register(provider: PageCheckProvider): void;\n}\n\n// ---------------------------------------------------------------------------\n// Starter pages\n// ---------------------------------------------------------------------------\n\n/**\n * One block as a page stores it: its type, version, props, styles and the\n * blocks in its slots. What a starter page is made of.\n *\n * @experimental Carried by the starter page contract.\n */\nexport type { BlockNode } from \"@nextlyhq/blocks-engine\";\n\n/**\n * A starter page: a ready-made page body an author can start a new page\n * from, in the New page dialog's \"Start from\" and on an empty page's\n * \"or start from a page\" row.\n *\n * A starter is copied once. Its blocks become the page's own, each with a\n * new id, so a later change to the starter in code never reaches a page made\n * from it, and a change on the page never reaches the starter. It fills the\n * page's body only: the header and footer are the ones the author chose.\n *\n * Its preview is drawn from its blocks, in the site's own colours and fonts,\n * so style its blocks with the site's variables (`{ $token: \"color.primary\" }`)\n * rather than raw colours.\n *\n * A site registers its own with `pageBuilder({ starterPages })`; a plugin\n * declares them under\n * `contributes.declarations[\"@nextlyhq/plugin-page-builder\"].starterPages`.\n * Each is checked at start-up, and the site does not start while one is\n * refused: an id that is malformed or used twice, a block the site doesn't\n * have, a placed component, a picture or an address to load from, or blocks\n * the page builder's own validation refuses. Leave an Image empty: the author\n * picks the site's own picture.\n *\n * A starter whose blocks, variables or shared styles the site no longer has\n * is left out of the list, never offered half-drawn.\n *\n * @experimental The starter page contract is new; its names and shape may\n * change before the page builder's starter pages are marked stable.\n */\nexport interface StarterPageDefinition {\n /**\n * Lower case letters, digits and `-`, 1 to 64 characters, unique among a\n * site's starter pages.\n */\n readonly id: string;\n /** Its name, as the author reads it: \"Landing\", \"About us\". */\n readonly label: string;\n /** One short sentence saying what the page holds. */\n readonly description: string;\n /** The page body's blocks, top to bottom. */\n readonly blocks: readonly EngineBlockNode[];\n}\n\n/**\n * Declare a starter page. Returns its argument unchanged; it exists so an\n * editor checks the shape where the starter is written.\n *\n * @experimental Carried by the starter page contract.\n */\nexport function defineStarterPage(\n starter: StarterPageDefinition\n): StarterPageDefinition {\n return starter;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AA6QA,SAAgB,YACd,YACoB;CACpB,OAAO;AACT;;;;;;;;;;;;;;;;;;;;;;;;;AA0BA,SAAgB,cACd,UACe;CACf,OAAO;AACT;;;;;;;AAshBA,SAAgB,kBACd,SACuB;CACvB,OAAO;AACT"}
@@ -0,0 +1,58 @@
1
+ import { Action, AddressHolder, AddressableField, AddressableFieldsOptions, AdminBlockContribution, AdminBulkActionContribution, AdminColumnContribution, AdminContribution, AdminContributionAction, AdminContributionKind, AdminPlaceId, AdminPlaces, AdminRowActionContribution, AdminSidebarSectionContribution, AdminTabContribution, AdmittedReservation, AdvisoryNotice, AnyWidget as AnyWidget$1, AttentionCount, AttentionItem, AuthEventName, AuthEvents, AuthHookName, AuthHooks, AuthInput, AuthLimitAnswer, AuthOutcome, AuthStrategy, AuthUser, AuthenticatedScope, AuthorableFieldConfig, AuthoredDraftSplitCollection, AutosaveSupersession, AutosaveWriteResult, BatchOperationResult, BeforeOperationArgs, BeforeOperationContext, BeforeOperationHandler, BreachedPasswordsConfig, BulkUpdateEntry, CORE_ADMIN_PLACES, Challenge, ChallengeDefinition, ClaimDeliveryOptions, CollectionConfig, CompleteLoginOptions, ComponentPath, ContentEventRecord, ContentEventSubject, ContentTypeCandidate, ContentTypeKind, ContentTypeScope, CoreAdminPlaceId, CoreFilterSeam, CoreView, DEFAULT_ADMIN_PATH, Decision, DeliveryClaim, DeliveryClaimResult, DocumentEventName, DocumentEvents, DocumentFieldRewriteRequest, DraftSplitDisabledReason, DraftSplitEligibility, DurableEvent, DurableHandler, EXTENSION_SWITCH_SERVICE, EmailAfterSendValue, EmailFilterContext, EmailPayloadFilterValue, EmailProviderCapabilities, EmailProviderConfigField, EmailProviderDefinition, EmailProviderDescriptor, EmailTemplateData, EmailTemplateReference, EmailTemplateReferencesContext, EntryVerdict, EventBus, EventEnvelope, EventHandler, EventName, ExtendedType, ExtensionSwitch, FRAMEWORK_CRAWL_EXCLUSIONS, FieldAdminOptions, FieldConfig, FieldRewriteCopy, FieldRewriteRequest, FieldRewriteResult, FieldRewriteValue, FieldValueDeclaration, FieldValueDeclarationInput, Filter, FilterSeams, ForgetSendsInput, FrozenCopy, FrozenValue, GrantedPermission, GridSize, HeldAddress, HeldAddressUpdate, HeldDocument, HookContext, HookContextPhase, HookHandler, HookPointContext, HookPointNameOf, HookPointPayload, HookPointPayloads, HookPointValue, HookType, InTransactionContext, InTransactionHandler, InboundWebhookDelivery, InboundWebhookReading, InboundWebhookScheme, JobContext, JobDefinition, JobDefinitionInput, JobInputFor, JobRetryPolicy, JobSlug, JsonObject, JsonValue, KeptAddress, KeyedDigests, LanguageAddress, LanguageAddressRule, LimitCheck, LimitEntry, LimitOutcome, LimitReservation, LimitRule, LimitTarget, ListQueryFilterContext, ListQueryWhere, MAX_ATTENTION_ITEMS_PER_PLUGIN, MAX_EMAIL_PROVIDER_TYPE_LENGTH, MAX_JOB_SLUG_LENGTH, MAX_WIDGET_ROWS, MEDIA_COPY_WIDTHS, MediaCopy, MediaCopySource, MediaCopyWidth, MediaEventName, MediaEvents, Middleware, NavCollectionItem, NavFilterContext, NextlyError, NextlyPrincipals, OneTimeSecrets, OpaqueSecrets, OverridableDocumentAction, PLUGIN_CATEGORIES, PaginatedResult, PaginationMeta, ParticipantTransaction, PasswordCheck, PasswordHelper, PasswordRules, PasswordTooLongError, PendingEditCursor, PendingEditOrder, PermissionSlug, PluginActionRegistry, PluginAdminContributions, PluginAdminPage, PluginAdminPanel, PluginAdminPlaceDeclaration, PluginAuditApi, PluginAuditDeclaration, PluginAuthApi, PluginCacheApi, PluginCapabilities, PluginCategory, PluginCollectionService, PluginCollectionTransaction, PluginCollectionView, PluginConditionalUpdate, PluginConditionalWriteIdentity, PluginConfig, PluginContext, PluginContext as PluginContext$1, PluginContributions, PluginDataFieldConfig, PluginDatabase, PluginDeclaration, PluginDefinition, PluginDeleteCheck, PluginDocumentActionOverride, PluginDocumentActionOverrides, PluginDurableEvents, PluginEmailProvider, PluginEmailService, PluginEmailSettings, PluginEmailTemplate, PluginEmitOptions, PluginEvents, PluginFieldCodegen, PluginFieldCodegenImport, PluginFieldInput, PluginFieldInstance, PluginFieldIssue, PluginFieldType, PluginFieldValidateArgs, PluginFieldValidationResult, PluginFieldWrite, PluginFieldWriteCaller, PluginFilterRegistry, PluginHeaderContributions, PluginHeaderSlotContributions, PluginHeaderUserMenuContributions, PluginHookPointDeclaration, PluginHookRegistry, PluginInsert, PluginItemCount, PluginItemPlace, PluginJobsNamespace, PluginLimiter, PluginListFilterDeclaration, PluginListFilterOption, PluginMediaService, PluginMenuItem, PluginMenuItemFields, PluginNavSection, PluginPageStartupRead, PluginPanelGroup, PluginPanelSection, PluginPermission, PluginPinOptions, PluginPinTransaction, PluginPrincipalsApi, PluginProxyHandler, PluginPublicAddresses, PluginRawDatabase, PluginReceivedWebhooks, PluginRole, PluginRoute, PluginRouteCaller, PluginRouteCanOptions, PluginRouteContext, PluginRouteHandler, PluginRouteIdentity, PluginRouteLimitKey, PluginRouteMount, PluginRoutePermissionResolver, PluginRoutePermissionScope, PluginRoutePrincipal, PluginRouteRateLimit, PluginSchedule, PluginSecurityApi, PluginSettingsApi, PluginSingleRecord, PluginSinglesResult, PluginSinglesService, PluginStoredDocument, PluginStoredFields, PluginStoredFieldsRequest, PluginStoredIdentity, PluginStoredLifecycle, PluginStoredValue, PluginStoredValueTarget, PluginSummary, PluginSystemCheckedWrite, PluginSystemIdentity, PluginTransaction, PluginTransactionBounds, PluginTranslations, PluginUserMenuAction, PluginUserMenuItem, PluginUserMenuLink, PluginUserService, PluginVersionPin, PluginVersionPinHolder, PluginVersionPins, PluginVersionsService, PluginWebhookEventType, PluginWriteCheck, PluginWriteExpectation, Principal, PrincipalAnswer, PrincipalAttributeDescriptors, PrincipalAttributeType, PrincipalAttributeTypeOf, PrincipalAttributeValue, PrincipalAttributes, PrincipalAttributesOf, PrincipalKindContribution, PrincipalKindDefinition, PrincipalRecord, PrincipalRef, PrincipalReportOptions, ProviderAvailability, ProxyAnswer, PublicAddress, PublicAddressParticipant, PublicAddressTemplateContext, PublicAddressType, QueryOptions, QueueJobArgs, QueueJobResult, QueuedEmailCancelCause, QueuedEmailChange, QueuedEmailChangeHandler, QueuedEmailRecipient, QueuedEmailStanding, QueuedEmailStatus, QueuedRecipientOutcome, ReadCaller, ReadableContent, ReadableContentCaller, ReadableContentEntity, RefusedAddressUpdate, RegisteredEmailProvider, RequestContext, ResolvedDraftSplitCollection, ResolverOptions, RestoreVersionResult, RouteMethod, RowPredicate, RowPredicateValue, RunAsPrincipal, ScheduledTask, SecretData, SerializedFieldConfig, ServiceOpts, SettingEditorProps, SingleFieldRewriteRequest, SubjectEventsQuery, TIMESERIES_INTERVALS, TimeseriesInterval, TrustedHtml, TxOption, UnvalidatedAddressableField, UserCreatedPayload, UserDeletedPayload, UserEventName, UserEvents, ValidateFieldValuesOptions, ValidationIssue, VerifiedWebhook, VerifyWebhookOptions, VersionListOptions, VersionMeta, VersionPinHolderDefinition, VersionRef, VersionRow, VersionStatus, WIDGET_CONDITIONS, WIDGET_LIFECYCLES, WIDGET_OPS, WIDGET_SOURCE_FIELD_TYPES, WIDGET_SOURCE_KINDS, WebhookRefusal, WebhookVerification, WidgetAccess, WidgetAccessGate, WidgetCondition, WidgetData as WidgetData$1, WidgetFieldChoice, WidgetInterval, WidgetLifecycle, WidgetLoadSize, WidgetOp, WidgetPreviewCase, WidgetProps, WidgetQuery, WidgetRange, WidgetReadServices, WidgetRenderSize, WidgetScope, WidgetSetting, WidgetSizeDeclaration, WidgetSource, WidgetSourceField, WidgetSourceFieldType, WidgetSourceKind, WidgetSourceResolver, WidgetSummary, WidgetSummaryCount, WidgetView, addressOfRequest, addressableFields, callerReadOptions, checkbox, collectDeclarations, collectionDraftSplit, date, defineAttentionItem, defineEmailProvider, defineJob, definePlugin, defineWidget, failRenderWhenUnavailable, getCachedNextly, group, isContentTypeScope, isLocaleSelector, isNextlyUnavailable, isPluginCategory, isTimeseriesInterval, json, languageAddressOf, listEntries, listPageNumber, listPageOf, markHtml, mayDeleteEntry, mayWriteEntry, narrowScope, nearestMediaCopyWidth, nextlyTags, number, option, pluginAdminSlug, pluginCacheTag, pluginField, publicAddressOf, readStoredFields, readableContent, recordAdvisoryNotice, resolvedCollectionDraftSplit, resolvedCollectionView, respondAction, respondDoc, respondList, respondMutation, routePathIsLiteral, rowsThatFit, sanitizeAdminPath, setting, standardWebhooks, storedValueHash, text, textarea, trustedClientIp, typesExtendedBy, typesReachedBy, typesWithoutAddress, updateIfUnchanged, upload, validateFieldValues } from "nextly";
2
+ import { ChartSlot as WidgetChartSlot, chartColour as widgetChartColour, formatChange as formatWidgetChange, formatCount as formatWidgetNumber } from "@nextlyhq/ui/format";
3
+ import { previewUrlFromTemplate, readableTitleText } from "nextly/config";
4
+ import { humanizeFieldName } from "nextly/field-label";
5
+ import { PENDING_CHANGE_KEY } from "nextly/reserved-filter-keys";
6
+ import { PageImagePreview, PageListItem, PageMetadataAnswer, PageMetadataImage, PageMetadataInput, PageMetadataResolver, PageMetadataSource, PageMetadataValues, PageQuestion, PageRobots, PageStructuredDataHints, isDraftModeRequest } from "nextly/runtime";
7
+ import { PluginFieldTypeSetting, PluginFieldTypeSettingBase } from "nextly/field-catalog";
8
+ /**
9
+ * @experimental A secret value that auto-redacts at every common leak vector —
10
+ * `JSON.stringify` (`toJSON`), `String()`/template interpolation (`toString`),
11
+ * and `console.log`/`util.inspect` (the node inspect symbol). The real value is
12
+ * available only via the explicit, greppable `.reveal()`. Wrap secret config /
13
+ * env values (D37): `secret(process.env.API_KEY)`.
14
+ */
15
+ declare class Secret<T = string> {
16
+ #private;
17
+ constructor(value: T);
18
+ /** Return the underlying secret value. The only way to read it. */
19
+ reveal(): T;
20
+ toJSON(): string;
21
+ toString(): string;
22
+ }
23
+ /** @experimental Wrap a value so it redacts unless explicitly `.reveal()`ed (D37). */
24
+ declare function secret<T>(value: T): Secret<T>;
25
+ /** @experimental True if `value` is a {@link Secret}. */
26
+ declare function isSecret(value: unknown): value is Secret<unknown>;
27
+ /**
28
+ * @experimental Review state for the person or API key a plugin acts for:
29
+ * `ctx.services.workflows` (`PluginWorkflowsService`), reading a document's review state
30
+ * (`PluginWorkflowReview`), what waits for the caller (`PluginWorkflowWaitingQuery`,
31
+ * `PluginWorkflowWaitingPart`) and the definition of the workflow attached to a collection or
32
+ * Single (`PluginWorkflowDefinition`), and submitting for review (`PluginWorkflowSubmitInput`,
33
+ * `PluginWorkflowSeenPart`, `PluginWorkflowSubmitResult`), each document or entity named as
34
+ * `PluginWorkflowDocumentRef` or `PluginWorkflowEntityRef` names it. Each is read off the service's own signature, so the names
35
+ * here cannot drift from what the service takes and returns. Experimental until review through
36
+ * plugins is finished: its shape may still change.
37
+ */
38
+ type PluginWorkflowsService = PluginContext["services"]["workflows"];
39
+ /** @experimental A collection or a Single, as `definitionOf` names it. */
40
+ type PluginWorkflowEntityRef = Parameters<PluginWorkflowsService["definitionOf"]>[0];
41
+ /** @experimental A document, as `reviewState` names it. */
42
+ type PluginWorkflowDocumentRef = Parameters<PluginWorkflowsService["reviewState"]>[0]["document"];
43
+ /** @experimental A workflow's stages and steps, as `definitionOf` tells them. */
44
+ type PluginWorkflowDefinition = NonNullable<Awaited<ReturnType<PluginWorkflowsService["definitionOf"]>>["workflow"]>;
45
+ /** @experimental A document's review state, part by part, as `reviewState` tells it. */
46
+ type PluginWorkflowReview = Awaited<ReturnType<PluginWorkflowsService["reviewState"]>>;
47
+ /** @experimental A page of what waits for the caller, as `waiting` takes it. */
48
+ type PluginWorkflowWaitingQuery = NonNullable<Parameters<PluginWorkflowsService["waiting"]>[0]>;
49
+ /** @experimental A part waiting for the caller, as `waiting` lists it. */
50
+ type PluginWorkflowWaitingPart = Awaited<ReturnType<PluginWorkflowsService["waiting"]>>["items"][number];
51
+ /** @experimental A submit for review, as `submit` takes it. */
52
+ type PluginWorkflowSubmitInput = Parameters<PluginWorkflowsService["submit"]>[0];
53
+ /** @experimental A part as the caller saw it, as a submit names it. */
54
+ type PluginWorkflowSeenPart = PluginWorkflowSubmitInput["seen"][number];
55
+ /** @experimental What a submit moved and left, as `submit` tells it. */
56
+ type PluginWorkflowSubmitResult = Awaited<ReturnType<PluginWorkflowsService["submit"]>>;
57
+ export { CoreAdminPlaceId as $, PublicAddressType as $a, PluginSinglesResult as $i, PageMetadataImage as $n, WIDGET_SOURCE_FIELD_TYPES as $o, PluginFieldInstance as $r, isTimeseriesInterval as $s, HookPointContext as $t, AuthenticatedScope as A, PluginWorkflowWaitingPart as Aa, sanitizeAdminPath as Ac, PluginPinTransaction as Ai, MAX_ATTENTION_ITEMS_PER_PLUGIN as An, SubjectEventsQuery as Ao, PluginCollectionView as Ar, addressOfRequest as As, ExtensionSwitch as At, BulkUpdateEntry as B, PrincipalAttributeValue as Ba, updateIfUnchanged as Bc, PluginRouteContext as Bi, Middleware as Bn, ValidateFieldValuesOptions as Bo, PluginDeleteCheck as Br, definePlugin as Bs, Filter as Bt, AuthHookName as C, PluginWorkflowDefinition as Ca, resolvedCollectionView as Cc, PluginMenuItemFields as Ci, LimitEntry as Cn, RunAsPrincipal as Co, PluginAuditDeclaration as Cr, WidgetSourceField as Cs, EmailTemplateReferencesContext as Ct, AuthOutcome as D, PluginWorkflowSeenPart as Da, respondMutation as Dc, PluginPanelSection as Di, LimitTarget as Dn, ServiceOpts as Do, PluginCategory as Dr, WidgetSummary as Ds, EventHandler as Dt, AuthLimitAnswer as E, PluginWorkflowReview as Ea, respondList as Ec, PluginPanelGroup as Ei, LimitRule as En, SerializedFieldConfig as Eo, PluginCapabilities as Er, WidgetSourceResolver as Es, EventEnvelope as Et, BatchOperationResult as F, Principal as Fa, textarea as Fc, PluginReceivedWebhooks as Fi, MediaCopy as Fn, UnvalidatedAddressableField as Fo, PluginContributions as Fr, collectionDraftSplit as Fs, FieldRewriteRequest as Ft, CollectionConfig as G, PrincipalRecord as Ga, isSecret as Gc, PluginRoutePermissionResolver as Gi, OneTimeSecrets as Gn, VersionMeta as Go, PluginEmailService as Gr, getCachedNextly as Gs, GrantedPermission as Gt, Challenge as H, PrincipalAttributesOf as Ha, validateFieldValues as Hc, PluginRouteIdentity as Hi, NavFilterContext as Hn, VerifiedWebhook as Ho, PluginDocumentActionOverrides as Hr, failRenderWhenUnavailable as Hs, ForgetSendsInput as Ht, BeforeOperationArgs as I, PrincipalAnswer as Ia, trustedClientIp as Ic, PluginRole as Ii, MediaCopySource as In, UserCreatedPayload as Io, PluginDataFieldConfig as Ir, date as Is, FieldRewriteResult as It, ContentEventRecord as J, ProviderAvailability as Ja, PluginRouteRateLimit as Ji, PENDING_CHANGE_KEY as Jn, VersionRow as Jo, PluginEmitOptions as Jr, isContentTypeScope as Js, HeldAddressUpdate as Jt, CompleteLoginOptions as K, PrincipalRef as Ka, secret as Kc, PluginRoutePermissionScope as Ki, OpaqueSecrets as Kn, VersionPinHolderDefinition as Ko, PluginEmailSettings as Kr, group as Ks, GridSize as Kt, BeforeOperationContext as L, PrincipalAttributeDescriptors as La, typesExtendedBy as Lc, PluginRoute as Li, MediaCopyWidth as Ln, UserDeletedPayload as Lo, PluginDatabase as Lr, defineAttentionItem as Ls, FieldRewriteValue as Lt, AuthoredDraftSplitCollection as M, PluginWorkflowsService as Ma, standardWebhooks as Mc, PluginProxyHandler as Mi, MAX_JOB_SLUG_LENGTH as Mn, TimeseriesInterval as Mo, PluginConditionalWriteIdentity as Mr, callerReadOptions as Ms, FieldAdminOptions as Mt, AutosaveSupersession as N, PluginWriteCheck as Na, storedValueHash as Nc, PluginPublicAddresses as Ni, MAX_WIDGET_ROWS as Nn, TrustedHtml as No, PluginConfig as Nr, checkbox as Ns, FieldConfig as Nt, AuthStrategy as O, PluginWorkflowSubmitInput as Oa, routePathIsLiteral as Oc, PluginPermission as Oi, ListQueryFilterContext as On, SettingEditorProps as Oo, PluginCollectionService as Or, WidgetSummaryCount as Os, EventName as Ot, AutosaveWriteResult as P, PluginWriteExpectation as Pa, text as Pc, PluginRawDatabase as Pi, MEDIA_COPY_WIDTHS as Pn, TxOption as Po, PluginContext$1 as Pr, collectDeclarations as Ps, FieldRewriteCopy as Pt, ContentTypeScope as Q, PublicAddressTemplateContext as Qa, PluginSingleRecord as Qi, PageMetadataAnswer as Qn, WIDGET_OPS as Qo, PluginFieldInput as Qr, isPluginCategory as Qs, HookHandler as Qt, BeforeOperationHandler as R, PrincipalAttributeType as Ra, typesReachedBy as Rc, PluginRouteCaller as Ri, MediaEventName as Rn, UserEventName as Ro, PluginDeclaration as Rr, defineEmailProvider as Rs, FieldValueDeclaration as Rt, AuthEvents as S, PluginWebhookEventType as Sa, resolvedCollectionDraftSplit as Sc, PluginMenuItem as Si, LimitCheck as Sn, RowPredicateValue as So, PluginAuditApi as Sr, WidgetSource as Ss, EmailTemplateReference as St, AuthInput as T, PluginWorkflowEntityRef as Ta, respondDoc as Tc, PluginPageStartupRead as Ti, LimitReservation as Tn, SecretData as To, PluginCacheApi as Tr, WidgetSourceKind as Ts, EventBus as Tt, ChallengeDefinition as U, PrincipalKindContribution as Ua, widgetChartColour as Uc, PluginRouteLimitKey as Ui, NextlyError as Un, VerifyWebhookOptions as Uo, PluginDurableEvents as Ur, formatWidgetChange as Us, FrozenCopy as Ut, CORE_ADMIN_PLACES as V, PrincipalAttributes as Va, upload as Vc, PluginRouteHandler as Vi, NavCollectionItem as Vn, ValidationIssue as Vo, PluginDocumentActionOverride as Vr, defineWidget as Vs, FilterSeams as Vt, ClaimDeliveryOptions as W, PrincipalKindDefinition as Wa, Secret as Wc, PluginRouteMount as Wi, NextlyPrincipals as Wn, VersionListOptions as Wo, PluginEmailProvider as Wr, formatWidgetNumber as Ws, FrozenValue as Wt, ContentTypeCandidate as X, PublicAddress as Xa, PluginSecurityApi as Xi, PageImagePreview as Xn, WIDGET_CONDITIONS as Xo, PluginFieldCodegen as Xr, isLocaleSelector as Xs, HookContext as Xt, ContentEventSubject as Y, ProxyAnswer as Ya, PluginSchedule as Yi, PLUGIN_CATEGORIES as Yn, VersionStatus as Yo, PluginEvents as Yr, isDraftModeRequest as Ys, HeldDocument as Yt, ContentTypeKind as Z, PublicAddressParticipant as Za, PluginSettingsApi as Zi, PageListItem as Zn, WIDGET_LIFECYCLES as Zo, PluginFieldCodegenImport as Zr, isNextlyUnavailable as Zs, HookContextPhase as Zt, AdvisoryNotice as _, PluginUserService as _a, publicAddressOf as _c, PluginJobsNamespace as _i, JsonValue as _n, ResolvedDraftSplitCollection as _o, PluginActionRegistry as _r, WidgetReadServices as _s, EmailProviderCapabilities as _t, AdminBlockContribution as a, PluginStoredLifecycle as aa, markHtml as ac, PluginFieldValidationResult as ai, InTransactionContext as an, QueuedEmailChangeHandler as ao, PageRobots as ar, WidgetChartSlot as as, DeliveryClaimResult as at, AttentionItem as b, PluginVersionPins as ba, readableTitleText as bc, PluginListFilterOption as bi, LanguageAddress as bn, RouteMethod as bo, PluginAdminPanel as br, WidgetSetting as bs, EmailProviderDescriptor as bt, AdminContribution as c, PluginSummary as ca, narrowScope as cc, PluginFilterRegistry as ci, InboundWebhookReading as cn, QueuedEmailStatus as co, PaginationMeta as cr, WidgetFieldChoice as cs, DocumentFieldRewriteRequest as ct, AdminPlaceId as d, PluginTransaction as da, number as dc, PluginHeaderUserMenuContributions as di, JobDefinition as dn, ReadableContent as do, PasswordHelper as dr, WidgetLoadSize as ds, DurableEvent as dt, PluginSinglesService as ea, json as ec, PluginFieldIssue as ei, HookPointNameOf as en, QueryOptions as eo, PageMetadataInput as er, WIDGET_SOURCE_KINDS as es, CoreFilterSeam as et, AdminPlaces as f, PluginTransactionBounds as fa, option as fc, PluginHookPointDeclaration as fi, JobDefinitionInput as fn, ReadableContentCaller as fo, PasswordRules as fr, WidgetOp as fs, DurableHandler as ft, AdmittedReservation as g, PluginUserMenuLink as ga, previewUrlFromTemplate as gc, PluginItemPlace as gi, JsonObject as gn, RequestContext as go, PermissionSlug as gr, WidgetRange as gs, EmailPayloadFilterValue as gt, AdminTabContribution as h, PluginUserMenuItem as ha, pluginField as hc, PluginItemCount as hi, JobSlug as hn, RegisteredEmailProvider as ho, PendingEditOrder as hr, WidgetQuery as hs, EmailFilterContext as ht, AddressableFieldsOptions as i, PluginStoredIdentity as ia, listPageOf as ic, PluginFieldValidateArgs as ii, HookType as in, QueuedEmailChange as io, PageQuestion as ir, WidgetAccessGate as is, DeliveryClaim as it, AuthorableFieldConfig as j, PluginWorkflowWaitingQuery as ja, setting as jc, PluginPrincipalsApi as ji, MAX_EMAIL_PROVIDER_TYPE_LENGTH as jn, TIMESERIES_INTERVALS as jo, PluginConditionalUpdate as jr, addressableFields as js, FRAMEWORK_CRAWL_EXCLUSIONS as jt, AuthUser as k, PluginWorkflowSubmitResult as ka, rowsThatFit as kc, PluginPinOptions as ki, ListQueryWhere as kn, SingleFieldRewriteRequest as ko, PluginCollectionTransaction as kr, WidgetView as ks, ExtendedType as kt, AdminContributionAction as l, PluginSystemCheckedWrite as la, nearestMediaCopyWidth as lc, PluginHeaderContributions as li, InboundWebhookScheme as ln, QueuedRecipientOutcome as lo, ParticipantTransaction as lr, WidgetInterval as ls, DraftSplitDisabledReason as lt, AdminSidebarSectionContribution as m, PluginUserMenuAction as ma, pluginCacheTag as mc, PluginInsert as mi, JobRetryPolicy as mn, RefusedAddressUpdate as mo, PendingEditCursor as mr, WidgetProps as ms, EmailAfterSendValue as mt, AddressHolder as n, PluginStoredFields as na, listEntries as nc, PluginFieldTypeSetting as ni, HookPointPayloads as nn, QueueJobResult as no, PageMetadataSource as nr, WebhookVerification as ns, DEFAULT_ADMIN_PATH as nt, AdminBulkActionContribution as o, PluginStoredValue as oa, mayDeleteEntry as oc, PluginFieldWrite as oi, InTransactionHandler as on, QueuedEmailRecipient as oo, PageStructuredDataHints as or, WidgetCondition as os, DocumentEventName as ot, AdminRowActionContribution as p, PluginTranslations as pa, pluginAdminSlug as pc, PluginHookRegistry as pi, JobInputFor as pn, ReadableContentEntity as po, PasswordTooLongError as pr, WidgetPreviewCase as ps, EXTENSION_SWITCH_SERVICE as pt, ComponentPath as q, PrincipalReportOptions as qa, PluginRoutePrincipal as qi, OverridableDocumentAction as qn, VersionRef as qo, PluginEmailTemplate as qr, humanizeFieldName as qs, HeldAddress as qt, AddressableField as r, PluginStoredFieldsRequest as ra, listPageNumber as rc, PluginFieldTypeSettingBase as ri, HookPointValue as rn, QueuedEmailCancelCause as ro, PageMetadataValues as rr, WidgetAccess as rs, Decision as rt, AdminColumnContribution as s, PluginStoredValueTarget as sa, mayWriteEntry as sc, PluginFieldWriteCaller as si, InboundWebhookDelivery as sn, QueuedEmailStanding as so, PaginatedResult as sr, WidgetData$1 as ss, DocumentEvents as st, Action as t, PluginStoredDocument as ta, languageAddressOf as tc, PluginFieldType as ti, HookPointPayload as tn, QueueJobArgs as to, PageMetadataResolver as tr, WebhookRefusal as ts, CoreView as tt, AdminContributionKind as u, PluginSystemIdentity as ua, nextlyTags as uc, PluginHeaderSlotContributions as ui, JobContext as un, ReadCaller as uo, PasswordCheck as ur, WidgetLifecycle as us, DraftSplitEligibility as ut, AnyWidget$1 as v, PluginVersionPin as va, readStoredFields as vc, PluginLimiter as vi, KeptAddress as vn, ResolverOptions as vo, PluginAdminContributions as vr, WidgetRenderSize as vs, EmailProviderConfigField as vt, AuthHooks as w, PluginWorkflowDocumentRef as wa, respondAction as wc, PluginNavSection as wi, LimitOutcome as wn, ScheduledTask as wo, PluginAuthApi as wr, WidgetSourceFieldType as ws, EntryVerdict as wt, AuthEventName as x, PluginVersionsService as xa, recordAdvisoryNotice as xc, PluginMediaService as xi, LanguageAddressRule as xn, RowPredicate as xo, PluginAdminPlaceDeclaration as xr, WidgetSizeDeclaration as xs, EmailTemplateData as xt, AttentionCount as y, PluginVersionPinHolder as ya, readableContent as yc, PluginListFilterDeclaration as yi, KeyedDigests as yn, RestoreVersionResult as yo, PluginAdminPage as yr, WidgetScope as ys, EmailProviderDefinition as yt, BreachedPasswordsConfig as z, PrincipalAttributeTypeOf as za, typesWithoutAddress as zc, PluginRouteCanOptions as zi, MediaEvents as zn, UserEvents as zo, PluginDefinition as zr, defineJob as zs, FieldValueDeclarationInput as zt };
58
+ //# sourceMappingURL=index-BkyjglVd.d.ts.map
package/dist/index.d.ts CHANGED
@@ -1,28 +1,2 @@
1
- import { Action, AddressHolder, AddressableField, AddressableFieldsOptions, AdminBlockContribution, AdminBulkActionContribution, AdminColumnContribution, AdminContribution, AdminContributionAction, AdminContributionKind, AdminPlaceId, AdminPlaces, AdminRowActionContribution, AdminSidebarSectionContribution, AdminTabContribution, AdmittedReservation, AdvisoryNotice, AnyWidget, AttentionCount, AttentionItem, AuthEventName, AuthEvents, AuthHookName, AuthHooks, AuthInput, AuthLimitAnswer, AuthOutcome, AuthStrategy, AuthUser, AuthenticatedScope, AuthorableFieldConfig, AuthoredDraftSplitCollection, BatchOperationResult, BeforeOperationArgs, BeforeOperationContext, BeforeOperationHandler, BreachedPasswordsConfig, BulkUpdateEntry, CORE_ADMIN_PLACES, Challenge, ChallengeDefinition, ClaimDeliveryOptions, CollectionConfig, CompleteLoginOptions, ComponentPath, ContentTypeCandidate, ContentTypeKind, ContentTypeScope, CoreAdminPlaceId, CoreFilterSeam, CoreView, DEFAULT_ADMIN_PATH, Decision, DeliveryClaim, DeliveryClaimResult, DocumentEventName, DocumentEvents, DocumentFieldRewriteRequest, DraftSplitDisabledReason, DraftSplitEligibility, DurableEvent, DurableHandler, EXTENSION_SWITCH_SERVICE, EmailAfterSendValue, EmailFilterContext, EmailPayloadFilterValue, EmailProviderCapabilities, EmailProviderConfigField, EmailProviderDefinition, EmailProviderDescriptor, EmailTemplateData, EntryVerdict, EventBus, EventEnvelope, EventHandler, EventName, ExtendedType, ExtensionSwitch, FRAMEWORK_CRAWL_EXCLUSIONS, FieldAdminOptions, FieldConfig, FieldRewriteCopy, FieldRewriteRequest, FieldRewriteResult, FieldRewriteValue, FieldValueDeclaration, FieldValueDeclarationInput, Filter, FilterSeams, ForgetSendsInput, FrozenCopy, FrozenValue, GrantedPermission, GridSize, HeldAddress, HeldAddressUpdate, HeldDocument, HookContext, HookContextPhase, HookHandler, HookPointContext, HookPointNameOf, HookPointPayload, HookPointPayloads, HookPointValue, HookType, InTransactionContext, InTransactionHandler, InboundWebhookDelivery, InboundWebhookReading, InboundWebhookScheme, JobContext, JobDefinition, JobDefinitionInput, JobInputFor, JobRetryPolicy, JobSlug, JsonObject, JsonValue, KeptAddress, KeyedDigests, LanguageAddress, LanguageAddressRule, LimitCheck, LimitEntry, LimitOutcome, LimitReservation, LimitRule, LimitTarget, ListQueryFilterContext, ListQueryWhere, MAX_ATTENTION_ITEMS_PER_PLUGIN, MAX_EMAIL_PROVIDER_TYPE_LENGTH, MAX_JOB_SLUG_LENGTH, MAX_WIDGET_ROWS, MediaEventName, MediaEvents, Middleware, NavCollectionItem, NavFilterContext, NextlyError, NextlyPrincipals, OneTimeSecrets, OpaqueSecrets, OverridableDocumentAction, PLUGIN_CATEGORIES, PaginatedResult, PaginationMeta, ParticipantTransaction, PasswordCheck, PasswordHelper, PasswordRules, PasswordTooLongError, PermissionSlug, PluginActionRegistry, PluginAdminContributions, PluginAdminPage, PluginAdminPanel, PluginAdminPlaceDeclaration, PluginAuditApi, PluginAuditDeclaration, PluginAuthApi, PluginCacheApi, PluginCapabilities, PluginCategory, PluginCollectionService, PluginCollectionTransaction, PluginCollectionView, PluginConditionalUpdate, PluginConditionalWriteIdentity, PluginConfig, PluginContext, PluginContributions, PluginDataFieldConfig, PluginDatabase, PluginDeclaration, PluginDefinition, PluginDeleteCheck, PluginDocumentActionOverride, PluginDocumentActionOverrides, PluginDurableEvents, PluginEmailProvider, PluginEmailService, PluginEmailSettings, PluginEmailTemplate, PluginEmitOptions, PluginEvents, PluginFieldCodegen, PluginFieldCodegenImport, PluginFieldInput, PluginFieldInstance, PluginFieldIssue, PluginFieldType, PluginFieldValidateArgs, PluginFieldValidationResult, PluginFieldWrite, PluginFilterRegistry, PluginHeaderContributions, PluginHeaderSlotContributions, PluginHeaderUserMenuContributions, PluginHookPointDeclaration, PluginHookRegistry, PluginInsert, PluginItemCount, PluginItemPlace, PluginJobsNamespace, PluginLimiter, PluginListFilterDeclaration, PluginListFilterOption, PluginMediaService, PluginMenuItem, PluginMenuItemFields, PluginNavSection, PluginPageStartupRead, PluginPanelGroup, PluginPanelSection, PluginPermission, PluginPinOptions, PluginPinTransaction, PluginPrincipalsApi, PluginProxyHandler, PluginPublicAddresses, PluginRawDatabase, PluginReceivedWebhooks, PluginRole, PluginRoute, PluginRouteCaller, PluginRouteCanOptions, PluginRouteContext, PluginRouteHandler, PluginRouteIdentity, PluginRouteLimitKey, PluginRouteMount, PluginRoutePermissionResolver, PluginRoutePermissionScope, PluginRoutePrincipal, PluginRouteRateLimit, PluginSchedule, PluginSecurityApi, PluginSettingsApi, PluginSingleRecord, PluginSinglesResult, PluginSinglesService, PluginStoredDocument, PluginStoredFields, PluginStoredFieldsRequest, PluginStoredIdentity, PluginStoredLifecycle, PluginStoredValue, PluginStoredValueTarget, PluginSummary, PluginSystemCheckedWrite, PluginSystemIdentity, PluginTransaction, PluginTransactionBounds, PluginTranslations, PluginUserMenuAction, PluginUserMenuItem, PluginUserMenuLink, PluginUserService, PluginVersionPin, PluginVersionPinHolder, PluginVersionPins, PluginVersionsService, PluginWebhookEventType, PluginWriteCheck, PluginWriteExpectation, Principal, PrincipalAnswer, PrincipalAttributeDescriptors, PrincipalAttributeType, PrincipalAttributeTypeOf, PrincipalAttributeValue, PrincipalAttributes, PrincipalAttributesOf, PrincipalKindContribution, PrincipalKindDefinition, PrincipalRecord, PrincipalRef, PrincipalReportOptions, ProviderAvailability, ProxyAnswer, PublicAddress, PublicAddressParticipant, PublicAddressTemplateContext, PublicAddressType, QueryOptions, QueueJobArgs, QueueJobResult, QueuedEmailCancelCause, QueuedEmailChange, QueuedEmailChangeHandler, QueuedEmailRecipient, QueuedEmailStanding, QueuedEmailStatus, QueuedRecipientOutcome, ReadCaller, ReadableContent, ReadableContentCaller, ReadableContentEntity, RefusedAddressUpdate, RegisteredEmailProvider, RequestContext, ResolvedDraftSplitCollection, ResolverOptions, RouteMethod, RowPredicate, RowPredicateValue, RunAsPrincipal, ScheduledTask, SecretData, SerializedFieldConfig, ServiceOpts, SettingEditorProps, SingleFieldRewriteRequest, TIMESERIES_INTERVALS, TimeseriesInterval, TrustedHtml, TxOption, UnvalidatedAddressableField, UserCreatedPayload, UserDeletedPayload, UserEventName, UserEvents, ValidateFieldValuesOptions, ValidationIssue, VerifiedWebhook, VerifyWebhookOptions, VersionPinHolderDefinition, VersionRef, WIDGET_CONDITIONS, WIDGET_LIFECYCLES, WIDGET_OPS, WIDGET_SOURCE_FIELD_TYPES, WIDGET_SOURCE_KINDS, WebhookRefusal, WebhookVerification, WidgetAccess, WidgetAccessGate, WidgetCondition, WidgetData, WidgetFieldChoice, WidgetInterval, WidgetLifecycle, WidgetLoadSize, WidgetOp, WidgetPreviewCase, WidgetProps, WidgetQuery, WidgetRange, WidgetReadServices, WidgetRenderSize, WidgetScope, WidgetSetting, WidgetSizeDeclaration, WidgetSource, WidgetSourceField, WidgetSourceFieldType, WidgetSourceKind, WidgetSourceResolver, WidgetSummary, WidgetSummaryCount, WidgetView, addressOfRequest, addressableFields, callerReadOptions, checkbox, collectDeclarations, collectionDraftSplit, date, defineAttentionItem, defineEmailProvider, defineJob, definePlugin, defineWidget, failRenderWhenUnavailable, getCachedNextly, group, isContentTypeScope, isLocaleSelector, isNextlyUnavailable, isPluginCategory, isTimeseriesInterval, json, languageAddressOf, listEntries, listPageNumber, listPageOf, markHtml, mayDeleteEntry, mayWriteEntry, narrowScope, nextlyTags, number, option, pluginAdminSlug, pluginCacheTag, pluginField, publicAddressOf, readStoredFields, readableContent, recordAdvisoryNotice, resolvedCollectionDraftSplit, resolvedCollectionView, respondAction, respondDoc, respondList, respondMutation, routePathIsLiteral, rowsThatFit, sanitizeAdminPath, setting, standardWebhooks, storedValueHash, text, textarea, trustedClientIp, typesExtendedBy, typesReachedBy, typesWithoutAddress, updateIfUnchanged, upload, validateFieldValues } from "nextly";
2
- import { ChartSlot as WidgetChartSlot, chartColour as widgetChartColour, formatChange as formatWidgetChange, formatCount as formatWidgetNumber } from "@nextlyhq/ui/format";
3
- import { previewUrlFromTemplate, readableTitleText } from "nextly/config";
4
- import { humanizeFieldName } from "nextly/field-label";
5
- import { PENDING_CHANGE_KEY } from "nextly/reserved-filter-keys";
6
- import { PageImagePreview, PageListItem, PageMetadataAnswer, PageMetadataImage, PageMetadataInput, PageMetadataResolver, PageMetadataSource, PageMetadataValues, PageQuestion, PageRobots, PageStructuredDataHints } from "nextly/runtime";
7
- import { PluginFieldTypeSetting, PluginFieldTypeSettingBase } from "nextly/field-catalog";
8
- /**
9
- * @experimental A secret value that auto-redacts at every common leak vector —
10
- * `JSON.stringify` (`toJSON`), `String()`/template interpolation (`toString`),
11
- * and `console.log`/`util.inspect` (the node inspect symbol). The real value is
12
- * available only via the explicit, greppable `.reveal()`. Wrap secret config /
13
- * env values (D37): `secret(process.env.API_KEY)`.
14
- */
15
- export declare class Secret<T = string> {
16
- #private;
17
- constructor(value: T);
18
- /** Return the underlying secret value. The only way to read it. */
19
- reveal(): T;
20
- toJSON(): string;
21
- toString(): string;
22
- }
23
- /** @experimental Wrap a value so it redacts unless explicitly `.reveal()`ed (D37). */
24
- export declare function secret<T>(value: T): Secret<T>;
25
- /** @experimental True if `value` is a {@link Secret}. */
26
- export declare function isSecret(value: unknown): value is Secret<unknown>;
27
- export { type Action, type AddressHolder, type AddressableField, type AddressableFieldsOptions, type AdminBlockContribution, type AdminBulkActionContribution, type AdminColumnContribution, type AdminContribution, type AdminContributionAction, type AdminContributionKind, type AdminPlaceId, type AdminPlaces, type AdminRowActionContribution, type AdminSidebarSectionContribution, type AdminTabContribution, type AdmittedReservation, type AdvisoryNotice, type AnyWidget, type AttentionCount, type AttentionItem, type AuthEventName, AuthEvents, type AuthHookName, type AuthHooks, type AuthInput, type AuthLimitAnswer, type AuthOutcome, type AuthStrategy, type AuthUser, type AuthenticatedScope, type AuthorableFieldConfig, type AuthoredDraftSplitCollection, type BatchOperationResult, type BeforeOperationArgs, type BeforeOperationContext, type BeforeOperationHandler, type BreachedPasswordsConfig, type BulkUpdateEntry, CORE_ADMIN_PLACES, type Challenge, type ChallengeDefinition, type ClaimDeliveryOptions, type CollectionConfig, type CompleteLoginOptions, type ComponentPath, type ContentTypeCandidate, type ContentTypeKind, type ContentTypeScope, type CoreAdminPlaceId, type CoreFilterSeam, type CoreView, DEFAULT_ADMIN_PATH, type Decision, type DeliveryClaim, type DeliveryClaimResult, type DocumentEventName, DocumentEvents, type DocumentFieldRewriteRequest, type DraftSplitDisabledReason, type DraftSplitEligibility, type DurableEvent, type DurableHandler, EXTENSION_SWITCH_SERVICE, type EmailAfterSendValue, type EmailFilterContext, type EmailPayloadFilterValue, type EmailProviderCapabilities, type EmailProviderConfigField, type EmailProviderDefinition, type EmailProviderDescriptor, type EmailTemplateData, type EntryVerdict, type EventBus, type EventEnvelope, type EventHandler, type EventName, type ExtendedType, type ExtensionSwitch, FRAMEWORK_CRAWL_EXCLUSIONS, type FieldAdminOptions, type FieldConfig, type FieldRewriteCopy, type FieldRewriteRequest, type FieldRewriteResult, type FieldRewriteValue, type FieldValueDeclaration, type FieldValueDeclarationInput, type Filter, FilterSeams, type ForgetSendsInput, type FrozenCopy, type FrozenValue, type GrantedPermission, type GridSize, type HeldAddress, type HeldAddressUpdate, type HeldDocument, type HookContext, type HookContextPhase, type HookHandler, type HookPointContext, type HookPointNameOf, type HookPointPayload, type HookPointPayloads, type HookPointValue, type HookType, type InTransactionContext, type InTransactionHandler, type InboundWebhookDelivery, type InboundWebhookReading, type InboundWebhookScheme, type JobContext, type JobDefinition, type JobDefinitionInput, type JobInputFor, type JobRetryPolicy, type JobSlug, type JsonObject, type JsonValue, type KeptAddress, type KeyedDigests, type LanguageAddress, type LanguageAddressRule, type LimitCheck, type LimitEntry, type LimitOutcome, type LimitReservation, type LimitRule, type LimitTarget, type ListQueryFilterContext, type ListQueryWhere, MAX_ATTENTION_ITEMS_PER_PLUGIN, MAX_EMAIL_PROVIDER_TYPE_LENGTH, MAX_JOB_SLUG_LENGTH, MAX_WIDGET_ROWS, type MediaEventName, MediaEvents, type Middleware, type NavCollectionItem, type NavFilterContext, NextlyError, type NextlyPrincipals, type OneTimeSecrets, type OpaqueSecrets, type OverridableDocumentAction, PENDING_CHANGE_KEY, PLUGIN_CATEGORIES, type PageImagePreview, type PageListItem, type PageMetadataAnswer, type PageMetadataImage, type PageMetadataInput, type PageMetadataResolver, type PageMetadataSource, type PageMetadataValues, type PageQuestion, type PageRobots, type PageStructuredDataHints, type PaginatedResult, type PaginationMeta, type ParticipantTransaction, type PasswordCheck, type PasswordHelper, type PasswordRules, PasswordTooLongError, type PermissionSlug, type PluginActionRegistry, type PluginAdminContributions, type PluginAdminPage, type PluginAdminPanel, type PluginAdminPlaceDeclaration, type PluginAuditApi, type PluginAuditDeclaration, type PluginAuthApi, type PluginCacheApi, type PluginCapabilities, type PluginCategory, type PluginCollectionService, type PluginCollectionTransaction, type PluginCollectionView, type PluginConditionalUpdate, type PluginConditionalWriteIdentity, type PluginConfig, type PluginContext, type PluginContributions, type PluginDataFieldConfig, type PluginDatabase, type PluginDeclaration, type PluginDefinition, type PluginDeleteCheck, type PluginDocumentActionOverride, type PluginDocumentActionOverrides, type PluginDurableEvents, type PluginEmailProvider, type PluginEmailService, type PluginEmailSettings, type PluginEmailTemplate, type PluginEmitOptions, type PluginEvents, type PluginFieldCodegen, type PluginFieldCodegenImport, type PluginFieldInput, type PluginFieldInstance, type PluginFieldIssue, type PluginFieldType, type PluginFieldTypeSetting, type PluginFieldTypeSettingBase, type PluginFieldValidateArgs, type PluginFieldValidationResult, type PluginFieldWrite, type PluginFilterRegistry, type PluginHeaderContributions, type PluginHeaderSlotContributions, type PluginHeaderUserMenuContributions, type PluginHookPointDeclaration, type PluginHookRegistry, type PluginInsert, type PluginItemCount, type PluginItemPlace, type PluginJobsNamespace, type PluginLimiter, type PluginListFilterDeclaration, type PluginListFilterOption, type PluginMediaService, type PluginMenuItem, type PluginMenuItemFields, type PluginNavSection, type PluginPageStartupRead, type PluginPanelGroup, type PluginPanelSection, type PluginPermission, type PluginPinOptions, type PluginPinTransaction, type PluginPrincipalsApi, type PluginProxyHandler, type PluginPublicAddresses, type PluginRawDatabase, type PluginReceivedWebhooks, type PluginRole, type PluginRoute, type PluginRouteCaller, type PluginRouteCanOptions, type PluginRouteContext, type PluginRouteHandler, type PluginRouteIdentity, type PluginRouteLimitKey, type PluginRouteMount, type PluginRoutePermissionResolver, type PluginRoutePermissionScope, type PluginRoutePrincipal, type PluginRouteRateLimit, type PluginSchedule, type PluginSecurityApi, type PluginSettingsApi, type PluginSingleRecord, type PluginSinglesResult, type PluginSinglesService, type PluginStoredDocument, type PluginStoredFields, type PluginStoredFieldsRequest, type PluginStoredIdentity, type PluginStoredLifecycle, type PluginStoredValue, type PluginStoredValueTarget, type PluginSummary, type PluginSystemCheckedWrite, type PluginSystemIdentity, type PluginTransaction, type PluginTransactionBounds, type PluginTranslations, type PluginUserMenuAction, type PluginUserMenuItem, type PluginUserMenuLink, type PluginUserService, type PluginVersionPin, type PluginVersionPinHolder, type PluginVersionPins, type PluginVersionsService, type PluginWebhookEventType, type PluginWriteCheck, type PluginWriteExpectation, type Principal, type PrincipalAnswer, type PrincipalAttributeDescriptors, type PrincipalAttributeType, type PrincipalAttributeTypeOf, type PrincipalAttributeValue, type PrincipalAttributes, type PrincipalAttributesOf, type PrincipalKindContribution, type PrincipalKindDefinition, type PrincipalRecord, type PrincipalRef, type PrincipalReportOptions, type ProviderAvailability, type ProxyAnswer, type PublicAddress, type PublicAddressParticipant, type PublicAddressTemplateContext, type PublicAddressType, type QueryOptions, type QueueJobArgs, type QueueJobResult, type QueuedEmailCancelCause, type QueuedEmailChange, type QueuedEmailChangeHandler, type QueuedEmailRecipient, type QueuedEmailStanding, type QueuedEmailStatus, type QueuedRecipientOutcome, type ReadCaller, type ReadableContent, type ReadableContentCaller, type ReadableContentEntity, type RefusedAddressUpdate, type RegisteredEmailProvider, type RequestContext, type ResolvedDraftSplitCollection, type ResolverOptions, type RouteMethod, type RowPredicate, type RowPredicateValue, type RunAsPrincipal, type ScheduledTask, type SecretData, type SerializedFieldConfig, type ServiceOpts, type SettingEditorProps, type SingleFieldRewriteRequest, TIMESERIES_INTERVALS, type TimeseriesInterval, TrustedHtml, type TxOption, type UnvalidatedAddressableField, type UserCreatedPayload, type UserDeletedPayload, type UserEventName, UserEvents, type ValidateFieldValuesOptions, type ValidationIssue, type VerifiedWebhook, type VerifyWebhookOptions, type VersionPinHolderDefinition, type VersionRef, WIDGET_CONDITIONS, WIDGET_LIFECYCLES, WIDGET_OPS, WIDGET_SOURCE_FIELD_TYPES, WIDGET_SOURCE_KINDS, type WebhookRefusal, type WebhookVerification, type WidgetAccess, type WidgetAccessGate, type WidgetChartSlot, type WidgetCondition, type WidgetData, type WidgetFieldChoice, type WidgetInterval, type WidgetLifecycle, type WidgetLoadSize, type WidgetOp, type WidgetPreviewCase, type WidgetProps, type WidgetQuery, type WidgetRange, type WidgetReadServices, type WidgetRenderSize, type WidgetScope, type WidgetSetting, type WidgetSizeDeclaration, type WidgetSource, type WidgetSourceField, type WidgetSourceFieldType, type WidgetSourceKind, type WidgetSourceResolver, type WidgetSummary, type WidgetSummaryCount, type WidgetView, addressOfRequest, addressableFields, callerReadOptions, checkbox, collectDeclarations, collectionDraftSplit, date, defineAttentionItem, defineEmailProvider, defineJob, definePlugin, defineWidget, failRenderWhenUnavailable, formatWidgetChange, formatWidgetNumber, getCachedNextly, group, humanizeFieldName, isContentTypeScope, isLocaleSelector, isNextlyUnavailable, isPluginCategory, isTimeseriesInterval, json, languageAddressOf, listEntries, listPageNumber, listPageOf, markHtml, mayDeleteEntry, mayWriteEntry, narrowScope, nextlyTags, number, option, pluginAdminSlug, pluginCacheTag, pluginField, previewUrlFromTemplate, publicAddressOf, readStoredFields, readableContent, readableTitleText, recordAdvisoryNotice, resolvedCollectionDraftSplit, resolvedCollectionView, respondAction, respondDoc, respondList, respondMutation, routePathIsLiteral, rowsThatFit, sanitizeAdminPath, setting, standardWebhooks, storedValueHash, text, textarea, trustedClientIp, typesExtendedBy, typesReachedBy, typesWithoutAddress, updateIfUnchanged, upload, validateFieldValues, widgetChartColour };
28
- //# sourceMappingURL=index.d.ts.map
1
+ import { $ as CoreAdminPlaceId, $a as PublicAddressType, $i as PluginSinglesResult, $n as PageMetadataImage, $o as WIDGET_SOURCE_FIELD_TYPES, $r as PluginFieldInstance, $s as isTimeseriesInterval, $t as HookPointContext, A as AuthenticatedScope, Aa as PluginWorkflowWaitingPart, Ac as sanitizeAdminPath, Ai as PluginPinTransaction, An as MAX_ATTENTION_ITEMS_PER_PLUGIN, Ao as SubjectEventsQuery, Ar as PluginCollectionView, As as addressOfRequest, At as ExtensionSwitch, B as BulkUpdateEntry, Ba as PrincipalAttributeValue, Bc as updateIfUnchanged, Bi as PluginRouteContext, Bn as Middleware, Bo as ValidateFieldValuesOptions, Br as PluginDeleteCheck, Bs as definePlugin, Bt as Filter, C as AuthHookName, Ca as PluginWorkflowDefinition, Cc as resolvedCollectionView, Ci as PluginMenuItemFields, Cn as LimitEntry, Co as RunAsPrincipal, Cr as PluginAuditDeclaration, Cs as WidgetSourceField, Ct as EmailTemplateReferencesContext, D as AuthOutcome, Da as PluginWorkflowSeenPart, Dc as respondMutation, Di as PluginPanelSection, Dn as LimitTarget, Do as ServiceOpts, Dr as PluginCategory, Ds as WidgetSummary, Dt as EventHandler, E as AuthLimitAnswer, Ea as PluginWorkflowReview, Ec as respondList, Ei as PluginPanelGroup, En as LimitRule, Eo as SerializedFieldConfig, Er as PluginCapabilities, Es as WidgetSourceResolver, Et as EventEnvelope, F as BatchOperationResult, Fa as Principal, Fc as textarea, Fi as PluginReceivedWebhooks, Fn as MediaCopy, Fo as UnvalidatedAddressableField, Fr as PluginContributions, Fs as collectionDraftSplit, Ft as FieldRewriteRequest, G as CollectionConfig, Ga as PrincipalRecord, Gc as isSecret, Gi as PluginRoutePermissionResolver, Gn as OneTimeSecrets, Go as VersionMeta, Gr as PluginEmailService, Gs as getCachedNextly, Gt as GrantedPermission, H as Challenge, Ha as PrincipalAttributesOf, Hc as validateFieldValues, Hi as PluginRouteIdentity, Hn as NavFilterContext, Ho as VerifiedWebhook, Hr as PluginDocumentActionOverrides, Hs as failRenderWhenUnavailable, Ht as ForgetSendsInput, I as BeforeOperationArgs, Ia as PrincipalAnswer, Ic as trustedClientIp, Ii as PluginRole, In as MediaCopySource, Io as UserCreatedPayload, Ir as PluginDataFieldConfig, Is as date, It as FieldRewriteResult, J as ContentEventRecord, Ja as ProviderAvailability, Ji as PluginRouteRateLimit, Jn as PENDING_CHANGE_KEY, Jo as VersionRow, Jr as PluginEmitOptions, Js as isContentTypeScope, Jt as HeldAddressUpdate, K as CompleteLoginOptions, Ka as PrincipalRef, Kc as secret, Ki as PluginRoutePermissionScope, Kn as OpaqueSecrets, Ko as VersionPinHolderDefinition, Kr as PluginEmailSettings, Ks as group, Kt as GridSize, L as BeforeOperationContext, La as PrincipalAttributeDescriptors, Lc as typesExtendedBy, Li as PluginRoute, Ln as MediaCopyWidth, Lo as UserDeletedPayload, Lr as PluginDatabase, Ls as defineAttentionItem, Lt as FieldRewriteValue, M as AuthoredDraftSplitCollection, Ma as PluginWorkflowsService, Mc as standardWebhooks, Mi as PluginProxyHandler, Mn as MAX_JOB_SLUG_LENGTH, Mo as TimeseriesInterval, Mr as PluginConditionalWriteIdentity, Ms as callerReadOptions, Mt as FieldAdminOptions, N as AutosaveSupersession, Na as PluginWriteCheck, Nc as storedValueHash, Ni as PluginPublicAddresses, Nn as MAX_WIDGET_ROWS, No as TrustedHtml, Nr as PluginConfig, Ns as checkbox, Nt as FieldConfig, O as AuthStrategy, Oa as PluginWorkflowSubmitInput, Oc as routePathIsLiteral, Oi as PluginPermission, On as ListQueryFilterContext, Oo as SettingEditorProps, Or as PluginCollectionService, Os as WidgetSummaryCount, Ot as EventName, P as AutosaveWriteResult, Pa as PluginWriteExpectation, Pc as text, Pi as PluginRawDatabase, Pn as MEDIA_COPY_WIDTHS, Po as TxOption, Pr as PluginContext, Ps as collectDeclarations, Pt as FieldRewriteCopy, Q as ContentTypeScope, Qa as PublicAddressTemplateContext, Qi as PluginSingleRecord, Qn as PageMetadataAnswer, Qo as WIDGET_OPS, Qr as PluginFieldInput, Qs as isPluginCategory, Qt as HookHandler, R as BeforeOperationHandler, Ra as PrincipalAttributeType, Rc as typesReachedBy, Ri as PluginRouteCaller, Rn as MediaEventName, Ro as UserEventName, Rr as PluginDeclaration, Rs as defineEmailProvider, Rt as FieldValueDeclaration, S as AuthEvents, Sa as PluginWebhookEventType, Sc as resolvedCollectionDraftSplit, Si as PluginMenuItem, Sn as LimitCheck, So as RowPredicateValue, Sr as PluginAuditApi, Ss as WidgetSource, St as EmailTemplateReference, T as AuthInput, Ta as PluginWorkflowEntityRef, Tc as respondDoc, Ti as PluginPageStartupRead, Tn as LimitReservation, To as SecretData, Tr as PluginCacheApi, Ts as WidgetSourceKind, Tt as EventBus, U as ChallengeDefinition, Ua as PrincipalKindContribution, Uc as widgetChartColour, Ui as PluginRouteLimitKey, Un as NextlyError, Uo as VerifyWebhookOptions, Ur as PluginDurableEvents, Us as formatWidgetChange, Ut as FrozenCopy, V as CORE_ADMIN_PLACES, Va as PrincipalAttributes, Vc as upload, Vi as PluginRouteHandler, Vn as NavCollectionItem, Vo as ValidationIssue, Vr as PluginDocumentActionOverride, Vs as defineWidget, Vt as FilterSeams, W as ClaimDeliveryOptions, Wa as PrincipalKindDefinition, Wc as Secret, Wi as PluginRouteMount, Wn as NextlyPrincipals, Wo as VersionListOptions, Wr as PluginEmailProvider, Ws as formatWidgetNumber, Wt as FrozenValue, X as ContentTypeCandidate, Xa as PublicAddress, Xi as PluginSecurityApi, Xn as PageImagePreview, Xo as WIDGET_CONDITIONS, Xr as PluginFieldCodegen, Xs as isLocaleSelector, Xt as HookContext, Y as ContentEventSubject, Ya as ProxyAnswer, Yi as PluginSchedule, Yn as PLUGIN_CATEGORIES, Yo as VersionStatus, Yr as PluginEvents, Ys as isDraftModeRequest, Yt as HeldDocument, Z as ContentTypeKind, Za as PublicAddressParticipant, Zi as PluginSettingsApi, Zn as PageListItem, Zo as WIDGET_LIFECYCLES, Zr as PluginFieldCodegenImport, Zs as isNextlyUnavailable, Zt as HookContextPhase, _ as AdvisoryNotice, _a as PluginUserService, _c as publicAddressOf, _i as PluginJobsNamespace, _n as JsonValue, _o as ResolvedDraftSplitCollection, _r as PluginActionRegistry, _s as WidgetReadServices, _t as EmailProviderCapabilities, a as AdminBlockContribution, aa as PluginStoredLifecycle, ac as markHtml, ai as PluginFieldValidationResult, an as InTransactionContext, ao as QueuedEmailChangeHandler, ar as PageRobots, as as WidgetChartSlot, at as DeliveryClaimResult, b as AttentionItem, ba as PluginVersionPins, bc as readableTitleText, bi as PluginListFilterOption, bn as LanguageAddress, bo as RouteMethod, br as PluginAdminPanel, bs as WidgetSetting, bt as EmailProviderDescriptor, c as AdminContribution, ca as PluginSummary, cc as narrowScope, ci as PluginFilterRegistry, cn as InboundWebhookReading, co as QueuedEmailStatus, cr as PaginationMeta, cs as WidgetFieldChoice, ct as DocumentFieldRewriteRequest, d as AdminPlaceId, da as PluginTransaction, dc as number, di as PluginHeaderUserMenuContributions, dn as JobDefinition, do as ReadableContent, dr as PasswordHelper, ds as WidgetLoadSize, dt as DurableEvent, ea as PluginSinglesService, ec as json, ei as PluginFieldIssue, en as HookPointNameOf, eo as QueryOptions, er as PageMetadataInput, es as WIDGET_SOURCE_KINDS, et as CoreFilterSeam, f as AdminPlaces, fa as PluginTransactionBounds, fc as option, fi as PluginHookPointDeclaration, fn as JobDefinitionInput, fo as ReadableContentCaller, fr as PasswordRules, fs as WidgetOp, ft as DurableHandler, g as AdmittedReservation, ga as PluginUserMenuLink, gc as previewUrlFromTemplate, gi as PluginItemPlace, gn as JsonObject, go as RequestContext, gr as PermissionSlug, gs as WidgetRange, gt as EmailPayloadFilterValue, h as AdminTabContribution, ha as PluginUserMenuItem, hc as pluginField, hi as PluginItemCount, hn as JobSlug, ho as RegisteredEmailProvider, hr as PendingEditOrder, hs as WidgetQuery, ht as EmailFilterContext, i as AddressableFieldsOptions, ia as PluginStoredIdentity, ic as listPageOf, ii as PluginFieldValidateArgs, in as HookType, io as QueuedEmailChange, ir as PageQuestion, is as WidgetAccessGate, it as DeliveryClaim, j as AuthorableFieldConfig, ja as PluginWorkflowWaitingQuery, jc as setting, ji as PluginPrincipalsApi, jn as MAX_EMAIL_PROVIDER_TYPE_LENGTH, jo as TIMESERIES_INTERVALS, jr as PluginConditionalUpdate, js as addressableFields, jt as FRAMEWORK_CRAWL_EXCLUSIONS, k as AuthUser, ka as PluginWorkflowSubmitResult, kc as rowsThatFit, ki as PluginPinOptions, kn as ListQueryWhere, ko as SingleFieldRewriteRequest, kr as PluginCollectionTransaction, ks as WidgetView, kt as ExtendedType, l as AdminContributionAction, la as PluginSystemCheckedWrite, lc as nearestMediaCopyWidth, li as PluginHeaderContributions, ln as InboundWebhookScheme, lo as QueuedRecipientOutcome, lr as ParticipantTransaction, ls as WidgetInterval, lt as DraftSplitDisabledReason, m as AdminSidebarSectionContribution, ma as PluginUserMenuAction, mc as pluginCacheTag, mi as PluginInsert, mn as JobRetryPolicy, mo as RefusedAddressUpdate, mr as PendingEditCursor, ms as WidgetProps, mt as EmailAfterSendValue, n as AddressHolder, na as PluginStoredFields, nc as listEntries, ni as PluginFieldTypeSetting, nn as HookPointPayloads, no as QueueJobResult, nr as PageMetadataSource, ns as WebhookVerification, nt as DEFAULT_ADMIN_PATH, o as AdminBulkActionContribution, oa as PluginStoredValue, oc as mayDeleteEntry, oi as PluginFieldWrite, on as InTransactionHandler, oo as QueuedEmailRecipient, or as PageStructuredDataHints, os as WidgetCondition, ot as DocumentEventName, p as AdminRowActionContribution, pa as PluginTranslations, pc as pluginAdminSlug, pi as PluginHookRegistry, pn as JobInputFor, po as ReadableContentEntity, pr as PasswordTooLongError, ps as WidgetPreviewCase, pt as EXTENSION_SWITCH_SERVICE, q as ComponentPath, qa as PrincipalReportOptions, qi as PluginRoutePrincipal, qn as OverridableDocumentAction, qo as VersionRef, qr as PluginEmailTemplate, qs as humanizeFieldName, qt as HeldAddress, r as AddressableField, ra as PluginStoredFieldsRequest, rc as listPageNumber, ri as PluginFieldTypeSettingBase, rn as HookPointValue, ro as QueuedEmailCancelCause, rr as PageMetadataValues, rs as WidgetAccess, rt as Decision, s as AdminColumnContribution, sa as PluginStoredValueTarget, sc as mayWriteEntry, si as PluginFieldWriteCaller, sn as InboundWebhookDelivery, so as QueuedEmailStanding, sr as PaginatedResult, ss as WidgetData, st as DocumentEvents, t as Action, ta as PluginStoredDocument, tc as languageAddressOf, ti as PluginFieldType, tn as HookPointPayload, to as QueueJobArgs, tr as PageMetadataResolver, ts as WebhookRefusal, tt as CoreView, u as AdminContributionKind, ua as PluginSystemIdentity, uc as nextlyTags, ui as PluginHeaderSlotContributions, un as JobContext, uo as ReadCaller, ur as PasswordCheck, us as WidgetLifecycle, ut as DraftSplitEligibility, v as AnyWidget, va as PluginVersionPin, vc as readStoredFields, vi as PluginLimiter, vn as KeptAddress, vo as ResolverOptions, vr as PluginAdminContributions, vs as WidgetRenderSize, vt as EmailProviderConfigField, w as AuthHooks, wa as PluginWorkflowDocumentRef, wc as respondAction, wi as PluginNavSection, wn as LimitOutcome, wo as ScheduledTask, wr as PluginAuthApi, ws as WidgetSourceFieldType, wt as EntryVerdict, x as AuthEventName, xa as PluginVersionsService, xc as recordAdvisoryNotice, xi as PluginMediaService, xn as LanguageAddressRule, xo as RowPredicate, xr as PluginAdminPlaceDeclaration, xs as WidgetSizeDeclaration, xt as EmailTemplateData, y as AttentionCount, ya as PluginVersionPinHolder, yc as readableContent, yi as PluginListFilterDeclaration, yn as KeyedDigests, yo as RestoreVersionResult, yr as PluginAdminPage, ys as WidgetScope, yt as EmailProviderDefinition, z as BreachedPasswordsConfig, za as PrincipalAttributeTypeOf, zc as typesWithoutAddress, zi as PluginRouteCanOptions, zn as MediaEvents, zo as UserEvents, zr as PluginDefinition, zs as defineJob, zt as FieldValueDeclarationInput } from "./index-BkyjglVd.js";
2
+ export { type Action, type AddressHolder, type AddressableField, type AddressableFieldsOptions, type AdminBlockContribution, type AdminBulkActionContribution, type AdminColumnContribution, type AdminContribution, type AdminContributionAction, type AdminContributionKind, type AdminPlaceId, type AdminPlaces, type AdminRowActionContribution, type AdminSidebarSectionContribution, type AdminTabContribution, type AdmittedReservation, type AdvisoryNotice, type AnyWidget, type AttentionCount, type AttentionItem, type AuthEventName, AuthEvents, type AuthHookName, type AuthHooks, type AuthInput, type AuthLimitAnswer, type AuthOutcome, type AuthStrategy, type AuthUser, type AuthenticatedScope, type AuthorableFieldConfig, type AuthoredDraftSplitCollection, type AutosaveSupersession, type AutosaveWriteResult, type BatchOperationResult, type BeforeOperationArgs, type BeforeOperationContext, type BeforeOperationHandler, type BreachedPasswordsConfig, type BulkUpdateEntry, CORE_ADMIN_PLACES, type Challenge, type ChallengeDefinition, type ClaimDeliveryOptions, type CollectionConfig, type CompleteLoginOptions, type ComponentPath, type ContentEventRecord, type ContentEventSubject, type ContentTypeCandidate, type ContentTypeKind, type ContentTypeScope, type CoreAdminPlaceId, type CoreFilterSeam, type CoreView, DEFAULT_ADMIN_PATH, type Decision, type DeliveryClaim, type DeliveryClaimResult, type DocumentEventName, DocumentEvents, type DocumentFieldRewriteRequest, type DraftSplitDisabledReason, type DraftSplitEligibility, type DurableEvent, type DurableHandler, EXTENSION_SWITCH_SERVICE, type EmailAfterSendValue, type EmailFilterContext, type EmailPayloadFilterValue, type EmailProviderCapabilities, type EmailProviderConfigField, type EmailProviderDefinition, type EmailProviderDescriptor, type EmailTemplateData, type EmailTemplateReference, type EmailTemplateReferencesContext, type EntryVerdict, type EventBus, type EventEnvelope, type EventHandler, type EventName, type ExtendedType, type ExtensionSwitch, FRAMEWORK_CRAWL_EXCLUSIONS, type FieldAdminOptions, type FieldConfig, type FieldRewriteCopy, type FieldRewriteRequest, type FieldRewriteResult, type FieldRewriteValue, type FieldValueDeclaration, type FieldValueDeclarationInput, type Filter, FilterSeams, type ForgetSendsInput, type FrozenCopy, type FrozenValue, type GrantedPermission, type GridSize, type HeldAddress, type HeldAddressUpdate, type HeldDocument, type HookContext, type HookContextPhase, type HookHandler, type HookPointContext, type HookPointNameOf, type HookPointPayload, type HookPointPayloads, type HookPointValue, type HookType, type InTransactionContext, type InTransactionHandler, type InboundWebhookDelivery, type InboundWebhookReading, type InboundWebhookScheme, type JobContext, type JobDefinition, type JobDefinitionInput, type JobInputFor, type JobRetryPolicy, type JobSlug, type JsonObject, type JsonValue, type KeptAddress, type KeyedDigests, type LanguageAddress, type LanguageAddressRule, type LimitCheck, type LimitEntry, type LimitOutcome, type LimitReservation, type LimitRule, type LimitTarget, type ListQueryFilterContext, type ListQueryWhere, MAX_ATTENTION_ITEMS_PER_PLUGIN, MAX_EMAIL_PROVIDER_TYPE_LENGTH, MAX_JOB_SLUG_LENGTH, MAX_WIDGET_ROWS, MEDIA_COPY_WIDTHS, type MediaCopy, type MediaCopySource, type MediaCopyWidth, type MediaEventName, MediaEvents, type Middleware, type NavCollectionItem, type NavFilterContext, NextlyError, type NextlyPrincipals, type OneTimeSecrets, type OpaqueSecrets, type OverridableDocumentAction, PENDING_CHANGE_KEY, PLUGIN_CATEGORIES, type PageImagePreview, type PageListItem, type PageMetadataAnswer, type PageMetadataImage, type PageMetadataInput, type PageMetadataResolver, type PageMetadataSource, type PageMetadataValues, type PageQuestion, type PageRobots, type PageStructuredDataHints, type PaginatedResult, type PaginationMeta, type ParticipantTransaction, type PasswordCheck, type PasswordHelper, type PasswordRules, PasswordTooLongError, type PendingEditCursor, type PendingEditOrder, type PermissionSlug, type PluginActionRegistry, type PluginAdminContributions, type PluginAdminPage, type PluginAdminPanel, type PluginAdminPlaceDeclaration, type PluginAuditApi, type PluginAuditDeclaration, type PluginAuthApi, type PluginCacheApi, type PluginCapabilities, type PluginCategory, type PluginCollectionService, type PluginCollectionTransaction, type PluginCollectionView, type PluginConditionalUpdate, type PluginConditionalWriteIdentity, type PluginConfig, type PluginContext, type PluginContributions, type PluginDataFieldConfig, type PluginDatabase, type PluginDeclaration, type PluginDefinition, type PluginDeleteCheck, type PluginDocumentActionOverride, type PluginDocumentActionOverrides, type PluginDurableEvents, type PluginEmailProvider, type PluginEmailService, type PluginEmailSettings, type PluginEmailTemplate, type PluginEmitOptions, type PluginEvents, type PluginFieldCodegen, type PluginFieldCodegenImport, type PluginFieldInput, type PluginFieldInstance, type PluginFieldIssue, type PluginFieldType, type PluginFieldTypeSetting, type PluginFieldTypeSettingBase, type PluginFieldValidateArgs, type PluginFieldValidationResult, type PluginFieldWrite, type PluginFieldWriteCaller, type PluginFilterRegistry, type PluginHeaderContributions, type PluginHeaderSlotContributions, type PluginHeaderUserMenuContributions, type PluginHookPointDeclaration, type PluginHookRegistry, type PluginInsert, type PluginItemCount, type PluginItemPlace, type PluginJobsNamespace, type PluginLimiter, type PluginListFilterDeclaration, type PluginListFilterOption, type PluginMediaService, type PluginMenuItem, type PluginMenuItemFields, type PluginNavSection, type PluginPageStartupRead, type PluginPanelGroup, type PluginPanelSection, type PluginPermission, type PluginPinOptions, type PluginPinTransaction, type PluginPrincipalsApi, type PluginProxyHandler, type PluginPublicAddresses, type PluginRawDatabase, type PluginReceivedWebhooks, type PluginRole, type PluginRoute, type PluginRouteCaller, type PluginRouteCanOptions, type PluginRouteContext, type PluginRouteHandler, type PluginRouteIdentity, type PluginRouteLimitKey, type PluginRouteMount, type PluginRoutePermissionResolver, type PluginRoutePermissionScope, type PluginRoutePrincipal, type PluginRouteRateLimit, type PluginSchedule, type PluginSecurityApi, type PluginSettingsApi, type PluginSingleRecord, type PluginSinglesResult, type PluginSinglesService, type PluginStoredDocument, type PluginStoredFields, type PluginStoredFieldsRequest, type PluginStoredIdentity, type PluginStoredLifecycle, type PluginStoredValue, type PluginStoredValueTarget, type PluginSummary, type PluginSystemCheckedWrite, type PluginSystemIdentity, type PluginTransaction, type PluginTransactionBounds, type PluginTranslations, type PluginUserMenuAction, type PluginUserMenuItem, type PluginUserMenuLink, type PluginUserService, type PluginVersionPin, type PluginVersionPinHolder, type PluginVersionPins, type PluginVersionsService, type PluginWebhookEventType, PluginWorkflowDefinition, PluginWorkflowDocumentRef, PluginWorkflowEntityRef, PluginWorkflowReview, PluginWorkflowSeenPart, PluginWorkflowSubmitInput, PluginWorkflowSubmitResult, PluginWorkflowWaitingPart, PluginWorkflowWaitingQuery, PluginWorkflowsService, type PluginWriteCheck, type PluginWriteExpectation, type Principal, type PrincipalAnswer, type PrincipalAttributeDescriptors, type PrincipalAttributeType, type PrincipalAttributeTypeOf, type PrincipalAttributeValue, type PrincipalAttributes, type PrincipalAttributesOf, type PrincipalKindContribution, type PrincipalKindDefinition, type PrincipalRecord, type PrincipalRef, type PrincipalReportOptions, type ProviderAvailability, type ProxyAnswer, type PublicAddress, type PublicAddressParticipant, type PublicAddressTemplateContext, type PublicAddressType, type QueryOptions, type QueueJobArgs, type QueueJobResult, type QueuedEmailCancelCause, type QueuedEmailChange, type QueuedEmailChangeHandler, type QueuedEmailRecipient, type QueuedEmailStanding, type QueuedEmailStatus, type QueuedRecipientOutcome, type ReadCaller, type ReadableContent, type ReadableContentCaller, type ReadableContentEntity, type RefusedAddressUpdate, type RegisteredEmailProvider, type RequestContext, type ResolvedDraftSplitCollection, type ResolverOptions, type RestoreVersionResult, type RouteMethod, type RowPredicate, type RowPredicateValue, type RunAsPrincipal, type ScheduledTask, Secret, type SecretData, type SerializedFieldConfig, type ServiceOpts, type SettingEditorProps, type SingleFieldRewriteRequest, type SubjectEventsQuery, TIMESERIES_INTERVALS, type TimeseriesInterval, TrustedHtml, type TxOption, type UnvalidatedAddressableField, type UserCreatedPayload, type UserDeletedPayload, type UserEventName, UserEvents, type ValidateFieldValuesOptions, type ValidationIssue, type VerifiedWebhook, type VerifyWebhookOptions, type VersionListOptions, type VersionMeta, type VersionPinHolderDefinition, type VersionRef, type VersionRow, type VersionStatus, WIDGET_CONDITIONS, WIDGET_LIFECYCLES, WIDGET_OPS, WIDGET_SOURCE_FIELD_TYPES, WIDGET_SOURCE_KINDS, type WebhookRefusal, type WebhookVerification, type WidgetAccess, type WidgetAccessGate, type WidgetChartSlot, type WidgetCondition, type WidgetData, type WidgetFieldChoice, type WidgetInterval, type WidgetLifecycle, type WidgetLoadSize, type WidgetOp, type WidgetPreviewCase, type WidgetProps, type WidgetQuery, type WidgetRange, type WidgetReadServices, type WidgetRenderSize, type WidgetScope, type WidgetSetting, type WidgetSizeDeclaration, type WidgetSource, type WidgetSourceField, type WidgetSourceFieldType, type WidgetSourceKind, type WidgetSourceResolver, type WidgetSummary, type WidgetSummaryCount, type WidgetView, addressOfRequest, addressableFields, callerReadOptions, checkbox, collectDeclarations, collectionDraftSplit, date, defineAttentionItem, defineEmailProvider, defineJob, definePlugin, defineWidget, failRenderWhenUnavailable, formatWidgetChange, formatWidgetNumber, getCachedNextly, group, humanizeFieldName, isContentTypeScope, isDraftModeRequest, isLocaleSelector, isNextlyUnavailable, isPluginCategory, isSecret, isTimeseriesInterval, json, languageAddressOf, listEntries, listPageNumber, listPageOf, markHtml, mayDeleteEntry, mayWriteEntry, narrowScope, nearestMediaCopyWidth, nextlyTags, number, option, pluginAdminSlug, pluginCacheTag, pluginField, previewUrlFromTemplate, publicAddressOf, readStoredFields, readableContent, readableTitleText, recordAdvisoryNotice, resolvedCollectionDraftSplit, resolvedCollectionView, respondAction, respondDoc, respondList, respondMutation, routePathIsLiteral, rowsThatFit, sanitizeAdminPath, secret, setting, standardWebhooks, storedValueHash, text, textarea, trustedClientIp, typesExtendedBy, typesReachedBy, typesWithoutAddress, updateIfUnchanged, upload, validateFieldValues, widgetChartColour };
package/dist/index.mjs CHANGED
@@ -1,8 +1,9 @@
1
- import { AuthEvents, CORE_ADMIN_PLACES, DEFAULT_ADMIN_PATH, DocumentEvents, EXTENSION_SWITCH_SERVICE, FRAMEWORK_CRAWL_EXCLUSIONS, FilterSeams, MAX_ATTENTION_ITEMS_PER_PLUGIN, MAX_EMAIL_PROVIDER_TYPE_LENGTH, MAX_JOB_SLUG_LENGTH, MAX_WIDGET_ROWS, MediaEvents, NextlyError, PLUGIN_CATEGORIES, PasswordTooLongError, TIMESERIES_INTERVALS, TrustedHtml, UserEvents, WIDGET_CONDITIONS, WIDGET_LIFECYCLES, WIDGET_OPS, WIDGET_SOURCE_FIELD_TYPES, WIDGET_SOURCE_KINDS, addressOfRequest, addressableFields, callerReadOptions, checkbox, collectDeclarations, collectionDraftSplit, date, defineAttentionItem, defineEmailProvider, defineJob, definePlugin, defineWidget, failRenderWhenUnavailable, getCachedNextly, group, isContentTypeScope, isLocaleSelector, isNextlyUnavailable, isPluginCategory, isTimeseriesInterval, json, languageAddressOf, listEntries, listPageNumber, listPageOf, markHtml, mayDeleteEntry, mayWriteEntry, narrowScope, nextlyTags, number, option, pluginAdminSlug, pluginCacheTag, pluginField, publicAddressOf, readStoredFields, readableContent, recordAdvisoryNotice, resolvedCollectionDraftSplit, resolvedCollectionView, respondAction, respondDoc, respondList, respondMutation, routePathIsLiteral, rowsThatFit, sanitizeAdminPath, setting, standardWebhooks, storedValueHash, text, textarea, trustedClientIp, typesExtendedBy, typesReachedBy, typesWithoutAddress, updateIfUnchanged, upload, validateFieldValues } from "nextly";
1
+ import { AuthEvents, CORE_ADMIN_PLACES, DEFAULT_ADMIN_PATH, DocumentEvents, EXTENSION_SWITCH_SERVICE, FRAMEWORK_CRAWL_EXCLUSIONS, FilterSeams, MAX_ATTENTION_ITEMS_PER_PLUGIN, MAX_EMAIL_PROVIDER_TYPE_LENGTH, MAX_JOB_SLUG_LENGTH, MAX_WIDGET_ROWS, MEDIA_COPY_WIDTHS, MediaEvents, NextlyError, PLUGIN_CATEGORIES, PasswordTooLongError, TIMESERIES_INTERVALS, TrustedHtml, UserEvents, WIDGET_CONDITIONS, WIDGET_LIFECYCLES, WIDGET_OPS, WIDGET_SOURCE_FIELD_TYPES, WIDGET_SOURCE_KINDS, addressOfRequest, addressableFields, callerReadOptions, checkbox, collectDeclarations, collectionDraftSplit, date, defineAttentionItem, defineEmailProvider, defineJob, definePlugin, defineWidget, failRenderWhenUnavailable, getCachedNextly, group, isContentTypeScope, isLocaleSelector, isNextlyUnavailable, isPluginCategory, isTimeseriesInterval, json, languageAddressOf, listEntries, listPageNumber, listPageOf, markHtml, mayDeleteEntry, mayWriteEntry, narrowScope, nearestMediaCopyWidth, nextlyTags, number, option, pluginAdminSlug, pluginCacheTag, pluginField, publicAddressOf, readStoredFields, readableContent, recordAdvisoryNotice, resolvedCollectionDraftSplit, resolvedCollectionView, respondAction, respondDoc, respondList, respondMutation, routePathIsLiteral, rowsThatFit, sanitizeAdminPath, setting, standardWebhooks, storedValueHash, text, textarea, trustedClientIp, typesExtendedBy, typesReachedBy, typesWithoutAddress, updateIfUnchanged, upload, validateFieldValues } from "nextly";
2
2
  import { chartColour as widgetChartColour, formatChange as formatWidgetChange, formatCount as formatWidgetNumber } from "@nextlyhq/ui/format";
3
3
  import { previewUrlFromTemplate, readableTitleText } from "nextly/config";
4
4
  import { humanizeFieldName } from "nextly/field-label";
5
5
  import { PENDING_CHANGE_KEY } from "nextly/reserved-filter-keys";
6
+ import { isDraftModeRequest } from "nextly/runtime";
6
7
  // src/secret.ts
7
8
  const REDACTED = "[redacted]";
8
9
  /**
@@ -43,6 +44,6 @@ function secret(value) {
43
44
  function isSecret(value) {
44
45
  return value instanceof Secret;
45
46
  }
46
- export { AuthEvents, CORE_ADMIN_PLACES, DEFAULT_ADMIN_PATH, DocumentEvents, EXTENSION_SWITCH_SERVICE, FRAMEWORK_CRAWL_EXCLUSIONS, FilterSeams, MAX_ATTENTION_ITEMS_PER_PLUGIN, MAX_EMAIL_PROVIDER_TYPE_LENGTH, MAX_JOB_SLUG_LENGTH, MAX_WIDGET_ROWS, MediaEvents, NextlyError, PENDING_CHANGE_KEY, PLUGIN_CATEGORIES, PasswordTooLongError, Secret, TIMESERIES_INTERVALS, TrustedHtml, UserEvents, WIDGET_CONDITIONS, WIDGET_LIFECYCLES, WIDGET_OPS, WIDGET_SOURCE_FIELD_TYPES, WIDGET_SOURCE_KINDS, addressOfRequest, addressableFields, callerReadOptions, checkbox, collectDeclarations, collectionDraftSplit, date, defineAttentionItem, defineEmailProvider, defineJob, definePlugin, defineWidget, failRenderWhenUnavailable, formatWidgetChange, formatWidgetNumber, getCachedNextly, group, humanizeFieldName, isContentTypeScope, isLocaleSelector, isNextlyUnavailable, isPluginCategory, isSecret, isTimeseriesInterval, json, languageAddressOf, listEntries, listPageNumber, listPageOf, markHtml, mayDeleteEntry, mayWriteEntry, narrowScope, nextlyTags, number, option, pluginAdminSlug, pluginCacheTag, pluginField, previewUrlFromTemplate, publicAddressOf, readStoredFields, readableContent, readableTitleText, recordAdvisoryNotice, resolvedCollectionDraftSplit, resolvedCollectionView, respondAction, respondDoc, respondList, respondMutation, routePathIsLiteral, rowsThatFit, sanitizeAdminPath, secret, setting, standardWebhooks, storedValueHash, text, textarea, trustedClientIp, typesExtendedBy, typesReachedBy, typesWithoutAddress, updateIfUnchanged, upload, validateFieldValues, widgetChartColour };
47
+ export { AuthEvents, CORE_ADMIN_PLACES, DEFAULT_ADMIN_PATH, DocumentEvents, EXTENSION_SWITCH_SERVICE, FRAMEWORK_CRAWL_EXCLUSIONS, FilterSeams, MAX_ATTENTION_ITEMS_PER_PLUGIN, MAX_EMAIL_PROVIDER_TYPE_LENGTH, MAX_JOB_SLUG_LENGTH, MAX_WIDGET_ROWS, MEDIA_COPY_WIDTHS, MediaEvents, NextlyError, PENDING_CHANGE_KEY, PLUGIN_CATEGORIES, PasswordTooLongError, Secret, TIMESERIES_INTERVALS, TrustedHtml, UserEvents, WIDGET_CONDITIONS, WIDGET_LIFECYCLES, WIDGET_OPS, WIDGET_SOURCE_FIELD_TYPES, WIDGET_SOURCE_KINDS, addressOfRequest, addressableFields, callerReadOptions, checkbox, collectDeclarations, collectionDraftSplit, date, defineAttentionItem, defineEmailProvider, defineJob, definePlugin, defineWidget, failRenderWhenUnavailable, formatWidgetChange, formatWidgetNumber, getCachedNextly, group, humanizeFieldName, isContentTypeScope, isDraftModeRequest, isLocaleSelector, isNextlyUnavailable, isPluginCategory, isSecret, isTimeseriesInterval, json, languageAddressOf, listEntries, listPageNumber, listPageOf, markHtml, mayDeleteEntry, mayWriteEntry, narrowScope, nearestMediaCopyWidth, nextlyTags, number, option, pluginAdminSlug, pluginCacheTag, pluginField, previewUrlFromTemplate, publicAddressOf, readStoredFields, readableContent, readableTitleText, recordAdvisoryNotice, resolvedCollectionDraftSplit, resolvedCollectionView, respondAction, respondDoc, respondList, respondMutation, routePathIsLiteral, rowsThatFit, sanitizeAdminPath, secret, setting, standardWebhooks, storedValueHash, text, textarea, trustedClientIp, typesExtendedBy, typesReachedBy, typesWithoutAddress, updateIfUnchanged, upload, validateFieldValues, widgetChartColour };
47
48
 
48
49
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":[],"sources":["../src/secret.ts"],"sourcesContent":["const REDACTED = \"[redacted]\";\n\n/**\n * @experimental A secret value that auto-redacts at every common leak vector —\n * `JSON.stringify` (`toJSON`), `String()`/template interpolation (`toString`),\n * and `console.log`/`util.inspect` (the node inspect symbol). The real value is\n * available only via the explicit, greppable `.reveal()`. Wrap secret config /\n * env values (D37): `secret(process.env.API_KEY)`.\n */\nexport class Secret<T = string> {\n readonly #value: T;\n constructor(value: T) {\n this.#value = value;\n }\n /** Return the underlying secret value. The only way to read it. */\n reveal(): T {\n return this.#value;\n }\n toJSON(): string {\n return REDACTED;\n }\n toString(): string {\n return REDACTED;\n }\n}\n\n// `util.inspect` and `console.log` read a custom rendering from Node's own\n// registered symbol, which `Symbol.for` returns without importing `node:util`.\n// Defined on the prototype as a class method would be (not enumerable), rather\n// than in the class: a member under a computed key cannot be declared from the\n// source alone, and the published declaration never named it.\nObject.defineProperty(\n Secret.prototype,\n Symbol.for(\"nodejs.util.inspect.custom\"),\n {\n value(): string {\n return REDACTED;\n },\n writable: true,\n configurable: true,\n }\n);\n\n/** @experimental Wrap a value so it redacts unless explicitly `.reveal()`ed (D37). */\nexport function secret<T>(value: T): Secret<T> {\n return new Secret(value);\n}\n\n/** @experimental True if `value` is a {@link Secret}. */\nexport function isSecret(value: unknown): value is Secret<unknown> {\n return value instanceof Secret;\n}\n"],"mappings":";;;;;;AAAA,MAAM,WAAW;;;;;;;;AASjB,IAAa,SAAb,MAAgC;CAC9B;CACA,YAAY,OAAU;EACpB,KAAK,SAAS;CAChB;;CAEA,SAAY;EACV,OAAO,KAAK;CACd;CACA,SAAiB;EACf,OAAO;CACT;CACA,WAAmB;EACjB,OAAO;CACT;AACF;AAOA,OAAO,eACL,OAAO,WACP,OAAO,IAAI,4BAA4B,GACvC;CACE,QAAgB;EACd,OAAO;CACT;CACA,UAAU;CACV,cAAc;AAChB,CACF;;AAGA,SAAgB,OAAU,OAAqB;CAC7C,OAAO,IAAI,OAAO,KAAK;AACzB;;AAGA,SAAgB,SAAS,OAA0C;CACjE,OAAO,iBAAiB;AAC1B"}
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../src/secret.ts"],"sourcesContent":["const REDACTED = \"[redacted]\";\n\n/**\n * @experimental A secret value that auto-redacts at every common leak vector —\n * `JSON.stringify` (`toJSON`), `String()`/template interpolation (`toString`),\n * and `console.log`/`util.inspect` (the node inspect symbol). The real value is\n * available only via the explicit, greppable `.reveal()`. Wrap secret config /\n * env values (D37): `secret(process.env.API_KEY)`.\n */\nexport class Secret<T = string> {\n readonly #value: T;\n constructor(value: T) {\n this.#value = value;\n }\n /** Return the underlying secret value. The only way to read it. */\n reveal(): T {\n return this.#value;\n }\n toJSON(): string {\n return REDACTED;\n }\n toString(): string {\n return REDACTED;\n }\n}\n\n// `util.inspect` and `console.log` read a custom rendering from Node's own\n// registered symbol, which `Symbol.for` returns without importing `node:util`.\n// Defined on the prototype as a class method would be (not enumerable), rather\n// than in the class: a member under a computed key cannot be declared from the\n// source alone, and the published declaration never named it.\nObject.defineProperty(\n Secret.prototype,\n Symbol.for(\"nodejs.util.inspect.custom\"),\n {\n value(): string {\n return REDACTED;\n },\n writable: true,\n configurable: true,\n }\n);\n\n/** @experimental Wrap a value so it redacts unless explicitly `.reveal()`ed (D37). */\nexport function secret<T>(value: T): Secret<T> {\n return new Secret(value);\n}\n\n/** @experimental True if `value` is a {@link Secret}. */\nexport function isSecret(value: unknown): value is Secret<unknown> {\n return value instanceof Secret;\n}\n"],"mappings":";;;;;;;AAAA,MAAM,WAAW;;;;;;;;AASjB,IAAa,SAAb,MAAgC;CAC9B;CACA,YAAY,OAAU;EACpB,KAAK,SAAS;CAChB;;CAEA,SAAY;EACV,OAAO,KAAK;CACd;CACA,SAAiB;EACf,OAAO;CACT;CACA,WAAmB;EACjB,OAAO;CACT;AACF;AAOA,OAAO,eACL,OAAO,WACP,OAAO,IAAI,4BAA4B,GACvC;CACE,QAAgB;EACd,OAAO;CACT;CACA,UAAU;CACV,cAAc;AAChB,CACF;;AAGA,SAAgB,OAAU,OAAqB;CAC7C,OAAO,IAAI,OAAO,KAAK;AACzB;;AAGA,SAAgB,SAAS,OAA0C;CACjE,OAAO,iBAAiB;AAC1B"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nextlyhq/plugin-sdk",
3
- "version": "0.0.2-alpha.78",
3
+ "version": "0.0.2-alpha.79",
4
4
  "description": "Nextly Plugin SDK — the author-facing surface for building Nextly plugins; the plugin API stability boundary (see STABILITY.md).",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -86,12 +86,12 @@
86
86
  "node": "^22.12.0 || >=24.0.0"
87
87
  },
88
88
  "dependencies": {
89
- "@nextlyhq/blocks-engine": "0.0.2-alpha.78",
90
- "@nextlyhq/ui": "0.0.2-alpha.78"
89
+ "@nextlyhq/blocks-engine": "0.0.2-alpha.79",
90
+ "@nextlyhq/ui": "0.0.2-alpha.79"
91
91
  },
92
92
  "peerDependencies": {
93
- "@nextlyhq/admin": "0.0.2-alpha.78",
94
- "nextly": "0.0.2-alpha.78",
93
+ "@nextlyhq/admin": "0.0.2-alpha.79",
94
+ "nextly": "0.0.2-alpha.79",
95
95
  "react": "^19.3.0",
96
96
  "react-dom": "^19.3.0"
97
97
  },
@@ -107,12 +107,12 @@
107
107
  }
108
108
  },
109
109
  "devDependencies": {
110
- "@nextlyhq/admin": "0.0.2-alpha.78",
111
- "@nextlyhq/tsconfig": "0.0.2-alpha.78",
110
+ "@nextlyhq/admin": "0.0.2-alpha.79",
111
+ "@nextlyhq/tsconfig": "0.0.2-alpha.79",
112
112
  "@types/node": "^22.20.5",
113
113
  "@types/react": "19.3.0",
114
114
  "jsdom": "^27.1.0",
115
- "nextly": "0.0.2-alpha.78",
115
+ "nextly": "0.0.2-alpha.79",
116
116
  "react": "19.3.1",
117
117
  "react-dom": "19.3.1",
118
118
  "tsdown": "^0.23.1",