Giter Site home page Giter Site logo

color-input's People

Contributors

ptimson avatar renovate[bot] avatar semantic-release-bot avatar snorrees avatar stipsan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

color-input's Issues

SyntaxError: The requested module '@sanity/color-input' does not provide an export named 'colorInput' - Studio embed Remix

Hi!

I was using this plugin on a Astro website, but whenever I want to use the plugin in my Remix project where I embed the Studio, it gives me this error

SyntaxError: The requested module '@sanity/color-input' does not provide an export named 'colorInput'

import { colorInput } from '@sanity/color-input'

import { visionTool } from '@sanity/vision'
import { defineConfig, isDev } from 'sanity'
import { deskTool } from 'sanity/desk'
import { defaultDocumentNodeResolver, structure } from '#sanity-desk/index.tsx'
import { schemaTypes } from '#sanity-schema/index.ts'

const devOnlyPlugins = [visionTool()]

export const config = defineConfig({
	dataset: 'production',
	projectId: 'YOUR_PROJECT_ID', // Project id is set dynamically in website cms route.
	name: 'sanity-remix',
	title: 'Sanity Remix',
	schema: {
		types: schemaTypes,
	},
	plugins: [
		deskTool({
			structure: structure,
			defaultDocumentNode: defaultDocumentNodeResolver,
		}),
		colorInput(),
		...(isDev ? devOnlyPlugins : []),
	],
	basePath: ``, // Base path is set dynamically in website cms route.
})

Action Required: Fix Renovate Configuration

There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.

Error type: Cannot find preset's package (config:recommended). Note: this is a nested preset so please contact the preset author if you are unable to fix it yourself.

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.


Using a curated preset maintained by


Sanity: The Composable Content Cloud

Pending Approval

These branches will be created by Renovate only once you click their checkbox below.

  • chore(deps): lock file maintenance

Rate-Limited

These updates are currently rate-limited. Click on a checkbox below to force their creation now.

  • chore(deps): update dependency semantic-release to v23
  • chore(deps): update dependency typescript to v5
  • chore(deps): update linters to v6 (major) (@typescript-eslint/eslint-plugin, @typescript-eslint/parser)
  • fix(deps): Update dependency @sanity/ui to v2
  • ๐Ÿ” Create all rate-limited PRs at once ๐Ÿ”

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

github-actions
.github/workflows/main.yml
  • actions/checkout v4
  • actions/setup-node v4
  • actions/checkout v4
  • actions/setup-node v4
  • actions/checkout v4
  • actions/setup-node v4
npm
package.json
  • @sanity/icons ^2.0.0
  • @sanity/incompatible-plugin ^1.0.4
  • @sanity/ui ^1.0.0
  • lodash ^4.17.21
  • react-color ^2.19.3
  • @commitlint/cli ^17.8.1
  • @commitlint/config-conventional ^17.8.1
  • @sanity/pkg-utils ^2.4.10
  • @sanity/plugin-kit ^3.1.10
  • @sanity/semantic-release-preset ^4.1.6
  • @types/react ^18.2.33
  • @types/react-color ^2.17.9
  • @types/styled-components ^5.1.29
  • @types/tinycolor2 ^1.4.5
  • @typescript-eslint/eslint-plugin ^5.62.0
  • @typescript-eslint/parser ^5.62.0
  • eslint ^8.52.0
  • eslint-config-prettier ^8.10.0
  • eslint-config-sanity ^6.0.0
  • eslint-plugin-prettier ^4.2.1
  • eslint-plugin-react ^7.33.2
  • eslint-plugin-react-hooks ^4.6.0
  • npm-run-all ^4.1.5
  • prettier ^2.8.8
  • prettier-plugin-packagejson ^2.4.6
  • react ^18.2.0
  • react-dom ^18.2.0
  • react-is ^18.2.0
  • rimraf ^5.0.0
  • sanity ^3.19.0
  • semantic-release ^21.1.2
  • styled-components ^5.3.11
  • typescript ^4.9.5
  • react ^18
  • sanity ^3
  • styled-components ^5.2
  • node >=14

  • Check this box to trigger a request for Renovate to run again on this repository

Does not work with [email protected]

Color input suddenly quit working when I upgraded Sanity versions. The studio runs fun but when I go to a document where the color input is being used as a field it crashes.

The error I'm receiving in studio is:
**Unhandled Runtime Error** TypeError: Cannot read properties of undefined (reading 'sanity')

It's throwing a typescript error in my sanity.config.ts

Here is my current package.json:

  "private": true,
  "scripts": {
    "build": "next build",
    "dev": "next",
    "format": "npx prettier --write . --ignore-path .gitignore",
    "lint": "next lint -- --ignore-path .gitignore",
    "lint:fix": "npm run format && npm run lint -- --fix",
    "start": "next start",
    "type-check": "tsc --noEmit"
  },
  "prettier": {
    "semi": false,
    "singleQuote": true
  },
  "dependencies": {
    "@gsid/react-time-ago": "^7.2.5",
    "@marketsystems/nextjs13-appdir-breadcrumbs": "^1.0.4",
    "@portabletext/react": "^3.0.4",
    "@radix-ui/react-checkbox": "^1.0.4",
    "@radix-ui/react-icons": "^1.3.0",
    "@sanity/client": "^6.4.4",
    "@sanity/color-input": "^3.1.0",
    "@sanity/document-internationalization": "^2.0.1",
    "@sanity/image-url": "^1.0.2",
    "@sanity/vision": "^3.15.0",
    "@stitches/react": "^1.2.8",
    "@vercel/og": "^0.5.10",
    "classnames": "^2.3.2",
    "date-fns": "^2.30.0",
    "intl-segmenter-polyfill": "^0.4.4",
    "javascript-time-ago": "^2.5.9",
    "moment-timezone": "^0.5.43",
    "next": "^13.4.13",
    "next-sanity": "^5.2.3",
    "next-sanity-image": "^6.1.0",
    "react": "^18.2.0",
    "react-confetti": "^6.1.0",
    "react-dom": "^18.2.0",
    "react-icons": "^4.10.1",
    "react-share": "^4.4.1",
    "react-social-media-embed": "^2.3.3",
    "sanity": "3.16.7",
    "sanity-plugin-asset-source-unsplash": "^1.1.0",
    "sanity-plugin-internationalized-array": "^1.10.1",
    "styled-components": "^5.3.6",
    "suspend-react": "^0.1.3",
    "swiper": "^10.3.0",
    "swr": "^2.2.0",
    "use-mailchimp-form": "^3.1.0"
  },
  "devDependencies": {
    "@types/node": "20.4.8",
    "@types/react": "18.2.18",
    "autoprefixer": "^10.4.13",
    "eslint": "^8.46.0",
    "eslint-config-next": "13.4.12",
    "eslint-plugin-simple-import-sort": "^10.0.0",
    "postcss": "^8.4.27",
    "prettier": "^3.0.1",
    "prettier-plugin-packagejson": "^2.4.5",
    "prettier-plugin-tailwindcss": "^0.4.1",
    "tailwindcss": "3.3.3",
    "typescript": "5.1.6"
  },
  "engines": {
    "node": ">=16"
  }
}

How to set initialValue on v3 studio?

Hello, I try different values to do this

initialValue: '#000000'
initialValue: {hex: '#000000'},
initialValue: {color: {hex: '#000000'}}

end i got error
image

Disable color picker and only select from predefined colors

Is your feature request related to a problem? Please describe.
I want content editors to stick to the predefined colors so they don't pick colors on the picker that mess up the aesthetic of the page/content.

Describe the solution you'd like
An option to disable the color picker(and input fields) so only the predefined colors are displayed and selectable.

Describe alternatives you've considered
...

Additional context
...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.