Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@figma/widget-typings

Package Overview
Dependencies
Maintainers
27
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@figma/widget-typings - npm Package Compare versions

Comparing version 1.4.0 to 1.5.0

49

index.d.ts

@@ -64,2 +64,3 @@ // Figma Widget API version 1, update 1

Fragment: Fragment
Span: Span
}

@@ -111,7 +112,24 @@

type SVG = FunctionalWidget<SVGProps>
type Span = (props: SpanProps) => FigmaVirtualNode<'span'>
type FigmaDeclarativeNode = Object | any[] | string | null | undefined | false
type FigmaVirtualNode<T> = { __type: T }
type FigmaDeclarativeChildren<T> =
| FigmaVirtualNode<T>
| FigmaDeclarativeChildren<T>[]
| string
| null
| undefined
| false
type FigmaDeclarativeNode = FigmaDeclarativeChildren<any>
type FunctionalWidget<T> = (props: T) => FigmaDeclarativeNode
type PropertyMenuItemType = 'action' | 'separator' | 'color-selector' | 'dropdown'
type PropertyMenuItemType =
| 'action'
| 'separator'
| 'color-selector'
| 'dropdown'
| 'toggle'
| 'link'

@@ -129,3 +147,7 @@ type HexCode = string

}
interface WidgetPropertyMenuLinkItem extends PropertyMenuItem {
itemType: 'link'
icon?: string | null
href: string
}
interface WidgetPropertyMenuSeparatorItem {

@@ -157,2 +179,8 @@ itemType: 'separator'

interface WidgetPropertyMenuToggleItem extends PropertyMenuItem {
itemType: 'toggle'
icon?: string
isToggled: boolean
}
type WidgetPropertyMenuItem =

@@ -163,2 +191,4 @@ | WidgetPropertyMenuActionItem

| WidgetPropertyMenuDropdownItem
| WidgetPropertyMenuToggleItem
| WidgetPropertyMenuLinkItem

@@ -183,7 +213,16 @@ type WidgetPropertyMenu = WidgetPropertyMenuItem[]

interface TextProps extends BaseProps, WidgetJSX.TextProps {
interface TextChildren {
children?:
| FigmaVirtualNode<'span'>
| string
| number
| (FigmaVirtualNode<'span'> | string | number)[]
}
interface TextProps extends BaseProps, WidgetJSX.TextProps, TextChildren {
font?: { family: string; style: string }
children?: string | number | (string | number)[]
}
interface SpanProps extends WidgetJSX.SpanProps, TextChildren {}
interface TextEditEvent {

@@ -190,0 +229,0 @@ characters: string

2

package.json
{
"name": "@figma/widget-typings",
"version": "1.4.0",
"version": "1.5.0",
"description": "Typings for the Figma Widget API",

@@ -5,0 +5,0 @@ "main": "",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc