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

@sanity/insert-menu

Package Overview
Dependencies
Maintainers
54
Versions
115
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sanity/insert-menu - npm Package Compare versions

Comparing version 1.0.4 to 1.0.5

8

dist/index.d.ts

@@ -10,4 +10,8 @@ /// <reference types="react" />

export declare interface InsertMenuOptions {
/** @defaultValue `false` */
filter?: boolean
/**
* @defaultValue `'auto'`
* `filter: 'auto'` automatically turns on filtering if there are more than 5
* schema types added to the menu.
*/
filter?: 'auto' | 'on' | 'off'
groups?: Array<{

@@ -14,0 +18,0 @@ name: string

@@ -28,4 +28,4 @@ import { jsx, jsxs } from "react/jsx-runtime";

function InsertMenu(props) {
var _a, _b;
const showIcons = props.showIcons === void 0 ? !0 : props.showIcons, showFilter = (_a = props.filter) != null ? _a : props.schemaTypes.length > 5, [state, send] = useReducer(fullInsertMenuReducer, {
var _a;
const showIcons = props.showIcons === void 0 ? !0 : props.showIcons, showFilter = props.filter === "on" ? !0 : props.filter === "off" ? !1 : props.schemaTypes.length > 5, [state, send] = useReducer(fullInsertMenuReducer, {
query: "",

@@ -40,3 +40,3 @@ groups: props.groups ? [

] : [],
views: ((_b = props.views) != null ? _b : [{ name: "list" }]).map((view, index) => ({
views: ((_a = props.views) != null ? _a : [{ name: "list" }]).map((view, index) => ({
...view,

@@ -43,0 +43,0 @@ selected: index === 0

{
"name": "@sanity/insert-menu",
"version": "1.0.4",
"version": "1.0.5",
"description": "",

@@ -5,0 +5,0 @@ "keywords": [],

/** @alpha This API may change */
export interface InsertMenuOptions {
/** @defaultValue `false` */
filter?: boolean
/**
* @defaultValue `'auto'`
* `filter: 'auto'` automatically turns on filtering if there are more than 5
* schema types added to the menu.
*/
filter?: 'auto' | 'on' | 'off'
groups?: Array<{name: string; title?: string; of?: Array<string>}>

@@ -6,0 +10,0 @@ /** defaultValue `true` */

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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