@sanity/cli 6.6.0 → 6.7.0
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/README.md +12 -4
- package/dist/actions/auth/login/login.js +4 -1
- package/dist/actions/auth/login/login.js.map +1 -1
- package/dist/actions/build/buildApp.js +4 -5
- package/dist/actions/build/buildApp.js.map +1 -1
- package/dist/actions/build/buildStaticFiles.js +12 -4
- package/dist/actions/build/buildStaticFiles.js.map +1 -1
- package/dist/actions/build/buildStudio.js +6 -14
- package/dist/actions/build/buildStudio.js.map +1 -1
- package/dist/actions/build/{getStudioEnvironmentVariables.js → getEnvironmentVariables.js} +15 -19
- package/dist/actions/build/getEnvironmentVariables.js.map +1 -0
- package/dist/actions/deploy/deployStudio.js +1 -2
- package/dist/actions/deploy/deployStudio.js.map +1 -1
- package/dist/actions/deploy/deployStudioSchemasAndManifests.js +1 -2
- package/dist/actions/deploy/deployStudioSchemasAndManifests.js.map +1 -1
- package/dist/actions/deploy/deployStudioSchemasAndManifests.worker.js +1 -1
- package/dist/actions/deploy/deployStudioSchemasAndManifests.worker.js.map +1 -1
- package/dist/actions/dev/startStudioDevServer.js +1 -1
- package/dist/actions/dev/startStudioDevServer.js.map +1 -1
- package/dist/actions/documents/validateDocuments.worker.js +1 -2
- package/dist/actions/documents/validateDocuments.worker.js.map +1 -1
- package/dist/actions/graphql/SchemaError.js +1 -1
- package/dist/actions/graphql/SchemaError.js.map +1 -1
- package/dist/actions/init/initAction.js +32 -1
- package/dist/actions/init/initAction.js.map +1 -1
- package/dist/actions/init/scaffoldTemplate.js +32 -18
- package/dist/actions/init/scaffoldTemplate.js.map +1 -1
- package/dist/actions/init/templates/index.js +2 -0
- package/dist/actions/init/templates/index.js.map +1 -1
- package/dist/actions/init/templates/pageBuilder.js +32 -0
- package/dist/actions/init/templates/pageBuilder.js.map +1 -0
- package/dist/actions/init/types.js +2 -1
- package/dist/actions/init/types.js.map +1 -1
- package/dist/actions/manifest/extractManifest.js +1 -1
- package/dist/actions/manifest/extractManifest.js.map +1 -1
- package/dist/actions/manifest/extractManifest.worker.js +1 -1
- package/dist/actions/manifest/extractManifest.worker.js.map +1 -1
- package/dist/actions/mcp/editorConfigs.js +51 -11
- package/dist/actions/mcp/editorConfigs.js.map +1 -1
- package/dist/actions/mcp/promptForMCPSetup.js +16 -11
- package/dist/actions/mcp/promptForMCPSetup.js.map +1 -1
- package/dist/actions/mcp/setupMCP.js +180 -61
- package/dist/actions/mcp/setupMCP.js.map +1 -1
- package/dist/actions/mcp/types.js.map +1 -1
- package/dist/actions/schema/deploySchemas.js +1 -1
- package/dist/actions/schema/deploySchemas.js.map +1 -1
- package/dist/actions/schema/extractSanityWorkspace.worker.js +1 -1
- package/dist/actions/schema/extractSanityWorkspace.worker.js.map +1 -1
- package/dist/actions/schema/extractSchema.js +1 -4
- package/dist/actions/schema/extractSchema.js.map +1 -1
- package/dist/actions/schema/extractSchemaWatcher.js +1 -4
- package/dist/actions/schema/extractSchemaWatcher.js.map +1 -1
- package/dist/actions/schema/getExtractOptions.js +8 -18
- package/dist/actions/schema/getExtractOptions.js.map +1 -1
- package/dist/actions/schema/types.js +0 -6
- package/dist/actions/schema/types.js.map +1 -1
- package/dist/actions/schema/validateAction.js +1 -1
- package/dist/actions/schema/validateAction.js.map +1 -1
- package/dist/actions/schema/validateSchema.worker.js +1 -2
- package/dist/actions/schema/validateSchema.worker.js.map +1 -1
- package/dist/actions/schema/watchExtractSchema.js +1 -1
- package/dist/actions/schema/watchExtractSchema.js.map +1 -1
- package/dist/actions/skills/readSkillState.js +54 -0
- package/dist/actions/skills/readSkillState.js.map +1 -0
- package/dist/actions/skills/setupSkills.js +73 -0
- package/dist/actions/skills/setupSkills.js.map +1 -0
- package/dist/commands/build.js +9 -22
- package/dist/commands/build.js.map +1 -1
- package/dist/commands/cors/add.js +5 -5
- package/dist/commands/cors/add.js.map +1 -1
- package/dist/commands/datasets/export.js +9 -0
- package/dist/commands/datasets/export.js.map +1 -1
- package/dist/commands/docs/read.js +33 -12
- package/dist/commands/docs/read.js.map +1 -1
- package/dist/commands/init.js +12 -1
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/manifest/extract.js +1 -2
- package/dist/commands/manifest/extract.js.map +1 -1
- package/dist/commands/mcp/configure.js +2 -1
- package/dist/commands/mcp/configure.js.map +1 -1
- package/dist/commands/schemas/deploy.js +1 -2
- package/dist/commands/schemas/deploy.js.map +1 -1
- package/dist/exports/_internal.d.ts +2 -1
- package/dist/exports/_internal.js +1 -1
- package/dist/exports/_internal.js.map +1 -1
- package/dist/server/devServer.js +25 -4
- package/dist/server/devServer.js.map +1 -1
- package/dist/server/previewServer.js +1 -1
- package/dist/server/previewServer.js.map +1 -1
- package/dist/services/mcp.js +1 -1
- package/dist/services/mcp.js.map +1 -1
- package/dist/telemetry/init.telemetry.js.map +1 -1
- package/oclif.manifest.json +134 -118
- package/package.json +15 -16
- package/templates/page-builder/README.md +9 -0
- package/templates/page-builder/schemaTypes/hero.js +31 -0
- package/templates/page-builder/schemaTypes/index.js +19 -0
- package/templates/page-builder/static/.gitkeep +0 -0
- package/dist/actions/build/buildDebug.js +0 -4
- package/dist/actions/build/buildDebug.js.map +0 -1
- package/dist/actions/build/buildVendorDependencies.js +0 -149
- package/dist/actions/build/buildVendorDependencies.js.map +0 -1
- package/dist/actions/build/checkStudioDependencyVersions.js +0 -155
- package/dist/actions/build/checkStudioDependencyVersions.js.map +0 -1
- package/dist/actions/build/createExternalFromImportMap.js +0 -11
- package/dist/actions/build/createExternalFromImportMap.js.map +0 -1
- package/dist/actions/build/decorateIndexWithAutoGeneratedWarning.js +0 -13
- package/dist/actions/build/decorateIndexWithAutoGeneratedWarning.js.map +0 -1
- package/dist/actions/build/decorateIndexWithBridgeScript.js +0 -17
- package/dist/actions/build/decorateIndexWithBridgeScript.js.map +0 -1
- package/dist/actions/build/decorateIndexWithStagingScript.js +0 -16
- package/dist/actions/build/decorateIndexWithStagingScript.js.map +0 -1
- package/dist/actions/build/getAppEnvVars.js +0 -9
- package/dist/actions/build/getAppEnvVars.js.map +0 -1
- package/dist/actions/build/getEntryModule.js +0 -46
- package/dist/actions/build/getEntryModule.js.map +0 -1
- package/dist/actions/build/getPossibleDocumentComponentLocations.js +0 -11
- package/dist/actions/build/getPossibleDocumentComponentLocations.js.map +0 -1
- package/dist/actions/build/getStudioEnvVars.js +0 -9
- package/dist/actions/build/getStudioEnvVars.js.map +0 -1
- package/dist/actions/build/getStudioEnvironmentVariables.js.map +0 -1
- package/dist/actions/build/getViteConfig.js +0 -219
- package/dist/actions/build/getViteConfig.js.map +0 -1
- package/dist/actions/build/normalizeBasePath.js +0 -9
- package/dist/actions/build/normalizeBasePath.js.map +0 -1
- package/dist/actions/build/renderDocument.js +0 -50
- package/dist/actions/build/renderDocument.js.map +0 -1
- package/dist/actions/build/renderDocument.worker.js +0 -9
- package/dist/actions/build/renderDocument.worker.js.map +0 -1
- package/dist/actions/build/renderDocumentWorker/addTimestampImportMapScriptToHtml.js +0 -79
- package/dist/actions/build/renderDocumentWorker/addTimestampImportMapScriptToHtml.js.map +0 -1
- package/dist/actions/build/renderDocumentWorker/components/BasicDocument.js +0 -61
- package/dist/actions/build/renderDocumentWorker/components/BasicDocument.js.map +0 -1
- package/dist/actions/build/renderDocumentWorker/components/DefaultDocument.js +0 -165
- package/dist/actions/build/renderDocumentWorker/components/DefaultDocument.js.map +0 -1
- package/dist/actions/build/renderDocumentWorker/components/Favicons.js +0 -28
- package/dist/actions/build/renderDocumentWorker/components/Favicons.js.map +0 -1
- package/dist/actions/build/renderDocumentWorker/components/GlobalErrorHandler.js +0 -178
- package/dist/actions/build/renderDocumentWorker/components/GlobalErrorHandler.js.map +0 -1
- package/dist/actions/build/renderDocumentWorker/components/NoJavascript.js +0 -51
- package/dist/actions/build/renderDocumentWorker/components/NoJavascript.js.map +0 -1
- package/dist/actions/build/renderDocumentWorker/getDocumentComponent.js +0 -41
- package/dist/actions/build/renderDocumentWorker/getDocumentComponent.js.map +0 -1
- package/dist/actions/build/renderDocumentWorker/getDocumentHtml.js +0 -55
- package/dist/actions/build/renderDocumentWorker/getDocumentHtml.js.map +0 -1
- package/dist/actions/build/renderDocumentWorker/renderDocumentWorker.js +0 -31
- package/dist/actions/build/renderDocumentWorker/renderDocumentWorker.js.map +0 -1
- package/dist/actions/build/renderDocumentWorker/tryLoadDocumentComponent.js +0 -30
- package/dist/actions/build/renderDocumentWorker/tryLoadDocumentComponent.js.map +0 -1
- package/dist/actions/build/renderDocumentWorker/types.js +0 -5
- package/dist/actions/build/renderDocumentWorker/types.js.map +0 -1
- package/dist/actions/build/writeSanityRuntime.js +0 -64
- package/dist/actions/build/writeSanityRuntime.js.map +0 -1
- package/dist/actions/docs/normalizeDocsPath.js +0 -15
- package/dist/actions/docs/normalizeDocsPath.js.map +0 -1
- package/dist/actions/schema/extractSanitySchema.worker.js +0 -33
- package/dist/actions/schema/extractSanitySchema.worker.js.map +0 -1
- package/dist/actions/schema/formatSchemaValidation.js +0 -78
- package/dist/actions/schema/formatSchemaValidation.js.map +0 -1
- package/dist/actions/schema/matchSchemaPattern.js +0 -22
- package/dist/actions/schema/matchSchemaPattern.js.map +0 -1
- package/dist/actions/schema/runSchemaExtraction.js +0 -39
- package/dist/actions/schema/runSchemaExtraction.js.map +0 -1
- package/dist/actions/schema/utils/SchemaExtractionError.js +0 -10
- package/dist/actions/schema/utils/SchemaExtractionError.js.map +0 -1
- package/dist/actions/schema/utils/extractValidationFromSchemaError.js +0 -12
- package/dist/actions/schema/utils/extractValidationFromSchemaError.js.map +0 -1
- package/dist/constants.js +0 -8
- package/dist/constants.js.map +0 -1
- package/dist/server/vite/plugin-sanity-build-entries.js +0 -67
- package/dist/server/vite/plugin-sanity-build-entries.js.map +0 -1
- package/dist/server/vite/plugin-sanity-favicons.js +0 -72
- package/dist/server/vite/plugin-sanity-favicons.js.map +0 -1
- package/dist/server/vite/plugin-sanity-runtime-rewrite.js +0 -18
- package/dist/server/vite/plugin-sanity-runtime-rewrite.js.map +0 -1
- package/dist/server/vite/plugin-schema-extraction.js +0 -201
- package/dist/server/vite/plugin-schema-extraction.js.map +0 -1
- package/dist/telemetry/build.telemetry.js +0 -13
- package/dist/telemetry/build.telemetry.js.map +0 -1
- package/dist/telemetry/extractSchema.telemetry.js +0 -18
- package/dist/telemetry/extractSchema.telemetry.js.map +0 -1
- package/dist/util/getWorkspace.js +0 -18
- package/dist/util/getWorkspace.js.map +0 -1
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Ensures that the given path both starts and ends with a single slash
|
|
3
|
-
*
|
|
4
|
-
* @internal
|
|
5
|
-
*/ export function normalizeBasePath(pathName) {
|
|
6
|
-
return `/${pathName}/`.replace(/^\/+/, '/').replace(/\/+$/, '/');
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
//# sourceMappingURL=normalizeBasePath.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/actions/build/normalizeBasePath.ts"],"sourcesContent":["/**\n * Ensures that the given path both starts and ends with a single slash\n *\n * @internal\n */\nexport function normalizeBasePath(pathName: string): string {\n return `/${pathName}/`.replace(/^\\/+/, '/').replace(/\\/+$/, '/')\n}\n"],"names":["normalizeBasePath","pathName","replace"],"mappings":"AAAA;;;;CAIC,GACD,OAAO,SAASA,kBAAkBC,QAAgB;IAChD,OAAO,CAAC,CAAC,EAAEA,SAAS,CAAC,CAAC,CAACC,OAAO,CAAC,QAAQ,KAAKA,OAAO,CAAC,QAAQ;AAC9D"}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { ux } from '@oclif/core';
|
|
2
|
-
import { tsxWorkerTask } from '@sanity/cli-core';
|
|
3
|
-
import { buildDebug } from './buildDebug.js';
|
|
4
|
-
const hasWarnedAbout = new Set();
|
|
5
|
-
export async function renderDocument(options) {
|
|
6
|
-
buildDebug('Starting worker thread for %s', import.meta.url);
|
|
7
|
-
try {
|
|
8
|
-
const msg = await tsxWorkerTask(new URL(`renderDocument.worker.js`, import.meta.url), {
|
|
9
|
-
name: 'renderDocument',
|
|
10
|
-
rootPath: options.studioRootPath,
|
|
11
|
-
workerData: {
|
|
12
|
-
...options,
|
|
13
|
-
shouldWarn: true
|
|
14
|
-
}
|
|
15
|
-
});
|
|
16
|
-
if (msg.type === 'warning') {
|
|
17
|
-
if (msg.warnKey && hasWarnedAbout.has(msg.warnKey)) {
|
|
18
|
-
return '';
|
|
19
|
-
}
|
|
20
|
-
if (Array.isArray(msg.message)) {
|
|
21
|
-
for (const warning of msg.message){
|
|
22
|
-
ux.warn(warning);
|
|
23
|
-
}
|
|
24
|
-
} else if (msg.message) {
|
|
25
|
-
ux.warn(msg.message);
|
|
26
|
-
}
|
|
27
|
-
if (msg.warnKey) {
|
|
28
|
-
hasWarnedAbout.add(msg.warnKey);
|
|
29
|
-
}
|
|
30
|
-
return '';
|
|
31
|
-
}
|
|
32
|
-
if (msg.type === 'error') {
|
|
33
|
-
buildDebug('Error from worker: %s', msg.message || 'Unknown error');
|
|
34
|
-
throw new Error(Array.isArray(msg.message) ? msg.message.join('\n') : msg.message || 'Document rendering worker stopped with an unknown error');
|
|
35
|
-
}
|
|
36
|
-
if (msg.type === 'result') {
|
|
37
|
-
if (!msg.html) {
|
|
38
|
-
throw new Error('Document rendering worker stopped with an unknown error');
|
|
39
|
-
}
|
|
40
|
-
buildDebug('Document HTML rendered, %d bytes', msg.html.length);
|
|
41
|
-
return msg.html;
|
|
42
|
-
}
|
|
43
|
-
throw new Error('Unknown message type');
|
|
44
|
-
} catch (err) {
|
|
45
|
-
buildDebug('Worker errored: %s', err.message);
|
|
46
|
-
throw err;
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
//# sourceMappingURL=renderDocument.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/actions/build/renderDocument.ts"],"sourcesContent":["import {ux} from '@oclif/core'\nimport {tsxWorkerTask} from '@sanity/cli-core'\n\nimport {buildDebug} from './buildDebug.js'\n\ninterface DocumentProps {\n basePath: string\n\n css?: string[]\n entryPath?: string\n title?: string\n}\n\ninterface RenderDocumentOptions {\n studioRootPath: string\n\n autoUpdatesCssUrls?: string[]\n importMap?: {\n imports?: Record<string, string>\n }\n isApp?: boolean\n props?: DocumentProps\n}\n\nconst hasWarnedAbout = new Set<string>()\n\ninterface RenderDocumentWorkerResult {\n type: 'error' | 'result' | 'warning'\n\n html?: string\n message?: string | string[]\n warnKey?: string\n}\n\nexport async function renderDocument(options: RenderDocumentOptions): Promise<string> {\n buildDebug('Starting worker thread for %s', import.meta.url)\n try {\n const msg = await tsxWorkerTask<RenderDocumentWorkerResult>(\n new URL(`renderDocument.worker.js`, import.meta.url),\n {\n name: 'renderDocument',\n rootPath: options.studioRootPath,\n workerData: {...options, shouldWarn: true},\n },\n )\n\n if (msg.type === 'warning') {\n if (msg.warnKey && hasWarnedAbout.has(msg.warnKey)) {\n return ''\n }\n\n if (Array.isArray(msg.message)) {\n for (const warning of msg.message) {\n ux.warn(warning)\n }\n } else if (msg.message) {\n ux.warn(msg.message)\n }\n\n if (msg.warnKey) {\n hasWarnedAbout.add(msg.warnKey)\n }\n return ''\n }\n\n if (msg.type === 'error') {\n buildDebug('Error from worker: %s', msg.message || 'Unknown error')\n throw new Error(\n Array.isArray(msg.message)\n ? msg.message.join('\\n')\n : msg.message || 'Document rendering worker stopped with an unknown error',\n )\n }\n\n if (msg.type === 'result') {\n if (!msg.html) {\n throw new Error('Document rendering worker stopped with an unknown error')\n }\n\n buildDebug('Document HTML rendered, %d bytes', msg.html.length)\n return msg.html\n }\n\n throw new Error('Unknown message type')\n } catch (err) {\n buildDebug('Worker errored: %s', err.message)\n throw err\n }\n}\n"],"names":["ux","tsxWorkerTask","buildDebug","hasWarnedAbout","Set","renderDocument","options","url","msg","URL","name","rootPath","studioRootPath","workerData","shouldWarn","type","warnKey","has","Array","isArray","message","warning","warn","add","Error","join","html","length","err"],"mappings":"AAAA,SAAQA,EAAE,QAAO,cAAa;AAC9B,SAAQC,aAAa,QAAO,mBAAkB;AAE9C,SAAQC,UAAU,QAAO,kBAAiB;AAqB1C,MAAMC,iBAAiB,IAAIC;AAU3B,OAAO,eAAeC,eAAeC,OAA8B;IACjEJ,WAAW,iCAAiC,YAAYK,GAAG;IAC3D,IAAI;QACF,MAAMC,MAAM,MAAMP,cAChB,IAAIQ,IAAI,CAAC,wBAAwB,CAAC,EAAE,YAAYF,GAAG,GACnD;YACEG,MAAM;YACNC,UAAUL,QAAQM,cAAc;YAChCC,YAAY;gBAAC,GAAGP,OAAO;gBAAEQ,YAAY;YAAI;QAC3C;QAGF,IAAIN,IAAIO,IAAI,KAAK,WAAW;YAC1B,IAAIP,IAAIQ,OAAO,IAAIb,eAAec,GAAG,CAACT,IAAIQ,OAAO,GAAG;gBAClD,OAAO;YACT;YAEA,IAAIE,MAAMC,OAAO,CAACX,IAAIY,OAAO,GAAG;gBAC9B,KAAK,MAAMC,WAAWb,IAAIY,OAAO,CAAE;oBACjCpB,GAAGsB,IAAI,CAACD;gBACV;YACF,OAAO,IAAIb,IAAIY,OAAO,EAAE;gBACtBpB,GAAGsB,IAAI,CAACd,IAAIY,OAAO;YACrB;YAEA,IAAIZ,IAAIQ,OAAO,EAAE;gBACfb,eAAeoB,GAAG,CAACf,IAAIQ,OAAO;YAChC;YACA,OAAO;QACT;QAEA,IAAIR,IAAIO,IAAI,KAAK,SAAS;YACxBb,WAAW,yBAAyBM,IAAIY,OAAO,IAAI;YACnD,MAAM,IAAII,MACRN,MAAMC,OAAO,CAACX,IAAIY,OAAO,IACrBZ,IAAIY,OAAO,CAACK,IAAI,CAAC,QACjBjB,IAAIY,OAAO,IAAI;QAEvB;QAEA,IAAIZ,IAAIO,IAAI,KAAK,UAAU;YACzB,IAAI,CAACP,IAAIkB,IAAI,EAAE;gBACb,MAAM,IAAIF,MAAM;YAClB;YAEAtB,WAAW,oCAAoCM,IAAIkB,IAAI,CAACC,MAAM;YAC9D,OAAOnB,IAAIkB,IAAI;QACjB;QAEA,MAAM,IAAIF,MAAM;IAClB,EAAE,OAAOI,KAAK;QACZ1B,WAAW,sBAAsB0B,IAAIR,OAAO;QAC5C,MAAMQ;IACR;AACF"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { parentPort, workerData } from 'node:worker_threads';
|
|
2
|
-
import { renderDocumentWorker } from './renderDocumentWorker/renderDocumentWorker.js';
|
|
3
|
-
// If we're not in a worker thread, throw an error
|
|
4
|
-
if (!parentPort || !workerData) {
|
|
5
|
-
throw new Error('Must be used as a Worker with a valid options object in worker data');
|
|
6
|
-
}
|
|
7
|
-
renderDocumentWorker(parentPort, workerData);
|
|
8
|
-
|
|
9
|
-
//# sourceMappingURL=renderDocument.worker.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/actions/build/renderDocument.worker.ts"],"sourcesContent":["import {parentPort, workerData} from 'node:worker_threads'\n\nimport {renderDocumentWorker} from './renderDocumentWorker/renderDocumentWorker.js'\n\n// If we're not in a worker thread, throw an error\nif (!parentPort || !workerData) {\n throw new Error('Must be used as a Worker with a valid options object in worker data')\n}\n\nrenderDocumentWorker(parentPort, workerData)\n"],"names":["parentPort","workerData","renderDocumentWorker","Error"],"mappings":"AAAA,SAAQA,UAAU,EAAEC,UAAU,QAAO,sBAAqB;AAE1D,SAAQC,oBAAoB,QAAO,iDAAgD;AAEnF,kDAAkD;AAClD,IAAI,CAACF,cAAc,CAACC,YAAY;IAC9B,MAAM,IAAIE,MAAM;AAClB;AAEAD,qBAAqBF,YAAYC"}
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import { parse as parseHtml } from 'node-html-parser';
|
|
2
|
-
/**
|
|
3
|
-
* This script takes the import map from the `#__imports` script tag,
|
|
4
|
-
* modifies relevant URLs that match the sanity-cdn hostname by replacing
|
|
5
|
-
* the existing timestamp in the sanity-cdn URLs with a new runtime timestamp,
|
|
6
|
-
* and injects the modified import map back into the HTML.
|
|
7
|
-
*
|
|
8
|
-
* It also synchronously creates `<link rel="stylesheet">` tags for each CDN
|
|
9
|
-
* CSS URL with a fresh timestamp.
|
|
10
|
-
*
|
|
11
|
-
* This will be injected into the HTML of the user's bundle.
|
|
12
|
-
*
|
|
13
|
-
* Note that this is in a separate constants file to prevent "Cannot access
|
|
14
|
-
* before initialization" errors.
|
|
15
|
-
*/ const TIMESTAMPED_IMPORTMAP_INJECTOR_SCRIPT = `<script>
|
|
16
|
-
// auto-generated script to add import map with timestamp
|
|
17
|
-
const importsJson = document.getElementById('__imports')?.textContent;
|
|
18
|
-
const { imports = {}, css = [], ...rest } = importsJson ? JSON.parse(importsJson) : {};
|
|
19
|
-
const importMapEl = document.createElement('script');
|
|
20
|
-
importMapEl.type = 'importmap';
|
|
21
|
-
const newTimestamp = \`/t\${Math.floor(Date.now() / 1000)}\`;
|
|
22
|
-
|
|
23
|
-
function replaceTimestamp(urlStr) {
|
|
24
|
-
try {
|
|
25
|
-
const url = new URL(urlStr);
|
|
26
|
-
if (/^sanity-cdn\\.[a-zA-Z]+$/.test(url.hostname)) {
|
|
27
|
-
url.pathname = url.pathname.replace(/\\/t\\d+/, newTimestamp);
|
|
28
|
-
}
|
|
29
|
-
return url.toString();
|
|
30
|
-
} catch {
|
|
31
|
-
return urlStr;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
importMapEl.textContent = JSON.stringify({
|
|
36
|
-
imports: Object.fromEntries(
|
|
37
|
-
Object.entries(imports).map(([specifier, path]) => [specifier, replaceTimestamp(path)])
|
|
38
|
-
),
|
|
39
|
-
...rest,
|
|
40
|
-
});
|
|
41
|
-
document.head.appendChild(importMapEl);
|
|
42
|
-
|
|
43
|
-
// Creates <link rel="stylesheet"> tags with fresh timestamps.
|
|
44
|
-
for (const cssUrl of css) {
|
|
45
|
-
const linkEl = document.createElement('link');
|
|
46
|
-
linkEl.rel = 'stylesheet';
|
|
47
|
-
linkEl.href = replaceTimestamp(cssUrl);
|
|
48
|
-
document.head.appendChild(linkEl);
|
|
49
|
-
}
|
|
50
|
-
</script>`;
|
|
51
|
-
/**
|
|
52
|
-
* @internal
|
|
53
|
-
*/ export function addTimestampedImportMapScriptToHtml(html, importMap, autoUpdatesCssUrls) {
|
|
54
|
-
if (!importMap) return html;
|
|
55
|
-
let root = parseHtml(html);
|
|
56
|
-
let htmlEl = root.querySelector('html');
|
|
57
|
-
if (!htmlEl) {
|
|
58
|
-
const oldRoot = root;
|
|
59
|
-
root = parseHtml('<html></html>');
|
|
60
|
-
htmlEl = root.querySelector('html');
|
|
61
|
-
htmlEl.append(oldRoot);
|
|
62
|
-
}
|
|
63
|
-
let headEl = htmlEl.querySelector('head');
|
|
64
|
-
if (!headEl) {
|
|
65
|
-
htmlEl.insertAdjacentHTML('afterbegin', '<head></head>');
|
|
66
|
-
headEl = root.querySelector('head');
|
|
67
|
-
}
|
|
68
|
-
// Include CSS URLs in the __imports JSON so the runtime script can create
|
|
69
|
-
// <link> tags with fresh timestamps synchronously during head parsing.
|
|
70
|
-
const importMapWithCss = autoUpdatesCssUrls && autoUpdatesCssUrls.length > 0 ? {
|
|
71
|
-
...importMap,
|
|
72
|
-
css: autoUpdatesCssUrls
|
|
73
|
-
} : importMap;
|
|
74
|
-
headEl.insertAdjacentHTML('beforeend', `<script type="application/json" id="__imports">${JSON.stringify(importMapWithCss)}</script>`);
|
|
75
|
-
headEl.insertAdjacentHTML('beforeend', TIMESTAMPED_IMPORTMAP_INJECTOR_SCRIPT);
|
|
76
|
-
return root.outerHTML;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
//# sourceMappingURL=addTimestampImportMapScriptToHtml.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/actions/build/renderDocumentWorker/addTimestampImportMapScriptToHtml.ts"],"sourcesContent":["import {parse as parseHtml} from 'node-html-parser'\n\n/**\n * This script takes the import map from the `#__imports` script tag,\n * modifies relevant URLs that match the sanity-cdn hostname by replacing\n * the existing timestamp in the sanity-cdn URLs with a new runtime timestamp,\n * and injects the modified import map back into the HTML.\n *\n * It also synchronously creates `<link rel=\"stylesheet\">` tags for each CDN\n * CSS URL with a fresh timestamp.\n *\n * This will be injected into the HTML of the user's bundle.\n *\n * Note that this is in a separate constants file to prevent \"Cannot access\n * before initialization\" errors.\n */\nconst TIMESTAMPED_IMPORTMAP_INJECTOR_SCRIPT = `<script>\n // auto-generated script to add import map with timestamp\n const importsJson = document.getElementById('__imports')?.textContent;\n const { imports = {}, css = [], ...rest } = importsJson ? JSON.parse(importsJson) : {};\n const importMapEl = document.createElement('script');\n importMapEl.type = 'importmap';\n const newTimestamp = \\`/t\\${Math.floor(Date.now() / 1000)}\\`;\n\n function replaceTimestamp(urlStr) {\n try {\n const url = new URL(urlStr);\n if (/^sanity-cdn\\\\.[a-zA-Z]+$/.test(url.hostname)) {\n url.pathname = url.pathname.replace(/\\\\/t\\\\d+/, newTimestamp);\n }\n return url.toString();\n } catch {\n return urlStr;\n }\n }\n\n importMapEl.textContent = JSON.stringify({\n imports: Object.fromEntries(\n Object.entries(imports).map(([specifier, path]) => [specifier, replaceTimestamp(path)])\n ),\n ...rest,\n });\n document.head.appendChild(importMapEl);\n\n // Creates <link rel=\"stylesheet\"> tags with fresh timestamps.\n for (const cssUrl of css) {\n const linkEl = document.createElement('link');\n linkEl.rel = 'stylesheet';\n linkEl.href = replaceTimestamp(cssUrl);\n document.head.appendChild(linkEl);\n }\n</script>`\n\n/**\n * @internal\n */\nexport function addTimestampedImportMapScriptToHtml(\n html: string,\n importMap?: {imports?: Record<string, string>},\n autoUpdatesCssUrls?: string[],\n): string {\n if (!importMap) return html\n\n let root = parseHtml(html)\n let htmlEl = root.querySelector('html')\n if (!htmlEl) {\n const oldRoot = root\n root = parseHtml('<html></html>')\n htmlEl = root.querySelector('html')!\n htmlEl.append(oldRoot)\n }\n\n let headEl = htmlEl.querySelector('head')\n\n if (!headEl) {\n htmlEl.insertAdjacentHTML('afterbegin', '<head></head>')\n headEl = root.querySelector('head')!\n }\n\n // Include CSS URLs in the __imports JSON so the runtime script can create\n // <link> tags with fresh timestamps synchronously during head parsing.\n const importMapWithCss =\n autoUpdatesCssUrls && autoUpdatesCssUrls.length > 0\n ? {...importMap, css: autoUpdatesCssUrls}\n : importMap\n\n headEl.insertAdjacentHTML(\n 'beforeend',\n `<script type=\"application/json\" id=\"__imports\">${JSON.stringify(importMapWithCss)}</script>`,\n )\n\n headEl.insertAdjacentHTML('beforeend', TIMESTAMPED_IMPORTMAP_INJECTOR_SCRIPT)\n return root.outerHTML\n}\n"],"names":["parse","parseHtml","TIMESTAMPED_IMPORTMAP_INJECTOR_SCRIPT","addTimestampedImportMapScriptToHtml","html","importMap","autoUpdatesCssUrls","root","htmlEl","querySelector","oldRoot","append","headEl","insertAdjacentHTML","importMapWithCss","length","css","JSON","stringify","outerHTML"],"mappings":"AAAA,SAAQA,SAASC,SAAS,QAAO,mBAAkB;AAEnD;;;;;;;;;;;;;CAaC,GACD,MAAMC,wCAAwC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SAmCtC,CAAC;AAEV;;CAEC,GACD,OAAO,SAASC,oCACdC,IAAY,EACZC,SAA8C,EAC9CC,kBAA6B;IAE7B,IAAI,CAACD,WAAW,OAAOD;IAEvB,IAAIG,OAAON,UAAUG;IACrB,IAAII,SAASD,KAAKE,aAAa,CAAC;IAChC,IAAI,CAACD,QAAQ;QACX,MAAME,UAAUH;QAChBA,OAAON,UAAU;QACjBO,SAASD,KAAKE,aAAa,CAAC;QAC5BD,OAAOG,MAAM,CAACD;IAChB;IAEA,IAAIE,SAASJ,OAAOC,aAAa,CAAC;IAElC,IAAI,CAACG,QAAQ;QACXJ,OAAOK,kBAAkB,CAAC,cAAc;QACxCD,SAASL,KAAKE,aAAa,CAAC;IAC9B;IAEA,0EAA0E;IAC1E,uEAAuE;IACvE,MAAMK,mBACJR,sBAAsBA,mBAAmBS,MAAM,GAAG,IAC9C;QAAC,GAAGV,SAAS;QAAEW,KAAKV;IAAkB,IACtCD;IAENO,OAAOC,kBAAkB,CACvB,aACA,CAAC,+CAA+C,EAAEI,KAAKC,SAAS,CAACJ,kBAAkB,SAAS,CAAC;IAG/FF,OAAOC,kBAAkB,CAAC,aAAaX;IACvC,OAAOK,KAAKY,SAAS;AACvB"}
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* App HTML Document, this is in the _internal package
|
|
3
|
-
* to avoid importing styled-components from sanity package
|
|
4
|
-
*/ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
5
|
-
import { Favicons } from './Favicons.js';
|
|
6
|
-
import { GlobalErrorHandler } from './GlobalErrorHandler.js';
|
|
7
|
-
import { NoJavascript } from './NoJavascript.js';
|
|
8
|
-
const EMPTY_ARRAY = [];
|
|
9
|
-
/**
|
|
10
|
-
* This is the equivalent of DefaultDocument for non-studio apps.
|
|
11
|
-
* @internal
|
|
12
|
-
*/ export function BasicDocument(props) {
|
|
13
|
-
const { css = EMPTY_ARRAY, entryPath, title } = props;
|
|
14
|
-
return /*#__PURE__*/ _jsxs("html", {
|
|
15
|
-
lang: "en",
|
|
16
|
-
children: [
|
|
17
|
-
/*#__PURE__*/ _jsxs("head", {
|
|
18
|
-
children: [
|
|
19
|
-
/*#__PURE__*/ _jsx("meta", {
|
|
20
|
-
charSet: "utf-8"
|
|
21
|
-
}),
|
|
22
|
-
/*#__PURE__*/ _jsx("meta", {
|
|
23
|
-
content: "width=device-width, initial-scale=1, viewport-fit=cover",
|
|
24
|
-
name: "viewport"
|
|
25
|
-
}),
|
|
26
|
-
/*#__PURE__*/ _jsx("meta", {
|
|
27
|
-
content: "noindex",
|
|
28
|
-
name: "robots"
|
|
29
|
-
}),
|
|
30
|
-
/*#__PURE__*/ _jsx("meta", {
|
|
31
|
-
content: "same-origin",
|
|
32
|
-
name: "referrer"
|
|
33
|
-
}),
|
|
34
|
-
/*#__PURE__*/ _jsx(Favicons, {}),
|
|
35
|
-
/*#__PURE__*/ _jsx("title", {
|
|
36
|
-
children: title || 'Sanity App'
|
|
37
|
-
}),
|
|
38
|
-
/*#__PURE__*/ _jsx(GlobalErrorHandler, {}),
|
|
39
|
-
css.map((href)=>/*#__PURE__*/ _jsx("link", {
|
|
40
|
-
href: href,
|
|
41
|
-
rel: "stylesheet"
|
|
42
|
-
}, href))
|
|
43
|
-
]
|
|
44
|
-
}),
|
|
45
|
-
/*#__PURE__*/ _jsxs("body", {
|
|
46
|
-
children: [
|
|
47
|
-
/*#__PURE__*/ _jsx("div", {
|
|
48
|
-
id: "root"
|
|
49
|
-
}),
|
|
50
|
-
/*#__PURE__*/ _jsx("script", {
|
|
51
|
-
src: entryPath,
|
|
52
|
-
type: "module"
|
|
53
|
-
}),
|
|
54
|
-
/*#__PURE__*/ _jsx(NoJavascript, {})
|
|
55
|
-
]
|
|
56
|
-
})
|
|
57
|
-
]
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
//# sourceMappingURL=BasicDocument.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/actions/build/renderDocumentWorker/components/BasicDocument.tsx"],"sourcesContent":["/**\n * App HTML Document, this is in the _internal package\n * to avoid importing styled-components from sanity package\n */\n\nimport {type JSX} from 'react'\n\nimport {Favicons} from './Favicons.js'\nimport {GlobalErrorHandler} from './GlobalErrorHandler.js'\nimport {NoJavascript} from './NoJavascript.js'\n\n/**\n * @internal\n */\ninterface BasicDocumentProps {\n entryPath: string\n\n // Currently unused, but kept for potential future use\n basePath?: string\n\n css?: string[]\n title?: string\n}\n\nconst EMPTY_ARRAY: never[] = []\n\n/**\n * This is the equivalent of DefaultDocument for non-studio apps.\n * @internal\n */\nexport function BasicDocument(props: BasicDocumentProps): JSX.Element {\n const {css = EMPTY_ARRAY, entryPath, title} = props\n\n return (\n <html lang=\"en\">\n <head>\n <meta charSet=\"utf-8\" />\n <meta content=\"width=device-width, initial-scale=1, viewport-fit=cover\" name=\"viewport\" />\n <meta content=\"noindex\" name=\"robots\" />\n <meta content=\"same-origin\" name=\"referrer\" />\n\n <Favicons />\n <title>{title || 'Sanity App'}</title>\n <GlobalErrorHandler />\n\n {css.map((href) => (\n <link href={href} key={href} rel=\"stylesheet\" />\n ))}\n </head>\n <body>\n <div id=\"root\" />\n <script src={entryPath} type=\"module\" />\n <NoJavascript />\n </body>\n </html>\n )\n}\n"],"names":["Favicons","GlobalErrorHandler","NoJavascript","EMPTY_ARRAY","BasicDocument","props","css","entryPath","title","html","lang","head","meta","charSet","content","name","map","href","link","rel","body","div","id","script","src","type"],"mappings":"AAAA;;;CAGC;AAID,SAAQA,QAAQ,QAAO,gBAAe;AACtC,SAAQC,kBAAkB,QAAO,0BAAyB;AAC1D,SAAQC,YAAY,QAAO,oBAAmB;AAe9C,MAAMC,cAAuB,EAAE;AAE/B;;;CAGC,GACD,OAAO,SAASC,cAAcC,KAAyB;IACrD,MAAM,EAACC,MAAMH,WAAW,EAAEI,SAAS,EAAEC,KAAK,EAAC,GAAGH;IAE9C,qBACE,MAACI;QAAKC,MAAK;;0BACT,MAACC;;kCACC,KAACC;wBAAKC,SAAQ;;kCACd,KAACD;wBAAKE,SAAQ;wBAA0DC,MAAK;;kCAC7E,KAACH;wBAAKE,SAAQ;wBAAUC,MAAK;;kCAC7B,KAACH;wBAAKE,SAAQ;wBAAcC,MAAK;;kCAEjC,KAACf;kCACD,KAACQ;kCAAOA,SAAS;;kCACjB,KAACP;oBAEAK,IAAIU,GAAG,CAAC,CAACC,qBACR,KAACC;4BAAKD,MAAMA;4BAAiBE,KAAI;2BAAVF;;;0BAG3B,MAACG;;kCACC,KAACC;wBAAIC,IAAG;;kCACR,KAACC;wBAAOC,KAAKjB;wBAAWkB,MAAK;;kCAC7B,KAACvB;;;;;AAIT"}
|
|
@@ -1,165 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Favicons } from './Favicons.js';
|
|
3
|
-
import { GlobalErrorHandler } from './GlobalErrorHandler.js';
|
|
4
|
-
import { NoJavascript } from './NoJavascript.js';
|
|
5
|
-
const globalStyles = `
|
|
6
|
-
@font-face {
|
|
7
|
-
font-family: Inter;
|
|
8
|
-
font-style: normal;
|
|
9
|
-
font-weight: 400;
|
|
10
|
-
font-display: swap;
|
|
11
|
-
src: url("https://studio-static.sanity.io/Inter-Regular.woff2") format("woff2");
|
|
12
|
-
}
|
|
13
|
-
@font-face {
|
|
14
|
-
font-family: Inter;
|
|
15
|
-
font-style: italic;
|
|
16
|
-
font-weight: 400;
|
|
17
|
-
font-display: swap;
|
|
18
|
-
src: url("https://studio-static.sanity.io/Inter-Italic.woff2") format("woff2");
|
|
19
|
-
}
|
|
20
|
-
@font-face {
|
|
21
|
-
font-family: Inter;
|
|
22
|
-
font-style: normal;
|
|
23
|
-
font-weight: 500;
|
|
24
|
-
font-display: swap;
|
|
25
|
-
src: url("https://studio-static.sanity.io/Inter-Medium.woff2") format("woff2");
|
|
26
|
-
}
|
|
27
|
-
@font-face {
|
|
28
|
-
font-family: Inter;
|
|
29
|
-
font-style: italic;
|
|
30
|
-
font-weight: 500;
|
|
31
|
-
font-display: swap;
|
|
32
|
-
src: url("https://studio-static.sanity.io/Inter-MediumItalic.woff2") format("woff2");
|
|
33
|
-
}
|
|
34
|
-
@font-face {
|
|
35
|
-
font-family: Inter;
|
|
36
|
-
font-style: normal;
|
|
37
|
-
font-weight: 600;
|
|
38
|
-
font-display: swap;
|
|
39
|
-
src: url("https://studio-static.sanity.io/Inter-SemiBold.woff2") format("woff2");
|
|
40
|
-
}
|
|
41
|
-
@font-face {
|
|
42
|
-
font-family: Inter;
|
|
43
|
-
font-style: italic;
|
|
44
|
-
font-weight: 600;
|
|
45
|
-
font-display: swap;
|
|
46
|
-
src: url("https://studio-static.sanity.io/Inter-SemiBoldItalic.woff2") format("woff2");
|
|
47
|
-
}
|
|
48
|
-
@font-face {
|
|
49
|
-
font-family: Inter;
|
|
50
|
-
font-style: normal;
|
|
51
|
-
font-weight: 700;
|
|
52
|
-
font-display: swap;
|
|
53
|
-
src: url("https://studio-static.sanity.io/Inter-Bold.woff2") format("woff2");
|
|
54
|
-
}
|
|
55
|
-
@font-face {
|
|
56
|
-
font-family: Inter;
|
|
57
|
-
font-style: italic;
|
|
58
|
-
font-weight: 700;
|
|
59
|
-
font-display: swap;
|
|
60
|
-
src: url("https://studio-static.sanity.io/Inter-BoldItalic.woff2") format("woff2");
|
|
61
|
-
}
|
|
62
|
-
@font-face {
|
|
63
|
-
font-family: Inter;
|
|
64
|
-
font-style: normal;
|
|
65
|
-
font-weight: 800;
|
|
66
|
-
font-display: swap;
|
|
67
|
-
src: url("https://studio-static.sanity.io/Inter-ExtraBold.woff2") format("woff2");
|
|
68
|
-
}
|
|
69
|
-
@font-face {
|
|
70
|
-
font-family: Inter;
|
|
71
|
-
font-style: italic;
|
|
72
|
-
font-weight: 800;
|
|
73
|
-
font-display: swap;
|
|
74
|
-
src: url("https://studio-static.sanity.io/Inter-ExtraBoldItalic.woff2") format("woff2");
|
|
75
|
-
}
|
|
76
|
-
@font-face {
|
|
77
|
-
font-family: Inter;
|
|
78
|
-
font-style: normal;
|
|
79
|
-
font-weight: 900;
|
|
80
|
-
font-display: swap;
|
|
81
|
-
src: url("https://studio-static.sanity.io/Inter-Black.woff2") format("woff2");
|
|
82
|
-
}
|
|
83
|
-
@font-face {
|
|
84
|
-
font-family: Inter;
|
|
85
|
-
font-style: italic;
|
|
86
|
-
font-weight: 900;
|
|
87
|
-
font-display: swap;
|
|
88
|
-
src: url("https://studio-static.sanity.io/Inter-BlackItalic.woff2") format("woff2");
|
|
89
|
-
}
|
|
90
|
-
html {
|
|
91
|
-
@media (prefers-color-scheme: dark) {
|
|
92
|
-
background-color: #13141b;
|
|
93
|
-
}
|
|
94
|
-
@media (prefers-color-scheme: light) {
|
|
95
|
-
background-color: #ffffff;
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
html,
|
|
99
|
-
body,
|
|
100
|
-
#sanity {
|
|
101
|
-
height: 100%;
|
|
102
|
-
}
|
|
103
|
-
body {
|
|
104
|
-
margin: 0;
|
|
105
|
-
-webkit-font-smoothing: antialiased;
|
|
106
|
-
}
|
|
107
|
-
`;
|
|
108
|
-
const EMPTY_ARRAY = [];
|
|
109
|
-
/**
|
|
110
|
-
* @internal
|
|
111
|
-
*/ export function DefaultDocument(props) {
|
|
112
|
-
const { css = EMPTY_ARRAY, entryPath } = props;
|
|
113
|
-
return /*#__PURE__*/ _jsxs("html", {
|
|
114
|
-
lang: "en",
|
|
115
|
-
children: [
|
|
116
|
-
/*#__PURE__*/ _jsxs("head", {
|
|
117
|
-
children: [
|
|
118
|
-
/*#__PURE__*/ _jsx("meta", {
|
|
119
|
-
charSet: "utf-8"
|
|
120
|
-
}),
|
|
121
|
-
/*#__PURE__*/ _jsx("meta", {
|
|
122
|
-
content: "width=device-width, initial-scale=1, maximum-scale=1, viewport-fit=cover",
|
|
123
|
-
name: "viewport"
|
|
124
|
-
}),
|
|
125
|
-
/*#__PURE__*/ _jsx("meta", {
|
|
126
|
-
content: "noindex",
|
|
127
|
-
name: "robots"
|
|
128
|
-
}),
|
|
129
|
-
/*#__PURE__*/ _jsx("meta", {
|
|
130
|
-
content: "same-origin",
|
|
131
|
-
name: "referrer"
|
|
132
|
-
}),
|
|
133
|
-
/*#__PURE__*/ _jsx(Favicons, {}),
|
|
134
|
-
/*#__PURE__*/ _jsx("title", {
|
|
135
|
-
children: "Sanity Studio"
|
|
136
|
-
}),
|
|
137
|
-
/*#__PURE__*/ _jsx(GlobalErrorHandler, {}),
|
|
138
|
-
css.map((href)=>/*#__PURE__*/ _jsx("link", {
|
|
139
|
-
href: href,
|
|
140
|
-
rel: "stylesheet"
|
|
141
|
-
}, href)),
|
|
142
|
-
/*#__PURE__*/ _jsx("style", {
|
|
143
|
-
dangerouslySetInnerHTML: {
|
|
144
|
-
__html: globalStyles
|
|
145
|
-
}
|
|
146
|
-
})
|
|
147
|
-
]
|
|
148
|
-
}),
|
|
149
|
-
/*#__PURE__*/ _jsxs("body", {
|
|
150
|
-
children: [
|
|
151
|
-
/*#__PURE__*/ _jsx("div", {
|
|
152
|
-
id: "sanity"
|
|
153
|
-
}),
|
|
154
|
-
/*#__PURE__*/ _jsx("script", {
|
|
155
|
-
src: entryPath,
|
|
156
|
-
type: "module"
|
|
157
|
-
}),
|
|
158
|
-
/*#__PURE__*/ _jsx(NoJavascript, {})
|
|
159
|
-
]
|
|
160
|
-
})
|
|
161
|
-
]
|
|
162
|
-
});
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
//# sourceMappingURL=DefaultDocument.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/actions/build/renderDocumentWorker/components/DefaultDocument.tsx"],"sourcesContent":["import {Favicons} from './Favicons.js'\nimport {GlobalErrorHandler} from './GlobalErrorHandler.js'\nimport {NoJavascript} from './NoJavascript.js'\n\nconst globalStyles = `\n @font-face {\n font-family: Inter;\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(\"https://studio-static.sanity.io/Inter-Regular.woff2\") format(\"woff2\");\n }\n @font-face {\n font-family: Inter;\n font-style: italic;\n font-weight: 400;\n font-display: swap;\n src: url(\"https://studio-static.sanity.io/Inter-Italic.woff2\") format(\"woff2\");\n }\n @font-face {\n font-family: Inter;\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(\"https://studio-static.sanity.io/Inter-Medium.woff2\") format(\"woff2\");\n }\n @font-face {\n font-family: Inter;\n font-style: italic;\n font-weight: 500;\n font-display: swap;\n src: url(\"https://studio-static.sanity.io/Inter-MediumItalic.woff2\") format(\"woff2\");\n }\n @font-face {\n font-family: Inter;\n font-style: normal;\n font-weight: 600;\n font-display: swap;\n src: url(\"https://studio-static.sanity.io/Inter-SemiBold.woff2\") format(\"woff2\");\n }\n @font-face {\n font-family: Inter;\n font-style: italic;\n font-weight: 600;\n font-display: swap;\n src: url(\"https://studio-static.sanity.io/Inter-SemiBoldItalic.woff2\") format(\"woff2\");\n }\n @font-face {\n font-family: Inter;\n font-style: normal;\n font-weight: 700;\n font-display: swap;\n src: url(\"https://studio-static.sanity.io/Inter-Bold.woff2\") format(\"woff2\");\n }\n @font-face {\n font-family: Inter;\n font-style: italic;\n font-weight: 700;\n font-display: swap;\n src: url(\"https://studio-static.sanity.io/Inter-BoldItalic.woff2\") format(\"woff2\");\n }\n @font-face {\n font-family: Inter;\n font-style: normal;\n font-weight: 800;\n font-display: swap;\n src: url(\"https://studio-static.sanity.io/Inter-ExtraBold.woff2\") format(\"woff2\");\n }\n @font-face {\n font-family: Inter;\n font-style: italic;\n font-weight: 800;\n font-display: swap;\n src: url(\"https://studio-static.sanity.io/Inter-ExtraBoldItalic.woff2\") format(\"woff2\");\n }\n @font-face {\n font-family: Inter;\n font-style: normal;\n font-weight: 900;\n font-display: swap;\n src: url(\"https://studio-static.sanity.io/Inter-Black.woff2\") format(\"woff2\");\n }\n @font-face {\n font-family: Inter;\n font-style: italic;\n font-weight: 900;\n font-display: swap;\n src: url(\"https://studio-static.sanity.io/Inter-BlackItalic.woff2\") format(\"woff2\");\n }\n html {\n @media (prefers-color-scheme: dark) {\n background-color: #13141b;\n }\n @media (prefers-color-scheme: light) {\n background-color: #ffffff;\n }\n }\n html,\n body,\n #sanity {\n height: 100%;\n }\n body {\n margin: 0;\n -webkit-font-smoothing: antialiased;\n }\n`\n\n/**\n * @hidden\n * @beta\n */\nexport interface DefaultDocumentProps {\n entryPath: string\n\n // Currently unused, but kept for potential future use\n basePath?: string\n\n css?: string[]\n}\n\nconst EMPTY_ARRAY: never[] = []\n\n/**\n * @internal\n */\nexport function DefaultDocument(props: DefaultDocumentProps): React.JSX.Element {\n const {css = EMPTY_ARRAY, entryPath} = props\n\n return (\n <html lang=\"en\">\n <head>\n <meta charSet=\"utf-8\" />\n <meta\n content=\"width=device-width, initial-scale=1, maximum-scale=1, viewport-fit=cover\"\n name=\"viewport\"\n />\n <meta content=\"noindex\" name=\"robots\" />\n <meta content=\"same-origin\" name=\"referrer\" />\n\n <Favicons />\n\n <title>Sanity Studio</title>\n\n <GlobalErrorHandler />\n\n {css.map((href) => (\n <link href={href} key={href} rel=\"stylesheet\" />\n ))}\n <style dangerouslySetInnerHTML={{__html: globalStyles}} />\n </head>\n <body>\n <div id=\"sanity\" />\n <script src={entryPath} type=\"module\" />\n <NoJavascript />\n </body>\n </html>\n )\n}\n"],"names":["Favicons","GlobalErrorHandler","NoJavascript","globalStyles","EMPTY_ARRAY","DefaultDocument","props","css","entryPath","html","lang","head","meta","charSet","content","name","title","map","href","link","rel","style","dangerouslySetInnerHTML","__html","body","div","id","script","src","type"],"mappings":";AAAA,SAAQA,QAAQ,QAAO,gBAAe;AACtC,SAAQC,kBAAkB,QAAO,0BAAyB;AAC1D,SAAQC,YAAY,QAAO,oBAAmB;AAE9C,MAAMC,eAAe,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsGtB,CAAC;AAeD,MAAMC,cAAuB,EAAE;AAE/B;;CAEC,GACD,OAAO,SAASC,gBAAgBC,KAA2B;IACzD,MAAM,EAACC,MAAMH,WAAW,EAAEI,SAAS,EAAC,GAAGF;IAEvC,qBACE,MAACG;QAAKC,MAAK;;0BACT,MAACC;;kCACC,KAACC;wBAAKC,SAAQ;;kCACd,KAACD;wBACCE,SAAQ;wBACRC,MAAK;;kCAEP,KAACH;wBAAKE,SAAQ;wBAAUC,MAAK;;kCAC7B,KAACH;wBAAKE,SAAQ;wBAAcC,MAAK;;kCAEjC,KAACf;kCAED,KAACgB;kCAAM;;kCAEP,KAACf;oBAEAM,IAAIU,GAAG,CAAC,CAACC,qBACR,KAACC;4BAAKD,MAAMA;4BAAiBE,KAAI;2BAAVF;kCAEzB,KAACG;wBAAMC,yBAAyB;4BAACC,QAAQpB;wBAAY;;;;0BAEvD,MAACqB;;kCACC,KAACC;wBAAIC,IAAG;;kCACR,KAACC;wBAAOC,KAAKpB;wBAAWqB,MAAK;;kCAC7B,KAAC3B;;;;;AAIT"}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
export function Favicons() {
|
|
3
|
-
const base = '/static';
|
|
4
|
-
return /*#__PURE__*/ _jsxs(_Fragment, {
|
|
5
|
-
children: [
|
|
6
|
-
/*#__PURE__*/ _jsx("link", {
|
|
7
|
-
href: `${base}/favicon.ico`,
|
|
8
|
-
rel: "icon",
|
|
9
|
-
sizes: "any"
|
|
10
|
-
}),
|
|
11
|
-
/*#__PURE__*/ _jsx("link", {
|
|
12
|
-
href: `${base}/favicon.svg`,
|
|
13
|
-
rel: "icon",
|
|
14
|
-
type: "image/svg+xml"
|
|
15
|
-
}),
|
|
16
|
-
/*#__PURE__*/ _jsx("link", {
|
|
17
|
-
href: `${base}/apple-touch-icon.png`,
|
|
18
|
-
rel: "apple-touch-icon"
|
|
19
|
-
}),
|
|
20
|
-
/*#__PURE__*/ _jsx("link", {
|
|
21
|
-
href: `${base}/manifest.webmanifest`,
|
|
22
|
-
rel: "manifest"
|
|
23
|
-
})
|
|
24
|
-
]
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
//# sourceMappingURL=Favicons.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/actions/build/renderDocumentWorker/components/Favicons.tsx"],"sourcesContent":["import {type JSX} from 'react'\n\nexport function Favicons(): JSX.Element {\n const base = '/static'\n return (\n <>\n <link href={`${base}/favicon.ico`} rel=\"icon\" sizes=\"any\" />\n <link href={`${base}/favicon.svg`} rel=\"icon\" type=\"image/svg+xml\" />\n <link href={`${base}/apple-touch-icon.png`} rel=\"apple-touch-icon\" />\n <link href={`${base}/manifest.webmanifest`} rel=\"manifest\" />\n </>\n )\n}\n"],"names":["Favicons","base","link","href","rel","sizes","type"],"mappings":";AAEA,OAAO,SAASA;IACd,MAAMC,OAAO;IACb,qBACE;;0BACE,KAACC;gBAAKC,MAAM,GAAGF,KAAK,YAAY,CAAC;gBAAEG,KAAI;gBAAOC,OAAM;;0BACpD,KAACH;gBAAKC,MAAM,GAAGF,KAAK,YAAY,CAAC;gBAAEG,KAAI;gBAAOE,MAAK;;0BACnD,KAACJ;gBAAKC,MAAM,GAAGF,KAAK,qBAAqB,CAAC;gBAAEG,KAAI;;0BAChD,KAACF;gBAAKC,MAAM,GAAGF,KAAK,qBAAqB,CAAC;gBAAEG,KAAI;;;;AAGtD"}
|
|
@@ -1,178 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
const errorHandlerScript = `
|
|
3
|
-
;(function () {
|
|
4
|
-
var _caughtErrors = []
|
|
5
|
-
|
|
6
|
-
var errorChannel = (function () {
|
|
7
|
-
var subscribers = []
|
|
8
|
-
|
|
9
|
-
function publish(msg) {
|
|
10
|
-
for (var i = 0; i < subscribers.length; i += 1) {
|
|
11
|
-
subscribers[i](msg)
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
function subscribe(subscriber) {
|
|
16
|
-
subscribers.push(subscriber)
|
|
17
|
-
|
|
18
|
-
return function () {
|
|
19
|
-
var idx = subscribers.indexOf(subscriber)
|
|
20
|
-
|
|
21
|
-
if (idx > -1) {
|
|
22
|
-
subscribers.splice(idx, 1)
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
return {publish, subscribe, subscribers}
|
|
28
|
-
})()
|
|
29
|
-
|
|
30
|
-
// NOTE: Store the error channel instance in the global scope so that the application can
|
|
31
|
-
// access it and subscribe to errors.
|
|
32
|
-
window.__sanityErrorChannel = {
|
|
33
|
-
subscribe: errorChannel.subscribe,
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
function _nextTick(callback) {
|
|
37
|
-
setTimeout(callback, 0)
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
function _handleError(error, params) {
|
|
41
|
-
_nextTick(function () {
|
|
42
|
-
// - If there are error channel subscribers, then we notify them (no console error).
|
|
43
|
-
// - If there are no subscribers, then we log the error to the console and render the error overlay.
|
|
44
|
-
if (errorChannel.subscribers.length) {
|
|
45
|
-
errorChannel.publish({error, params})
|
|
46
|
-
} else {
|
|
47
|
-
console.error(error)
|
|
48
|
-
|
|
49
|
-
_renderErrorOverlay(error, params)
|
|
50
|
-
}
|
|
51
|
-
})
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
var ERROR_BOX_STYLE = [
|
|
55
|
-
'background: #fff',
|
|
56
|
-
'border-radius: 6px',
|
|
57
|
-
'box-sizing: border-box',
|
|
58
|
-
'color: #121923',
|
|
59
|
-
'flex: 1',
|
|
60
|
-
"font-family: -apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,'Helvetica Neue','Liberation Sans',Helvetica,Arial,system-ui,sans-serif",
|
|
61
|
-
'font-size: 16px',
|
|
62
|
-
'line-height: 21px',
|
|
63
|
-
'margin: 0 auto',
|
|
64
|
-
'max-width: 960px',
|
|
65
|
-
'max-height: 90dvh',
|
|
66
|
-
'overflow: auto',
|
|
67
|
-
'padding: 20px',
|
|
68
|
-
'width: 100%',
|
|
69
|
-
].join(';')
|
|
70
|
-
|
|
71
|
-
var ERROR_CODE_STYLE = [
|
|
72
|
-
'color: #972E2A',
|
|
73
|
-
"font-family: -apple-system-ui-monospace, 'SF Mono', Menlo, Monaco, Consolas, monospace",
|
|
74
|
-
'font-size: 13px',
|
|
75
|
-
'line-height: 17px',
|
|
76
|
-
'margin: 0',
|
|
77
|
-
].join(';')
|
|
78
|
-
|
|
79
|
-
function _renderErrorOverlay(error, params) {
|
|
80
|
-
var errorElement = document.querySelector('#__sanityError') || document.createElement('div')
|
|
81
|
-
var colno = params.event.colno
|
|
82
|
-
var lineno = params.event.lineno
|
|
83
|
-
var filename = params.event.filename
|
|
84
|
-
|
|
85
|
-
errorElement.id = '__sanityError'
|
|
86
|
-
errorElement.innerHTML = [
|
|
87
|
-
'<div style="' + ERROR_BOX_STYLE + '">',
|
|
88
|
-
'<div style="font-weight: 700;">Uncaught error: ' + error.message + '</div>',
|
|
89
|
-
'<div style="color: #515E72; font-size: 13px; line-height: 17px; margin: 10px 0;">' +
|
|
90
|
-
filename +
|
|
91
|
-
':' +
|
|
92
|
-
lineno +
|
|
93
|
-
':' +
|
|
94
|
-
colno +
|
|
95
|
-
'</div>',
|
|
96
|
-
'<pre style="' + ERROR_CODE_STYLE + '">' + error.stack + '</pre>',
|
|
97
|
-
'</div>',
|
|
98
|
-
].join('')
|
|
99
|
-
|
|
100
|
-
errorElement.style.position = 'fixed'
|
|
101
|
-
errorElement.style.zIndex = 1000000
|
|
102
|
-
errorElement.style.top = 0
|
|
103
|
-
errorElement.style.left = 0
|
|
104
|
-
errorElement.style.right = 0
|
|
105
|
-
errorElement.style.bottom = 0
|
|
106
|
-
errorElement.style.padding = '20px'
|
|
107
|
-
errorElement.style.background = 'rgba(16,17,18,0.66)'
|
|
108
|
-
errorElement.style.display = 'flex'
|
|
109
|
-
errorElement.style.alignItems = 'center'
|
|
110
|
-
errorElement.style.justifyContent = 'center'
|
|
111
|
-
|
|
112
|
-
document.body.appendChild(errorElement)
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
// NOTE:
|
|
116
|
-
// Yes – we're attaching 2 error listeners below 👀
|
|
117
|
-
// This is because React makes the same error throw twice (in development mode).
|
|
118
|
-
// See: https://github.com/facebook/react/issues/10384
|
|
119
|
-
|
|
120
|
-
// Error listener #1
|
|
121
|
-
window.onerror = function (event, source, lineno, colno, error) {
|
|
122
|
-
_nextTick(function () {
|
|
123
|
-
if (_caughtErrors.indexOf(error) !== -1) return
|
|
124
|
-
|
|
125
|
-
_caughtErrors.push(error)
|
|
126
|
-
|
|
127
|
-
_handleError(error, {
|
|
128
|
-
event,
|
|
129
|
-
lineno,
|
|
130
|
-
colno,
|
|
131
|
-
source,
|
|
132
|
-
})
|
|
133
|
-
|
|
134
|
-
_nextTick(function () {
|
|
135
|
-
var idx = _caughtErrors.indexOf(error)
|
|
136
|
-
|
|
137
|
-
if (idx > -1) _caughtErrors.splice(idx, 1)
|
|
138
|
-
})
|
|
139
|
-
})
|
|
140
|
-
|
|
141
|
-
// IMPORTANT: this callback must return \`true\` to prevent the error from being rendered in
|
|
142
|
-
// the browser’s console.
|
|
143
|
-
return true
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
// Error listener #2
|
|
147
|
-
window.addEventListener('error', function (event) {
|
|
148
|
-
if (_caughtErrors.indexOf(event.error) !== -1) return true
|
|
149
|
-
|
|
150
|
-
_caughtErrors.push(event.error)
|
|
151
|
-
|
|
152
|
-
_handleError(event.error, {
|
|
153
|
-
event,
|
|
154
|
-
lineno: event.lineno,
|
|
155
|
-
colno: event.colno,
|
|
156
|
-
})
|
|
157
|
-
|
|
158
|
-
_nextTick(function () {
|
|
159
|
-
_nextTick(function () {
|
|
160
|
-
var idx = _caughtErrors.indexOf(event.error)
|
|
161
|
-
|
|
162
|
-
if (idx > -1) _caughtErrors.splice(idx, 1)
|
|
163
|
-
})
|
|
164
|
-
})
|
|
165
|
-
|
|
166
|
-
return true
|
|
167
|
-
})
|
|
168
|
-
})()
|
|
169
|
-
`;
|
|
170
|
-
/** @internal */ export function GlobalErrorHandler() {
|
|
171
|
-
return /*#__PURE__*/ _jsx("script", {
|
|
172
|
-
dangerouslySetInnerHTML: {
|
|
173
|
-
__html: errorHandlerScript
|
|
174
|
-
}
|
|
175
|
-
});
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
//# sourceMappingURL=GlobalErrorHandler.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/actions/build/renderDocumentWorker/components/GlobalErrorHandler.tsx"],"sourcesContent":["import {type JSX} from 'react'\n\nconst errorHandlerScript = `\n;(function () {\n var _caughtErrors = []\n\n var errorChannel = (function () {\n var subscribers = []\n\n function publish(msg) {\n for (var i = 0; i < subscribers.length; i += 1) {\n subscribers[i](msg)\n }\n }\n\n function subscribe(subscriber) {\n subscribers.push(subscriber)\n\n return function () {\n var idx = subscribers.indexOf(subscriber)\n\n if (idx > -1) {\n subscribers.splice(idx, 1)\n }\n }\n }\n\n return {publish, subscribe, subscribers}\n })()\n\n // NOTE: Store the error channel instance in the global scope so that the application can\n // access it and subscribe to errors.\n window.__sanityErrorChannel = {\n subscribe: errorChannel.subscribe,\n }\n\n function _nextTick(callback) {\n setTimeout(callback, 0)\n }\n\n function _handleError(error, params) {\n _nextTick(function () {\n // - If there are error channel subscribers, then we notify them (no console error).\n // - If there are no subscribers, then we log the error to the console and render the error overlay.\n if (errorChannel.subscribers.length) {\n errorChannel.publish({error, params})\n } else {\n console.error(error)\n\n _renderErrorOverlay(error, params)\n }\n })\n }\n\n var ERROR_BOX_STYLE = [\n 'background: #fff',\n 'border-radius: 6px',\n 'box-sizing: border-box',\n 'color: #121923',\n 'flex: 1',\n \"font-family: -apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,'Helvetica Neue','Liberation Sans',Helvetica,Arial,system-ui,sans-serif\",\n 'font-size: 16px',\n 'line-height: 21px',\n 'margin: 0 auto',\n 'max-width: 960px',\n 'max-height: 90dvh',\n 'overflow: auto',\n 'padding: 20px',\n 'width: 100%',\n ].join(';')\n\n var ERROR_CODE_STYLE = [\n 'color: #972E2A',\n \"font-family: -apple-system-ui-monospace, 'SF Mono', Menlo, Monaco, Consolas, monospace\",\n 'font-size: 13px',\n 'line-height: 17px',\n 'margin: 0',\n ].join(';')\n\n function _renderErrorOverlay(error, params) {\n var errorElement = document.querySelector('#__sanityError') || document.createElement('div')\n var colno = params.event.colno\n var lineno = params.event.lineno\n var filename = params.event.filename\n\n errorElement.id = '__sanityError'\n errorElement.innerHTML = [\n '<div style=\"' + ERROR_BOX_STYLE + '\">',\n '<div style=\"font-weight: 700;\">Uncaught error: ' + error.message + '</div>',\n '<div style=\"color: #515E72; font-size: 13px; line-height: 17px; margin: 10px 0;\">' +\n filename +\n ':' +\n lineno +\n ':' +\n colno +\n '</div>',\n '<pre style=\"' + ERROR_CODE_STYLE + '\">' + error.stack + '</pre>',\n '</div>',\n ].join('')\n\n errorElement.style.position = 'fixed'\n errorElement.style.zIndex = 1000000\n errorElement.style.top = 0\n errorElement.style.left = 0\n errorElement.style.right = 0\n errorElement.style.bottom = 0\n errorElement.style.padding = '20px'\n errorElement.style.background = 'rgba(16,17,18,0.66)'\n errorElement.style.display = 'flex'\n errorElement.style.alignItems = 'center'\n errorElement.style.justifyContent = 'center'\n\n document.body.appendChild(errorElement)\n }\n\n // NOTE:\n // Yes – we're attaching 2 error listeners below 👀\n // This is because React makes the same error throw twice (in development mode).\n // See: https://github.com/facebook/react/issues/10384\n\n // Error listener #1\n window.onerror = function (event, source, lineno, colno, error) {\n _nextTick(function () {\n if (_caughtErrors.indexOf(error) !== -1) return\n\n _caughtErrors.push(error)\n\n _handleError(error, {\n event,\n lineno,\n colno,\n source,\n })\n\n _nextTick(function () {\n var idx = _caughtErrors.indexOf(error)\n\n if (idx > -1) _caughtErrors.splice(idx, 1)\n })\n })\n\n // IMPORTANT: this callback must return \\`true\\` to prevent the error from being rendered in\n // the browser’s console.\n return true\n }\n\n // Error listener #2\n window.addEventListener('error', function (event) {\n if (_caughtErrors.indexOf(event.error) !== -1) return true\n\n _caughtErrors.push(event.error)\n\n _handleError(event.error, {\n event,\n lineno: event.lineno,\n colno: event.colno,\n })\n\n _nextTick(function () {\n _nextTick(function () {\n var idx = _caughtErrors.indexOf(event.error)\n\n if (idx > -1) _caughtErrors.splice(idx, 1)\n })\n })\n\n return true\n })\n})()\n`\n\n/** @internal */\nexport function GlobalErrorHandler(): JSX.Element {\n return <script dangerouslySetInnerHTML={{__html: errorHandlerScript}} />\n}\n"],"names":["errorHandlerScript","GlobalErrorHandler","script","dangerouslySetInnerHTML","__html"],"mappings":";AAEA,MAAMA,qBAAqB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuK5B,CAAC;AAED,cAAc,GACd,OAAO,SAASC;IACd,qBAAO,KAACC;QAAOC,yBAAyB;YAACC,QAAQJ;QAAkB;;AACrE"}
|