diff --git a/plugin-api-standalone.d.ts b/plugin-api-standalone.d.ts index 4871007..f88971c 100644 --- a/plugin-api-standalone.d.ts +++ b/plugin-api-standalone.d.ts @@ -745,6 +745,30 @@ declare type TextCase = | 'SMALL_CAPS' | 'SMALL_CAPS_FORCED' declare type TextDecoration = 'NONE' | 'UNDERLINE' | 'STRIKETHROUGH' +declare type TextDecorationStyle = 'SOLID' | 'WAVY' | 'DOTTED' +declare type TextDecorationOffset = + | { + readonly value: number + readonly unit: 'PIXELS' | 'PERCENT' + } + | { + readonly unit: 'AUTO' + } +declare type TextDecorationThickness = + | { + readonly value: number + readonly unit: 'PIXELS' | 'PERCENT' + } + | { + readonly unit: 'AUTO' + } +declare type TextDecorationColor = + | { + readonly value: SolidPaint + } + | { + readonly value: 'AUTO' + } declare type OpenTypeFeature = | 'PCAP' | 'C2PC' @@ -1229,6 +1253,11 @@ interface StyledTextSegment { fontName: FontName fontWeight: number textDecoration: TextDecoration + textDecorationStyle: TextDecorationStyle | null + textDecorationOffset: TextDecorationOffset | null + textDecorationThickness: TextDecorationThickness | null + textDecorationColor: TextDecorationColor | null + textDecorationSkipInk: boolean | null textCase: TextCase lineHeight: LineHeight letterSpacing: LetterSpacing @@ -1935,6 +1964,11 @@ interface NonResizableTextMixin { } | PluginAPI['mixed'] textDecoration: TextDecoration | PluginAPI['mixed'] + textDecorationStyle: TextDecorationStyle | PluginAPI['mixed'] | null + textDecorationOffset: TextDecorationOffset | PluginAPI['mixed'] | null + textDecorationThickness: TextDecorationThickness | PluginAPI['mixed'] | null + textDecorationColor: TextDecorationColor | PluginAPI['mixed'] | null + textDecorationSkipInk: boolean | PluginAPI['mixed'] | null letterSpacing: LetterSpacing | PluginAPI['mixed'] lineHeight: LineHeight | PluginAPI['mixed'] leadingTrim: LeadingTrim | PluginAPI['mixed'] @@ -1960,6 +1994,28 @@ interface NonResizableTextMixin { | PluginAPI['mixed'] getRangeTextDecoration(start: number, end: number): TextDecoration | PluginAPI['mixed'] setRangeTextDecoration(start: number, end: number, value: TextDecoration): void + getRangeTextDecorationStyle( + start: number, + end: number, + ): TextDecorationStyle | PluginAPI['mixed'] | null + setRangeTextDecorationStyle(start: number, end: number, value: TextDecorationStyle): void + getRangeTextDecorationOffset( + start: number, + end: number, + ): TextDecorationOffset | PluginAPI['mixed'] | null + setRangeTextDecorationOffset(start: number, end: number, value: TextDecorationOffset): void + getRangeTextDecorationThickness( + start: number, + end: number, + ): TextDecorationThickness | PluginAPI['mixed'] | null + setRangeTextDecorationThickness(start: number, end: number, value: TextDecorationThickness): void + getRangeTextDecorationColor( + start: number, + end: number, + ): TextDecorationColor | PluginAPI['mixed'] | null + setRangeTextDecorationColor(start: number, end: number, value: TextDecorationColor): void + getRangeTextDecorationSkipInk(start: number, end: number): boolean | PluginAPI['mixed'] | null + setRangeTextDecorationSkipInk(start: number, end: number, value: boolean): void getRangeLetterSpacing(start: number, end: number): LetterSpacing | PluginAPI['mixed'] setRangeLetterSpacing(start: number, end: number, value: LetterSpacing): void getRangeLineHeight(start: number, end: number): LineHeight | PluginAPI['mixed'] @@ -2622,4 +2678,4 @@ interface FindAllCriteria { } // prettier-ignore -export { ArgFreeEventType, PluginAPI, VersionHistoryResult, VariablesAPI, LibraryVariableCollection, LibraryVariable, TeamLibraryAPI, PaymentStatus, PaymentsAPI, ClientStorageAPI, NotificationOptions, NotifyDequeueReason, NotificationHandler, ShowUIOptions, UIPostMessageOptions, OnMessageProperties, MessageEventHandler, UIAPI, UtilAPI, ColorPalette, ColorPalettes, ConstantsAPI, CodegenEvent, CodegenPreferences, CodegenPreferencesEvent, CodegenResult, CodegenAPI, DevResource, DevResourceWithNodeId, LinkPreviewEvent, PlainTextElement, LinkPreviewResult, AuthEvent, DevResourceOpenEvent, AuthResult, VSCodeAPI, DevResourcesAPI, TimerAPI, ViewportAPI, TextReviewAPI, ParameterValues, SuggestionResults, ParameterInputEvent, ParametersAPI, RunParametersEvent, OpenDevResourcesEvent, RunEvent, DropEvent, DropItem, DropFile, DocumentChangeEvent, StyleChangeEvent, StyleChange, BaseDocumentChange, BaseNodeChange, RemovedNode, CreateChange, DeleteChange, PropertyChange, BaseStyleChange, StyleCreateChange, StyleDeleteChange, StylePropertyChange, DocumentChange, NodeChangeProperty, NodeChangeEvent, NodeChange, StyleChangeProperty, TextReviewEvent, TextReviewRange, Transform, Vector, Rect, RGB, RGBA, FontName, TextCase, TextDecoration, OpenTypeFeature, ArcData, DropShadowEffect, InnerShadowEffect, BlurEffect, Effect, ConstraintType, Constraints, ColorStop, ImageFilters, SolidPaint, GradientPaint, ImagePaint, VideoPaint, Paint, Guide, RowsColsLayoutGrid, GridLayoutGrid, LayoutGrid, ExportSettingsConstraints, ExportSettingsImage, ExportSettingsSVGBase, ExportSettingsSVG, ExportSettingsSVGString, ExportSettingsPDF, ExportSettingsREST, ExportSettings, WindingRule, VectorVertex, VectorSegment, VectorRegion, VectorNetwork, VectorPath, VectorPaths, LetterSpacing, LineHeight, LeadingTrim, HyperlinkTarget, TextListOptions, BlendMode, MaskType, Font, TextStyleOverrideType, StyledTextSegment, Reaction, VariableDataType, ExpressionFunction, Expression, VariableValueWithExpression, VariableData, ConditionalBlock, DevStatus, Action, SimpleTransition, DirectionalTransition, Transition, Trigger, Navigation, Easing, EasingFunctionBezier, EasingFunctionSpring, OverflowDirection, OverlayPositionType, OverlayBackground, OverlayBackgroundInteraction, PublishStatus, ConnectorEndpointPosition, ConnectorEndpointPositionAndEndpointNodeId, ConnectorEndpointEndpointNodeIdAndMagnet, ConnectorEndpoint, ConnectorStrokeCap, BaseNodeMixin, PluginDataMixin, DevResourcesMixin, DevStatusMixin, SceneNodeMixin, VariableBindableNodeField, VariableBindableTextField, VariableBindablePaintField, VariableBindablePaintStyleField, VariableBindableColorStopField, VariableBindableEffectField, VariableBindableEffectStyleField, VariableBindableLayoutGridField, VariableBindableGridStyleField, VariableBindableComponentPropertyField, VariableBindableComponentPropertyDefinitionField, StickableMixin, ChildrenMixin, ConstraintMixin, DimensionAndPositionMixin, LayoutMixin, BlendMixin, ContainerMixin, DeprecatedBackgroundMixin, StrokeCap, StrokeJoin, HandleMirroring, AutoLayoutMixin, AutoLayoutChildrenMixin, InferredAutoLayoutResult, DetachedInfo, MinimalStrokesMixin, IndividualStrokesMixin, MinimalFillsMixin, GeometryMixin, CornerMixin, RectangleCornerMixin, ExportMixin, FramePrototypingMixin, VectorLikeMixin, ReactionMixin, DocumentationLink, PublishableMixin, DefaultShapeMixin, BaseFrameMixin, DefaultFrameMixin, OpaqueNodeMixin, MinimalBlendMixin, Annotation, AnnotationProperty, AnnotationPropertyType, AnnotationsMixin, Measurement, MeasurementSide, MeasurementOffset, MeasurementsMixin, VariantMixin, ComponentPropertiesMixin, NonResizableTextMixin, TextSublayerNode, DocumentNode, ExplicitVariableModesMixin, PageNode, FrameNode, GroupNode, SliceNode, RectangleNode, LineNode, EllipseNode, PolygonNode, StarNode, VectorNode, TextNode, ComponentPropertyType, InstanceSwapPreferredValue, ComponentPropertyOptions, ComponentPropertyDefinitions, ComponentSetNode, ComponentNode, ComponentProperties, InstanceNode, BooleanOperationNode, StickyNode, StampNode, TableNode, TableCellNode, HighlightNode, WashiTapeNode, ShapeWithTextNode, CodeBlockNode, LabelSublayerNode, ConnectorNode, VariableResolvedDataType, VariableAlias, VariableValue, VariableScope, CodeSyntaxPlatform, Variable, VariableCollection, WidgetNode, EmbedData, EmbedNode, LinkUnfurlData, LinkUnfurlNode, MediaData, MediaNode, SectionNode, BaseNode, SceneNode, NodeType, StyleType, InheritedStyleField, StyleConsumers, BaseStyleMixin, PaintStyle, TextStyle, EffectStyle, GridStyle, BaseStyle, Image, Video, BaseUser, User, ActiveUser, FindAllCriteria } +export { ArgFreeEventType, PluginAPI, VersionHistoryResult, VariablesAPI, LibraryVariableCollection, LibraryVariable, TeamLibraryAPI, PaymentStatus, PaymentsAPI, ClientStorageAPI, NotificationOptions, NotifyDequeueReason, NotificationHandler, ShowUIOptions, UIPostMessageOptions, OnMessageProperties, MessageEventHandler, UIAPI, UtilAPI, ColorPalette, ColorPalettes, ConstantsAPI, CodegenEvent, CodegenPreferences, CodegenPreferencesEvent, CodegenResult, CodegenAPI, DevResource, DevResourceWithNodeId, LinkPreviewEvent, PlainTextElement, LinkPreviewResult, AuthEvent, DevResourceOpenEvent, AuthResult, VSCodeAPI, DevResourcesAPI, TimerAPI, ViewportAPI, TextReviewAPI, ParameterValues, SuggestionResults, ParameterInputEvent, ParametersAPI, RunParametersEvent, OpenDevResourcesEvent, RunEvent, DropEvent, DropItem, DropFile, DocumentChangeEvent, StyleChangeEvent, StyleChange, BaseDocumentChange, BaseNodeChange, RemovedNode, CreateChange, DeleteChange, PropertyChange, BaseStyleChange, StyleCreateChange, StyleDeleteChange, StylePropertyChange, DocumentChange, NodeChangeProperty, NodeChangeEvent, NodeChange, StyleChangeProperty, TextReviewEvent, TextReviewRange, Transform, Vector, Rect, RGB, RGBA, FontName, TextCase, TextDecoration, TextDecorationStyle, TextDecorationOffset, TextDecorationThickness, TextDecorationColor, OpenTypeFeature, ArcData, DropShadowEffect, InnerShadowEffect, BlurEffect, Effect, ConstraintType, Constraints, ColorStop, ImageFilters, SolidPaint, GradientPaint, ImagePaint, VideoPaint, Paint, Guide, RowsColsLayoutGrid, GridLayoutGrid, LayoutGrid, ExportSettingsConstraints, ExportSettingsImage, ExportSettingsSVGBase, ExportSettingsSVG, ExportSettingsSVGString, ExportSettingsPDF, ExportSettingsREST, ExportSettings, WindingRule, VectorVertex, VectorSegment, VectorRegion, VectorNetwork, VectorPath, VectorPaths, LetterSpacing, LineHeight, LeadingTrim, HyperlinkTarget, TextListOptions, BlendMode, MaskType, Font, TextStyleOverrideType, StyledTextSegment, Reaction, VariableDataType, ExpressionFunction, Expression, VariableValueWithExpression, VariableData, ConditionalBlock, DevStatus, Action, SimpleTransition, DirectionalTransition, Transition, Trigger, Navigation, Easing, EasingFunctionBezier, EasingFunctionSpring, OverflowDirection, OverlayPositionType, OverlayBackground, OverlayBackgroundInteraction, PublishStatus, ConnectorEndpointPosition, ConnectorEndpointPositionAndEndpointNodeId, ConnectorEndpointEndpointNodeIdAndMagnet, ConnectorEndpoint, ConnectorStrokeCap, BaseNodeMixin, PluginDataMixin, DevResourcesMixin, DevStatusMixin, SceneNodeMixin, VariableBindableNodeField, VariableBindableTextField, VariableBindablePaintField, VariableBindablePaintStyleField, VariableBindableColorStopField, VariableBindableEffectField, VariableBindableEffectStyleField, VariableBindableLayoutGridField, VariableBindableGridStyleField, VariableBindableComponentPropertyField, VariableBindableComponentPropertyDefinitionField, StickableMixin, ChildrenMixin, ConstraintMixin, DimensionAndPositionMixin, LayoutMixin, BlendMixin, ContainerMixin, DeprecatedBackgroundMixin, StrokeCap, StrokeJoin, HandleMirroring, AutoLayoutMixin, AutoLayoutChildrenMixin, InferredAutoLayoutResult, DetachedInfo, MinimalStrokesMixin, IndividualStrokesMixin, MinimalFillsMixin, GeometryMixin, CornerMixin, RectangleCornerMixin, ExportMixin, FramePrototypingMixin, VectorLikeMixin, ReactionMixin, DocumentationLink, PublishableMixin, DefaultShapeMixin, BaseFrameMixin, DefaultFrameMixin, OpaqueNodeMixin, MinimalBlendMixin, Annotation, AnnotationProperty, AnnotationPropertyType, AnnotationsMixin, Measurement, MeasurementSide, MeasurementOffset, MeasurementsMixin, VariantMixin, ComponentPropertiesMixin, NonResizableTextMixin, TextSublayerNode, DocumentNode, ExplicitVariableModesMixin, PageNode, FrameNode, GroupNode, SliceNode, RectangleNode, LineNode, EllipseNode, PolygonNode, StarNode, VectorNode, TextNode, ComponentPropertyType, InstanceSwapPreferredValue, ComponentPropertyOptions, ComponentPropertyDefinitions, ComponentSetNode, ComponentNode, ComponentProperties, InstanceNode, BooleanOperationNode, StickyNode, StampNode, TableNode, TableCellNode, HighlightNode, WashiTapeNode, ShapeWithTextNode, CodeBlockNode, LabelSublayerNode, ConnectorNode, VariableResolvedDataType, VariableAlias, VariableValue, VariableScope, CodeSyntaxPlatform, Variable, VariableCollection, WidgetNode, EmbedData, EmbedNode, LinkUnfurlData, LinkUnfurlNode, MediaData, MediaNode, SectionNode, BaseNode, SceneNode, NodeType, StyleType, InheritedStyleField, StyleConsumers, BaseStyleMixin, PaintStyle, TextStyle, EffectStyle, GridStyle, BaseStyle, Image, Video, BaseUser, User, ActiveUser, FindAllCriteria } diff --git a/plugin-api.d.ts b/plugin-api.d.ts index b26f3c7..8fad548 100644 --- a/plugin-api.d.ts +++ b/plugin-api.d.ts @@ -741,6 +741,30 @@ declare type TextCase = | 'SMALL_CAPS' | 'SMALL_CAPS_FORCED' declare type TextDecoration = 'NONE' | 'UNDERLINE' | 'STRIKETHROUGH' +declare type TextDecorationStyle = 'SOLID' | 'WAVY' | 'DOTTED' +declare type TextDecorationOffset = + | { + readonly value: number + readonly unit: 'PIXELS' | 'PERCENT' + } + | { + readonly unit: 'AUTO' + } +declare type TextDecorationThickness = + | { + readonly value: number + readonly unit: 'PIXELS' | 'PERCENT' + } + | { + readonly unit: 'AUTO' + } +declare type TextDecorationColor = + | { + readonly value: SolidPaint + } + | { + readonly value: 'AUTO' + } declare type OpenTypeFeature = | 'PCAP' | 'C2PC' @@ -1225,6 +1249,11 @@ interface StyledTextSegment { fontName: FontName fontWeight: number textDecoration: TextDecoration + textDecorationStyle: TextDecorationStyle | null + textDecorationOffset: TextDecorationOffset | null + textDecorationThickness: TextDecorationThickness | null + textDecorationColor: TextDecorationColor | null + textDecorationSkipInk: boolean | null textCase: TextCase lineHeight: LineHeight letterSpacing: LetterSpacing @@ -1931,6 +1960,11 @@ interface NonResizableTextMixin { } | PluginAPI['mixed'] textDecoration: TextDecoration | PluginAPI['mixed'] + textDecorationStyle: TextDecorationStyle | PluginAPI['mixed'] | null + textDecorationOffset: TextDecorationOffset | PluginAPI['mixed'] | null + textDecorationThickness: TextDecorationThickness | PluginAPI['mixed'] | null + textDecorationColor: TextDecorationColor | PluginAPI['mixed'] | null + textDecorationSkipInk: boolean | PluginAPI['mixed'] | null letterSpacing: LetterSpacing | PluginAPI['mixed'] lineHeight: LineHeight | PluginAPI['mixed'] leadingTrim: LeadingTrim | PluginAPI['mixed'] @@ -1956,6 +1990,28 @@ interface NonResizableTextMixin { | PluginAPI['mixed'] getRangeTextDecoration(start: number, end: number): TextDecoration | PluginAPI['mixed'] setRangeTextDecoration(start: number, end: number, value: TextDecoration): void + getRangeTextDecorationStyle( + start: number, + end: number, + ): TextDecorationStyle | PluginAPI['mixed'] | null + setRangeTextDecorationStyle(start: number, end: number, value: TextDecorationStyle): void + getRangeTextDecorationOffset( + start: number, + end: number, + ): TextDecorationOffset | PluginAPI['mixed'] | null + setRangeTextDecorationOffset(start: number, end: number, value: TextDecorationOffset): void + getRangeTextDecorationThickness( + start: number, + end: number, + ): TextDecorationThickness | PluginAPI['mixed'] | null + setRangeTextDecorationThickness(start: number, end: number, value: TextDecorationThickness): void + getRangeTextDecorationColor( + start: number, + end: number, + ): TextDecorationColor | PluginAPI['mixed'] | null + setRangeTextDecorationColor(start: number, end: number, value: TextDecorationColor): void + getRangeTextDecorationSkipInk(start: number, end: number): boolean | PluginAPI['mixed'] | null + setRangeTextDecorationSkipInk(start: number, end: number, value: boolean): void getRangeLetterSpacing(start: number, end: number): LetterSpacing | PluginAPI['mixed'] setRangeLetterSpacing(start: number, end: number, value: LetterSpacing): void getRangeLineHeight(start: number, end: number): LineHeight | PluginAPI['mixed']