@plasmicpkgs/plasmic-sanity-io 1.0.154 → 1.0.156
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +52 -0
- package/dist/index.d.ts +52 -7
- package/dist/index.js +531 -5
- package/dist/index.mjs +496 -0
- package/package.json +12 -13
- package/dist/plasmic-sanity-io.cjs.development.js +0 -900
- package/dist/plasmic-sanity-io.cjs.development.js.map +0 -1
- package/dist/plasmic-sanity-io.cjs.production.min.js +0 -2
- package/dist/plasmic-sanity-io.cjs.production.min.js.map +0 -1
- package/dist/plasmic-sanity-io.esm.js +0 -886
- package/dist/plasmic-sanity-io.esm.js.map +0 -1
- package/dist/sanity.d.ts +0 -43
- package/dist/utils.d.ts +0 -4
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"plasmic-sanity-io.esm.js","sources":["../src/utils.ts","../src/sanity.tsx","../src/index.tsx"],"sourcesContent":["export const filterParameters = [\n {\n value: '==',\n label: 'Is'\n },\n {\n value: '!=',\n label: 'Is not'\n }, {\n value: '>',\n label: 'Greater than'\n }, {\n value: '<',\n label: 'Less than'\n }, {\n value: '<=',\n label: 'Less than or equal'\n },\n {\n value: '>=',\n label: 'Greater than or equal '\n },\n]\n","import {\n ComponentMeta,\n DataProvider,\n GlobalContextMeta,\n repeatedElement,\n useSelector,\n} from \"@plasmicapp/host\";\nimport { usePlasmicQueryData } from \"@plasmicapp/query\";\nimport { createClient } from \"@sanity/client\";\nimport imageUrlBuilder from \"@sanity/image-url\";\nimport { pascalCase } from \"change-case\";\nimport get from \"dlv\";\nimport React, { ReactNode, useContext } from \"react\";\nimport { filterParameters } from \"./utils\";\n\nexport function ensure<T>(x: T | null | undefined): T {\n if (x === null || x === undefined) {\n throw new Error(`Value must not be undefined or null`);\n } else {\n return x;\n }\n}\n\nconst modulePath = \"@plasmicpkgs/plasmic-sanity-io\";\n\nconst makeDataProviderName = (docType: string) =>\n `currentSanity${pascalCase(docType)}Item`;\n\ninterface SanityCredentialsProviderProps {\n projectId?: string;\n dataset?: string;\n apiVersion?: string;\n token?: string;\n useCdn?: boolean;\n}\n\nfunction makeSanityClient(creds: SanityCredentialsProviderProps) {\n const sanity = createClient({\n projectId: creds.projectId,\n dataset: creds.dataset,\n apiVersion: creds.apiVersion ? creds.apiVersion : \"v1\",\n token: creds.token,\n useCdn: creds.useCdn,\n });\n return sanity;\n}\n\nconst CredentialsContext = React.createContext<\n SanityCredentialsProviderProps | undefined\n>(undefined);\n\nexport const sanityCredentialsProviderMeta: GlobalContextMeta<SanityCredentialsProviderProps> =\n {\n name: \"SanityCredentialsProvider\",\n displayName: \"Sanity Credentials Provider\",\n description: `Get your project ID, dataset, and token [here](https://www.sanity.io/manage).\n\nAdd 'https://host.plasmicdev.com' (or your app host origin) as an authorized host in the CORS origins section of your Sanity project.\n\n[See tutorial video](https://www.youtube.com/watch?v=dLeu7I4RsYg).`,\n importName: \"SanityCredentialsProvider\",\n importPath: modulePath,\n props: {\n projectId: {\n type: \"string\",\n displayName: \"Project ID\",\n defaultValueHint: \"b2gfz67v\",\n defaultValue: \"b2gfz67v\",\n description: \"The ID of the project to use.\",\n },\n dataset: {\n type: \"string\",\n displayName: \"Dataset\",\n defaultValueHint: \"production\",\n defaultValue: \"production\",\n description: \"The dataset to use.\",\n },\n apiVersion: {\n type: \"string\",\n displayName: \"API Version\",\n defaultValueHint: \"v1\",\n description:\n \"The API version to use (if not set, 'v1' will be used) - see https://www.sanity.io/docs/js-client#specifying-api-version.\",\n },\n token: {\n type: \"string\",\n displayName: \"Token\",\n description:\n \"The token to use (or leave blank for unauthenticated usage) - you can create tokens in the API section of your project (i.e. https://www.sanity.io/manage/personal/project/PROJECT_ID/api#tokens).\",\n },\n useCdn: {\n type: \"boolean\",\n displayName: \"Use CDN?\",\n defaultValueHint: false,\n description:\n \"Whether you want to use CDN ('false' if you want to ensure fresh data).\",\n },\n },\n };\n\nexport function SanityCredentialsProvider({\n projectId,\n dataset,\n apiVersion,\n token,\n useCdn,\n children,\n}: React.PropsWithChildren<SanityCredentialsProviderProps>) {\n return (\n <CredentialsContext.Provider\n value={{ projectId, dataset, apiVersion, token, useCdn }}\n >\n {children}\n </CredentialsContext.Provider>\n );\n}\n\ninterface SanityFetcherProps {\n groq?: string;\n docType: string;\n filterField?: string;\n filterValue?: string;\n filterParameter?: string;\n noAutoRepeat?: boolean;\n limit?: string;\n children?: ReactNode;\n className?: string;\n noLayout?: boolean;\n setControlContextData?: (data: {\n docTypes?: string[];\n sanityFields?: string[];\n queryOptions?: [];\n }) => void;\n}\n\nexport const sanityFetcherMeta: ComponentMeta<SanityFetcherProps> = {\n name: \"SanityFetcher\",\n displayName: \"Sanity Fetcher\",\n importName: \"SanityFetcher\",\n importPath: modulePath,\n providesData: true,\n description: `Fetches Sanity data of a given collection, and repeats \\`children\\` slot content for each row fetched.\n\n[See tutorial video](https://www.youtube.com/watch?v=1SLoVY3hkQ4) and [GROQ cheat sheet](https://www.sanity.io/docs/query-cheat-sheet).`,\n defaultStyles: {\n display: \"grid\",\n gridTemplateColumns: \"1fr 1fr 1fr 1fr\",\n gridRowGap: \"8px\",\n gridColumnGap: \"8px\",\n padding: \"8px\",\n maxWidth: \"100%\",\n },\n props: {\n children: {\n type: \"slot\",\n defaultValue: {\n type: \"vbox\",\n styles: {\n padding: \"8px\",\n },\n children: {\n type: \"component\",\n name: \"SanityField\",\n },\n },\n },\n groq: {\n type: \"string\",\n displayName: \"GROQ\",\n description: \"Query in GROQ.\",\n defaultValueHint: \"*[_type == 'movie']\",\n // Hide this if there's no groq, AND there's docType, so we're in\n // \"docType\" mode\n hidden: (props) => !props.groq && !!props.docType,\n },\n docType: {\n type: \"choice\",\n options: (props, ctx) => {\n return ctx?.docTypes ?? [];\n },\n displayName: \"Document type\",\n description:\n \"Document type to be queried (*[_type == DOC_TYPE] shortcut).\",\n // Hide this if groq is specified, as groq always takes precedence\n hidden: (props) => !!props.groq,\n },\n filterField: {\n type: \"choice\",\n displayName: \"Filter field\",\n description: \"Field (from Collection) to filter by\",\n options: (props, ctx) => ctx?.sanityFields ?? [],\n // Hide this if there's groq (so we're just using groq), or if there's\n // no docType selected yet\n hidden: (props, ctx) => !!props.groq || !props.docType,\n },\n filterParameter: {\n type: \"choice\",\n displayName: \"Filter Operation\",\n description:\n \"Filter Option to filter by. Read more (https://www.sanity.io/docs/groq-operators#3b7211e976f6)\",\n options: (props, ctx) => ctx?.queryOptions ?? [],\n // Hide if in groq mode, or if no filter field is selected yet\n hidden: (props, ctx) => !!props.groq || !props.filterField,\n },\n filterValue: {\n type: \"string\",\n displayName: \"Filter value\",\n description: \"Value to filter by, should be of filter field type\",\n // Hide if in groq mode, or if no filter field is selected yet\n hidden: (props, ctx) => !!props.groq || !props.filterField,\n },\n limit: {\n type: \"string\",\n displayName: \"Limit\",\n description: \"Limit\",\n // Hide if in groq mode\n hidden: (props) => !!props.groq || !props.docType,\n },\n noAutoRepeat: {\n type: \"boolean\",\n displayName: \"No auto-repeat\",\n description: \"Do not automatically repeat children for every category.\",\n defaultValue: false,\n },\n noLayout: {\n type: \"boolean\",\n displayName: \"No layout\",\n description:\n \"When set, Sanity Fetcher will not layout its children; instead, the layout set on its parent element will be used. Useful if you want to set flex gap or control container tag type.\",\n defaultValue: false,\n },\n },\n};\n\nexport function SanityFetcher({\n groq,\n docType,\n filterField,\n filterValue,\n filterParameter,\n limit,\n noAutoRepeat,\n children,\n className,\n noLayout,\n\n setControlContextData,\n}: SanityFetcherProps) {\n const projectIdRegex = new RegExp(/^[-a-z0-9]+$/i);\n const datasetRegex = new RegExp(\n /^(~[a-z0-9]{1}[-\\w]{0,63}|[a-z0-9]{1}[-\\w]{0,63})$/\n );\n const dateRegex = new RegExp(/^\\d{4}-\\d{2}-\\d{2}$/);\n\n const creds = ensure(useContext(CredentialsContext));\n\n if (!creds.projectId || !projectIdRegex.test(creds.projectId)) {\n return (\n <div className={className}>\n Please specify a valid projectId, it can only contain only a-z, 0-9 and\n dashes.\n </div>\n );\n } else if (!creds.dataset || !datasetRegex.test(creds.dataset)) {\n return (\n <div className={className}>\n Please specify a valid dataset, they can only contain lowercase\n characters, numbers, underscores and dashes, and start with tilde, and\n be maximum 64 characters.\n </div>\n );\n } else if (creds.apiVersion) {\n if (\n creds.apiVersion !== \"v1\" &&\n creds.apiVersion !== \"1\" &&\n creds.apiVersion !== \"X\"\n ) {\n const date = new Date(creds.apiVersion);\n if (\n !(\n dateRegex.test(creds.apiVersion) &&\n date instanceof Date &&\n date.getTime() > 0\n )\n ) {\n return (\n <div className={className}>\n Please specify a valid API version, expected `v1`, `1` or date in\n format `YYYY-MM-DD`.\n </div>\n );\n }\n }\n }\n\n const filterUniqueDocTypes = (records: { _type: string }[]): string[] =>\n records\n .map((record) => record._type)\n .reduce((acc, type) => {\n if (!acc.includes(type)) {\n acc.push(type);\n }\n return acc;\n }, [] as string[]);\n\n const allDataTypes = usePlasmicQueryData<any[] | null>(\n JSON.stringify(creds) + \"/SANITY_DOCTYPES\",\n async () => {\n const sanity = makeSanityClient(creds);\n const resp = await sanity.fetch(\"*{_type}\").then(filterUniqueDocTypes);\n return resp;\n }\n );\n const docTypes = allDataTypes.data ?? false;\n\n const hasFilter =\n !!docType && !!filterField && !!filterParameter && !!filterValue;\n\n const generateUnfilteredGroq = () => {\n if (groq) {\n console.log(\"ORIG GROQ\", groq);\n return groq;\n } else if (docType) {\n let query = `*[_type=='${docType}']`;\n if (hasFilter) {\n // Ask for only a small sample, so we know how to generate the filter\n query += `[0...10]`;\n } else if (limit) {\n query += `[0...${limit}]`;\n }\n console.log(\"UNFILTERED GROQ\", query);\n return query;\n } else {\n return null;\n }\n };\n\n const unfilteredQuery = generateUnfilteredGroq();\n\n const sanity = makeSanityClient(creds);\n\n const { data: unfilteredData } = usePlasmicQueryData<any[] | null>(\n unfilteredQuery\n ? JSON.stringify({ fullQuery: unfilteredQuery, creds })\n : null,\n async () => {\n return sanity.fetch(unfilteredQuery!);\n }\n );\n\n const generateFilteredQuery = () => {\n if (!hasFilter || !unfilteredData) {\n return null;\n }\n\n const fieldValues = Object.values(unfilteredData)\n .flatMap((model: any) => (Array.isArray(model) ? model : [model]))\n .map((item: any) => {\n const field = Object.entries(item).find((el) => el[0] === filterField);\n return field?.[1];\n });\n\n let query = `*[_type=='${docType}'`;\n\n if (fieldValues.some((v) => typeof v === \"string\")) {\n query = `${query} && ${filterField} ${filterParameter} \"${filterValue}\"`;\n } else {\n query = `${query} && ${filterField} ${filterParameter} ${filterValue}`;\n }\n\n if (limit) {\n query = `${query}][0...${limit}]`;\n } else {\n query = `${query}]`;\n }\n console.log(\"FILTERED GROQ\", query);\n return query;\n };\n\n const filteredQuery = generateFilteredQuery();\n const { data: filteredData } = usePlasmicQueryData<any[] | null>(\n filteredQuery ? JSON.stringify({ filteredQuery, creds }) : null,\n async () => {\n const resp = await sanity.fetch(filteredQuery!);\n return resp;\n }\n );\n\n if (!docTypes) {\n return (\n <div className={className}>\n Please configure the Sanity provider with a valid projectId, dataset,\n and token (if necessary). Don't forget to add\n 'https://host.plasmicdev.com' as an authorized host on the CORS origins\n section of your project.\n </div>\n );\n }\n\n setControlContextData?.({\n docTypes,\n });\n\n if (!groq && !docType) {\n return (\n <div className={className}>\n Please specify a valid GROQ query or select a Document type.\n </div>\n );\n }\n\n if (!unfilteredData) {\n return <div className={className}>Loading...</div>;\n }\n\n let sanityFields = unfilteredData.map((item) => {\n const fields = Object.keys(item).filter((field) => {\n const value = get(item, field);\n return (\n (typeof value !== \"object\" &&\n value._type !== \"image\" &&\n typeof value === \"number\") ||\n (typeof value === \"string\" &&\n !value.match(/^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$/))\n );\n });\n\n return fields;\n });\n\n let operators;\n\n const matchedFields = Object.values(unfilteredData)\n .flatMap((model: any) => (Array.isArray(model) ? model : [model]))\n .map((item: any) => {\n const fields = Object.entries(item).find((el) => el[0] === filterField);\n return fields;\n });\n\n Object.values(matchedFields)\n .map((model: any) => (Array.isArray(model) ? model : [model]))\n .map((item: any) => {\n if (typeof item[1] === \"number\" && typeof item[1] !== \"object\") {\n operators = filterParameters;\n } else if (\n typeof item[1] !== \"number\" &&\n typeof item[1] !== \"object\" &&\n typeof item[1] === \"string\"\n ) {\n operators = [\n {\n value: \"==\",\n label: \"Equals\",\n },\n {\n value: \"!=\",\n label: \"Not equals\",\n },\n ];\n }\n });\n\n setControlContextData?.({\n queryOptions: operators,\n docTypes,\n sanityFields: sanityFields[0]!,\n });\n\n if (hasFilter) {\n if (!filterParameter) {\n return <div className={className}>Please specify a filter operation</div>;\n }\n if (!filterValue) {\n return <div className={className}>Please specify a filter value</div>;\n }\n }\n\n if (hasFilter && !filteredData) {\n return <div className={className}>Loading...</div>;\n }\n\n const resultData = hasFilter ? filteredData! : unfilteredData;\n\n const imageBuilder = imageUrlBuilder(sanity);\n const repElements = noAutoRepeat\n ? children\n : resultData.map((item, index) => {\n Object.keys(item).forEach((field) => {\n if (item[field]._type === \"image\") {\n item[field].imgUrl = imageBuilder\n .image(item[field])\n .ignoreImageParams()\n .toString();\n }\n });\n\n return docType ? (\n <DataProvider\n key={item._id}\n name={\"sanityItem\"}\n data={item}\n hidden={true}\n >\n <DataProvider name={makeDataProviderName(docType)} data={item}>\n {repeatedElement(index, children)}\n </DataProvider>\n </DataProvider>\n ) : (\n <DataProvider key={item._id} name={\"sanityItem\"} data={item}>\n {repeatedElement(index, children)}\n </DataProvider>\n );\n });\n\n return (\n <DataProvider name=\"sanityItems\" data={resultData}>\n {noLayout ? (\n <> {repElements} </>\n ) : (\n <div className={className}> {repElements} </div>\n )}\n </DataProvider>\n );\n}\n\ninterface SanityFieldProps {\n className?: string;\n path?: string;\n field?: string;\n setControlContextData?: (data: {\n fields: string[];\n isImage: boolean;\n }) => void;\n}\n\nexport const sanityFieldMeta: ComponentMeta<SanityFieldProps> = {\n name: \"SanityField\",\n displayName: \"Sanity Field\",\n importName: \"SanityField\",\n importPath: modulePath,\n props: {\n path: {\n type: \"string\",\n displayName: \"Path\",\n description: \"Field path - see https://www.sanity.io/docs/ids.\",\n defaultValueHint: \"castMembers.0._key\",\n },\n field: {\n type: \"choice\",\n options: (props, ctx) => {\n return ctx?.fields ?? [];\n },\n displayName: \"Field\",\n description: \"Field to be displayed.\",\n },\n },\n};\n\nexport function SanityField({\n className,\n path,\n field,\n setControlContextData,\n}: SanityFieldProps) {\n const item = useSelector(\"sanityItem\");\n if (!item) {\n return <div>SanityField must be used within a SanityFetcher</div>;\n }\n\n // Getting only fields that aren't objects\n const displayableFields = Object.keys(item).filter((field) => {\n const value = get(item, field);\n return typeof value !== \"object\" || value._type === \"image\";\n });\n setControlContextData?.({\n fields: displayableFields,\n isImage: false,\n });\n\n if (!path && !field) {\n return <div>Please specify a valid path or select a field.</div>;\n }\n\n if (!path) {\n path = field;\n }\n\n const data = get(item, path as string);\n\n setControlContextData?.({\n fields: displayableFields,\n isImage: data?._type == \"image\",\n });\n\n if (!data) {\n return <div>Please specify a valid path.</div>;\n } else if (data?._type === \"image\") {\n return <img className={className} src={data.imgUrl} />;\n } else {\n return <div className={className}>{data}</div>;\n }\n}\n","import registerComponent, {\n ComponentMeta,\n} from \"@plasmicapp/host/registerComponent\";\nimport registerGlobalContext from \"@plasmicapp/host/registerGlobalContext\";\nimport {\n SanityCredentialsProvider,\n sanityCredentialsProviderMeta,\n SanityFetcher,\n sanityFetcherMeta,\n SanityField,\n sanityFieldMeta,\n} from \"./sanity\";\n\n\nexport function registerAll(loader?: {\n registerComponent: typeof registerComponent;\n registerGlobalContext: typeof registerGlobalContext;\n}) {\n const _registerComponent = <T extends React.ComponentType<any>>(\n Component: T,\n defaultMeta: ComponentMeta<React.ComponentProps<T>>\n ) => {\n if (loader) {\n loader.registerComponent(Component, defaultMeta);\n } else {\n registerComponent(Component, defaultMeta);\n }\n };\n\n if (loader) {\n loader.registerGlobalContext(SanityCredentialsProvider, sanityCredentialsProviderMeta);\n } else {\n registerGlobalContext(SanityCredentialsProvider, sanityCredentialsProviderMeta);\n }\n\n _registerComponent(SanityFetcher, sanityFetcherMeta);\n _registerComponent(SanityField, sanityFieldMeta);\n}\n\nexport * from \"./sanity\";"],"names":["filterParameters","value","label","ensure","x","undefined","Error","modulePath","makeDataProviderName","docType","pascalCase","makeSanityClient","creds","sanity","createClient","projectId","dataset","apiVersion","token","useCdn","CredentialsContext","React","createContext","sanityCredentialsProviderMeta","name","displayName","description","importName","importPath","props","type","defaultValueHint","defaultValue","SanityCredentialsProvider","_ref","children","Provider","sanityFetcherMeta","providesData","defaultStyles","display","gridTemplateColumns","gridRowGap","gridColumnGap","padding","maxWidth","styles","groq","hidden","options","ctx","_ctx$docTypes","docTypes","filterField","_ctx$sanityFields","sanityFields","filterParameter","_ctx$queryOptions","queryOptions","filterValue","limit","noAutoRepeat","noLayout","SanityFetcher","_ref2","className","setControlContextData","projectIdRegex","RegExp","datasetRegex","dateRegex","useContext","test","date","Date","getTime","filterUniqueDocTypes","records","map","record","_type","reduce","acc","includes","push","allDataTypes","usePlasmicQueryData","JSON","stringify","_asyncToGenerator","_regeneratorRuntime","mark","_callee","resp","wrap","_callee$","_context","prev","next","fetch","then","sent","abrupt","stop","_allDataTypes$data","data","hasFilter","generateUnfilteredGroq","console","log","query","unfilteredQuery","_usePlasmicQueryData","fullQuery","_callee2","_callee2$","_context2","unfilteredData","generateFilteredQuery","fieldValues","Object","values","flatMap","model","Array","isArray","item","field","entries","find","el","some","v","filteredQuery","_usePlasmicQueryData2","_callee3","_callee3$","_context3","filteredData","fields","keys","filter","get","match","operators","matchedFields","resultData","imageBuilder","imageUrlBuilder","repElements","index","forEach","imgUrl","image","ignoreImageParams","toString","DataProvider","key","_id","repeatedElement","sanityFieldMeta","path","_ctx$fields","SanityField","_ref6","useSelector","displayableFields","isImage","src","registerAll","loader","_registerComponent","Component","defaultMeta","registerComponent","registerGlobalContext"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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ACyB,IAAI,EAAE;IACT,OAAOpF,gEAAuC;GAC/C,MAAM,IAAI,CAAAoF,IAAI,oBAAJA,IAAI,CAAEzB,KAAK,MAAK,OAAO,EAAE;IAClC,OAAO3D;MAAK4C,SAAS,EAAEA,SAAS;MAAEuG,GAAG,EAAE/D,IAAI,CAAC+C;MAAU;GACvD,MAAM;IACL,OAAOnI;MAAK4C,SAAS,EAAEA;OAAYwC,IAAI,CAAO;;AAElD;;SC3kBgBgE,WAAWA,CAACC,MAG3B;EACC,IAAMC,kBAAkB,GAAG,SAArBA,kBAAkBA,CACtBC,SAAY,EACZC,WAAmD;IAEnD,IAAIH,MAAM,EAAE;MACVA,MAAM,CAACI,iBAAiB,CAACF,SAAS,EAAEC,WAAW,CAAC;KACjD,MAAM;MACLC,iBAAiB,CAACF,SAAS,EAAEC,WAAW,CAAC;;GAE5C;EAED,IAAIH,MAAM,EAAE;IACVA,MAAM,CAACK,qBAAqB,CAAC9I,yBAAyB,EAAEV,6BAA6B,CAAC;GACvF,MAAM;IACLwJ,qBAAqB,CAAC9I,yBAAyB,EAAEV,6BAA6B,CAAC;;EAGjFoJ,kBAAkB,CAAC5G,aAAa,EAAE1B,iBAAiB,CAAC;EACpDsI,kBAAkB,CAACR,WAAW,EAAEH,eAAe,CAAC;AAClD;;;;"}
|
package/dist/sanity.d.ts
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { ComponentMeta, GlobalContextMeta } from "@plasmicapp/host";
|
|
2
|
-
import React, { ReactNode } from "react";
|
|
3
|
-
export declare function ensure<T>(x: T | null | undefined): T;
|
|
4
|
-
interface SanityCredentialsProviderProps {
|
|
5
|
-
projectId?: string;
|
|
6
|
-
dataset?: string;
|
|
7
|
-
apiVersion?: string;
|
|
8
|
-
token?: string;
|
|
9
|
-
useCdn?: boolean;
|
|
10
|
-
}
|
|
11
|
-
export declare const sanityCredentialsProviderMeta: GlobalContextMeta<SanityCredentialsProviderProps>;
|
|
12
|
-
export declare function SanityCredentialsProvider({ projectId, dataset, apiVersion, token, useCdn, children, }: React.PropsWithChildren<SanityCredentialsProviderProps>): React.JSX.Element;
|
|
13
|
-
interface SanityFetcherProps {
|
|
14
|
-
groq?: string;
|
|
15
|
-
docType: string;
|
|
16
|
-
filterField?: string;
|
|
17
|
-
filterValue?: string;
|
|
18
|
-
filterParameter?: string;
|
|
19
|
-
noAutoRepeat?: boolean;
|
|
20
|
-
limit?: string;
|
|
21
|
-
children?: ReactNode;
|
|
22
|
-
className?: string;
|
|
23
|
-
noLayout?: boolean;
|
|
24
|
-
setControlContextData?: (data: {
|
|
25
|
-
docTypes?: string[];
|
|
26
|
-
sanityFields?: string[];
|
|
27
|
-
queryOptions?: [];
|
|
28
|
-
}) => void;
|
|
29
|
-
}
|
|
30
|
-
export declare const sanityFetcherMeta: ComponentMeta<SanityFetcherProps>;
|
|
31
|
-
export declare function SanityFetcher({ groq, docType, filterField, filterValue, filterParameter, limit, noAutoRepeat, children, className, noLayout, setControlContextData, }: SanityFetcherProps): React.JSX.Element;
|
|
32
|
-
interface SanityFieldProps {
|
|
33
|
-
className?: string;
|
|
34
|
-
path?: string;
|
|
35
|
-
field?: string;
|
|
36
|
-
setControlContextData?: (data: {
|
|
37
|
-
fields: string[];
|
|
38
|
-
isImage: boolean;
|
|
39
|
-
}) => void;
|
|
40
|
-
}
|
|
41
|
-
export declare const sanityFieldMeta: ComponentMeta<SanityFieldProps>;
|
|
42
|
-
export declare function SanityField({ className, path, field, setControlContextData, }: SanityFieldProps): React.JSX.Element;
|
|
43
|
-
export {};
|
package/dist/utils.d.ts
DELETED