sanity 3.74.2-corel.18 → 3.74.2-coreui.20

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.
Files changed (121) hide show
  1. package/lib/_chunks-cjs/runtime.js +8 -4
  2. package/lib/_chunks-cjs/runtime.js.map +1 -1
  3. package/lib/_chunks-cjs/version.js +1 -1
  4. package/lib/_chunks-es/version.mjs +1 -1
  5. package/lib/_legacy/version.esm.js +1 -1
  6. package/package.json +10 -11
  7. package/src/_internal/cli/server/renderDocument.tsx +12 -0
  8. package/src/_internal/cli/server/runtime.ts +13 -10
  9. package/src/_internal/cli/server/vite/plugin-sanity-build-entries.ts +14 -12
  10. package/dist/BroadcastDisplayedDocument-BHYI8o6u.mjs +0 -19
  11. package/dist/BroadcastDisplayedDocument-BHYI8o6u.mjs.map +0 -1
  12. package/dist/DisplayedDocumentBroadcaster-DfHPxc7C.mjs +0 -58
  13. package/dist/DisplayedDocumentBroadcaster-DfHPxc7C.mjs.map +0 -1
  14. package/dist/LiveQueries-sYvgBCKh.mjs +0 -267
  15. package/dist/LiveQueries-sYvgBCKh.mjs.map +0 -1
  16. package/dist/LoaderQueries-AQneabiG.mjs +0 -581
  17. package/dist/LoaderQueries-AQneabiG.mjs.map +0 -1
  18. package/dist/Observable-wwWYwtkh.mjs +0 -551
  19. package/dist/Observable-wwWYwtkh.mjs.map +0 -1
  20. package/dist/PostMessageDocuments-DLMdHDk6.mjs +0 -75
  21. package/dist/PostMessageDocuments-DLMdHDk6.mjs.map +0 -1
  22. package/dist/PostMessageFeatures-CazMQz3f.mjs +0 -21
  23. package/dist/PostMessageFeatures-CazMQz3f.mjs.map +0 -1
  24. package/dist/PostMessagePerspective-m4uZ6sI5.mjs +0 -23
  25. package/dist/PostMessagePerspective-m4uZ6sI5.mjs.map +0 -1
  26. package/dist/PostMessagePreviewSnapshots-Dr7CEAiM.mjs +0 -66
  27. package/dist/PostMessagePreviewSnapshots-Dr7CEAiM.mjs.map +0 -1
  28. package/dist/PostMessageRefreshMutations-CWb9UqSy.mjs +0 -66
  29. package/dist/PostMessageRefreshMutations-CWb9UqSy.mjs.map +0 -1
  30. package/dist/PostMessageSchema-BVFyZOH1.mjs +0 -514
  31. package/dist/PostMessageSchema-BVFyZOH1.mjs.map +0 -1
  32. package/dist/PostMessageTelemetry-CSluBvcC.mjs +0 -51
  33. package/dist/PostMessageTelemetry-CSluBvcC.mjs.map +0 -1
  34. package/dist/PresentationToolGrantsCheck-4zo266wj.mjs +0 -3919
  35. package/dist/PresentationToolGrantsCheck-4zo266wj.mjs.map +0 -1
  36. package/dist/QRCodeSVG-D6VfGEbM.mjs +0 -648
  37. package/dist/QRCodeSVG-D6VfGEbM.mjs.map +0 -1
  38. package/dist/SourceContext-T8zcpOpp.mjs +0 -33
  39. package/dist/SourceContext-T8zcpOpp.mjs.map +0 -1
  40. package/dist/StructureToolProvider-BMLps71e.mjs +0 -13815
  41. package/dist/StructureToolProvider-BMLps71e.mjs.map +0 -1
  42. package/dist/Subject-DP0DoUP_.mjs +0 -108
  43. package/dist/Subject-DP0DoUP_.mjs.map +0 -1
  44. package/dist/ViteDevServerStopped-DdibXNvO.mjs +0 -44
  45. package/dist/ViteDevServerStopped-DdibXNvO.mjs.map +0 -1
  46. package/dist/_createContext.mjs +0 -36
  47. package/dist/_createContext.mjs.map +0 -1
  48. package/dist/_singletons.mjs +0 -195
  49. package/dist/_singletons.mjs.map +0 -1
  50. package/dist/browser-BzDH2pyp.mjs +0 -455
  51. package/dist/browser-BzDH2pyp.mjs.map +0 -1
  52. package/dist/browser-DWCoWoiH.mjs +0 -3988
  53. package/dist/browser-DWCoWoiH.mjs.map +0 -1
  54. package/dist/debounceTime-BeoKrERE.mjs +0 -130
  55. package/dist/debounceTime-BeoKrERE.mjs.map +0 -1
  56. package/dist/desk.mjs +0 -52
  57. package/dist/desk.mjs.map +0 -1
  58. package/dist/first-Di4GZDIY.mjs +0 -42
  59. package/dist/first-Di4GZDIY.mjs.map +0 -1
  60. package/dist/get-psIoeD-z.mjs +0 -327
  61. package/dist/get-psIoeD-z.mjs.map +0 -1
  62. package/dist/hooks-4sgcd521.mjs +0 -90
  63. package/dist/hooks-4sgcd521.mjs.map +0 -1
  64. package/dist/index-9PJcXUTv.mjs +0 -87
  65. package/dist/index-9PJcXUTv.mjs.map +0 -1
  66. package/dist/index-ByFK-IwD.mjs +0 -528
  67. package/dist/index-ByFK-IwD.mjs.map +0 -1
  68. package/dist/index-C2OAo3To.mjs +0 -7079
  69. package/dist/index-C2OAo3To.mjs.map +0 -1
  70. package/dist/index-C3OvVLVP.mjs +0 -4636
  71. package/dist/index-C3OvVLVP.mjs.map +0 -1
  72. package/dist/index-DBPVDKJN.mjs +0 -1198
  73. package/dist/index-DBPVDKJN.mjs.map +0 -1
  74. package/dist/index-DkvUNBNf.mjs +0 -73
  75. package/dist/index-DkvUNBNf.mjs.map +0 -1
  76. package/dist/index-Sp9w8lMg.mjs +0 -118
  77. package/dist/index-Sp9w8lMg.mjs.map +0 -1
  78. package/dist/index.browser-BxT2qp9y.mjs +0 -104
  79. package/dist/index.browser-BxT2qp9y.mjs.map +0 -1
  80. package/dist/index.mjs +0 -129019
  81. package/dist/index.mjs.map +0 -1
  82. package/dist/isObservable-ByOheaM8.mjs +0 -8
  83. package/dist/isObservable-ByOheaM8.mjs.map +0 -1
  84. package/dist/never-ChKjLemk.mjs +0 -6
  85. package/dist/never-ChKjLemk.mjs.map +0 -1
  86. package/dist/pane-C4tskUPg.mjs +0 -5
  87. package/dist/pane-C4tskUPg.mjs.map +0 -1
  88. package/dist/pane-Dhx8FvsK.mjs +0 -5
  89. package/dist/pane-Dhx8FvsK.mjs.map +0 -1
  90. package/dist/presentation-CSS9GR9X.mjs +0 -984
  91. package/dist/presentation-CSS9GR9X.mjs.map +0 -1
  92. package/dist/presentation.mjs +0 -14
  93. package/dist/presentation.mjs.map +0 -1
  94. package/dist/resources-4cbq8YlR.mjs +0 -124
  95. package/dist/resources-4cbq8YlR.mjs.map +0 -1
  96. package/dist/resources-BVETz6Ur.mjs +0 -57
  97. package/dist/resources-BVETz6Ur.mjs.map +0 -1
  98. package/dist/resources-D4AaU75F.mjs +0 -434
  99. package/dist/resources-D4AaU75F.mjs.map +0 -1
  100. package/dist/resources-Dc-6ZcPg.mjs +0 -157
  101. package/dist/resources-Dc-6ZcPg.mjs.map +0 -1
  102. package/dist/resources-DgU0prBM.mjs +0 -179
  103. package/dist/resources-DgU0prBM.mjs.map +0 -1
  104. package/dist/resources-MD8RsYhH.mjs +0 -288
  105. package/dist/resources-MD8RsYhH.mjs.map +0 -1
  106. package/dist/router.mjs +0 -689
  107. package/dist/router.mjs.map +0 -1
  108. package/dist/share-bcOpIdQz.mjs +0 -71
  109. package/dist/share-bcOpIdQz.mjs.map +0 -1
  110. package/dist/shareReplay-Dj1O6fKV.mjs +0 -43
  111. package/dist/shareReplay-Dj1O6fKV.mjs.map +0 -1
  112. package/dist/stegaEncodeSourceMap-DXdUZQye.mjs +0 -342
  113. package/dist/stegaEncodeSourceMap-DXdUZQye.mjs.map +0 -1
  114. package/dist/structure.mjs +0 -56
  115. package/dist/structure.mjs.map +0 -1
  116. package/dist/takeUntil-CgZP1bze.mjs +0 -111
  117. package/dist/takeUntil-CgZP1bze.mjs.map +0 -1
  118. package/dist/v4-C78sE4Gb.mjs +0 -27082
  119. package/dist/v4-C78sE4Gb.mjs.map +0 -1
  120. package/dist/version-D7UZEoYI.mjs +0 -5
  121. package/dist/version-D7UZEoYI.mjs.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"index-DBPVDKJN.mjs","sources":["../../../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/pairwise.js","../src/structure/components/paneRouter/ChildLink.tsx","../src/structure/components/paneRouter/ParameterizedLink.tsx","../src/structure/components/paneRouter/ReferenceChildLink.tsx","../src/structure/components/paneRouter/PaneRouterProvider.tsx","../src/structure/structureResolvers/PaneResolutionError.ts","../src/structure/structureResolvers/assignId.ts","../src/structure/structureResolvers/createPaneResolver.ts","../src/structure/structureResolvers/memoBind.ts","../src/structure/structureResolvers/resolveIntent.ts","../src/structure/structureResolvers/createResolvedPaneNodeStream.ts","../src/structure/structureResolvers/useResolvedPanes.ts","../src/structure/components/structureTool/intentResolver/utils.ts","../src/structure/components/structureTool/intentResolver/IntentResolver.tsx","../src/structure/components/structureTool/StructureError.tsx","../src/structure/panes/unknown/UnknownPaneType.tsx","../src/structure/panes/StructureToolPane.tsx","../src/structure/components/structureTool/NoDocumentTypesScreen.tsx","../src/structure/components/structureTool/StructureTitle.tsx","../src/structure/components/structureTool/StructureTool.tsx","../src/structure/components/structureTool/StructureToolBoundary.tsx"],"sourcesContent":["import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function pairwise() {\n return operate(function (source, subscriber) {\n var prev;\n var hasPrev = false;\n source.subscribe(createOperatorSubscriber(subscriber, function (value) {\n var p = prev;\n prev = value;\n hasPrev && subscriber.next([p, value]);\n hasPrev = true;\n }));\n });\n}\n//# sourceMappingURL=pairwise.js.map","import {type ForwardedRef, forwardRef, useContext} from 'react'\nimport {PaneRouterContext} from 'sanity/_singletons'\nimport {StateLink} from 'sanity/router'\n\nimport {type ChildLinkProps} from './types'\n\n/**\n * @internal\n */\nexport const ChildLink = forwardRef(function ChildLink(\n props: ChildLinkProps,\n ref: ForwardedRef<HTMLAnchorElement>,\n) {\n const {childId, childPayload, childParameters, ...rest} = props\n const {routerPanesState, groupIndex} = useContext(PaneRouterContext)\n\n return (\n <StateLink\n {...rest}\n ref={ref}\n state={{\n panes: [\n ...routerPanesState.slice(0, groupIndex + 1),\n [{id: childId, params: childParameters, payload: childPayload}],\n ],\n }}\n />\n )\n})\n","import {type ForwardedRef, forwardRef, type ReactNode, useContext, useMemo} from 'react'\nimport {useUnique} from 'sanity'\nimport {PaneRouterContext} from 'sanity/_singletons'\nimport {StateLink} from 'sanity/router'\n\ninterface ParameterizedLinkProps {\n params?: Record<string, string>\n payload?: unknown\n children?: ReactNode\n}\n\n/**\n * @internal\n */\nexport const ParameterizedLink = forwardRef(function ParameterizedLink(\n props: ParameterizedLinkProps,\n ref: ForwardedRef<HTMLAnchorElement>,\n) {\n const {routerPanesState: currentPanes, groupIndex, siblingIndex} = useContext(PaneRouterContext)\n const {params, payload, ...rest} = props\n const nextParams = useUnique(params)\n const nextPayload = useUnique(payload)\n\n const nextState = useMemo(() => {\n const currentGroup = currentPanes[groupIndex]\n const currentSibling = currentGroup[siblingIndex]\n\n const nextSibling = {\n ...currentSibling,\n params: nextParams ?? currentSibling.params,\n payload: nextPayload ?? currentSibling.payload,\n }\n\n const nextGroup = [\n ...currentGroup.slice(0, siblingIndex),\n nextSibling,\n ...currentGroup.slice(siblingIndex + 1),\n ]\n\n const nextPanes = [\n ...currentPanes.slice(0, groupIndex),\n nextGroup,\n ...currentPanes.slice(groupIndex + 1),\n ]\n\n return {panes: nextPanes}\n }, [currentPanes, groupIndex, nextParams, nextPayload, siblingIndex])\n\n return <StateLink ref={ref} {...rest} state={nextState} />\n})\n","import {toString as pathToString} from '@sanity/util/paths'\nimport {type ForwardedRef, forwardRef} from 'react'\n\nimport {ChildLink} from './ChildLink'\nimport {type ReferenceChildLinkProps} from './types'\n\nexport const ReferenceChildLink = forwardRef(function ReferenceChildLink(\n {documentId, documentType, parentRefPath, children, template, ...rest}: ReferenceChildLinkProps,\n ref: ForwardedRef<HTMLAnchorElement>,\n) {\n return (\n <ChildLink\n {...rest}\n ref={ref}\n childId={documentId}\n childPayload={template?.params}\n childParameters={{\n type: documentType,\n parentRefPath: pathToString(parentRefPath),\n ...(template && {template: template?.id}),\n }}\n >\n {children}\n </ChildLink>\n )\n})\n","import {toString as pathToString} from '@sanity/util/paths'\nimport {omit} from 'lodash'\nimport {type ReactNode, useCallback, useMemo} from 'react'\nimport {PaneRouterContext} from 'sanity/_singletons'\nimport {useRouter, useRouterState} from 'sanity/router'\n\nimport {type RouterPaneGroup, type RouterPanes, type RouterPaneSibling} from '../../types'\nimport {usePaneLayout} from '../pane/usePaneLayout'\nimport {BackLink} from './BackLink'\nimport {ChildLink} from './ChildLink'\nimport {ParameterizedLink} from './ParameterizedLink'\nimport {ReferenceChildLink} from './ReferenceChildLink'\nimport {type PaneRouterContextValue} from './types'\n\nconst emptyArray: never[] = []\n\n/**\n * @internal\n */\nexport function PaneRouterProvider(props: {\n children: ReactNode\n flatIndex: number\n index: number\n params: Record<string, string | undefined>\n payload: unknown\n siblingIndex: number\n}) {\n const {children, flatIndex, index, params, payload, siblingIndex} = props\n const {navigate, navigateIntent, resolvePathFromState} = useRouter()\n const routerState = useRouterState()\n const {panes, expand} = usePaneLayout()\n const routerPaneGroups: RouterPaneGroup[] = useMemo(\n () => (routerState?.panes || emptyArray) as RouterPanes,\n [routerState?.panes],\n )\n const lastPane = useMemo(() => panes?.[panes.length - 2], [panes])\n\n const groupIndex = index - 1\n\n const createNextRouterState = useCallback(\n (modifier: (siblings: RouterPaneGroup, item: RouterPaneSibling) => RouterPaneGroup) => {\n const currentGroup = routerPaneGroups[groupIndex] || []\n const currentItem = currentGroup[siblingIndex]\n const nextGroup = modifier(currentGroup, currentItem)\n const nextPanes = [\n ...routerPaneGroups.slice(0, groupIndex),\n nextGroup,\n ...routerPaneGroups.slice(groupIndex + 1),\n ]\n const nextRouterState = {...(routerState || {}), panes: nextPanes}\n\n return nextRouterState\n },\n [groupIndex, routerPaneGroups, routerState, siblingIndex],\n )\n\n const modifyCurrentGroup = useCallback(\n (modifier: (siblings: RouterPaneGroup, item: RouterPaneSibling) => RouterPaneGroup) => {\n const nextRouterState = createNextRouterState(modifier)\n setTimeout(() => navigate(nextRouterState), 0)\n return nextRouterState\n },\n [createNextRouterState, navigate],\n )\n\n const createPathWithParams: PaneRouterContextValue['createPathWithParams'] = useCallback(\n (nextParams) => {\n const nextRouterState = createNextRouterState((siblings, item) => [\n ...siblings.slice(0, siblingIndex),\n {...item, params: nextParams},\n ...siblings.slice(siblingIndex + 1),\n ])\n\n return resolvePathFromState(nextRouterState)\n },\n [createNextRouterState, resolvePathFromState, siblingIndex],\n )\n\n const setPayload: PaneRouterContextValue['setPayload'] = useCallback(\n (nextPayload) => {\n modifyCurrentGroup((siblings, item) => [\n ...siblings.slice(0, siblingIndex),\n {...item, payload: nextPayload},\n ...siblings.slice(siblingIndex + 1),\n ])\n },\n [modifyCurrentGroup, siblingIndex],\n )\n\n const setParams: PaneRouterContextValue['setParams'] = useCallback(\n (nextParams) => {\n modifyCurrentGroup((siblings, item) => [\n ...siblings.slice(0, siblingIndex),\n {...item, params: nextParams},\n ...siblings.slice(siblingIndex + 1),\n ])\n },\n [modifyCurrentGroup, siblingIndex],\n )\n\n const handleEditReference: PaneRouterContextValue['handleEditReference'] = useCallback(\n ({id, parentRefPath, type, template}) => {\n navigate({\n panes: [\n ...routerPaneGroups.slice(0, groupIndex + 1),\n [\n {\n id,\n params: {template: template.id, parentRefPath: pathToString(parentRefPath), type},\n payload: template.params,\n },\n ],\n ],\n })\n },\n [groupIndex, navigate, routerPaneGroups],\n )\n\n const ctx: PaneRouterContextValue = useMemo(\n () => ({\n // Zero-based index (position) of pane, visually\n index: flatIndex,\n\n // Zero-based index of pane group (within URL structure)\n groupIndex,\n\n // Zero-based index of pane within sibling group\n siblingIndex,\n\n // Payload of the current pane\n payload,\n\n // Params of the current pane\n params,\n\n // Whether or not the pane has any siblings (within the same group)\n hasGroupSiblings: routerPaneGroups[groupIndex]\n ? routerPaneGroups[groupIndex].length > 1\n : false,\n\n // The length of the current group\n groupLength: routerPaneGroups[groupIndex] ? routerPaneGroups[groupIndex].length : 0,\n\n // Current router state for the \"panes\" property\n routerPanesState: routerPaneGroups,\n\n // Curried StateLink that passes the correct state automatically\n ChildLink,\n\n // Curried StateLink that pops off the last pane group\n // Only pass if this is not the first pane\n BackLink: flatIndex ? BackLink : undefined,\n\n // A specialized `ChildLink` that takes in the needed props to open a\n // referenced document to the right\n ReferenceChildLink,\n\n // Similar to `ReferenceChildLink` expect without the wrapping component\n handleEditReference,\n\n // Curried StateLink that passed the correct state, but merges params/payload\n ParameterizedLink,\n\n // Replaces the current pane with a new one\n replaceCurrent: (opts = {}): void => {\n modifyCurrentGroup(() => [\n {id: opts.id || '', payload: opts.payload, params: opts.params || {}},\n ])\n },\n\n // Removes the current pane from the group\n closeCurrent: (): void => {\n modifyCurrentGroup((siblings, item) =>\n siblings.length > 1 ? siblings.filter((sibling) => sibling !== item) : siblings,\n )\n },\n\n // Removes all panes to the right including current\n closeCurrentAndAfter: (expandLast = true): void => {\n if (expandLast && lastPane) {\n expand(lastPane.element)\n }\n navigate({\n panes: [...routerPaneGroups.slice(0, groupIndex)],\n })\n },\n\n // Duplicate the current pane, with optional overrides for payload, parameters\n duplicateCurrent: (options): void => {\n modifyCurrentGroup((siblings, item) => {\n const duplicatedItem = {\n ...item,\n payload: options?.payload || item.payload,\n params: options?.params || item.params,\n }\n\n return [\n ...siblings.slice(0, siblingIndex),\n duplicatedItem,\n ...siblings.slice(siblingIndex),\n ]\n })\n },\n\n // Set the view for the current pane\n setView: (viewId) => {\n const restParams = omit(params, 'view')\n return setParams(viewId ? {...restParams, view: viewId} : restParams)\n },\n\n // Set the parameters for the current pane\n setParams,\n\n // Set the payload for the current pane\n setPayload,\n\n // A function that returns a path with the given parameters\n createPathWithParams,\n\n // Proxied navigation to a given intent. Consider just exposing `router` instead?\n navigateIntent,\n }),\n [\n flatIndex,\n groupIndex,\n siblingIndex,\n payload,\n params,\n routerPaneGroups,\n handleEditReference,\n setParams,\n setPayload,\n createPathWithParams,\n navigateIntent,\n modifyCurrentGroup,\n lastPane,\n navigate,\n expand,\n ],\n )\n\n return <PaneRouterContext.Provider value={ctx}>{children}</PaneRouterContext.Provider>\n}\n","import {type RouterPaneSiblingContext} from '../types'\n\nexport interface PaneResolutionErrorOptions {\n message: string\n context?: RouterPaneSiblingContext\n helpId?: string\n cause?: Error\n}\n\n/**\n * An error thrown during pane resolving. This error is meant to be bubbled up\n * through react and handled in an error boundary. It includes a `cause`\n * property which is the original error caught\n */\nexport class PaneResolutionError extends Error {\n cause: Error | undefined\n context: RouterPaneSiblingContext | undefined\n helpId: string | undefined\n\n constructor({message, context, helpId, cause}: PaneResolutionErrorOptions) {\n super(message)\n this.name = 'PaneResolutionError'\n this.context = context\n this.helpId = helpId\n this.cause = cause\n }\n}\n","import {nanoid} from 'nanoid'\n\n// `WeakMap`s require the first type param to extend `object`\n// eslint-disable-next-line @typescript-eslint/ban-types\nconst randomIdCache = new WeakMap<object, string>()\n\n/**\n * given an object, this function randomly generates an ID and returns it. this\n * result is then saved in a WeakMap so subsequent requests for the same object\n * will receive the same ID\n */\n// eslint-disable-next-line @typescript-eslint/ban-types\nexport function assignId(obj: object): string {\n const cachedValue = randomIdCache.get(obj)\n if (cachedValue) return cachedValue\n\n const id = nanoid()\n randomIdCache.set(obj, id)\n return id\n}\n","import {from, isObservable, type Observable, of as observableOf} from 'rxjs'\nimport {publishReplay, refCount, switchMap} from 'rxjs/operators'\nimport {isRecord} from 'sanity'\n\nimport {type PaneNode, type RouterPaneSiblingContext, type UnresolvedPaneNode} from '../types'\nimport {PaneResolutionError} from './PaneResolutionError'\n\ninterface Serializable {\n serialize: (...args: never[]) => unknown\n}\n\nconst isPromise = (thing: any): thing is PromiseLike<unknown> => {\n return !!thing && typeof thing?.then === 'function'\n}\nconst isSerializable = (thing: unknown): thing is Serializable => {\n if (!isRecord(thing)) return false\n return typeof thing.serialize === 'function'\n}\n\n/**\n * The signature of the function used to take an `UnresolvedPaneNode` and turn\n * it into an `Observable<PaneNode>`.\n */\nexport type PaneResolver = (\n unresolvedPane: UnresolvedPaneNode | undefined,\n context: RouterPaneSiblingContext,\n flatIndex: number,\n) => Observable<PaneNode>\n\nexport type PaneResolverMiddleware = (paneResolveFn: PaneResolver) => PaneResolver\n\nconst rethrowWithPaneResolutionErrors: PaneResolverMiddleware =\n (next) => (unresolvedPane, context, flatIndex) => {\n try {\n return next(unresolvedPane, context, flatIndex)\n } catch (e) {\n // re-throw errors that are already `PaneResolutionError`s\n if (e instanceof PaneResolutionError) {\n throw e\n }\n\n // anything else, wrap with `PaneResolutionError` and set the underlying\n // error as a the `cause`\n throw new PaneResolutionError({\n message: typeof e?.message === 'string' ? e.message : '',\n context,\n cause: e,\n })\n }\n }\n\nconst wrapWithPublishReplay: PaneResolverMiddleware =\n (next) =>\n (...args) => {\n return next(...args).pipe(\n // need to add publishReplay + refCount to ensure new subscribers always\n // get an emission. without this, memoized observables may get stuck\n // waiting for their first emissions resulting in a loading pane\n publishReplay(1),\n refCount(),\n )\n }\n\nexport function createPaneResolver(middleware: PaneResolverMiddleware): PaneResolver {\n // note: this API includes a middleware/wrapper function because the function\n // is recursive. we want to call the wrapped version of the function always\n // (even inside of nested calls) so the identifier invoked for the recursion\n // should be the wrapped version\n const resolvePane = rethrowWithPaneResolutionErrors(\n wrapWithPublishReplay(\n middleware((unresolvedPane, context, flatIndex) => {\n if (!unresolvedPane) {\n throw new PaneResolutionError({\n message: 'Pane returned no child',\n context,\n helpId: 'structure-item-returned-no-child',\n })\n }\n\n if (isPromise(unresolvedPane) || isObservable(unresolvedPane)) {\n return from(unresolvedPane).pipe(\n switchMap((result) => resolvePane(result, context, flatIndex)),\n )\n }\n\n if (isSerializable(unresolvedPane)) {\n return resolvePane(unresolvedPane.serialize(context), context, flatIndex)\n }\n\n if (typeof unresolvedPane === 'function') {\n return resolvePane(unresolvedPane(context.id, context), context, flatIndex)\n }\n\n return observableOf(unresolvedPane)\n }),\n ),\n )\n\n return resolvePane\n}\n","/* eslint-disable @typescript-eslint/ban-types */\n\n// `WeakMap`s require the first type param to extend `object`\nconst bindCache = new WeakMap<object, Map<string, Function>>()\n\n/**\n * An alternative to `obj.method.bind(obj)` that utilizes a weakmap to return\n * the same memory reference for sequent binds.\n */\nexport function memoBind<\n T extends object,\n K extends keyof {[P in keyof T]: T[P] extends Function ? T[P] : never},\n>(obj: T, methodKey: K): T[K]\nexport function memoBind(obj: Record<string, unknown>, methodKey: string): Function {\n const boundMethods = bindCache.get(obj) || new Map<string, Function>()\n if (boundMethods) {\n const bound = boundMethods.get(methodKey)\n if (bound) return bound\n }\n\n const method = obj[methodKey]\n\n if (typeof method !== 'function') {\n throw new Error(\n `Expected property \\`${methodKey}\\` to be a function but got ${typeof method} instead.`,\n )\n }\n\n const bound = method.bind(obj)\n boundMethods.set(methodKey, bound)\n bindCache.set(obj, boundMethods)\n\n return bound\n}\n","import {omit} from 'lodash'\nimport {firstValueFrom, type Observable} from 'rxjs'\n\nimport {type StructureContext} from '../structureBuilder'\nimport {\n type PaneNode,\n type RouterPanes,\n type RouterPaneSiblingContext,\n type UnresolvedPaneNode,\n} from '../types'\nimport {assignId} from './assignId'\nimport {createPaneResolver, type PaneResolverMiddleware} from './createPaneResolver'\nimport {memoBind} from './memoBind'\n\ninterface TraverseOptions {\n unresolvedPane: UnresolvedPaneNode | undefined\n intent: string\n params: {type: string; id: string; [key: string]: string | undefined}\n payload: unknown\n parent: PaneNode | null\n path: string[]\n currentId: string\n flatIndex: number\n levelIndex: number\n structureContext: StructureContext\n}\n\nexport interface ResolveIntentOptions {\n rootPaneNode?: UnresolvedPaneNode\n intent: string\n params: {type: string; id: string; [key: string]: string | undefined}\n payload: unknown\n structureContext: StructureContext\n}\n\n/**\n * Resolves an intent request using breadth first search. If a match is not\n * found, the intent will resolve to the fallback editor.\n *\n * A match is found if:\n * 1. the `PaneNode` is of type `document` and the its ID matches the intent ID\n * 2. the `PaneNode` is of type `documentList` and the `schemaTypeName` matches\n * 3. the `PaneNode`'s `canHandleIntent` method returns true\n *\n * If a `PaneNode` of type `list` is found, it will be searched for a match.\n *\n * @see PaneNode\n */\nexport async function resolveIntent(options: ResolveIntentOptions): Promise<RouterPanes> {\n const resolvedPaneCache = new Map<string, Observable<PaneNode>>()\n\n // this is a simple version of the memoizer in `createResolvedPaneNodeStream`\n const memoize: PaneResolverMiddleware = (nextFn) => (unresolvedPane, context, flatIndex) => {\n const key = unresolvedPane && `${assignId(unresolvedPane)}-${context.path.join('__')}`\n const cachedResolvedPane = key && resolvedPaneCache.get(key)\n if (cachedResolvedPane) return cachedResolvedPane\n\n const result = nextFn(unresolvedPane, context, flatIndex)\n if (key) resolvedPaneCache.set(key, result)\n return result\n }\n\n const resolvePane = createPaneResolver(memoize)\n\n const fallbackEditorPanes: RouterPanes = [\n [\n {\n id: `__edit__${options.params.id}`,\n params: {...omit(options.params, ['id']), type: options.params.type},\n payload: options.payload,\n },\n ],\n ]\n\n async function traverse({\n currentId,\n flatIndex,\n intent,\n params,\n parent,\n path,\n payload,\n unresolvedPane,\n levelIndex,\n structureContext,\n }: TraverseOptions): Promise<\n Array<{panes: RouterPanes; depthIndex: number; levelIndex: number}>\n > {\n if (!unresolvedPane) return []\n\n const {id: targetId, type: schemaTypeName, ...otherParams} = params\n const context: RouterPaneSiblingContext = {\n id: currentId,\n splitIndex: 0,\n parent,\n path,\n index: flatIndex,\n params: {},\n payload: undefined,\n structureContext,\n }\n const resolvedPane = await firstValueFrom(resolvePane(unresolvedPane, context, flatIndex))\n\n // if the resolved pane is a document pane and the pane's ID matches then\n // resolve the intent to the current path\n if (resolvedPane.type === 'document' && resolvedPane.id === targetId) {\n return [\n {\n panes: [\n ...path.slice(0, path.length - 1).map((i) => [{id: i}]),\n [{id: targetId, params: otherParams, payload}],\n ],\n depthIndex: path.length,\n levelIndex,\n },\n ]\n }\n\n // NOTE: if you update this logic, please also update the similar handler in\n // `getIntentState.ts`\n if (\n // if the resolve pane's `canHandleIntent` returns true, then resolve\n resolvedPane.canHandleIntent?.(intent, params, {\n pane: resolvedPane,\n index: flatIndex,\n }) ||\n // if the pane's `canHandleIntent` did not return true, then match against\n // this default case. we will resolve the intent if:\n (resolvedPane.type === 'documentList' &&\n // 1. the schema type matches (this required for the document to render)\n resolvedPane.schemaTypeName === schemaTypeName &&\n // 2. the filter is the default filter.\n //\n // NOTE: this case is to prevent false positive matches where the user\n // has configured a more specific filter for a particular type. In that\n // case, the user can implement their own `canHandleIntent` function\n resolvedPane.options.filter === '_type == $type')\n ) {\n return [\n {\n panes: [\n // map the current path to router panes\n ...path.map((id) => [{id}]),\n // then augment with the intents IDs and params\n [{id: params.id, params: otherParams, payload}],\n ],\n depthIndex: path.length,\n levelIndex,\n },\n ]\n }\n\n if (resolvedPane.type === 'list' && resolvedPane.child && resolvedPane.items) {\n return (\n await Promise.all(\n resolvedPane.items.map((item, nextLevelIndex) => {\n if (item.type === 'divider') return Promise.resolve([])\n\n return traverse({\n currentId: item._id || item.id,\n flatIndex: flatIndex + 1,\n intent,\n params,\n parent: resolvedPane,\n path: [...path, item.id],\n payload,\n unresolvedPane:\n typeof resolvedPane.child === 'function'\n ? memoBind(resolvedPane, 'child')\n : resolvedPane.child,\n levelIndex: nextLevelIndex,\n structureContext,\n })\n }),\n )\n ).flat()\n }\n\n return []\n }\n\n const matchingPanes = await traverse({\n currentId: 'root',\n flatIndex: 0,\n levelIndex: 0,\n intent: options.intent,\n params: options.params,\n parent: null,\n path: [],\n payload: options.payload,\n unresolvedPane: options.rootPaneNode,\n structureContext: options.structureContext,\n })\n\n const closestPaneToRoot = matchingPanes.sort((a, b) => {\n // break ties with the level index\n if (a.depthIndex === b.depthIndex) return a.levelIndex - b.levelIndex\n return a.depthIndex - b.depthIndex\n })[0]\n\n if (closestPaneToRoot) {\n return closestPaneToRoot.panes\n }\n\n return fallbackEditorPanes\n}\n","import {generateHelpUrl} from '@sanity/generate-help-url'\nimport {isEqual} from 'lodash'\nimport {concat, NEVER, type Observable, of as observableOf} from 'rxjs'\nimport {distinctUntilChanged, map, pairwise, scan, startWith, switchMap} from 'rxjs/operators'\n\nimport {type StructureContext} from '../structureBuilder'\nimport {\n type DocumentPaneNode,\n type PaneNode,\n type PaneNodeResolver,\n type RouterPanes,\n type RouterPaneSibling,\n type RouterPaneSiblingContext,\n type UnresolvedPaneNode,\n} from '../types'\nimport {assignId} from './assignId'\nimport {\n createPaneResolver,\n type PaneResolver,\n type PaneResolverMiddleware,\n} from './createPaneResolver'\nimport {memoBind} from './memoBind'\nimport {PaneResolutionError} from './PaneResolutionError'\n\n/**\n * the fallback editor child that is implicitly inserted into the structure tree\n * if the id starts with `__edit__`\n */\nconst fallbackEditorChild: PaneNodeResolver = (nodeId, context): DocumentPaneNode => {\n const id = nodeId.replace(/^__edit__/, '')\n const {\n params,\n payload,\n structureContext: {resolveDocumentNode},\n } = context\n const {type, template} = params\n\n if (!type) {\n throw new Error(\n `Document type for document with ID ${id} was not provided in the router params.`,\n )\n }\n\n let defaultDocumentBuilder = resolveDocumentNode({schemaType: type, documentId: id}).id('editor')\n\n if (template) {\n defaultDocumentBuilder = defaultDocumentBuilder.initialValueTemplate(\n template,\n payload as {[key: string]: unknown},\n )\n }\n\n return defaultDocumentBuilder.serialize() as DocumentPaneNode\n}\n\n/**\n * takes in a `RouterPaneSiblingContext` and returns a normalized string\n * representation that can be used for comparisons\n */\nfunction hashContext(context: RouterPaneSiblingContext): string {\n return `contextHash(${JSON.stringify({\n id: context.id,\n parentId: parent && assignId(parent),\n path: context.path,\n index: context.index,\n splitIndex: context.splitIndex,\n serializeOptionsIndex: context.serializeOptions?.index,\n serializeOptionsPath: context.serializeOptions?.path,\n })})`\n}\n\n/**\n * takes in `ResolvedPaneMeta` and returns a normalized string representation\n * that can be used for comparisons\n */\nconst hashResolvedPaneMeta = (meta: ResolvedPaneMeta): string => {\n const normalized = {\n type: meta.type,\n id: meta.routerPaneSibling.id,\n params: meta.routerPaneSibling.params || {},\n payload: meta.routerPaneSibling.payload || null,\n flatIndex: meta.flatIndex,\n groupIndex: meta.groupIndex,\n siblingIndex: meta.siblingIndex,\n path: meta.path,\n paneNode: meta.type === 'resolvedMeta' ? assignId(meta.paneNode) : null,\n }\n\n return `metaHash(${JSON.stringify(normalized)})`\n}\n\n/**\n * Represents one flattened \"router pane\", including the source group and\n * sibling indexes.\n *\n * @see RouterPanes\n */\ninterface FlattenedRouterPane {\n routerPaneSibling: RouterPaneSibling\n flatIndex: number\n groupIndex: number\n siblingIndex: number\n}\n\n/**\n * The state of the accumulator used to store and manage memo cache state\n */\ninterface CacheState {\n /**\n * Holds the memoization results keyed by a combination of `assignId` and a\n * context hash.\n */\n resolvedPaneCache: Map<string, Observable<PaneNode>>\n /**\n * Acts as a dictionary that stores cache keys by their flat index. This is\n * used to clean up the cache between different branches in the pane\n * structure.\n *\n * @see createResolvedPaneNodeStream look inside the `scan` where `wrapFn` is\n * defined\n */\n cacheKeysByFlatIndex: Array<Set<string>>\n /**\n * The resulting memoized `PaneResolver` function. This function closes over\n * the `resolvedPaneCache`.\n */\n resolvePane: PaneResolver\n flattenedRouterPanes: FlattenedRouterPane[]\n}\n\nexport interface CreateResolvedPaneNodeStreamOptions {\n /**\n * an input stream of `RouterPanes`\n * @see RouterPanes\n */\n routerPanesStream: Observable<RouterPanes>\n /**\n * any `UnresolvedPaneNode` (could be an observable, promise, pane resolver etc)\n */\n rootPaneNode: UnresolvedPaneNode\n /** used primarily for testing */\n initialCacheState?: CacheState\n\n structureContext: StructureContext\n}\n\n/**\n * The result of pane resolving\n */\nexport type ResolvedPaneMeta = {\n groupIndex: number\n siblingIndex: number\n flatIndex: number\n routerPaneSibling: RouterPaneSibling\n path: string[]\n} & ({type: 'loading'; paneNode: null} | {type: 'resolvedMeta'; paneNode: PaneNode})\n\ninterface ResolvePaneTreeOptions {\n resolvePane: PaneResolver\n flattenedRouterPanes: FlattenedRouterPane[]\n unresolvedPane: UnresolvedPaneNode | undefined\n parent: PaneNode | null\n path: string[]\n structureContext: StructureContext\n}\n\n/**\n * A recursive pane resolving function. Starts at one unresolved pane node and\n * continues until there is no more flattened router panes that can be used as\n * input to the unresolved panes.\n */\nfunction resolvePaneTree({\n unresolvedPane,\n flattenedRouterPanes,\n parent,\n path,\n resolvePane,\n structureContext,\n}: ResolvePaneTreeOptions): Observable<ResolvedPaneMeta[]> {\n const [current, ...rest] = flattenedRouterPanes\n const next = rest[0] as FlattenedRouterPane | undefined\n\n const context: RouterPaneSiblingContext = {\n id: current.routerPaneSibling.id,\n splitIndex: current.siblingIndex,\n parent,\n path: [...path, current.routerPaneSibling.id],\n index: current.flatIndex,\n params: current.routerPaneSibling.params || {},\n payload: current.routerPaneSibling.payload,\n structureContext,\n }\n\n try {\n return resolvePane(unresolvedPane, context, current.flatIndex).pipe(\n // this switch map receives a resolved pane\n switchMap((paneNode) => {\n // we can create a `resolvedMeta` type using it\n const resolvedPaneMeta: ResolvedPaneMeta = {\n type: 'resolvedMeta',\n ...current,\n paneNode: paneNode,\n path: context.path,\n }\n\n // for the other unresolved panes, we can create \"loading panes\"\n const loadingPanes = rest.map((i, restIndex) => {\n const loadingPanePath = [\n ...context.path,\n ...rest.slice(restIndex).map((_, currentIndex) => `[${i.flatIndex + currentIndex}]`),\n ]\n\n const loadingPane: ResolvedPaneMeta = {\n type: 'loading',\n path: loadingPanePath,\n paneNode: null,\n ...i,\n }\n\n return loadingPane\n })\n\n if (!rest.length) {\n return observableOf([resolvedPaneMeta])\n }\n\n let nextStream\n\n if (\n // the fallback editor case\n next?.routerPaneSibling.id.startsWith('__edit__')\n ) {\n nextStream = resolvePaneTree({\n unresolvedPane: fallbackEditorChild,\n flattenedRouterPanes: rest,\n parent,\n path: context.path,\n resolvePane,\n structureContext,\n })\n } else if (current.groupIndex === next?.groupIndex) {\n // if the next flattened router pane has the same group index as the\n // current flattened router pane, then the next flattened router pane\n // belongs to the same group (i.e. it is a split pane)\n nextStream = resolvePaneTree({\n unresolvedPane,\n flattenedRouterPanes: rest,\n parent,\n path,\n resolvePane,\n structureContext,\n })\n } else {\n // normal children resolving\n nextStream = resolvePaneTree({\n unresolvedPane:\n typeof paneNode.child === 'function'\n ? (memoBind(paneNode, 'child') as PaneNodeResolver)\n : paneNode.child,\n flattenedRouterPanes: rest,\n parent: paneNode,\n path: context.path,\n resolvePane,\n structureContext,\n })\n }\n\n return concat(\n // we emit the loading panes first in a concat (this emits immediately)\n observableOf([resolvedPaneMeta, ...loadingPanes]),\n // then whenever the next stream is done, the results will be combined.\n nextStream.pipe(map((nextResolvedPanes) => [resolvedPaneMeta, ...nextResolvedPanes])),\n )\n }),\n )\n } catch (e) {\n if (e instanceof PaneResolutionError) {\n if (e.context) {\n console.warn(\n `Pane resolution error at index ${e.context.index}${\n e.context.splitIndex > 0 ? ` for split pane index ${e.context.splitIndex}` : ''\n }: ${e.message}${e.helpId ? ` - see ${generateHelpUrl(e.helpId)}` : ''}`,\n e,\n )\n }\n\n if (e.helpId === 'structure-item-returned-no-child') {\n // returning an observable of an empty array will remove loading panes\n // note: this one intentionally does not throw\n return observableOf([])\n }\n }\n\n throw e\n }\n}\n\n/**\n * Takes in a stream of `RouterPanes` and an unresolved root pane and returns\n * a stream of `ResolvedPaneMeta`\n */\nexport function createResolvedPaneNodeStream({\n routerPanesStream,\n rootPaneNode,\n initialCacheState = {\n cacheKeysByFlatIndex: [],\n flattenedRouterPanes: [],\n resolvedPaneCache: new Map(),\n resolvePane: () => NEVER,\n },\n structureContext,\n}: CreateResolvedPaneNodeStreamOptions): Observable<ResolvedPaneMeta[]> {\n const resolvedPanes$ = routerPanesStream.pipe(\n // add in implicit \"root\" router pane\n map((rawRouterPanes) => [[{id: 'root'}], ...rawRouterPanes]),\n // create flattened router panes\n map((routerPanes) => {\n const flattenedRouterPanes: FlattenedRouterPane[] = routerPanes\n .flatMap((routerPaneGroup, groupIndex) =>\n routerPaneGroup.map((routerPaneSibling, siblingIndex) => ({\n routerPaneSibling,\n groupIndex,\n siblingIndex,\n })),\n )\n // add in the flat index\n .map((i, index) => ({...i, flatIndex: index}))\n\n return flattenedRouterPanes\n }),\n // calculate a \"diffIndex\" used for clearing the memo cache\n startWith([] as FlattenedRouterPane[]),\n pairwise(),\n map(([prev, curr]) => {\n for (let i = 0; i < curr.length; i++) {\n const prevValue = prev[i]\n const currValue = curr[i]\n\n if (!isEqual(prevValue, currValue)) {\n return {\n flattenedRouterPanes: curr,\n diffIndex: i,\n }\n }\n }\n\n return {\n flattenedRouterPanes: curr,\n diffIndex: curr.length,\n }\n }),\n // create the memoized `resolvePane` function and manage the memo cache\n scan((acc, next) => {\n const {cacheKeysByFlatIndex, resolvedPaneCache} = acc\n const {flattenedRouterPanes, diffIndex} = next\n\n // use the `cacheKeysByFlatIndex` like a dictionary to find cache keys to\n // and cache keys to delete\n const beforeDiffIndex = cacheKeysByFlatIndex.slice(0, diffIndex + 1)\n const afterDiffIndex = cacheKeysByFlatIndex.slice(diffIndex + 1)\n\n const keysToKeep = new Set(beforeDiffIndex.flatMap((keySet) => Array.from(keySet)))\n const keysToDelete = afterDiffIndex\n .flatMap((keySet) => Array.from(keySet))\n .filter((key) => !keysToKeep.has(key))\n\n for (const key of keysToDelete) {\n resolvedPaneCache.delete(key)\n }\n\n // create a memoizing pane resolver middleware that utilizes the cache\n // maintained above. this keeps the cache from growing indefinitely\n const memoize: PaneResolverMiddleware = (nextFn) => (unresolvedPane, context, flatIndex) => {\n const key = unresolvedPane && `${assignId(unresolvedPane)}-${hashContext(context)}`\n const cachedResolvedPane = key && resolvedPaneCache.get(key)\n if (cachedResolvedPane) return cachedResolvedPane\n\n const result = nextFn(unresolvedPane, context, flatIndex)\n if (!key) return result\n\n const cacheKeySet = cacheKeysByFlatIndex[flatIndex] || new Set()\n cacheKeySet.add(key)\n cacheKeysByFlatIndex[flatIndex] = cacheKeySet\n resolvedPaneCache.set(key, result)\n return result\n }\n\n return {\n flattenedRouterPanes,\n cacheKeysByFlatIndex,\n resolvedPaneCache,\n resolvePane: createPaneResolver(memoize),\n }\n }, initialCacheState),\n // run the memoized, recursive resolving\n switchMap(({flattenedRouterPanes, resolvePane}) =>\n resolvePaneTree({\n unresolvedPane: rootPaneNode,\n flattenedRouterPanes,\n parent: null,\n path: [],\n resolvePane,\n structureContext,\n }),\n ),\n )\n\n // after we've created a stream of `ResolvedPaneMeta[]`, we need to clean up\n // the results to remove unwanted loading panes and prevent unnecessary\n // emissions\n return resolvedPanes$.pipe(\n // this diffs the previous emission with the current one. if there is a new\n // loading pane at the same position where a previous pane already had a\n // resolved value (looking at the IDs to compare), then return the previous\n // pane instead of the loading pane\n scan(\n (prev, next) =>\n next.map((nextPane, index) => {\n const prevPane = prev[index] as ResolvedPaneMeta | undefined\n if (!prevPane) return nextPane\n if (nextPane.type !== 'loading') return nextPane\n\n if (prevPane.routerPaneSibling.id === nextPane.routerPaneSibling.id) {\n return prevPane\n }\n return nextPane\n }),\n [] as ResolvedPaneMeta[],\n ),\n // this prevents duplicate emissions\n distinctUntilChanged((prev, next) => {\n if (prev.length !== next.length) return false\n\n for (let i = 0; i < next.length; i++) {\n const prevValue = prev[i]\n const nextValue = next[i]\n if (hashResolvedPaneMeta(prevValue) !== hashResolvedPaneMeta(nextValue)) {\n return false\n }\n }\n\n return true\n }),\n )\n}\n","import {useEffect, useMemo, useState} from 'react'\nimport {ReplaySubject} from 'rxjs'\nimport {map} from 'rxjs/operators'\nimport {type RouterState, useRouter} from 'sanity/router'\n\nimport {LOADING_PANE} from '../constants'\nimport {type PaneNode, type RouterPaneGroup, type RouterPanes} from '../types'\nimport {useStructureTool} from '../useStructureTool'\nimport {createResolvedPaneNodeStream} from './createResolvedPaneNodeStream'\n\ninterface PaneData {\n active: boolean\n childItemId: string | null\n groupIndex: number\n index: number\n itemId: string\n key: string\n pane: PaneNode | typeof LOADING_PANE\n params: Record<string, string | undefined> & {perspective?: string}\n path: string\n payload: unknown\n selected: boolean\n siblingIndex: number\n}\n\nexport interface Panes {\n paneDataItems: PaneData[]\n routerPanes: RouterPanes\n resolvedPanes: (PaneNode | typeof LOADING_PANE)[]\n}\n\nfunction useRouterPanesStream() {\n const [routerStateSubject] = useState(() => new ReplaySubject<RouterState>(1))\n const routerPanes$ = useMemo(\n () =>\n routerStateSubject\n .asObservable()\n .pipe(map((_routerState) => (_routerState?.panes || []) as RouterPanes)),\n [routerStateSubject],\n )\n const {state: routerState} = useRouter()\n useEffect(() => {\n routerStateSubject.next(routerState)\n }, [routerState, routerStateSubject])\n\n return routerPanes$\n}\n\nexport function useResolvedPanes(): Panes {\n // used to propagate errors from async effect. throwing inside of the render\n // will bubble the error to react where it can be picked up by standard error\n // boundaries\n const [error, setError] = useState<unknown>()\n if (error) throw error\n\n const {structureContext, rootPaneNode} = useStructureTool()\n\n const [data, setData] = useState<Panes>({\n paneDataItems: [],\n resolvedPanes: [],\n routerPanes: [],\n })\n\n const routerPanesStream = useRouterPanesStream()\n\n useEffect(() => {\n const resolvedPanes$ = createResolvedPaneNodeStream({\n rootPaneNode,\n routerPanesStream,\n structureContext,\n }).pipe(\n map((resolvedPanes) => {\n const routerPanes = resolvedPanes.reduce<RouterPanes>((acc, next) => {\n const currentGroup = acc[next.groupIndex] || []\n currentGroup[next.siblingIndex] = next.routerPaneSibling\n acc[next.groupIndex] = currentGroup\n return acc\n }, [])\n\n const groupsLen = routerPanes.length\n\n const paneDataItems = resolvedPanes.map((pane) => {\n const {groupIndex, flatIndex, siblingIndex, routerPaneSibling, path} = pane\n const itemId = routerPaneSibling.id\n const nextGroup = routerPanes[groupIndex + 1] as RouterPaneGroup | undefined\n\n const paneDataItem: PaneData = {\n active: groupIndex === groupsLen - 2,\n childItemId: nextGroup?.[0].id ?? null,\n index: flatIndex,\n itemId: routerPaneSibling.id,\n groupIndex,\n key: `${\n pane.type === 'loading' ? 'unknown' : pane.paneNode.id\n }-${itemId}-${siblingIndex}`,\n pane: pane.type === 'loading' ? LOADING_PANE : pane.paneNode,\n params: routerPaneSibling.params || {},\n path: path.join(';'),\n payload: routerPaneSibling.payload,\n selected: flatIndex === resolvedPanes.length - 1,\n siblingIndex,\n }\n\n return paneDataItem\n })\n\n return {\n paneDataItems,\n routerPanes,\n resolvedPanes: paneDataItems.map((pane) => pane.pane),\n }\n }),\n )\n\n const subscription = resolvedPanes$.subscribe({\n next: (result) => setData(result),\n error: (e) => setError(e),\n })\n\n return () => subscription.unsubscribe()\n }, [rootPaneNode, routerPanesStream, structureContext])\n\n return data\n}\n","import {uuid} from '@sanity/uuid'\nimport {firstValueFrom, type Observable} from 'rxjs'\nimport {type DocumentStore, getPublishedId} from 'sanity'\n\nimport {PaneResolutionError} from '../../../structureResolvers'\n\nexport function removeDraftPrefix(documentId: string): string {\n const publishedId = getPublishedId(documentId)\n\n if (publishedId !== documentId) {\n console.warn(\n 'Removed unexpected draft id in document link: All links to documents should have the ' +\n '`drafts.`-prefix removed and something appears to have made an intent link to `%s`',\n documentId,\n )\n }\n\n return publishedId\n}\n\nexport async function ensureDocumentIdAndType(\n documentStore: DocumentStore,\n id: string | undefined,\n type: string | undefined,\n): Promise<{id: string; type: string}> {\n if (id && type) return {id, type}\n if (!id && type) return {id: uuid(), type}\n if (id && !type) {\n const resolvedType = await firstValueFrom(\n documentStore.resolveTypeForDocument(id) as Observable<string>,\n )\n\n return {id, type: resolvedType}\n }\n\n throw new PaneResolutionError({\n message: 'Neither document `id` or `type` was provided when trying to resolve intent.',\n })\n}\n","import {memo, useCallback, useEffect, useState} from 'react'\nimport {isRecord, useDocumentStore} from 'sanity'\nimport {useRouter, useRouterState} from 'sanity/router'\n\nimport {resolveIntent} from '../../../structureResolvers'\nimport {useStructureTool} from '../../../useStructureTool'\nimport {ensureDocumentIdAndType} from './utils'\n\nconst EMPTY_RECORD: Record<string, unknown> = {}\n\n/**\n * A component that receives an intent from props and redirects to the resolved\n * intent location (while showing a loading spinner during the process)\n */\nexport const IntentResolver = memo(function IntentResolver() {\n const {navigate} = useRouter()\n const maybeIntent = useRouterState(\n useCallback((routerState) => {\n const intentName = typeof routerState.intent === 'string' ? routerState.intent : undefined\n return intentName\n ? {\n intent: intentName,\n params: isRecord(routerState.params) ? routerState.params : EMPTY_RECORD,\n payload: routerState.payload,\n }\n : undefined\n }, []),\n )\n const {rootPaneNode, structureContext} = useStructureTool()\n const documentStore = useDocumentStore()\n const [error, setError] = useState<unknown>(null)\n\n // this re-throws errors so that parent ErrorBoundary's can handle them properly\n if (error) throw error\n\n // eslint-disable-next-line consistent-return\n useEffect(() => {\n if (maybeIntent) {\n const {intent, params, payload} = maybeIntent\n\n let cancelled = false\n // eslint-disable-next-line no-inner-declarations\n async function effect() {\n const {id, type} = await ensureDocumentIdAndType(\n documentStore,\n typeof params.id === 'string' ? params.id : undefined,\n typeof params.type === 'string' ? params.type : undefined,\n )\n\n if (cancelled) return\n\n const panes = await resolveIntent({\n intent,\n params: {...params, id, type},\n payload,\n rootPaneNode,\n structureContext,\n })\n\n if (cancelled) return\n\n navigate({panes}, {replace: true})\n }\n\n effect().catch(setError)\n\n return () => {\n cancelled = true\n }\n }\n }, [documentStore, maybeIntent, navigate, rootPaneNode, structureContext])\n\n return null\n})\n","import {generateHelpUrl} from '@sanity/generate-help-url'\nimport {SyncIcon} from '@sanity/icons'\nimport {Box, Card, Code, Container, Heading, Stack, Text} from '@sanity/ui'\nimport {useCallback} from 'react'\nimport {useTranslation} from 'sanity'\nimport {styled} from 'styled-components'\n\nimport {Button} from '../../../ui-components'\nimport {structureLocaleNamespace} from '../../i18n'\nimport {SerializeError} from '../../structureBuilder'\nimport {PaneResolutionError} from '../../structureResolvers'\n\nconst PathSegment = styled.span`\n &:not(:last-child)::after {\n content: ' ➝ ';\n opacity: 0.5;\n }\n`\n\nfunction formatStack(stack: string) {\n return (\n stack\n // Prettify builder functions\n .replace(/\\(\\.\\.\\.\\)\\./g, '(...)\\n .')\n // Remove webpack cruft from function names\n .replace(/__WEBPACK_IMPORTED_MODULE_\\d+_+/g, '')\n // Remove default export postfix from function names\n .replace(/___default\\./g, '.')\n // Replace full host path, leave only path to JS-file\n .replace(new RegExp(` \\\\(https?:\\\\/\\\\/${window.location.host}`, 'g'), ' (')\n )\n}\n\ninterface StructureErrorProps {\n error: unknown\n}\n\nexport function StructureError({error}: StructureErrorProps) {\n if (!(error instanceof PaneResolutionError)) {\n throw error\n }\n const {cause} = error\n const {t} = useTranslation(structureLocaleNamespace)\n\n // Serialize errors are well-formatted and should be readable, in these cases a stack trace is\n // usually not helpful. Build errors in dev (with HMR) usually also contains a bunch of garbage\n // instead of an actual error message, so make sure we show the message in these cases as well\n const stack = cause?.stack || error.stack\n const showStack =\n stack && !(cause instanceof SerializeError) && !error.message.includes('Module build failed:')\n\n const path = cause instanceof SerializeError ? cause.path : []\n const helpId = (cause instanceof SerializeError && cause.helpId) || error.helpId\n\n const handleReload = useCallback(() => {\n window.location.reload()\n }, [])\n\n return (\n <Card height=\"fill\" overflow=\"auto\" padding={4} sizing=\"border\" tone=\"critical\">\n <Container>\n <Heading as=\"h2\">{t('structure-error.header.text')}</Heading>\n\n <Card marginTop={4} padding={4} radius={2} overflow=\"auto\" shadow={1} tone=\"inherit\">\n {path.length > 0 && (\n <Stack space={2}>\n <Text size={1} weight=\"medium\">\n {t('structure-error.structure-path.label')}\n </Text>\n <Code>\n {/* TODO: it seems like the path is off by one and includes */}\n {/* `root` twice */}\n {path.slice(1).map((segment, i) => (\n // eslint-disable-next-line react/no-array-index-key\n <PathSegment key={`${segment}-${i}`}>{segment}</PathSegment>\n ))}\n </Code>\n </Stack>\n )}\n\n <Stack marginTop={4} space={2}>\n <Text size={1} weight=\"medium\">\n {t('structure-error.error.label')}\n </Text>\n <Code>{showStack ? formatStack(stack) : error.message}</Code>\n </Stack>\n\n {helpId && (\n <Box marginTop={4}>\n <Text>\n <a href={generateHelpUrl(helpId)} rel=\"noopener noreferrer\" target=\"_blank\">\n {t('structure-error.docs-link.text')}\n </a>\n </Text>\n </Box>\n )}\n\n <Box marginTop={4}>\n <Button\n text={t('structure-error.reload-button.text')}\n icon={SyncIcon}\n tone=\"primary\"\n onClick={handleReload}\n />\n </Box>\n </Card>\n </Container>\n </Card>\n )\n}\n","import {Box, Text} from '@sanity/ui'\nimport {isRecord, Translate, useTranslation} from 'sanity'\n\nimport {Pane, PaneContent, PaneHeader} from '../../components/pane'\nimport {structureLocaleNamespace} from '../../i18n'\n\ninterface UnknownPaneProps {\n isSelected: boolean\n pane: unknown\n paneKey: string\n}\n\n/**\n * @internal\n */\nexport function UnknownPane(props: UnknownPaneProps) {\n const {isSelected, pane, paneKey} = props\n const type = (isRecord(pane) && pane.type) || null\n const {t} = useTranslation(structureLocaleNamespace)\n return (\n <Pane id={paneKey} selected={isSelected}>\n <PaneHeader title={t('panes.unknown-pane-type.title')} />\n <PaneContent>\n <Box padding={4}>\n {typeof type === 'string' ? (\n <Text as=\"p\" muted>\n <Translate\n t={t}\n i18nKey=\"panes.unknown-pane-type.unknown-type.text\"\n values={{type}}\n />\n </Text>\n ) : (\n <Text as=\"p\" muted>\n <Translate t={t} i18nKey=\"panes.unknown-pane-type.missing-type.text\" />\n </Text>\n )}\n </Box>\n </PaneContent>\n </Pane>\n )\n}\n","import {isEqual} from 'lodash'\nimport {lazy, memo, Suspense} from 'react'\n\nimport {PaneRouterProvider} from '../components/paneRouter'\nimport {type PaneNode} from '../types'\nimport {LoadingPane} from './loading'\nimport {UnknownPane} from './unknown'\n\ninterface StructureToolPaneProps {\n active: boolean\n childItemId: string | null\n groupIndex: number\n index: number\n itemId: string\n pane: PaneNode\n paneKey: string\n params: Record<string, string | undefined> & {perspective?: string}\n payload: unknown\n path: string\n selected: boolean\n siblingIndex: number\n}\n\n// TODO: audit this creates separate chunks\nconst paneMap = {\n component: lazy(() => import('./userComponent')),\n document: lazy(() => import('./document/pane')),\n documentList: lazy(() => import('./documentList/pane')),\n list: lazy(() => import('./list')),\n}\n\n/**\n * NOTE: The same pane might appear multiple times (split pane), so use index as tiebreaker\n *\n * @internal\n */\nexport const StructureToolPane = memo(\n function StructureToolPane(props: StructureToolPaneProps) {\n const {\n active,\n childItemId,\n groupIndex,\n index,\n itemId,\n pane,\n paneKey,\n params,\n payload,\n path,\n selected,\n siblingIndex,\n } = props\n\n const PaneComponent = paneMap[pane.type] || UnknownPane\n\n return (\n <PaneRouterProvider\n flatIndex={index}\n index={groupIndex}\n params={params}\n payload={payload}\n siblingIndex={siblingIndex}\n >\n <Suspense fallback={<LoadingPane paneKey={paneKey} path={path} selected={selected} />}>\n <PaneComponent\n childItemId={childItemId || ''}\n index={index}\n itemId={itemId}\n isActive={active}\n isSelected={selected}\n paneKey={paneKey}\n // @ts-expect-error TS doesn't know how to handle this intersection\n pane={pane}\n />\n </Suspense>\n </PaneRouterProvider>\n )\n },\n (\n {params: prevParams = {}, payload: prevPayload = null, ...prev},\n {params: nextParams = {}, payload: nextPayload = null, ...next},\n ) => {\n // deeply compare these objects (it's okay, they're small)\n if (!isEqual(prevParams, nextParams)) return false\n if (!isEqual(prevPayload, nextPayload)) return false\n\n const keys = new Set([...Object.keys(prev), ...Object.keys(next)]) as Set<\n keyof typeof next | keyof typeof prev\n >\n\n // then shallow equal the rest\n for (const key of keys) {\n if (prev[key] !== next[key]) return false\n }\n\n return true\n },\n)\n","import {WarningOutlineIcon} from '@sanity/icons'\nimport {Box, Card, Container, Flex, Stack, Text} from '@sanity/ui'\nimport {useTranslation} from 'sanity'\n\nimport {structureLocaleNamespace} from '../../i18n'\n\nexport function NoDocumentTypesScreen() {\n const {t} = useTranslation(structureLocaleNamespace)\n\n return (\n <Card height=\"fill\">\n <Flex align=\"center\" height=\"fill\" justify=\"center\" padding={4} sizing=\"border\">\n <Container width={0}>\n <Card padding={4} radius={2} shadow={1} tone=\"caution\">\n <Flex>\n <Box>\n <Text size={1}>\n <WarningOutlineIcon />\n </Text>\n </Box>\n <Stack flex={1} marginLeft={3} space={3}>\n <Text as=\"h1\" size={1} weight=\"medium\">\n {t('no-document-types-screen.title')}\n </Text>\n <Text as=\"p\" muted size={1}>\n {t('no-document-types-screen.subtitle')}\n </Text>\n <Text as=\"p\" muted size={1}>\n <a\n href=\"https://www.sanity.io/docs/create-a-schema-and-configure-sanity-studio\"\n target=\"_blank\"\n rel=\"noreferrer\"\n >\n {t('no-document-types-screen.link-text')}\n </a>\n </Text>\n </Stack>\n </Flex>\n </Card>\n </Container>\n </Flex>\n </Card>\n )\n}\n","import {type ObjectSchemaType} from '@sanity/types'\nimport {useEffect} from 'react'\nimport {\n unstable_useValuePreview as useValuePreview,\n useEditState,\n usePerspective,\n useSchema,\n useTranslation,\n} from 'sanity'\n\nimport {LOADING_PANE} from '../../constants'\nimport {structureLocaleNamespace} from '../../i18n'\nimport {type Panes} from '../../structureResolvers'\nimport {type DocumentPaneNode} from '../../types'\nimport {useStructureTool} from '../../useStructureTool'\n\ninterface StructureTitleProps {\n resolvedPanes: Panes['resolvedPanes']\n}\n\n// TODO: Fix state jank when editing different versions inside panes.\nconst DocumentTitle = (props: {documentId: string; documentType: string}) => {\n const {documentId, documentType} = props\n const {selectedReleaseId} = usePerspective()\n\n const editState = useEditState(documentId, documentType, 'default', selectedReleaseId)\n const schema = useSchema()\n const {t} = useTranslation(structureLocaleNamespace)\n const isNewDocument = !editState?.published && !editState?.draft\n const documentValue = editState?.version || editState?.draft || editState?.published\n const schemaType = schema.get(documentType) as ObjectSchemaType | undefined\n\n const {value, isLoading: previewValueIsLoading} = useValuePreview({\n enabled: true,\n schemaType,\n value: documentValue,\n })\n\n const documentTitle = isNewDocument\n ? t('browser-document-title.new-document', {\n schemaType: schemaType?.title || schemaType?.name,\n })\n : value?.title || t('browser-document-title.untitled-document')\n\n const settled = editState.ready && !previewValueIsLoading\n const newTitle = useConstructDocumentTitle(documentTitle)\n useEffect(() => {\n if (!settled) return\n // Set the title as the document title\n document.title = newTitle\n }, [documentTitle, settled, newTitle])\n\n return null\n}\n\nconst PassthroughTitle = (props: {title?: string}) => {\n const {title} = props\n const newTitle = useConstructDocumentTitle(title)\n useEffect(() => {\n // Set the title as the document title\n document.title = newTitle\n }, [newTitle, title])\n return null\n}\n\nexport const StructureTitle = (props: StructureTitleProps) => {\n const {resolvedPanes} = props\n\n if (!resolvedPanes?.length) return null\n\n const lastPane = resolvedPanes[resolvedPanes.length - 1]\n\n // If the last pane is loading, display the structure tool title only\n if (isLoadingPane(lastPane)) {\n return <PassthroughTitle />\n }\n\n // If the last pane is a document\n if (isDocumentPane(lastPane)) {\n // Passthrough the document pane's title, which may be defined in structure builder\n if (lastPane?.title) {\n return <PassthroughTitle title={lastPane.title} />\n }\n\n // Otherwise, display a `document.title` containing the resolved Sanity document title\n return <DocumentTitle documentId={lastPane.options.id} documentType={lastPane.options.type} />\n }\n\n // Otherwise, display the last pane's title (if present)\n return <PassthroughTitle title={lastPane?.title} />\n}\n\n/**\n * Construct a pipe delimited title containing `activeTitle` (if applicable) and the base structure title.\n *\n * @param activeTitle - Title of the first segment\n *\n * @returns A pipe delimited title in the format `${activeTitle} | %BASE_STRUCTURE_TITLE%`\n * or simply `%BASE_STRUCTURE_TITLE` if `activeTitle` is undefined.\n */\nfunction useConstructDocumentTitle(activeTitle?: string) {\n const structureToolBaseTitle = useStructureTool().structureContext.title\n return [activeTitle, structureToolBaseTitle].filter((title) => title).join(' | ')\n}\n\n// Type guards\nfunction isDocumentPane(pane: Panes['resolvedPanes'][number]): pane is DocumentPaneNode {\n return pane !== LOADING_PANE && pane.type === 'document'\n}\n\nfunction isLoadingPane(pane: Panes['resolvedPanes'][number]): pane is typeof LOADING_PANE {\n return pane === LOADING_PANE\n}\n","import {PortalProvider, useTheme, useToast} from '@sanity/ui'\nimport {isHotkey} from 'is-hotkey-esm'\nimport {Fragment, memo, useCallback, useEffect, useState} from 'react'\nimport {_isCustomDocumentTypeDefinition, useSchema} from 'sanity'\nimport {useRouterState} from 'sanity/router'\nimport {styled} from 'styled-components'\n\nimport {LOADING_PANE} from '../../constants'\nimport {LoadingPane, StructureToolPane} from '../../panes'\nimport {useResolvedPanes} from '../../structureResolvers'\nimport {type PaneNode} from '../../types'\nimport {useStructureTool} from '../../useStructureTool'\nimport {PaneLayout} from '../pane'\nimport {NoDocumentTypesScreen} from './NoDocumentTypesScreen'\nimport {StructureTitle} from './StructureTitle'\n\ninterface StructureToolProps {\n onPaneChange: (panes: Array<PaneNode | typeof LOADING_PANE>) => void\n}\n\nconst StyledPaneLayout = styled(PaneLayout)`\n min-height: 100%;\n min-width: 320px;\n`\n\nconst isSaveHotkey = isHotkey('mod+s')\n\n/**\n * @internal\n */\nexport const StructureTool = memo(function StructureTool({onPaneChange}: StructureToolProps) {\n const {push: pushToast} = useToast()\n const schema = useSchema()\n const {layoutCollapsed, setLayoutCollapsed} = useStructureTool()\n const {paneDataItems, resolvedPanes} = useResolvedPanes()\n // Intent resolving is processed by the sibling `<IntentResolver />` but it doesn't have a UI for indicating progress.\n // We handle that here, so if there are only 1 pane (the root structure), and there's an intent state in the router, we need to show a placeholder LoadingPane until\n // the structure is resolved and we know what panes to load/display\n const isResolvingIntent = useRouterState(\n useCallback((routerState) => typeof routerState.intent === 'string', []),\n )\n const {\n sanity: {media},\n } = useTheme()\n\n const [portalElement, setPortalElement] = useState<HTMLDivElement | null>(null)\n\n const handleRootCollapse = useCallback(() => setLayoutCollapsed(true), [setLayoutCollapsed])\n const handleRootExpand = useCallback(() => setLayoutCollapsed(false), [setLayoutCollapsed])\n\n useEffect(() => {\n // we check for length before emitting here to skip the initial empty array\n // state from the `useResolvedPanes` hook. there should always be a root\n // pane emitted on subsequent emissions\n if (resolvedPanes.length) {\n onPaneChange(resolvedPanes)\n }\n }, [onPaneChange, resolvedPanes])\n\n useEffect(() => {\n const handleGlobalKeyDown = (event: KeyboardEvent) => {\n // Prevent `Cmd+S`\n if (isSaveHotkey(event)) {\n event.preventDefault()\n\n pushToast({\n closable: true,\n id: 'auto-save-message',\n status: 'info',\n title: 'Your work is automatically saved!',\n duration: 4000,\n })\n }\n }\n\n window.addEventListener('keydown', handleGlobalKeyDown)\n return () => window.removeEventListener('keydown', handleGlobalKeyDown)\n }, [pushToast])\n\n const hasDefinedDocumentTypes = schema._original?.types.some(_isCustomDocumentTypeDefinition)\n\n if (!hasDefinedDocumentTypes) {\n return <NoDocumentTypesScreen />\n }\n\n return (\n <PortalProvider element={portalElement || null}>\n <StyledPaneLayout\n flex={1}\n height={layoutCollapsed ? undefined : 'fill'}\n minWidth={media[1]}\n onCollapse={handleRootCollapse}\n onExpand={handleRootExpand}\n >\n {paneDataItems.map(\n ({\n active,\n childItemId,\n groupIndex,\n itemId,\n key: paneKey,\n pane,\n index: paneIndex,\n params: paneParams,\n path,\n payload,\n siblingIndex,\n selected,\n }) => (\n <Fragment key={`${pane === LOADING_PANE ? 'loading' : pane.type}-${paneIndex}`}>\n {pane === LOADING_PANE ? (\n <LoadingPane paneKey={paneKey} path={path} selected={selected} />\n ) : (\n <StructureToolPane\n active={active}\n groupIndex={groupIndex}\n index={paneIndex}\n pane={pane}\n childItemId={childItemId}\n itemId={itemId}\n paneKey={paneKey}\n params={paneParams}\n payload={payload}\n path={path}\n selected={selected}\n siblingIndex={siblingIndex}\n />\n )}\n </Fragment>\n ),\n )}\n {/* If there's just 1 pane (the root), or less, and we're resolving an intent then it's necessary to show */}\n {/* a loading indicator as the intent resolving is async, could take a while and can also be interrupted/redirected */}\n {paneDataItems.length <= 1 && isResolvingIntent && (\n <LoadingPane paneKey=\"intent-resolver\" />\n )}\n </StyledPaneLayout>\n <StructureTitle resolvedPanes={resolvedPanes} />\n <div data-portal=\"\" ref={setPortalElement} />\n </PortalProvider>\n )\n})\n","import {useEffect, useState} from 'react'\nimport {SourceProvider, type Tool, useWorkspace} from 'sanity'\n\nimport {ErrorBoundary} from '../../../ui-components/errorBoundary'\nimport {setActivePanes} from '../../getIntentState'\nimport {StructureToolProvider} from '../../StructureToolProvider'\nimport {type StructureToolOptions} from '../../types'\nimport {IntentResolver} from './intentResolver'\nimport {StructureError} from './StructureError'\nimport {StructureTool} from './StructureTool'\n\ninterface StructureToolBoundaryProps {\n tool: Tool<StructureToolOptions>\n}\n\nexport function StructureToolBoundary({tool: {options}}: StructureToolBoundaryProps) {\n const {unstable_sources: sources} = useWorkspace()\n const [firstSource] = sources\n const {source, defaultDocumentNode, structure} = options || {}\n\n // Set active panes to blank on mount and unmount\n useEffect(() => {\n setActivePanes([])\n return () => setActivePanes([])\n }, [])\n\n const [{error}, setError] = useState<{error: unknown}>({error: null})\n\n // this re-throws if the error it catches is not a PaneResolutionError\n if (error) return <StructureError error={error} />\n\n return (\n <ErrorBoundary onCatch={setError}>\n <SourceProvider name={source || firstSource.name}>\n <StructureToolProvider defaultDocumentNode={defaultDocumentNode} structure={structure}>\n <StructureTool onPaneChange={setActivePanes} />\n <IntentResolver />\n </StructureToolProvider>\n </SourceProvider>\n </ErrorBoundary>\n )\n}\n"],"names":["pairwise","operate","source","subscriber","prev","hasPrev","createOperatorSubscriber","value","p","ChildLink","forwardRef","props","ref","$","_c","childId","childParameters","childPayload","rest","routerPanesState","groupIndex","useContext","PaneRouterContext","t0","slice","t1","id","params","payload","t2","panes","t3","StateLink","ParameterizedLink","currentPanes","siblingIndex","nextParams","useUnique","nextPayload","currentGroup","currentSibling","nextSibling","t4","t5","t6","nextGroup","t7","t8","t9","nextPanes","t10","nextState","t11","ReferenceChildLink","children","documentId","documentType","parentRefPath","template","pathToString","type","jsx","emptyArray","PaneRouterProvider","flatIndex","index","navigate","navigateIntent","resolvePathFromState","useRouter","routerState","useRouterState","expand","usePaneLayout","routerPaneGroups","length","lastPane","modifier","currentItem","nextRouterState","createNextRouterState","modifier_0","nextRouterState_0","setTimeout","modifyCurrentGroup","nextRouterState_1","siblings","item","createPathWithParams","siblings_0","item_0","setPayload","nextParams_0","siblings_1","item_1","setParams","handleEditReference","BackLink","undefined","t12","t13","t14","opts","_temp","t15","element","options","siblings_3","item_3","duplicatedItem","t16","viewId","restParams","omit","view","t17","hasGroupSiblings","groupLength","replaceCurrent","closeCurrent","closeCurrentAndAfter","duplicateCurrent","setView","ctx","t18","siblings_2","item_2","filter","sibling","PaneResolutionError","Error","constructor","message","context","helpId","cause","name","randomIdCache","WeakMap","assignId","obj","cachedValue","get","nanoid","set","isPromise","thing","then","isSerializable","isRecord","serialize","rethrowWithPaneResolutionErrors","next","unresolvedPane","e","wrapWithPublishReplay","args","pipe","publishReplay","refCount","createPaneResolver","middleware","resolvePane","isObservable","from","switchMap","result","observableOf","bindCache","memoBind","methodKey","boundMethods","Map","bound","method","bind","resolveIntent","resolvedPaneCache","nextFn","key","path","join","cachedResolvedPane","fallbackEditorPanes","traverse","currentId","intent","parent","levelIndex","structureContext","targetId","schemaTypeName","otherParams","resolvedPane","firstValueFrom","splitIndex","map","i","depthIndex","canHandleIntent","pane","child","items","Promise","all","nextLevelIndex","resolve","_id","flat","closestPaneToRoot","rootPaneNode","sort","a","b","fallbackEditorChild","nodeId","replace","resolveDocumentNode","defaultDocumentBuilder","schemaType","initialValueTemplate","hashContext","JSON","stringify","parentId","serializeOptionsIndex","serializeOptions","serializeOptionsPath","hashResolvedPaneMeta","meta","normalized","routerPaneSibling","paneNode","resolvePaneTree","flattenedRouterPanes","current","resolvedPaneMeta","loadingPanes","restIndex","_","currentIndex","nextStream","startsWith","concat","nextResolvedPanes","console","warn","generateHelpUrl","createResolvedPaneNodeStream","routerPanesStream","initialCacheState","cacheKeysByFlatIndex","NEVER","rawRouterPanes","routerPanes","flatMap","routerPaneGroup","startWith","curr","prevValue","currValue","isEqual","diffIndex","scan","acc","beforeDiffIndex","afterDiffIndex","keysToKeep","Set","keySet","Array","keysToDelete","has","delete","cacheKeySet","add","nextPane","prevPane","distinctUntilChanged","nextValue","useRouterPanesStream","routerStateSubject","useState","asObservable","_temp2","routerPanes$","state","useEffect","_routerState","ReplaySubject","useResolvedPanes","error","setError","useStructureTool","Symbol","for","paneDataItems","resolvedPanes","data","setData","subscription","_temp5","subscribe","unsubscribe","reduce","_temp3","groupsLen","itemId","paneDataItem","active","childItemId","LOADING_PANE","selected","_temp4","pane_0","ensureDocumentIdAndType","documentStore","uuid","resolvedType","resolveTypeForDocument","EMPTY_RECORD","IntentResolver","memo","maybeIntent","useDocumentStore","cancelled","catch","intentName","PathSegment","styled","span","formatStack","stack","RegExp","window","location","host","StructureError","t","useTranslation","structureLocaleNamespace","showStack","SerializeError","includes","handleReload","Heading","jsxs","Stack","Text","Code","Box","Button","SyncIcon","Card","Container","segment","reload","UnknownPane","isSelected","paneKey","PaneHeader","PaneContent","Translate","Pane","paneMap","component","lazy","document","documentList","list","StructureToolPane","PaneComponent","LoadingPane","Suspense","prevParams","prevPayload","keys","Object","NoDocumentTypesScreen","WarningOutlineIcon","Flex","DocumentTitle","selectedReleaseId","usePerspective","editState","useEditState","schema","useSchema","isNewDocument","published","draft","documentValue","version","isLoading","previewValueIsLoading","useValuePreview","enabled","documentTitle","title","settled","ready","newTitle","useConstructDocumentTitle","PassthroughTitle","StructureTitle","isLoadingPane","isDocumentPane","activeTitle","structureToolBaseTitle","StyledPaneLayout","PaneLayout","isSaveHotkey","isHotkey","StructureTool","onPaneChange","push","pushToast","useToast","layoutCollapsed","setLayoutCollapsed","isResolvingIntent","sanity","useTheme","media","portalElement","setPortalElement","handleRootCollapse","handleRootExpand","handleGlobalKeyDown","event","preventDefault","closable","status","duration","addEventListener","removeEventListener","_original","types","some","_isCustomDocumentTypeDefinition","PortalProvider","paneIndex","paneParams","Fragment","StructureToolBoundary","tool","unstable_sources","sources","useWorkspace","firstSource","defaultDocumentNode","structure","setActivePanes","StructureToolProvider","ErrorBoundary","SourceProvider"],"mappings":";;;;;;;;;;;;;;;;;;AAEO,SAASA,KAAW;AACvB,SAAOC,GAAQ,SAAUC,GAAQC,GAAY;AACzC,QAAIC,GACAC,IAAU;AACd,IAAAH,EAAO,UAAUI,GAAyBH,GAAY,SAAUI,GAAO;AACnE,UAAIC,IAAIJ;AACR,MAAAA,IAAOG,GACPF,KAAWF,EAAW,KAAK,CAACK,GAAGD,CAAK,CAAC,GACrCF,IAAU;AAAA,IACtB,CAAS,CAAC;AAAA,EACV,CAAK;AACL;ACJO,MAAMI,KAAYC,GAAW,SAAAC,GAAAC,GAAA;AAAAC,QAAAA,IAAAC,EAAA,EAAA;AAAAC,MAAAA,GAAAC,GAAAC,GAAAC;AAAAL,EAAAA,SAAAF,KAIlC;AAAA,IAAAI,SAAAA;AAAAA,IAAAE,cAAAA;AAAAA,IAAAD,iBAAAA;AAAAA,IAAA,GAAAE;AAAAA,EAAAA,IAA0DP,GAAKE,OAAAF,GAAAE,OAAAE,GAAAF,OAAAG,GAAAH,OAAAI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AC2G,IAA2CH,EAAAA,qBAAAA,GAAgCC,WAAAA,GAC1ErZ,UAAAA;AAAAA,IAAAA;AAAAA,IACAC;AAAAA,EAAAA,GACF,GAAwBlC,OAAAqb,GAAArb,OAAAsb,GAAAtb,QAAAmC,KAAAA,IAAAnC,EAAA,EAAA;AAAAqC,MAAAA;AAAA,SAAArC,EAAA+B,EAAAA,MAAAA,KAAA/B,UAAAmC,KAL5BE,IAAA,gBAAAW,EAACyY,MAAuBlK,YACtB,4BAACmK,IAAqB,EAAA,MAAA3Z,GACpBI,UAAAA,EAAAA,CAIF,EACF,CAAA,GAAgBnC,QAAA+B,GAAA/B,QAAAmC,GAAAnC,QAAAqC,KAAAA,IAAArC,EAAA,EAAA,GAPhBqC;AAOgB;AAxBb,SAAA0O,KAAA;AAOHwK,SAAAA,KAAiB,GAAC7V;AAAA;AAPf,SAAAA,KAAA;AAQU6V,SAAAA,KAAiB;AAAC;","x_google_ignoreList":[0]}
@@ -1,73 +0,0 @@
1
- import l from "react";
2
- var O = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
3
- function d(e) {
4
- return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
5
- }
6
- function y(e) {
7
- if (e.__esModule) return e;
8
- var r = e.default;
9
- if (typeof r == "function") {
10
- var t = function o() {
11
- return this instanceof o ? Reflect.construct(r, arguments, this.constructor) : r.apply(this, arguments);
12
- };
13
- t.prototype = r.prototype;
14
- } else t = {};
15
- return Object.defineProperty(t, "__esModule", { value: !0 }), Object.keys(e).forEach(function(o) {
16
- var f = Object.getOwnPropertyDescriptor(e, o);
17
- Object.defineProperty(t, o, f.get ? f : {
18
- enumerable: !0,
19
- get: function() {
20
- return e[o];
21
- }
22
- });
23
- }), t;
24
- }
25
- /**
26
- * Copyright (c) Meta Platforms, Inc. and affiliates.
27
- *
28
- * This source code is licensed under the MIT license found in the
29
- * LICENSE file in the root directory of this source tree.
30
- *
31
- * @lightSyntaxTransform
32
- * @noflow
33
- * @nolint
34
- * @preventMunge
35
- * @preserve-invariant-messages
36
- */
37
- var p = l;
38
- function s(e) {
39
- var r = /* @__PURE__ */ Object.create(null);
40
- return e && Object.keys(e).forEach(function(t) {
41
- if (t !== "default") {
42
- var o = Object.getOwnPropertyDescriptor(e, t);
43
- Object.defineProperty(r, t, o.get ? o : {
44
- enumerable: !0,
45
- get: function() {
46
- return e[t];
47
- }
48
- });
49
- }
50
- }), r.default = e, Object.freeze(r);
51
- }
52
- var n = /* @__PURE__ */ s(p), u, c;
53
- (u = n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE) !== null && u !== void 0 || n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
54
- const a = Symbol.for("react.memo_cache_sentinel"), i = typeof ((c = n.__COMPILER_RUNTIME) === null || c === void 0 ? void 0 : c.c) == "function" ? n.__COMPILER_RUNTIME.c : function(r) {
55
- return n.useMemo(() => {
56
- const t = new Array(r);
57
- for (let o = 0; o < r; o++)
58
- t[o] = a;
59
- return t[a] = !0, t;
60
- }, []);
61
- };
62
- var _;
63
- (function(e) {
64
- e[e.PushGuardContext = 0] = "PushGuardContext", e[e.PopGuardContext = 1] = "PopGuardContext", e[e.PushExpectHook = 2] = "PushExpectHook", e[e.PopExpectHook = 3] = "PopExpectHook";
65
- })(_ || (_ = {}));
66
- var b = i;
67
- export {
68
- O as a,
69
- y as b,
70
- b as c,
71
- d as g
72
- };
73
- //# sourceMappingURL=index-DkvUNBNf.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index-DkvUNBNf.mjs","sources":["../../../node_modules/.pnpm/react-compiler-runtime@19.0.0-beta-55955c9-20241229_react@18.3.1/node_modules/react-compiler-runtime/dist/index.js"],"sourcesContent":["/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @lightSyntaxTransform\n * @noflow\n * @nolint\n * @preventMunge\n * @preserve-invariant-messages\n */\n\n\"use no memo\";'use strict';\n\nvar React = require('react');\n\nfunction _interopNamespaceDefault(e) {\n var n = Object.create(null);\n if (e) {\n Object.keys(e).forEach(function (k) {\n if (k !== 'default') {\n var d = Object.getOwnPropertyDescriptor(e, k);\n Object.defineProperty(n, k, d.get ? d : {\n enumerable: true,\n get: function () { return e[k]; }\n });\n }\n });\n }\n n.default = e;\n return Object.freeze(n);\n}\n\nvar React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);\n\nvar _a, _b;\nconst { useRef, useEffect, isValidElement } = React__namespace;\nconst ReactSecretInternals = (_a = React__namespace.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE) !== null && _a !== void 0 ? _a : React__namespace.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;\nconst $empty = Symbol.for('react.memo_cache_sentinel');\nconst c = typeof ((_b = React__namespace.__COMPILER_RUNTIME) === null || _b === void 0 ? void 0 : _b.c) === 'function'\n ?\n React__namespace.__COMPILER_RUNTIME.c\n : function c(size) {\n return React__namespace.useMemo(() => {\n const $ = new Array(size);\n for (let ii = 0; ii < size; ii++) {\n $[ii] = $empty;\n }\n $[$empty] = true;\n return $;\n }, []);\n };\nconst LazyGuardDispatcher = {};\n[\n 'readContext',\n 'useCallback',\n 'useContext',\n 'useEffect',\n 'useImperativeHandle',\n 'useInsertionEffect',\n 'useLayoutEffect',\n 'useMemo',\n 'useReducer',\n 'useRef',\n 'useState',\n 'useDebugValue',\n 'useDeferredValue',\n 'useTransition',\n 'useMutableSource',\n 'useSyncExternalStore',\n 'useId',\n 'unstable_isNewReconciler',\n 'getCacheSignal',\n 'getCacheForType',\n 'useCacheRefresh',\n].forEach(name => {\n LazyGuardDispatcher[name] = () => {\n throw new Error(`[React] Unexpected React hook call (${name}) from a React compiled function. ` +\n \"Check that all hooks are called directly and named according to convention ('use[A-Z]') \");\n };\n});\nlet originalDispatcher = null;\nLazyGuardDispatcher['useMemoCache'] = (count) => {\n if (originalDispatcher == null) {\n throw new Error('React Compiler internal invariant violation: unexpected null dispatcher');\n }\n else {\n return originalDispatcher.useMemoCache(count);\n }\n};\nvar GuardKind;\n(function (GuardKind) {\n GuardKind[GuardKind[\"PushGuardContext\"] = 0] = \"PushGuardContext\";\n GuardKind[GuardKind[\"PopGuardContext\"] = 1] = \"PopGuardContext\";\n GuardKind[GuardKind[\"PushExpectHook\"] = 2] = \"PushExpectHook\";\n GuardKind[GuardKind[\"PopExpectHook\"] = 3] = \"PopExpectHook\";\n})(GuardKind || (GuardKind = {}));\nfunction setCurrent(newDispatcher) {\n ReactSecretInternals.ReactCurrentDispatcher.current = newDispatcher;\n return ReactSecretInternals.ReactCurrentDispatcher.current;\n}\nconst guardFrames = [];\nfunction $dispatcherGuard(kind) {\n const curr = ReactSecretInternals.ReactCurrentDispatcher.current;\n if (kind === GuardKind.PushGuardContext) {\n guardFrames.push(curr);\n if (guardFrames.length === 1) {\n originalDispatcher = curr;\n }\n if (curr === LazyGuardDispatcher) {\n throw new Error(`[React] Unexpected call to custom hook or component from a React compiled function. ` +\n \"Check that (1) all hooks are called directly and named according to convention ('use[A-Z]') \" +\n 'and (2) components are returned as JSX instead of being directly invoked.');\n }\n setCurrent(LazyGuardDispatcher);\n }\n else if (kind === GuardKind.PopGuardContext) {\n const lastFrame = guardFrames.pop();\n if (lastFrame == null) {\n throw new Error('React Compiler internal error: unexpected null in guard stack');\n }\n if (guardFrames.length === 0) {\n originalDispatcher = null;\n }\n setCurrent(lastFrame);\n }\n else if (kind === GuardKind.PushExpectHook) {\n guardFrames.push(curr);\n setCurrent(originalDispatcher);\n }\n else if (kind === GuardKind.PopExpectHook) {\n const lastFrame = guardFrames.pop();\n if (lastFrame == null) {\n throw new Error('React Compiler internal error: unexpected null in guard stack');\n }\n setCurrent(lastFrame);\n }\n else {\n throw new Error('React Compiler internal error: unreachable block' + kind);\n }\n}\nfunction $reset($) {\n for (let ii = 0; ii < $.length; ii++) {\n $[ii] = $empty;\n }\n}\nfunction $makeReadOnly() {\n throw new Error('TODO: implement $makeReadOnly in react-compiler-runtime');\n}\nconst renderCounterRegistry = new Map();\nfunction clearRenderCounterRegistry() {\n for (const counters of renderCounterRegistry.values()) {\n counters.forEach(counter => {\n counter.count = 0;\n });\n }\n}\nfunction registerRenderCounter(name, val) {\n let counters = renderCounterRegistry.get(name);\n if (counters == null) {\n counters = new Set();\n renderCounterRegistry.set(name, counters);\n }\n counters.add(val);\n}\nfunction removeRenderCounter(name, val) {\n const counters = renderCounterRegistry.get(name);\n if (counters == null) {\n return;\n }\n counters.delete(val);\n}\nfunction useRenderCounter(name) {\n const val = useRef(null);\n if (val.current != null) {\n val.current.count += 1;\n }\n useEffect(() => {\n if (val.current == null) {\n const counter = { count: 0 };\n registerRenderCounter(name, counter);\n val.current = counter;\n }\n return () => {\n if (val.current !== null) {\n removeRenderCounter(name, val.current);\n }\n };\n });\n}\nconst seenErrors = new Set();\nfunction $structuralCheck(oldValue, newValue, variableName, fnName, kind, loc) {\n function error(l, r, path, depth) {\n const str = `${fnName}:${loc} [${kind}] ${variableName}${path} changed from ${l} to ${r} at depth ${depth}`;\n if (seenErrors.has(str)) {\n return;\n }\n seenErrors.add(str);\n console.error(str);\n }\n const depthLimit = 2;\n function recur(oldValue, newValue, path, depth) {\n if (depth > depthLimit) {\n return;\n }\n else if (oldValue === newValue) {\n return;\n }\n else if (typeof oldValue !== typeof newValue) {\n error(`type ${typeof oldValue}`, `type ${typeof newValue}`, path, depth);\n }\n else if (typeof oldValue === 'object') {\n const oldArray = Array.isArray(oldValue);\n const newArray = Array.isArray(newValue);\n if (oldValue === null && newValue !== null) {\n error('null', `type ${typeof newValue}`, path, depth);\n }\n else if (newValue === null) {\n error(`type ${typeof oldValue}`, 'null', path, depth);\n }\n else if (oldValue instanceof Map) {\n if (!(newValue instanceof Map)) {\n error(`Map instance`, `other value`, path, depth);\n }\n else if (oldValue.size !== newValue.size) {\n error(`Map instance with size ${oldValue.size}`, `Map instance with size ${newValue.size}`, path, depth);\n }\n else {\n for (const [k, v] of oldValue) {\n if (!newValue.has(k)) {\n error(`Map instance with key ${k}`, `Map instance without key ${k}`, path, depth);\n }\n else {\n recur(v, newValue.get(k), `${path}.get(${k})`, depth + 1);\n }\n }\n }\n }\n else if (newValue instanceof Map) {\n error('other value', `Map instance`, path, depth);\n }\n else if (oldValue instanceof Set) {\n if (!(newValue instanceof Set)) {\n error(`Set instance`, `other value`, path, depth);\n }\n else if (oldValue.size !== newValue.size) {\n error(`Set instance with size ${oldValue.size}`, `Set instance with size ${newValue.size}`, path, depth);\n }\n else {\n for (const v of newValue) {\n if (!oldValue.has(v)) {\n error(`Set instance without element ${v}`, `Set instance with element ${v}`, path, depth);\n }\n }\n }\n }\n else if (newValue instanceof Set) {\n error('other value', `Set instance`, path, depth);\n }\n else if (oldArray || newArray) {\n if (oldArray !== newArray) {\n error(`type ${oldArray ? 'array' : 'object'}`, `type ${newArray ? 'array' : 'object'}`, path, depth);\n }\n else if (oldValue.length !== newValue.length) {\n error(`array with length ${oldValue.length}`, `array with length ${newValue.length}`, path, depth);\n }\n else {\n for (let ii = 0; ii < oldValue.length; ii++) {\n recur(oldValue[ii], newValue[ii], `${path}[${ii}]`, depth + 1);\n }\n }\n }\n else if (isValidElement(oldValue) || isValidElement(newValue)) {\n if (isValidElement(oldValue) !== isValidElement(newValue)) {\n error(`type ${isValidElement(oldValue) ? 'React element' : 'object'}`, `type ${isValidElement(newValue) ? 'React element' : 'object'}`, path, depth);\n }\n else if (oldValue.type !== newValue.type) {\n error(`React element of type ${oldValue.type}`, `React element of type ${newValue.type}`, path, depth);\n }\n else {\n recur(oldValue.props, newValue.props, `[props of ${path}]`, depth + 1);\n }\n }\n else {\n for (const key in newValue) {\n if (!(key in oldValue)) {\n error(`object without key ${key}`, `object with key ${key}`, path, depth);\n }\n }\n for (const key in oldValue) {\n if (!(key in newValue)) {\n error(`object with key ${key}`, `object without key ${key}`, path, depth);\n }\n else {\n recur(oldValue[key], newValue[key], `${path}.${key}`, depth + 1);\n }\n }\n }\n }\n else if (typeof oldValue === 'function') {\n return;\n }\n else if (isNaN(oldValue) || isNaN(newValue)) {\n if (isNaN(oldValue) !== isNaN(newValue)) {\n error(`${isNaN(oldValue) ? 'NaN' : 'non-NaN value'}`, `${isNaN(newValue) ? 'NaN' : 'non-NaN value'}`, path, depth);\n }\n }\n else if (oldValue !== newValue) {\n error(oldValue, newValue, path, depth);\n }\n }\n recur(oldValue, newValue, '', 0);\n}\n\nexports.$dispatcherGuard = $dispatcherGuard;\nexports.$makeReadOnly = $makeReadOnly;\nexports.$reset = $reset;\nexports.$structuralCheck = $structuralCheck;\nexports.c = c;\nexports.clearRenderCounterRegistry = clearRenderCounterRegistry;\nexports.renderCounterRegistry = renderCounterRegistry;\nexports.useRenderCounter = useRenderCounter;\n//# sourceMappingURL=index.js.map\n"],"names":["React","require$$0","_interopNamespaceDefault","n","k","d","React__namespace","_a","_b","$empty","c","size","$","ii","GuardKind","c_1"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAeA,IAAIA,IAAQC;AAEZ,SAASC,EAAyB,GAAG;AACjC,MAAIC,IAAI,uBAAO,OAAO,IAAI;AAC1B,SAAI,KACA,OAAO,KAAK,CAAC,EAAE,QAAQ,SAAUC,GAAG;AAChC,QAAIA,MAAM,WAAW;AACjB,UAAIC,IAAI,OAAO,yBAAyB,GAAGD,CAAC;AAC5C,aAAO,eAAeD,GAAGC,GAAGC,EAAE,MAAMA,IAAI;AAAA,QACpC,YAAY;AAAA,QACZ,KAAK,WAAY;AAAE,iBAAO,EAAED,CAAC;AAAA,QAAE;AAAA,MACnD,CAAiB;AAAA,IACjB;AAAA,EACA,CAAS,GAELD,EAAE,UAAU,GACL,OAAO,OAAOA,CAAC;AAC1B;AAEA,IAAIG,IAAgC,gBAAAJ,EAAyBF,CAAK,GAE9DO,GAAIC;AAAA,CAEsBD,IAAKD,EAAiB,qEAAqE,QAAQC,MAAO,UAAcD,EAAiB;AACvK,MAAMG,IAAS,OAAO,IAAI,2BAA2B,GAC/CC,IAAI,SAASF,IAAKF,EAAiB,wBAAwB,QAAQE,MAAO,SAAS,SAASA,EAAG,MAAO,aAEpGF,EAAiB,mBAAmB,IACtC,SAAWK,GAAM;AACf,SAAOL,EAAiB,QAAQ,MAAM;AAClC,UAAMM,IAAI,IAAI,MAAMD,CAAI;AACxB,aAASE,IAAK,GAAGA,IAAKF,GAAME;AACxB,MAAAD,EAAEC,CAAE,IAAIJ;AAEZ,WAAAG,EAAEH,CAAM,IAAI,IACLG;AAAA,EACV,GAAE,EAAE;AACR;AAuCL,IAAIE;AAAA,CACH,SAAUA,GAAW;AAClB,EAAAA,EAAUA,EAAU,mBAAsB,CAAC,IAAI,oBAC/CA,EAAUA,EAAU,kBAAqB,CAAC,IAAI,mBAC9CA,EAAUA,EAAU,iBAAoB,CAAC,IAAI,kBAC7CA,EAAUA,EAAU,gBAAmB,CAAC,IAAI;AAChD,GAAGA,MAAcA,IAAY,CAAA,EAAG;AA8NvB,IAAAC,IAAGL;","x_google_ignoreList":[0]}
@@ -1,118 +0,0 @@
1
- import { jsx as y, jsxs as T } from "react/jsx-runtime";
2
- import { c as w } from "./index-DkvUNBNf.mjs";
3
- import { useGetI18nText as S, CommandList as $, useI18nText as C } from "sanity";
4
- import { a0 as D, a1 as G, a as H, X as W, Y as j, Z as F, _ as X, $ as E, a2 as K, P as M } from "./StructureToolProvider-BMLps71e.mjs";
5
- import { B as R, A as U } from "./v4-C78sE4Gb.mjs";
6
- import { styled as Y } from "styled-components";
7
- import { B as Z } from "./index-C2OAo3To.mjs";
8
- const q = Y.hr`
9
- background-color: var(--card-border-color);
10
- height: 1px;
11
- margin: 0;
12
- border: none;
13
- `;
14
- function z(x) {
15
- const e = w(20), {
16
- childItemId: a,
17
- items: t,
18
- isActive: i,
19
- layout: u,
20
- showIcons: r,
21
- title: c
22
- } = x, {
23
- collapsed: B
24
- } = D();
25
- let l;
26
- e[0] !== t ? (l = t == null ? void 0 : t.filter(J), e[0] = t, e[1] = l) : l = e[1];
27
- const s = S(l);
28
- let n;
29
- e[2] !== t ? (n = (o) => {
30
- var P;
31
- return ((P = t == null ? void 0 : t.find((b, L) => L === o)) == null ? void 0 : P.type) === "divider";
32
- }, e[2] = t, e[3] = n) : n = e[3];
33
- const d = n;
34
- let v;
35
- e[4] !== r ? (v = (o) => {
36
- var b;
37
- const P = (b = o.displayOptions) == null ? void 0 : b.showIcon;
38
- return typeof P < "u" ? P !== !1 : r !== !1;
39
- }, e[4] = r, e[5] = v) : v = e[5];
40
- const p = v;
41
- let f;
42
- e[6] !== a || e[7] !== s || e[8] !== i || e[9] !== u || e[10] !== p ? (f = (o, P) => {
43
- const {
44
- virtualIndex: b
45
- } = P;
46
- if (o.type === "divider")
47
- return /* @__PURE__ */ y(R, { marginBottom: 1, children: /* @__PURE__ */ y(q, {}) }, `divider-${b}`);
48
- const L = !i && a === o.id, k = i && a === o.id, A = o._id && o.schemaType ? {
49
- _id: o._id,
50
- _type: o.schemaType.name,
51
- title: o.title
52
- } : void 0;
53
- return /* @__PURE__ */ y(G, { icon: p(o) ? o.icon : !1, id: o.id, layout: u, marginBottom: 1, pressed: L, schemaType: o.schemaType, selected: k, title: s(o).title, value: A }, o.id);
54
- }, e[6] = a, e[7] = s, e[8] = i, e[9] = u, e[10] = p, e[11] = f) : f = e[11];
55
- const h = f, I = B ? "hidden" : "auto";
56
- let m;
57
- e[12] !== d || e[13] !== t || e[14] !== h || e[15] !== c ? (m = t && t.length > 0 && /* @__PURE__ */ y($, { activeItemDataAttr: "data-hovered", ariaLabel: c, canReceiveFocus: !0, getItemDisabled: d, itemHeight: 51, items: t, onlyShowSelectionWhenActive: !0, paddingBottom: 1, paddingX: 3, renderItem: h, wrapAround: !1 }), e[12] = d, e[13] = t, e[14] = h, e[15] = c, e[16] = m) : m = e[16];
58
- let g;
59
- return e[17] !== I || e[18] !== m ? (g = /* @__PURE__ */ y(H, { overflow: I, children: m }), e[17] = I, e[18] = m, e[19] = g) : g = e[19], g;
60
- }
61
- function J(x) {
62
- return x.type !== "divider";
63
- }
64
- const N = (x) => {
65
- const e = w(11), {
66
- index: a,
67
- menuItems: t,
68
- menuItemGroups: i,
69
- title: u
70
- } = x, {
71
- features: r
72
- } = W(), {
73
- collapsed: c,
74
- isLast: B
75
- } = j(), l = B && !c ? -1 : 0;
76
- let s;
77
- e[0] !== i || e[1] !== t ? (s = /* @__PURE__ */ y(X, { menuItems: t, menuItemGroups: i }), e[0] = i, e[1] = t, e[2] = s) : s = e[2];
78
- let n;
79
- e[3] !== r.backButton || e[4] !== a ? (n = r.backButton && a > 0 && /* @__PURE__ */ y(Z, { as: F, "data-as": "a", icon: U, mode: "bleed", tooltipProps: {
80
- content: "Back"
81
- } }), e[3] = r.backButton, e[4] = a, e[5] = n) : n = e[5];
82
- let d;
83
- return e[6] !== s || e[7] !== n || e[8] !== l || e[9] !== u ? (d = /* @__PURE__ */ y(E, { actions: s, backButton: n, tabIndex: l, title: u }), e[6] = s, e[7] = n, e[8] = l, e[9] = u, e[10] = d) : d = e[10], d;
84
- };
85
- function ne(x) {
86
- const e = w(21), {
87
- childItemId: a,
88
- index: t,
89
- isActive: i,
90
- isSelected: u,
91
- pane: r,
92
- paneKey: c
93
- } = x, {
94
- defaultLayout: B,
95
- displayOptions: l,
96
- items: s,
97
- menuItems: n,
98
- menuItemGroups: d
99
- } = r, v = (l == null ? void 0 : l.showIcons) !== !1, {
100
- title: p
101
- } = C(r);
102
- let f;
103
- e[0] !== r.source ? (f = K, e[0] = r.source, e[1] = f) : f = e[1];
104
- let h;
105
- e[2] !== t || e[3] !== d || e[4] !== n || e[5] !== p ? (h = /* @__PURE__ */ y(N, { index: t, menuItems: n, menuItemGroups: d, title: p }), e[2] = t, e[3] = d, e[4] = n, e[5] = p, e[6] = h) : h = e[6];
106
- let I;
107
- e[7] !== a || e[8] !== B || e[9] !== i || e[10] !== s || e[11] !== c || e[12] !== v || e[13] !== p ? (I = /* @__PURE__ */ y(z, { childItemId: a, isActive: i, items: s, layout: B, showIcons: v, title: p }, c), e[7] = a, e[8] = B, e[9] = i, e[10] = s, e[11] = c, e[12] = v, e[13] = p, e[14] = I) : I = e[14];
108
- let m;
109
- return e[15] !== u || e[16] !== c || e[17] !== f || e[18] !== h || e[19] !== I ? (m = /* @__PURE__ */ T(M, { currentMaxWidth: 350, "data-testid": "structure-tool-list-pane", "data-ui": "ListPane", id: c, maxWidth: 640, minWidth: 320, selected: u, children: [
110
- f,
111
- h,
112
- I
113
- ] }), e[15] = u, e[16] = c, e[17] = f, e[18] = h, e[19] = I, e[20] = m) : m = e[20], m;
114
- }
115
- export {
116
- ne as default
117
- };
118
- //# sourceMappingURL=index-Sp9w8lMg.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index-Sp9w8lMg.mjs","sources":["../src/structure/panes/list/ListPaneContent.tsx","../src/structure/panes/list/ListPaneHeader.tsx","../src/structure/panes/list/ListPane.tsx"],"sourcesContent":["import {Box} from '@sanity/ui'\nimport {useCallback} from 'react'\nimport {\n CommandList,\n type CommandListItemContext,\n type GeneralPreviewLayoutKey,\n useGetI18nText,\n} from 'sanity'\nimport {styled} from 'styled-components'\n\nimport {PaneContent, PaneItem, usePaneLayout} from '../../components'\nimport {type PaneListItem, type PaneListItemDivider} from '../../types'\n\ninterface ListPaneContentProps {\n childItemId?: string\n isActive?: boolean\n items: (PaneListItem<unknown> | PaneListItemDivider)[] | undefined\n layout?: GeneralPreviewLayoutKey\n showIcons: boolean\n title: string\n}\n\nconst Divider = styled.hr`\n background-color: var(--card-border-color);\n height: 1px;\n margin: 0;\n border: none;\n`\n\n/**\n * @internal\n */\nexport function ListPaneContent(props: ListPaneContentProps) {\n const {childItemId, items, isActive, layout, showIcons, title} = props\n const {collapsed: layoutCollapsed} = usePaneLayout()\n const getI18nText = useGetI18nText(\n items?.filter(\n (item): item is Exclude<typeof item, {type: 'divider'}> => item.type !== 'divider',\n ),\n )\n\n const getItemDisabled = useCallback(\n (itemIndex: number) => {\n return items?.find((_, i) => i === itemIndex)?.type === 'divider'\n },\n [items],\n )\n\n const shouldShowIconForItem = useCallback(\n (item: PaneListItem): boolean => {\n const itemShowIcon = item.displayOptions?.showIcon\n\n // Specific true/false on item should have precedence over list setting\n if (typeof itemShowIcon !== 'undefined') {\n return itemShowIcon !== false // Boolean(item.icon)\n }\n\n // If no item setting is defined, defer to the pane settings\n return showIcons !== false // Boolean(item.icon)\n },\n [showIcons],\n )\n\n const renderItem = useCallback(\n (item: PaneListItem<unknown> | PaneListItemDivider, ctx: CommandListItemContext) => {\n const {virtualIndex: itemIndex} = ctx\n\n if (item.type === 'divider') {\n return (\n // eslint-disable-next-line react/no-array-index-key\n <Box key={`divider-${itemIndex}`} marginBottom={1}>\n <Divider />\n </Box>\n )\n }\n\n const pressed = !isActive && childItemId === item.id\n const selected = isActive && childItemId === item.id\n // If this is a document list item, pass on the ID and type,\n // otherwise leave it undefined to use the passed title and gang\n const value =\n item._id && item.schemaType\n ? {_id: item._id, _type: item.schemaType.name, title: item.title}\n : undefined\n\n return (\n <PaneItem\n icon={shouldShowIconForItem(item) ? item.icon : false}\n id={item.id}\n key={item.id}\n layout={layout}\n marginBottom={1}\n pressed={pressed}\n schemaType={item.schemaType}\n selected={selected}\n title={getI18nText(item).title}\n value={value}\n />\n )\n },\n [childItemId, getI18nText, isActive, layout, shouldShowIconForItem],\n )\n\n return (\n <PaneContent overflow={layoutCollapsed ? 'hidden' : 'auto'}>\n {items && items.length > 0 && (\n <CommandList\n activeItemDataAttr=\"data-hovered\"\n ariaLabel={title}\n canReceiveFocus\n getItemDisabled={getItemDisabled}\n itemHeight={51}\n items={items}\n onlyShowSelectionWhenActive\n paddingBottom={1}\n paddingX={3}\n renderItem={renderItem}\n wrapAround={false}\n />\n )}\n </PaneContent>\n )\n}\n","import {ArrowLeftIcon} from '@sanity/icons'\n\nimport {Button} from '../../../ui-components'\nimport {BackLink, PaneHeader, PaneHeaderActions, usePane} from '../../components'\nimport {type PaneMenuItem, type PaneMenuItemGroup} from '../../types'\nimport {useStructureTool} from '../../useStructureTool'\n\ninterface ListPaneHeaderProps {\n index: number\n menuItems?: PaneMenuItem[]\n menuItemGroups?: PaneMenuItemGroup[]\n title: string\n}\n\nexport const ListPaneHeader = ({index, menuItems, menuItemGroups, title}: ListPaneHeaderProps) => {\n const {features} = useStructureTool()\n const {collapsed, isLast} = usePane()\n // Prevent focus if this is the last (non-collapsed) pane.\n const tabIndex = isLast && !collapsed ? -1 : 0\n\n return (\n <PaneHeader\n actions={<PaneHeaderActions menuItems={menuItems} menuItemGroups={menuItemGroups} />}\n backButton={\n features.backButton &&\n index > 0 && (\n <Button\n as={BackLink}\n data-as=\"a\"\n icon={ArrowLeftIcon}\n mode=\"bleed\"\n tooltipProps={{content: 'Back'}}\n />\n )\n }\n tabIndex={tabIndex}\n title={title}\n />\n )\n}\n","import {Card, Code} from '@sanity/ui'\nimport {useI18nText} from 'sanity'\n\nimport {Pane} from '../../components'\nimport {_DEBUG} from '../../constants'\nimport {type BaseStructureToolPaneProps} from '../types'\nimport {ListPaneContent} from './ListPaneContent'\nimport {ListPaneHeader} from './ListPaneHeader'\n\ntype ListPaneProps = BaseStructureToolPaneProps<'list'>\n\n/**\n * @internal\n */\nexport function ListPane(props: ListPaneProps) {\n const {childItemId, index, isActive, isSelected, pane, paneKey} = props\n\n const {defaultLayout, displayOptions, items, menuItems, menuItemGroups} = pane\n const showIcons = displayOptions?.showIcons !== false\n const {title} = useI18nText(pane)\n\n return (\n <Pane\n currentMaxWidth={350}\n data-testid=\"structure-tool-list-pane\"\n data-ui=\"ListPane\"\n id={paneKey}\n maxWidth={640}\n minWidth={320}\n selected={isSelected}\n >\n {_DEBUG && (\n <Card padding={4} tone=\"transparent\">\n <Code>{pane.source || '(none)'}</Code>\n </Card>\n )}\n\n <ListPaneHeader\n index={index}\n menuItems={menuItems}\n menuItemGroups={menuItemGroups}\n title={title}\n />\n\n <ListPaneContent\n childItemId={childItemId}\n isActive={isActive}\n items={items}\n layout={defaultLayout}\n key={paneKey}\n showIcons={showIcons}\n title={title}\n />\n </Pane>\n )\n}\n"],"names":["Divider","styled","hr","ListPaneContent","props","$","_c","childItemId","items","isActive","layout","showIcons","title","collapsed","layoutCollapsed","usePaneLayout","t0","filter","_temp","getI18nText","useGetI18nText","t1","itemIndex","find","_","i","type","getItemDisabled","t2","item_0","itemShowIcon","item","displayOptions","showIcon","shouldShowIconForItem","t3","item_1","ctx","virtualIndex","itemIndex_0","jsx","Box","pressed","id","selected","value","_id","schemaType","_type","name","undefined","PaneItem","icon","renderItem","t4","t5","length","CommandList","t6","PaneContent","ListPaneHeader","index","menuItems","menuItemGroups","features","useStructureTool","isLast","usePane","tabIndex","PaneHeaderActions","backButton","Button","BackLink","ArrowLeftIcon","content","PaneHeader","ListPane","isSelected","pane","paneKey","defaultLayout","useI18nText","source","_DEBUG","jsxs","Pane"],"mappings":";;;;;;;AAsBA,MAAMA,IAAUC,EAAOC;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAUhB,SAAAC,EAAAC,GAAA;AAAAC,QAAAA,IAAAC,EAAA,EAAA,GACL;AAAA,IAAAC,aAAAA;AAAAA,IAAAC,OAAAA;AAAAA,IAAAC,UAAAA;AAAAA,IAAAC,QAAAA;AAAAA,IAAAC,WAAAA;AAAAA,IAAAC,OAAAA;AAAAA,EAAAA,IAAiER,GACjE;AAAA,IAAAS,WAAAC;AAAAA,MAAqCC,EAAc;AAACC,MAAAA;AAAAX,EAAAA,SAAAG,KAElDA,IAAAA,KAAAA,gBAAAA,EAAKS,OAAAC,IAEJb,OAAAG,GAAAH,OAAAW,KAAAA,IAAAX,EAAA,CAAA;AAHHc,QAAAA,IAAoBC,EAClBJ,CAGF;AAACK,MAAAA;AAAAhB,EAAAA,SAAAG,KAGCc,IAAAA,CAAAA;;AACSd,aAAAA,IA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