@sanity/vercel-protection-bypass
5.0.135.0.14
dist/index.js.map~
dist/index.js.mapModified+1−1
Index: package/dist/index.js.map
===================================================================
--- package/dist/index.js.map
+++ package/dist/index.js.map
@@ -1,1 +1,1 @@
-{"version":3,"file":"index.js","names":["CheckmarkCircleIcon","CloseCircleIcon","LockIcon","vercelProtectionBypassSchemaId","_id","vercelProtectionBypassSchemaType","type","lazy","definePlugin","defineType","Plugin","id","VercelProtectionBypassConfig","name","title","icon","React","ComponentType","defaultTitle","schema","readOnly","fields","preview","select","secret","prepare","data","enabled","subtitle","media","VercelProtectionBypassTool","vercelProtectionBypassTool","options","config","tools","component","__internalApplicationType","document","actions","prev","context","schemaType","types"],"sources":["../src/index.ts"],"sourcesContent":["import {CheckmarkCircleIcon} from '@sanity/icons/CheckmarkCircle'\nimport {CloseCircleIcon} from '@sanity/icons/CloseCircle'\nimport {LockIcon} from '@sanity/icons/Lock'\nimport {\n vercelProtectionBypassSchemaId as _id,\n vercelProtectionBypassSchemaType as type,\n} from '@sanity/preview-url-secret/constants'\nimport {lazy} from 'react'\nimport {definePlugin, defineType, type Plugin} from 'sanity'\n\nconst id = 'vercel-protection-bypass'\n\nexport interface VercelProtectionBypassConfig {\n name?: string\n title?: string\n icon?: React.ComponentType\n}\n\nconst defaultTitle = 'Vercel Protection Bypass'\nconst schema = defineType({\n type: 'document',\n icon: LockIcon,\n name: type,\n title: defaultTitle,\n readOnly: true,\n fields: [\n {\n type: 'string',\n name: 'secret',\n title: 'Secret',\n },\n ],\n preview: {\n select: {\n secret: 'secret',\n },\n prepare(data) {\n const enabled = data.secret !== null\n return {\n title: enabled ? 'Enabled' : 'Disabled',\n subtitle: defaultTitle,\n media: enabled ? CheckmarkCircleIcon : CloseCircleIcon,\n }\n },\n },\n})\n\nconst VercelProtectionBypassTool = lazy(() => import('./VercelProtectionBypassTool'))\n\nexport const vercelProtectionBypassTool: Plugin<VercelProtectionBypassConfig | void> = definePlugin(\n (options) => {\n const {\n name = 'vercel-protection-bypass',\n title = 'Vercel Protection Bypass',\n icon = LockIcon,\n ...config\n } = options || {}\n return {\n name: `@sanity/preview-url-secret/${id}`,\n tools: [\n {\n name,\n title,\n icon: icon,\n component: VercelProtectionBypassTool,\n options: config,\n __internalApplicationType: `sanity/${id}`,\n },\n ],\n document: {\n actions: (prev, context) => {\n if (context.schemaType !== type) {\n return prev\n }\n return []\n },\n },\n schema: {types: [schema]},\n }\n },\n)\n"],"mappings":";;;;;;AAUA,MAAMW,KAAK,4BAQLO,eAAe,4BACfC,SAASV,WAAW;CACxBH,MAAM;CACNS,MAAMb;CACNW,MAAMP;CACNQ,OAAOI;CACPE,UAAU;CACVC,QAAQ,CACN;EACEf,MAAM;EACNO,MAAM;EACNC,OAAO;CACT,CAAC;CAEHQ,SAAS;EACPC,QAAQ,EACNC,QAAQ,SACV;EACAC,QAAQC,MAAM;GACZ,IAAMC,UAAUD,KAAKF,WAAW;GAChC,OAAO;IACLV,OAAOa,UAAU,YAAY;IAC7BC,UAAUV;IACVW,OAAOF,UAAU3B,sBAAsBC;GACzC;EACF;CACF;AACF,CAAC,GAEK6B,6BAA6BvB,WAAW,OAAO,kCAA+B,GAEvEwB,6BAA0EvB,cACpFwB,YAAY;CACX,IAAM,EACJnB,OAAO,4BACPC,QAAQ,4BACRC,OAAOb,UACP,GAAG+B,WACDD,WAAW,CAAC;CAChB,OAAO;EACLnB,MAAM,8BAA8BF;EACpCuB,OAAO,CACL;GACErB;GACAC;GACMC;GACNoB,WAAWL;GACXE,SAASC;GACTG,2BAA2B,UAAUzB;EACvC,CAAC;EAEH0B,UAAU,EACRC,UAAUC,MAAMC,YACVA,QAAQC,eAAenC,mCAGpB,CAAA,IAFEiC,KAIb;EACApB,QAAQ,EAACuB,OAAO,CAACvB,MAAM,EAAC;CAC1B;AACF,CACF"}
\ No newline at end of file
+{"version":3,"file":"index.js","names":["CheckmarkCircleIcon","CloseCircleIcon","LockIcon","vercelProtectionBypassSchemaId","_id","vercelProtectionBypassSchemaType","type","lazy","definePlugin","defineType","Plugin","id","VercelProtectionBypassConfig","name","title","icon","React","ComponentType","defaultTitle","schema","readOnly","fields","preview","select","secret","prepare","data","enabled","subtitle","media","VercelProtectionBypassTool","vercelProtectionBypassTool","options","config","tools","component","__internalApplicationType","document","actions","prev","context","schemaType","types"],"sources":["../src/index.ts"],"sourcesContent":["import {CheckmarkCircleIcon} from '@sanity/icons/CheckmarkCircle'\nimport {CloseCircleIcon} from '@sanity/icons/CloseCircle'\nimport {LockIcon} from '@sanity/icons/Lock'\nimport {\n vercelProtectionBypassSchemaId as _id,\n vercelProtectionBypassSchemaType as type,\n} from '@sanity/preview-url-secret/constants'\nimport {lazy} from 'react'\nimport {definePlugin, defineType, type Plugin} from 'sanity'\n\nconst id = 'vercel-protection-bypass'\n\nexport interface VercelProtectionBypassConfig {\n name?: string\n title?: string\n icon?: React.ComponentType\n}\n\nconst defaultTitle = 'Vercel Protection Bypass'\nconst schema = defineType({\n type: 'document',\n icon: LockIcon,\n name: type,\n title: defaultTitle,\n readOnly: true,\n fields: [\n {\n type: 'string',\n name: 'secret',\n title: 'Secret',\n },\n ],\n preview: {\n select: {\n secret: 'secret',\n },\n prepare(data) {\n const enabled = data.secret !== null\n return {\n title: enabled ? 'Enabled' : 'Disabled',\n subtitle: defaultTitle,\n media: enabled ? CheckmarkCircleIcon : CloseCircleIcon,\n }\n },\n },\n})\n\nconst VercelProtectionBypassTool = lazy(() => import('./VercelProtectionBypassTool'))\n\nexport const vercelProtectionBypassTool: Plugin<VercelProtectionBypassConfig | void> = definePlugin(\n (options) => {\n const {\n name = 'vercel-protection-bypass',\n title = 'Vercel Protection Bypass',\n icon = LockIcon,\n ...config\n } = options || {}\n return {\n name: `@sanity/preview-url-secret/${id}`,\n tools: [\n {\n name,\n title,\n icon: icon,\n component: VercelProtectionBypassTool,\n options: config,\n __internalApplicationType: `sanity/${id}`,\n },\n ],\n document: {\n actions: (prev, context) => {\n if (context.schemaType !== type) {\n return prev\n }\n return []\n },\n },\n schema: {types: [schema]},\n }\n },\n)\n"],"mappings":";;;;;;AAUA,MAAMW,KAAK,4BAQLO,eAAe,4BACfC,SAASV,WAAW;CACxBH,MAAM;CACNS,MAAMb;CACNW,MAAMP;CACNQ,OAAOI;CACPE,UAAU;CACVC,QAAQ,CACN;EACEf,MAAM;EACNO,MAAM;EACNC,OAAO;CACT,CAAC;CAEHQ,SAAS;EACPC,QAAQ,EACNC,QAAQ,SACV;EACAC,QAAQC,MAAM;GACZ,IAAMC,UAAUD,KAAKF,WAAW;GAChC,OAAO;IACLV,OAAOa,UAAU,YAAY;IAC7BC,UAAUV;IACVW,OAAOF,UAAU3B,sBAAsBC;GACzC;EACF;CACF;AACF,CAAC,GAEK6B,6BAA6BvB,WAAW,OAAO,6CAA+B,GAEvEwB,6BAA0EvB,cACpFwB,YAAY;CACX,IAAM,EACJnB,OAAO,4BACPC,QAAQ,4BACRC,OAAOb,UACP,GAAG+B,WACDD,WAAW,CAAC;CAChB,OAAO;EACLnB,MAAM,8BAA8BF;EACpCuB,OAAO,CACL;GACErB;GACAC;GACMC;GACNoB,WAAWL;GACXE,SAASC;GACTG,2BAA2B,UAAUzB;EACvC,CAAC;EAEH0B,UAAU,EACRC,UAAUC,MAAMC,YACVA,QAAQC,eAAenC,mCAGpB,CAAA,IAFEiC,KAIb;EACApB,QAAQ,EAACuB,OAAO,CAACvB,MAAM,EAAC;CAC1B;AACF,CACF"}
\ No newline at end of file