-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add new @sanity/insert-menu package (#1630)
* feat: add new @sanity/insert-menu package In order to expose this menu to both `@sanity/visual-editing` and `sanity`. This repository might not be the best permanent resident for this package, but that's OK for now. * fixup! feat: add new @sanity/insert-menu package * fixup! feat: add new @sanity/insert-menu package
- Loading branch information
1 parent
9134258
commit a3afc03
Showing
16 changed files
with
1,198 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
indent_style = space | ||
indent_size = 2 | ||
end_of_line = lf | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
'use strict' | ||
|
||
/** @type import('eslint').Linter.Config */ | ||
module.exports = { | ||
root: true, | ||
env: { | ||
browser: true, | ||
es6: true, | ||
node: true, | ||
}, | ||
extends: ['eslint:recommended'], | ||
parserOptions: { | ||
ecmaVersion: 2020, | ||
sourceType: 'module', | ||
}, | ||
plugins: ['import', 'simple-import-sort'], | ||
rules: { | ||
'no-console': 'error', | ||
'no-shadow': 'error', | ||
'no-warning-comments': [ | ||
'warn', | ||
{ | ||
location: 'start', | ||
terms: ['todo', 'fixme'], | ||
}, | ||
], | ||
'quote-props': ['warn', 'consistent-as-needed'], | ||
'simple-import-sort/exports': 'warn', | ||
'simple-import-sort/imports': 'warn', | ||
'strict': ['warn', 'global'], | ||
}, | ||
overrides: [ | ||
{ | ||
files: ['**/*.ts', '**/*.tsx'], | ||
parser: '@typescript-eslint/parser', | ||
parserOptions: { | ||
project: ['./tsconfig.json'], | ||
}, | ||
extends: [ | ||
'eslint:recommended', | ||
'plugin:@typescript-eslint/eslint-recommended', | ||
'plugin:@typescript-eslint/recommended', | ||
], | ||
plugins: ['import', '@typescript-eslint', 'simple-import-sort'], | ||
rules: { | ||
'@typescript-eslint/explicit-module-boundary-types': 'error', | ||
'@typescript-eslint/interface-name-prefix': 'off', | ||
'@typescript-eslint/member-delimiter-style': 'off', | ||
'@typescript-eslint/no-empty-interface': 'off', | ||
}, | ||
}, | ||
], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
*.local | ||
*.log | ||
*.tgz | ||
|
||
.DS_Store | ||
dist | ||
etc | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# `@sanity/insert-menu` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import {defineConfig} from '@sanity/pkg-utils' | ||
|
||
// https://github.com/sanity-io/pkg-utils#configuration | ||
export default defineConfig({ | ||
// the path to the tsconfig file for distributed builds | ||
tsconfig: 'tsconfig.dist.json', | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
{ | ||
"name": "@sanity/insert-menu", | ||
"version": "0.0.0", | ||
"description": "", | ||
"keywords": [], | ||
"homepage": "https://github.com/sanity-io/visual-editing/tree/main/packages/insert-menu#readme", | ||
"bugs": { | ||
"url": "https://github.com/sanity-io/visual-editing/issues" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+ssh://[email protected]/sanity-io/visual-editing.git", | ||
"directory": "packages/insert-menu" | ||
}, | ||
"license": "MIT", | ||
"author": "Sanity.io <[email protected]>", | ||
"sideEffects": false, | ||
"type": "module", | ||
"exports": { | ||
".": { | ||
"source": "./src/index.ts", | ||
"require": "./dist/index.cjs", | ||
"default": "./dist/index.js" | ||
}, | ||
"./package.json": "./package.json" | ||
}, | ||
"main": "./dist/index.cjs", | ||
"module": "./dist/index.js", | ||
"types": "./dist/index.d.ts", | ||
"files": [ | ||
"dist", | ||
"src" | ||
], | ||
"scripts": { | ||
"build": "pkg build --strict --clean --check", | ||
"lint": "eslint .", | ||
"ts:check": "tsc --noEmit" | ||
}, | ||
"browserslist": "extends @sanity/browserslist-config", | ||
"dependencies": { | ||
"@sanity/icons": "^3.0.0", | ||
"@sanity/ui": "^2.3.0" | ||
}, | ||
"devDependencies": { | ||
"@sanity/pkg-utils": "^6.9.1", | ||
"@typescript-eslint/eslint-plugin": "^7.12.0", | ||
"@typescript-eslint/parser": "^7.12.0", | ||
"eslint": "^8.57.0", | ||
"eslint-plugin-import": "^2.29.1", | ||
"eslint-plugin-simple-import-sort": "^12.1.0", | ||
"lint-staged": "^15.2.5", | ||
"react": "^18.3.1", | ||
"react-dom": "^18.3.1", | ||
"react-is": "^18.3.1", | ||
"sanity": "3.45.0", | ||
"typescript": "^5.4.5" | ||
}, | ||
"peerDependencies": { | ||
"react": "^18.3 || >=19.0.0-rc", | ||
"react-dom": "^18.3 || >=19.0.0-rc", | ||
"react-is": "^18.3 || >=19.0.0-rc" | ||
}, | ||
"engines": { | ||
"node": ">=18.0.0" | ||
} | ||
} |
Oops, something went wrong.