Rocky_Mountain_Vending/.pnpm-store/v10/files/8a/33cb2256a39532f3f7f296b02e0a4b049dbcaab5e3125f51cfe3bdd1e9ddfc74e90f2090ff4c8ac59893ee8b460c96ed7aa8272110413202e631325c351ae7
DMleadgen 46d973904b
Initial commit: Rocky Mountain Vending website
Next.js website for Rocky Mountain Vending company featuring:
- Product catalog with Stripe integration
- Service areas and parts pages
- Admin dashboard with Clerk authentication
- SEO optimized pages with JSON-LD structured data

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 16:22:15 -07:00

1 line
No EOL
6.4 KiB
Text

{"version":3,"sources":["../../../../src/next-devtools/userspace/app/segment-explorer-node.tsx"],"sourcesContent":["'use client'\n\nimport type { ReactNode } from 'react'\nimport {\n useState,\n createContext,\n useContext,\n use,\n useMemo,\n useCallback,\n} from 'react'\nimport { useLayoutEffect } from 'react'\nimport { dispatcher } from 'next/dist/compiled/next-devtools'\nimport { notFound } from '../../../client/components/not-found'\n\nexport type SegmentBoundaryType =\n | 'not-found'\n | 'error'\n | 'loading'\n | 'global-error'\n\nexport const SEGMENT_EXPLORER_SIMULATED_ERROR_MESSAGE =\n 'NEXT_DEVTOOLS_SIMULATED_ERROR'\n\nexport type SegmentNodeState = {\n type: string\n pagePath: string\n boundaryType: string | null\n setBoundaryType: (type: SegmentBoundaryType | null) => void\n}\n\nfunction SegmentTrieNode({\n type,\n pagePath,\n}: {\n type: string\n pagePath: string\n}): React.ReactNode {\n const { boundaryType, setBoundaryType } = useSegmentState()\n const nodeState: SegmentNodeState = useMemo(() => {\n return {\n type,\n pagePath,\n boundaryType,\n setBoundaryType,\n }\n }, [type, pagePath, boundaryType, setBoundaryType])\n\n // Use `useLayoutEffect` to ensure the state is updated during suspense.\n // `useEffect` won't work as the state is preserved during suspense.\n useLayoutEffect(() => {\n dispatcher.segmentExplorerNodeAdd(nodeState)\n return () => {\n dispatcher.segmentExplorerNodeRemove(nodeState)\n }\n }, [nodeState])\n\n return null\n}\n\nfunction NotFoundSegmentNode(): React.ReactNode {\n notFound()\n}\n\nfunction ErrorSegmentNode(): React.ReactNode {\n throw new Error(SEGMENT_EXPLORER_SIMULATED_ERROR_MESSAGE)\n}\n\nconst forever = new Promise(() => {})\nfunction LoadingSegmentNode(): React.ReactNode {\n use(forever)\n return null\n}\n\nexport function SegmentViewStateNode({ page }: { page: string }) {\n useLayoutEffect(() => {\n dispatcher.segmentExplorerUpdateRouteState(page)\n return () => {\n dispatcher.segmentExplorerUpdateRouteState('')\n }\n }, [page])\n return null\n}\n\nexport function SegmentBoundaryTriggerNode() {\n const { boundaryType } = useSegmentState()\n let segmentNode: React.ReactNode = null\n if (boundaryType === 'loading') {\n segmentNode = <LoadingSegmentNode />\n } else if (boundaryType === 'not-found') {\n segmentNode = <NotFoundSegmentNode />\n } else if (boundaryType === 'error') {\n segmentNode = <ErrorSegmentNode />\n }\n return segmentNode\n}\n\nexport function SegmentViewNode({\n type,\n pagePath,\n children,\n}: {\n type: string\n pagePath: string\n children?: ReactNode\n}): React.ReactNode {\n const segmentNode = (\n <SegmentTrieNode key={type} type={type} pagePath={pagePath} />\n )\n\n return (\n <>\n {segmentNode}\n {children}\n </>\n )\n}\n\nconst SegmentStateContext = createContext<{\n boundaryType: SegmentBoundaryType | null\n setBoundaryType: (type: SegmentBoundaryType | null) => void\n}>({\n boundaryType: null,\n setBoundaryType: () => {},\n})\n\nexport function SegmentStateProvider({ children }: { children: ReactNode }) {\n const [boundaryType, setBoundaryType] = useState<SegmentBoundaryType | null>(\n null\n )\n\n const [errorBoundaryKey, setErrorBoundaryKey] = useState(0)\n const reloadBoundary = useCallback(\n () => setErrorBoundaryKey((prev) => prev + 1),\n []\n )\n\n const setBoundaryTypeAndReload = useCallback(\n (type: SegmentBoundaryType | null) => {\n if (type === null) {\n reloadBoundary()\n }\n setBoundaryType(type)\n },\n [reloadBoundary]\n )\n\n return (\n <SegmentStateContext.Provider\n key={errorBoundaryKey}\n value={{\n boundaryType,\n setBoundaryType: setBoundaryTypeAndReload,\n }}\n >\n {children}\n </SegmentStateContext.Provider>\n )\n}\n\nexport function useSegmentState() {\n return useContext(SegmentStateContext)\n}\n"],"names":["SEGMENT_EXPLORER_SIMULATED_ERROR_MESSAGE","SegmentBoundaryTriggerNode","SegmentStateProvider","SegmentViewNode","SegmentViewStateNode","useSegmentState","SegmentTrieNode","type","pagePath","boundaryType","setBoundaryType","nodeState","useMemo","useLayoutEffect","dispatcher","segmentExplorerNodeAdd","segmentExplorerNodeRemove","NotFoundSegmentNode","notFound","ErrorSegmentNode","Error","forever","Promise","LoadingSegmentNode","use","page","segmentExplorerUpdateRouteState","segmentNode","children","SegmentStateContext","createContext","useState","errorBoundaryKey","setErrorBoundaryKey","reloadBoundary","useCallback","prev","setBoundaryTypeAndReload","Provider","value","useContext"],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;IAqBaA,wCAAwC;eAAxCA;;IA+DGC,0BAA0B;eAA1BA;;IA0CAC,oBAAoB;eAApBA;;IA7BAC,eAAe;eAAfA;;IAvBAC,oBAAoB;eAApBA;;IAsFAC,eAAe;eAAfA;;;;uBAtJT;8BAEoB;0BACF;AAQlB,MAAML,2CACX;AASF,SAASM,gBAAgB,EACvBC,IAAI,EACJC,QAAQ,EAIT;IACC,MAAM,EAAEC,YAAY,EAAEC,eAAe,EAAE,GAAGL;IAC1C,MAAMM,YAA8BC,IAAAA,cAAO,EAAC;QAC1C,OAAO;YACLL;YACAC;YACAC;YACAC;QACF;IACF,GAAG;QAACH;QAAMC;QAAUC;QAAcC;KAAgB;IAElD,wEAAwE;IACxE,oEAAoE;IACpEG,IAAAA,sBAAe,EAAC;QACdC,wBAAU,CAACC,sBAAsB,CAACJ;QAClC,OAAO;YACLG,wBAAU,CAACE,yBAAyB,CAACL;QACvC;IACF,GAAG;QAACA;KAAU;IAEd,OAAO;AACT;AAEA,SAASM;IACPC,IAAAA,kBAAQ;AACV;AAEA,SAASC;IACP,MAAM,qBAAmD,CAAnD,IAAIC,MAAMpB,2CAAV,qBAA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