@medienreaktor/neos-studio 2.7.0 → 2.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +84 -7
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -14678,6 +14678,77 @@ declare class NodeDecoratorRegistry extends ObservableRegistry<NodeDecoratorDefi
|
|
|
14678
14678
|
*/
|
|
14679
14679
|
refresh(): void;
|
|
14680
14680
|
}
|
|
14681
|
+
/**
|
|
14682
|
+
* The property-action registry: buttons a plugin adds under a property's field
|
|
14683
|
+
* in the inspector, whatever editor the property has - "Generate" a text with
|
|
14684
|
+
* a model, look a value up, fill it from somewhere else. The field stays
|
|
14685
|
+
* Studio's (or the configured editor's); the action only reads and writes its
|
|
14686
|
+
* value. A plugin no longer has to replace an editor to put a button under it.
|
|
14687
|
+
*
|
|
14688
|
+
* Built on the shared observable store (see lib/registry.ts), like the property
|
|
14689
|
+
* hints: register-replaces-by-id, a stable snapshot, refresh() for actions
|
|
14690
|
+
* whose `when` depends on the plugin's own data.
|
|
14691
|
+
*/
|
|
14692
|
+
/** The property an action is asked about, as its node type configures it. */
|
|
14693
|
+
interface PropertyActionProperty {
|
|
14694
|
+
name: string;
|
|
14695
|
+
/** The property type, e.g. "string". */
|
|
14696
|
+
type: string;
|
|
14697
|
+
label: string;
|
|
14698
|
+
/** The editor configured for it, e.g. "Neos.Neos/Inspector/Editors/TextAreaEditor". */
|
|
14699
|
+
editor: string | null;
|
|
14700
|
+
/** ui.inspector.editorOptions - a plugin's own options can live here. */
|
|
14701
|
+
editorOptions: Record<string, unknown>;
|
|
14702
|
+
}
|
|
14703
|
+
/** What `when` gets to decide whether an action is offered. */
|
|
14704
|
+
interface PropertyActionContext {
|
|
14705
|
+
node: Node$1;
|
|
14706
|
+
property: PropertyActionProperty;
|
|
14707
|
+
}
|
|
14708
|
+
/** What `run` gets: the field's value, and the way to change it. */
|
|
14709
|
+
interface PropertyActionRunContext extends PropertyActionContext {
|
|
14710
|
+
/** The field's value now, including what was typed and not saved yet. */
|
|
14711
|
+
value: unknown;
|
|
14712
|
+
/**
|
|
14713
|
+
* Save a value for the property, as if the editor committed it, and show it
|
|
14714
|
+
* in the field - an unsaved draft there is replaced.
|
|
14715
|
+
*/
|
|
14716
|
+
setValue: (value: unknown) => void;
|
|
14717
|
+
/** The document shown in the preview, e.g. for context about the node. */
|
|
14718
|
+
document: Node$1 | null;
|
|
14719
|
+
/** The shell's actions, as node actions get them. */
|
|
14720
|
+
studio: StudioActions;
|
|
14721
|
+
}
|
|
14722
|
+
/** A button under a field. Shared by property actions and hint actions. */
|
|
14723
|
+
interface ActionButtonConfig {
|
|
14724
|
+
/** The button's text, e.g. "Generate" - an ellipsis when it asks for more. */
|
|
14725
|
+
label: LazyLabel;
|
|
14726
|
+
/** A Font Awesome icon name, any syntax `ui.icon` accepts. */
|
|
14727
|
+
icon?: string;
|
|
14728
|
+
}
|
|
14729
|
+
interface PropertyActionDefinition extends ActionButtonConfig {
|
|
14730
|
+
/** Unique id. Third-party entries should namespace ('vendor.package:generate'). */
|
|
14731
|
+
id: string;
|
|
14732
|
+
/** Sort weight; lower first. Defaults to 100. */
|
|
14733
|
+
order?: number;
|
|
14734
|
+
/**
|
|
14735
|
+
* Whether the action is offered for this property of this node. Called
|
|
14736
|
+
* while the inspector renders, for every property it shows - keep it cheap
|
|
14737
|
+
* and synchronous. A read-only or disabled property gets no actions anyway.
|
|
14738
|
+
*/
|
|
14739
|
+
when: (context: PropertyActionContext) => boolean;
|
|
14740
|
+
/**
|
|
14741
|
+
* What clicking does. A returned promise keeps the button busy until it
|
|
14742
|
+
* settles; a throw or a rejection ends as an error toast titled with the
|
|
14743
|
+
* label, as for node actions.
|
|
14744
|
+
*/
|
|
14745
|
+
run: (context: PropertyActionRunContext) => void | Promise<unknown>;
|
|
14746
|
+
}
|
|
14747
|
+
declare class PropertyActionRegistry extends ObservableRegistry<PropertyActionDefinition> {
|
|
14748
|
+
constructor();
|
|
14749
|
+
/** Re-emit without a registration change: what `when` depends on changed. */
|
|
14750
|
+
refresh(): void;
|
|
14751
|
+
}
|
|
14681
14752
|
/**
|
|
14682
14753
|
* The property-hint registry: notes a plugin shows under a property's field in
|
|
14683
14754
|
* the inspector - a finding of a content check, a reminder from an editorial
|
|
@@ -14700,18 +14771,16 @@ interface PropertyHint {
|
|
|
14700
14771
|
/** Who says it, shown before the message when given, e.g. "Content audit". */
|
|
14701
14772
|
source?: string;
|
|
14702
14773
|
/**
|
|
14703
|
-
* Something to do about it, shown as a
|
|
14774
|
+
* Something to do about it, shown as a button under the message - mark a
|
|
14704
14775
|
* finding as an exception, open the rule's explanation. Optional; a hint
|
|
14705
14776
|
* without one only informs.
|
|
14706
14777
|
*/
|
|
14707
14778
|
action?: PropertyHintAction;
|
|
14708
14779
|
}
|
|
14709
|
-
/** The
|
|
14710
|
-
interface PropertyHintAction {
|
|
14711
|
-
/** The link's text, e.g. "Exception …" - an ellipsis when it asks for more. */
|
|
14712
|
-
label: string;
|
|
14780
|
+
/** The button under a hint's message. */
|
|
14781
|
+
interface PropertyHintAction extends ActionButtonConfig {
|
|
14713
14782
|
/**
|
|
14714
|
-
* What clicking it does. A returned promise keeps the
|
|
14783
|
+
* What clicking it does. A returned promise keeps the button busy until it
|
|
14715
14784
|
* settles; a throw or a rejection ends as an error toast titled with the
|
|
14716
14785
|
* label, as for node actions. To ask for something first, open a dialog
|
|
14717
14786
|
* (`dialogs.open`) and return its `result`. When done, refresh the hints
|
|
@@ -22208,6 +22277,13 @@ export declare const nodeDecorators: NodeDecoratorRegistry;
|
|
|
22208
22277
|
* node type configuration. See {@link PropertyHintDefinition}.
|
|
22209
22278
|
*/
|
|
22210
22279
|
export declare const propertyHints: PropertyHintRegistry;
|
|
22280
|
+
/**
|
|
22281
|
+
* Register/unregister property actions - buttons under a property's field in
|
|
22282
|
+
* the inspector, whatever editor the property has: "Generate" a text, fill a
|
|
22283
|
+
* value from elsewhere. They read and write the field's value; the field
|
|
22284
|
+
* stays the configured editor. See {@link PropertyActionDefinition}.
|
|
22285
|
+
*/
|
|
22286
|
+
export declare const propertyActions: PropertyActionRegistry;
|
|
22211
22287
|
/**
|
|
22212
22288
|
* Register/unregister node actions - commands on a node, offered in the
|
|
22213
22289
|
* context menus of the document tree, the content outliner and the
|
|
@@ -22346,6 +22422,7 @@ export interface NeosStudioPluginApi extends PluginComponents {
|
|
|
22346
22422
|
workspaceDecorators: typeof workspaceDecorators;
|
|
22347
22423
|
nodeDecorators: typeof nodeDecorators;
|
|
22348
22424
|
propertyHints: typeof propertyHints;
|
|
22425
|
+
propertyActions: typeof propertyActions;
|
|
22349
22426
|
nodeActions: typeof nodeActions;
|
|
22350
22427
|
headerActions: typeof headerActions;
|
|
22351
22428
|
richTextExtensions: typeof richTextExtensions;
|
|
@@ -22396,4 +22473,4 @@ declare global {
|
|
|
22396
22473
|
* mounts and before any plugin script executes. Idempotent.
|
|
22397
22474
|
*/
|
|
22398
22475
|
export declare function installPluginApiGlobals(): void;
|
|
22399
|
-
export { type Account, type AccountRole, type AnyExtension, type Asset, type AssetCollection, type AssetCollectionCreate, type AssetCollectionReference, type AssetCollectionUpdate, type AssetIptc, type AssetSource, type AssetTag, type AssetTagCreate, type AssetTagReference, type AssetTagUpdate, type AssetType, type AssetUpdate, type AssetUsage, type AssetUsageListing, type AssetVariantCreate, Badge, type BaseWorkspaceChange, Button, type Change, type ChangeDiff, Checkbox, Combobox, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxGroupLabel, ComboboxInput, ComboboxItem, ComboboxList, ComboboxStatus, ComboboxTrigger, type ConflictingChange, type ContentDimension, type ContentDimensionValue, type ContentRepository, ContextMenu, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuSeparator, ContextMenuTrigger, CountBadge, type CreationDialogElementConfig, type CropRectangle, type CurrentAccount, type DataSourceData, Dialog, DialogContent, type DialogControls, DialogDescription, DialogFooter, type DialogHandle, DialogHeader, DialogTitle, type DimensionCoordinates, type DiscardingResult, type DockRegion, type Domain, type DomainCreate, type DomainUpdate, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, type Event$1 as Event, type EventDiff, type ExtensionConfig, Field, type HeaderActionContext, type HeaderActionDefinition, type IconProps, type IconSize, type IconVariant, type InfiniteData, Input, type InspectorGroupConfig, type InspectorTabConfig, type InspectorViewComponent, type InspectorViewConfig, type InspectorViewDefinition, type InspectorViewProps, type KeyboardShortcutDefinition, type LazyLabel, type LinkTypeDefinition, type LinkTypeTabProps, type ListingLinks, type ListingMeta, LoadingState, type MarkConfig, type ModalIcon, type NeosStudioGuestPluginApi, type Node$1 as Node, type NodeActionContext, type NodeActionDefinition, type NodeActionSurface, type NodeAddress, type NodeClassification, type NodeConfig, type NodeCopy, type NodeCreate, type NodeDecoration, type NodeDecorationContext, type NodeDecorationOverlay, type NodeDecoratorDefinition, type NodeMove, type NodePropertiesUpdate, type NodeReference, type NodeReferencesUpdate, type NodeType, type NodeTypeChange, type NodeTypeConfiguration, type NodeTypeGroup, type NodeTypeListing, type NodeTypeMap, type NodeVariantCreate, type NodeVariantListing, type PaginatedAssetListing, type PaginatedChangeListing, type PaginatedEventListing, type PaginatedNodeListing, type PaginatedUserListing, type PanelBadge, type PanelDefinition, type PanelPlacement, type PanelRect, type PasswordChange, Placeholder, Popover, PopoverContent, PopoverTrigger, type ProblemDocument, type Profile, type ProfileUpdate, type PropertyConfig, type PropertyEditorComponent, type PropertyEditorDefinition, type PropertyEditorProps, type PropertyEditorSubject, type PropertyHint, type PropertyHintAction, type PropertyHintDefinition, type PropertyHintTone, type PropertyInspectorConfig, type PropertyScope, type PublishingResult, type QueryClient, type QueryFunctionContext, type QueryKey, type ResolvedKeyboardShortcut, type RichTextExtensionContext, type RichTextExtensionDefinition, type RichTextSurface, type RichTextToolbarItem, SearchInput, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectTrigger, SelectValue, Separator, type SettingsDialogDefinition, Sheet, SheetContent, SheetDescription, SheetHeader, SheetTitle, type Site, type SiteCreate, type SiteCreationOptions, type SiteListing, type SiteNodeType, type SiteUpdate, Skeleton, Slider, Spinner, type StreamEvent, type StructureChange, type StudioActions, type StudioContextValue, type StudioEventHandler, type StudioEventMap, type StudioEventName, type StudioEvents, type StudioInvalidation, type StudioState, Table, TableBody, TableCell, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, type Task, type TaskStatus, Textarea, type TiptapBuildingBlocks, type Editor as TiptapEditor, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, type TranslateArgs, type UriPathSegment, type UseInfiniteQueryOptions, type UseInfiniteQueryResult, type UseMutationOptions, type UseMutationResult, type UseQueryOptions, type UseQueryResult, type User, type UserCreate, type UserOptions, type UserPasswordSet, type UserUpdate, type ValidatorDefinition, type ValidatorFunction, type ViewData, type Workspace, type WorkspaceClassification, type WorkspaceConflictProblem, type WorkspaceCreate, type WorkspaceDecoration, type WorkspaceDecoratorDefinition, type WorkspaceDiscard, type WorkspaceListing, type WorkspacePublish, type WorkspaceRebase, type WorkspaceRef, type WorkspaceRole, type WorkspaceRoleAssign, type WorkspaceRoleAssignment, type WorkspaceRoleAssignmentListing, type WorkspaceRoleSubject, type WorkspaceUpdate, type isRemoved, keepPreviousData, type nodeAddressFromContextPath, type nodeAddressFromKey, type nodeAddressKey, type nodeAddressOf, type nodeTypeConfiguration, type parseDimensionSpacePoint, queryClient, type sameDimensionSpacePoint, type sameNodeAddress, skipToken, studioFetch };
|
|
22476
|
+
export { type Account, type AccountRole, type ActionButtonConfig, type AnyExtension, type Asset, type AssetCollection, type AssetCollectionCreate, type AssetCollectionReference, type AssetCollectionUpdate, type AssetIptc, type AssetSource, type AssetTag, type AssetTagCreate, type AssetTagReference, type AssetTagUpdate, type AssetType, type AssetUpdate, type AssetUsage, type AssetUsageListing, type AssetVariantCreate, Badge, type BaseWorkspaceChange, Button, type Change, type ChangeDiff, Checkbox, Combobox, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxGroupLabel, ComboboxInput, ComboboxItem, ComboboxList, ComboboxStatus, ComboboxTrigger, type ConflictingChange, type ContentDimension, type ContentDimensionValue, type ContentRepository, ContextMenu, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuSeparator, ContextMenuTrigger, CountBadge, type CreationDialogElementConfig, type CropRectangle, type CurrentAccount, type DataSourceData, Dialog, DialogContent, type DialogControls, DialogDescription, DialogFooter, type DialogHandle, DialogHeader, DialogTitle, type DimensionCoordinates, type DiscardingResult, type DockRegion, type Domain, type DomainCreate, type DomainUpdate, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, type Event$1 as Event, type EventDiff, type ExtensionConfig, Field, type HeaderActionContext, type HeaderActionDefinition, type IconProps, type IconSize, type IconVariant, type InfiniteData, Input, type InspectorGroupConfig, type InspectorTabConfig, type InspectorViewComponent, type InspectorViewConfig, type InspectorViewDefinition, type InspectorViewProps, type KeyboardShortcutDefinition, type LazyLabel, type LinkTypeDefinition, type LinkTypeTabProps, type ListingLinks, type ListingMeta, LoadingState, type MarkConfig, type ModalIcon, type NeosStudioGuestPluginApi, type Node$1 as Node, type NodeActionContext, type NodeActionDefinition, type NodeActionSurface, type NodeAddress, type NodeClassification, type NodeConfig, type NodeCopy, type NodeCreate, type NodeDecoration, type NodeDecorationContext, type NodeDecorationOverlay, type NodeDecoratorDefinition, type NodeMove, type NodePropertiesUpdate, type NodeReference, type NodeReferencesUpdate, type NodeType, type NodeTypeChange, type NodeTypeConfiguration, type NodeTypeGroup, type NodeTypeListing, type NodeTypeMap, type NodeVariantCreate, type NodeVariantListing, type PaginatedAssetListing, type PaginatedChangeListing, type PaginatedEventListing, type PaginatedNodeListing, type PaginatedUserListing, type PanelBadge, type PanelDefinition, type PanelPlacement, type PanelRect, type PasswordChange, Placeholder, Popover, PopoverContent, PopoverTrigger, type ProblemDocument, type Profile, type ProfileUpdate, type PropertyActionContext, type PropertyActionDefinition, type PropertyActionProperty, type PropertyActionRunContext, type PropertyConfig, type PropertyEditorComponent, type PropertyEditorDefinition, type PropertyEditorProps, type PropertyEditorSubject, type PropertyHint, type PropertyHintAction, type PropertyHintDefinition, type PropertyHintTone, type PropertyInspectorConfig, type PropertyScope, type PublishingResult, type QueryClient, type QueryFunctionContext, type QueryKey, type ResolvedKeyboardShortcut, type RichTextExtensionContext, type RichTextExtensionDefinition, type RichTextSurface, type RichTextToolbarItem, SearchInput, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectTrigger, SelectValue, Separator, type SettingsDialogDefinition, Sheet, SheetContent, SheetDescription, SheetHeader, SheetTitle, type Site, type SiteCreate, type SiteCreationOptions, type SiteListing, type SiteNodeType, type SiteUpdate, Skeleton, Slider, Spinner, type StreamEvent, type StructureChange, type StudioActions, type StudioContextValue, type StudioEventHandler, type StudioEventMap, type StudioEventName, type StudioEvents, type StudioInvalidation, type StudioState, Table, TableBody, TableCell, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, type Task, type TaskStatus, Textarea, type TiptapBuildingBlocks, type Editor as TiptapEditor, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, type TranslateArgs, type UriPathSegment, type UseInfiniteQueryOptions, type UseInfiniteQueryResult, type UseMutationOptions, type UseMutationResult, type UseQueryOptions, type UseQueryResult, type User, type UserCreate, type UserOptions, type UserPasswordSet, type UserUpdate, type ValidatorDefinition, type ValidatorFunction, type ViewData, type Workspace, type WorkspaceClassification, type WorkspaceConflictProblem, type WorkspaceCreate, type WorkspaceDecoration, type WorkspaceDecoratorDefinition, type WorkspaceDiscard, type WorkspaceListing, type WorkspacePublish, type WorkspaceRebase, type WorkspaceRef, type WorkspaceRole, type WorkspaceRoleAssign, type WorkspaceRoleAssignment, type WorkspaceRoleAssignmentListing, type WorkspaceRoleSubject, type WorkspaceUpdate, type isRemoved, keepPreviousData, type nodeAddressFromContextPath, type nodeAddressFromKey, type nodeAddressKey, type nodeAddressOf, type nodeTypeConfiguration, type parseDimensionSpacePoint, queryClient, type sameDimensionSpacePoint, type sameNodeAddress, skipToken, studioFetch };
|
package/package.json
CHANGED