@behindthemusictree/app-kit 32.0.2 → 33.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-BVWRP6IK.js → chunk-A6GKSUJA.js} +3 -1
- package/dist/chunk-A6GKSUJA.js.map +1 -0
- package/dist/{chunk-OGTDTTHJ.js → chunk-I7NXFXV3.js} +2 -2
- package/dist/chunk-I7NXFXV3.js.map +1 -0
- package/dist/{chunk-4EBHHVZI.js → chunk-JRUPUUYV.js} +2 -2
- package/dist/genre-tree/index.cjs +2 -0
- package/dist/genre-tree/index.cjs.map +1 -1
- package/dist/genre-tree/index.js +2 -2
- package/dist/index.cjs +3 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +3 -3
- package/dist/popup/index.cjs +1 -1
- package/dist/popup/index.cjs.map +1 -1
- package/dist/popup/index.d.ts +1 -1
- package/dist/popup/index.js +1 -1
- package/dist/transport/index.cjs +2 -0
- package/dist/transport/index.cjs.map +1 -1
- package/dist/transport/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-BVWRP6IK.js.map +0 -1
- package/dist/chunk-OGTDTTHJ.js.map +0 -1
- /package/dist/{chunk-4EBHHVZI.js.map → chunk-JRUPUUYV.js.map} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/popup/PopupContext.tsx","../src/popup/useConnectivityErrorPopup.ts","../src/popup/useTrackUpload.ts"],"sourcesContent":["\"use client\";\n\nimport { createContext, useContext, useState, useCallback, useMemo, ReactNode } from \"react\";\n\nexport const AUTH_POPUP_TYPE = \"auth\";\n\ninterface PopupState {\n content: ReactNode;\n type: string | null;\n}\n\ninterface HidePopupOptions {\n onlyIfType?: string;\n}\n\ninterface PopupContextType {\n showPopup: (popup: ReactNode, type?: string | null) => void;\n hidePopup: (options?: HidePopupOptions) => void;\n activePopup: ReactNode | null;\n}\n\nconst PopupContext = createContext<PopupContextType | undefined>(undefined);\n\ninterface PopupProviderProps {\n children: ReactNode;\n}\n\nexport function PopupProvider({ children }: PopupProviderProps) {\n const [state, setState] = useState<PopupState>({ content: null, type: null });\n const activePopup = state.content;\n\n const showPopup = useCallback((popup: ReactNode, type?: string | null) => {\n setState({ content: popup, type: type ?? null });\n }, []);\n\n const hidePopup = useCallback((options?: HidePopupOptions) => {\n if (options?.onlyIfType !== undefined) {\n setState((prev) => (prev.type === options.onlyIfType ? { content: null, type: null } : prev));\n } else {\n setState({ content: null, type: null });\n }\n }, []);\n\n const value = useMemo(() => ({ showPopup, hidePopup, activePopup }), [showPopup, hidePopup, activePopup]);\n\n return <PopupContext.Provider value={value}>{children}</PopupContext.Provider>;\n}\n\nexport function usePopup() {\n const context = useContext(PopupContext);\n if (context === undefined) {\n throw new Error(\"usePopup must be used within a PopupProvider\");\n }\n return context;\n}\n","\"use client\";\n\nimport { ReactNode, useEffect, useRef } from \"react\";\nimport {\n AuthRequired,\n BackendError,\n BadRequestError,\n ClientError,\n ConnectivityError,\n InvalidInputError,\n NetworkError,\n ServiceError,\n} from \"../transport/app-errors/app-error\";\nimport { ErrorCode } from \"../transport/app-errors/app-error-codes\";\nimport { useConnectivityError } from \"../transport/connectivity-error-context\";\nimport { AUTH_POPUP_TYPE, usePopup } from \"./PopupContext\";\n\nexport interface ConnectivityErrorPopupRenderers {\n renderAuthPopup: () => ReactNode;\n renderSpotifyOnlyAuthPopup: () => ReactNode;\n renderInternalErrorPopup: (errorCode: ErrorCode) => ReactNode;\n renderSpotifyAuthErrorPopup: (params: { message: string; errorCode: ErrorCode; onClose: () => void }) => ReactNode;\n renderGoogleAuthErrorPopup: (params: { message: string; onClose: () => void }) => ReactNode;\n renderNetworkErrorPopup: () => ReactNode;\n}\n\nexport interface UseConnectivityErrorPopupOptions {\n isAccountPage: boolean;\n routeRequiresAuth: boolean;\n routeRequiresSpotify: boolean;\n renderers: ConnectivityErrorPopupRenderers;\n}\n\nconst ALWAYS_REDISPLAY_ON_REPEAT = [NetworkError, BackendError, ClientError, ServiceError, InvalidInputError];\n\n/**\n * Classifies the shared connectivity-error state into the right popup and shows it. Consuming apps\n * supply the actual popup components via `renderers` since those are app-branded; this hook owns\n * only the error -> popup-kind decision, so a fix here (e.g. a route not requiring auth still\n * surfacing an unexpected AuthRequired) applies to every app instead of needing a per-app patch.\n */\nexport function useConnectivityErrorPopup({\n isAccountPage,\n routeRequiresAuth,\n routeRequiresSpotify,\n renderers,\n}: UseConnectivityErrorPopupOptions): void {\n const { showPopup, hidePopup } = usePopup();\n const { connectivityError, clearConnectivityError } = useConnectivityError();\n const currentConnectivityErrorRef = useRef<typeof ConnectivityError | null>(null);\n const renderersRef = useRef(renderers);\n renderersRef.current = renderers;\n\n useEffect(() => {\n if (connectivityError === null) {\n if (currentConnectivityErrorRef.current !== null) {\n currentConnectivityErrorRef.current = null;\n hidePopup();\n }\n return;\n }\n\n const error = connectivityError;\n const isSpotifyAllowlistOrAuthError =\n error instanceof BackendError &&\n [ErrorCode.BACKEND_SPOTIFY_USER_NOT_IN_ALLOWLIST, ErrorCode.BACKEND_SPOTIFY_AUTHENTICATION_ERROR].includes(\n error.code,\n );\n\n if (isSpotifyAllowlistOrAuthError && !routeRequiresSpotify) {\n hidePopup();\n clearConnectivityError();\n currentConnectivityErrorRef.current = null;\n return;\n }\n\n if (\n currentConnectivityErrorRef.current == null ||\n (!ALWAYS_REDISPLAY_ON_REPEAT.includes(currentConnectivityErrorRef.current) &&\n !(connectivityError instanceof currentConnectivityErrorRef.current))\n ) {\n const renderer = renderersRef.current;\n let popup: ReactNode | null = null;\n let popupType: string | null = null;\n\n if (!isAccountPage && routeRequiresAuth && error instanceof AuthRequired) {\n popup = renderer.renderAuthPopup();\n popupType = AUTH_POPUP_TYPE;\n } else if (\n !isAccountPage &&\n routeRequiresSpotify &&\n error instanceof BackendError &&\n error.code === ErrorCode.BACKEND_SPOTIFY_AUTHORIZATION_REQUIRED\n ) {\n popup = renderer.renderSpotifyOnlyAuthPopup();\n popupType = AUTH_POPUP_TYPE;\n } else if (error instanceof InvalidInputError) {\n console.error(\"[InvalidInputError]\", error.code, error.json);\n popup = renderer.renderInternalErrorPopup(error.code);\n } else if (\n routeRequiresSpotify &&\n error instanceof BackendError &&\n [ErrorCode.BACKEND_SPOTIFY_USER_NOT_IN_ALLOWLIST, ErrorCode.BACKEND_SPOTIFY_AUTHENTICATION_ERROR].includes(\n error.code,\n )\n ) {\n popup = renderer.renderSpotifyAuthErrorPopup({\n message: error.message,\n errorCode: error.code,\n onClose: () => hidePopup(),\n });\n } else if (\n error instanceof BackendError &&\n [\n ErrorCode.BACKEND_GOOGLE_AUTHENTICATION_ERROR,\n ErrorCode.BACKEND_GOOGLE_OAUTH_MISCONFIGURED,\n ErrorCode.BACKEND_GOOGLE_OAUTH_CODE_INVALID_OR_EXPIRED,\n ].includes(error.code)\n ) {\n popup = renderer.renderGoogleAuthErrorPopup({ message: error.message, onClose: () => hidePopup() });\n } else if (\n error instanceof BadRequestError ||\n error instanceof BackendError ||\n error instanceof ServiceError ||\n error instanceof AuthRequired\n ) {\n // AuthRequired reaches here when the route doesn't require a session (e.g. a public\n // reference page) or is the account page, so the AuthPopup branch above didn't fire —\n // an unexpected 401 on those routes still needs to surface, not be dropped silently.\n popup = renderer.renderInternalErrorPopup(error.code);\n } else if (error instanceof NetworkError) {\n popup = renderer.renderNetworkErrorPopup();\n }\n\n if (popup) {\n showPopup(popup, popupType);\n }\n\n currentConnectivityErrorRef.current = error.constructor as typeof ConnectivityError;\n }\n }, [\n connectivityError,\n showPopup,\n hidePopup,\n clearConnectivityError,\n isAccountPage,\n routeRequiresAuth,\n routeRequiresSpotify,\n ]);\n}\n","\"use client\";\n\nimport { useState, useEffect, useCallback, useRef } from \"react\";\n\nexport type UploadStatus = \"pending\" | \"uploading\" | \"success\" | \"error\";\n\nexport type TrackUploadItem = {\n id: string;\n file: File;\n genre: string | null;\n status: UploadStatus;\n progress: number;\n error?: Error | null;\n uploadedTrack?: unknown;\n};\n\nexport interface UseTrackUploadOptions {\n files: File[];\n genre?: string | null;\n onProcessFile: (file: File, genre?: string | null) => Promise<unknown>;\n onComplete?: (uploadedTracks: unknown[]) => void;\n /**\n * Timeout (ms) before an in-flight upload is treated as failed. Passed by the consuming app\n * (from whatever env var / config it uses) so this package doesn't assume a specific env var name.\n */\n uploadTimeoutMs: number;\n}\n\nexport interface UseTrackUploadResult {\n items: TrackUploadItem[];\n isUploading: boolean;\n allComplete: boolean;\n successfulCount: number;\n errorCount: number;\n}\n\n/** Uploads `files` one after the other through `onProcessFile`, restarting whenever the file list or genre changes. */\nexport function useTrackUpload({\n files,\n genre,\n onProcessFile,\n onComplete,\n uploadTimeoutMs,\n}: UseTrackUploadOptions): UseTrackUploadResult {\n const [items, setItems] = useState<TrackUploadItem[]>([]);\n const [currentUploadIndex, setCurrentUploadIndex] = useState(0);\n const [isUploading, setIsUploading] = useState(false);\n const [allComplete, setAllComplete] = useState(false);\n\n const lastFilesKeyRef = useRef<string | null>(null);\n const progressIntervalRef = useRef<ReturnType<typeof setInterval> | null>(null);\n const runRef = useRef(0);\n const completedRunRef = useRef<number | null>(null);\n\n useEffect(() => {\n const filesKey = `${files.length}-${files.map((f) => `${f.name}:${f.size}`).join(\"|\")}-${genre ?? \"\"}`;\n if (lastFilesKeyRef.current === filesKey) return;\n lastFilesKeyRef.current = filesKey;\n runRef.current += 1;\n if (progressIntervalRef.current) {\n clearInterval(progressIntervalRef.current);\n progressIntervalRef.current = null;\n }\n\n setItems(\n files.map((file, index) => ({\n id: `upload-${index}-${file.name}`,\n file,\n genre: genre ?? null,\n status: \"pending\" as UploadStatus,\n progress: 0,\n })),\n );\n setCurrentUploadIndex(0);\n setIsUploading(false);\n setAllComplete(false);\n }, [files, genre]);\n\n const startNextUpload = useCallback(() => {\n const currentItem = items[currentUploadIndex];\n setIsUploading(true);\n\n setItems((prev) =>\n prev.map((item, index) => (index === currentUploadIndex ? { ...item, status: \"uploading\", progress: 0 } : item)),\n );\n\n if (progressIntervalRef.current) clearInterval(progressIntervalRef.current);\n progressIntervalRef.current = setInterval(() => {\n setItems((prev) =>\n prev.map((item, index) =>\n index === currentUploadIndex && item.status === \"uploading\"\n ? { ...item, progress: Math.min(item.progress + Math.random() * 8, 99) }\n : item,\n ),\n );\n }, 800);\n\n const uploadingIndex = currentUploadIndex;\n const run = runRef.current;\n\n const timeoutPromise = new Promise<never>((_, reject) => {\n setTimeout(() => reject(new Error(\"Upload timed out. The server took too long to respond.\")), uploadTimeoutMs);\n });\n\n Promise.race([onProcessFile(currentItem.file, currentItem.genre), timeoutPromise])\n .then((data) => {\n if (run !== runRef.current) return;\n if (progressIntervalRef.current) {\n clearInterval(progressIntervalRef.current);\n progressIntervalRef.current = null;\n }\n setItems((prev) =>\n prev.map((item, index) =>\n index === uploadingIndex ? { ...item, status: \"success\", progress: 100, uploadedTrack: data } : item,\n ),\n );\n setIsUploading(false);\n setCurrentUploadIndex((prev) => prev + 1);\n })\n .catch((error) => {\n if (run !== runRef.current) return;\n if (progressIntervalRef.current) {\n clearInterval(progressIntervalRef.current);\n progressIntervalRef.current = null;\n }\n setItems((prev) =>\n prev.map((item, index) => (index === uploadingIndex ? { ...item, status: \"error\", error } : item)),\n );\n setIsUploading(false);\n setCurrentUploadIndex((prev) => prev + 1);\n });\n }, [items, currentUploadIndex, onProcessFile, uploadTimeoutMs]);\n\n useEffect(() => {\n return () => {\n if (progressIntervalRef.current) {\n clearInterval(progressIntervalRef.current);\n progressIntervalRef.current = null;\n }\n };\n }, []);\n\n useEffect(() => {\n const shouldStart = items.length > 0 && !isUploading && currentUploadIndex < items.length;\n if (shouldStart) {\n startNextUpload();\n }\n }, [items, currentUploadIndex, isUploading, startNextUpload]);\n\n useEffect(() => {\n if (items.length > 0 && currentUploadIndex >= items.length && !isUploading) {\n // React may re-run queued updaters, handing back an equal-but-new items after completion\n if (completedRunRef.current === runRef.current) return;\n completedRunRef.current = runRef.current;\n setAllComplete(true);\n const successfulTracks = items\n .filter((item) => item.status === \"success\" && item.uploadedTrack)\n .map((item) => item.uploadedTrack);\n onComplete?.(successfulTracks);\n }\n }, [items, currentUploadIndex, isUploading, onComplete]);\n\n return {\n items,\n isUploading,\n allComplete,\n successfulCount: items.filter((item) => item.status === \"success\").length,\n errorCount: items.filter((item) => item.status === \"error\").length,\n };\n}\n"],"mappings":";;;;;;;;;;;;AAEA,SAAS,eAAe,YAAY,UAAU,aAAa,eAA0B;AA2C5E;AAzCF,IAAM,kBAAkB;AAiB/B,IAAM,eAAe,cAA4C,MAAS;AAMnE,SAAS,cAAc,EAAE,SAAS,GAAuB;AAC9D,QAAM,CAAC,OAAO,QAAQ,IAAI,SAAqB,EAAE,SAAS,MAAM,MAAM,KAAK,CAAC;AAC5E,QAAM,cAAc,MAAM;AAE1B,QAAM,YAAY,YAAY,CAAC,OAAkB,SAAyB;AACxE,aAAS,EAAE,SAAS,OAAO,MAAM,QAAQ,KAAK,CAAC;AAAA,EACjD,GAAG,CAAC,CAAC;AAEL,QAAM,YAAY,YAAY,CAAC,YAA+B;AAC5D,QAAI,SAAS,eAAe,QAAW;AACrC,eAAS,CAAC,SAAU,KAAK,SAAS,QAAQ,aAAa,EAAE,SAAS,MAAM,MAAM,KAAK,IAAI,IAAK;AAAA,IAC9F,OAAO;AACL,eAAS,EAAE,SAAS,MAAM,MAAM,KAAK,CAAC;AAAA,IACxC;AAAA,EACF,GAAG,CAAC,CAAC;AAEL,QAAM,QAAQ,QAAQ,OAAO,EAAE,WAAW,WAAW,YAAY,IAAI,CAAC,WAAW,WAAW,WAAW,CAAC;AAExG,SAAO,oBAAC,aAAa,UAAb,EAAsB,OAAe,UAAS;AACxD;AAEO,SAAS,WAAW;AACzB,QAAM,UAAU,WAAW,YAAY;AACvC,MAAI,YAAY,QAAW;AACzB,UAAM,IAAI,MAAM,8CAA8C;AAAA,EAChE;AACA,SAAO;AACT;;;ACpDA,SAAoB,WAAW,cAAc;AA+B7C,IAAM,6BAA6B,CAAC,cAAc,cAAc,aAAa,cAAc,iBAA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