├── packages ├── @sanity │ ├── check │ │ ├── sanity.json │ │ ├── .npmignore │ │ ├── .eslintrc │ │ └── .gitignore │ ├── util │ │ ├── .npmignore │ │ ├── test │ │ │ ├── versionsFixture │ │ │ │ ├── node_modules │ │ │ │ │ └── @sanity │ │ │ │ │ │ ├── base │ │ │ │ │ │ ├── sanity.json │ │ │ │ │ │ ├── placeholder.js │ │ │ │ │ │ └── package.json │ │ │ │ │ │ └── components │ │ │ │ │ │ ├── sanity.json │ │ │ │ │ │ ├── placeholder.js │ │ │ │ │ │ └── package.json │ │ │ │ ├── sanity.json │ │ │ │ └── package.json │ │ │ ├── mocha.opts │ │ │ └── init.js │ │ ├── README.md │ │ ├── .eslintrc │ │ ├── src │ │ │ └── lazyRequire.js │ │ └── .gitignore │ ├── cli │ │ ├── test │ │ │ ├── .gitkeep │ │ │ ├── mocha.opts │ │ │ ├── fixtures │ │ │ │ └── bin │ │ │ │ │ └── version-stub │ │ │ │ │ └── sanity │ │ │ ├── init.js │ │ │ └── temp.test.js │ │ ├── templates │ │ │ ├── blog │ │ │ │ ├── plugins │ │ │ │ │ └── .gitkeep │ │ │ │ ├── config │ │ │ │ │ ├── @sanity │ │ │ │ │ │ └── data-aspects.json │ │ │ │ │ └── .checksums │ │ │ │ ├── static │ │ │ │ │ ├── .gitkeep │ │ │ │ │ └── favicon.ico │ │ │ │ ├── .gitignore │ │ │ │ └── schemas │ │ │ │ │ └── category.js │ │ │ ├── clean │ │ │ │ ├── plugins │ │ │ │ │ └── .gitkeep │ │ │ │ ├── static │ │ │ │ │ ├── .gitkeep │ │ │ │ │ └── favicon.ico │ │ │ │ ├── config │ │ │ │ │ └── .checksums │ │ │ │ └── .gitignore │ │ │ ├── ecommerce │ │ │ │ ├── plugins │ │ │ │ │ ├── .gitkeep │ │ │ │ │ └── barcode-input │ │ │ │ │ │ └── sanity.json │ │ │ │ ├── static │ │ │ │ │ ├── .gitkeep │ │ │ │ │ └── favicon.ico │ │ │ │ ├── .gitignore │ │ │ │ └── schemas │ │ │ │ │ └── locale │ │ │ │ │ └── supportedLanguages.js │ │ │ └── moviedb │ │ │ │ ├── plugins │ │ │ │ └── .gitkeep │ │ │ │ ├── config │ │ │ │ ├── @sanity │ │ │ │ │ └── data-aspects.json │ │ │ │ └── .checksums │ │ │ │ ├── static │ │ │ │ ├── .gitkeep │ │ │ │ └── favicon.ico │ │ │ │ └── .gitignore │ │ ├── src │ │ │ ├── actions │ │ │ │ └── init-project │ │ │ │ │ └── templates │ │ │ │ │ ├── pluginGitKeep │ │ │ │ │ ├── staticGitKeep │ │ │ │ │ ├── checksums │ │ │ │ │ ├── blog.js │ │ │ │ │ ├── clean.js │ │ │ │ │ ├── gitignore │ │ │ │ │ └── index.js │ │ │ ├── debug.js │ │ │ ├── commands │ │ │ │ ├── projects │ │ │ │ │ └── projectsGroup.js │ │ │ │ ├── login │ │ │ │ │ └── loginCommand.js │ │ │ │ └── install │ │ │ │ │ └── installDependencies.js │ │ │ ├── prompters │ │ │ │ └── cliPrompter.js │ │ │ └── util │ │ │ │ └── canLaunchBrowser.js │ │ ├── README.md │ │ ├── .npmignore │ │ ├── .eslintrc │ │ ├── .babelrc │ │ ├── vendor │ │ │ └── README.md │ │ └── .gitignore │ ├── client │ │ ├── umd │ │ │ └── .gitkeep │ │ ├── src │ │ │ ├── http │ │ │ │ ├── browserMiddleware.js │ │ │ │ └── queryString.js │ │ │ ├── util │ │ │ │ ├── pick.js │ │ │ │ └── defaults.js │ │ │ └── users │ │ │ │ └── usersClient.js │ │ ├── .eslintrc │ │ ├── test │ │ │ ├── fixtures │ │ │ │ ├── pdf-sample.pdf │ │ │ │ └── horsehead-nebula.jpg │ │ │ └── .eslintrc │ │ ├── .npmignore │ │ ├── .travis.yml │ │ ├── .gitignore │ │ └── .babelrc │ ├── form-builder │ │ ├── docs │ │ │ ├── styling.md │ │ │ ├── validation.md │ │ │ ├── custom-dataformat.md │ │ │ ├── advanced-patching.md │ │ │ └── advanced-customization.md │ │ ├── examples │ │ │ ├── schema-testbed │ │ │ │ ├── config │ │ │ │ │ ├── .gitkeep │ │ │ │ │ └── .checksums │ │ │ │ ├── components │ │ │ │ │ ├── styles │ │ │ │ │ │ ├── shared.css │ │ │ │ │ │ ├── Header.css │ │ │ │ │ │ ├── Main.css │ │ │ │ │ │ └── SelectType.css │ │ │ │ │ └── custom │ │ │ │ │ │ ├── MyCustomSlugInput.js │ │ │ │ │ │ ├── mock │ │ │ │ │ │ └── validateSlug.js │ │ │ │ │ │ ├── MyCustomFileInput.js │ │ │ │ │ │ └── MyCustomImageInput.js │ │ │ │ ├── .eslintrc │ │ │ │ └── lib │ │ │ │ │ └── utils.js │ │ │ ├── undo │ │ │ │ ├── .eslintrc │ │ │ │ └── sanity.json │ │ │ └── quickstart │ │ │ │ └── sanity.json │ │ ├── .npmignore │ │ ├── src │ │ │ ├── inputs │ │ │ │ ├── ArrayInput │ │ │ │ │ ├── index.js │ │ │ │ │ └── styles │ │ │ │ │ │ └── ConfirmButton.css │ │ │ │ ├── FileInput │ │ │ │ │ └── index.js │ │ │ │ ├── ImageInput │ │ │ │ │ └── index.js │ │ │ │ ├── ObjectInput │ │ │ │ │ ├── index.js │ │ │ │ │ └── styles │ │ │ │ │ │ └── Field.css │ │ │ │ ├── BlockEditor-slate │ │ │ │ │ ├── index.js │ │ │ │ │ ├── util │ │ │ │ │ │ ├── randomKey.js │ │ │ │ │ │ └── mapToObject.js │ │ │ │ │ ├── styles │ │ │ │ │ │ ├── contentStyles │ │ │ │ │ │ │ ├── Normal.css │ │ │ │ │ │ │ └── Blockquote.css │ │ │ │ │ │ └── InvalidValue.css │ │ │ │ │ ├── toolbar │ │ │ │ │ │ └── styles │ │ │ │ │ │ │ ├── Decorators.css │ │ │ │ │ │ │ ├── ListItems.css │ │ │ │ │ │ │ ├── BlockStyle.css │ │ │ │ │ │ │ └── AnnotationButton.css │ │ │ │ │ ├── createSpanNode.js │ │ │ │ │ ├── constants.js │ │ │ │ │ ├── createBlockNode.js │ │ │ │ │ └── createInlineNode.js │ │ │ │ ├── ImageToolInput │ │ │ │ │ └── index.js │ │ │ │ ├── ReferenceInput │ │ │ │ │ ├── index.js │ │ │ │ │ └── styles │ │ │ │ │ │ └── ReferenceInput.css │ │ │ │ ├── InvalidValueInput │ │ │ │ │ └── index.js │ │ │ │ ├── OptionsArrayInput │ │ │ │ │ ├── index.js │ │ │ │ │ └── styles │ │ │ │ │ │ └── OptionsArrayInput.css │ │ │ │ ├── ArrayOfPrimitivesInput │ │ │ │ │ ├── index.js │ │ │ │ │ └── getEmptyValue.js │ │ │ │ ├── DateInputs │ │ │ │ │ └── index.js │ │ │ │ └── Slug │ │ │ │ │ └── styles │ │ │ │ │ └── SlugInput.css │ │ │ ├── sanity │ │ │ │ ├── uploads │ │ │ │ │ └── constants.js │ │ │ │ ├── .eslintrc │ │ │ │ └── locale │ │ │ │ │ └── strings.json │ │ │ ├── utils │ │ │ │ ├── debug.js │ │ │ │ ├── hasOwn.js │ │ │ │ ├── UploadTargetFieldset.js │ │ │ │ ├── resolveTypeName.js │ │ │ │ ├── fallback-preview │ │ │ │ │ └── PreviewPrimitive.js │ │ │ │ └── is.js │ │ │ ├── simplePatch.js │ │ │ ├── styles │ │ │ │ └── FormBuilder.css │ │ │ └── typedefs │ │ │ │ ├── path.js │ │ │ │ └── index.js │ │ ├── .babelrc │ │ ├── test │ │ │ ├── .babelrc │ │ │ ├── .eslintrc │ │ │ └── patching │ │ │ │ └── containers │ │ │ │ └── SlateNodeAccessors │ │ │ │ └── ListAccessor.js │ │ ├── .flowconfig │ │ ├── PatchEvent.js │ │ ├── .gitignore │ │ └── TODO.md │ ├── storybook │ │ ├── .npmignore │ │ ├── config.dist.json │ │ ├── .babelrc │ │ ├── src │ │ │ ├── config │ │ │ │ ├── styles.css │ │ │ │ └── addons.js │ │ │ ├── addons │ │ │ │ ├── Knobs.js │ │ │ │ └── Center.js │ │ │ └── tool │ │ │ │ └── index.js │ │ ├── README.md │ │ └── .gitignore │ ├── components │ │ ├── src │ │ │ ├── menus │ │ │ │ ├── FabActions.js │ │ │ │ └── styles │ │ │ │ │ └── FabActions.css │ │ │ ├── clickToScroll │ │ │ │ └── ClickToScroll.js │ │ │ ├── utilities │ │ │ │ ├── Portal │ │ │ │ │ ├── index.js │ │ │ │ │ └── Portal.css │ │ │ │ └── styles │ │ │ │ │ ├── Poppable.css │ │ │ │ │ └── ScrollContainer.css │ │ │ ├── textinputs │ │ │ │ └── DefaultTextInput.js │ │ │ ├── lists │ │ │ │ ├── sortable-grid │ │ │ │ │ ├── styles │ │ │ │ │ │ ├── SortableGridItem.css │ │ │ │ │ │ └── SortableGridList.css │ │ │ │ │ └── index.js │ │ │ │ ├── styles │ │ │ │ │ ├── DefaultList.css │ │ │ │ │ ├── DragHandle.css │ │ │ │ │ └── DefaultListItem.css │ │ │ │ ├── default │ │ │ │ │ ├── index.js │ │ │ │ │ ├── List.js │ │ │ │ │ └── ListItem.js │ │ │ │ ├── grid │ │ │ │ │ ├── index.js │ │ │ │ │ ├── styles │ │ │ │ │ │ └── GridItem.css │ │ │ │ │ └── GridItem.js │ │ │ │ └── sortable │ │ │ │ │ ├── styles │ │ │ │ │ └── SortableList.css │ │ │ │ │ ├── SortableListItem.js │ │ │ │ │ ├── index.js │ │ │ │ │ └── DragHandle.js │ │ │ ├── buttons │ │ │ │ ├── AnchorButton.js │ │ │ │ └── DefaultButton.js │ │ │ ├── typography │ │ │ │ └── styles │ │ │ │ │ └── story.css │ │ │ ├── fileinput │ │ │ │ └── FileInputButton.js │ │ │ ├── panes │ │ │ │ └── styles │ │ │ │ │ └── renderFunctions.css │ │ │ ├── labels │ │ │ │ └── styles │ │ │ │ │ └── DefaultLabel.css │ │ │ ├── previews │ │ │ │ ├── CustomPreview.js │ │ │ │ └── styles │ │ │ │ │ └── InlinePreview.css │ │ │ └── selects │ │ │ │ └── styles │ │ │ │ └── RadioSelect.css │ │ ├── README.md │ │ ├── .babelrc │ │ ├── .npmignore │ │ └── demo │ │ │ └── sanity.json │ ├── desk-tool │ │ ├── .npmignore │ │ ├── .babelrc │ │ ├── README.md │ │ ├── src │ │ │ ├── components │ │ │ │ └── styles │ │ │ │ │ ├── Diff.css │ │ │ │ │ ├── ReferringDocumentsList.css │ │ │ │ │ └── InspectView.css │ │ │ ├── styles │ │ │ │ └── GetStarted.css │ │ │ ├── utils │ │ │ │ └── dataAspects.js │ │ │ └── pane │ │ │ │ └── styles │ │ │ │ ├── EditorWrapper.css │ │ │ │ ├── enhanceWithAvailableHeight.css │ │ │ │ └── TypePane.css │ │ ├── examples │ │ │ └── testbed │ │ │ │ └── config │ │ │ │ ├── .checksums │ │ │ │ └── @sanity │ │ │ │ └── data-aspects.json │ │ └── .gitignore │ ├── image-url │ │ ├── .eslintignore │ │ ├── umd │ │ │ └── .gitkeep │ │ ├── .npmignore │ │ ├── test │ │ │ ├── .eslintrc │ │ │ └── parseAssetId.test.js │ │ ├── .gitignore │ │ ├── index.js │ │ ├── urlForImage.js │ │ └── .babelrc │ ├── mutator │ │ ├── .flowconfig │ │ ├── .npmignore │ │ ├── .babel-init.js │ │ ├── .babelrc │ │ ├── .travis.yml │ │ ├── src │ │ │ ├── document │ │ │ │ ├── debug.js │ │ │ │ └── index.js │ │ │ ├── patch │ │ │ │ ├── index.js │ │ │ │ └── util.js │ │ │ ├── index.js │ │ │ └── jsonpath │ │ │ │ ├── extract.js │ │ │ │ ├── extractWithPath.js │ │ │ │ └── index.js │ │ ├── .gitignore │ │ ├── flow-typed │ │ │ └── npm │ │ │ │ └── flow-bin_v0.x.x.js │ │ └── test │ │ │ └── extractWithPath.test.js │ ├── base │ │ ├── .npmignore │ │ ├── src │ │ │ ├── locale │ │ │ │ └── intl.js │ │ │ ├── components │ │ │ │ ├── icons │ │ │ │ │ ├── Sort.js │ │ │ │ │ ├── Undo.js │ │ │ │ │ ├── Public.js │ │ │ │ │ ├── AngleUpIcon.js │ │ │ │ │ ├── Binary.js │ │ │ │ │ ├── Visibility.js │ │ │ │ │ ├── VisibilityOff.js │ │ │ │ │ ├── Cog.js │ │ │ │ │ ├── Bars.js │ │ │ │ │ ├── Check.js │ │ │ │ │ ├── Edit.js │ │ │ │ │ ├── File.js │ │ │ │ │ ├── Plug.js │ │ │ │ │ ├── Plus.js │ │ │ │ │ ├── Sync.js │ │ │ │ │ ├── Trash.js │ │ │ │ │ ├── Error.js │ │ │ │ │ ├── Hamburger.js │ │ │ │ │ ├── Search.js │ │ │ │ │ ├── Upload.js │ │ │ │ │ ├── Calendar.js │ │ │ │ │ ├── ChevronDown.js │ │ │ │ │ ├── CloseIcon.js │ │ │ │ │ ├── SignOut.js │ │ │ │ │ ├── ThLarge.js │ │ │ │ │ ├── ThList.js │ │ │ │ │ ├── Warning.js │ │ │ │ │ ├── ImageArea.js │ │ │ │ │ ├── MoreVert.js │ │ │ │ │ ├── Question.js │ │ │ │ │ ├── CircleThin.js │ │ │ │ │ ├── FormatCode.js │ │ │ │ │ ├── Link.js │ │ │ │ │ ├── PlusCircle.js │ │ │ │ │ ├── Time.js │ │ │ │ │ ├── AngleDownIcon.js │ │ │ │ │ ├── CircleCheck.js │ │ │ │ │ ├── Fullscreen.js │ │ │ │ │ ├── Paste.js │ │ │ │ │ ├── SpinnerIcon.js │ │ │ │ │ ├── ViewColumn.js │ │ │ │ │ ├── ContentCopy.js │ │ │ │ │ ├── FormatBold.js │ │ │ │ │ ├── FormatItalic.js │ │ │ │ │ ├── FormatQuote.js │ │ │ │ │ ├── ArrowDropDown.js │ │ │ │ │ ├── SortAlphaDesc.js │ │ │ │ │ ├── FullscreenExit.js │ │ │ │ │ ├── TrashOutline.js │ │ │ │ │ ├── FormatUnderlined.js │ │ │ │ │ ├── PlusCircleOutline.js │ │ │ │ │ ├── FormatListBulleted.js │ │ │ │ │ ├── FormatListNumbered.js │ │ │ │ │ └── FormatStrikethrough.js │ │ │ │ └── styles │ │ │ │ │ └── SanityRoot.css │ │ │ ├── router │ │ │ │ └── index.js │ │ │ ├── datastores │ │ │ │ ├── user │ │ │ │ │ └── index.js │ │ │ │ ├── project │ │ │ │ │ └── index.js │ │ │ │ └── location │ │ │ │ │ └── index.js │ │ │ ├── index.js │ │ │ ├── styles │ │ │ │ ├── fonts.css │ │ │ │ ├── variables │ │ │ │ │ ├── override.css │ │ │ │ │ ├── list.css │ │ │ │ │ └── code.css │ │ │ │ ├── forms │ │ │ │ │ └── control.css │ │ │ │ ├── layout │ │ │ │ │ └── box.css │ │ │ │ └── typography │ │ │ │ │ └── code.css │ │ │ └── preview │ │ │ │ └── index.js │ │ ├── .babelrc │ │ ├── README.md │ │ ├── test │ │ │ ├── mocha.opts │ │ │ └── init.js │ │ └── .gitignore │ ├── webpack-integration │ │ ├── .gitignore │ │ ├── v1.js │ │ ├── v2.js │ │ ├── v3.js │ │ └── .eslintrc │ ├── date-input │ │ ├── .gitignore │ │ ├── schema.js │ │ ├── README.md │ │ └── sanity.json │ ├── presence-store │ │ └── .gitignore │ ├── preview │ │ ├── .npmignore │ │ ├── .babelrc │ │ ├── test │ │ │ └── .eslintrc │ │ ├── .flowconfig │ │ ├── README.md │ │ ├── jest.config.js │ │ ├── src │ │ │ ├── observePaths.js │ │ │ ├── streams │ │ │ │ ├── orientationChange.js │ │ │ │ ├── visibilityChange.js │ │ │ │ ├── resize.js │ │ │ │ └── scroll.js │ │ │ └── constants.js │ │ ├── .gitignore │ │ └── components.js │ ├── reflector-client │ │ └── .gitignore │ ├── resolver │ │ ├── .npmignore │ │ ├── .travis.yml │ │ ├── test │ │ │ ├── mocha.opts │ │ │ ├── .eslintrc │ │ │ └── init.js │ │ ├── README.md │ │ ├── .gitignore │ │ └── src │ │ │ └── removeDuplicatePlugins.js │ ├── schema │ │ ├── .npmignore │ │ ├── src │ │ │ ├── legacy │ │ │ │ ├── index.js │ │ │ │ ├── preview │ │ │ │ │ └── primitivePreview.js │ │ │ │ └── types │ │ │ │ │ └── document.js │ │ │ └── sanity │ │ │ │ ├── inspect.js │ │ │ │ ├── helpfulError.js │ │ │ │ ├── traverseSchema.js │ │ │ │ └── validation │ │ │ │ └── types │ │ │ │ └── common.js │ │ ├── .babelrc │ │ ├── test │ │ │ └── .eslintrc │ │ ├── .flowconfig │ │ ├── jest.config.js │ │ ├── .gitignore │ │ └── member-types.md │ ├── state-router │ │ ├── .npmignore │ │ ├── src │ │ │ ├── components │ │ │ │ ├── StateButton.js │ │ │ │ └── index.js │ │ │ ├── utils │ │ │ │ ├── hasOwn.js │ │ │ │ ├── arrayify.js │ │ │ │ ├── debug.js │ │ │ │ └── isEmpty.js │ │ │ └── index.js │ │ ├── components.js │ │ ├── .babelrc │ │ ├── .travis.yml │ │ ├── .babel-init.js │ │ ├── perf │ │ │ └── .eslintrc │ │ ├── .gitignore │ │ ├── .flowconfig │ │ └── test │ │ │ └── _util │ │ │ └── test.js │ ├── validation │ │ ├── .eslintignore │ │ ├── .eslintrc │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── test │ │ │ └── .eslintrc │ │ └── src │ │ │ ├── util │ │ │ ├── escapeRegex.js │ │ │ └── prefixPaths.js │ │ │ └── index.js │ ├── block-tools │ │ ├── .npmignore │ │ ├── test │ │ │ ├── tests │ │ │ │ ├── HtmlDeserializer │ │ │ │ │ ├── customSchema │ │ │ │ │ │ ├── input.html │ │ │ │ │ │ └── output.json │ │ │ │ │ ├── noBlockType │ │ │ │ │ │ ├── input.html │ │ │ │ │ │ └── index.js │ │ │ │ │ ├── word │ │ │ │ │ │ └── index.js │ │ │ │ │ ├── blockTags │ │ │ │ │ │ └── input.html │ │ │ │ │ ├── customRules │ │ │ │ │ │ └── input.html │ │ │ │ │ ├── decorators │ │ │ │ │ │ └── input.html │ │ │ │ │ └── annotations │ │ │ │ │ │ └── input.html │ │ │ │ └── converters │ │ │ │ │ ├── slateStateToBlocks │ │ │ │ │ ├── markDefs │ │ │ │ │ │ └── index.js │ │ │ │ │ └── decorators │ │ │ │ │ │ └── index.js │ │ │ │ │ └── blocksToSlateState │ │ │ │ │ └── decorators │ │ │ │ │ └── index.js │ │ │ ├── .eslintrc │ │ │ └── setup.js │ │ └── .gitignore │ ├── default-layout │ │ ├── .npmignore │ │ ├── .babelrc │ │ ├── example │ │ │ ├── schema.js │ │ │ ├── Main.js │ │ │ ├── plugins │ │ │ │ ├── my-tool │ │ │ │ │ └── sanity.json │ │ │ │ └── my-other-tool │ │ │ │ │ └── sanity.json │ │ │ ├── previewResolver.js │ │ │ ├── config │ │ │ │ ├── @sanity │ │ │ │ │ └── default-layout.json │ │ │ │ └── .checksums │ │ │ ├── authFetcher.js │ │ │ └── LoginDialog.js │ │ ├── config.dist.json │ │ ├── .gitignore │ │ └── src │ │ │ ├── components │ │ │ └── NotFound.js │ │ │ └── util │ │ │ └── reconfigureClient.js │ ├── language-filter │ │ ├── .gitignore │ │ ├── src │ │ │ └── filter-fields.js │ │ ├── .babelrc │ │ └── .npmignore │ ├── server │ │ ├── .npmignore │ │ ├── .babelrc │ │ ├── public │ │ │ └── favicon.png │ │ ├── .eslintrc │ │ ├── .gitignore │ │ └── src │ │ │ ├── configs │ │ │ ├── postcssPlugins.js │ │ │ └── babel-env-config.js │ │ │ ├── prodServer.js │ │ │ ├── browser │ │ │ └── entry.js │ │ │ └── util │ │ │ └── applyStaticLoaderFix.js │ ├── webpack-loader │ │ ├── .npmignore │ │ ├── src │ │ │ ├── emptyPart.js │ │ │ └── unimplementedPart.js │ │ ├── .eslintrc │ │ └── .gitignore │ ├── imagetool │ │ ├── .npmignore │ │ ├── index.js │ │ ├── constants.js │ │ ├── HotspotImage.js │ │ ├── test │ │ │ └── .eslintrc │ │ ├── .gitignore │ │ ├── calculateStyles.js │ │ ├── example │ │ │ ├── .eslintrc │ │ │ ├── public │ │ │ │ ├── hubble.jpg │ │ │ │ ├── koala.jpg │ │ │ │ ├── pigs-nose.png │ │ │ │ ├── dog_smaller.jpg │ │ │ │ └── storesmeden.jpg │ │ │ └── src │ │ │ │ └── history.js │ │ ├── src │ │ │ ├── styles │ │ │ │ ├── HotspotImage.css │ │ │ │ └── ImageTool.css │ │ │ └── constants.js │ │ ├── resources │ │ │ ├── openhand.cur │ │ │ ├── openhand.png │ │ │ ├── closedhand.cur │ │ │ └── closedhand.png │ │ └── .babelrc │ ├── observable │ │ ├── .gitignore │ │ ├── minimal.js │ │ ├── operators │ │ │ ├── map.js │ │ │ ├── filter.js │ │ │ └── reduce.js │ │ ├── .eslintrc │ │ ├── .npmignore │ │ ├── .babelrc │ │ └── README.md │ ├── uuid │ │ ├── index.js │ │ ├── .eslintrc │ │ └── README.md │ ├── production-preview │ │ ├── .npmignore │ │ ├── .babelrc │ │ ├── .gitignore │ │ └── src │ │ │ └── resolveProductionUrl.js │ ├── vision │ │ ├── .babelrc │ │ ├── tool.js │ │ ├── README.md │ │ ├── .npmignore │ │ ├── src │ │ │ ├── components │ │ │ │ └── LoadingSpinner.js │ │ │ ├── util │ │ │ │ ├── isPlainObject.js │ │ │ │ ├── calendarDate.js │ │ │ │ ├── request.js │ │ │ │ ├── encodeQueryString.js │ │ │ │ ├── tryParseParams.js │ │ │ │ └── parseApiQueryString.js │ │ │ └── VisionTool.js │ │ ├── .gitignore │ │ └── sanity.json │ ├── code-input │ │ ├── .babelrc │ │ ├── .npmignore │ │ ├── src │ │ │ ├── HighlightMarkers.css │ │ │ └── Preview.css │ │ ├── .gitignore │ │ └── README.md │ ├── color-input │ │ ├── .babelrc │ │ ├── .npmignore │ │ ├── .gitignore │ │ └── src │ │ │ └── ColorPickerFields.css │ ├── core │ │ ├── src │ │ │ ├── requiredCliVersionRange.js │ │ │ ├── debug.js │ │ │ ├── util │ │ │ │ ├── normalizePluginName.js │ │ │ │ ├── isProduction.js │ │ │ │ ├── trimQuery.js │ │ │ │ ├── generateGuid.js │ │ │ │ └── getStreamForUri.js │ │ │ ├── commands │ │ │ │ ├── hook │ │ │ │ │ └── hookGroup.js │ │ │ │ ├── cors │ │ │ │ │ └── corsGroup.js │ │ │ │ ├── dataset │ │ │ │ │ └── datasetGroup.js │ │ │ │ ├── documents │ │ │ │ │ └── documentsGroup.js │ │ │ │ └── check │ │ │ │ │ └── checkCommand.js │ │ │ ├── index.js │ │ │ └── actions │ │ │ │ └── exec │ │ │ │ └── babel.js │ │ ├── test │ │ │ ├── mocha.opts │ │ │ ├── init.js │ │ │ └── core.test.js │ │ ├── .npmignore │ │ ├── README.md │ │ ├── .eslintrc │ │ └── .gitignore │ ├── data-aspects │ │ ├── config.dist.json │ │ ├── .npmignore │ │ └── .gitignore │ ├── default-login │ │ ├── .babelrc │ │ ├── .npmignore │ │ ├── src │ │ │ └── styles │ │ │ │ └── LoginDialog.css │ │ ├── config.dist.json │ │ ├── locale │ │ │ └── en-US.json │ │ └── .gitignore │ ├── eventsource │ │ ├── node.js │ │ ├── .eslintrc │ │ ├── README.md │ │ └── browser.js │ ├── google-maps-input │ │ ├── .babelrc │ │ ├── .npmignore │ │ ├── config.dist.json │ │ ├── example │ │ │ └── config │ │ │ │ ├── @sanity │ │ │ │ └── google-maps-input.json │ │ │ │ └── .checksums │ │ ├── .gitignore │ │ ├── README.md │ │ └── sanity.json │ ├── import │ │ ├── test │ │ │ ├── helpers │ │ │ │ └── index.js │ │ │ ├── .eslintrc │ │ │ └── fixtures │ │ │ │ ├── img.gif │ │ │ │ ├── invalid-json.ndjson │ │ │ │ ├── employees.ndjson │ │ │ │ ├── missing-type.ndjson │ │ │ │ ├── valid-but-missing-ids.ndjson │ │ │ │ ├── invalid-id.ndjson │ │ │ │ ├── invalid-id-format.ndjson │ │ │ │ ├── unkeyed.ndjson │ │ │ │ └── mock-assets.js │ │ ├── .npmignore │ │ ├── .eslintrc │ │ ├── src │ │ │ └── assignDocumentId.js │ │ └── .gitignore │ ├── rich-date-input │ │ ├── .babelrc │ │ ├── schema.js │ │ ├── .npmignore │ │ ├── src │ │ │ └── index.js │ │ └── .gitignore │ ├── document-store │ │ ├── .npmignore │ │ ├── src │ │ │ ├── index.js │ │ │ └── utils │ │ │ │ └── debug.js │ │ └── .gitignore │ ├── document-window │ │ ├── .npmignore │ │ ├── .eslintrc │ │ ├── .gitignore │ │ ├── test │ │ │ └── .eslintrc │ │ └── src │ │ │ ├── Constants.js │ │ │ └── sortOrderToOperator.js │ ├── export │ │ ├── src │ │ │ ├── debug.js │ │ │ ├── stringifyStream.js │ │ │ ├── requestStream.js │ │ │ ├── rejectOnApiError.js │ │ │ └── filterDrafts.js │ │ ├── test │ │ │ └── .eslintrc │ │ ├── .npmignore │ │ ├── .eslintrc │ │ └── .gitignore │ ├── plugin-loader │ │ ├── test │ │ │ ├── fixture │ │ │ │ ├── plugins │ │ │ │ │ ├── @sanity │ │ │ │ │ │ └── some-plugin │ │ │ │ │ │ │ └── sanity.json │ │ │ │ │ ├── date │ │ │ │ │ │ ├── base.css │ │ │ │ │ │ ├── getIsoDate.js │ │ │ │ │ │ ├── getTimestamp.js │ │ │ │ │ │ └── datepicker.css │ │ │ │ │ └── better-date │ │ │ │ │ │ ├── getBetterTimestamp.js │ │ │ │ │ │ └── sanity.json │ │ │ │ ├── config │ │ │ │ │ ├── better-date.json │ │ │ │ │ └── @sanity │ │ │ │ │ │ └── some-plugin.json │ │ │ │ ├── getBar.js │ │ │ │ └── folder │ │ │ │ │ └── index.js │ │ │ ├── versionsFixture │ │ │ │ ├── node_modules │ │ │ │ │ └── @sanity │ │ │ │ │ │ ├── base │ │ │ │ │ │ ├── sanity.json │ │ │ │ │ │ ├── placeholder.js │ │ │ │ │ │ └── package.json │ │ │ │ │ │ └── components │ │ │ │ │ │ ├── sanity.json │ │ │ │ │ │ ├── placeholder.js │ │ │ │ │ │ └── package.json │ │ │ │ ├── sanity.json │ │ │ │ └── package.json │ │ │ └── .eslintrc │ │ ├── .eslintrc │ │ ├── README.md │ │ └── register.js │ ├── import-cli │ │ ├── .npmignore │ │ ├── .eslintrc │ │ └── .gitignore │ └── generate-help-url │ │ ├── index.js │ │ ├── .eslintrc │ │ └── test │ │ └── generate-help-url.test.js ├── blog-studio │ ├── plugins │ │ └── .gitkeep │ ├── config │ │ └── @sanity │ │ │ ├── data-aspects.json │ │ │ ├── default-layout.json │ │ │ ├── default-login.json │ │ │ └── google-maps-input.json │ ├── schemas │ │ └── schema.js │ ├── static │ │ └── .gitkeep │ ├── .gitignore │ └── README.md ├── storybook │ └── config │ │ └── @sanity │ │ ├── storybook.json │ │ ├── data-aspects.json │ │ ├── default-layout.json │ │ └── google-maps-input.json ├── test-studio │ ├── config │ │ └── @sanity │ │ │ ├── storybook.json │ │ │ ├── data-aspects.json │ │ │ ├── default-layout.json │ │ │ ├── default-login.json │ │ │ └── google-maps-input.json │ ├── static │ │ └── .gitkeep │ ├── README.md │ ├── src │ │ ├── components │ │ │ ├── fonts │ │ │ │ ├── Rye-Regular.eot │ │ │ │ ├── Rye-Regular.otf │ │ │ │ ├── Rye-Regular.ttf │ │ │ │ ├── Rye-Regular.woff │ │ │ │ └── Rye-Regular.woff2 │ │ │ ├── PertEstimate.js │ │ │ ├── PertEstimate.css │ │ │ ├── SearchableArrayFunctions.css │ │ │ └── AuthorReferenceInput.css │ │ └── resolveProductionUrl.js │ ├── schemas │ │ ├── customNumber.js │ │ └── empty.js │ └── .gitignore ├── example-studio │ ├── components │ │ ├── Slider │ │ │ └── index.js │ │ ├── FunkyEditor │ │ │ └── index.js │ │ ├── VideoEmbedPreview │ │ │ ├── index.js │ │ │ └── VideoEmbedPreview.css │ │ └── VideoEmbedInput │ │ │ ├── index.js │ │ │ └── VideoEmbedInput.css │ ├── config │ │ └── @sanity │ │ │ ├── storybook.json │ │ │ ├── default-layout.json │ │ │ ├── default-login.json │ │ │ └── data-aspects.json │ ├── plugins │ │ ├── .gitkeep │ │ └── dark-theme │ │ │ ├── README.md │ │ │ ├── .gitignore │ │ │ └── sanity.json │ ├── README.md │ ├── static │ │ └── .gitkeep │ ├── parts │ │ ├── AuthorPreview.css │ │ └── languageFilterConfig.js │ ├── .gitignore │ └── schemas │ │ ├── localeString.js │ │ └── localeBlockContent.js ├── movies-studio │ ├── plugins │ │ └── .gitkeep │ ├── config │ │ └── @sanity │ │ │ ├── data-aspects.json │ │ │ ├── default-layout.json │ │ │ ├── default-login.json │ │ │ └── google-maps-input.json │ ├── schemas │ │ └── schema.js │ ├── static │ │ └── .gitkeep │ ├── .gitignore │ └── README.md ├── ecommerce-studio │ ├── config │ │ └── @sanity │ │ │ ├── data-aspects.json │ │ │ ├── default-layout.json │ │ │ └── default-login.json │ ├── schemas │ │ └── schema.js │ └── plugins │ │ └── barcode-input │ │ └── sanity.json └── eslint-config-sanity │ ├── .eslintrc │ └── README.md ├── scripts ├── .eslintrc └── transformPkgs.js ├── .prettierrc ├── .stylelintignore ├── .eslintignore ├── babel.config.js └── .editorconfig /packages/@sanity/check/sanity.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /packages/@sanity/util/.npmignore: -------------------------------------------------------------------------------- 1 | src/ 2 | -------------------------------------------------------------------------------- /packages/@sanity/cli/test/.gitkeep: -------------------------------------------------------------------------------- 1 | Keep me 2 | -------------------------------------------------------------------------------- /packages/@sanity/client/umd/.gitkeep: -------------------------------------------------------------------------------- 1 | Keep me 2 | -------------------------------------------------------------------------------- /packages/@sanity/form-builder/docs/styling.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/@sanity/storybook/.npmignore: -------------------------------------------------------------------------------- 1 | src 2 | -------------------------------------------------------------------------------- /packages/@sanity/components/src/menus/FabActions.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/@sanity/desk-tool/.npmignore: -------------------------------------------------------------------------------- 1 | src 2 | 3 | -------------------------------------------------------------------------------- /packages/@sanity/image-url/.eslintignore: -------------------------------------------------------------------------------- 1 | lib/ 2 | -------------------------------------------------------------------------------- /packages/@sanity/image-url/umd/.gitkeep: -------------------------------------------------------------------------------- 1 | Keep me! 2 | -------------------------------------------------------------------------------- /packages/@sanity/mutator/.flowconfig: -------------------------------------------------------------------------------- 1 | [options] 2 | -------------------------------------------------------------------------------- /packages/@sanity/base/.npmignore: -------------------------------------------------------------------------------- 1 | src/ 2 | coverage/ 3 | -------------------------------------------------------------------------------- /packages/@sanity/webpack-integration/.gitignore: -------------------------------------------------------------------------------- 1 | lib/ 2 | -------------------------------------------------------------------------------- /packages/@sanity/components/src/clickToScroll/ClickToScroll.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/@sanity/date-input/.gitignore: -------------------------------------------------------------------------------- 1 | lib 2 | node_modules 3 | -------------------------------------------------------------------------------- /packages/@sanity/form-builder/docs/validation.md: -------------------------------------------------------------------------------- 1 | # Validation -------------------------------------------------------------------------------- /packages/@sanity/mutator/.npmignore: -------------------------------------------------------------------------------- 1 | .idea 2 | flow-typed 3 | -------------------------------------------------------------------------------- /packages/@sanity/presence-store/.gitignore: -------------------------------------------------------------------------------- 1 | /tmp 2 | /lib 3 | -------------------------------------------------------------------------------- /packages/@sanity/preview/.npmignore: -------------------------------------------------------------------------------- 1 | src/ 2 | coverage/ 3 | .idea -------------------------------------------------------------------------------- /packages/@sanity/reflector-client/.gitignore: -------------------------------------------------------------------------------- 1 | /tmp 2 | /lib 3 | -------------------------------------------------------------------------------- /packages/@sanity/resolver/.npmignore: -------------------------------------------------------------------------------- 1 | src/ 2 | coverage/ 3 | -------------------------------------------------------------------------------- /packages/@sanity/schema/.npmignore: -------------------------------------------------------------------------------- 1 | src/ 2 | coverage/ 3 | .idea -------------------------------------------------------------------------------- /packages/@sanity/state-router/.npmignore: -------------------------------------------------------------------------------- 1 | .idea 2 | demo-server/ -------------------------------------------------------------------------------- /packages/@sanity/state-router/src/components/StateButton.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/@sanity/validation/.eslintignore: -------------------------------------------------------------------------------- 1 | lib 2 | coverage 3 | -------------------------------------------------------------------------------- /packages/@sanity/block-tools/.npmignore: -------------------------------------------------------------------------------- 1 | .idea 2 | test 3 | src 4 | -------------------------------------------------------------------------------- /packages/@sanity/default-layout/.npmignore: -------------------------------------------------------------------------------- 1 | src/ 2 | coverage/ 3 | -------------------------------------------------------------------------------- /packages/@sanity/language-filter/.gitignore: -------------------------------------------------------------------------------- 1 | lib 2 | node_modules 3 | -------------------------------------------------------------------------------- /packages/@sanity/server/.npmignore: -------------------------------------------------------------------------------- 1 | src/ 2 | coverage/ 3 | test/ 4 | -------------------------------------------------------------------------------- /packages/@sanity/webpack-loader/.npmignore: -------------------------------------------------------------------------------- 1 | coverage/ 2 | test/ 3 | -------------------------------------------------------------------------------- /packages/@sanity/base/src/locale/intl.js: -------------------------------------------------------------------------------- 1 | export * from 'react-intl' 2 | -------------------------------------------------------------------------------- /packages/@sanity/form-builder/docs/custom-dataformat.md: -------------------------------------------------------------------------------- 1 | $type vs _type -------------------------------------------------------------------------------- /packages/@sanity/form-builder/examples/schema-testbed/config/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/@sanity/imagetool/.npmignore: -------------------------------------------------------------------------------- 1 | example 2 | test 3 | src 4 | .idea -------------------------------------------------------------------------------- /packages/@sanity/imagetool/index.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./lib') 2 | -------------------------------------------------------------------------------- /packages/@sanity/mutator/.babel-init.js: -------------------------------------------------------------------------------- 1 | require('babel-register') 2 | -------------------------------------------------------------------------------- /packages/@sanity/observable/.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | lib 3 | node_modules 4 | -------------------------------------------------------------------------------- /packages/@sanity/uuid/index.js: -------------------------------------------------------------------------------- 1 | module.exports = require('uuid/v4') 2 | -------------------------------------------------------------------------------- /packages/@sanity/webpack-loader/src/emptyPart.js: -------------------------------------------------------------------------------- 1 | module.exports = [] 2 | -------------------------------------------------------------------------------- /packages/@sanity/base/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | presets: ['@babel/react'] 3 | } 4 | -------------------------------------------------------------------------------- /packages/@sanity/client/src/http/browserMiddleware.js: -------------------------------------------------------------------------------- 1 | module.exports = [] 2 | -------------------------------------------------------------------------------- /packages/@sanity/form-builder/docs/advanced-patching.md: -------------------------------------------------------------------------------- 1 | # Patches and mutations -------------------------------------------------------------------------------- /packages/@sanity/mutator/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | presets: ['@babel/flow'] 3 | } 4 | -------------------------------------------------------------------------------- /packages/@sanity/production-preview/.npmignore: -------------------------------------------------------------------------------- 1 | .babelrc 2 | src 3 | test 4 | -------------------------------------------------------------------------------- /packages/@sanity/server/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | presets: ['@babel/react'] 3 | } 4 | -------------------------------------------------------------------------------- /packages/@sanity/storybook/config.dist.json: -------------------------------------------------------------------------------- 1 | { 2 | "port": 9001 3 | } 4 | -------------------------------------------------------------------------------- /packages/@sanity/vision/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | presets: ['@babel/react'] 3 | } 4 | -------------------------------------------------------------------------------- /packages/@sanity/code-input/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | presets: ['@babel/react'] 3 | } 4 | -------------------------------------------------------------------------------- /packages/@sanity/color-input/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | presets: ['@babel/react'] 3 | } 4 | -------------------------------------------------------------------------------- /packages/@sanity/components/README.md: -------------------------------------------------------------------------------- 1 | # components 2 | 3 | Basic UX components 4 | -------------------------------------------------------------------------------- /packages/@sanity/core/src/requiredCliVersionRange.js: -------------------------------------------------------------------------------- 1 | export default '>=0.127.1' 2 | -------------------------------------------------------------------------------- /packages/@sanity/data-aspects/config.dist.json: -------------------------------------------------------------------------------- 1 | { 2 | "listOptions": {} 3 | } 4 | -------------------------------------------------------------------------------- /packages/@sanity/default-login/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | presets: ['@babel/react'] 3 | } 4 | -------------------------------------------------------------------------------- /packages/@sanity/desk-tool/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | presets: ['@babel/react'] 3 | } 4 | -------------------------------------------------------------------------------- /packages/@sanity/eventsource/node.js: -------------------------------------------------------------------------------- 1 | module.exports = require('eventsource') 2 | -------------------------------------------------------------------------------- /packages/@sanity/schema/src/legacy/index.js: -------------------------------------------------------------------------------- 1 | export {default} from './Schema' 2 | -------------------------------------------------------------------------------- /packages/@sanity/storybook/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | presets: ['@babel/react'] 3 | } 4 | -------------------------------------------------------------------------------- /packages/@sanity/vision/tool.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./lib/VisionTool') 2 | -------------------------------------------------------------------------------- /packages/@sanity/webpack-integration/v1.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./src/v1') 2 | -------------------------------------------------------------------------------- /packages/@sanity/webpack-integration/v2.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./src/v2') 2 | -------------------------------------------------------------------------------- /packages/@sanity/webpack-integration/v3.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./src/v3') 2 | -------------------------------------------------------------------------------- /packages/blog-studio/plugins/.gitkeep: -------------------------------------------------------------------------------- 1 | User-specific packages can be placed here 2 | -------------------------------------------------------------------------------- /packages/storybook/config/@sanity/storybook.json: -------------------------------------------------------------------------------- 1 | { 2 | "port": 9001 3 | } 4 | -------------------------------------------------------------------------------- /packages/test-studio/config/@sanity/storybook.json: -------------------------------------------------------------------------------- 1 | { 2 | "port": 9001 3 | } 4 | -------------------------------------------------------------------------------- /packages/@sanity/default-layout/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | presets: ['@babel/react'] 3 | } 4 | -------------------------------------------------------------------------------- /packages/@sanity/form-builder/docs/advanced-customization.md: -------------------------------------------------------------------------------- 1 | # Advanced customizations -------------------------------------------------------------------------------- /packages/@sanity/google-maps-input/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | presets: ['@babel/react'] 3 | } 4 | -------------------------------------------------------------------------------- /packages/@sanity/imagetool/constants.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./lib/constants') 2 | -------------------------------------------------------------------------------- /packages/@sanity/import/test/helpers/index.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./helpers') 2 | -------------------------------------------------------------------------------- /packages/@sanity/production-preview/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | presets: ['@babel/react'] 3 | } 4 | -------------------------------------------------------------------------------- /packages/@sanity/rich-date-input/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | presets: ['@babel/react'] 3 | } 4 | -------------------------------------------------------------------------------- /packages/@sanity/rich-date-input/schema.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./lib/schema') 2 | -------------------------------------------------------------------------------- /packages/@sanity/schema/src/sanity/inspect.js: -------------------------------------------------------------------------------- 1 | export {default} from 'object-inspect' 2 | -------------------------------------------------------------------------------- /packages/@sanity/storybook/src/config/styles.css: -------------------------------------------------------------------------------- 1 | #root { 2 | padding: 1rem; 3 | } 4 | -------------------------------------------------------------------------------- /packages/@sanity/util/test/versionsFixture/node_modules/@sanity/base/sanity.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /packages/example-studio/components/Slider/index.js: -------------------------------------------------------------------------------- 1 | export {default} from './Slider' 2 | -------------------------------------------------------------------------------- /packages/example-studio/config/@sanity/storybook.json: -------------------------------------------------------------------------------- 1 | { 2 | "port": 9001 3 | } 4 | -------------------------------------------------------------------------------- /packages/example-studio/plugins/.gitkeep: -------------------------------------------------------------------------------- 1 | User-specific packages can be placed here 2 | -------------------------------------------------------------------------------- /packages/movies-studio/plugins/.gitkeep: -------------------------------------------------------------------------------- 1 | User-specific packages can be placed here 2 | -------------------------------------------------------------------------------- /packages/storybook/config/@sanity/data-aspects.json: -------------------------------------------------------------------------------- 1 | { 2 | "listOptions": {} 3 | } 4 | -------------------------------------------------------------------------------- /packages/@sanity/components/src/utilities/Portal/index.js: -------------------------------------------------------------------------------- 1 | export {Portal} from './Portal' 2 | -------------------------------------------------------------------------------- /packages/@sanity/document-store/.npmignore: -------------------------------------------------------------------------------- 1 | .idea 2 | example-app 3 | test 4 | form-builder-old -------------------------------------------------------------------------------- /packages/@sanity/document-window/.npmignore: -------------------------------------------------------------------------------- 1 | .idea 2 | example-app 3 | test 4 | coverage 5 | -------------------------------------------------------------------------------- /packages/@sanity/export/src/debug.js: -------------------------------------------------------------------------------- 1 | module.exports = require('debug')('sanity:export') 2 | -------------------------------------------------------------------------------- /packages/@sanity/imagetool/HotspotImage.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./lib/HotspotImage') 2 | -------------------------------------------------------------------------------- /packages/@sanity/mutator/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "4" 4 | - "6" -------------------------------------------------------------------------------- /packages/@sanity/plugin-loader/test/fixture/plugins/@sanity/some-plugin/sanity.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /packages/@sanity/preview/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | presets: ['@babel/flow', '@babel/react'] 3 | } 4 | -------------------------------------------------------------------------------- /packages/@sanity/schema/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | presets: ['@babel/react', '@babel/flow'] 3 | } 4 | -------------------------------------------------------------------------------- /packages/@sanity/state-router/components.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./lib/components') 2 | -------------------------------------------------------------------------------- /packages/@sanity/util/test/versionsFixture/node_modules/@sanity/components/sanity.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /packages/blog-studio/config/@sanity/data-aspects.json: -------------------------------------------------------------------------------- 1 | { 2 | "typeOptions": {} 3 | } 4 | -------------------------------------------------------------------------------- /packages/movies-studio/config/@sanity/data-aspects.json: -------------------------------------------------------------------------------- 1 | { 2 | "typeOptions": {} 3 | } 4 | -------------------------------------------------------------------------------- /packages/test-studio/config/@sanity/data-aspects.json: -------------------------------------------------------------------------------- 1 | { 2 | "listOptions": {} 3 | } 4 | -------------------------------------------------------------------------------- /scripts/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "import/no-commonjs": "off" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /packages/@sanity/cli/templates/blog/plugins/.gitkeep: -------------------------------------------------------------------------------- 1 | User-specific packages can be placed here 2 | -------------------------------------------------------------------------------- /packages/@sanity/cli/test/mocha.opts: -------------------------------------------------------------------------------- 1 | --compilers js:@babel/register 2 | --require test/init.js 3 | -------------------------------------------------------------------------------- /packages/@sanity/components/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | presets: ['@babel/react', '@babel/flow'] 3 | } 4 | -------------------------------------------------------------------------------- /packages/@sanity/components/src/menus/styles/FabActions.css: -------------------------------------------------------------------------------- 1 | .root { 2 | /* empty */ 3 | } 4 | -------------------------------------------------------------------------------- /packages/@sanity/default-layout/example/schema.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | types: [] 3 | } 4 | -------------------------------------------------------------------------------- /packages/@sanity/document-store/src/index.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./createDocumentStore') 2 | -------------------------------------------------------------------------------- /packages/@sanity/export/test/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "jest": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /packages/@sanity/image-url/.npmignore: -------------------------------------------------------------------------------- 1 | test 2 | src 3 | .idea 4 | .babelrc 5 | node_modules 6 | -------------------------------------------------------------------------------- /packages/@sanity/image-url/test/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "jest": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /packages/@sanity/imagetool/test/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "mocha": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /packages/@sanity/plugin-loader/test/versionsFixture/node_modules/@sanity/base/sanity.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /packages/@sanity/preview/test/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "jest": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /packages/@sanity/schema/test/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "jest": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /packages/@sanity/state-router/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | presets: ['@babel/react', '@babel/flow'] 3 | } 4 | -------------------------------------------------------------------------------- /packages/@sanity/state-router/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "4" 4 | - "6" -------------------------------------------------------------------------------- /packages/ecommerce-studio/config/@sanity/data-aspects.json: -------------------------------------------------------------------------------- 1 | { 2 | "listOptions": {} 3 | } 4 | -------------------------------------------------------------------------------- /packages/example-studio/components/FunkyEditor/index.js: -------------------------------------------------------------------------------- 1 | export {default} from './FunkyEditor' 2 | -------------------------------------------------------------------------------- /packages/@sanity/base/src/components/icons/Sort.js: -------------------------------------------------------------------------------- 1 | export {default} from 'react-icons/lib/fa/sort' 2 | -------------------------------------------------------------------------------- /packages/@sanity/base/src/components/icons/Undo.js: -------------------------------------------------------------------------------- 1 | export {default} from 'react-icons/lib/md/undo' 2 | -------------------------------------------------------------------------------- /packages/@sanity/cli/templates/clean/plugins/.gitkeep: -------------------------------------------------------------------------------- 1 | User-specific packages can be placed here 2 | -------------------------------------------------------------------------------- /packages/@sanity/cli/templates/ecommerce/plugins/.gitkeep: -------------------------------------------------------------------------------- 1 | User-specific packages can be placed here 2 | -------------------------------------------------------------------------------- /packages/@sanity/cli/templates/moviedb/plugins/.gitkeep: -------------------------------------------------------------------------------- 1 | User-specific packages can be placed here 2 | -------------------------------------------------------------------------------- /packages/@sanity/components/src/textinputs/DefaultTextInput.js: -------------------------------------------------------------------------------- 1 | export {default} from './TextInput' 2 | -------------------------------------------------------------------------------- /packages/@sanity/core/test/mocha.opts: -------------------------------------------------------------------------------- 1 | --compilers js:@babel/register 2 | --require ./test/init.js 3 | -------------------------------------------------------------------------------- /packages/@sanity/date-input/schema.js: -------------------------------------------------------------------------------- 1 | module.exports = require('@sanity/rich-date-input/schema') 2 | -------------------------------------------------------------------------------- /packages/@sanity/form-builder/.npmignore: -------------------------------------------------------------------------------- 1 | .idea 2 | example-app 3 | test 4 | src 5 | form-builder-old -------------------------------------------------------------------------------- /packages/@sanity/form-builder/src/inputs/ArrayInput/index.js: -------------------------------------------------------------------------------- 1 | export {default} from './ArrayInput' 2 | -------------------------------------------------------------------------------- /packages/@sanity/form-builder/src/inputs/FileInput/index.js: -------------------------------------------------------------------------------- 1 | export {default} from './FileInput' 2 | -------------------------------------------------------------------------------- /packages/@sanity/form-builder/src/inputs/ImageInput/index.js: -------------------------------------------------------------------------------- 1 | export {default} from './ImageInput' 2 | -------------------------------------------------------------------------------- /packages/@sanity/form-builder/src/inputs/ObjectInput/index.js: -------------------------------------------------------------------------------- 1 | export {default} from './ObjectInput' 2 | -------------------------------------------------------------------------------- /packages/@sanity/imagetool/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | npm-debug.log 3 | package-lock.json 4 | /lib 5 | -------------------------------------------------------------------------------- /packages/@sanity/imagetool/calculateStyles.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./lib/calculateStyles') 2 | -------------------------------------------------------------------------------- /packages/@sanity/observable/minimal.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./lib/SanityObservableMinimal') 2 | -------------------------------------------------------------------------------- /packages/@sanity/plugin-loader/test/fixture/config/better-date.json: -------------------------------------------------------------------------------- 1 | { 2 | "superduper": true 3 | } -------------------------------------------------------------------------------- /packages/@sanity/plugin-loader/test/versionsFixture/node_modules/@sanity/components/sanity.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /packages/@sanity/resolver/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "6.0" 4 | - "4.0" 5 | -------------------------------------------------------------------------------- /packages/@sanity/resolver/test/mocha.opts: -------------------------------------------------------------------------------- 1 | --compilers js:@babel/register 2 | --require test/init.js 3 | -------------------------------------------------------------------------------- /packages/@sanity/storybook/src/addons/Knobs.js: -------------------------------------------------------------------------------- 1 | module.exports = require('@storybook/addon-knobs') 2 | -------------------------------------------------------------------------------- /packages/@sanity/util/README.md: -------------------------------------------------------------------------------- 1 | # @sanity/util 2 | 3 | Utilities shared across projects of Sanity 4 | -------------------------------------------------------------------------------- /packages/@sanity/util/test/mocha.opts: -------------------------------------------------------------------------------- 1 | --compilers js:@babel/register 2 | --require test/init.js 3 | -------------------------------------------------------------------------------- /packages/example-studio/components/VideoEmbedPreview/index.js: -------------------------------------------------------------------------------- 1 | export * from './VideoEmbedPreview' 2 | -------------------------------------------------------------------------------- /packages/@sanity/base/src/components/icons/Public.js: -------------------------------------------------------------------------------- 1 | export {default} from 'react-icons/lib/md/public' 2 | -------------------------------------------------------------------------------- /packages/@sanity/check/.npmignore: -------------------------------------------------------------------------------- 1 | .babelrc 2 | .editorconfig 3 | .eslintignore 4 | .eslintrc 5 | test 6 | -------------------------------------------------------------------------------- /packages/@sanity/cli/templates/blog/config/@sanity/data-aspects.json: -------------------------------------------------------------------------------- 1 | { 2 | "listOptions": {} 3 | } 4 | -------------------------------------------------------------------------------- /packages/@sanity/cli/templates/moviedb/config/@sanity/data-aspects.json: -------------------------------------------------------------------------------- 1 | { 2 | "listOptions": {} 3 | } 4 | -------------------------------------------------------------------------------- /packages/@sanity/cli/test/fixtures/bin/version-stub/sanity: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | console.log('1.3.37') 3 | -------------------------------------------------------------------------------- /packages/@sanity/client/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "import/no-commonjs": "off" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /packages/@sanity/export/.npmignore: -------------------------------------------------------------------------------- 1 | .babelrc 2 | .editorconfig 3 | .eslintignore 4 | .eslintrc 5 | test 6 | -------------------------------------------------------------------------------- /packages/@sanity/form-builder/src/inputs/BlockEditor-slate/index.js: -------------------------------------------------------------------------------- 1 | export {default} from './Syncer' 2 | -------------------------------------------------------------------------------- /packages/@sanity/form-builder/src/sanity/uploads/constants.js: -------------------------------------------------------------------------------- 1 | export const UPLOAD_STATUS_KEY = '_upload' 2 | -------------------------------------------------------------------------------- /packages/@sanity/import/.npmignore: -------------------------------------------------------------------------------- 1 | .babelrc 2 | .editorconfig 3 | .eslintignore 4 | .eslintrc 5 | test 6 | -------------------------------------------------------------------------------- /packages/@sanity/language-filter/src/filter-fields.js: -------------------------------------------------------------------------------- 1 | export {filterFn$ as default} from './datastore' 2 | -------------------------------------------------------------------------------- /packages/@sanity/observable/operators/map.js: -------------------------------------------------------------------------------- 1 | exports.map = require('rxjs/internal/operators/map').map 2 | -------------------------------------------------------------------------------- /packages/@sanity/plugin-loader/test/fixture/plugins/date/base.css: -------------------------------------------------------------------------------- 1 | .base { 2 | text-align: right; 3 | } 4 | -------------------------------------------------------------------------------- /packages/@sanity/state-router/.babel-init.js: -------------------------------------------------------------------------------- 1 | require('babel-register') 2 | require('babel-polyfill') 3 | -------------------------------------------------------------------------------- /packages/@sanity/uuid/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "import/no-commonjs": "off" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /packages/@sanity/validation/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "import/no-commonjs": 0 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /packages/@sanity/validation/.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | coverage 3 | yarn.lock 4 | package-lock.json 5 | lib 6 | -------------------------------------------------------------------------------- /packages/example-studio/components/VideoEmbedInput/index.js: -------------------------------------------------------------------------------- 1 | export {default} from './VideoEmbedInput' 2 | -------------------------------------------------------------------------------- /packages/example-studio/plugins/dark-theme/README.md: -------------------------------------------------------------------------------- 1 | # dark-theme 2 | 3 | Makes the studio look dark 4 | -------------------------------------------------------------------------------- /packages/@sanity/base/src/components/icons/AngleUpIcon.js: -------------------------------------------------------------------------------- 1 | export {default} from 'react-icons/lib/fa/angle-up' 2 | -------------------------------------------------------------------------------- /packages/@sanity/base/src/components/icons/Binary.js: -------------------------------------------------------------------------------- 1 | export {default} from 'react-icons/lib/go/file-binary' 2 | -------------------------------------------------------------------------------- /packages/@sanity/core/.npmignore: -------------------------------------------------------------------------------- 1 | .babelrc 2 | .editorconfig 3 | .eslintignore 4 | .eslintrc 5 | src 6 | test 7 | -------------------------------------------------------------------------------- /packages/@sanity/core/src/debug.js: -------------------------------------------------------------------------------- 1 | import debug from 'debug' 2 | 3 | export default debug('sanity:core') 4 | -------------------------------------------------------------------------------- /packages/@sanity/eventsource/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "import/no-commonjs": "off" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /packages/@sanity/form-builder/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | presets: ['@babel/preset-react', '@babel/preset-flow'] 3 | } 4 | -------------------------------------------------------------------------------- /packages/@sanity/form-builder/src/inputs/ImageToolInput/index.js: -------------------------------------------------------------------------------- 1 | export {default} from './ImageToolInput' 2 | -------------------------------------------------------------------------------- /packages/@sanity/form-builder/src/inputs/ReferenceInput/index.js: -------------------------------------------------------------------------------- 1 | export {default} from './ReferenceInput' 2 | -------------------------------------------------------------------------------- /packages/@sanity/image-url/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | npm-debug.log 3 | package-lock.json 4 | /lib 5 | /umd 6 | -------------------------------------------------------------------------------- /packages/@sanity/import-cli/.npmignore: -------------------------------------------------------------------------------- 1 | .babelrc 2 | .editorconfig 3 | .eslintignore 4 | .eslintrc 5 | test 6 | -------------------------------------------------------------------------------- /packages/@sanity/import/test/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "env": {"node": true, "browser": false, "jest": true} 3 | } 4 | -------------------------------------------------------------------------------- /packages/@sanity/observable/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "import/no-commonjs": "off" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /packages/@sanity/plugin-loader/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "import/no-commonjs": "off" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /packages/@sanity/plugin-loader/test/fixture/config/@sanity/some-plugin.json: -------------------------------------------------------------------------------- 1 | { 2 | "subway": "coding" 3 | } 4 | -------------------------------------------------------------------------------- /packages/@sanity/plugin-loader/test/fixture/getBar.js: -------------------------------------------------------------------------------- 1 | module.exports = function() { 2 | return 'bar' 3 | } 4 | -------------------------------------------------------------------------------- /packages/@sanity/util/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "browser": false, 4 | "node": true 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/@sanity/vision/README.md: -------------------------------------------------------------------------------- 1 | # sanity-vision 2 | React-based data management tool for Sanity projects 3 | -------------------------------------------------------------------------------- /packages/blog-studio/schemas/schema.js: -------------------------------------------------------------------------------- 1 | export {default} from '@sanity/cli/templates/blog/schemas/schema.js' 2 | -------------------------------------------------------------------------------- /packages/@sanity/base/src/components/icons/Visibility.js: -------------------------------------------------------------------------------- 1 | export {default} from 'react-icons/lib/md/visibility' 2 | -------------------------------------------------------------------------------- /packages/@sanity/cli/src/actions/init-project/templates/pluginGitKeep: -------------------------------------------------------------------------------- 1 | User-specific packages can be placed here 2 | -------------------------------------------------------------------------------- /packages/@sanity/cli/src/debug.js: -------------------------------------------------------------------------------- 1 | const debug = require('debug') 2 | 3 | module.exports = debug('sanity:cli') 4 | -------------------------------------------------------------------------------- /packages/@sanity/code-input/.npmignore: -------------------------------------------------------------------------------- 1 | .babelrc 2 | .editorconfig 3 | .eslintignore 4 | .eslintrc 5 | src 6 | test 7 | -------------------------------------------------------------------------------- /packages/@sanity/components/.npmignore: -------------------------------------------------------------------------------- 1 | .babelrc 2 | .editorconfig 3 | .eslintignore 4 | .eslintrc 5 | src 6 | test 7 | -------------------------------------------------------------------------------- /packages/@sanity/components/src/lists/sortable-grid/styles/SortableGridItem.css: -------------------------------------------------------------------------------- 1 | .root { 2 | cursor: move; 3 | } 4 | -------------------------------------------------------------------------------- /packages/@sanity/default-layout/example/Main.js: -------------------------------------------------------------------------------- 1 | export {default} from '../src/components/DefaultLayoutContainer' 2 | -------------------------------------------------------------------------------- /packages/@sanity/document-window/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "import/no-commonjs": "off" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /packages/@sanity/form-builder/src/inputs/InvalidValueInput/index.js: -------------------------------------------------------------------------------- 1 | export {default} from './InvalidValueInput' 2 | -------------------------------------------------------------------------------- /packages/@sanity/form-builder/src/inputs/OptionsArrayInput/index.js: -------------------------------------------------------------------------------- 1 | export {default} from './OptionsArrayInput' 2 | -------------------------------------------------------------------------------- /packages/@sanity/form-builder/test/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "plugins": [ 3 | "css-modules-transform" 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /packages/@sanity/imagetool/example/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "import/no-commonjs": "off" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /packages/@sanity/imagetool/src/styles/HotspotImage.css: -------------------------------------------------------------------------------- 1 | .root { 2 | position: relative; 3 | width: 100%; 4 | } 5 | -------------------------------------------------------------------------------- /packages/@sanity/language-filter/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | presets: ['@babel/preset-react', '@babel/preset-flow'] 3 | } 4 | -------------------------------------------------------------------------------- /packages/@sanity/language-filter/.npmignore: -------------------------------------------------------------------------------- 1 | .babelrc 2 | .editorconfig 3 | .eslintignore 4 | .eslintrc 5 | test 6 | -------------------------------------------------------------------------------- /packages/@sanity/observable/operators/filter.js: -------------------------------------------------------------------------------- 1 | exports.filter = require('rxjs/internal/operators/filter').filter 2 | -------------------------------------------------------------------------------- /packages/@sanity/observable/operators/reduce.js: -------------------------------------------------------------------------------- 1 | exports.reduce = require('rxjs/internal/operators/reduce').reduce 2 | -------------------------------------------------------------------------------- /packages/@sanity/production-preview/.gitignore: -------------------------------------------------------------------------------- 1 | *.log 2 | lib 3 | node_modules 4 | yarn.lock 5 | package-lock.json 6 | -------------------------------------------------------------------------------- /packages/@sanity/resolver/README.md: -------------------------------------------------------------------------------- 1 | # resolver 2 | 3 | Resolves parts and plugins from a Sanity configuration 4 | -------------------------------------------------------------------------------- /packages/@sanity/state-router/perf/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "import/no-commonjs": "off" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /packages/@sanity/vision/.npmignore: -------------------------------------------------------------------------------- 1 | .babelrc 2 | .editorconfig 3 | .eslintignore 4 | .eslintrc 5 | src 6 | test 7 | -------------------------------------------------------------------------------- /packages/movies-studio/schemas/schema.js: -------------------------------------------------------------------------------- 1 | export {default} from '@sanity/cli/templates/moviedb/schemas/schema.js' 2 | -------------------------------------------------------------------------------- /packages/@sanity/base/src/components/icons/VisibilityOff.js: -------------------------------------------------------------------------------- 1 | export {default} from 'react-icons/lib/md/visibility-off' 2 | -------------------------------------------------------------------------------- /packages/@sanity/color-input/.npmignore: -------------------------------------------------------------------------------- 1 | .babelrc 2 | .editorconfig 3 | .eslintignore 4 | .eslintrc 5 | src 6 | test 7 | -------------------------------------------------------------------------------- /packages/@sanity/data-aspects/.npmignore: -------------------------------------------------------------------------------- 1 | .babelrc 2 | .editorconfig 3 | .eslintignore 4 | .eslintrc 5 | src 6 | test 7 | -------------------------------------------------------------------------------- /packages/@sanity/default-login/.npmignore: -------------------------------------------------------------------------------- 1 | .babelrc 2 | .editorconfig 3 | .eslintignore 4 | .eslintrc 5 | src 6 | test 7 | -------------------------------------------------------------------------------- /packages/@sanity/desk-tool/README.md: -------------------------------------------------------------------------------- 1 | # desk-tool 2 | 3 | Tool for managing all sorts of content in a structured manner 4 | -------------------------------------------------------------------------------- /packages/@sanity/rich-date-input/.npmignore: -------------------------------------------------------------------------------- 1 | .babelrc 2 | .editorconfig 3 | .eslintignore 4 | .eslintrc 5 | src 6 | test 7 | -------------------------------------------------------------------------------- /packages/@sanity/storybook/README.md: -------------------------------------------------------------------------------- 1 | # storybook 2 | 3 | Sanity plugin for running react-storybook in a Sanity studio 4 | -------------------------------------------------------------------------------- /packages/@sanity/webpack-loader/src/unimplementedPart.js: -------------------------------------------------------------------------------- 1 | module.exports = undefined // eslint-disable-line no-undefined 2 | -------------------------------------------------------------------------------- /packages/blog-studio/static/.gitkeep: -------------------------------------------------------------------------------- 1 | Files placed here will be served by the Sanity server under the `/static`-prefix 2 | -------------------------------------------------------------------------------- /packages/ecommerce-studio/schemas/schema.js: -------------------------------------------------------------------------------- 1 | export {default} from '@sanity/cli/templates/ecommerce/schemas/schema.js' 2 | -------------------------------------------------------------------------------- /packages/movies-studio/static/.gitkeep: -------------------------------------------------------------------------------- 1 | Files placed here will be served by the Sanity server under the `/static`-prefix 2 | -------------------------------------------------------------------------------- /packages/test-studio/static/.gitkeep: -------------------------------------------------------------------------------- 1 | Files placed here will be served by the Sanity server under the `/static`-prefix 2 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "semi": false, 3 | "printWidth": 100, 4 | "bracketSpacing": false, 5 | "singleQuote": true 6 | } 7 | -------------------------------------------------------------------------------- /packages/@sanity/base/src/components/icons/Cog.js: -------------------------------------------------------------------------------- 1 | import FaCog from 'react-icons/lib/fa/cog' 2 | 3 | export default FaCog 4 | -------------------------------------------------------------------------------- /packages/@sanity/core/src/util/normalizePluginName.js: -------------------------------------------------------------------------------- 1 | export default pluginName => pluginName.replace(/^sanity-plugin-/, '') 2 | -------------------------------------------------------------------------------- /packages/@sanity/form-builder/src/inputs/ArrayOfPrimitivesInput/index.js: -------------------------------------------------------------------------------- 1 | export {default} from './ArrayOfPrimitivesInput' 2 | -------------------------------------------------------------------------------- /packages/@sanity/google-maps-input/.npmignore: -------------------------------------------------------------------------------- 1 | .babelrc 2 | .editorconfig 3 | .eslintignore 4 | .eslintrc 5 | src 6 | test 7 | -------------------------------------------------------------------------------- /packages/@sanity/mutator/src/document/debug.js: -------------------------------------------------------------------------------- 1 | import debug from 'debug' 2 | 3 | export default debug('mutator-document') 4 | -------------------------------------------------------------------------------- /packages/@sanity/plugin-loader/test/fixture/folder/index.js: -------------------------------------------------------------------------------- 1 | module.exports = function() { 2 | return 'index value' 3 | } 4 | -------------------------------------------------------------------------------- /packages/@sanity/preview/.flowconfig: -------------------------------------------------------------------------------- 1 | [include] 2 | ./src 3 | 4 | [options] 5 | module.name_mapper='.*:.*' -> 'empty/object' 6 | -------------------------------------------------------------------------------- /packages/@sanity/vision/src/components/LoadingSpinner.js: -------------------------------------------------------------------------------- 1 | import Spinner from 'react-spinner' 2 | 3 | export default Spinner 4 | -------------------------------------------------------------------------------- /packages/example-studio/README.md: -------------------------------------------------------------------------------- 1 | # Example Studio 2 | 3 | A sanity studio with instructional examples and useful patterns 4 | -------------------------------------------------------------------------------- /packages/example-studio/static/.gitkeep: -------------------------------------------------------------------------------- 1 | Files placed here will be served by the Sanity server under the `/static`-prefix 2 | -------------------------------------------------------------------------------- /packages/@sanity/base/README.md: -------------------------------------------------------------------------------- 1 | # base 2 | 3 | Sanity plugin containing the base components and roles for a Sanity configuration 4 | -------------------------------------------------------------------------------- /packages/@sanity/base/src/components/icons/Bars.js: -------------------------------------------------------------------------------- 1 | import FaBars from 'react-icons/lib/fa/bars' 2 | 3 | export default FaBars 4 | -------------------------------------------------------------------------------- /packages/@sanity/base/src/components/icons/Check.js: -------------------------------------------------------------------------------- 1 | import Check from 'react-icons/lib/md/check' 2 | 3 | export default Check 4 | -------------------------------------------------------------------------------- /packages/@sanity/base/src/components/icons/Edit.js: -------------------------------------------------------------------------------- 1 | import MdEdit from 'react-icons/lib/md/edit' 2 | 3 | export default MdEdit 4 | -------------------------------------------------------------------------------- /packages/@sanity/base/src/components/icons/File.js: -------------------------------------------------------------------------------- 1 | import FaFile from 'react-icons/lib/fa/file-o' 2 | 3 | export default FaFile 4 | -------------------------------------------------------------------------------- /packages/@sanity/base/src/components/icons/Plug.js: -------------------------------------------------------------------------------- 1 | import FaPlug from 'react-icons/lib/fa/plug' 2 | 3 | export default FaPlug 4 | -------------------------------------------------------------------------------- /packages/@sanity/base/src/components/icons/Plus.js: -------------------------------------------------------------------------------- 1 | import GoPlus from 'react-icons/lib/go/plus' 2 | 3 | export default GoPlus 4 | -------------------------------------------------------------------------------- /packages/@sanity/base/src/components/icons/Sync.js: -------------------------------------------------------------------------------- 1 | import MdSync from 'react-icons/lib/md/sync' 2 | 3 | export default MdSync 4 | -------------------------------------------------------------------------------- /packages/@sanity/base/src/components/icons/Trash.js: -------------------------------------------------------------------------------- 1 | import Trash from 'react-icons/lib/md/delete' 2 | 3 | export default Trash 4 | -------------------------------------------------------------------------------- /packages/@sanity/base/test/mocha.opts: -------------------------------------------------------------------------------- 1 | --compilers js:@babel/register 2 | --require @babel/polyfill 3 | --require test/init.js 4 | -------------------------------------------------------------------------------- /packages/@sanity/document-store/src/utils/debug.js: -------------------------------------------------------------------------------- 1 | const Debug = require('debug') 2 | module.exports = Debug('document-store') 3 | -------------------------------------------------------------------------------- /packages/@sanity/form-builder/.flowconfig: -------------------------------------------------------------------------------- 1 | [include] 2 | ./src 3 | ../../../ 4 | [libs] 5 | defs 6 | [ignore] 7 | .*/examples/.* 8 | -------------------------------------------------------------------------------- /packages/@sanity/form-builder/src/inputs/BlockEditor-slate/util/randomKey.js: -------------------------------------------------------------------------------- 1 | export {default} from '../../ArrayInput/randomKey' 2 | -------------------------------------------------------------------------------- /packages/@sanity/form-builder/src/utils/debug.js: -------------------------------------------------------------------------------- 1 | import Debug from 'debug' 2 | 3 | export default Debug('@sanity/form-builder') 4 | -------------------------------------------------------------------------------- /packages/@sanity/observable/.npmignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | src 3 | .idea 4 | .babelrc 5 | .eslintignore 6 | .eslintrc 7 | .gitignore 8 | -------------------------------------------------------------------------------- /packages/@sanity/rich-date-input/src/index.js: -------------------------------------------------------------------------------- 1 | export {default} from './RichDate' 2 | export {default as schema} from './schema' 3 | -------------------------------------------------------------------------------- /packages/@sanity/server/public/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Xzya/sanity/next/packages/@sanity/server/public/favicon.png -------------------------------------------------------------------------------- /packages/@sanity/base/src/components/icons/Error.js: -------------------------------------------------------------------------------- 1 | import MdError from 'react-icons/lib/md/error' 2 | 3 | export default MdError 4 | -------------------------------------------------------------------------------- /packages/@sanity/base/src/components/icons/Hamburger.js: -------------------------------------------------------------------------------- 1 | import FaBars from 'react-icons/lib/fa/bars' 2 | 3 | export default FaBars 4 | -------------------------------------------------------------------------------- /packages/@sanity/base/src/components/icons/Search.js: -------------------------------------------------------------------------------- 1 | import Search from 'react-icons/lib/fa/search' 2 | 3 | export default Search 4 | -------------------------------------------------------------------------------- /packages/@sanity/base/src/components/icons/Upload.js: -------------------------------------------------------------------------------- 1 | import FaUpload from 'react-icons/lib/fa/upload' 2 | 3 | export default FaUpload 4 | -------------------------------------------------------------------------------- /packages/@sanity/base/src/router/index.js: -------------------------------------------------------------------------------- 1 | export * from '@sanity/state-router' 2 | export * from '@sanity/state-router/components' 3 | -------------------------------------------------------------------------------- /packages/@sanity/cli/templates/blog/static/.gitkeep: -------------------------------------------------------------------------------- 1 | Files placed here will be served by the Sanity server under the `/static`-prefix 2 | -------------------------------------------------------------------------------- /packages/@sanity/cli/templates/clean/static/.gitkeep: -------------------------------------------------------------------------------- 1 | Files placed here will be served by the Sanity server under the `/static`-prefix 2 | -------------------------------------------------------------------------------- /packages/@sanity/components/src/lists/styles/DefaultList.css: -------------------------------------------------------------------------------- 1 | .root { 2 | display: block; 3 | margin: 0; 4 | padding: 0; 5 | } 6 | -------------------------------------------------------------------------------- /packages/@sanity/default-layout/config.dist.json: -------------------------------------------------------------------------------- 1 | { 2 | "toolSwitcher": { 3 | "order": [], 4 | "hidden": [] 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/@sanity/eventsource/README.md: -------------------------------------------------------------------------------- 1 | # eventsource 2 | Meta-package to make browsers and Node use different EventSource polyfills 3 | -------------------------------------------------------------------------------- /packages/@sanity/import/test/fixtures/img.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Xzya/sanity/next/packages/@sanity/import/test/fixtures/img.gif -------------------------------------------------------------------------------- /packages/@sanity/resolver/test/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "max-nested-callbacks": 0, 4 | "complexity": 0 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/@sanity/schema/src/legacy/preview/primitivePreview.js: -------------------------------------------------------------------------------- 1 | export default { 2 | prepare: val => ({title: String(val)}) 3 | } 4 | -------------------------------------------------------------------------------- /packages/@sanity/base/src/components/icons/Calendar.js: -------------------------------------------------------------------------------- 1 | import Calendar from 'react-icons/lib/fa/calendar' 2 | 3 | export default Calendar 4 | -------------------------------------------------------------------------------- /packages/@sanity/base/src/components/icons/ChevronDown.js: -------------------------------------------------------------------------------- 1 | import AngleDownIcon from './AngleDownIcon' 2 | 3 | export default AngleDownIcon 4 | -------------------------------------------------------------------------------- /packages/@sanity/base/src/components/icons/CloseIcon.js: -------------------------------------------------------------------------------- 1 | import CloseIcon from 'react-icons/lib/md/close' 2 | 3 | export default CloseIcon 4 | -------------------------------------------------------------------------------- /packages/@sanity/base/src/components/icons/SignOut.js: -------------------------------------------------------------------------------- 1 | import FaSignOut from 'react-icons/lib/fa/sign-out' 2 | 3 | export default FaSignOut 4 | -------------------------------------------------------------------------------- /packages/@sanity/base/src/components/icons/ThLarge.js: -------------------------------------------------------------------------------- 1 | import ThLarge from 'react-icons/lib/fa/th-large' 2 | 3 | export default ThLarge 4 | -------------------------------------------------------------------------------- /packages/@sanity/base/src/components/icons/ThList.js: -------------------------------------------------------------------------------- 1 | import FaThList from 'react-icons/lib/fa/th-list' 2 | 3 | export default FaThList 4 | -------------------------------------------------------------------------------- /packages/@sanity/base/src/components/icons/Warning.js: -------------------------------------------------------------------------------- 1 | import MdWarning from 'react-icons/lib/md/warning' 2 | 3 | export default MdWarning 4 | -------------------------------------------------------------------------------- /packages/@sanity/cli/README.md: -------------------------------------------------------------------------------- 1 | # cli 2 | 3 | Sanity CLI tool for managing Sanity installations, managing plugins, schemas and datasets 4 | -------------------------------------------------------------------------------- /packages/@sanity/cli/templates/ecommerce/static/.gitkeep: -------------------------------------------------------------------------------- 1 | Files placed here will be served by the Sanity server under the `/static`-prefix 2 | -------------------------------------------------------------------------------- /packages/@sanity/cli/templates/moviedb/static/.gitkeep: -------------------------------------------------------------------------------- 1 | Files placed here will be served by the Sanity server under the `/static`-prefix 2 | -------------------------------------------------------------------------------- /packages/@sanity/core/src/util/isProduction.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-process-env */ 2 | export default process.env.NODE_ENV === 'production' 3 | -------------------------------------------------------------------------------- /packages/@sanity/core/src/util/trimQuery.js: -------------------------------------------------------------------------------- 1 | export default function trimQuery(query) { 2 | return query.trim().replace(/\s+/, ' ') 3 | } 4 | -------------------------------------------------------------------------------- /packages/@sanity/form-builder/src/simplePatch.js: -------------------------------------------------------------------------------- 1 | export {default} from './patch/applyPatch' 2 | export {applyAll} from './patch/applyPatch' 3 | -------------------------------------------------------------------------------- /packages/@sanity/form-builder/src/styles/FormBuilder.css: -------------------------------------------------------------------------------- 1 | .inner { 2 | max-width: 40em; 3 | margin: 0 auto; 4 | padding: 1rem; 5 | } 6 | -------------------------------------------------------------------------------- /packages/@sanity/form-builder/src/utils/hasOwn.js: -------------------------------------------------------------------------------- 1 | export default Object.prototype.hasOwnProperty.call.bind(Object.prototype.hasOwnProperty) 2 | -------------------------------------------------------------------------------- /packages/@sanity/image-url/index.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line import/no-commonjs 2 | module.exports = require('./lib/builder').default 3 | -------------------------------------------------------------------------------- /packages/@sanity/plugin-loader/README.md: -------------------------------------------------------------------------------- 1 | # plugin-loader 2 | Monkey-patches node's require algorithm to allow requiring of Sanity parts 3 | -------------------------------------------------------------------------------- /packages/@sanity/plugin-loader/register.js: -------------------------------------------------------------------------------- 1 | const registerLoader = require('./loader') 2 | 3 | registerLoader({basePath: process.cwd()}) 4 | -------------------------------------------------------------------------------- /packages/@sanity/preview/README.md: -------------------------------------------------------------------------------- 1 | # @sanity/preview 2 | Utilities for previewing Sanity content 3 | 4 | ## License 5 | 6 | MIT-licensed 7 | -------------------------------------------------------------------------------- /packages/blog-studio/config/@sanity/default-layout.json: -------------------------------------------------------------------------------- 1 | { 2 | "toolSwitcher": { 3 | "order": [], 4 | "hidden": [] 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/movies-studio/config/@sanity/default-layout.json: -------------------------------------------------------------------------------- 1 | { 2 | "toolSwitcher": { 3 | "order": [], 4 | "hidden": [] 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/storybook/config/@sanity/default-layout.json: -------------------------------------------------------------------------------- 1 | { 2 | "toolSwitcher": { 3 | "order": [], 4 | "hidden": [] 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/test-studio/config/@sanity/default-layout.json: -------------------------------------------------------------------------------- 1 | { 2 | "toolSwitcher": { 3 | "order": [], 4 | "hidden": [] 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/@sanity/base/src/components/icons/ImageArea.js: -------------------------------------------------------------------------------- 1 | import MdImageArea from 'react-icons/lib/md/image' 2 | 3 | export default MdImageArea 4 | -------------------------------------------------------------------------------- /packages/@sanity/base/src/components/icons/MoreVert.js: -------------------------------------------------------------------------------- 1 | import MdMoreVert from 'react-icons/lib/md/more-vert' 2 | 3 | export default MdMoreVert 4 | -------------------------------------------------------------------------------- /packages/@sanity/base/src/components/icons/Question.js: -------------------------------------------------------------------------------- 1 | import FaQuestion from 'react-icons/lib/fa/question' 2 | 3 | export default FaQuestion 4 | -------------------------------------------------------------------------------- /packages/@sanity/base/src/datastores/user/index.js: -------------------------------------------------------------------------------- 1 | import createUserStore from './createUserStore' 2 | 3 | export default createUserStore() 4 | -------------------------------------------------------------------------------- /packages/@sanity/base/src/index.js: -------------------------------------------------------------------------------- 1 | import DefaultRootComponent from './components/DefaultRootComponent' 2 | 3 | export {DefaultRootComponent} 4 | -------------------------------------------------------------------------------- /packages/@sanity/components/src/lists/default/index.js: -------------------------------------------------------------------------------- 1 | export {default as List} from './List' 2 | export {default as Item} from './ListItem' 3 | -------------------------------------------------------------------------------- /packages/@sanity/components/src/lists/grid/index.js: -------------------------------------------------------------------------------- 1 | export {default as List} from './GridList' 2 | export {default as Item} from './GridItem' 3 | -------------------------------------------------------------------------------- /packages/@sanity/components/src/utilities/Portal/Portal.css: -------------------------------------------------------------------------------- 1 | .captureTabFocus { 2 | position: absolute; 3 | height: 0; 4 | width: 0; 5 | } 6 | -------------------------------------------------------------------------------- /packages/@sanity/core/README.md: -------------------------------------------------------------------------------- 1 | # @sanity/core 2 | 3 | Sanity core bundle, containing required packages for the development and build process 4 | -------------------------------------------------------------------------------- /packages/@sanity/form-builder/examples/schema-testbed/components/styles/shared.css: -------------------------------------------------------------------------------- 1 | .root { 2 | /* postcss does not like empty files */ 3 | } 4 | -------------------------------------------------------------------------------- /packages/@sanity/imagetool/resources/openhand.cur: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Xzya/sanity/next/packages/@sanity/imagetool/resources/openhand.cur -------------------------------------------------------------------------------- /packages/@sanity/imagetool/resources/openhand.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Xzya/sanity/next/packages/@sanity/imagetool/resources/openhand.png -------------------------------------------------------------------------------- /packages/@sanity/plugin-loader/test/fixture/plugins/date/getIsoDate.js: -------------------------------------------------------------------------------- 1 | module.exports = function() { 2 | return new Date().toISOString() 3 | } 4 | -------------------------------------------------------------------------------- /packages/@sanity/plugin-loader/test/fixture/plugins/date/getTimestamp.js: -------------------------------------------------------------------------------- 1 | module.exports = function() { 2 | return new Date().getTime() 3 | } 4 | -------------------------------------------------------------------------------- /packages/@sanity/production-preview/src/resolveProductionUrl.js: -------------------------------------------------------------------------------- 1 | export {default} from 'part:@sanity/production-preview/resolve-production-url' 2 | -------------------------------------------------------------------------------- /packages/@sanity/state-router/src/utils/hasOwn.js: -------------------------------------------------------------------------------- 1 | const _hasOWn = Object.prototype.hasOwnProperty 2 | export default _hasOWn.call.bind(_hasOWn) 3 | -------------------------------------------------------------------------------- /packages/@sanity/util/test/versionsFixture/sanity.json: -------------------------------------------------------------------------------- 1 | { 2 | "plugins": [ 3 | "@sanity/base", 4 | "@sanity/components", 5 | ] 6 | } 7 | -------------------------------------------------------------------------------- /packages/ecommerce-studio/config/@sanity/default-layout.json: -------------------------------------------------------------------------------- 1 | { 2 | "toolSwitcher": { 3 | "order": [], 4 | "hidden": [] 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/example-studio/config/@sanity/default-layout.json: -------------------------------------------------------------------------------- 1 | { 2 | "toolSwitcher": { 3 | "order": [], 4 | "hidden": [] 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/example-studio/parts/AuthorPreview.css: -------------------------------------------------------------------------------- 1 | .staleAuthor { 2 | composes: root from 'part:@sanity/components/previews/default-style'; 3 | } 4 | -------------------------------------------------------------------------------- /packages/@sanity/base/src/components/icons/CircleThin.js: -------------------------------------------------------------------------------- 1 | import CircleThin from 'react-icons/lib/fa/circle-thin' 2 | 3 | export default CircleThin 4 | -------------------------------------------------------------------------------- /packages/@sanity/base/src/components/icons/FormatCode.js: -------------------------------------------------------------------------------- 1 | import IconFormatCode from 'react-icons/lib/md/code' 2 | 3 | export default IconFormatCode 4 | -------------------------------------------------------------------------------- /packages/@sanity/base/src/components/icons/Link.js: -------------------------------------------------------------------------------- 1 | import MdInsertLink from 'react-icons/lib/md/insert-link' 2 | 3 | export default MdInsertLink 4 | -------------------------------------------------------------------------------- /packages/@sanity/base/src/components/icons/PlusCircle.js: -------------------------------------------------------------------------------- 1 | import PlusCircle from 'react-icons/lib/md/add-circle' 2 | 3 | export default PlusCircle 4 | -------------------------------------------------------------------------------- /packages/@sanity/base/src/components/icons/Time.js: -------------------------------------------------------------------------------- 1 | import MdAccessTime from 'react-icons/lib/md/access-time' 2 | 3 | export default MdAccessTime 4 | -------------------------------------------------------------------------------- /packages/@sanity/base/src/components/styles/SanityRoot.css: -------------------------------------------------------------------------------- 1 | @import "part:@sanity/base/theme/body-style"; 2 | 3 | .root { 4 | display: block; 5 | } 6 | -------------------------------------------------------------------------------- /packages/@sanity/client/test/fixtures/pdf-sample.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Xzya/sanity/next/packages/@sanity/client/test/fixtures/pdf-sample.pdf -------------------------------------------------------------------------------- /packages/@sanity/image-url/urlForImage.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line import/no-commonjs 2 | module.exports = require('./lib/urlForImage').default 3 | -------------------------------------------------------------------------------- /packages/@sanity/imagetool/example/public/hubble.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Xzya/sanity/next/packages/@sanity/imagetool/example/public/hubble.jpg -------------------------------------------------------------------------------- /packages/@sanity/imagetool/example/public/koala.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Xzya/sanity/next/packages/@sanity/imagetool/example/public/koala.jpg -------------------------------------------------------------------------------- /packages/@sanity/imagetool/example/src/history.js: -------------------------------------------------------------------------------- 1 | import createHistory from 'history/createBrowserHistory' 2 | 3 | export default createHistory() 4 | -------------------------------------------------------------------------------- /packages/@sanity/imagetool/resources/closedhand.cur: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Xzya/sanity/next/packages/@sanity/imagetool/resources/closedhand.cur -------------------------------------------------------------------------------- /packages/@sanity/imagetool/resources/closedhand.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Xzya/sanity/next/packages/@sanity/imagetool/resources/closedhand.png -------------------------------------------------------------------------------- /packages/@sanity/plugin-loader/test/fixture/plugins/better-date/getBetterTimestamp.js: -------------------------------------------------------------------------------- 1 | module.exports = function() { 2 | return Date.now() 3 | } 4 | -------------------------------------------------------------------------------- /packages/@sanity/util/test/versionsFixture/node_modules/@sanity/base/placeholder.js: -------------------------------------------------------------------------------- 1 | module.exports = function() { 2 | // Intentional noop 3 | } 4 | -------------------------------------------------------------------------------- /packages/@sanity/validation/.npmignore: -------------------------------------------------------------------------------- 1 | .idea 2 | .babelrc 3 | .eslintrc 4 | .eslintignore 5 | test 6 | coverage 7 | yarn.lock 8 | package-lock.json 9 | -------------------------------------------------------------------------------- /packages/@sanity/base/src/components/icons/AngleDownIcon.js: -------------------------------------------------------------------------------- 1 | import FaAngleDown from 'react-icons/lib/fa/angle-down' 2 | 3 | export default FaAngleDown 4 | -------------------------------------------------------------------------------- /packages/@sanity/base/src/components/icons/CircleCheck.js: -------------------------------------------------------------------------------- 1 | import CircleCheck from 'react-icons/lib/fa/check-circle' 2 | 3 | export default CircleCheck 4 | -------------------------------------------------------------------------------- /packages/@sanity/base/src/components/icons/Fullscreen.js: -------------------------------------------------------------------------------- 1 | import MdFullscreen from 'react-icons/lib/md/fullscreen' 2 | 3 | export default MdFullscreen 4 | -------------------------------------------------------------------------------- /packages/@sanity/base/src/components/icons/Paste.js: -------------------------------------------------------------------------------- 1 | import MdContentPaste from 'react-icons/lib/md/content-paste' 2 | 3 | export default MdContentPaste 4 | -------------------------------------------------------------------------------- /packages/@sanity/base/src/components/icons/SpinnerIcon.js: -------------------------------------------------------------------------------- 1 | import SpinnerIcon from 'react-icons/lib/fa/circle-o-notch' 2 | 3 | export default SpinnerIcon 4 | -------------------------------------------------------------------------------- /packages/@sanity/base/src/components/icons/ViewColumn.js: -------------------------------------------------------------------------------- 1 | import MdViewColumn from 'react-icons/lib/md/view-column' 2 | 3 | export default MdViewColumn 4 | -------------------------------------------------------------------------------- /packages/@sanity/base/src/datastores/project/index.js: -------------------------------------------------------------------------------- 1 | import createProjectStore from './createProjectStore' 2 | 3 | export default createProjectStore() 4 | -------------------------------------------------------------------------------- /packages/@sanity/base/src/styles/fonts.css: -------------------------------------------------------------------------------- 1 | @import url("https://fonts.googleapis.com/css?family=Roboto:100,300,300i,400,400i,500,500i,700,700i,900,900i"); 2 | -------------------------------------------------------------------------------- /packages/@sanity/cli/.npmignore: -------------------------------------------------------------------------------- 1 | /src 2 | /test 3 | /.babelrc 4 | /.editorconfig 5 | /.eslintignore 6 | /.eslintrc 7 | /yarn.lock 8 | /package-lock.json 9 | -------------------------------------------------------------------------------- /packages/@sanity/cli/src/actions/init-project/templates/staticGitKeep: -------------------------------------------------------------------------------- 1 | Files placed here will be served by the Sanity server under the `/static`-prefix 2 | -------------------------------------------------------------------------------- /packages/@sanity/cli/templates/blog/static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Xzya/sanity/next/packages/@sanity/cli/templates/blog/static/favicon.ico -------------------------------------------------------------------------------- /packages/@sanity/cli/templates/clean/static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Xzya/sanity/next/packages/@sanity/cli/templates/clean/static/favicon.ico -------------------------------------------------------------------------------- /packages/@sanity/core/test/init.js: -------------------------------------------------------------------------------- 1 | const chai = require('chai') 2 | const chaiAsPromised = require('chai-as-promised') 3 | 4 | chai.use(chaiAsPromised) 5 | -------------------------------------------------------------------------------- /packages/@sanity/form-builder/PatchEvent.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable import/no-commonjs, import/unambiguous */ 2 | module.exports = require('./lib/PatchEvent') 3 | -------------------------------------------------------------------------------- /packages/@sanity/form-builder/examples/schema-testbed/components/styles/Header.css: -------------------------------------------------------------------------------- 1 | .header { 2 | padding: 10px; 3 | background-color: #e0e1db; 4 | } 5 | -------------------------------------------------------------------------------- /packages/@sanity/form-builder/test/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "import/no-extraneous-dependencies": ["error", {"devDependencies": true}] 4 | } 5 | } -------------------------------------------------------------------------------- /packages/@sanity/imagetool/example/public/pigs-nose.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Xzya/sanity/next/packages/@sanity/imagetool/example/public/pigs-nose.png -------------------------------------------------------------------------------- /packages/@sanity/import/test/fixtures/invalid-json.ndjson: -------------------------------------------------------------------------------- 1 | {"_id":"foo","_type":"bar","num":0} 2 | {"_id":"bar","_type":"bar","num":1} 3 | {_id: "foo"} 4 | -------------------------------------------------------------------------------- /packages/@sanity/plugin-loader/test/versionsFixture/node_modules/@sanity/base/placeholder.js: -------------------------------------------------------------------------------- 1 | module.exports = function() { 2 | // Intentional noop 3 | } 4 | -------------------------------------------------------------------------------- /packages/@sanity/plugin-loader/test/versionsFixture/sanity.json: -------------------------------------------------------------------------------- 1 | { 2 | "plugins": [ 3 | "@sanity/base", 4 | "@sanity/components" 5 | ] 6 | } 7 | -------------------------------------------------------------------------------- /packages/@sanity/preview/jest.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | transform: {'^.+\\.jsx?$': 'babel-jest'}, 3 | testRegex: 'test\\/.*\\.test\\.js' 4 | } 5 | -------------------------------------------------------------------------------- /packages/@sanity/schema/.flowconfig: -------------------------------------------------------------------------------- 1 | [include] 2 | ./src 3 | ./test 4 | 5 | [ignore] 6 | 7 | [options] 8 | module.name_mapper='.*:.*' -> 'empty/object' 9 | -------------------------------------------------------------------------------- /packages/@sanity/schema/jest.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | transform: {'^.+\\.jsx?$': 'babel-jest'}, 3 | testRegex: 'test\\/.*\\.test\\.js' 4 | } 5 | -------------------------------------------------------------------------------- /packages/@sanity/util/test/versionsFixture/node_modules/@sanity/components/placeholder.js: -------------------------------------------------------------------------------- 1 | module.exports = function() { 2 | // Intentional noop 3 | } 4 | -------------------------------------------------------------------------------- /packages/eslint-config-sanity/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "node": true 4 | }, 5 | "rules": { 6 | "import/no-commonjs": "off" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /packages/test-studio/README.md: -------------------------------------------------------------------------------- 1 | # sanity test studio 2 | 3 | A bloated, ugly Sanity studio with a contrived schema for edge case testing and development 4 | -------------------------------------------------------------------------------- /packages/@sanity/base/src/components/icons/ContentCopy.js: -------------------------------------------------------------------------------- 1 | import MdContentCopy from 'react-icons/lib/md/content-copy' 2 | 3 | export default MdContentCopy 4 | -------------------------------------------------------------------------------- /packages/@sanity/base/src/components/icons/FormatBold.js: -------------------------------------------------------------------------------- 1 | import IconFormatBold from 'react-icons/lib/md/format-bold' 2 | 3 | export default IconFormatBold 4 | -------------------------------------------------------------------------------- /packages/@sanity/base/src/components/icons/FormatItalic.js: -------------------------------------------------------------------------------- 1 | import MdFormatItalic from 'react-icons/lib/md/format-italic' 2 | 3 | export default MdFormatItalic 4 | -------------------------------------------------------------------------------- /packages/@sanity/base/src/components/icons/FormatQuote.js: -------------------------------------------------------------------------------- 1 | import MdFormatQuote from 'react-icons/lib/md/format-quote' 2 | 3 | export default MdFormatQuote 4 | -------------------------------------------------------------------------------- /packages/@sanity/base/src/datastores/location/index.js: -------------------------------------------------------------------------------- 1 | import createLocationStore from './createLocationStore' 2 | 3 | export default createLocationStore() 4 | -------------------------------------------------------------------------------- /packages/@sanity/base/src/styles/variables/override.css: -------------------------------------------------------------------------------- 1 | /* 2 | This needs to be empty. 3 | It is used to override variables externaly via a part 4 | */ 5 | -------------------------------------------------------------------------------- /packages/@sanity/cli/templates/moviedb/static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Xzya/sanity/next/packages/@sanity/cli/templates/moviedb/static/favicon.ico -------------------------------------------------------------------------------- /packages/@sanity/cli/test/init.js: -------------------------------------------------------------------------------- 1 | import chai from 'chai' 2 | import chaiAsPromised from 'chai-as-promised' 3 | 4 | chai.should() 5 | chai.use(chaiAsPromised) 6 | -------------------------------------------------------------------------------- /packages/@sanity/client/test/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "id-length": 0, 4 | "newline-per-chained-call": 0, 5 | "no-sync": 0 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /packages/@sanity/client/test/fixtures/horsehead-nebula.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Xzya/sanity/next/packages/@sanity/client/test/fixtures/horsehead-nebula.jpg -------------------------------------------------------------------------------- /packages/@sanity/components/src/lists/sortable/styles/SortableList.css: -------------------------------------------------------------------------------- 1 | .root { 2 | composes: resetList from "part:@sanity/base/theme/layout/helpers"; 3 | } 4 | -------------------------------------------------------------------------------- /packages/@sanity/imagetool/example/public/dog_smaller.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Xzya/sanity/next/packages/@sanity/imagetool/example/public/dog_smaller.jpg -------------------------------------------------------------------------------- /packages/@sanity/imagetool/example/public/storesmeden.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Xzya/sanity/next/packages/@sanity/imagetool/example/public/storesmeden.jpg -------------------------------------------------------------------------------- /packages/test-studio/src/components/fonts/Rye-Regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Xzya/sanity/next/packages/test-studio/src/components/fonts/Rye-Regular.eot -------------------------------------------------------------------------------- /packages/test-studio/src/components/fonts/Rye-Regular.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Xzya/sanity/next/packages/test-studio/src/components/fonts/Rye-Regular.otf -------------------------------------------------------------------------------- /packages/test-studio/src/components/fonts/Rye-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Xzya/sanity/next/packages/test-studio/src/components/fonts/Rye-Regular.ttf -------------------------------------------------------------------------------- /packages/test-studio/src/components/fonts/Rye-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Xzya/sanity/next/packages/test-studio/src/components/fonts/Rye-Regular.woff -------------------------------------------------------------------------------- /packages/@sanity/base/src/components/icons/ArrowDropDown.js: -------------------------------------------------------------------------------- 1 | import MdArrowDropDown from 'react-icons/lib/md/arrow-drop-down' 2 | 3 | export default MdArrowDropDown 4 | -------------------------------------------------------------------------------- /packages/@sanity/base/src/components/icons/SortAlphaDesc.js: -------------------------------------------------------------------------------- 1 | import FaSortAlphaDesc from 'react-icons/lib/fa/sort-alpha-desc' 2 | 3 | export default FaSortAlphaDesc 4 | -------------------------------------------------------------------------------- /packages/@sanity/cli/templates/blog/config/.checksums: -------------------------------------------------------------------------------- 1 | { 2 | "#": "Used by Sanity to keep track of configuration file checksums, do not delete or modify!" 3 | } 4 | -------------------------------------------------------------------------------- /packages/@sanity/cli/templates/clean/config/.checksums: -------------------------------------------------------------------------------- 1 | { 2 | "#": "Used by Sanity to keep track of configuration file checksums, do not delete or modify!" 3 | } 4 | -------------------------------------------------------------------------------- /packages/@sanity/cli/templates/ecommerce/static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Xzya/sanity/next/packages/@sanity/cli/templates/ecommerce/static/favicon.ico -------------------------------------------------------------------------------- /packages/@sanity/cli/templates/moviedb/config/.checksums: -------------------------------------------------------------------------------- 1 | { 2 | "#": "Used by Sanity to keep track of configuration file checksums, do not delete or modify!" 3 | } 4 | -------------------------------------------------------------------------------- /packages/@sanity/default-login/src/styles/LoginDialog.css: -------------------------------------------------------------------------------- 1 | @import 'part:@sanity/base/theme/variables-style'; 2 | 3 | .error a { 4 | color: var(--white); 5 | } 6 | -------------------------------------------------------------------------------- /packages/@sanity/desk-tool/src/components/styles/Diff.css: -------------------------------------------------------------------------------- 1 | .added { 2 | background-color: #6ee4a9; 3 | } 4 | 5 | .removed { 6 | background-color: #ff8b7e; 7 | } 8 | -------------------------------------------------------------------------------- /packages/@sanity/form-builder/examples/undo/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "import/no-extraneous-dependencies": ["error", {"devDependencies": true}] 4 | } 5 | } -------------------------------------------------------------------------------- /packages/@sanity/form-builder/src/inputs/BlockEditor-slate/styles/contentStyles/Normal.css: -------------------------------------------------------------------------------- 1 | .root { 2 | margin: 0; 3 | padding: 0; 4 | padding: 1em 0; 5 | } 6 | -------------------------------------------------------------------------------- /packages/@sanity/plugin-loader/test/versionsFixture/node_modules/@sanity/components/placeholder.js: -------------------------------------------------------------------------------- 1 | module.exports = function() { 2 | // Intentional noop 3 | } 4 | -------------------------------------------------------------------------------- /packages/@sanity/resolver/test/init.js: -------------------------------------------------------------------------------- 1 | import chai from 'chai' 2 | import chaiAsPromised from 'chai-as-promised' 3 | 4 | chai.should() 5 | chai.use(chaiAsPromised) 6 | -------------------------------------------------------------------------------- /packages/@sanity/storybook/src/config/addons.js: -------------------------------------------------------------------------------- 1 | import '@storybook/addons' 2 | import '@storybook/addon-knobs/register' 3 | import '../addons/sanity/SanityPanel' 4 | -------------------------------------------------------------------------------- /packages/@sanity/util/test/init.js: -------------------------------------------------------------------------------- 1 | import chai from 'chai' 2 | import chaiAsPromised from 'chai-as-promised' 3 | 4 | chai.should() 5 | chai.use(chaiAsPromised) 6 | -------------------------------------------------------------------------------- /packages/eslint-config-sanity/README.md: -------------------------------------------------------------------------------- 1 | # eslint-config-sanity 2 | 3 | Shared eslint rules for Sanity 4 | 5 | # Usage 6 | 7 | `npm i -D eslint-config-sanity` 8 | -------------------------------------------------------------------------------- /packages/test-studio/src/components/PertEstimate.js: -------------------------------------------------------------------------------- 1 | export {default as Input} from './PertEstimateInput' 2 | export {default as schema} from './PertEstimateSchema' 3 | -------------------------------------------------------------------------------- /packages/test-studio/src/components/fonts/Rye-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Xzya/sanity/next/packages/test-studio/src/components/fonts/Rye-Regular.woff2 -------------------------------------------------------------------------------- /packages/@sanity/base/src/components/icons/FullscreenExit.js: -------------------------------------------------------------------------------- 1 | import MdFullscreenExit from 'react-icons/lib/md/fullscreen-exit' 2 | 3 | export default MdFullscreenExit 4 | -------------------------------------------------------------------------------- /packages/@sanity/base/src/components/icons/TrashOutline.js: -------------------------------------------------------------------------------- 1 | import IosTrashOutline from 'react-icons/lib/io/ios-trash-outline' 2 | 3 | export default IosTrashOutline 4 | -------------------------------------------------------------------------------- /packages/@sanity/default-login/config.dist.json: -------------------------------------------------------------------------------- 1 | { 2 | "providers": { 3 | "mode": "append", 4 | "redirectOnSingle": false, 5 | "entries": [] 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /packages/@sanity/form-builder/src/sanity/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "import/no-extraneous-dependencies": 0, 4 | "import/no-unresolved": 0 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/example-studio/components/VideoEmbedPreview/VideoEmbedPreview.css: -------------------------------------------------------------------------------- 1 | .root { 2 | display: flex; 3 | justify-content: space-between; 4 | padding: 0.5em; 5 | } 6 | -------------------------------------------------------------------------------- /packages/@sanity/block-tools/test/tests/HtmlDeserializer/customSchema/input.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
A heading that is not allowed
4 | 5 | 6 | -------------------------------------------------------------------------------- /packages/@sanity/block-tools/test/tests/HtmlDeserializer/noBlockType/input.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
Header
4 |

Paragraph

5 | 6 | 7 | -------------------------------------------------------------------------------- /packages/@sanity/cli/src/actions/init-project/templates/checksums: -------------------------------------------------------------------------------- 1 | { 2 | "#": "Used by Sanity to keep track of configuration file checksums, do not delete or modify!" 3 | } 4 | -------------------------------------------------------------------------------- /packages/@sanity/default-login/locale/en-US.json: -------------------------------------------------------------------------------- 1 | { 2 | "en-US": { 3 | "loginWithProvider": "Choose login provider", 4 | "logoutButtonText": "Log out" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/@sanity/form-builder/examples/schema-testbed/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "import/no-extraneous-dependencies": ["error", {"devDependencies": true}] 4 | } 5 | } -------------------------------------------------------------------------------- /packages/@sanity/form-builder/src/inputs/DateInputs/index.js: -------------------------------------------------------------------------------- 1 | export {default as DateTimeInput} from './DateTimeInput' 2 | export {default as DateInput} from './DateInput' 3 | -------------------------------------------------------------------------------- /packages/@sanity/form-builder/src/sanity/locale/strings.json: -------------------------------------------------------------------------------- 1 | { 2 | "en-US": { 3 | "@sanity/form-builder.errors.fieldIsRequired": "This field is required" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /packages/@sanity/import/test/fixtures/employees.ndjson: -------------------------------------------------------------------------------- 1 | {"_id": "espen", "_type": "employee", "name": "Espen"} 2 | {"_id": "pk", "_type": "employee", "name": "Per-Kristian"} 3 | -------------------------------------------------------------------------------- /packages/blog-studio/config/@sanity/default-login.json: -------------------------------------------------------------------------------- 1 | { 2 | "providers": { 3 | "mode": "append", 4 | "redirectOnSingle": false, 5 | "entries": [] 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /packages/test-studio/config/@sanity/default-login.json: -------------------------------------------------------------------------------- 1 | { 2 | "providers": { 3 | "mode": "append", 4 | "redirectOnSingle": false, 5 | "entries": [] 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /packages/@sanity/base/src/components/icons/FormatUnderlined.js: -------------------------------------------------------------------------------- 1 | import MdFormatUnderlined from 'react-icons/lib/md/format-underlined' 2 | 3 | export default MdFormatUnderlined 4 | -------------------------------------------------------------------------------- /packages/@sanity/base/src/components/icons/PlusCircleOutline.js: -------------------------------------------------------------------------------- 1 | import PlusCircleOutline from 'react-icons/lib/md/add-circle-outline' 2 | 3 | export default PlusCircleOutline 4 | -------------------------------------------------------------------------------- /packages/@sanity/block-tools/test/tests/converters/slateStateToBlocks/markDefs/index.js: -------------------------------------------------------------------------------- 1 | export default (slateJsonToBlocks, input) => { 2 | return slateJsonToBlocks(input) 3 | } 4 | -------------------------------------------------------------------------------- /packages/@sanity/date-input/README.md: -------------------------------------------------------------------------------- 1 | ### @sanity/date-input 2 | 3 | [DEPRECATED]: Use [@sanity/rich-date-input instead](https://www.npmjs.com/package/@sanity/rich-date-input) 4 | -------------------------------------------------------------------------------- /packages/@sanity/form-builder/examples/schema-testbed/config/.checksums: -------------------------------------------------------------------------------- 1 | { 2 | "#": "Used by Sanity to keep track of configuration file checksums, do not delete or modify!" 3 | } 4 | -------------------------------------------------------------------------------- /packages/@sanity/mutator/src/patch/index.js: -------------------------------------------------------------------------------- 1 | import Patcher from './Patcher' 2 | import ImmutableAccessor from './ImmutableAccessor' 3 | 4 | export {Patcher, ImmutableAccessor} 5 | -------------------------------------------------------------------------------- /packages/ecommerce-studio/config/@sanity/default-login.json: -------------------------------------------------------------------------------- 1 | { 2 | "providers": { 3 | "mode": "append", 4 | "redirectOnSingle": false, 5 | "entries": [] 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /packages/example-studio/config/@sanity/default-login.json: -------------------------------------------------------------------------------- 1 | { 2 | "providers": { 3 | "mode": "append", 4 | "redirectOnSingle": false, 5 | "entries": [] 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /packages/movies-studio/config/@sanity/default-login.json: -------------------------------------------------------------------------------- 1 | { 2 | "providers": { 3 | "mode": "append", 4 | "redirectOnSingle": false, 5 | "entries": [] 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /packages/@sanity/base/src/components/icons/FormatListBulleted.js: -------------------------------------------------------------------------------- 1 | import MdFormatListBulleted from 'react-icons/lib/md/format-list-bulleted' 2 | 3 | export default MdFormatListBulleted 4 | -------------------------------------------------------------------------------- /packages/@sanity/base/src/components/icons/FormatListNumbered.js: -------------------------------------------------------------------------------- 1 | import MdFormatListNumbered from 'react-icons/lib/md/format-list-numbered' 2 | 3 | export default MdFormatListNumbered 4 | -------------------------------------------------------------------------------- /packages/@sanity/block-tools/test/tests/converters/slateStateToBlocks/decorators/index.js: -------------------------------------------------------------------------------- 1 | export default (slateJsonToBlocks, input) => { 2 | return slateJsonToBlocks(input) 3 | } 4 | -------------------------------------------------------------------------------- /packages/@sanity/check/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "browser": false, 4 | "node": true 5 | }, 6 | "rules": { 7 | "import/no-commonjs": "off" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /packages/@sanity/client/.npmignore: -------------------------------------------------------------------------------- 1 | .nyc_output 2 | node_modules 3 | src 4 | .babelrc 5 | .editorconfig 6 | .eslintignore 7 | .eslintrc 8 | .gitignore 9 | rollup.config.js 10 | -------------------------------------------------------------------------------- /packages/@sanity/components/src/buttons/AnchorButton.js: -------------------------------------------------------------------------------- 1 | import createButtonLike from './createButtonLike' 2 | 3 | export default createButtonLike('a', {displayName: 'AnchorButton'}) 4 | -------------------------------------------------------------------------------- /packages/@sanity/core/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "browser": false, 4 | "node": true 5 | }, 6 | "rules": { 7 | "import/no-commonjs": "off" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /packages/@sanity/export/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "browser": false, 4 | "node": true 5 | }, 6 | "rules": { 7 | "import/no-commonjs": "off" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /packages/@sanity/generate-help-url/index.js: -------------------------------------------------------------------------------- 1 | var baseUrl = 'https://docs.sanity.io/help/' 2 | 3 | module.exports = function generateHelpUrl(slug) { 4 | return baseUrl + slug 5 | } 6 | -------------------------------------------------------------------------------- /packages/@sanity/import/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "browser": false, 4 | "node": true 5 | }, 6 | "rules": { 7 | "import/no-commonjs": "off" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /packages/@sanity/server/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "browser": false, 4 | "node": true 5 | }, 6 | "rules": { 7 | "import/no-commonjs": "off" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /packages/@sanity/base/src/components/icons/FormatStrikethrough.js: -------------------------------------------------------------------------------- 1 | import MdFormatStrikethrough from 'react-icons/lib/md/format-strikethrough' 2 | 3 | export default MdFormatStrikethrough 4 | -------------------------------------------------------------------------------- /packages/@sanity/eventsource/browser.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-var */ 2 | var evs = require('eventsource-polyfill/dist/eventsource') 3 | module.exports = window.EventSource || evs.EventSource 4 | -------------------------------------------------------------------------------- /packages/@sanity/import-cli/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "browser": false, 4 | "node": true 5 | }, 6 | "rules": { 7 | "import/no-commonjs": "off" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /packages/example-studio/parts/languageFilterConfig.js: -------------------------------------------------------------------------------- 1 | import {SUPPORTED_LANGUAGES} from '../schemas/languages' 2 | 3 | export default { 4 | supportedLanguages: SUPPORTED_LANGUAGES 5 | } 6 | -------------------------------------------------------------------------------- /packages/@sanity/desk-tool/src/styles/GetStarted.css: -------------------------------------------------------------------------------- 1 | .content { 2 | padding: 2em; 3 | } 4 | 5 | .lead { 6 | composes: lead from 'part:@sanity/base/theme/typography/text-blocks-style'; 7 | } 8 | -------------------------------------------------------------------------------- /packages/@sanity/form-builder/src/inputs/BlockEditor-slate/toolbar/styles/Decorators.css: -------------------------------------------------------------------------------- 1 | .root { 2 | display: inline-block; 3 | } 4 | 5 | .iconContainer { 6 | transform: scale(1.5); 7 | } 8 | -------------------------------------------------------------------------------- /packages/@sanity/form-builder/src/inputs/BlockEditor-slate/toolbar/styles/ListItems.css: -------------------------------------------------------------------------------- 1 | .root { 2 | display: inline-block; 3 | } 4 | 5 | .iconContainer { 6 | transform: scale(1.5); 7 | } 8 | -------------------------------------------------------------------------------- /packages/@sanity/form-builder/test/patching/containers/SlateNodeAccessors/ListAccessor.js: -------------------------------------------------------------------------------- 1 | export default class ListAccessor { 2 | constructor(value) { 3 | this.value = value 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /packages/@sanity/webpack-loader/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "browser": false, 4 | "node": true 5 | }, 6 | "rules": { 7 | "import/no-commonjs": "off" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /packages/test-studio/src/components/PertEstimate.css: -------------------------------------------------------------------------------- 1 | body { 2 | background: #bf1942; 3 | } 4 | 5 | .pert-global { 6 | font-family: monospace !important; 7 | background: #bf1942; 8 | } 9 | -------------------------------------------------------------------------------- /.stylelintignore: -------------------------------------------------------------------------------- 1 | /node_modules/ 2 | /packages/*/node_modules 3 | /packages/@sanity/*/node_modules 4 | /packages/*/dist 5 | /packages/@sanity/*/dist 6 | /packages/*/lib 7 | /packages/@sanity/*/lib 8 | -------------------------------------------------------------------------------- /packages/@sanity/default-layout/example/plugins/my-tool/sanity.json: -------------------------------------------------------------------------------- 1 | { 2 | "parts": [ 3 | { 4 | "implements": "part:@sanity/base/tool", 5 | "path": "./MyTool" 6 | } 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /packages/@sanity/google-maps-input/config.dist.json: -------------------------------------------------------------------------------- 1 | { 2 | "apiKey": null, 3 | "defaultZoom": 11, 4 | "defaultLocation": { 5 | "lat": 40.7058254, 6 | "lng": -74.1180863 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /packages/@sanity/webpack-integration/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "browser": false, 4 | "node": true 5 | }, 6 | "rules": { 7 | "import/no-commonjs": "off" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /packages/blog-studio/.gitignore: -------------------------------------------------------------------------------- 1 | # Build files 2 | dist 3 | 4 | # Dependency directories 5 | node_modules 6 | 7 | # npm log 8 | npm-debug.log 9 | 10 | # macOS finder file 11 | .DS_Store 12 | -------------------------------------------------------------------------------- /packages/blog-studio/README.md: -------------------------------------------------------------------------------- 1 | # blog-studio 2 | 3 | Content studio running with schema from the blog init template 4 | 5 | Start from project root directory with 6 | 7 | npm run blog-studio 8 | -------------------------------------------------------------------------------- /packages/movies-studio/.gitignore: -------------------------------------------------------------------------------- 1 | # Build files 2 | dist 3 | 4 | # Dependency directories 5 | node_modules 6 | 7 | # npm log 8 | npm-debug.log 9 | 10 | # macOS finder file 11 | .DS_Store 12 | -------------------------------------------------------------------------------- /packages/test-studio/schemas/customNumber.js: -------------------------------------------------------------------------------- 1 | export default { 2 | name: 'customNumber', 3 | type: 'number', 4 | title: 'Custom number', 5 | validation: Rule => Rule.min(0).max(1000) 6 | } 7 | -------------------------------------------------------------------------------- /packages/@sanity/cli/src/actions/init-project/templates/blog.js: -------------------------------------------------------------------------------- 1 | export const dependencies = {} 2 | 3 | export const generateSanityManifest = base => ({ 4 | ...base, 5 | plugins: base.plugins 6 | }) 7 | -------------------------------------------------------------------------------- /packages/@sanity/cli/src/actions/init-project/templates/clean.js: -------------------------------------------------------------------------------- 1 | export const dependencies = {} 2 | 3 | export const generateSanityManifest = base => ({ 4 | ...base, 5 | plugins: base.plugins 6 | }) 7 | -------------------------------------------------------------------------------- /packages/@sanity/cli/templates/blog/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | 5 | # Coverage directory used by tools like istanbul 6 | coverage 7 | 8 | # Dependency directories 9 | node_modules 10 | -------------------------------------------------------------------------------- /packages/@sanity/components/src/typography/styles/story.css: -------------------------------------------------------------------------------- 1 | @import 'part:@sanity/base/theme/variables-style'; 2 | 3 | .wrapper { 4 | max-width: 40em; 5 | padding: 0 1em; 6 | margin: 0 auto; 7 | } 8 | -------------------------------------------------------------------------------- /packages/@sanity/export/src/stringifyStream.js: -------------------------------------------------------------------------------- 1 | const miss = require('mississippi') 2 | 3 | module.exports = miss.through.obj((doc, enc, callback) => 4 | callback(null, `${JSON.stringify(doc)}\n`) 5 | ) 6 | -------------------------------------------------------------------------------- /packages/storybook/config/@sanity/google-maps-input.json: -------------------------------------------------------------------------------- 1 | { 2 | "apiKey": null, 3 | "defaultZoom": 11, 4 | "defaultLocation": { 5 | "lat": 40.7058254, 6 | "lng": -74.1180863 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /packages/@sanity/cli/templates/clean/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | 5 | # Coverage directory used by tools like istanbul 6 | coverage 7 | 8 | # Dependency directories 9 | node_modules 10 | -------------------------------------------------------------------------------- /packages/@sanity/cli/templates/ecommerce/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | 5 | # Coverage directory used by tools like istanbul 6 | coverage 7 | 8 | # Dependency directories 9 | node_modules 10 | -------------------------------------------------------------------------------- /packages/@sanity/cli/templates/moviedb/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | 5 | # Coverage directory used by tools like istanbul 6 | coverage 7 | 8 | # Dependency directories 9 | node_modules 10 | -------------------------------------------------------------------------------- /packages/@sanity/core/src/commands/hook/hookGroup.js: -------------------------------------------------------------------------------- 1 | export default { 2 | name: 'hook', 3 | signature: '[COMMAND]', 4 | isGroupRoot: true, 5 | description: 'Interact with hooks in your project' 6 | } 7 | -------------------------------------------------------------------------------- /packages/@sanity/util/src/lazyRequire.js: -------------------------------------------------------------------------------- 1 | const dynamicRequire = require('./dynamicRequire') 2 | 3 | module.exports = id => (...args) => { 4 | const mod = dynamicRequire(id) 5 | return mod(...args) 6 | } 7 | -------------------------------------------------------------------------------- /packages/ecommerce-studio/plugins/barcode-input/sanity.json: -------------------------------------------------------------------------------- 1 | { 2 | "parts": [ 3 | { 4 | "implements": "part:@sanity/base/schema-type", 5 | "path": "./BarcodeType.js" 6 | } 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /packages/movies-studio/README.md: -------------------------------------------------------------------------------- 1 | # movies-studio 2 | 3 | Content studio running with schema from the moviedb init template 4 | 5 | Start from project root directory with 6 | 7 | npm run movies-studio 8 | -------------------------------------------------------------------------------- /packages/@sanity/cli/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "browser": false, 4 | "node": true 5 | }, 6 | "rules": { 7 | "import/no-commonjs": "off", 8 | "complexity": [1, 18] 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /packages/@sanity/default-layout/example/plugins/my-other-tool/sanity.json: -------------------------------------------------------------------------------- 1 | { 2 | "parts": [ 3 | { 4 | "implements": "part:@sanity/base/tool", 5 | "path": "./MyOtherTool" 6 | } 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /packages/@sanity/form-builder/src/typedefs/path.js: -------------------------------------------------------------------------------- 1 | type KeyedSegment = { 2 | _key: string 3 | } 4 | 5 | export type PathSegment = string | number | KeyedSegment 6 | 7 | export type Path = Array 8 | -------------------------------------------------------------------------------- /packages/@sanity/generate-help-url/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends": [ 3 | "eslint:recommended", 4 | "plugin:es5/no-es2015" 5 | ], 6 | "rules": { 7 | "import/no-commonjs": "off" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /packages/@sanity/import/test/fixtures/missing-type.ndjson: -------------------------------------------------------------------------------- 1 | {"_id": "espen", "_type": "employee", "name": "Espen"} 2 | {"_id": "Even", "_type": "employee", "name": "Even"} 3 | {"_id": "pk", "name": "Per-Kristian"} 4 | -------------------------------------------------------------------------------- /packages/@sanity/import/test/fixtures/valid-but-missing-ids.ndjson: -------------------------------------------------------------------------------- 1 | {"_type": "employee", "name": "Espen"} 2 | {"_id":"pk", "_type": "employee", "name": "Per-Kristian"} 3 | {"_type": "employee", "name": "Bjørge"} 4 | -------------------------------------------------------------------------------- /packages/@sanity/plugin-loader/test/fixture/plugins/better-date/sanity.json: -------------------------------------------------------------------------------- 1 | { 2 | "parts": [ 3 | { 4 | "implements": "part:date/timestamp", 5 | "path": "./getBetterTimestamp.js" 6 | } 7 | ] 8 | } -------------------------------------------------------------------------------- /packages/example-studio/plugins/dark-theme/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | 5 | # Coverage directory used by tools like istanbul 6 | coverage 7 | 8 | # Dependency directories 9 | node_modules 10 | -------------------------------------------------------------------------------- /packages/@sanity/cli/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | [ 4 | "@babel/preset-env", 5 | { 6 | "targets": { 7 | "node": "6" 8 | } 9 | } 10 | ] 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /packages/@sanity/core/src/commands/cors/corsGroup.js: -------------------------------------------------------------------------------- 1 | export default { 2 | name: 'cors', 3 | signature: '[COMMAND]', 4 | isGroupRoot: true, 5 | description: 'Interact with CORS-entries for your project' 6 | } 7 | -------------------------------------------------------------------------------- /packages/@sanity/core/src/commands/dataset/datasetGroup.js: -------------------------------------------------------------------------------- 1 | export default { 2 | name: 'dataset', 3 | signature: '[COMMAND]', 4 | isGroupRoot: true, 5 | description: 'Interact with datasets in your project' 6 | } 7 | -------------------------------------------------------------------------------- /packages/@sanity/default-layout/example/previewResolver.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | const Preview = () =>
Preview
4 | 5 | export default function previewResolver(field) { 6 | return Preview 7 | } 8 | -------------------------------------------------------------------------------- /packages/@sanity/form-builder/examples/schema-testbed/components/styles/Main.css: -------------------------------------------------------------------------------- 1 | .root { 2 | position: absolute; 3 | height: 100vh; 4 | width: 100vw; 5 | overflow: scroll; 6 | box-sizing: border-box; 7 | } 8 | -------------------------------------------------------------------------------- /packages/@sanity/plugin-loader/test/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "node": true, 4 | "jest": true 5 | }, 6 | "rules": { 7 | "id-length": 0, 8 | "import/no-dynamic-require": 0 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /packages/@sanity/preview/src/observePaths.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import observeFields from './observeFields' 3 | import createPathObserver from './createPathObserver' 4 | 5 | export default createPathObserver(observeFields) 6 | -------------------------------------------------------------------------------- /packages/@sanity/preview/src/streams/orientationChange.js: -------------------------------------------------------------------------------- 1 | import fromEvent from '../utils/fromEvent' 2 | import {share} from 'rxjs/operators' 3 | 4 | export default fromEvent(window, 'orientationchange').pipe(share()) 5 | -------------------------------------------------------------------------------- /packages/@sanity/preview/src/streams/visibilityChange.js: -------------------------------------------------------------------------------- 1 | import fromEvent from '../utils/fromEvent' 2 | import {share} from 'rxjs/operators' 3 | 4 | export default fromEvent(document, 'visibilitychange').pipe(share()) 5 | -------------------------------------------------------------------------------- /packages/@sanity/server/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | *.log 3 | 4 | # Compiled files 5 | lib 6 | 7 | # Coverage directory used by tools like istanbul 8 | coverage 9 | 10 | # Dependency directories 11 | node_modules 12 | -------------------------------------------------------------------------------- /packages/@sanity/server/src/configs/postcssPlugins.js: -------------------------------------------------------------------------------- 1 | import webpackIntegration from '@sanity/webpack-integration/v3' 2 | 3 | export default options => { 4 | return webpackIntegration.getPostcssPlugins(options) 5 | } 6 | -------------------------------------------------------------------------------- /packages/example-studio/config/@sanity/data-aspects.json: -------------------------------------------------------------------------------- 1 | { 2 | "hiddenTypes": ["block", "span", "mark", "link", "address", "code", "localeString", "localeSlug", "videoEmbed", "protein"], 3 | "listOptions": {} 4 | } 5 | -------------------------------------------------------------------------------- /packages/@sanity/base/src/styles/forms/control.css: -------------------------------------------------------------------------------- 1 | @import 'part:@sanity/base/theme/variables/globals-style'; 2 | 3 | .root { 4 | box-sizing: border-box; 5 | } 6 | 7 | .inner { 8 | position: relative; 9 | } 10 | -------------------------------------------------------------------------------- /packages/@sanity/block-tools/test/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "node": true, 4 | "jest": true 5 | }, 6 | "rules": { 7 | "no-sync": 0, 8 | "max-nested-callbacks": ["error", 4] 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /packages/@sanity/cli/src/actions/init-project/templates/gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | 5 | # Coverage directory used by tools like istanbul 6 | coverage 7 | 8 | # Dependency directories 9 | node_modules 10 | -------------------------------------------------------------------------------- /packages/@sanity/cli/templates/ecommerce/plugins/barcode-input/sanity.json: -------------------------------------------------------------------------------- 1 | { 2 | "parts": [ 3 | { 4 | "implements": "part:@sanity/base/schema-type", 5 | "path": "./BarcodeType.js" 6 | } 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /packages/@sanity/cli/test/temp.test.js: -------------------------------------------------------------------------------- 1 | import {describe, it} from 'mocha' 2 | import {expect} from 'chai' 3 | 4 | describe('cli', () => { 5 | it('needs tests', () => { 6 | expect('foo').to.equal('foo') 7 | }) 8 | }) 9 | -------------------------------------------------------------------------------- /packages/@sanity/core/test/core.test.js: -------------------------------------------------------------------------------- 1 | import {expect} from 'chai' 2 | import {describe, it} from 'mocha' 3 | 4 | describe('core', () => { 5 | it('needs tests', () => { 6 | expect(true).to.equal(true) 7 | }) 8 | }) 9 | -------------------------------------------------------------------------------- /packages/@sanity/google-maps-input/example/config/@sanity/google-maps-input.json: -------------------------------------------------------------------------------- 1 | { 2 | "apiKey": null, 3 | "defaultZoom": 11, 4 | "defaultLocation": { 5 | "lat": 40.7058254, 6 | "lng": -74.1180863 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /packages/@sanity/image-url/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | [ 4 | "@babel/preset-env", 5 | { 6 | "targets": { 7 | "ie": "9" 8 | } 9 | } 10 | ] 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /packages/@sanity/observable/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | [ 4 | "@babel/preset-env", 5 | { 6 | "targets": { 7 | "ie": "9" 8 | } 9 | } 10 | ] 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /packages/@sanity/server/src/configs/babel-env-config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | targets: { 3 | node: '6', 4 | chrome: '59', 5 | safari: '10', 6 | firefox: '56', 7 | edge: '14' 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /packages/@sanity/validation/test/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "node": true, 4 | "jest": true 5 | }, 6 | "rules": { 7 | "no-sync": 0, 8 | "max-nested-callbacks": ["error", 4] 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /packages/@sanity/cli/templates/ecommerce/schemas/locale/supportedLanguages.js: -------------------------------------------------------------------------------- 1 | export default [ 2 | {id: 'en', title: 'English', isDefault: true}, 3 | {id: 'es', title: 'Spanish'}, 4 | {id: 'nb', title: 'Norwegian'} 5 | ] 6 | -------------------------------------------------------------------------------- /packages/@sanity/components/demo/sanity.json: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | "plugins": [ 4 | "@sanity/base", 5 | ".." 6 | ], 7 | "server": { 8 | "port": 9002, 9 | "hostname": "0.0.0.0" 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /packages/@sanity/components/src/utilities/styles/Poppable.css: -------------------------------------------------------------------------------- 1 | @import 'part:@sanity/base/theme/variables-style'; 2 | 3 | .portal { 4 | position: fixed; 5 | z-index: var(--zindex-portal); 6 | top: 0; 7 | left: 0; 8 | } 9 | -------------------------------------------------------------------------------- /packages/@sanity/core/src/commands/documents/documentsGroup.js: -------------------------------------------------------------------------------- 1 | export default { 2 | name: 'documents', 3 | signature: '[COMMAND]', 4 | isGroupRoot: true, 5 | description: 'Interact with documents in your project' 6 | } 7 | -------------------------------------------------------------------------------- /packages/@sanity/desk-tool/src/utils/dataAspects.js: -------------------------------------------------------------------------------- 1 | import schema from 'part:@sanity/base/schema' 2 | import DataAspectsResolver from 'part:@sanity/data-aspects/resolver' 3 | 4 | export default new DataAspectsResolver(schema) 5 | -------------------------------------------------------------------------------- /packages/@sanity/document-store/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | *.log 3 | 4 | # Compiled files 5 | lib 6 | 7 | # Coverage directory used by tools like istanbul 8 | coverage 9 | 10 | # Dependency directories 11 | node_modules 12 | -------------------------------------------------------------------------------- /packages/@sanity/document-window/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | *.log 3 | 4 | # Compiled files 5 | lib 6 | 7 | # Coverage directory used by tools like istanbul 8 | coverage 9 | 10 | # Dependency directories 11 | node_modules 12 | -------------------------------------------------------------------------------- /packages/@sanity/document-window/test/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "node": true, 4 | "jest": true 5 | }, 6 | "rules": { 7 | "no-sync": 0, 8 | "max-nested-callbacks": ["error", 4] 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /packages/@sanity/import/test/fixtures/invalid-id.ndjson: -------------------------------------------------------------------------------- 1 | {"_id": "espen", "_type": "employee", "name": "Espen"} 2 | {"_id": 123, "_type": "employee", "name": "Per-Kristian"} 3 | {"_id": "Even", "_type": "employee", "name": "Even"} 4 | -------------------------------------------------------------------------------- /packages/@sanity/mutator/src/document/index.js: -------------------------------------------------------------------------------- 1 | import Document from './Document' 2 | import Mutation from './Mutation' 3 | import BufferedDocument from './BufferedDocument' 4 | 5 | export {Document, Mutation, BufferedDocument} 6 | -------------------------------------------------------------------------------- /packages/@sanity/server/src/prodServer.js: -------------------------------------------------------------------------------- 1 | import {getBaseServer, applyStaticRoutes} from './baseServer' 2 | 3 | export default function getProdServer(config) { 4 | return applyStaticRoutes(getBaseServer(config), config) 5 | } 6 | -------------------------------------------------------------------------------- /packages/@sanity/state-router/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | *.log 3 | 4 | # Compiled files 5 | lib 6 | 7 | # Coverage directory used by tools like istanbul 8 | coverage 9 | 10 | # Dependency directories 11 | node_modules 12 | -------------------------------------------------------------------------------- /packages/@sanity/vision/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | 5 | # Coverage directory used by tools like istanbul 6 | coverage 7 | 8 | # Dependency directories 9 | node_modules 10 | 11 | # Built files 12 | lib 13 | -------------------------------------------------------------------------------- /packages/@sanity/vision/src/util/isPlainObject.js: -------------------------------------------------------------------------------- 1 | export default function isPlainObject(obj) { 2 | return ( 3 | !!obj && typeof obj === 'object' && Object.prototype.toString.call(obj) === '[object Object]' 4 | ) 5 | } 6 | -------------------------------------------------------------------------------- /packages/example-studio/components/VideoEmbedInput/VideoEmbedInput.css: -------------------------------------------------------------------------------- 1 | .pasteBox { 2 | width: 100%; 3 | } 4 | 5 | .errorMessage { 6 | color: #b5322c; 7 | } 8 | 9 | .description { 10 | font-size: 0.9em; 11 | } 12 | -------------------------------------------------------------------------------- /packages/@sanity/base/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | *.log 3 | 4 | # Compiled files 5 | lib 6 | 7 | # Coverage directory used by tools like istanbul 8 | coverage 9 | .nyc_output 10 | 11 | # Dependency directories 12 | node_modules 13 | -------------------------------------------------------------------------------- /packages/@sanity/cli/src/actions/init-project/templates/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | blog: require('./blog'), 3 | clean: require('./clean'), 4 | moviedb: require('./moviedb'), 5 | ecommerce: require('./ecommerce') 6 | } 7 | -------------------------------------------------------------------------------- /packages/@sanity/cli/vendor/README.md: -------------------------------------------------------------------------------- 1 | This folder contains dependencies that are bundled at the time of publishing. 2 | 3 | This is done to reduce the size of the package. 4 | 5 | Sorry about this being a little counter-intuitive. 6 | -------------------------------------------------------------------------------- /packages/@sanity/default-layout/example/config/@sanity/default-layout.json: -------------------------------------------------------------------------------- 1 | { 2 | "toolSwitcher": { 3 | "order": [ 4 | "my-tool" 5 | ], 6 | "hidden": [ 7 | "some-other-tool" 8 | ] 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /packages/@sanity/mutator/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | *.log 3 | 4 | # Compiled files 5 | lib 6 | 7 | # Coverage directory used by tools like istanbul 8 | coverage 9 | 10 | # Dependency directories 11 | node_modules 12 | 13 | .vscode -------------------------------------------------------------------------------- /packages/@sanity/util/test/versionsFixture/node_modules/@sanity/base/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@sanity/base", 3 | "version": "0.999.99", 4 | "description": "Fake plugin, used for testing", 5 | "main": "placeholder.js" 6 | } 7 | -------------------------------------------------------------------------------- /packages/example-studio/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | 5 | # Coverage directory used by tools like istanbul 6 | coverage 7 | 8 | # Dependency directories 9 | node_modules 10 | 11 | # Built assets 12 | dist 13 | 14 | -------------------------------------------------------------------------------- /packages/@sanity/block-tools/test/tests/HtmlDeserializer/word/index.js: -------------------------------------------------------------------------------- 1 | export default (html, blockTools, commonOptions) => { 2 | const options = { 3 | ...commonOptions 4 | } 5 | return blockTools.htmlToBlocks(html, options) 6 | } 7 | -------------------------------------------------------------------------------- /packages/@sanity/cli/src/commands/projects/projectsGroup.js: -------------------------------------------------------------------------------- 1 | export default { 2 | name: 'projects', 3 | signature: '[COMMAND]', 4 | isGroupRoot: true, 5 | description: 'Interact with projects connected to your logged in user' 6 | } 7 | -------------------------------------------------------------------------------- /packages/@sanity/components/src/buttons/DefaultButton.js: -------------------------------------------------------------------------------- 1 | import createButtonLike from './createButtonLike' 2 | 3 | export default createButtonLike('button', { 4 | displayName: 'BaseButton', 5 | defaultProps: {type: 'button'} 6 | }) 7 | -------------------------------------------------------------------------------- /packages/@sanity/plugin-loader/test/fixture/plugins/date/datepicker.css: -------------------------------------------------------------------------------- 1 | .something { 2 | composes: base from 'part:date/base-style'; 3 | color: #333; 4 | } 5 | 6 | .zebra { 7 | background: #000; 8 | color: #fff; 9 | } 10 | -------------------------------------------------------------------------------- /packages/@sanity/resolver/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | *.log 3 | 4 | # Compiled files 5 | lib 6 | 7 | # Coverage directory used by tools like istanbul 8 | coverage 9 | .nyc_output 10 | 11 | # Dependency directories 12 | node_modules 13 | -------------------------------------------------------------------------------- /packages/@sanity/state-router/src/utils/arrayify.js: -------------------------------------------------------------------------------- 1 | export default function arrayify(val: Array | T): Array { 2 | if (Array.isArray(val)) { 3 | return val 4 | } 5 | return typeof val === 'undefined' ? [] : [val] 6 | } 7 | -------------------------------------------------------------------------------- /packages/blog-studio/config/@sanity/google-maps-input.json: -------------------------------------------------------------------------------- 1 | { 2 | "apiKey": "AIzaSyDwxpdp6WJwj9VjoVCjEudljhkR1inzhSE", 3 | "defaultZoom": 11, 4 | "defaultLocation": { 5 | "lat": 40.7058254, 6 | "lng": -74.1180863 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /packages/movies-studio/config/@sanity/google-maps-input.json: -------------------------------------------------------------------------------- 1 | { 2 | "apiKey": "AIzaSyC1J6PVAOELsy1vyTh-x38GadFv70g2Qcc", 3 | "defaultZoom": 11, 4 | "defaultLocation": { 5 | "lat": 40.7058254, 6 | "lng": -74.1180863 7 | } 8 | } -------------------------------------------------------------------------------- /packages/test-studio/config/@sanity/google-maps-input.json: -------------------------------------------------------------------------------- 1 | { 2 | "apiKey": "AIzaSyDwxpdp6WJwj9VjoVCjEudljhkR1inzhSE", 3 | "defaultZoom": 11, 4 | "defaultLocation": { 5 | "lat": 40.7058254, 6 | "lng": -74.1180863 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /packages/@sanity/core/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | 5 | # Coverage directory used by tools like istanbul 6 | coverage 7 | .nyc_output 8 | 9 | # Dependency directories 10 | node_modules 11 | 12 | # Compiled code 13 | /lib 14 | -------------------------------------------------------------------------------- /packages/@sanity/imagetool/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | presets: [ 3 | '@babel/preset-flow', 4 | '@babel/preset-react', 5 | ['@babel/preset-env', { 6 | targets: { 7 | ie: '9' 8 | } 9 | }] 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /packages/@sanity/import/test/fixtures/invalid-id-format.ndjson: -------------------------------------------------------------------------------- 1 | {"_id": "espen", "_type": "employee", "name": "Espen"} 2 | {"_id": "pk#123", "_type": "employee", "name": "Per-Kristian"} 3 | {"_id": "Even", "_type": "employee", "name": "Even"} 4 | -------------------------------------------------------------------------------- /packages/@sanity/plugin-loader/test/versionsFixture/node_modules/@sanity/base/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@sanity/base", 3 | "version": "0.999.99", 4 | "description": "Fake plugin, used for testing", 5 | "main": "placeholder.js" 6 | } 7 | -------------------------------------------------------------------------------- /packages/@sanity/storybook/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | 5 | # Coverage directory used by tools like istanbul 6 | /coverage 7 | 8 | # Dependency directories 9 | node_modules 10 | 11 | # Built assets 12 | /dist 13 | /lib 14 | -------------------------------------------------------------------------------- /packages/@sanity/webpack-loader/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | *.log 3 | 4 | # Compiled files 5 | lib 6 | 7 | # Coverage directory used by tools like istanbul 8 | coverage 9 | .nyc_output 10 | 11 | # Dependency directories 12 | node_modules 13 | -------------------------------------------------------------------------------- /packages/@sanity/block-tools/test/tests/HtmlDeserializer/noBlockType/index.js: -------------------------------------------------------------------------------- 1 | export default (html, blockTools, commonOptions) => { 2 | const options = { 3 | ...commonOptions 4 | } 5 | return blockTools.htmlToBlocks(html, options) 6 | } 7 | -------------------------------------------------------------------------------- /packages/@sanity/export/src/requestStream.js: -------------------------------------------------------------------------------- 1 | const simpleGet = require('simple-get') 2 | 3 | module.exports = options => 4 | new Promise((resolve, reject) => { 5 | simpleGet(options, (err, res) => (err ? reject(err) : resolve(res))) 6 | }) 7 | -------------------------------------------------------------------------------- /packages/@sanity/observable/README.md: -------------------------------------------------------------------------------- 1 | # Deprecated 2 | 3 | This package exists for legacy reasons only and should not be used anymore. Use rxjs directly instead. 4 | 5 | See [issue #768](https://github.com/sanity-io/sanity/pull/768) for context 6 | -------------------------------------------------------------------------------- /packages/@sanity/util/test/versionsFixture/node_modules/@sanity/components/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@sanity/components", 3 | "version": "0.777.77", 4 | "description": "Fake plugin, used for testing", 5 | "main": "placeholder.js" 6 | } 7 | -------------------------------------------------------------------------------- /packages/@sanity/validation/src/util/escapeRegex.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-useless-escape */ 2 | module.exports = string => { 3 | // Escape ^$.*+-?=!:|\/()[]{}, 4 | return string.replace(/[\^\$\.\*\+\-\?\=\!\:\|\\\/\(\)\[\]\{\}\,]/g, '\\$&') 5 | } 6 | -------------------------------------------------------------------------------- /packages/@sanity/block-tools/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | npm-debug.log 3 | npm-shrinkwrap.json 4 | .DS_Store 5 | coverage 6 | .idea 7 | /lib 8 | form-builder-old 9 | plugins/@sanity 10 | examples/schema-testbed/plugins/@sanity 11 | flow-typed 12 | -------------------------------------------------------------------------------- /packages/@sanity/client/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "6" 4 | - "4" 5 | script: 6 | - npm run coverage 7 | after_success: 8 | - npm install coveralls 9 | - cat ./coverage/lcov.info | ./node_modules/.bin/coveralls 10 | -------------------------------------------------------------------------------- /packages/@sanity/form-builder/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | npm-debug.log 3 | npm-shrinkwrap.json 4 | .DS_Store 5 | coverage 6 | .idea 7 | /lib 8 | form-builder-old 9 | plugins/@sanity 10 | examples/schema-testbed/plugins/@sanity 11 | flow-typed 12 | -------------------------------------------------------------------------------- /packages/@sanity/import/test/fixtures/unkeyed.ndjson: -------------------------------------------------------------------------------- 1 | {"_id": "espen", "_type": "employee", "name": "Espen", "favGames": [{"_ref": "bf1942"}]} 2 | {"_id": "pk", "_type": "employee", "name": "Per-Kristian", "favGames": [{"_ref": "cod2"}, {"_ref": "bf2"}]} 3 | -------------------------------------------------------------------------------- /packages/@sanity/plugin-loader/test/versionsFixture/node_modules/@sanity/components/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@sanity/components", 3 | "version": "0.777.77", 4 | "description": "Fake plugin, used for testing", 5 | "main": "placeholder.js" 6 | } 7 | -------------------------------------------------------------------------------- /packages/@sanity/preview/.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | 3 | # Logs 4 | *.log 5 | 6 | # Compiled files 7 | lib 8 | 9 | # Coverage directory used by tools like istanbul 10 | coverage 11 | .nyc_output 12 | 13 | # Dependency directories 14 | node_modules 15 | -------------------------------------------------------------------------------- /packages/@sanity/preview/src/constants.js: -------------------------------------------------------------------------------- 1 | export const INCLUDE_FIELDS_QUERY = ['_id', '_rev', '_type'] 2 | export const INCLUDE_FIELDS = [...INCLUDE_FIELDS_QUERY, '_key'] 3 | 4 | export const INVALID_PREVIEW_CONFIG = Symbol('invalid preview config') 5 | -------------------------------------------------------------------------------- /packages/@sanity/schema/.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | 3 | # Logs 4 | *.log 5 | 6 | # Compiled files 7 | lib 8 | 9 | # Coverage directory used by tools like istanbul 10 | coverage 11 | .nyc_output 12 | 13 | # Dependency directories 14 | node_modules 15 | -------------------------------------------------------------------------------- /packages/@sanity/validation/src/util/prefixPaths.js: -------------------------------------------------------------------------------- 1 | module.exports = (result, prefix) => { 2 | return Object.keys(result).reduce((acc, key) => { 3 | acc[key] = result[key].map(err => err.prefixPaths(prefix)) 4 | return acc 5 | }, {}) 6 | } 7 | -------------------------------------------------------------------------------- /packages/@sanity/cli/src/commands/login/loginCommand.js: -------------------------------------------------------------------------------- 1 | import login from '../../actions/login/login' 2 | 3 | export default { 4 | name: 'login', 5 | signature: '', 6 | description: 'Authenticates against the Sanity.io API', 7 | action: login 8 | } 9 | -------------------------------------------------------------------------------- /packages/@sanity/core/src/index.js: -------------------------------------------------------------------------------- 1 | import commands from './commands' 2 | import requiredCliVersionRange from './requiredCliVersionRange' 3 | 4 | // Must be module.exports (commonjs) 5 | module.exports = { 6 | commands, 7 | requiredCliVersionRange 8 | } 9 | -------------------------------------------------------------------------------- /packages/@sanity/form-builder/src/inputs/Slug/styles/SlugInput.css: -------------------------------------------------------------------------------- 1 | .wrapper { 2 | width: 100%; 3 | display: flex; 4 | } 5 | 6 | .input { 7 | flex-grow: 1; 8 | } 9 | 10 | .button { 11 | margin-left: 0.5em; 12 | font-size: 0.9em; 13 | } 14 | -------------------------------------------------------------------------------- /packages/@sanity/mutator/src/index.js: -------------------------------------------------------------------------------- 1 | export {Matcher, Expression, extract, extractWithPath, arrayToJSONMatchPath} from './jsonpath' 2 | export {Patcher, ImmutableAccessor} from './patch' 3 | export {Document, Mutation, BufferedDocument} from './document' 4 | -------------------------------------------------------------------------------- /packages/@sanity/state-router/src/utils/debug.js: -------------------------------------------------------------------------------- 1 | const PREFIX = 'state-router' 2 | export let debug = function(...args) { 3 | if ((process.env.DEBUG || '').includes(PREFIX)) { 4 | debug = require('debug')(PREFIX) 5 | debug(...args) 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /packages/@sanity/form-builder/examples/schema-testbed/components/custom/MyCustomSlugInput.js: -------------------------------------------------------------------------------- 1 | import {SlugInput} from '../../../../src' 2 | import mockValidateSlug from './mock/validateSlug' 3 | 4 | export default SlugInput.create({validate: mockValidateSlug}) 5 | -------------------------------------------------------------------------------- /packages/@sanity/form-builder/examples/schema-testbed/components/custom/mock/validateSlug.js: -------------------------------------------------------------------------------- 1 | export default function(slug) { 2 | if (slug === 'foobar') { 3 | return Promise.resolve("'foobar' is already taken ya!") 4 | } 5 | return Promise.resolve() 6 | } 7 | -------------------------------------------------------------------------------- /packages/@sanity/imagetool/src/constants.js: -------------------------------------------------------------------------------- 1 | export const DEFAULT_HOTSPOT = { 2 | x: 0.5, 3 | y: 0.5, 4 | height: 1, 5 | width: 1 6 | } 7 | 8 | export const DEFAULT_CROP = { 9 | top: 0, 10 | left: 0, 11 | right: 0, 12 | bottom: 0 13 | } 14 | -------------------------------------------------------------------------------- /packages/@sanity/preview/src/streams/resize.js: -------------------------------------------------------------------------------- 1 | import fromEvent from '../utils/fromEvent' 2 | import {debounceTime, share} from 'rxjs/operators' 3 | 4 | export default fromEvent(window, 'resize', {passive: true}).pipe( 5 | debounceTime(200), 6 | share() 7 | ) 8 | -------------------------------------------------------------------------------- /packages/@sanity/uuid/README.md: -------------------------------------------------------------------------------- 1 | # Sanity UID 2 | 3 | Generate a valid Sanity document id 4 | 5 | ## Usage 6 | ```js 7 | const UUID = require('./') 8 | const id = UUID() 9 | 10 | console.log(uid) 11 | //=> 76dc5edf-9c43-4bab-a62d-4a2cad650053 12 | ``` 13 | -------------------------------------------------------------------------------- /packages/@sanity/validation/src/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | Rule: require('./Rule'), 3 | validateDocument: require('./validateDocument'), 4 | inferFromSchema: require('./inferFromSchema'), 5 | inferFromSchemaType: require('./inferFromSchemaType') 6 | } 7 | -------------------------------------------------------------------------------- /packages/@sanity/vision/src/util/calendarDate.js: -------------------------------------------------------------------------------- 1 | import moment from 'moment' 2 | 3 | function calendarDate(date) { 4 | return moment(date).calendar(null, { 5 | sameElse: 'YYYY-MM-DD HH:mm:ss' 6 | }) 7 | } 8 | 9 | export default calendarDate 10 | -------------------------------------------------------------------------------- /packages/@sanity/vision/src/util/request.js: -------------------------------------------------------------------------------- 1 | export default (comp, opts, key) => { 2 | return comp.context.client.observable.request(opts).subscribe({ 3 | next: val => comp.setState({[key]: val}), 4 | error: error => comp.setState({error}) 5 | }) 6 | } 7 | -------------------------------------------------------------------------------- /packages/test-studio/src/resolveProductionUrl.js: -------------------------------------------------------------------------------- 1 | const PREVIEW_TYPES = ['book', 'author'] 2 | 3 | export default function resolveProductionUrl(document) { 4 | return PREVIEW_TYPES.includes(document._type) && `https://example.com/preview/${document._id}` 5 | } 6 | -------------------------------------------------------------------------------- /packages/@sanity/base/src/styles/variables/list.css: -------------------------------------------------------------------------------- 1 | @import "part:@sanity/base/theme/variables/gray-colors-style"; 2 | 3 | :root { 4 | --list-border-color: color(var(--component-border-color) a(30%)); 5 | --list-border: 1px solid var(--list-border-color); 6 | } 7 | -------------------------------------------------------------------------------- /packages/@sanity/components/src/lists/grid/styles/GridItem.css: -------------------------------------------------------------------------------- 1 | @import 'part:@sanity/base/theme/variables-style'; 2 | 3 | .root { 4 | display: block; 5 | position: relative; 6 | user-select: none; 7 | cursor: default; 8 | list-style: none; 9 | } 10 | -------------------------------------------------------------------------------- /packages/@sanity/components/src/lists/sortable/SortableListItem.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import React from 'react' 3 | import ListItem from '../default/ListItem' 4 | import {createSortableItem} from '../sortable-factories' 5 | 6 | export default createSortableItem(ListItem) 7 | -------------------------------------------------------------------------------- /packages/@sanity/default-layout/example/config/.checksums: -------------------------------------------------------------------------------- 1 | { 2 | "#": "Used by Sanity to keep track of configuration file checksums, do not delete or modify!", 3 | "@sanity/default-layout": "bb034f391ba508a6ca8cd971967cbedeb131c4d19b17b28a0895f32db5d568ea" 4 | } 5 | -------------------------------------------------------------------------------- /packages/@sanity/desk-tool/examples/testbed/config/.checksums: -------------------------------------------------------------------------------- 1 | { 2 | "#": "Used by Sanity to keep track of configuration file checksums, do not delete or modify!", 3 | "@sanity/data-aspects": "ba5c2649cc1b1c39ae92b7daf2661f95fa79d7325073ffd410245d2717b240e9" 4 | } 5 | -------------------------------------------------------------------------------- /packages/@sanity/google-maps-input/example/config/.checksums: -------------------------------------------------------------------------------- 1 | { 2 | "#": "Used by Sanity to keep track of configuration file checksums, do not delete or modify!", 3 | "@sanity/data-aspects": "ba5c2649cc1b1c39ae92b7daf2661f95fa79d7325073ffd410245d2717b240e9" 4 | } 5 | -------------------------------------------------------------------------------- /packages/@sanity/mutator/flow-typed/npm/flow-bin_v0.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 6a5610678d4b01e13bbfbbc62bdaf583 2 | // flow-typed version: 3817bc6980/flow-bin_v0.x.x/flow_>=v0.25.x 3 | 4 | declare module 'flow-bin' { 5 | declare module.exports: string 6 | } 7 | -------------------------------------------------------------------------------- /packages/@sanity/schema/member-types.md: -------------------------------------------------------------------------------- 1 | ## Member types 2 | 3 | A member type is a type that is not a part of the schema, but rather exists as a member of another type. For example, each fields of an object has fields which are just specialization of schema types. 4 | -------------------------------------------------------------------------------- /packages/@sanity/vision/sanity.json: -------------------------------------------------------------------------------- 1 | { 2 | "paths": { 3 | "source": "./src", 4 | "compiled": "./lib" 5 | }, 6 | "parts": [ 7 | { 8 | "implements": "part:@sanity/base/tool", 9 | "path": "VisionTool.js" 10 | } 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | /packages/*/node_modules 2 | /packages/@sanity/*/node_modules 3 | /packages/*/dist 4 | /packages/@sanity/*/dist 5 | /packages/*/lib 6 | /packages/*/coverage 7 | /packages/@sanity/*/lib 8 | /packages/@sanity/*/coverage 9 | /packages/@sanity/client/umd 10 | -------------------------------------------------------------------------------- /packages/@sanity/components/src/lists/sortable/index.js: -------------------------------------------------------------------------------- 1 | export {createDragHandle} from '../sortable-factories' 2 | export {default as List} from './SortableList' 3 | export {default as Item} from './SortableListItem' 4 | export {default as DragHandle} from './DragHandle' 5 | -------------------------------------------------------------------------------- /packages/@sanity/default-layout/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | *.log 3 | 4 | # idea 5 | .idea 6 | 7 | # Compiled files 8 | lib 9 | 10 | # Coverage directory used by tools like istanbul 11 | coverage 12 | .nyc_output 13 | 14 | # Dependency directories 15 | node_modules 16 | -------------------------------------------------------------------------------- /packages/@sanity/form-builder/src/inputs/BlockEditor-slate/toolbar/styles/BlockStyle.css: -------------------------------------------------------------------------------- 1 | .root { 2 | margin-bottom: 0 !important; 3 | background-color: transparent; 4 | 5 | /* z-index: 1; */ 6 | 7 | @nest & label { 8 | display: none; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /packages/@sanity/client/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | *.log 3 | 4 | # Compiled files 5 | lib 6 | 7 | # Coverage directories used by tools like istanbul 8 | coverage 9 | .nyc_output 10 | 11 | # Dependency directories 12 | node_modules 13 | 14 | # UMD bundle 15 | umd 16 | 17 | -------------------------------------------------------------------------------- /packages/@sanity/components/src/fileinput/FileInputButton.js: -------------------------------------------------------------------------------- 1 | import FileInput from 'part:@sanity/components/fileinput/default' 2 | import createButtonLike from '../buttons/createButtonLike' 3 | 4 | export default createButtonLike(FileInput, {displayName: 'FileInputButton'}) 5 | -------------------------------------------------------------------------------- /packages/@sanity/components/src/lists/sortable-grid/styles/SortableGridList.css: -------------------------------------------------------------------------------- 1 | .root { 2 | display: flex; 3 | flex-wrap: wrap; 4 | flex-direction: row; 5 | margin: 0; 6 | padding: 0; 7 | align-content: flex-start; 8 | justify-content: flex-start; 9 | } 10 | -------------------------------------------------------------------------------- /packages/@sanity/preview/src/streams/scroll.js: -------------------------------------------------------------------------------- 1 | import fromEvent from '../utils/fromEvent' 2 | import {debounceTime, share} from 'rxjs/operators' 3 | 4 | export default fromEvent(window, 'scroll', {passive: true, capture: true}).pipe( 5 | debounceTime(200), 6 | share() 7 | ) 8 | -------------------------------------------------------------------------------- /packages/@sanity/components/src/lists/sortable-grid/index.js: -------------------------------------------------------------------------------- 1 | export {createDragHandle} from '../sortable-factories' 2 | export {default as List} from './SortableGridList' 3 | export {default as Item} from './SortableGridListItem' 4 | export {default as DragHandle} from './DragHandle' 5 | -------------------------------------------------------------------------------- /packages/@sanity/form-builder/src/utils/UploadTargetFieldset.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import Fieldset from 'part:@sanity/components/fieldsets/default' 3 | import {createUploadTarget} from '../inputs/common/UploadTarget/createUploadTarget' 4 | 5 | export default createUploadTarget(Fieldset) 6 | -------------------------------------------------------------------------------- /packages/@sanity/form-builder/src/utils/resolveTypeName.js: -------------------------------------------------------------------------------- 1 | import {resolveJSType} from './resolveJSType' 2 | 3 | export function resolveTypeName(value) { 4 | const jsType = resolveJSType(value) 5 | return (jsType === 'object' && '_type' in value && value._type) || jsType 6 | } 7 | -------------------------------------------------------------------------------- /packages/@sanity/schema/src/sanity/helpfulError.js: -------------------------------------------------------------------------------- 1 | //@flow 2 | import generateHelpUrl from '@sanity/generate-help-url' 3 | 4 | export function createHelpfulError(message: string, slug: string) { 5 | return new Error(`${message}. For more info see ${generateHelpUrl(slug)}`) 6 | } 7 | -------------------------------------------------------------------------------- /packages/@sanity/block-tools/test/setup.js: -------------------------------------------------------------------------------- 1 | beforeEach(() => { 2 | // eslint-disable-line import/unambiguous 3 | let testKey = 0 4 | const randomKey = require('../src/util/randomKey') 5 | randomKey.default = jest.fn(() => { 6 | return `randomKey${testKey++}` 7 | }) 8 | }) 9 | -------------------------------------------------------------------------------- /packages/@sanity/check/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | 5 | # Coverage directory used by tools like istanbul 6 | coverage 7 | 8 | # Grunt intermediate storage 9 | .grunt 10 | 11 | # Dependency directories 12 | node_modules 13 | 14 | # Compiled code 15 | lib 16 | 17 | -------------------------------------------------------------------------------- /packages/@sanity/client/src/util/pick.js: -------------------------------------------------------------------------------- 1 | module.exports = (obj, props) => 2 | props.reduce((selection, prop) => { 3 | if (typeof obj[prop] === 'undefined') { 4 | return selection 5 | } 6 | 7 | selection[prop] = obj[prop] 8 | return selection 9 | }, {}) 10 | -------------------------------------------------------------------------------- /packages/@sanity/import/src/assignDocumentId.js: -------------------------------------------------------------------------------- 1 | const uuid = require('@sanity/uuid') 2 | 3 | function assignDocumentId(doc) { 4 | if (doc._id) { 5 | return doc 6 | } 7 | 8 | return Object.assign({_id: uuid()}, doc) 9 | } 10 | 11 | module.exports = assignDocumentId 12 | -------------------------------------------------------------------------------- /packages/@sanity/state-router/.flowconfig: -------------------------------------------------------------------------------- 1 | [ignore] 2 | # Todo: flow ignore is broken. Flow check currently fails in a file in fbjs. 3 | # Would be better to ignore the whole node_modules folder, but alas, then flow wont find 4 | # type defs for dependencies. 5 | .*/node_modules/fbjs/.* 6 | -------------------------------------------------------------------------------- /packages/@sanity/state-router/src/index.js: -------------------------------------------------------------------------------- 1 | import resolveStateFromPath from './resolveStateFromPath' 2 | import resolvePathFromState from './resolvePathFromState' 3 | 4 | export {default as route} from './route' 5 | 6 | export {resolveStateFromPath} 7 | export {resolvePathFromState} 8 | -------------------------------------------------------------------------------- /packages/@sanity/util/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | *.log 3 | 4 | # Compiled files 5 | /lib 6 | 7 | # Coverage directory used by tools like istanbul 8 | coverage 9 | 10 | # Dependency directories 11 | node_modules 12 | 13 | # Built vendor files 14 | /vendor 15 | !/vendor/README.md 16 | -------------------------------------------------------------------------------- /packages/@sanity/data-aspects/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | 5 | # Coverage directory used by tools like istanbul 6 | coverage 7 | 8 | # Grunt intermediate storage 9 | .grunt 10 | 11 | # Dependency directories 12 | node_modules 13 | 14 | # Compiled code 15 | lib 16 | 17 | -------------------------------------------------------------------------------- /packages/@sanity/desk-tool/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | 5 | # Coverage directory used by tools like istanbul 6 | coverage 7 | 8 | # Grunt intermediate storage 9 | .grunt 10 | 11 | # Dependency directories 12 | node_modules 13 | 14 | # Compiled version 15 | lib 16 | 17 | -------------------------------------------------------------------------------- /packages/@sanity/form-builder/src/inputs/BlockEditor-slate/util/mapToObject.js: -------------------------------------------------------------------------------- 1 | export default function mapToObject(array, producer) { 2 | return array.reduce((acc, el, i) => { 3 | const [key, value] = producer(el, i, acc) 4 | acc[key] = value 5 | return acc 6 | }, {}) 7 | } 8 | -------------------------------------------------------------------------------- /packages/@sanity/form-builder/src/utils/fallback-preview/PreviewPrimitive.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import React from 'react' 3 | 4 | type Props = { 5 | value: string | boolean | number 6 | } 7 | export function PreviewPrimitive(props: Props) { 8 | return {props.value} 9 | } 10 | -------------------------------------------------------------------------------- /packages/@sanity/rich-date-input/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | 5 | # Coverage directory used by tools like istanbul 6 | coverage 7 | 8 | # Grunt intermediate storage 9 | .grunt 10 | 11 | # Dependency directories 12 | node_modules 13 | 14 | # Compiled source 15 | lib 16 | -------------------------------------------------------------------------------- /packages/@sanity/storybook/src/tool/index.js: -------------------------------------------------------------------------------- 1 | import StorybookTool from './StorybookTool' 2 | import {route} from 'part:@sanity/base/router' 3 | 4 | export default { 5 | router: route('/*'), 6 | title: 'Storybook', 7 | name: 'storybook', 8 | component: StorybookTool 9 | } 10 | -------------------------------------------------------------------------------- /packages/@sanity/code-input/src/HighlightMarkers.css: -------------------------------------------------------------------------------- 1 | @import 'part:@sanity/base/theme/variables-style'; 2 | 3 | .highlight { 4 | position: absolute; 5 | background-color: var(--brand-primary); 6 | opacity: 0.2; 7 | width: 100% !important; 8 | border-radius: 0 !important; 9 | } 10 | -------------------------------------------------------------------------------- /packages/@sanity/default-login/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | 5 | # Coverage directory used by tools like istanbul 6 | coverage 7 | 8 | # Grunt intermediate storage 9 | .grunt 10 | 11 | # Dependency directories 12 | node_modules 13 | 14 | # Compiled source 15 | lib 16 | 17 | -------------------------------------------------------------------------------- /packages/@sanity/form-builder/src/inputs/ObjectInput/styles/Field.css: -------------------------------------------------------------------------------- 1 | @import 'part:@sanity/base/theme/variables-style'; 2 | 3 | .root { 4 | display: block; 5 | width: 100%; 6 | box-sizing: border-box; 7 | } 8 | 9 | .root + .root { 10 | margin-top: var(--large-padding); 11 | } 12 | -------------------------------------------------------------------------------- /packages/@sanity/google-maps-input/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | 5 | # Coverage directory used by tools like istanbul 6 | coverage 7 | 8 | # Grunt intermediate storage 9 | .grunt 10 | 11 | # Dependency directories 12 | node_modules 13 | 14 | # Compiled code 15 | lib 16 | 17 | -------------------------------------------------------------------------------- /packages/test-studio/src/components/SearchableArrayFunctions.css: -------------------------------------------------------------------------------- 1 | @import 'part:@sanity/base/theme/variables-style'; 2 | 3 | .item { 4 | padding: var(--small-padding); 5 | } 6 | 7 | .searchableSelect { 8 | composes: spacing from 'part:@sanity/components/buttons/default-style'; 9 | } 10 | -------------------------------------------------------------------------------- /packages/@sanity/mutator/src/jsonpath/extract.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import extractAccessors from './extractAccessors' 3 | 4 | export default function extract(path: string, value: Object): Array { 5 | const accessors = extractAccessors(path, value) 6 | return accessors.map(acc => acc.get()) 7 | } 8 | -------------------------------------------------------------------------------- /packages/@sanity/block-tools/test/tests/HtmlDeserializer/customSchema/output.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "_type": "block", 4 | "children": [ 5 | { "_type": "span", "marks": [], "text": "A heading that is not allowed" } 6 | ], 7 | "markDefs": [], 8 | "style": "normal" 9 | } 10 | ] 11 | -------------------------------------------------------------------------------- /packages/@sanity/client/src/util/defaults.js: -------------------------------------------------------------------------------- 1 | module.exports = (obj, defaults) => 2 | Object.keys(defaults) 3 | .concat(Object.keys(obj)) 4 | .reduce((target, prop) => { 5 | target[prop] = typeof obj[prop] === 'undefined' ? defaults[prop] : obj[prop] 6 | 7 | return target 8 | }, {}) 9 | -------------------------------------------------------------------------------- /packages/@sanity/core/src/actions/exec/babel.js: -------------------------------------------------------------------------------- 1 | import registerBabel from '@babel/register' 2 | 3 | registerBabel({ 4 | presets: [ 5 | [ 6 | '@babel/preset-env', 7 | { 8 | targets: { 9 | node: 'current' 10 | } 11 | } 12 | ] 13 | ] 14 | }) 15 | -------------------------------------------------------------------------------- /packages/@sanity/form-builder/examples/schema-testbed/lib/utils.js: -------------------------------------------------------------------------------- 1 | export function preventDefault(event) { 2 | event.preventDefault() 3 | } 4 | 5 | export function parseParams(pathname) { 6 | const [schemaName, typeName] = pathname.split('/').filter(Boolean) 7 | return {schemaName, typeName} 8 | } 9 | -------------------------------------------------------------------------------- /packages/@sanity/state-router/src/utils/isEmpty.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import hasOwn from './hasOwn' 3 | 4 | export default function isEmpty(object: Object): boolean { 5 | for (const key in object) { 6 | if (hasOwn(object, key)) { 7 | return false 8 | } 9 | } 10 | return true 11 | } 12 | -------------------------------------------------------------------------------- /packages/test-studio/schemas/empty.js: -------------------------------------------------------------------------------- 1 | export default { 2 | name: 'empty', 3 | type: 'document', 4 | title: 'Empty', 5 | description: 'Do not put content here', 6 | fields: [ 7 | { 8 | name: 'name', 9 | title: 'Name', 10 | type: 'string' 11 | } 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /packages/@sanity/form-builder/src/inputs/BlockEditor-slate/styles/contentStyles/Blockquote.css: -------------------------------------------------------------------------------- 1 | .root { 2 | margin: 0; 3 | padding: 0; 4 | padding: 1em 1em; 5 | margin-left: 2em; 6 | } 7 | 8 | .quote { 9 | composes: blockquote from "part:@sanity/base/theme/typography/text-blocks-style"; 10 | } 11 | -------------------------------------------------------------------------------- /packages/@sanity/imagetool/src/styles/ImageTool.css: -------------------------------------------------------------------------------- 1 | .root { 2 | width: 100%; 3 | height: 100%; 4 | position: relative; 5 | display: block; 6 | } 7 | 8 | .canvas { 9 | display: block; 10 | position: relative; 11 | max-width: 100%; 12 | max-height: 100%; 13 | user-select: none; 14 | } 15 | -------------------------------------------------------------------------------- /packages/@sanity/mutator/src/patch/util.js: -------------------------------------------------------------------------------- 1 | export function targetsToIndicies(targets, accessor) { 2 | const result = [] 3 | targets.forEach(target => { 4 | if (target.isIndexReference()) { 5 | result.push(...target.toIndicies(accessor)) 6 | } 7 | }) 8 | return result.sort() 9 | } 10 | -------------------------------------------------------------------------------- /packages/@sanity/schema/src/sanity/traverseSchema.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import traverseSchema from '../core/traverseSchema' 3 | import coreTypes from './coreTypes' 4 | 5 | export default function traverseSanitySchema(schemaTypes: Array, visitor) { 6 | return traverseSchema(schemaTypes, coreTypes, visitor) 7 | } 8 | -------------------------------------------------------------------------------- /packages/@sanity/vision/src/util/encodeQueryString.js: -------------------------------------------------------------------------------- 1 | const enc = encodeURIComponent 2 | 3 | module.exports = (query, params = {}) => { 4 | return Object.keys(params).reduce( 5 | (qs, param) => `${qs}&${enc(`$${param}`)}=${enc(JSON.stringify(params[param]))}`, 6 | `?query=${enc(query)}` 7 | ) 8 | } 9 | -------------------------------------------------------------------------------- /packages/@sanity/vision/src/util/tryParseParams.js: -------------------------------------------------------------------------------- 1 | const tryParseParams = val => { 2 | try { 3 | return val ? JSON.parse(val) : {} 4 | } catch (err) { 5 | err.message = `Parameters are not valid JSON:\n\n${err.message}` 6 | return err 7 | } 8 | } 9 | 10 | export default tryParseParams 11 | -------------------------------------------------------------------------------- /packages/example-studio/plugins/dark-theme/sanity.json: -------------------------------------------------------------------------------- 1 | { 2 | "paths": { 3 | "source": "./src", 4 | "compiled": "./lib" 5 | }, 6 | "parts": [ 7 | { 8 | "implements": "part:@sanity/base/theme/variables/override-style", 9 | "path": "variables.css" 10 | } 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /packages/test-studio/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | 5 | # Coverage directory used by tools like istanbul 6 | coverage 7 | 8 | # Dependency directories 9 | node_modules 10 | 11 | # Built assets 12 | dist 13 | 14 | # Plugin config 15 | config/@sanity/default-login.json 16 | config/.checksums 17 | -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable import/no-commonjs */ 2 | module.exports = { 3 | presets: [['@babel/env', require('./packages/@sanity/server/src/configs/babel-env-config')]], 4 | plugins: ['lodash', '@babel/plugin-proposal-class-properties'], 5 | babelrcRoots: ['.', ...require('./lerna.json').packages] 6 | } 7 | -------------------------------------------------------------------------------- /packages/@sanity/desk-tool/src/pane/styles/EditorWrapper.css: -------------------------------------------------------------------------------- 1 | @import 'part:@sanity/base/theme/variables-style'; 2 | 3 | .deletedDocument { 4 | composes: flexCenter from 'part:@sanity/base/theme/layout/positioning-style'; 5 | } 6 | 7 | .deletedDocumentInner { 8 | padding: var(--medium-padding); 9 | } 10 | -------------------------------------------------------------------------------- /packages/@sanity/state-router/src/components/index.js: -------------------------------------------------------------------------------- 1 | export {default as RouterProvider} from './RouterProvider' 2 | export {default as Link} from './Link' 3 | export {default as StateLink} from './StateLink' 4 | export {default as IntentLink} from './IntentLink' 5 | export {default as RouteScope} from './RouteScope' 6 | -------------------------------------------------------------------------------- /packages/@sanity/util/test/versionsFixture/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "some-project", 3 | "private": true, 4 | "version": "1.0.0", 5 | "description": "Fake project, used for testing", 6 | "dependencies": { 7 | "@sanity/base": "^0.999.0", 8 | "@sanity/components": "^0.777.33" 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /packages/@sanity/base/src/preview/index.js: -------------------------------------------------------------------------------- 1 | export { 2 | SanityPreview as default, 3 | PreviewSubscriber, 4 | PreviewFields 5 | } from '@sanity/preview/components' 6 | 7 | // deprecated 8 | // deprecated 9 | export {observeForPreview, observeWithPaths, materializePaths, observePaths} from '@sanity/preview' 10 | -------------------------------------------------------------------------------- /packages/@sanity/base/src/styles/layout/box.css: -------------------------------------------------------------------------------- 1 | @import 'part:@sanity/base/theme/variables-style'; 2 | 3 | .root { 4 | margin-bottom: 1rem; 5 | box-sizing: border-box; 6 | max-width: 100%; 7 | background-color: var(--component-bg); 8 | border: 1px solid var(--gray-lighter); 9 | padding: 1rem; 10 | } 11 | -------------------------------------------------------------------------------- /packages/@sanity/cli/src/commands/install/installDependencies.js: -------------------------------------------------------------------------------- 1 | export default (args, context) => { 2 | const {output, workDir, yarn} = context 3 | const {extOptions} = args 4 | const flags = extOptions.offline ? ['--offline'] : [] 5 | return yarn(['install'].concat(flags), {...output, rootDir: workDir}) 6 | } 7 | -------------------------------------------------------------------------------- /packages/@sanity/core/src/util/generateGuid.js: -------------------------------------------------------------------------------- 1 | function s4() { 2 | return Math.floor((1 + Math.random()) * 0x10000) 3 | .toString(16) 4 | .substring(1) 5 | } 6 | 7 | export default function generateGuid() { 8 | return [s4(), s4(), '-', s4(), '-', s4(), '-', s4(), '-', s4(), s4(), s4()].join('') 9 | } 10 | -------------------------------------------------------------------------------- /packages/@sanity/form-builder/src/inputs/BlockEditor-slate/createSpanNode.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import FormBuilderSpan from './FormBuilderSpan' 3 | 4 | export default function createSpanNode(type) { 5 | return function SpanNode(props) { 6 | return 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /packages/@sanity/generate-help-url/test/generate-help-url.test.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable id-length */ 2 | const test = require('tape') 3 | const generateHelpUrl = require('..') 4 | 5 | test('should generate valid url', t => { 6 | t.equals(generateHelpUrl('foo-bar'), 'https://docs.sanity.io/help/foo-bar') 7 | t.end() 8 | }) 9 | -------------------------------------------------------------------------------- /packages/@sanity/server/src/browser/entry.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line import/no-unassigned-import 2 | import 'symbol-observable' 3 | import React from 'react' 4 | import ReactDOM from 'react-dom' 5 | import Root from 'part:@sanity/base/sanity-root' 6 | 7 | ReactDOM.render(, document.getElementById('sanity')) 8 | -------------------------------------------------------------------------------- /packages/example-studio/schemas/localeString.js: -------------------------------------------------------------------------------- 1 | import {SUPPORTED_LANGUAGES} from './languages' 2 | 3 | export default { 4 | type: 'object', 5 | name: 'localeString', 6 | fields: SUPPORTED_LANGUAGES.map(lang => ({ 7 | name: lang.id, 8 | type: 'string', 9 | title: lang.title, 10 | })) 11 | } 12 | -------------------------------------------------------------------------------- /packages/@sanity/block-tools/test/tests/HtmlDeserializer/blockTags/input.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |

Paragraph

4 |

H1

5 |

H2

6 |

H3

7 |

H4

8 |
H5
9 |
H6
10 |
Blockquote
11 | 12 | 13 | -------------------------------------------------------------------------------- /packages/@sanity/components/src/lists/default/List.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import React from 'react' 3 | import styles from '../styles/DefaultList.css' 4 | import classNames from 'classnames' 5 | 6 | export default function DefaultList(props) { 7 | return
    8 | } 9 | -------------------------------------------------------------------------------- /packages/@sanity/core/src/util/getStreamForUri.js: -------------------------------------------------------------------------------- 1 | import getUri from 'get-uri' 2 | 3 | export default uri => 4 | new Promise((resolve, reject) => { 5 | getUri(uri, (err, stream) => { 6 | if (err) { 7 | reject(err) 8 | } else { 9 | resolve(stream) 10 | } 11 | }) 12 | }) 13 | -------------------------------------------------------------------------------- /packages/@sanity/export/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | 5 | # Coverage directory used by tools like istanbul 6 | coverage 7 | 8 | # Grunt intermediate storage 9 | .grunt 10 | 11 | # Dependency directories 12 | node_modules 13 | 14 | # Compiled code 15 | lib 16 | 17 | # Dev-fixtures 18 | moviedb.ndjson 19 | -------------------------------------------------------------------------------- /packages/@sanity/import/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | 5 | # Coverage directory used by tools like istanbul 6 | coverage 7 | 8 | # Grunt intermediate storage 9 | .grunt 10 | 11 | # Dependency directories 12 | node_modules 13 | 14 | # Compiled code 15 | lib 16 | 17 | # Dev-fixtures 18 | moviedb.ndjson 19 | -------------------------------------------------------------------------------- /packages/@sanity/import/test/fixtures/mock-assets.js: -------------------------------------------------------------------------------- 1 | module.exports = url => { 2 | const docs = [] 3 | for (let i = 1; i <= 60; i++) { 4 | docs.push({ 5 | documentId: `doc_${i}`, 6 | path: 'some.path', 7 | url: url, 8 | type: 'image' 9 | }) 10 | } 11 | 12 | return docs 13 | } 14 | -------------------------------------------------------------------------------- /packages/@sanity/plugin-loader/test/versionsFixture/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "some-project", 3 | "private": true, 4 | "version": "1.0.0", 5 | "description": "Fake project, used for testing", 6 | "dependencies": { 7 | "@sanity/base": "^0.999.0", 8 | "@sanity/components": "^0.777.33" 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /packages/@sanity/server/src/util/applyStaticLoaderFix.js: -------------------------------------------------------------------------------- 1 | import {get} from 'lodash' 2 | 3 | // In webpack 3 we don't actually need the fix, but keep the API around for compatibility 4 | const applyStaticLoaderFix = wpConfig => { 5 | return get(wpConfig, 'module.rules', []) 6 | } 7 | 8 | export default applyStaticLoaderFix 9 | -------------------------------------------------------------------------------- /packages/@sanity/state-router/test/_util/test.js: -------------------------------------------------------------------------------- 1 | const tap = require('tap') 2 | 3 | module.exports = function test(name, options, testFn) { 4 | if (typeof options === 'function') { 5 | testFn = options 6 | options = {} 7 | } 8 | tap.test(name, Object.assign({}, {autoend: true}, options), testFn) 9 | } 10 | -------------------------------------------------------------------------------- /packages/@sanity/components/src/panes/styles/renderFunctions.css: -------------------------------------------------------------------------------- 1 | .root { 2 | composes: functions from './DefaultPane.css'; 3 | } 4 | 5 | .button { 6 | composes: functionsButton from './DefaultPane.css'; 7 | display: block; 8 | } 9 | 10 | .text { 11 | composes: functionsButtonText from './DefaultPane.css'; 12 | } 13 | -------------------------------------------------------------------------------- /packages/@sanity/export/src/rejectOnApiError.js: -------------------------------------------------------------------------------- 1 | const miss = require('mississippi') 2 | 3 | module.exports = miss.through.obj((doc, enc, callback) => { 4 | if (doc.error && doc.statusCode) { 5 | callback(new Error([doc.statusCode, doc.error].join(': '))) 6 | return 7 | } 8 | 9 | callback(null, doc) 10 | }) 11 | -------------------------------------------------------------------------------- /packages/@sanity/import-cli/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | 5 | # Coverage directory used by tools like istanbul 6 | coverage 7 | 8 | # Grunt intermediate storage 9 | .grunt 10 | 11 | # Dependency directories 12 | node_modules 13 | 14 | # Compiled code 15 | lib 16 | 17 | # Dev-fixtures 18 | moviedb.ndjson 19 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | ; editorconfig.org 2 | root = true 3 | charset= utf8 4 | 5 | [*] 6 | end_of_line = lf 7 | insert_final_newline = true 8 | trim_trailing_whitespace = true 9 | indent_style = space 10 | indent_size = 2 11 | 12 | [*.md] 13 | trim_trailing_whitespace = false 14 | 15 | [*.snap] 16 | trim_trailing_whitespace = false 17 | -------------------------------------------------------------------------------- /packages/@sanity/client/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | [ 4 | "@babel/preset-env", 5 | { 6 | "targets": { 7 | "ie": "9" 8 | } 9 | } 10 | ] 11 | ], 12 | "env": { 13 | "test": { 14 | "plugins": [ 15 | "istanbul" 16 | ] 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /packages/@sanity/code-input/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | *.log 3 | 4 | # Compiled files 5 | lib 6 | 7 | # Coverage directories used by tools like istanbul 8 | coverage 9 | .nyc_output 10 | 11 | # Dependency directories 12 | node_modules 13 | 14 | # UMD bundle 15 | umd 16 | 17 | # Lockfiles 18 | yarn.lock 19 | package-lock.json 20 | -------------------------------------------------------------------------------- /packages/@sanity/color-input/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | *.log 3 | 4 | # Compiled files 5 | lib 6 | 7 | # Coverage directories used by tools like istanbul 8 | coverage 9 | .nyc_output 10 | 11 | # Dependency directories 12 | node_modules 13 | 14 | # UMD bundle 15 | umd 16 | 17 | # Lockfiles 18 | yarn.lock 19 | package-lock.json 20 | -------------------------------------------------------------------------------- /packages/@sanity/date-input/sanity.json: -------------------------------------------------------------------------------- 1 | { 2 | "parts": [ 3 | { 4 | "implements": "part:@sanity/form-builder/input/rich-date", 5 | "path": "./index.js" 6 | }, 7 | { 8 | "implements": "part:@sanity/form-builder/input/legacy-date/schema", 9 | "path": "./schema" 10 | } 11 | 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /packages/@sanity/document-window/src/Constants.js: -------------------------------------------------------------------------------- 1 | const isNode = require('detect-node') 2 | 3 | module.exports = { 4 | FRONT: 'front', 5 | REAR: 'rear', 6 | 7 | ASCENDING: 'asc', 8 | DESCENDING: 'desc', 9 | 10 | DEFAULT_DEBOUNCE_MS: isNode ? 0 : 100, 11 | DEFAULT_LIMIT: 50, 12 | DEFAULT_BUFFER_FACTOR: 3 13 | } 14 | -------------------------------------------------------------------------------- /packages/@sanity/form-builder/examples/undo/sanity.json: -------------------------------------------------------------------------------- 1 | { 2 | "server": { 3 | "hostname": "0.0.0.0" 4 | }, 5 | "plugins": [ 6 | "@sanity/base", 7 | "@sanity/components" 8 | ], 9 | "parts": [ 10 | { 11 | "implements": "part:@sanity/base/root", 12 | "path": "./Main" 13 | } 14 | ] 15 | } 16 | -------------------------------------------------------------------------------- /packages/@sanity/form-builder/src/inputs/BlockEditor-slate/constants.js: -------------------------------------------------------------------------------- 1 | export const BLOCK_DEFAULT_STYLE = 'normal' 2 | export const SLATE_SPAN_TYPE = 'span' 3 | export const SLATE_DEFAULT_BLOCK = Object.freeze({ 4 | kind: 'block', 5 | type: 'contentBlock', 6 | data: { 7 | style: BLOCK_DEFAULT_STYLE 8 | } 9 | }) 10 | -------------------------------------------------------------------------------- /packages/@sanity/schema/src/legacy/types/document.js: -------------------------------------------------------------------------------- 1 | import {ObjectType} from './object' 2 | 3 | const DOCUMENT_CORE = { 4 | name: 'document', 5 | type: null, 6 | jsonType: 'object' 7 | } 8 | 9 | export const DocumentType = { 10 | get() { 11 | return DOCUMENT_CORE 12 | }, 13 | extend: ObjectType.extend 14 | } 15 | -------------------------------------------------------------------------------- /packages/example-studio/schemas/localeBlockContent.js: -------------------------------------------------------------------------------- 1 | import {SUPPORTED_LANGUAGES} from './languages' 2 | 3 | export default { 4 | name: 'localeBlockContent', 5 | type: 'object', 6 | fields: SUPPORTED_LANGUAGES.map(lang => ({ 7 | title: lang.title, 8 | name: lang.id, 9 | type: 'blockContent' 10 | })) 11 | } 12 | -------------------------------------------------------------------------------- /packages/@sanity/components/src/lists/default/ListItem.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import React from 'react' 3 | import styles from '../styles/DefaultListItem.css' 4 | import classNames from 'classnames' 5 | 6 | export default function CoreListItem(props: any) { 7 | return
  • 8 | } 9 | -------------------------------------------------------------------------------- /packages/@sanity/components/src/utilities/styles/ScrollContainer.css: -------------------------------------------------------------------------------- 1 | .scrollContainer { 2 | /* transform: translateZ(0); Prevents repaint, but commented out because it destroys fixed position on children */ 3 | position: absolute; 4 | top: 0; 5 | left: 0; 6 | height: 100%; 7 | width: 100%; 8 | overflow: overlay; 9 | } 10 | -------------------------------------------------------------------------------- /packages/@sanity/desk-tool/src/pane/styles/enhanceWithAvailableHeight.css: -------------------------------------------------------------------------------- 1 | @import 'part:@sanity/base/theme/variables-style'; 2 | 3 | .root { 4 | @media (--screen-medium) { 5 | position: absolute; 6 | top: 0; 7 | left: 0; 8 | bottom: 0; 9 | right: 0; 10 | width: 100%; 11 | height: 100%; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /packages/@sanity/form-builder/examples/schema-testbed/components/custom/MyCustomFileInput.js: -------------------------------------------------------------------------------- 1 | import {FileInput} from '../../../../src' 2 | import {mockUploadFile, mockMaterializeReference} from './mock/uploader' 3 | 4 | export default FileInput.create({ 5 | upload: mockUploadFile, 6 | materializeReference: mockMaterializeReference 7 | }) 8 | -------------------------------------------------------------------------------- /packages/@sanity/google-maps-input/README.md: -------------------------------------------------------------------------------- 1 | # @sanity/google-maps-input 2 | 3 | Sanity plugin providing input handlers for geo-related input types using Google Maps 4 | 5 | 6 | ## Example app 7 | 8 | First write a valid Google Maps API key into ``./example/config/@sanity/google-maps-input.json`` 9 | 10 | Then ``npm start`` 11 | -------------------------------------------------------------------------------- /packages/@sanity/mutator/src/jsonpath/extractWithPath.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import extractAccessors from './extractAccessors' 3 | 4 | export default function extractWithPath(path: string, value: Object): Array { 5 | const accessors = extractAccessors(path, value) 6 | return accessors.map(acc => ({path: acc.path, value: acc.get()})) 7 | } 8 | -------------------------------------------------------------------------------- /packages/@sanity/resolver/src/removeDuplicatePlugins.js: -------------------------------------------------------------------------------- 1 | export default function removeDuplicatePlugins(plugins) { 2 | const paths = [] 3 | return plugins.filter(plugin => { 4 | if (paths.indexOf(plugin.path) !== -1) { 5 | return false 6 | } 7 | 8 | paths.push(plugin.path) 9 | return true 10 | }) 11 | } 12 | -------------------------------------------------------------------------------- /packages/@sanity/client/src/http/queryString.js: -------------------------------------------------------------------------------- 1 | module.exports = params => { 2 | const qs = [] 3 | for (const key in params) { 4 | if (params.hasOwnProperty(key)) { 5 | qs.push(`${encodeURIComponent(key)}=${encodeURIComponent(params[key])}`) 6 | } 7 | } 8 | 9 | return qs.length > 0 ? `?${qs.join('&')}` : '' 10 | } 11 | -------------------------------------------------------------------------------- /packages/@sanity/client/src/users/usersClient.js: -------------------------------------------------------------------------------- 1 | const assign = require('object-assign') 2 | 3 | function UsersClient(client) { 4 | this.client = client 5 | } 6 | 7 | assign(UsersClient.prototype, { 8 | getById(id) { 9 | return this.client.request({uri: `/users/${id}`}) 10 | } 11 | }) 12 | 13 | module.exports = UsersClient 14 | -------------------------------------------------------------------------------- /packages/@sanity/components/src/lists/grid/GridItem.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import cx from 'classnames' 3 | import styles from './styles/GridItem.css' 4 | 5 | export default function GridItem(props: {className: string}) { 6 | const {className, ...rest} = props 7 | return
  • 8 | } 9 | -------------------------------------------------------------------------------- /packages/@sanity/default-layout/example/authFetcher.js: -------------------------------------------------------------------------------- 1 | export default { 2 | logout() { 3 | return Promise.resolve() 4 | }, 5 | getCurrentUser() { 6 | return Promise.resolve({ 7 | name: 'Catty Mc. Catface', 8 | profileImage: 'https://api.adorable.io/avatars/100/abott@adorable.io.png' 9 | }) 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /packages/@sanity/export/src/filterDrafts.js: -------------------------------------------------------------------------------- 1 | const miss = require('mississippi') 2 | 3 | const isDraft = doc => doc && doc._id && doc._id.indexOf('drafts.') === 0 4 | 5 | module.exports = miss.through.obj((doc, enc, callback) => { 6 | if (isDraft(doc)) { 7 | return callback() 8 | } 9 | 10 | return callback(null, doc) 11 | }) 12 | -------------------------------------------------------------------------------- /packages/@sanity/form-builder/examples/quickstart/sanity.json: -------------------------------------------------------------------------------- 1 | { 2 | "server": { 3 | "hostname": "0.0.0.0" 4 | }, 5 | "plugins": [ 6 | "@sanity/base", 7 | "@sanity/components" 8 | ], 9 | "parts": [ 10 | { 11 | "implements": "part:@sanity/base/root", 12 | "path": "./Main" 13 | } 14 | ] 15 | } 16 | -------------------------------------------------------------------------------- /packages/@sanity/form-builder/examples/schema-testbed/components/custom/MyCustomImageInput.js: -------------------------------------------------------------------------------- 1 | import {ImageInput} from '../../../../src' 2 | import {mockUploadImage, mockMaterializeReference} from './mock/uploader' 3 | 4 | export default ImageInput.create({ 5 | upload: mockUploadImage, 6 | materializeReference: mockMaterializeReference 7 | }) 8 | -------------------------------------------------------------------------------- /packages/@sanity/form-builder/src/inputs/BlockEditor-slate/toolbar/styles/AnnotationButton.css: -------------------------------------------------------------------------------- 1 | .root { 2 | display: inline-block; 3 | } 4 | 5 | .iconContainer { 6 | transform: scale(1.5); 7 | } 8 | 9 | .deleteIcon { 10 | position: absolute; 11 | width: 100%; 12 | text-align: center; 13 | transform: rotate(20deg); 14 | } 15 | -------------------------------------------------------------------------------- /packages/@sanity/base/src/styles/typography/code.css: -------------------------------------------------------------------------------- 1 | @import 'part:@sanity/base/theme/variables/typography-style'; 2 | @import 'part:@sanity/base/theme/variables/code-style'; 3 | 4 | .root { 5 | background-color: var(--code-bg); 6 | line-height: 17px; 7 | font-size: 13px; 8 | font-family: monospace; 9 | white-space: pre-wrap; 10 | } 11 | -------------------------------------------------------------------------------- /packages/@sanity/base/test/init.js: -------------------------------------------------------------------------------- 1 | import chai from 'chai' 2 | import chaiAsPromised from 'chai-as-promised' 3 | import pluginLoader from '@sanity/plugin-loader' 4 | 5 | pluginLoader({ 6 | overrides: { 7 | 'config:sanity': [{api: {projectId: 'abc123', dataset: 'hei'}}] 8 | } 9 | }) 10 | 11 | chai.should() 12 | chai.use(chaiAsPromised) 13 | -------------------------------------------------------------------------------- /packages/@sanity/block-tools/test/tests/HtmlDeserializer/customRules/input.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
    const foo = 'bar'
    4 |
    5 |

    Quote with emphasis

    6 | Emphasis! 7 |
    8 |

    9 | 10 | 11 | -------------------------------------------------------------------------------- /packages/@sanity/cli/src/prompters/cliPrompter.js: -------------------------------------------------------------------------------- 1 | import inquirer from 'inquirer' 2 | 3 | export default {prompt} 4 | 5 | function prompt(questions) { 6 | return inquirer.prompt(questions) 7 | } 8 | 9 | prompt.Separator = inquirer.Separator 10 | prompt.single = question => prompt([{...question, name: 'value'}]).then(answers => answers.value) 11 | -------------------------------------------------------------------------------- /packages/@sanity/components/src/labels/styles/DefaultLabel.css: -------------------------------------------------------------------------------- 1 | .root { 2 | display: block; 3 | } 4 | 5 | .level_1 { 6 | composes: headingLevel_1 from 'part:@sanity/base/theme/typography/forms-style'; 7 | } 8 | 9 | .level_2, 10 | .level_3, 11 | .level_4 { 12 | composes: label from 'part:@sanity/base/theme/typography/forms-style'; 13 | } 14 | -------------------------------------------------------------------------------- /packages/@sanity/desk-tool/src/components/styles/ReferringDocumentsList.css: -------------------------------------------------------------------------------- 1 | 2 | .root { 3 | composes: root from 'part:@sanity/components/lists/default-style'; 4 | } 5 | 6 | .item { 7 | composes: lineBetween from 'part:@sanity/components/lists/default-item-style'; 8 | padding: 1px 0; 9 | } 10 | 11 | .link { 12 | color: inherit; 13 | } 14 | -------------------------------------------------------------------------------- /packages/@sanity/form-builder/src/inputs/BlockEditor-slate/createBlockNode.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import FormBuilderBlock from './FormBuilderBlock' 3 | 4 | export default function createBlockNode(type, onPatch) { 5 | return function BlockNode(props) { 6 | return 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /packages/@sanity/mutator/src/jsonpath/index.js: -------------------------------------------------------------------------------- 1 | import Matcher from './Matcher' 2 | import Expression from './Expression' 3 | import extract from './extract' 4 | import extractWithPath from './extractWithPath' 5 | import arrayToJSONMatchPath from './arrayToJSONMatchPath' 6 | 7 | export {Matcher, Expression, extract, extractWithPath, arrayToJSONMatchPath} 8 | -------------------------------------------------------------------------------- /packages/@sanity/storybook/src/addons/Center.js: -------------------------------------------------------------------------------- 1 | import React from 'react' // eslint-disable-line 2 | 3 | const styles = { 4 | position: 'absolute', 5 | top: '50%', 6 | left: '50%', 7 | border: '10px solid red' 8 | } 9 | 10 | const CenterDecorator = story =>
    {story()}
    11 | 12 | export default CenterDecorator 13 | -------------------------------------------------------------------------------- /packages/@sanity/vision/src/VisionTool.js: -------------------------------------------------------------------------------- 1 | import {route} from 'part:@sanity/base/router' 2 | import SanityVision from './SanityVision' 3 | import VisionIcon from './components/VisionIcon' 4 | 5 | export default { 6 | router: route('/*'), 7 | name: 'vision', 8 | title: 'Vision', 9 | icon: VisionIcon, 10 | component: SanityVision 11 | } 12 | -------------------------------------------------------------------------------- /packages/@sanity/block-tools/test/tests/HtmlDeserializer/decorators/input.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |

    4 | Strong text but 5 | this is also emphasized and 6 | striked 7 | 8 | 9 | Just emphasized 10 |

    11 | 12 | 13 | -------------------------------------------------------------------------------- /packages/@sanity/desk-tool/src/pane/styles/TypePane.css: -------------------------------------------------------------------------------- 1 | @import 'part:@sanity/base/theme/variables-style'; 2 | 3 | .root { 4 | display: block; 5 | } 6 | 7 | .list { 8 | composes: resetList from 'part:@sanity/base/theme/layout/helpers'; 9 | } 10 | 11 | .item { 12 | composes: resetListItem from 'part:@sanity/base/theme/layout/helpers'; 13 | } 14 | -------------------------------------------------------------------------------- /packages/@sanity/form-builder/examples/schema-testbed/components/styles/SelectType.css: -------------------------------------------------------------------------------- 1 | @import './shared.css'; 2 | 3 | .root { 4 | background-color: #fafafa; 5 | padding: 20px; 6 | } 7 | 8 | li.schema { 9 | list-style-type: none; 10 | } 11 | 12 | li.type { 13 | list-style-type: none; 14 | display: inline-block; 15 | padding: 5px; 16 | } 17 | -------------------------------------------------------------------------------- /packages/@sanity/form-builder/src/inputs/ArrayInput/styles/ConfirmButton.css: -------------------------------------------------------------------------------- 1 | @import 'part:@sanity/base/theme/variables-style'; 2 | 3 | .root { 4 | display: inline-block; 5 | position: relative; 6 | 7 | @nest &:hover { 8 | color: var(--state-danger-color); 9 | } 10 | } 11 | 12 | .wrapper { 13 | padding: var(--small-padding); 14 | } 15 | -------------------------------------------------------------------------------- /packages/@sanity/form-builder/src/inputs/BlockEditor-slate/createInlineNode.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import FormBuilderInline from './FormBuilderInline' 3 | 4 | export default function createInlineNode(type, onPatch) { 5 | return function InlineNode(props) { 6 | return 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /packages/@sanity/vision/src/util/parseApiQueryString.js: -------------------------------------------------------------------------------- 1 | export default function parseApiQueryString(qs) { 2 | const params = Object.keys(qs) 3 | .filter(key => key[0] === '$') 4 | .reduce((keep, key) => { 5 | keep[key.substr(1)] = JSON.parse(qs[key]) 6 | return keep 7 | }, {}) 8 | 9 | return {query: qs.query, params} 10 | } 11 | -------------------------------------------------------------------------------- /packages/@sanity/components/src/lists/sortable/DragHandle.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import React from 'react' 3 | import DragBarsIcon from 'part:@sanity/base/bars-icon' 4 | import {createDragHandle} from '../sortable-factories' 5 | 6 | export default createDragHandle(props => ( 7 | 8 | 9 | 10 | )) 11 | -------------------------------------------------------------------------------- /packages/@sanity/core/src/commands/check/checkCommand.js: -------------------------------------------------------------------------------- 1 | import sanityCheck from '@sanity/check' 2 | 3 | export default { 4 | name: 'check', 5 | signature: '[DIRECTORY]', 6 | description: 'Performs a Sanity check', 7 | action: (args, context) => 8 | sanityCheck({ 9 | dir: args.argsWithoutOptions[0] || context.workDir 10 | }) 11 | } 12 | -------------------------------------------------------------------------------- /packages/@sanity/form-builder/TODO.md: -------------------------------------------------------------------------------- 1 | - Change patch format to match gradient 2 | - Show validation errors 3 | - Factor out css modules (provide as separate export, maybe) 4 | - Implement configurable widgets, e.g. map marker, reference picker 5 | - Focus handling is currently only implemented for String input 6 | - References: 7 | 8 | - Define a schema on inputs 9 | -------------------------------------------------------------------------------- /packages/@sanity/mutator/test/extractWithPath.test.js: -------------------------------------------------------------------------------- 1 | import {test} from 'tap' 2 | import {extractWithPath} from '../src/jsonpath' 3 | 4 | test('basic extraction', tap => { 5 | tap.same(extractWithPath('..[_weak == true]._ref', {reference: {_ref: '123', _weak: true}}), [ 6 | {path: ['reference', '_ref'], value: '123'} 7 | ]) 8 | tap.end() 9 | }) 10 | -------------------------------------------------------------------------------- /packages/@sanity/google-maps-input/sanity.json: -------------------------------------------------------------------------------- 1 | { 2 | "paths": { 3 | "source": "./src", 4 | "compiled": "./lib" 5 | }, 6 | 7 | "parts": [ 8 | { 9 | "name": "part:@sanity/google-maps-input/input/geopoint", 10 | "implements": "part:@sanity/form-builder/input/geopoint", 11 | "path": "GeopointInput.js" 12 | } 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /scripts/transformPkgs.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-sync */ 2 | const fs = require('fs') 3 | const readPackages = require('./readPackages') 4 | 5 | module.exports = function transformPkgs(mapFn) { 6 | readPackages().forEach(pkg => { 7 | const result = mapFn(pkg.content) 8 | fs.writeFileSync(pkg.path, `${JSON.stringify(result, null, 2)}\n`) 9 | }) 10 | } 11 | -------------------------------------------------------------------------------- /packages/@sanity/default-layout/src/components/NotFound.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import {StateLink} from 'part:@sanity/base/router' 3 | 4 | export default function NotFound(props) { 5 | return ( 6 |
    7 |

    Page not found

    8 | {props.children} 9 | Go to index 10 |
    11 | ) 12 | } 13 | -------------------------------------------------------------------------------- /packages/@sanity/document-window/src/sortOrderToOperator.js: -------------------------------------------------------------------------------- 1 | const operators = {asc: '>', desc: '<'} 2 | const inverted = {asc: '<', desc: '>'} 3 | 4 | module.exports = (order, options) => { 5 | const {invert, orEqual} = options 6 | const suffix = orEqual ? '=' : '' 7 | const source = invert ? inverted : operators 8 | return `${source[order]}${suffix}` 9 | } 10 | -------------------------------------------------------------------------------- /packages/@sanity/form-builder/src/inputs/ReferenceInput/styles/ReferenceInput.css: -------------------------------------------------------------------------------- 1 | @import 'part:@sanity/base/theme/variables-style'; 2 | 3 | .weakRefMismatchWarning { 4 | padding: var(--medium-padding); 5 | } 6 | 7 | .hasWarnings { 8 | border: 1px dashed var(--state-warning-color); 9 | } 10 | 11 | .hasWarnings input { 12 | color: var(--legend-color); 13 | } 14 | -------------------------------------------------------------------------------- /packages/@sanity/schema/src/sanity/validation/types/common.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import {warning} from '../createValidationResult' 3 | import {validateTypeName} from '../utils/validateTypeName' 4 | 5 | export default (typeDef, visitorContext) => { 6 | return { 7 | ...typeDef, 8 | _problems: validateTypeName(typeDef.type, visitorContext).filter(Boolean) 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /packages/@sanity/base/src/styles/variables/code.css: -------------------------------------------------------------------------------- 1 | @import 'part:@sanity/base/theme/variables/gray-colors-style'; 2 | 3 | :root { 4 | --code-color: #c7254e; 5 | --code-bg: #f9f2f4; 6 | --kbd-color: #fff; 7 | --kbd-bg: #333; 8 | --pre-bg: #f5f5f5; 9 | --pre-color: var(--gray-dark); 10 | --pre-border-color: #ccc; 11 | --pre-scrollable-max-height: 20em; 12 | } 13 | -------------------------------------------------------------------------------- /packages/@sanity/components/src/previews/CustomPreview.js: -------------------------------------------------------------------------------- 1 | import PropTypes from 'prop-types' 2 | import React from 'react' 3 | 4 | export default class CustomPreview extends React.PureComponent { 5 | static propTypes = { 6 | children: PropTypes.node 7 | } 8 | 9 | render() { 10 | const {children} = this.props 11 | return
    {children}
    12 | } 13 | } 14 | -------------------------------------------------------------------------------- /packages/@sanity/default-layout/src/util/reconfigureClient.js: -------------------------------------------------------------------------------- 1 | import client from 'part:@sanity/base/client' 2 | import {CONFIGURED_SPACES} from './spaces' 3 | 4 | export default function reconfigureClient(routerState) { 5 | const space = CONFIGURED_SPACES.find(sp => sp.name === routerState.space) 6 | if (space && space.api) { 7 | client.config(space.api) 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /packages/@sanity/block-tools/test/tests/converters/blocksToSlateState/decorators/index.js: -------------------------------------------------------------------------------- 1 | import defaultSchema from '../../../../fixtures/defaultSchema' 2 | 3 | const blockContentType = defaultSchema.get('blogPost').fields.find(field => field.name === 'body') 4 | .type 5 | 6 | export default (blockToSlateState, input) => { 7 | return blockToSlateState(input, blockContentType) 8 | } 9 | -------------------------------------------------------------------------------- /packages/@sanity/color-input/src/ColorPickerFields.css: -------------------------------------------------------------------------------- 1 | .fields { 2 | display: flex; 3 | width: 200px; 4 | } 5 | 6 | .single { 7 | flex: 1; 8 | padding-right: 0.5em; 9 | } 10 | 11 | .alpha { 12 | flex: 1; 13 | } 14 | 15 | .double { 16 | flex: 2; 17 | padding-right: 0.5em; 18 | } 19 | 20 | .disableAlpha { 21 | @nest .alpha { 22 | display: none; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /packages/@sanity/components/src/lists/styles/DragHandle.css: -------------------------------------------------------------------------------- 1 | .default { 2 | cursor: ns-resize; 3 | font-size: 1em; 4 | height: 2.5em; 5 | display: inline-block; 6 | opacity: 0.5; 7 | width: 2.5em; 8 | box-sizing: border-box; 9 | padding: 0.5em 0.75em; 10 | border: 1px solid transparent; 11 | z-index: 1; 12 | 13 | &:hover { 14 | opacity: 1; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /packages/@sanity/form-builder/src/utils/is.js: -------------------------------------------------------------------------------- 1 | const PRIMITIVES = ['string', 'number', 'boolean'] 2 | 3 | function is(typeName, type) { 4 | return type.name === typeName || (type.type && is(typeName, type.type)) 5 | } 6 | 7 | export default is 8 | export {is as type} 9 | 10 | export function primitive(type) { 11 | return PRIMITIVES.some(typeName => is(typeName, type)) 12 | } 13 | -------------------------------------------------------------------------------- /packages/@sanity/cli/templates/blog/schemas/category.js: -------------------------------------------------------------------------------- 1 | export default { 2 | name: 'category', 3 | title: 'Category', 4 | type: 'document', 5 | fields: [ 6 | { 7 | name: 'title', 8 | title: 'Title', 9 | type: 'string' 10 | }, 11 | { 12 | name: 'description', 13 | title: 'Description', 14 | type: 'text' 15 | } 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /packages/@sanity/code-input/src/Preview.css: -------------------------------------------------------------------------------- 1 | .root { 2 | position: relative; 3 | 4 | @nest & > h3 { 5 | padding-left: 0.75rem; 6 | } 7 | } 8 | 9 | .aceWrapper { 10 | border-top: 1px solid #ccc; 11 | cursor: default; 12 | } 13 | 14 | .aceWrapper :global(.ace_content) { 15 | padding: 0 0.5rem; 16 | } 17 | 18 | .defaultPreviewContainer { 19 | padding: 0.2em; 20 | } 21 | -------------------------------------------------------------------------------- /packages/@sanity/form-builder/src/inputs/ArrayOfPrimitivesInput/getEmptyValue.js: -------------------------------------------------------------------------------- 1 | export default function getEmptyValue(type) { 2 | switch (type.jsonType) { 3 | case 'string': { 4 | return '' 5 | } 6 | case 'number': { 7 | return 0 8 | } 9 | case 'boolean': { 10 | return false 11 | } 12 | default: 13 | return undefined 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /packages/@sanity/image-url/test/parseAssetId.test.js: -------------------------------------------------------------------------------- 1 | import parseAssetId from '../src/parseAssetId' 2 | 3 | test('throws on invalid document id', () => { 4 | expect(() => parseAssetId('moop')).toThrowErrorMatchingSnapshot() 5 | }) 6 | 7 | test('throws on invalid dimensions', () => { 8 | expect(() => parseAssetId('image-assetId-mooxmoo-png')).toThrowErrorMatchingSnapshot() 9 | }) 10 | -------------------------------------------------------------------------------- /packages/test-studio/src/components/AuthorReferenceInput.css: -------------------------------------------------------------------------------- 1 | .authorGroup { 2 | max-width: 500px; 3 | } 4 | 5 | .authorImage { 6 | display: block; 7 | width: 75px; 8 | height: 75px; 9 | } 10 | 11 | .button { 12 | padding: 0; 13 | margin: 2px; 14 | border: 3px solid transparent; 15 | } 16 | 17 | .activeButton { 18 | composes: button; 19 | border-color: lime; 20 | } 21 | -------------------------------------------------------------------------------- /packages/@sanity/code-input/README.md: -------------------------------------------------------------------------------- 1 | # code-editor 2 | 3 | Ace editor for editing code. 4 | 5 | Use `type: text` and `options.editor = 'code'` 6 | 7 | ## In schema 8 | 9 | ``` 10 | import code from 'part:@sanity/form-builder/input/code/schema' 11 | 12 | { 13 | name: 'myCode', 14 | title: 'Code editor (default)', 15 | description: 'Code editor', 16 | type: 'code' 17 | } 18 | ``` 19 | -------------------------------------------------------------------------------- /packages/@sanity/desk-tool/examples/testbed/config/@sanity/data-aspects.json: -------------------------------------------------------------------------------- 1 | { 2 | "typeOptions": { 3 | "article": { 4 | "displayName": "Article", 5 | "itemDisplayField": "name", 6 | "limit": 100, 7 | "offset": 0 8 | }, 9 | "siteConfig": { 10 | "displayName": "Site configuration", 11 | "itemDisplayField": "title" 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /packages/@sanity/form-builder/src/inputs/OptionsArrayInput/styles/OptionsArrayInput.css: -------------------------------------------------------------------------------- 1 | .error { 2 | font-size: 0.8rem; 3 | padding: 1em; 4 | margin-bottom: 0.5rem; 5 | } 6 | 7 | .itemWrapperVertical { 8 | display: block; 9 | margin-bottom: 0.5rem; 10 | } 11 | 12 | .itemWrapperHorizontal { 13 | display: inline-block; 14 | line-height: 2em; 15 | margin-right: 1em; 16 | } 17 | -------------------------------------------------------------------------------- /packages/@sanity/preview/components.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable import/no-commonjs */ 2 | exports.PreviewFields = require('./lib/components/PreviewFields').default 3 | exports.SanityPreview = require('./lib/components/SanityPreview').default 4 | exports.PreviewSubscriber = require('./lib/components/PreviewSubscriber').default 5 | exports.WithVisibility = require('./lib/components/WithVisibility').default 6 | -------------------------------------------------------------------------------- /packages/@sanity/cli/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | *.log 3 | 4 | # Compiled files 5 | /lib 6 | 7 | # Coverage directory used by tools like istanbul 8 | coverage 9 | 10 | # Dependency directories 11 | node_modules 12 | 13 | # Built vendor files 14 | /vendor 15 | !/vendor/README.md 16 | 17 | # Packed version of Sanity binary 18 | /bin/sanity 19 | 20 | # Dependency of opn module 21 | /bin/xdg-open 22 | -------------------------------------------------------------------------------- /packages/@sanity/desk-tool/src/components/styles/InspectView.css: -------------------------------------------------------------------------------- 1 | @import 'part:@sanity/base/theme/variables-style'; 2 | 3 | .content { 4 | padding: 1rem; 5 | box-sizing: border-box; 6 | width: 80vw; 7 | height: 80vw; 8 | } 9 | 10 | .toolbar { 11 | margin-bottom: 1rem; 12 | } 13 | 14 | .raw { 15 | font: 14px/1.4 Consolas, monospace; 16 | outline-color: var(--brand-primary); 17 | } 18 | -------------------------------------------------------------------------------- /packages/@sanity/block-tools/test/tests/HtmlDeserializer/annotations/input.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |

    4 | I am a strong link 5 | and I am a emphasized link 6 |

    7 |

    8 | I am a totally different link 9 |

    10 | 11 | 12 | -------------------------------------------------------------------------------- /packages/@sanity/components/src/lists/styles/DefaultListItem.css: -------------------------------------------------------------------------------- 1 | @import 'part:@sanity/base/theme/variables-style'; 2 | 3 | .root { 4 | display: block; 5 | margin: 0; 6 | padding: 0; 7 | } 8 | 9 | .lineBetween { 10 | composes: root; 11 | border-bottom: var(--list-border); 12 | padding: var(--small-padding) 0; 13 | 14 | @nest &:last-child { 15 | border-bottom: none; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /packages/@sanity/default-layout/example/LoginDialog.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | function login(e) { 4 | document.location.reload() 5 | } 6 | 7 | export default function LoginModal(props) { 8 | return ( 9 |
    10 |

    Login

    11 | 14 |
    15 | ) 16 | } 17 | -------------------------------------------------------------------------------- /packages/@sanity/form-builder/src/inputs/BlockEditor-slate/styles/InvalidValue.css: -------------------------------------------------------------------------------- 1 | @import 'part:@sanity/base/theme/variables-style'; 2 | 3 | .root { 4 | composes: root from 'part:@sanity/components/fieldsets/default-style'; 5 | padding: var(--medium-padding); 6 | border: 3px dashed var(--state-warning-color); 7 | 8 | @nest & > h3 { 9 | color: var(--state-warning-color); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /packages/@sanity/form-builder/src/typedefs/index.js: -------------------------------------------------------------------------------- 1 | import {Path} from './path' 2 | 3 | export type Type = { 4 | type: Type, 5 | name: string, 6 | title: string, 7 | options: ?Object 8 | } 9 | 10 | export type Reference = { 11 | _type: string, 12 | _ref?: string 13 | } 14 | 15 | export type Marker = { 16 | path: Path, 17 | type: string, 18 | level?: string, 19 | item: any 20 | } 21 | -------------------------------------------------------------------------------- /packages/@sanity/cli/src/util/canLaunchBrowser.js: -------------------------------------------------------------------------------- 1 | const os = require('os') 2 | 3 | module.exports = () => { 4 | const isWindowsOrMac = ['win32', 'darwin'].includes(os.platform()) 5 | if (isWindowsOrMac) { 6 | return true 7 | } 8 | 9 | // eslint-disable-next-line no-process-env 10 | const hasWM = Boolean(process.env.XDG_CURRENT_DESKTOP || process.env.GDMSESSION) 11 | return hasWM 12 | } 13 | -------------------------------------------------------------------------------- /packages/@sanity/components/src/previews/styles/InlinePreview.css: -------------------------------------------------------------------------------- 1 | .root { 2 | display: inline; 3 | } 4 | 5 | .media { 6 | display: inline-block; 7 | width: 1em; 8 | height: 1em; 9 | overflow: hidden; 10 | position: relative; 11 | vertical-align: baseline; 12 | 13 | @nest & img { 14 | object-fit: cover; 15 | } 16 | 17 | @nest & div { 18 | display: inline-block; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /packages/@sanity/components/src/selects/styles/RadioSelect.css: -------------------------------------------------------------------------------- 1 | .root { 2 | display: block; 3 | } 4 | 5 | .vertical { 6 | composes: root; 7 | } 8 | 9 | .horizontal { 10 | composes: root; 11 | 12 | @nest & .radioContainer { 13 | display: flex; 14 | flex-wrap: wrap; 15 | } 16 | } 17 | 18 | .container { 19 | display: block; 20 | } 21 | 22 | .item { 23 | margin-right: 1rem; 24 | } 25 | --------------------------------------------------------------------------------