{
  "version": 3,
  "sources": ["../../src/app/agent/utils/dimensions.ts", "../../src/document/crdt/featureChecker.ts", "../../src/web/lib/ProjectAPI.ts"],
  "sourcesContent": ["import { spacingScale, radiusScale } from \"@framerjs/fresco/tokens/dimensions\"\nimport type { DimensionOverrides } from \"@framerjs/fresco/tokens/dimensions\"\n\n// TODO: When agent experiment is removed we should revisit the spacing and radius scales.\nconst agentBaseSpacing = spacingScale[100]\nconst agentBaseRadius = radiusScale[180]\n\n// TODO: Remove this once the agent experiment is removed.\n// This ensures the type below matches what is expected instead of partially matching.\nexport interface AgentDimensionOverrides extends DimensionOverrides {\n\tpanelPadding: number\n\tpanelGap: number\n\tcontentTitleIndentation: number\n\n\tpopoverPadding: number\n\tpopoverGap: number\n\tpopoverRadius: number\n\n\tmodalPadding: number\n\tmodalGap: number\n\tmodalRadius: number\n\tmodalInnerRadius: number\n\tmodalHeaderHeight: number\n\tmodalWidth: number\n\tlargeModalWidth: number\n\n\ttooltipOffset: number\n\ttooltipBorderRadius: number\n\n\tfloatingWindowRadius: number\n\tfloatingToolbarMarginBottom: number\n\tsitesPanelHeaderHeight: number\n\twebBarHeight: number\n\tpopoverHeaderHeight: number\n\tsaveButtonWidth: number\n\n\tcmsSidebarPlusIconWrapperWidth: number\n}\n\nexport const agentDimensionTokenOverrides: AgentDimensionOverrides = {\n\tpanelPadding: agentBaseSpacing,\n\tpanelGap: agentBaseSpacing,\n\tcontentTitleIndentation: spacingScale[50],\n\n\tpopoverPadding: agentBaseSpacing,\n\tpopoverGap: agentBaseSpacing,\n\tpopoverRadius: agentBaseRadius,\n\n\tmodalPadding: agentBaseSpacing,\n\tmodalGap: agentBaseSpacing,\n\tmodalRadius: agentBaseRadius,\n\n\tfloatingWindowRadius: agentBaseRadius,\n\tfloatingToolbarMarginBottom: agentBaseSpacing,\n\tsitesPanelHeaderHeight: 50,\n\twebBarHeight: 50,\n\tpopoverHeaderHeight: 30,\n\tsaveButtonWidth: 53,\n\n\tmodalInnerRadius: radiusScale[80],\n\tmodalHeaderHeight: 50,\n\tmodalWidth: 260,\n\tlargeModalWidth: 320,\n\n\ttooltipOffset: spacingScale[100],\n\ttooltipBorderRadius: radiusScale[100],\n\n\tcmsSidebarPlusIconWrapperWidth: 25,\n}\n", "import { experiments } from \"app/experiments.ts\"\n\nexport function isCrdtAllowed() {\n\treturn true\n}\n\nexport function shouldUseCrdtForNewProjects() {\n\treturn experiments.isOn(\"enableCrdtForNewProjects\")\n}\n", "import type { ProjectBase, ProjectPublicAccess, ProjectType } from \"@framerjs/app-shared\"\nimport { isTeamTemplate, openNewTab } from \"@framerjs/app-shared\"\nimport type { NewProjectOptions } from \"@framerjs/shared\"\nimport { getNewProjectURL } from \"@framerjs/shared\"\nimport type { ProjectFeatureName } from \"app/projectFeatures.ts\"\nimport { shouldUseCrdtForNewProjects } from \"document/crdt/featureChecker.ts\"\nimport { apiFetcher } from \"web/lib/apiFetcher.ts\"\nimport { navigateTo } from \"./navigateTo.ts\"\n\nexport enum ArchivingErrorReason {\n\t/**\n\t * Means the project has active subscription (active, paid, non-enterprise license)\n\t * that needs to be cancelled first before archiving.\n\t */\n\tProjectHasActiveSubscription = \"project_has_active_subscription\",\n\n\t/**\n\t * Means the project has custom domain attached and user needs to remove the domain first.\n\t * We prevent archiving such projects to avoid cases where user would later delete the project\n\t * and need support to disconnect the domain.\n\t */\n\tProjectHasCustomDomainAttached = \"project_has_custom_domain_attached\",\n}\n\nexport function getDuplicateProjectEndpoint(project: ProjectBase, options: NewProjectOptions = {}) {\n\tconst spaceId = project.space.scope !== \"user\" ? project.space.id : undefined\n\tlet collectionId: string | undefined\n\tif (isTeamTemplate(project)) {\n\t\t// Block creating new templates\n\t\tcollectionId = \"recent\"\n\t} else if (project.collection) {\n\t\tcollectionId = project.collection.id\n\t}\n\treturn getNewProjectURL({ ...options, duplicateFrom: project.id, spaceId, collectionId })\n}\n\n// TODO: Remove \"crdt\" once CRDT is fully shipped; this only keeps temporary backend conversion requests typeable.\ntype CanvasFeatures = Record<ProjectFeatureName | \"crdt\", boolean>\nexport interface ProjectUpdateOptions {\n\tarchived?: boolean\n\tcanvasFeatures?: Partial<CanvasFeatures>\n\tcollectionId?: string | null\n\townerId?: string\n\tpublicAccess?: ProjectPublicAccess\n\treleaseChannel?: \"alpha\" | \"beta\" | \"stable\" | null\n\tteamId?: string\n\ttitle?: string\n\ttype?: ProjectType.Default // ProjectType.Template is deprecated. We should not be creating templates anymore\n}\n\nexport function updateProject(projectId: string, changes: ProjectUpdateOptions): Promise<void> {\n\treturn apiFetcher.put(`/web/v2/projects/${projectId}`, changes)\n}\n\nexport async function openNewProject(options: NewProjectOptions, newTab: boolean = false): Promise<void> {\n\tconst opts = { ...options }\n\tif (shouldUseCrdtForNewProjects()) {\n\t\topts.crdt = true\n\t}\n\n\tconst url = getNewProjectURL(opts)\n\tnewTab ? openNewTab(url) : navigateTo(url)\n}\n\nexport async function leaveProject(projectId: string) {\n\treturn apiFetcher.delete(`/web/projects/${projectId}/acl/me`)\n}\n\nexport async function deleteProject(projectId: string) {\n\treturn apiFetcher.delete(`/web/projects/${projectId}`)\n}\n"],
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;AAIA,IAAM,mBAAmB,aAAa,GAAG;AACzC,IAAM,kBAAkB,YAAY,GAAG;AAkChC,IAAM,+BAAwD;AAAA,EACpE,cAAc;AAAA,EACd,UAAU;AAAA,EACV,yBAAyB,aAAa,EAAE;AAAA,EAExC,gBAAgB;AAAA,EAChB,YAAY;AAAA,EACZ,eAAe;AAAA,EAEf,cAAc;AAAA,EACd,UAAU;AAAA,EACV,aAAa;AAAA,EAEb,sBAAsB;AAAA,EACtB,6BAA6B;AAAA,EAC7B,wBAAwB;AAAA,EACxB,cAAc;AAAA,EACd,qBAAqB;AAAA,EACrB,iBAAiB;AAAA,EAEjB,kBAAkB,YAAY,EAAE;AAAA,EAChC,mBAAmB;AAAA,EACnB,YAAY;AAAA,EACZ,iBAAiB;AAAA,EAEjB,eAAe,aAAa,GAA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