-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add vetur auto-completion for
<SanityImage>
and `<SanityConte…
…nt>`
- Loading branch information
Showing
3 changed files
with
154 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
{ | ||
"sanity-content/blocks": { | ||
"type": "array" | ||
}, | ||
"sanity-content/serializers": { | ||
"type": "object" | ||
}, | ||
"sanity-content/render-container-on-single-child": { | ||
"type": "boolean" | ||
}, | ||
"sanity-image/asset-id": { | ||
"type": "string" | ||
}, | ||
"sanity-image/project-id": { | ||
"type": "string" | ||
}, | ||
"sanity-image/dataset": { | ||
"type": "string" | ||
}, | ||
"sanity-image/auto": { | ||
"type": "string", | ||
"description": "Set auto=format to automatically return an image in webp formatting if the browser supports it." | ||
}, | ||
"sanity-image/bg": { | ||
"type": "string", | ||
"description": "Fill in any transparent areas in the image with a color. The string must be resolve to a valid hexadecimal color (RGB, ARGB, RRGGBB, or AARRGGBB). E.g. bg=ff00 for red background with no transparency." | ||
}, | ||
"sanity-image/blur": { | ||
"type": "number|string", | ||
"description": "Blur 0-100." | ||
}, | ||
"sanity-image/crop": { | ||
"type": "string", | ||
"description": "Use with fit=crop to specify how cropping is performed." | ||
}, | ||
"sanity-image/dl": { | ||
"type": "string", | ||
"description": "Configures the headers so that opening this link causes the browser to download the image rather than showing it. The browser will suggest to use the file name you provided." | ||
}, | ||
"sanity-image/dpr": { | ||
"type": "number|string", | ||
"description": "Specifies device pixel ratio scaling factor. From 1 to 3." | ||
}, | ||
"sanity-image/fit": { | ||
"type": "string", | ||
"description": "Affects how the image is handled when you specify target dimensions" | ||
}, | ||
"sanity-image/flip": { | ||
"type": "string", | ||
"description": "Flipping. Flip image horizontally, vertically or both. Possible values: h, v, hv" | ||
}, | ||
"sanity-image/fm": { | ||
"type": "string", | ||
"description": "Convert image to jpg, pjpg, png, or webp." | ||
}, | ||
"sanity-image/fp-x": { | ||
"type": "number|string", | ||
"description": "Focal Point X. Specify a center point to focus on when cropping the image. Values from 0.0 to 1.0 in fractions of the image dimensions. (See crop)" | ||
}, | ||
"sanity-image/fp-y": { | ||
"type": "number|string", | ||
"description": "Focal Point Y. Specify a center point to focus on when cropping the image. Values from 0.0 to 1.0 in fractions of the image dimensions. (See crop)" | ||
}, | ||
"sanity-image/h": { | ||
"type": "number|string", | ||
"description": "Height of the image in pixels. Scales the image to be that tall." | ||
}, | ||
"sanity-image/invert": { | ||
"type": "boolean", | ||
"description": "Invert the image." | ||
}, | ||
"sanity-image/max-h": { | ||
"type": "number|string", | ||
"description": "Maximum height. Specifies size limits giving the backend some freedom in picking a size according to the source image aspect ratio." | ||
}, | ||
"sanity-image/max-w": { | ||
"type": "number|string", | ||
"description": "Maximum width. Specifies size limits giving the backend some freedom in picking a size according to the source image aspect ratio." | ||
}, | ||
"sanity-image/min-h": { | ||
"type": "number|string", | ||
"description": "Minimum height. Specifies size limits giving the backend some freedom in picking a size according to the source image aspect ratio." | ||
}, | ||
"sanity-image/min-w": { | ||
"type": "number|string", | ||
"description": "Minimum width. Specifies size limits giving the backend some freedom in picking a size according to the source image aspect ratio." | ||
}, | ||
"sanity-image/or": { | ||
"type": "number|string", | ||
"description": "Orientation. Possible values: 0, 90, 180 or 270.Rotate the image in 90 degree increments." | ||
}, | ||
"sanity-image/q": { | ||
"type": "number|string", | ||
"description": "Quality 0-100. Specify the compression quality (where applicable)." | ||
}, | ||
"sanity-image/rect": { | ||
"type": "string", | ||
"description": "Crop the image according to the provided coordinates (in pixel units of the source image)." | ||
}, | ||
"sanity-image/sat": { | ||
"type": "number|string", | ||
"description": "Saturation. Currently the asset pipeline only supports sat=-100, which renders the image with grayscale colors. Support for more levels of saturation is planned for later." | ||
}, | ||
"sanity-image/sharpen": { | ||
"type": "number|string", | ||
"description": "Sharpen 0-100." | ||
}, | ||
"sanity-image/w": { | ||
"type": "number|string", | ||
"description": "Width of the image in pixels. Scales the image to be that wide." | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{ | ||
"sanity-content": { | ||
"attributes": ["blocks", "serializers", "render-container-on-single-child"], | ||
"description": "A global component that can turn portable text into HTML. It is a lightweight functional component without an instance." | ||
}, | ||
"sanity-image": { | ||
"attributes": [ | ||
"asset-id", | ||
"project-id", | ||
"dataset", | ||
"auto", | ||
"bg", | ||
"blur", | ||
"crop", | ||
"dl", | ||
"dpr", | ||
"fit", | ||
"flip", | ||
"fm", | ||
"fp-x", | ||
"fp-y", | ||
"h", | ||
"invert", | ||
"max-h", | ||
"max-w", | ||
"min-h", | ||
"min-w", | ||
"or", | ||
"q", | ||
"rect", | ||
"sat", | ||
"sharpen", | ||
"w" | ||
], | ||
"description": "A global component to assist with auto-generating your image URLs. It is a lightweight functional component that simply turns the props into a valid image URL." | ||
} | ||
} |