@dragonmastery/dragoncore-vue 0.0.1
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/LICENSE +75 -0
- package/dist/AppLink-CHMMrSFI.js +54 -0
- package/dist/AppLink-CHMMrSFI.js.map +1 -0
- package/dist/Appearance-BfPdKMXw.js +70 -0
- package/dist/Appearance-BfPdKMXw.js.map +1 -0
- package/dist/Appearance-C3WguxT-.js +3 -0
- package/dist/ChangePasswordPage-Btu5lf-r.js +86 -0
- package/dist/ChangePasswordPage-Btu5lf-r.js.map +1 -0
- package/dist/ChangePasswordPage-mBBuQMkT.js +6 -0
- package/dist/CreateTeamForm-n2ut93vM.js +43 -0
- package/dist/CreateTeamMemberForm-CcH3AxNL.js +43 -0
- package/dist/CreateUserPage-CDrGuW9B.js +6 -0
- package/dist/CreateUserPage-Cmx8xjjv.js +76 -0
- package/dist/CreateUserPage-Cmx8xjjv.js.map +1 -0
- package/dist/CreditBalanceDashboard-DLz0ioP3.js +43 -0
- package/dist/CreditManagement-D3q5S-qc.js +43 -0
- package/dist/CustomerCreateSupportTicketForm-Ci7QYkG-.js +43 -0
- package/dist/CustomerEditSupportTicketForm-Dd5ZB74k.js +159 -0
- package/dist/CustomerEditSupportTicketForm-Dd5ZB74k.js.map +1 -0
- package/dist/CustomerEditSupportTicketForm-lLchVjnw.js +9 -0
- package/dist/CustomerSupportTicketAttachmentsTab-gBrVO97t.js +43 -0
- package/dist/CustomerSupportTicketCustomerNotesTab-D0jhzbOY.js +8 -0
- package/dist/CustomerSupportTicketCustomerNotesTab-D1aa9It7.js +23 -0
- package/dist/CustomerSupportTicketCustomerNotesTab-D1aa9It7.js.map +1 -0
- package/dist/CustomerSupportTicketHistoryTab-BNTf8EZq.js +6 -0
- package/dist/CustomerSupportTicketHistoryTab-CFYN_Sa4.js +17 -0
- package/dist/CustomerSupportTicketHistoryTab-CFYN_Sa4.js.map +1 -0
- package/dist/CustomerSupportTicketList-BkOzFxMP.js +6 -0
- package/dist/CustomerSupportTicketList-C2nUPawb.js +166 -0
- package/dist/CustomerSupportTicketList-C2nUPawb.js.map +1 -0
- package/dist/CustomerSupportTicketParent-2mONd9kL.js +66 -0
- package/dist/CustomerSupportTicketParent-2mONd9kL.js.map +1 -0
- package/dist/CustomerSupportTicketParent-N8ko1yFE.js +7 -0
- package/dist/CustomerSupportTicketSuccess-w_-9NXT4.js +43 -0
- package/dist/CustomerViewSupportTicket-CVwNH0lS.js +11 -0
- package/dist/CustomerViewSupportTicket-tZkxragu.js +363 -0
- package/dist/CustomerViewSupportTicket-tZkxragu.js.map +1 -0
- package/dist/EditTeamForm-BioqiTWE.js +43 -0
- package/dist/EditTeamMemberForm-DCq0Gsn_.js +7 -0
- package/dist/EditTeamMemberForm-ru4WgLz-.js +169 -0
- package/dist/EditTeamMemberForm-ru4WgLz-.js.map +1 -0
- package/dist/EditUserPage-BxJ5QvIM.js +112 -0
- package/dist/EditUserPage-BxJ5QvIM.js.map +1 -0
- package/dist/EditUserPage-XOBuxUxd.js +7 -0
- package/dist/FieldsetSection-CsHN38_o.js +27 -0
- package/dist/FieldsetSection-CsHN38_o.js.map +1 -0
- package/dist/ForgotPassword-CpqvcSFg.js +7 -0
- package/dist/ForgotPassword-CqhenzUG.js +73 -0
- package/dist/ForgotPassword-CqhenzUG.js.map +1 -0
- package/dist/InlineAttachments-I39rOvip.js +1351 -0
- package/dist/InlineAttachments-I39rOvip.js.map +1 -0
- package/dist/LoginForm-AM0qkfbU.js +7 -0
- package/dist/LoginForm-_PZ51Uwe.js +116 -0
- package/dist/LoginForm-_PZ51Uwe.js.map +1 -0
- package/dist/Logout-BMjiqHnS.js +38 -0
- package/dist/Logout-BMjiqHnS.js.map +1 -0
- package/dist/Logout-BfiBjlaH.js +6 -0
- package/dist/NoteList-C0hRPNMO.js +497 -0
- package/dist/NoteList-C0hRPNMO.js.map +1 -0
- package/dist/NotificationEmailsPage-BjRqtW95.js +141 -0
- package/dist/NotificationEmailsPage-BjRqtW95.js.map +1 -0
- package/dist/NotificationEmailsPage-bx-9rg3x.js +7 -0
- package/dist/ResetPassword-BQLkR9TZ.js +43 -0
- package/dist/Signup-CnCcQlB8.js +7 -0
- package/dist/Signup-c2-_yMOM.js +106 -0
- package/dist/Signup-c2-_yMOM.js.map +1 -0
- package/dist/StaffCreateSupportTicketForm-ChVFDJdA.js +43 -0
- package/dist/StaffEditSupportTicketForm-DY1Zkf5k.js +9 -0
- package/dist/StaffEditSupportTicketForm-DuUKuIGg.js +263 -0
- package/dist/StaffEditSupportTicketForm-DuUKuIGg.js.map +1 -0
- package/dist/StaffSupportTicketAttachmentsTab-DpDXsHXP.js +43 -0
- package/dist/StaffSupportTicketCustomerNotesTab-CusqQV2-.js +23 -0
- package/dist/StaffSupportTicketCustomerNotesTab-CusqQV2-.js.map +1 -0
- package/dist/StaffSupportTicketCustomerNotesTab-rbJHJ0_V.js +8 -0
- package/dist/StaffSupportTicketHistoryTab-D24myEm3.js +17 -0
- package/dist/StaffSupportTicketHistoryTab-D24myEm3.js.map +1 -0
- package/dist/StaffSupportTicketHistoryTab-nmVma5vp.js +6 -0
- package/dist/StaffSupportTicketInternalNotesTab-D8HM--dp.js +23 -0
- package/dist/StaffSupportTicketInternalNotesTab-D8HM--dp.js.map +1 -0
- package/dist/StaffSupportTicketInternalNotesTab-DihYd5XI.js +8 -0
- package/dist/StaffSupportTicketList-DelptSmK.js +43 -0
- package/dist/StaffSupportTicketParent-BCrj3ckV.js +7 -0
- package/dist/StaffSupportTicketParent-Cx1buQZw.js +66 -0
- package/dist/StaffSupportTicketParent-Cx1buQZw.js.map +1 -0
- package/dist/StaffSupportTicketSuccess-BYxtY5wZ.js +43 -0
- package/dist/StaffSupportTicketWorkflowTab-BrDDBeK9.js +9 -0
- package/dist/StaffSupportTicketWorkflowTab-DmVTPzxS.js +1234 -0
- package/dist/StaffSupportTicketWorkflowTab-DmVTPzxS.js.map +1 -0
- package/dist/SupportTicketHistoryTab-CLMopA7a.js +220 -0
- package/dist/SupportTicketHistoryTab-CLMopA7a.js.map +1 -0
- package/dist/SupportTicketStatusBadge-YdZzjvkh.js +163 -0
- package/dist/SupportTicketStatusBadge-YdZzjvkh.js.map +1 -0
- package/dist/TeamAttachmentsTab-BxUpTWYh.js +43 -0
- package/dist/TeamHistoryTab-CUCT9MRG.js +5 -0
- package/dist/TeamHistoryTab-gB3H2KZv.js +219 -0
- package/dist/TeamHistoryTab-gB3H2KZv.js.map +1 -0
- package/dist/TeamList-By6pzWm5.js +43 -0
- package/dist/TeamMemberList-CYV9fWEb.js +43 -0
- package/dist/TeamMemberParent-CVvGqpxD.js +43 -0
- package/dist/TeamMembersTab-4gmnP9sD.js +21 -0
- package/dist/TeamMembersTab-4gmnP9sD.js.map +1 -0
- package/dist/TeamMembersTab-CpE9BaCi.js +3 -0
- package/dist/TeamNotesTab-pfXTDhg6.js +23 -0
- package/dist/TeamNotesTab-pfXTDhg6.js.map +1 -0
- package/dist/TeamNotesTab-u4cDC67X.js +8 -0
- package/dist/TeamParent-BxT1KubK.js +43 -0
- package/dist/UserListPage-DsQdH2Sm.js +4 -0
- package/dist/UserListPage-WU56KiWj.js +153 -0
- package/dist/UserListPage-WU56KiWj.js.map +1 -0
- package/dist/UserProfilePage-B73JhjUu.js +7 -0
- package/dist/UserProfilePage-BtLUY1kt.js +125 -0
- package/dist/UserProfilePage-BtLUY1kt.js.map +1 -0
- package/dist/ViewTeam-DzX-obEl.js +43 -0
- package/dist/ViewTeamMember-PF6S_4Pb.js +43 -0
- package/dist/ZiniaContainer-C7c7Vwkh.js +18 -0
- package/dist/ZiniaContainer-C7c7Vwkh.js.map +1 -0
- package/dist/convertToLocalDateTime-D4IoNvRj.js +111 -0
- package/dist/convertToLocalDateTime-D4IoNvRj.js.map +1 -0
- package/dist/creditValueFormatter-DftEzu8d.js +128 -0
- package/dist/creditValueFormatter-DftEzu8d.js.map +1 -0
- package/dist/displayIdFormatter-Dz900Awr.js +13 -0
- package/dist/displayIdFormatter-Dz900Awr.js.map +1 -0
- package/dist/index.d.ts +6068 -0
- package/dist/index.js +45 -0
- package/dist/src-o5fMIo5_.js +6649 -0
- package/dist/src-o5fMIo5_.js.map +1 -0
- package/dist/useBreadcrumbs-DmgSucoe.js +41 -0
- package/dist/useBreadcrumbs-DmgSucoe.js.map +1 -0
- package/dist/useMutation-CFwe7H9j.js +50 -0
- package/dist/useMutation-CFwe7H9j.js.map +1 -0
- package/dist/useQuery-p7oJO7OD.js +107 -0
- package/dist/useQuery-p7oJO7OD.js.map +1 -0
- package/dist/useQueryCache-ByayvZgZ.js +254 -0
- package/dist/useQueryCache-ByayvZgZ.js.map +1 -0
- package/dist/useRpcAuth-BLlRSHy8.js +722 -0
- package/dist/useRpcAuth-BLlRSHy8.js.map +1 -0
- package/package.json +62 -0
- package/src/daisyui.css +63 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useRpcAuth-BLlRSHy8.js","names":["createAppBatch","refreshError: any","createAppBatch","headers: HeadersInit","lastError: Error | undefined","createAppBatch","error: any","globalRefreshTokenHandler: EnhancedRefreshTokenHandler<any> | null","globalRouter: Router | null","error: any","headers: HeadersInit","method: any"],"sources":["../src/composables/useEnv.ts","../src/utils/logger.ts","../src/composables/useUserSessionStore.ts","../src/composables/useRpc.ts","../src/utils/EnhancedRefreshTokenHandler.ts","../src/composables/useRpcAuth.ts"],"sourcesContent":["import { readonly } from 'vue';\n\nexport function useEnv() {\n const env = {\n restApiClient: {\n apiUrl: import.meta.env.VITE_API_CLIENT_URL as string,\n authOptions: {\n userDetails: import.meta.env.VITE_CF_APP_USER_DETAILS as string,\n accessToken: import.meta.env.VITE_CF_APP_ACCESS_TOKEN as string,\n decodedToken: import.meta.env.VITE_CF_APP_DECODED_TOKEN as string,\n },\n },\n allowUserSignup: import.meta.env.VITE_ALLOW_USER_SIGNUP === 'true',\n maxAttachmentFileSize: import.meta.env.VITE_MAX_ATTACHMENT_FILE_SIZE_MB\n ? parseInt(import.meta.env.VITE_MAX_ATTACHMENT_FILE_SIZE_MB, 10) * 1024 * 1024\n : 50 * 1024 * 1024, // Default: 50MB (convert MB to bytes)\n };\n\n return readonly(env);\n}\n","/**\n * Log levels as string literals\n */\nexport const LOG_LEVEL = {\n NONE: 'NONE',\n ERROR: 'ERROR',\n WARN: 'WARN',\n INFO: 'INFO',\n DEBUG: 'DEBUG',\n TRACE: 'TRACE',\n} as const;\n\nexport type LogLevel = (typeof LOG_LEVEL)[keyof typeof LOG_LEVEL];\n\n/**\n * Logger utility that conditionally logs based on configured log level\n */\nexport class Logger {\n private static instance: Logger;\n private logLevel: LogLevel = LOG_LEVEL.INFO; // Default log level\n\n private constructor() {\n this.setLogLevelFromEnv();\n }\n\n /**\n * Get the singleton logger instance\n */\n public static getInstance(): Logger {\n if (!Logger.instance) {\n Logger.instance = new Logger();\n }\n return Logger.instance;\n }\n\n /**\n * Set the log level from environment variables\n */\n private setLogLevelFromEnv(): void {\n // Check for explicit log level setting\n const logLevelStr = (import.meta.env.VITE_LOG_LEVEL as string) || '';\n\n if (logLevelStr) {\n switch (logLevelStr.toUpperCase()) {\n case 'NONE':\n this.logLevel = LOG_LEVEL.NONE;\n break;\n case 'ERROR':\n this.logLevel = LOG_LEVEL.ERROR;\n break;\n case 'WARN':\n this.logLevel = LOG_LEVEL.WARN;\n break;\n case 'INFO':\n this.logLevel = LOG_LEVEL.INFO;\n break;\n case 'DEBUG':\n this.logLevel = LOG_LEVEL.DEBUG;\n break;\n case 'TRACE':\n this.logLevel = LOG_LEVEL.TRACE;\n break;\n }\n } else {\n // If no explicit log level, set based on environment\n const isDev =\n import.meta.env.DEV === true ||\n import.meta.env.MODE === 'development' ||\n import.meta.env.VITE_APP_ENV === 'local' ||\n import.meta.env.VITE_APP_ENV === 'dev';\n\n this.logLevel = isDev ? LOG_LEVEL.DEBUG : LOG_LEVEL.INFO;\n }\n\n console.log(`[Logger] Log level set to: ${this.logLevel.toUpperCase()}`);\n }\n\n /**\n * Set the log level programmatically\n */\n public setLogLevel(level: LogLevel): void {\n this.logLevel = level;\n console.log(`[Logger] Log level changed to: ${this.logLevel.toUpperCase()}`);\n }\n\n /**\n * Get the current log level\n */\n public getLogLevel(): LogLevel {\n return this.logLevel;\n }\n\n /**\n * Determine if a message at the given level should be logged\n * based on the current log level setting\n */\n private shouldLog(level: LogLevel): boolean {\n // Define log level hierarchy (higher number = more verbose)\n const levelPriority = {\n [LOG_LEVEL.NONE]: 0,\n [LOG_LEVEL.ERROR]: 1,\n [LOG_LEVEL.WARN]: 2,\n [LOG_LEVEL.INFO]: 3,\n [LOG_LEVEL.DEBUG]: 4,\n [LOG_LEVEL.TRACE]: 5,\n };\n\n // Compare current log level with requested level\n // Only log if the current level is equal to or higher than the requested level\n return levelPriority[this.logLevel] >= levelPriority[level];\n }\n\n /**\n * Log a trace message (most verbose)\n */\n public trace(message: string, ...args: any[]): void {\n if (this.shouldLog(LOG_LEVEL.TRACE)) {\n console.log(`[TRACE] ${message}`, ...args);\n }\n }\n\n /**\n * Log a debug message\n */\n public debug(message: string, ...args: any[]): void {\n if (this.shouldLog(LOG_LEVEL.DEBUG)) {\n console.debug(`[DEBUG] ${message}`, ...args);\n }\n }\n\n /**\n * Log an info message\n */\n public info(message: string, ...args: any[]): void {\n if (this.shouldLog(LOG_LEVEL.INFO)) {\n console.log(`[INFO] ${message}`, ...args);\n }\n }\n\n /**\n * Log a warning message\n */\n public warn(message: string, ...args: any[]): void {\n if (this.shouldLog(LOG_LEVEL.WARN)) {\n console.warn(`[WARN] ${message}`, ...args);\n }\n }\n\n /**\n * Log an error message\n */\n public error(message: string, ...args: any[]): void {\n if (this.shouldLog(LOG_LEVEL.ERROR)) {\n console.error(`[ERROR] ${message}`, ...args);\n }\n }\n}\n\n// Export a singleton instance for easy use throughout the app\nexport const logger = Logger.getInstance();\n\n/**\n * Conditionally log based on per-instance debug flag and global log level\n * - If debug === false: never log (explicitly disabled)\n * - If debug === true: always log (bypasses global log level)\n * - If debug === undefined: use global log level (default behavior)\n */\nexport function logIfEnabled(\n level: 'debug' | 'error' | 'warn' | 'info',\n message: string,\n debug: boolean | undefined,\n ...args: any[]\n): void {\n if (debug === false) return; // Explicitly disabled\n if (debug === true) {\n // Explicitly enabled - log directly bypassing global log level\n const prefix = `[${level.toUpperCase()}]`;\n if (level === 'error') console.error(prefix, message, ...args);\n else if (level === 'warn') console.warn(prefix, message, ...args);\n else console.log(prefix, message, ...args);\n return;\n }\n // Otherwise use logger which respects global log level\n if (level === 'debug') logger.debug(message, ...args);\n else if (level === 'error') logger.error(message, ...args);\n else if (level === 'warn') logger.warn(message, ...args);\n else logger.info(message, ...args);\n}\n","import { jwtDecode } from 'jwt-decode';\nimport { defineStore } from 'pinia';\nimport { computed, ref, watchEffect } from 'vue';\nimport type { UserAppSession, UserDetailsTokenPayload } from '../lib/models/userSession';\nimport { logIfEnabled, logger } from '../utils/logger';\nimport { useEnv } from './useEnv';\nimport { createAppBatch } from './useRpc';\n\n/**\n * Generic user session store for Dragoncore applications.\n *\n * Responsibilities:\n * - Store and manage user session state (accessToken, userSession)\n * - Sync with localStorage\n * - Provide token refresh capability\n * - Provide token expiration checking\n *\n * Note: This store is intentionally NOT generic on TApi.\n * The refresh method uses createAppBatch which can be typed on a per-call basis.\n */\nexport const useUserSessionStore = defineStore('userSession', () => {\n const env = useEnv().restApiClient;\n const userSession = ref<UserAppSession | null>(null);\n const accessToken = ref<string | null>(null);\n const decodedToken = ref<any | null>(null);\n const isRefreshing = ref(false);\n const debug = ref<boolean>(false);\n\n // Watch localStorage for external changes and update our reactive refs\n watchEffect(() => {\n // Check if localStorage keys are properly defined\n if (!env.authOptions.accessToken || !env.authOptions.userDetails) {\n logIfEnabled(\n 'error',\n '[UserSessionStore] localStorage keys are undefined - check environment variables',\n debug.value,\n );\n return;\n }\n\n const storedAccessToken = localStorage.getItem(env.authOptions.accessToken);\n if (storedAccessToken !== accessToken.value) {\n accessToken.value = storedAccessToken;\n try {\n decodedToken.value = storedAccessToken ? jwtDecode(storedAccessToken) : null;\n } catch (error) {\n logIfEnabled(\n 'error',\n '[UserSessionStore] Failed to decode access token:',\n debug.value,\n error,\n );\n decodedToken.value = null;\n }\n }\n\n const storedUserSession = localStorage.getItem(env.authOptions.userDetails);\n if (storedUserSession) {\n try {\n const decoded = jwtDecode<UserDetailsTokenPayload>(storedUserSession);\n // Extract the actual session data from the nested 'details' field\n const sessionData = decoded.details;\n if (JSON.stringify(sessionData) !== JSON.stringify(userSession.value)) {\n userSession.value = sessionData;\n }\n } catch (error) {\n logIfEnabled(\n 'error',\n '[UserSessionStore] Failed to decode user session:',\n debug.value,\n error,\n );\n if (userSession.value !== null) {\n userSession.value = null;\n }\n }\n } else if (userSession.value !== null) {\n userSession.value = null;\n }\n });\n\n const currentSession = computed(() => {\n if (!userSession.value) {\n return null;\n }\n return userSession.value;\n });\n\n const clientHeaders = computed(() => ({\n 'Content-Type': 'application/json',\n ...(accessToken.value ? { Authorization: `Bearer ${accessToken.value}` } : {}),\n }));\n\n /**\n * Refresh the access token using the refresh token (from HTTP-only cookie).\n * This method uses createAppBatch directly to avoid circular dependencies.\n *\n * @returns true if refresh was successful, false otherwise\n */\n async function refreshToken<\n TApi extends {\n userSessions: {\n refreshToken(): Promise<{ access_token: string; user_details_token: string }>;\n };\n },\n >(): Promise<boolean> {\n try {\n if (isRefreshing.value) {\n logIfEnabled('debug', '[RefreshToken] Token refresh already in progress', debug.value);\n return false;\n }\n\n isRefreshing.value = true;\n logIfEnabled('debug', '[RefreshToken] Starting token refresh', debug.value);\n\n // Check if refresh token is expired (if we have session data)\n if (userSession.value) {\n const tokenStatus = isTokenExpired();\n if (tokenStatus.refreshTokenExpired) {\n logIfEnabled(\n 'warn',\n '[RefreshToken] Refresh token is already expired, cannot refresh',\n debug.value,\n );\n return false;\n }\n }\n\n // Use createAppBatch directly - refresh endpoint is public and doesn't need auth wrapper\n // credentials: 'include' allows the HTTP-only refresh token cookie to be sent\n const batch = createAppBatch<TApi>({ credentials: 'include' });\n const tokens = await batch.userSessions.refreshToken();\n\n if (!tokens || !tokens.access_token || !tokens.user_details_token) {\n logIfEnabled(\n 'error',\n '[RefreshToken] Invalid response from refresh endpoint',\n debug.value,\n );\n return false;\n }\n\n // Set both tokens using existing validation logic\n setSession(tokens.user_details_token);\n setAccessToken(tokens.access_token);\n\n // Verify that both components of the session were properly updated\n const sessionUpdated = !!userSession.value && !!accessToken.value;\n if (!sessionUpdated) {\n logIfEnabled(\n 'error',\n '[RefreshToken] Failed to update all session components',\n debug.value,\n );\n return false;\n }\n\n // Verify the new tokens are not expired\n const newTokenStatus = isTokenExpired();\n if (newTokenStatus.accessTokenExpired) {\n logIfEnabled(\n 'error',\n '[RefreshToken] New access token is already expired!',\n debug.value,\n );\n return false;\n }\n\n logIfEnabled('debug', '[RefreshToken] Token refresh successful', debug.value);\n return true;\n } catch (refreshError: any) {\n logIfEnabled('error', '[RefreshToken] Token refresh failed:', debug.value, refreshError);\n return false;\n } finally {\n isRefreshing.value = false;\n }\n }\n\n /**\n * Check if tokens are expired\n */\n function isTokenExpired(): { accessTokenExpired: boolean; refreshTokenExpired: boolean } {\n const now = Date.now() / 1000;\n\n // Access token expiration check\n const accessTokenExpired = decodedToken.value?.exp ? decodedToken.value.exp < now : true;\n\n // Refresh token expiration check\n const refreshTokenExpired = userSession.value?.expires_at\n ? new Date(userSession.value.expires_at).getTime() / 1000 < now\n : true;\n\n return { accessTokenExpired, refreshTokenExpired };\n }\n\n /**\n * Set the user session (stored in localStorage as JWT)\n */\n function setSession(token: string | null) {\n if (token) {\n try {\n const decoded = jwtDecode<UserDetailsTokenPayload>(token);\n // Extract the actual session data from the nested 'details' field\n userSession.value = decoded.details;\n localStorage.setItem(env.authOptions.userDetails, token);\n logIfEnabled('debug', '[SetSession] User session set successfully', debug.value);\n } catch (error) {\n logger.error('[SetSession] Failed to decode user session token:', error);\n userSession.value = null;\n localStorage.removeItem(env.authOptions.userDetails);\n }\n } else {\n userSession.value = null;\n localStorage.removeItem(env.authOptions.userDetails);\n logIfEnabled('debug', '[SetSession] User session cleared', debug.value);\n }\n }\n\n /**\n * Set the access token (stored in localStorage as JWT string)\n */\n function setAccessToken(token: string | null) {\n if (token) {\n try {\n const decoded = jwtDecode(token);\n accessToken.value = token;\n decodedToken.value = decoded;\n localStorage.setItem(env.authOptions.accessToken, token);\n logIfEnabled('debug', '[SetAccessToken] Access token set successfully', debug.value);\n } catch (error) {\n logger.error('[SetAccessToken] Failed to decode access token:', error);\n accessToken.value = null;\n decodedToken.value = null;\n localStorage.removeItem(env.authOptions.accessToken);\n // Also clear user session if we're clearing the access token\n if (userSession.value) {\n userSession.value = null;\n localStorage.removeItem(env.authOptions.userDetails);\n }\n }\n } else {\n accessToken.value = null;\n decodedToken.value = null;\n localStorage.removeItem(env.authOptions.accessToken);\n logIfEnabled('debug', '[SetAccessToken] Access token cleared', debug.value);\n }\n }\n\n /**\n * Clear all session data\n */\n function clearSession() {\n setSession(null);\n setAccessToken(null);\n }\n\n return {\n // State\n userSession,\n currentSession,\n accessToken,\n clientHeaders,\n debug,\n // Methods\n setSession,\n setAccessToken,\n clearSession,\n refreshToken,\n isTokenExpired,\n };\n});\n","import { newHttpBatchRpcSession, type RpcStub } from 'capnweb';\nimport type { DragoncoreApi } from '@dragonmastery/dragoncore-shared';\nimport { useEnv } from './useEnv';\nimport { useUserSessionStore } from './useUserSessionStore';\n\n/**\n * Creates a fresh RPC batch session with authentication headers.\n * Each call creates a new session, which is the correct pattern for Cap'n Web RPC.\n *\n * This is the simple version - just creates a batch with auth headers.\n * For advanced features (token refresh, retry, tracked sessions), use executeWithAuth from useRpcAuth.\n *\n * @param options - Optional configuration for the RPC batch\n * @param options.credentials - Credentials mode for the request. Use 'include' for login/logout/refreshToken to allow cookies.\n */\nexport function createAppBatch<TApi extends Record<string, any> = DragoncoreApi>(options?: {\n credentials?: RequestCredentials;\n}): RpcStub<TApi> {\n const userStore = useUserSessionStore();\n const env = useEnv();\n\n const headers: HeadersInit = {};\n // Pinia stores auto-unwrap refs, so accessToken is already string | null\n const accessToken = userStore.accessToken;\n if (accessToken) {\n headers['Authorization'] = `Bearer ${accessToken}`;\n }\n\n // Create a Request object with headers (capnweb accepts Request objects)\n const request = new Request(env.restApiClient.apiUrl + '/rpc', {\n method: 'POST', // Will be overridden by capnweb, but required for Request constructor\n headers,\n credentials: options?.credentials ?? 'omit', // Use 'include' for login/logout/refreshToken\n });\n\n return newHttpBatchRpcSession<TApi>(request);\n}\n","import { useEnv } from '../composables/useEnv';\nimport { createAppBatch } from '../composables/useRpc';\nimport { logger } from './logger';\n\ninterface AuthTokens {\n access_token: string;\n user_details_token: string;\n}\n\ninterface RefreshState {\n isRefreshing: boolean;\n pendingPromise: Promise<AuthTokens> | null;\n lastAttempt: number;\n failureCount: number;\n}\n\n/**\n * Minimum API shape required for authentication.\n * Your API must have a userSessions service with a refreshToken method.\n */\nexport interface AuthenticatableApi {\n userSessions: {\n refreshToken(): Promise<{\n access_token: string;\n user_details_token: string;\n }>;\n };\n}\n\nexport class EnhancedRefreshTokenHandler<TApi extends AuthenticatableApi> {\n private refreshState: RefreshState = {\n isRefreshing: false,\n pendingPromise: null,\n lastAttempt: 0,\n failureCount: 0,\n };\n\n async performRefreshWithStrategies(): Promise<AuthTokens> {\n // Prevent duplicate refresh attempts\n if (this.refreshState.isRefreshing && this.refreshState.pendingPromise) {\n logger.debug(\n '[EnhancedRefresh] Refresh already in progress, returning existing promise',\n );\n return this.refreshState.pendingPromise;\n }\n\n this.refreshState.isRefreshing = true;\n this.refreshState.pendingPromise = this.executeRefreshStrategies();\n\n try {\n const tokens = await this.refreshState.pendingPromise;\n this.refreshState.failureCount = 0;\n logger.debug('[EnhancedRefresh] Refresh completed successfully');\n return tokens;\n } catch (error) {\n this.refreshState.failureCount++;\n logger.error('[EnhancedRefresh] All refresh strategies failed:', error);\n throw error;\n } finally {\n this.refreshState.isRefreshing = false;\n this.refreshState.pendingPromise = null;\n this.refreshState.lastAttempt = Date.now();\n }\n }\n\n private async executeRefreshStrategies(): Promise<AuthTokens> {\n const strategies = [\n {\n name: 'Direct RefreshToken',\n execute: () => this.directRefreshToken(),\n },\n {\n name: 'Warmup + Retry RefreshToken',\n execute: () => this.warmupAndRetryRefresh(),\n },\n {\n name: 'Alternative Domain RefreshToken',\n execute: () => this.alternativeDomainRefresh(),\n },\n ];\n\n let lastError: Error | undefined;\n let partialSuccess = false;\n\n for (const [index, strategy] of strategies.entries()) {\n try {\n logger.debug(`[EnhancedRefresh] Attempting strategy ${index + 1}: ${strategy.name}`);\n const tokens = await strategy.execute();\n logger.debug(`[EnhancedRefresh] Strategy ${index + 1} (${strategy.name}) succeeded`);\n return tokens;\n } catch (error) {\n lastError = error as Error;\n logger.debug(\n `[EnhancedRefresh] Strategy ${index + 1} (${strategy.name}) failed:`,\n error,\n );\n\n // Check if we got a partial response or if this is a network/temporary issue\n const errorMessage = error instanceof Error ? error.message : String(error);\n if (\n !errorMessage.includes('No refresh_token') &&\n !errorMessage.includes('REFRESH_TOKEN_EXPIRED')\n ) {\n // This might be a temporary failure, mark as partial success\n partialSuccess = true;\n }\n\n // Progressive backoff between strategies\n if (index < strategies.length - 1) {\n const backoffDelay = 100 * (index + 1); // 100ms, 200ms, etc.\n await this.delay(backoffDelay);\n }\n }\n }\n\n // Add context to error object for better handling\n if (lastError && partialSuccess) {\n const enhancedError = lastError;\n (enhancedError as any).partialSuccess = true;\n (enhancedError as any).isTemporaryFailure = true;\n }\n\n throw lastError!;\n }\n\n private async directRefreshToken(): Promise<AuthTokens> {\n try {\n // Create RPC batch directly - refresh endpoint is public, doesn't need auth check\n // Use credentials: 'include' to send cookies with refresh token\n const batch = createAppBatch<TApi>({ credentials: 'include' });\n const tokens = await batch.userSessions.refreshToken();\n\n if (!tokens || !tokens.access_token || !tokens.user_details_token) {\n throw new Error('No refresh_token in response');\n }\n\n return {\n access_token: tokens.access_token,\n user_details_token: tokens.user_details_token,\n };\n } catch (error: any) {\n // Log the full error to help debug\n logger.error('[EnhancedRefresh] Refresh token call failed:', {\n error,\n name: error?.name,\n message: error?.message,\n code: error?.code,\n originalError: error?.originalError,\n stack: error?.stack,\n });\n\n // Re-throw with more context if it's an InternalServerError\n if (error?.name === 'InternalServerError' && error?.originalError) {\n throw error.originalError;\n }\n throw error;\n }\n }\n\n private async warmupAndRetryRefresh(): Promise<AuthTokens> {\n logger.debug('[EnhancedRefresh] Warming up cookie context');\n\n // First, make a lightweight request to restore cookie context\n await this.warmupCookieContext();\n\n // Wait briefly for browser to restore cookie state\n await this.delay(150);\n\n // Now attempt the refresh\n return this.directRefreshToken();\n }\n\n private async alternativeDomainRefresh(): Promise<AuthTokens> {\n // This strategy could use a different approach if backend supports it\n // For now, just retry with longer delay after warmup\n await this.warmupCookieContext();\n await this.delay(300);\n return this.directRefreshToken();\n }\n\n private async warmupCookieContext(): Promise<void> {\n const warmupStrategies = [\n // Strategy 1: Favicon request (lightweight)\n () =>\n fetch(window.location.origin + '/favicon.ico', {\n method: 'HEAD',\n credentials: 'include',\n cache: 'no-cache',\n mode: 'same-origin',\n }),\n\n // Strategy 2: OPTIONS request to RPC endpoint\n () => {\n const rpcEndpoint = useEnv().restApiClient.apiUrl + '/rpc';\n return fetch(rpcEndpoint, {\n method: 'OPTIONS',\n credentials: 'include',\n cache: 'no-cache',\n });\n },\n\n // Strategy 3: Root path request\n () =>\n fetch(window.location.origin + '/', {\n method: 'HEAD',\n credentials: 'include',\n cache: 'no-cache',\n mode: 'same-origin',\n }),\n ];\n\n // Try warmup strategies in parallel, use the fastest one\n try {\n await Promise.race(\n warmupStrategies.map((strategy) =>\n strategy().catch(() => {\n // Ignore individual strategy failures\n }),\n ),\n );\n logger.debug('[EnhancedRefresh] Cookie context warmed up');\n } catch (error) {\n // If all warmup strategies fail, continue anyway\n logger.debug('[EnhancedRefresh] Cookie warmup failed, continuing:', error);\n }\n }\n\n private delay(ms: number): Promise<void> {\n return new Promise((resolve) => setTimeout(resolve, ms));\n }\n\n // Utility method to check if we should attempt refresh based on recent failures\n shouldAttemptRefresh(): boolean {\n const timeSinceLastAttempt = Date.now() - this.refreshState.lastAttempt;\n const minRetryInterval = Math.min(\n 5000,\n 1000 * Math.pow(2, this.refreshState.failureCount),\n ); // Exponential backoff, max 5s\n\n return timeSinceLastAttempt > minRetryInterval;\n }\n\n // Get current refresh state for debugging\n getRefreshState(): RefreshState {\n return { ...this.refreshState };\n }\n}\n\n/**\n * Create an instance of the refresh token handler for your API type.\n * Your API must extend AuthenticatableApi (must have userSessions.refreshToken method).\n *\n * @example\n * ```typescript\n * // In your app's setup/config\n * import type { AppApi } from '@follow-zap/shared';\n * import { createRefreshTokenHandler, setRefreshTokenHandler } from '@dragonmastery/dragoncore-vue';\n *\n * // Initialize during app setup\n * setRefreshTokenHandler(createRefreshTokenHandler<AppApi>());\n * ```\n */\nexport function createRefreshTokenHandler<TApi extends AuthenticatableApi>() {\n return new EnhancedRefreshTokenHandler<TApi>();\n}\n\n/**\n * Global refresh token handler instance.\n * Set this once in your app's initialization.\n */\nlet globalRefreshTokenHandler: EnhancedRefreshTokenHandler<any> | null = null;\n\n/**\n * Set the global refresh token handler for your application.\n * Call this once during app initialization.\n */\nexport function setRefreshTokenHandler<TApi extends AuthenticatableApi>(\n handler: EnhancedRefreshTokenHandler<TApi>,\n): void {\n globalRefreshTokenHandler = handler;\n}\n\n/**\n * Get the global refresh token handler.\n * This is used internally by useQuery and useMutation.\n *\n * @throws Error if handler is not set\n */\nexport function getRefreshTokenHandler(): EnhancedRefreshTokenHandler<any> {\n if (!globalRefreshTokenHandler) {\n throw new Error(\n 'Refresh token handler not initialized. Call setRefreshTokenHandler() in your app initialization.',\n );\n }\n return globalRefreshTokenHandler as EnhancedRefreshTokenHandler<any>;\n}\n","import type { DragoncoreApi } from '@dragonmastery/dragoncore-shared';\nimport { newHttpBatchRpcSession, type RpcStub } from 'capnweb';\nimport type { Router } from 'vue-router';\nimport { useEnv } from './useEnv';\nimport { useUserSessionStore } from './useUserSessionStore';\n\n/**\n * Auth error codes that should trigger token refresh\n */\nconst AUTH_ERROR_CODES = [\n 'ACCESS_TOKEN_EXPIRED',\n 'ACCESS_TOKEN_REVOKED',\n 'NO_ACCESS_TOKEN',\n 'NO_REFRESH_TOKEN',\n];\n\nexport const BATCH_MODE = {\n batch: 'batch',\n tracked: 'tracked',\n} as const;\n\nexport type BatchMode = (typeof BATCH_MODE)[keyof typeof BATCH_MODE];\n\n/**\n * Check if an error is an auth error that should trigger refresh\n */\nfunction isAuthError(error: any): boolean {\n if (!error) return false;\n\n // Unwrap InternalServerError to get original error\n let actualError = error;\n if (error.name === 'InternalServerError' && error.originalError) {\n actualError = error.originalError;\n }\n\n // Check for AuthenticationError class name\n if (actualError.name === 'AuthenticationError' || error.name === 'AuthenticationError') {\n return true;\n }\n\n // Check for error code property\n if (actualError.code && AUTH_ERROR_CODES.includes(actualError.code)) return true;\n if (error.code && AUTH_ERROR_CODES.includes(error.code)) return true;\n\n // Check error message for auth error patterns\n const errorMessage = actualError.message || error.message || String(error);\n if (AUTH_ERROR_CODES.some((code) => errorMessage.includes(code))) return true;\n\n // Check for common auth error strings\n if (\n errorMessage.includes('Unauthorized') ||\n errorMessage.includes('authentication') ||\n errorMessage.includes('token')\n ) {\n // Only treat as auth error if it's clearly an auth issue\n return (\n errorMessage.toLowerCase().includes('expired') ||\n errorMessage.toLowerCase().includes('revoked') ||\n errorMessage.toLowerCase().includes('invalid token') ||\n errorMessage.toLowerCase().includes('no refresh token')\n );\n }\n\n return false;\n}\n\n/**\n * Global router instance.\n * Set this once in your app's initialization.\n */\nlet globalRouter: Router | null = null;\n\n/**\n * Set the global router instance for your application.\n * Call this once during app initialization.\n */\nexport function setRouter(router: Router): void {\n globalRouter = router;\n}\n\n/**\n * Get the global router instance.\n * This is used internally by executeWithAuth for navigation.\n *\n * @throws Error if router is not set\n */\nfunction getRouter(): Router {\n if (!globalRouter) {\n throw new Error('Router not initialized. Call setRouter() in your app initialization.');\n }\n return globalRouter;\n}\n\n/**\n * Check if token needs refresh before making a request\n */\nfunction needsRefresh(userStore: ReturnType<typeof useUserSessionStore>): boolean {\n if (!userStore.accessToken) {\n return true;\n }\n const { accessTokenExpired, refreshTokenExpired } = userStore.isTokenExpired();\n return accessTokenExpired || refreshTokenExpired;\n}\n\n/**\n * Attempt to refresh the token using the provided handler\n */\nasync function attemptRefresh(\n userStore: ReturnType<typeof useUserSessionStore>,\n refreshTokenHandler: {\n shouldAttemptRefresh(): boolean;\n performRefreshWithStrategies(): Promise<{\n access_token: string;\n user_details_token: string;\n }>;\n },\n): Promise<boolean> {\n const router = getRouter();\n\n try {\n if (!userStore.currentSession && !userStore.accessToken) {\n return false;\n }\n\n if (userStore.currentSession) {\n const { refreshTokenExpired } = userStore.isTokenExpired();\n if (refreshTokenExpired) {\n await router.push('/auth/logout');\n return false;\n }\n }\n\n if (!refreshTokenHandler.shouldAttemptRefresh()) {\n return false;\n }\n\n const tokens = await refreshTokenHandler.performRefreshWithStrategies();\n userStore.setSession(tokens.user_details_token);\n userStore.setAccessToken(tokens.access_token);\n return true;\n } catch (error: any) {\n console.error('[RPC Auth] Refresh attempt failed:', {\n error,\n name: error?.name,\n message: error?.message,\n code: error?.code,\n originalError: error?.originalError,\n });\n\n // Unwrap InternalServerError to check original error\n const actualError = error?.originalError || error;\n const errorMessage = (actualError?.message || error?.message || '').toUpperCase();\n const originalErrorMessage = (error?.originalError?.message || '').toUpperCase();\n const combinedMessage = `${errorMessage} ${originalErrorMessage}`;\n\n const criticalError =\n combinedMessage.includes('NO_REFRESH_TOKEN') ||\n combinedMessage.includes('REFRESH_TOKEN_EXPIRED') ||\n combinedMessage.includes('REFRESH_TOKEN_REVOKED') ||\n combinedMessage.includes('INVALID REFRESH TOKEN') ||\n combinedMessage.includes('NO REFRESH TOKEN FOUND');\n\n if (criticalError) {\n await router.push('/auth/logout');\n }\n return false;\n }\n}\n\n/**\n * Create a base RPC batch with current auth token\n */\nexport function createAppBatch<TApi extends Record<string, any> = DragoncoreApi>(options?: {\n credentials?: RequestCredentials;\n mode?: BatchMode;\n trackedSegment?: string;\n}): RpcStub<TApi> {\n const userStore = useUserSessionStore();\n const env = useEnv();\n\n const headers: HeadersInit = {};\n const accessToken = userStore.accessToken;\n if (accessToken) {\n headers['Authorization'] = `Bearer ${accessToken}`;\n }\n\n const request = new Request(env.restApiClient.apiUrl + '/rpc', {\n method: 'POST',\n headers,\n credentials: options?.credentials ?? 'omit',\n });\n\n // If mode is batch and no tracked segment is provided then we can just return the batch\n if (options?.mode === BATCH_MODE.batch && !options?.trackedSegment) {\n return newHttpBatchRpcSession<TApi>(request);\n }\n\n // Use tracked session for metrics (creates separate HTTP request per method)\n return createTrackedSession<TApi>(request, options?.trackedSegment);\n}\n\n/**\n * Execute an RPC call with automatic auth handling\n * - Checks token expiration before call\n * - Handles auth errors and retries after refresh\n *\n * @param fn - Function that receives an RPC batch and returns a promise\n * @param options - Configuration options\n * @param options.refreshTokenHandler - Instance of refresh token handler for your API type\n */\nexport async function executeWithAuth<\n TApi extends Record<string, any> = DragoncoreApi,\n T = any,\n>(\n fn: (batch: RpcStub<TApi>) => Promise<T>,\n options: {\n credentials?: RequestCredentials;\n skipAuthCheck?: boolean;\n mode?: BatchMode;\n trackedSegment?: string;\n refreshTokenHandler: {\n shouldAttemptRefresh(): boolean;\n performRefreshWithStrategies(): Promise<{\n access_token: string;\n user_details_token: string;\n }>;\n };\n },\n): Promise<T> {\n const userStore = useUserSessionStore();\n const router = getRouter();\n\n // Skip auth for login/logout/refreshToken operations\n if (options?.skipAuthCheck) {\n const batch = createAppBatch<TApi>(options);\n return await fn(batch);\n }\n\n // Check if token needs refresh before making the request\n if (needsRefresh(userStore)) {\n const refreshed = await attemptRefresh(userStore, options.refreshTokenHandler);\n if (!refreshed) {\n // If refresh failed and we have no token, don't proceed\n if (!userStore.accessToken) {\n await router.push('/auth/logout');\n throw new Error('Authentication required');\n }\n // If we have a token but refresh failed, continue anyway (might be temporary)\n } else {\n // Verify the token is actually set\n if (!userStore.accessToken) {\n await router.push('/auth/logout');\n throw new Error('Token refresh failed to set access token');\n }\n }\n }\n\n // Execute the operation\n try {\n // Double-check we have a token before creating the batch\n if (!userStore.accessToken) {\n await router.push('/auth/logout');\n throw new Error('Authentication required');\n }\n const batch = createAppBatch<TApi>(options);\n return await fn(batch);\n } catch (error) {\n // If auth error, refresh and retry once\n if (isAuthError(error)) {\n const refreshed = await attemptRefresh(userStore, options.refreshTokenHandler);\n if (refreshed) {\n const retryBatch = createAppBatch<TApi>(options);\n return await fn(retryBatch);\n }\n await router.push('/auth/logout');\n throw error;\n }\n throw error;\n }\n}\n\n/**\n * Create a tracked RPC session that appends method names to URL\n */\nfunction createTrackedSession<T extends Record<string, any> = DragoncoreApi>(\n request: Request,\n trackedSegment?: string,\n): RpcStub<T> {\n const baseUrl = request.url;\n // If trackedSegment is provided then we dont need to do any ofteh complex proxy stuff, append the segment to the url and return the batch\n if (trackedSegment) {\n return newHttpBatchRpcSession<T>(\n new Request(`${baseUrl}/${trackedSegment}`, {\n method: request.method,\n headers: request.headers,\n credentials: request.credentials,\n }),\n );\n }\n\n function createProxy(path: string[] = []): any {\n return new Proxy(() => {}, {\n get(_target, prop) {\n if (typeof prop === 'string') {\n return createProxy([...path, prop]);\n }\n return undefined;\n },\n\n apply(_target, _thisArg, args) {\n // Build the full method path (e.g., \"teams.getUserTeams\")\n const fullPath = path.join('.');\n\n // Clone the request with updated URL\n const trackedRequest = new Request(`${baseUrl}/${fullPath}`, {\n method: request.method,\n headers: request.headers,\n credentials: request.credentials,\n });\n\n // Create batch with the tracked URL\n const batch = newHttpBatchRpcSession<T>(trackedRequest);\n\n // Navigate to the right method on the batch\n let method: any = batch;\n for (const segment of path) {\n method = method[segment];\n }\n\n // Call with original arguments\n return method(...args);\n },\n });\n }\n\n return createProxy() as RpcStub<T>;\n}\n"],"mappings":";;;;;;AAEA,SAAgB,SAAS;AAgBvB,QAAO,SAfK;EACV,eAAe;GACb,QAAQ,OAAO,KAAK,IAAI;GACx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,UAAU,aAAa;AAC1B,SAAM,OAAO,KAAK,eAAe;AACjC,SAAM,IAAI,MAAM,0BAA0B;;AAG5C,SAAO,MAAM,GADC,eAAqB,QAAQ,CACrB;UACf,OAAO;AAEd,MAAI,YAAY,MAAM,EAAE;AAEtB,OADkB,MAAM,eAAe,WAAW,QAAQ,oBAAoB,CAG5E,QAAO,MAAM,GADM,eAAqB,QAAQ,CACrB;AAE7B,SAAM,OAAO,KAAK,eAAe;AACjC,SAAM;;AAER,QAAM;;;;;;AAOV,SAAS,qBACP,SACA,gBACY;CACZ,MAAM,UAAU,QAAQ;AAExB,KAAI,eACF,QAAO,uBACL,IAAI,QAAQ,GAAG,QAAQ,GAAG,kBAAkB;EAC1C,QAAQ,QAAQ;EAChB,SAAS,QAAQ;EACjB,aAAa,QAAQ;EACtB,CAAC,CACH;CAGH,SAAS,YAAY,OAAiB,EAAE,EAAO;AAC7C,SAAO,IAAI,YAAY,IAAI;GACzB,IAAI,SAAS,MAAM;AACjB,QAAI,OAAO,SAAS,SAClB,QAAO,YAAY,CAAC,GAAG,MAAM,KAAK,CAAC;;GAKvC,MAAM,SAAS,UAAU,MAAM;IAE7B,MAAM,WAAW,KAAK,KAAK,IAAI;IAa/B,IAAIC,SAHU,uBAPS,IAAI,QAAQ,GAAG,QAAQ,GAAG,YAAY;KAC3D,QAAQ,QAAQ;KAChB,SAAS,QAAQ;KACjB,aAAa,QAAQ;KACtB,CAAC,CAGqD;AAIvD,SAAK,MAAM,WAAW,KACpB,UAAS,OAAO;AAIlB,WAAO,OAAO,GAAG,KAAK;;GAEzB,CAAC;;AAGJ,QAAO,aAAa"}
|
package/package.json
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@dragonmastery/dragoncore-vue",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "Vue 3 components and composables for dragoncore",
|
|
5
|
+
"author": "DragonMastery",
|
|
6
|
+
"license": "SEE LICENSE IN LICENSE",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"main": "./dist/index.js",
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
10
|
+
"exports": {
|
|
11
|
+
".": {
|
|
12
|
+
"development": "./src/index.ts",
|
|
13
|
+
"types": "./dist/index.d.ts",
|
|
14
|
+
"import": "./dist/index.js",
|
|
15
|
+
"default": "./dist/index.js"
|
|
16
|
+
},
|
|
17
|
+
"./daisyui.css": "./src/daisyui.css"
|
|
18
|
+
},
|
|
19
|
+
"files": [
|
|
20
|
+
"dist",
|
|
21
|
+
"src/daisyui.css",
|
|
22
|
+
"README.md"
|
|
23
|
+
],
|
|
24
|
+
"publishConfig": {
|
|
25
|
+
"access": "public"
|
|
26
|
+
},
|
|
27
|
+
"scripts": {
|
|
28
|
+
"npm:build": "tsdown",
|
|
29
|
+
"test": "vitest --run",
|
|
30
|
+
"test:watch": "vitest",
|
|
31
|
+
"test:coverage": "vitest run --coverage",
|
|
32
|
+
"type-check": "vue-tsc --project tsconfig.app.json --noEmit",
|
|
33
|
+
"format": "prettier --write \"src/**/*.{ts,tsx,vue}\"",
|
|
34
|
+
"prepublishOnly": "bun run npm:build",
|
|
35
|
+
"npm:publish": "bun publish --access public --no-git-checks"
|
|
36
|
+
},
|
|
37
|
+
"dependencies": {
|
|
38
|
+
"@dragonmastery/dragoncore-shared": "0.0.1",
|
|
39
|
+
"@dragonmastery/zinia-forms-core": "0.5.5",
|
|
40
|
+
"@vueuse/core": "14.1.0",
|
|
41
|
+
"capnweb": "0.3.0",
|
|
42
|
+
"jwt-decode": "4.0.0",
|
|
43
|
+
"pinia": "3.0.2",
|
|
44
|
+
"vue": "3.5.26",
|
|
45
|
+
"vue-router": "4.6.4",
|
|
46
|
+
"vue3-toastify": "0.2.8",
|
|
47
|
+
"zod": "3.24.4"
|
|
48
|
+
},
|
|
49
|
+
"devDependencies": {
|
|
50
|
+
"@tailwindcss/typography": "0.5.16",
|
|
51
|
+
"@vitest/coverage-v8": "3.1.3",
|
|
52
|
+
"@vue/compiler-sfc": "3.5.26",
|
|
53
|
+
"@vue/tsconfig": "0.8.1",
|
|
54
|
+
"daisyui": "5.0.35",
|
|
55
|
+
"tailwindcss": "4.1.7",
|
|
56
|
+
"tsdown": "0.18.1",
|
|
57
|
+
"typescript": "5.8.3",
|
|
58
|
+
"unplugin-vue": "7.1.0",
|
|
59
|
+
"vitest": "3.1.3",
|
|
60
|
+
"vue-tsc": "3.1.8"
|
|
61
|
+
}
|
|
62
|
+
}
|
package/src/daisyui.css
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Dragoncore Vue - Complete Tailwind & DaisyUI Configuration
|
|
3
|
+
*
|
|
4
|
+
* Import this file in your app's CSS to get the full setup:
|
|
5
|
+
* - Tailwind CSS
|
|
6
|
+
* - DaisyUI with light/dark themes
|
|
7
|
+
* - Component source scanning (dragoncore-vue + zinia-forms-core)
|
|
8
|
+
* - Shared component styles
|
|
9
|
+
*
|
|
10
|
+
* Usage in your app.css:
|
|
11
|
+
* @import '@dragonmastery/dragoncore-vue/daisyui.css';
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
@import 'tailwindcss';
|
|
15
|
+
@plugin "daisyui" {
|
|
16
|
+
themes:
|
|
17
|
+
light --default,
|
|
18
|
+
dark --prefersdark;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/* Scan dragoncore-vue components */
|
|
22
|
+
@source "./**/*.{vue,ts,js}";
|
|
23
|
+
|
|
24
|
+
/* Include zinia-forms-core dependency */
|
|
25
|
+
@import '@dragonmastery/zinia-forms-core/tailwind.css';
|
|
26
|
+
|
|
27
|
+
/* ============================================
|
|
28
|
+
Shared Component Styles
|
|
29
|
+
============================================ */
|
|
30
|
+
|
|
31
|
+
/* Show floating label even if text is empty */
|
|
32
|
+
.floating-label > span {
|
|
33
|
+
opacity: 100%;
|
|
34
|
+
top: 0;
|
|
35
|
+
translate: -12.5% calc(-50% - 0.125em);
|
|
36
|
+
scale: 0.9;
|
|
37
|
+
pointer-events: auto;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/* Input focus styling */
|
|
41
|
+
.input {
|
|
42
|
+
&:focus,
|
|
43
|
+
&:focus-within {
|
|
44
|
+
border-color: color-mix(in oklab, var(--input-color) 70%, transparent) !important;
|
|
45
|
+
outline: 2px solid color-mix(in oklab, var(--input-color) 50%, transparent) !important;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/* Select focus styling */
|
|
50
|
+
.select {
|
|
51
|
+
&:focus,
|
|
52
|
+
&:focus-within {
|
|
53
|
+
border-color: color-mix(in oklab, var(--input-color) 70%, transparent) !important;
|
|
54
|
+
outline: 2px solid color-mix(in oklab, var(--input-color) 50%, transparent) !important;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/* Label color support */
|
|
59
|
+
.label {
|
|
60
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
61
|
+
color: currentColor;
|
|
62
|
+
}
|
|
63
|
+
}
|