@flexkit/studio 0.2.33 → 0.2.35

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 (124) hide show
  1. package/dist/chat-page-IR4RF46H.js +4 -0
  2. package/dist/chat-page-IR4RF46H.js.map +1 -0
  3. package/dist/{chunk-RLVHUIFC.js → chunk-7N3LTSVX.js} +2 -2
  4. package/dist/{chunk-RLVHUIFC.js.map → chunk-7N3LTSVX.js.map} +1 -1
  5. package/dist/chunk-BTH7HU5Y.js +2 -0
  6. package/dist/chunk-BTH7HU5Y.js.map +1 -0
  7. package/dist/chunk-DEG7QP5C.js +30 -0
  8. package/dist/chunk-DEG7QP5C.js.map +1 -0
  9. package/dist/{chunk-K3HW6YWS.js → chunk-EUWIIL3X.js} +2 -2
  10. package/dist/{chunk-K3HW6YWS.js.map → chunk-EUWIIL3X.js.map} +1 -1
  11. package/dist/{chunk-HSGUVQXU.js → chunk-FJRDLP7V.js} +8 -8
  12. package/dist/{chunk-HSGUVQXU.js.map → chunk-FJRDLP7V.js.map} +1 -1
  13. package/dist/chunk-G5N6HEPW.js +2 -0
  14. package/dist/chunk-G5N6HEPW.js.map +1 -0
  15. package/dist/chunk-J6EGNRRT.js +7 -0
  16. package/dist/{chunk-VUZ7GHSO.js.map → chunk-J6EGNRRT.js.map} +1 -1
  17. package/dist/chunk-KEGJNZLW.js +378 -0
  18. package/dist/chunk-KEGJNZLW.js.map +1 -0
  19. package/dist/chunk-PMLDA2FF.js +2 -0
  20. package/dist/chunk-PMLDA2FF.js.map +1 -0
  21. package/dist/chunk-PWGLA33F.js +3 -0
  22. package/dist/chunk-PWGLA33F.js.map +1 -0
  23. package/dist/chunk-PZWEC6KD.js +2 -0
  24. package/dist/chunk-PZWEC6KD.js.map +1 -0
  25. package/dist/{chunk-UB22GYFK.js → chunk-Q4CWQHBJ.js} +2 -2
  26. package/dist/{chunk-UB22GYFK.js.map → chunk-Q4CWQHBJ.js.map} +1 -1
  27. package/dist/{chunk-U5XZWEPO.js → chunk-R6DPAMLC.js} +3 -3
  28. package/dist/{chunk-U5XZWEPO.js.map → chunk-R6DPAMLC.js.map} +1 -1
  29. package/dist/{chunk-DHE6PO3V.js → chunk-RAUQCO6W.js} +2 -2
  30. package/dist/{chunk-DHE6PO3V.js.map → chunk-RAUQCO6W.js.map} +1 -1
  31. package/dist/{chunk-RFUMT6ZR.js → chunk-RFKMFD2O.js} +2 -2
  32. package/dist/{chunk-RFUMT6ZR.js.map → chunk-RFKMFD2O.js.map} +1 -1
  33. package/dist/chunk-RULCANNM.js +7 -0
  34. package/dist/chunk-RULCANNM.js.map +1 -0
  35. package/dist/{chunk-6I7D2JBA.js → chunk-TI3EHLRE.js} +3 -3
  36. package/dist/{chunk-6I7D2JBA.js.map → chunk-TI3EHLRE.js.map} +1 -1
  37. package/dist/{chunk-S26WK6RF.js → chunk-VFV44YZB.js} +2 -2
  38. package/dist/{chunk-S26WK6RF.js.map → chunk-VFV44YZB.js.map} +1 -1
  39. package/dist/chunk-W7JDZHCV.js +2 -0
  40. package/dist/chunk-W7JDZHCV.js.map +1 -0
  41. package/dist/{chunk-7ODGH7G2.js → chunk-WU2KCXBC.js} +2 -2
  42. package/dist/{chunk-7ODGH7G2.js.map → chunk-WU2KCXBC.js.map} +1 -1
  43. package/dist/chunk-XYE6ZAUB.js +2 -0
  44. package/dist/{chunk-S7VNSSIK.js.map → chunk-XYE6ZAUB.js.map} +1 -1
  45. package/dist/chunk-ZMONKGWJ.js +4 -0
  46. package/dist/{chunk-2MVQXXY7.js.map → chunk-ZMONKGWJ.js.map} +1 -1
  47. package/dist/{chunk-YKM3FUGK.js → chunk-ZRTWLY77.js} +3 -3
  48. package/dist/{chunk-YKM3FUGK.js.map → chunk-ZRTWLY77.js.map} +1 -1
  49. package/dist/entry-NQRN7SWV.js +2 -0
  50. package/dist/{entry-ROTT3ZDN.js.map → entry-NQRN7SWV.js.map} +1 -1
  51. package/dist/index.css +43 -0
  52. package/dist/index.d.ts +5 -1
  53. package/dist/index.js +8 -8
  54. package/dist/index.js.map +1 -1
  55. package/dist/list-7SCWJXUE.js +3 -0
  56. package/dist/{list-N4E3VXM5.js.map → list-7SCWJXUE.js.map} +1 -1
  57. package/dist/list-RPIG75US.js +2 -0
  58. package/dist/{list-RCTHBJOK.js.map → list-RPIG75US.js.map} +1 -1
  59. package/dist/pages-KXERA5Z6.js +5 -0
  60. package/dist/{pages-XUJGIHQI.js.map → pages-KXERA5Z6.js.map} +1 -1
  61. package/dist/plugin-pages-NXA4BT7Y.js +2 -0
  62. package/dist/{plugin-pages-FEQILAQR.js.map → plugin-pages-NXA4BT7Y.js.map} +1 -1
  63. package/dist/project-selector-SA6UUVBK.js +2 -0
  64. package/dist/project-selector-SA6UUVBK.js.map +1 -0
  65. package/dist/record-links-RTMCYEPM.js +2 -0
  66. package/dist/{record-links-HO4SEHOA.js.map → record-links-RTMCYEPM.js.map} +1 -1
  67. package/dist/{root-GQL3P63Z.js → root-6H6K3YQF.js} +3 -3
  68. package/dist/{root-GQL3P63Z.js.map → root-6H6K3YQF.js.map} +1 -1
  69. package/dist/root-IBZPU2D4.js +23 -0
  70. package/dist/{root-MLEJUEMJ.js.map → root-IBZPU2D4.js.map} +1 -1
  71. package/dist/{root-CCUROZVR.js → root-MBFQXX4E.js} +2 -2
  72. package/dist/{root-CCUROZVR.js.map → root-MBFQXX4E.js.map} +1 -1
  73. package/dist/root-TSZ3CSJU.js +14 -0
  74. package/dist/root-TSZ3CSJU.js.map +1 -0
  75. package/dist/{root-VA3E6HEY.js → root-TZIXWEZO.js} +2 -2
  76. package/dist/{root-VA3E6HEY.js.map → root-TZIXWEZO.js.map} +1 -1
  77. package/dist/{root-KXY4A6DW.js → root-W5ZPSNQ2.js} +2 -2
  78. package/dist/{root-KXY4A6DW.js.map → root-W5ZPSNQ2.js.map} +1 -1
  79. package/dist/{search-YY4GQQRM.js → search-ZLEYFT3T.js} +2 -2
  80. package/dist/{search-YY4GQQRM.js.map → search-ZLEYFT3T.js.map} +1 -1
  81. package/dist/skills-pages-RPMWIBLS.js +2 -0
  82. package/dist/{skills-pages-SAOZTUOH.js.map → skills-pages-RPMWIBLS.js.map} +1 -1
  83. package/dist/source-VYWE5EB5.js +2 -0
  84. package/dist/{source-2S24MZ5D.js.map → source-VYWE5EB5.js.map} +1 -1
  85. package/dist/{spec-renderer-ZSIVMKVE.js → spec-renderer-Z6GVHLFU.js} +2 -2
  86. package/dist/{spec-renderer-ZSIVMKVE.js.map → spec-renderer-Z6GVHLFU.js.map} +1 -1
  87. package/dist/ui.js +1 -1
  88. package/package.json +4 -4
  89. package/dist/chat-page-LR7XC2US.js +0 -4
  90. package/dist/chat-page-LR7XC2US.js.map +0 -1
  91. package/dist/chunk-2MVQXXY7.js +0 -4
  92. package/dist/chunk-3SY46ERM.js +0 -2
  93. package/dist/chunk-3SY46ERM.js.map +0 -1
  94. package/dist/chunk-4PUMSUJL.js +0 -30
  95. package/dist/chunk-4PUMSUJL.js.map +0 -1
  96. package/dist/chunk-C3OHXPJV.js +0 -2
  97. package/dist/chunk-C3OHXPJV.js.map +0 -1
  98. package/dist/chunk-CFYO546Y.js +0 -378
  99. package/dist/chunk-CFYO546Y.js.map +0 -1
  100. package/dist/chunk-ERDARDGB.js +0 -2
  101. package/dist/chunk-ERDARDGB.js.map +0 -1
  102. package/dist/chunk-L5T56MRH.js +0 -7
  103. package/dist/chunk-L5T56MRH.js.map +0 -1
  104. package/dist/chunk-NFEQBTIW.js +0 -2
  105. package/dist/chunk-NFEQBTIW.js.map +0 -1
  106. package/dist/chunk-S7VNSSIK.js +0 -2
  107. package/dist/chunk-VUZ7GHSO.js +0 -7
  108. package/dist/chunk-XMOSCJOI.js +0 -2
  109. package/dist/chunk-XMOSCJOI.js.map +0 -1
  110. package/dist/chunk-YDVO6XWD.js +0 -2
  111. package/dist/chunk-YDVO6XWD.js.map +0 -1
  112. package/dist/entry-ROTT3ZDN.js +0 -2
  113. package/dist/list-N4E3VXM5.js +0 -3
  114. package/dist/list-RCTHBJOK.js +0 -2
  115. package/dist/pages-XUJGIHQI.js +0 -5
  116. package/dist/plugin-pages-FEQILAQR.js +0 -2
  117. package/dist/project-selector-U64ROZ5D.js +0 -2
  118. package/dist/project-selector-U64ROZ5D.js.map +0 -1
  119. package/dist/record-links-HO4SEHOA.js +0 -2
  120. package/dist/root-BUXIQKA5.js +0 -14
  121. package/dist/root-BUXIQKA5.js.map +0 -1
  122. package/dist/root-MLEJUEMJ.js +0 -23
  123. package/dist/skills-pages-SAOZTUOH.js +0 -2
  124. package/dist/source-2S24MZ5D.js +0 -2
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/graphql-client/error-utils.ts","../src/graphql-client/graphql-context.tsx","../src/entities/actions-context.tsx"],"names":["hasCause","error","getServerError","ServerError","possibleServerError","getErrorMessage","message","parseErrorBody","bodyText","getGraphQLSchemaMismatchMessage","messages","getGraphQLValidationMessages","isMissingCountStoreFieldMessage","isMissingGraphQLFieldError","fieldName","CombinedGraphQLErrors","isSchemaValidationError","directMessage","isSchemaValidationMessage","serverError","responseBody","getServerErrorResult","getErrorCauseResponse","item","result","cause","causeMessage","extensions","ApolloProviderCompat","ApolloProvider","GraphQLErrorContext","createContext","useGraphQLError","ctx","useContext","USER_QUERY_CONTEXT","createErrorLink","setSchemaErrorMessage","ErrorLink","operation","schemaMismatchMessage","locations","path","CombinedProtocolErrors","responseError","errors","responseMessage","firstError","firstErrorMessage","additiveLink","currentProjectId","from","HttpLink","client","ApolloClient","InMemoryCache","responseObject","defaultDataIdFromObject","GraphQLProvider","children","useConfig","schemaErrorMessage","useState","useMemo","apolloClient","jsx","ActionsContext","EntityDispatchContext","actionsReducer","actions","action","actionType","uniqBy","props","ActionsProvider","entityActions","dispatchEntityActions","useReducer","useActions","useDispatch"],"mappings":"4eAsBA,SAASA,CAAAA,CAASC,EAA2C,CAC3D,OAAKA,EAIE,OAAA,GAAYA,CAAAA,CAHV,KAIX,CAEO,SAASC,CAAAA,CAAe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AAAA,CAAS,CAAA,CAC1E,CAEJ,CAEA,SAASmB,EAAAA,EAAuB,CAC9B,OAAO5C,UAAAA,CAAWgC,CAAc,CAClC,CAEA,SAASa,IAAgC,CACvC,OAAO7C,UAAAA,CAAWiC,CAAqB,CACzC","file":"chunk-YKM3FUGK.js","sourcesContent":["import type { ErrorLike } from '@apollo/client';\nimport { CombinedGraphQLErrors, ServerError } from '@apollo/client/errors';\n\ntype ErrorWithCause = ErrorLike & { cause?: unknown };\ntype ErrorWithMessage = {\n message?: unknown;\n};\ntype ServerErrorWithResult = ServerError & {\n result?: unknown;\n};\ntype GraphQLErrorResponse = {\n error?: unknown;\n errors?: unknown;\n message?: unknown;\n};\ntype GraphQLErrorItem = {\n extensions?: {\n code?: unknown;\n };\n message?: unknown;\n};\n\nfunction hasCause(error: ErrorLike): error is ErrorWithCause {\n if (!error) {\n return false;\n }\n\n return 'cause' in (error as ErrorWithCause);\n}\n\nexport function getServerError(error?: ErrorLike): ServerError | null {\n if (!error) {\n return null;\n }\n\n if (ServerError.is(error)) {\n return error;\n }\n\n if (hasCause(error)) {\n const possibleServerError = error.cause;\n\n if (ServerError.is(possibleServerError)) {\n return possibleServerError;\n }\n }\n\n return null;\n}\n\nfunction getErrorMessage(error: unknown): string | null {\n if (!error || typeof error !== 'object') {\n return null;\n }\n\n const { message } = error as ErrorWithMessage;\n\n return typeof message === 'string' ? message : null;\n}\n\nexport function parseErrorBody<T>(bodyText: string | undefined): T | null {\n if (!bodyText) {\n return null;\n }\n\n try {\n return JSON.parse(bodyText) as T;\n } catch {\n return null;\n }\n}\n\nexport function getGraphQLSchemaMismatchMessage(error?: ErrorLike): string | null {\n if (!error) {\n return null;\n }\n\n const messages = getGraphQLValidationMessages(error).filter((message) => !isMissingCountStoreFieldMessage(message));\n\n if (messages.length === 0) {\n return null;\n }\n\n return [\n 'The deployed schema is out of sync with your local Flexkit schema.',\n 'Run `flexkit deploy` using the CLI to apply your latest schema changes.',\n ...messages.map((message) => `- ${message}`),\n ].join('\\n');\n}\n\nexport function isMissingGraphQLFieldError(error: ErrorLike | undefined, fieldName: string): boolean {\n if (!error) {\n return false;\n }\n\n return getGraphQLValidationMessages(error).some((message) => {\n return message.includes(`Cannot query field \"${fieldName}\"`);\n });\n}\n\nfunction getGraphQLValidationMessages(error: ErrorLike): string[] {\n if (CombinedGraphQLErrors.is(error)) {\n return error.errors.filter(isSchemaValidationError).map(({ message }) => message);\n }\n\n const directMessage = getErrorMessage(error);\n\n if (directMessage && isSchemaValidationMessage(directMessage)) {\n return [directMessage];\n }\n\n const serverError = getServerError(error);\n\n if (serverError?.statusCode !== 400) {\n return [];\n }\n\n const responseBody =\n parseErrorBody<GraphQLErrorResponse>(serverError.bodyText) ??\n getServerErrorResult(serverError) ??\n getErrorCauseResponse(error);\n\n if (!responseBody) {\n return [];\n }\n\n if (Array.isArray(responseBody.errors)) {\n return responseBody.errors.filter(isSchemaValidationError).map((item) => item.message);\n }\n\n if (typeof responseBody.message === 'string' && isSchemaValidationMessage(responseBody.message)) {\n return [responseBody.message];\n }\n\n if (typeof responseBody.error === 'string' && isSchemaValidationMessage(responseBody.error)) {\n return [responseBody.error];\n }\n\n return [];\n}\n\nfunction getServerErrorResult(serverError: ServerError): GraphQLErrorResponse | null {\n const { result } = serverError as ServerErrorWithResult;\n\n if (!result || typeof result !== 'object') {\n return null;\n }\n\n return result as GraphQLErrorResponse;\n}\n\nfunction getErrorCauseResponse(error: ErrorLike): GraphQLErrorResponse | null {\n if (!hasCause(error)) {\n return null;\n }\n\n const { cause } = error;\n const causeMessage = getErrorMessage(cause);\n\n if (causeMessage && isSchemaValidationMessage(causeMessage)) {\n return { message: causeMessage };\n }\n\n if (!cause || typeof cause !== 'object') {\n return null;\n }\n\n const { result } = cause as { result?: unknown };\n\n if (result && typeof result === 'object') {\n return result as GraphQLErrorResponse;\n }\n\n return null;\n}\n\nfunction isSchemaValidationError(error: unknown): error is GraphQLErrorItem & { message: string } {\n if (!error || typeof error !== 'object') {\n return false;\n }\n\n const { extensions, message } = error as GraphQLErrorItem;\n const code = extensions?.code;\n\n if (code === 'GRAPHQL_VALIDATION_FAILED' && typeof message === 'string') {\n return true;\n }\n\n return typeof message === 'string' && isSchemaValidationMessage(message);\n}\n\nfunction isSchemaValidationMessage(message: string): boolean {\n return (\n message.startsWith('Cannot query field ') ||\n message.startsWith('Unknown type ') ||\n message.startsWith('Cannot query field \"') ||\n message.includes('GRAPHQL_VALIDATION_FAILED')\n );\n}\n\nfunction isMissingCountStoreFieldMessage(message: string): boolean {\n return /Cannot query field \"[_A-Za-z][_0-9A-Za-z]*Total\" on type \"Query\"/.test(message);\n}\n","'use client';\n\nimport type { JSX } from 'react';\nimport { ApolloClient, InMemoryCache, defaultDataIdFromObject, from, HttpLink } from '@apollo/client';\nimport type { ApolloLink } from '@apollo/client';\nimport { ApolloProvider } from '@apollo/client/react';\nimport { ErrorLink } from '@apollo/client/link/error';\nimport { CombinedGraphQLErrors, CombinedProtocolErrors } from '@apollo/client/errors';\nimport { getGraphQLSchemaMismatchMessage, getServerError, parseErrorBody } from './error-utils';\nimport { useConfig } from '../core/config/config-context';\nimport React, { createContext, useContext, useMemo, useState } from 'react';\n\nconst ApolloProviderCompat = ApolloProvider as unknown as React.ComponentType<{\n children?: React.ReactNode;\n client: ApolloClient;\n}>;\n\ntype GraphQLErrorContextValue = {\n schemaErrorMessage: string | null;\n setSchemaErrorMessage: React.Dispatch<React.SetStateAction<string | null>>;\n};\n\nconst GraphQLErrorContext = createContext<GraphQLErrorContextValue | undefined>(undefined);\n\nfunction useGraphQLError(): GraphQLErrorContextValue {\n const ctx = useContext(GraphQLErrorContext);\n\n if (!ctx) {\n throw new Error('useGraphQLError must be used within GraphQLProvider');\n }\n\n return ctx;\n}\n\n/**\n * Context flag for operations the user writes themselves (the Graph app's\n * Query view): any error there, a mismatch or a 400, is a typo, not a\n * deployment that drifted from the local schema, so it must not raise the\n * schema banner. The caller shows the error itself.\n */\nexport const USER_QUERY_CONTEXT = { userQuery: true } as const;\n\nfunction createErrorLink(setSchemaErrorMessage: (msg: string | null) => void): ApolloLink {\n return new ErrorLink(({ error, operation }) => {\n if (operation.getContext().userQuery === true) {\n return;\n }\n\n const schemaMismatchMessage = getGraphQLSchemaMismatchMessage(error);\n\n if (schemaMismatchMessage) {\n setSchemaErrorMessage(schemaMismatchMessage);\n\n return;\n }\n\n if (CombinedGraphQLErrors.is(error)) {\n error.errors.forEach(({ message, locations, path }) => {\n console.warn(`[GraphQL error]: Message: ${message}, Location: ${locations}, Path: ${path}`);\n });\n } else if (CombinedProtocolErrors.is(error)) {\n error.errors.forEach(({ message, extensions }) => {\n console.warn(`[Protocol error]: Message: ${message}, Extensions: ${JSON.stringify(extensions)}`);\n });\n }\n\n const serverError = getServerError(error);\n\n if (serverError?.statusCode === 400) {\n const responseBody = parseErrorBody<Record<string, unknown>>(serverError.bodyText);\n let message: string | null = null;\n\n if (responseBody && typeof responseBody === 'object') {\n const {\n error: responseError,\n errors,\n message: responseMessage,\n } = responseBody as {\n error?: unknown;\n errors?: unknown;\n message?: unknown;\n };\n\n if (typeof responseMessage === 'string') {\n message = responseMessage;\n } else if (Array.isArray(errors)) {\n const [firstError] = errors as { message?: unknown }[];\n\n if (firstError && typeof firstError.message === 'string') {\n const { message: firstErrorMessage } = firstError;\n message = firstErrorMessage;\n }\n } else if (typeof responseError === 'string') {\n message = responseError;\n } else {\n message = JSON.stringify(responseBody);\n }\n } else {\n message = serverError.bodyText;\n }\n\n setSchemaErrorMessage(\n message ?? 'There is an error in the deployed Flexkit schema. Fix flexkit.config.ts and run flexkit deploy.'\n );\n }\n\n if (serverError) {\n console.warn(`[Network error]: ${serverError.message}`);\n\n return;\n }\n\n if (error) {\n console.warn(`[Network error]: ${error.message}`);\n }\n });\n}\n\nfunction additiveLink(currentProjectId: string, setSchemaErrorMessage: (msg: string | null) => void): ApolloLink {\n return from([\n createErrorLink(setSchemaErrorMessage),\n new HttpLink({ uri: `/api/flexkit/${currentProjectId}/graphql` }),\n ]);\n}\n\nfunction client(\n currentProjectId: string | undefined,\n setSchemaErrorMessage: (msg: string | null) => void\n): ApolloClient {\n return new ApolloClient({\n link: additiveLink(currentProjectId ?? '', setSchemaErrorMessage),\n cache: new InMemoryCache({\n dataIdFromObject: (responseObject) => {\n return responseObject._id ? (responseObject._id as string) : defaultDataIdFromObject(responseObject);\n },\n }),\n });\n}\n\nexport function GraphQLProvider({ children }: { children: React.ReactNode }): JSX.Element {\n const { currentProjectId } = useConfig();\n const [schemaErrorMessage, setSchemaErrorMessage] = useState<string | null>(null);\n const ctx = useMemo(() => ({ schemaErrorMessage, setSchemaErrorMessage }), [schemaErrorMessage]);\n const apolloClient = useMemo(() => client(currentProjectId, setSchemaErrorMessage), [currentProjectId]);\n\n return (\n <GraphQLErrorContext.Provider value={ctx}>\n <ApolloProviderCompat client={apolloClient}>{children}</ApolloProviderCompat>\n </GraphQLErrorContext.Provider>\n );\n}\n\nexport { useGraphQLError };\n","'use client';\n\nimport { createContext, useContext, useReducer } from 'react';\nimport type { Dispatch, JSX, ReactNode } from 'react';\nimport { props, uniqBy } from 'ramda';\nimport type {\n Action,\n ActionAddEntity,\n ActionAlertDialog,\n ActionDeleteEntity,\n ActionEditEntity,\n ActionEditRelationship,\n} from './types';\n\nconst ActionsContext = createContext<Action[] | []>([]);\nconst EntityDispatchContext = createContext<Dispatch<Action>>(() => undefined);\n\nfunction actionsReducer(actions: Action[], action: Action): Action[] {\n const actionType = action.type;\n\n if (!action._id) {\n action._id = Date.now().toString();\n }\n\n switch (actionType) {\n case 'DeleteEntity': {\n return uniqBy(props(['type' as string, '_id']), [...(actions as ActionDeleteEntity[]), action]);\n }\n case 'AddEntity': {\n return uniqBy(props(['type' as string, '_id']), [...(actions as ActionAddEntity[]), action]);\n }\n case 'EditEntity': {\n return uniqBy(props(['type' as string, '_id']), [...(actions as ActionEditEntity[]), action]);\n }\n case 'EditRelationship': {\n return uniqBy(props(['type' as string, '_id']), [...(actions as ActionEditRelationship[]), action]);\n }\n case 'AlertDialog': {\n return uniqBy(props(['type' as string, '_id']), [...(actions as ActionAlertDialog[]), action]);\n }\n case 'Dismiss': {\n return actions.filter((item) => item._id !== action._id);\n }\n default: {\n throw Error(`Unknown action: ${actionType as string}`);\n }\n }\n}\n\nfunction ActionsProvider({ children }: { children: ReactNode }): JSX.Element {\n const [entityActions, dispatchEntityActions] = useReducer(actionsReducer, []);\n\n return (\n <ActionsContext.Provider value={entityActions}>\n <EntityDispatchContext.Provider value={dispatchEntityActions}>{children}</EntityDispatchContext.Provider>\n </ActionsContext.Provider>\n );\n}\n\nfunction useActions(): Action[] {\n return useContext(ActionsContext);\n}\n\nfunction useDispatch(): Dispatch<Action> {\n return useContext(EntityDispatchContext);\n}\n\nexport { ActionsProvider, useActions, useDispatch };\n"]}
1
+ {"version":3,"sources":["../src/graphql-client/error-utils.ts","../src/graphql-client/graphql-context.tsx","../src/entities/actions-context.tsx"],"names":["hasCause","error","getServerError","ServerError","possibleServerError","getErrorMessage","message","parseErrorBody","bodyText","getGraphQLSchemaMismatchMessage","messages","getGraphQLValidationMessages","isMissingCountStoreFieldMessage","isMissingGraphQLFieldError","fieldName","CombinedGraphQLErrors","isSchemaValidationError","directMessage","isSchemaValidationMessage","serverError","responseBody","getServerErrorResult","getErrorCauseResponse","item","result","cause","causeMessage","extensions","ApolloProviderCompat","ApolloProvider","GraphQLErrorContext","createContext","useGraphQLError","ctx","useContext","USER_QUERY_CONTEXT","createErrorLink","setSchemaErrorMessage","ErrorLink","operation","schemaMismatchMessage","locations","path","CombinedProtocolErrors","responseError","errors","responseMessage","firstError","firstErrorMessage","additiveLink","currentProjectId","from","HttpLink","client","ApolloClient","InMemoryCache","responseObject","defaultDataIdFromObject","GraphQLProvider","children","useConfig","schemaErrorMessage","useState","useMemo","apolloClient","jsx","ActionsContext","EntityDispatchContext","actionsReducer","actions","action","actionType","uniqBy","props","ActionsProvider","entityActions","dispatchEntityActions","useReducer","useActions","useDispatch"],"mappings":"4eAsBA,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AAA,CAC9B,QAAA,CAAAV,IAACE,CAAAA,CAAsB,QAAA,CAAtB,CAA+B,KAAA,CAAOS,CAAAA,CAAwB,SAAAjB,CAAAA,CAAS,CAAA,CAC1E,CAEJ,CAEA,SAASmB,EAAAA,EAAuB,CAC9B,OAAO5C,UAAAA,CAAWgC,CAAc,CAClC,CAEA,SAASa,IAAgC,CACvC,OAAO7C,UAAAA,CAAWiC,CAAqB,CACzC","file":"chunk-ZRTWLY77.js","sourcesContent":["import type { ErrorLike } from '@apollo/client';\nimport { CombinedGraphQLErrors, ServerError } from '@apollo/client/errors';\n\ntype ErrorWithCause = ErrorLike & { cause?: unknown };\ntype ErrorWithMessage = {\n message?: unknown;\n};\ntype ServerErrorWithResult = ServerError & {\n result?: unknown;\n};\ntype GraphQLErrorResponse = {\n error?: unknown;\n errors?: unknown;\n message?: unknown;\n};\ntype GraphQLErrorItem = {\n extensions?: {\n code?: unknown;\n };\n message?: unknown;\n};\n\nfunction hasCause(error: ErrorLike): error is ErrorWithCause {\n if (!error) {\n return false;\n }\n\n return 'cause' in (error as ErrorWithCause);\n}\n\nexport function getServerError(error?: ErrorLike): ServerError | null {\n if (!error) {\n return null;\n }\n\n if (ServerError.is(error)) {\n return error;\n }\n\n if (hasCause(error)) {\n const possibleServerError = error.cause;\n\n if (ServerError.is(possibleServerError)) {\n return possibleServerError;\n }\n }\n\n return null;\n}\n\nfunction getErrorMessage(error: unknown): string | null {\n if (!error || typeof error !== 'object') {\n return null;\n }\n\n const { message } = error as ErrorWithMessage;\n\n return typeof message === 'string' ? message : null;\n}\n\nexport function parseErrorBody<T>(bodyText: string | undefined): T | null {\n if (!bodyText) {\n return null;\n }\n\n try {\n return JSON.parse(bodyText) as T;\n } catch {\n return null;\n }\n}\n\nexport function getGraphQLSchemaMismatchMessage(error?: ErrorLike): string | null {\n if (!error) {\n return null;\n }\n\n const messages = getGraphQLValidationMessages(error).filter((message) => !isMissingCountStoreFieldMessage(message));\n\n if (messages.length === 0) {\n return null;\n }\n\n return [\n 'The deployed schema is out of sync with your local Flexkit schema.',\n 'Run `flexkit deploy` using the CLI to apply your latest schema changes.',\n ...messages.map((message) => `- ${message}`),\n ].join('\\n');\n}\n\nexport function isMissingGraphQLFieldError(error: ErrorLike | undefined, fieldName: string): boolean {\n if (!error) {\n return false;\n }\n\n return getGraphQLValidationMessages(error).some((message) => {\n return message.includes(`Cannot query field \"${fieldName}\"`);\n });\n}\n\nfunction getGraphQLValidationMessages(error: ErrorLike): string[] {\n if (CombinedGraphQLErrors.is(error)) {\n return error.errors.filter(isSchemaValidationError).map(({ message }) => message);\n }\n\n const directMessage = getErrorMessage(error);\n\n if (directMessage && isSchemaValidationMessage(directMessage)) {\n return [directMessage];\n }\n\n const serverError = getServerError(error);\n\n if (serverError?.statusCode !== 400) {\n return [];\n }\n\n const responseBody =\n parseErrorBody<GraphQLErrorResponse>(serverError.bodyText) ??\n getServerErrorResult(serverError) ??\n getErrorCauseResponse(error);\n\n if (!responseBody) {\n return [];\n }\n\n if (Array.isArray(responseBody.errors)) {\n return responseBody.errors.filter(isSchemaValidationError).map((item) => item.message);\n }\n\n if (typeof responseBody.message === 'string' && isSchemaValidationMessage(responseBody.message)) {\n return [responseBody.message];\n }\n\n if (typeof responseBody.error === 'string' && isSchemaValidationMessage(responseBody.error)) {\n return [responseBody.error];\n }\n\n return [];\n}\n\nfunction getServerErrorResult(serverError: ServerError): GraphQLErrorResponse | null {\n const { result } = serverError as ServerErrorWithResult;\n\n if (!result || typeof result !== 'object') {\n return null;\n }\n\n return result as GraphQLErrorResponse;\n}\n\nfunction getErrorCauseResponse(error: ErrorLike): GraphQLErrorResponse | null {\n if (!hasCause(error)) {\n return null;\n }\n\n const { cause } = error;\n const causeMessage = getErrorMessage(cause);\n\n if (causeMessage && isSchemaValidationMessage(causeMessage)) {\n return { message: causeMessage };\n }\n\n if (!cause || typeof cause !== 'object') {\n return null;\n }\n\n const { result } = cause as { result?: unknown };\n\n if (result && typeof result === 'object') {\n return result as GraphQLErrorResponse;\n }\n\n return null;\n}\n\nfunction isSchemaValidationError(error: unknown): error is GraphQLErrorItem & { message: string } {\n if (!error || typeof error !== 'object') {\n return false;\n }\n\n const { extensions, message } = error as GraphQLErrorItem;\n const code = extensions?.code;\n\n if (code === 'GRAPHQL_VALIDATION_FAILED' && typeof message === 'string') {\n return true;\n }\n\n return typeof message === 'string' && isSchemaValidationMessage(message);\n}\n\nfunction isSchemaValidationMessage(message: string): boolean {\n return (\n message.startsWith('Cannot query field ') ||\n message.startsWith('Unknown type ') ||\n message.startsWith('Cannot query field \"') ||\n message.includes('GRAPHQL_VALIDATION_FAILED')\n );\n}\n\nfunction isMissingCountStoreFieldMessage(message: string): boolean {\n return /Cannot query field \"[_A-Za-z][_0-9A-Za-z]*Total\" on type \"Query\"/.test(message);\n}\n","'use client';\n\nimport type { JSX } from 'react';\nimport { ApolloClient, InMemoryCache, defaultDataIdFromObject, from, HttpLink } from '@apollo/client';\nimport type { ApolloLink } from '@apollo/client';\nimport { ApolloProvider } from '@apollo/client/react';\nimport { ErrorLink } from '@apollo/client/link/error';\nimport { CombinedGraphQLErrors, CombinedProtocolErrors } from '@apollo/client/errors';\nimport { getGraphQLSchemaMismatchMessage, getServerError, parseErrorBody } from './error-utils';\nimport { useConfig } from '../core/config/config-context';\nimport React, { createContext, useContext, useMemo, useState } from 'react';\n\nconst ApolloProviderCompat = ApolloProvider as unknown as React.ComponentType<{\n children?: React.ReactNode;\n client: ApolloClient;\n}>;\n\ntype GraphQLErrorContextValue = {\n schemaErrorMessage: string | null;\n setSchemaErrorMessage: React.Dispatch<React.SetStateAction<string | null>>;\n};\n\nconst GraphQLErrorContext = createContext<GraphQLErrorContextValue | undefined>(undefined);\n\nfunction useGraphQLError(): GraphQLErrorContextValue {\n const ctx = useContext(GraphQLErrorContext);\n\n if (!ctx) {\n throw new Error('useGraphQLError must be used within GraphQLProvider');\n }\n\n return ctx;\n}\n\n/**\n * Context flag for operations the user writes themselves (the Graph app's\n * Query view): any error there, a mismatch or a 400, is a typo, not a\n * deployment that drifted from the local schema, so it must not raise the\n * schema banner. The caller shows the error itself.\n */\nexport const USER_QUERY_CONTEXT = { userQuery: true } as const;\n\nfunction createErrorLink(setSchemaErrorMessage: (msg: string | null) => void): ApolloLink {\n return new ErrorLink(({ error, operation }) => {\n if (operation.getContext().userQuery === true) {\n return;\n }\n\n const schemaMismatchMessage = getGraphQLSchemaMismatchMessage(error);\n\n if (schemaMismatchMessage) {\n setSchemaErrorMessage(schemaMismatchMessage);\n\n return;\n }\n\n if (CombinedGraphQLErrors.is(error)) {\n error.errors.forEach(({ message, locations, path }) => {\n console.warn(`[GraphQL error]: Message: ${message}, Location: ${locations}, Path: ${path}`);\n });\n } else if (CombinedProtocolErrors.is(error)) {\n error.errors.forEach(({ message, extensions }) => {\n console.warn(`[Protocol error]: Message: ${message}, Extensions: ${JSON.stringify(extensions)}`);\n });\n }\n\n const serverError = getServerError(error);\n\n if (serverError?.statusCode === 400) {\n const responseBody = parseErrorBody<Record<string, unknown>>(serverError.bodyText);\n let message: string | null = null;\n\n if (responseBody && typeof responseBody === 'object') {\n const {\n error: responseError,\n errors,\n message: responseMessage,\n } = responseBody as {\n error?: unknown;\n errors?: unknown;\n message?: unknown;\n };\n\n if (typeof responseMessage === 'string') {\n message = responseMessage;\n } else if (Array.isArray(errors)) {\n const [firstError] = errors as { message?: unknown }[];\n\n if (firstError && typeof firstError.message === 'string') {\n const { message: firstErrorMessage } = firstError;\n message = firstErrorMessage;\n }\n } else if (typeof responseError === 'string') {\n message = responseError;\n } else {\n message = JSON.stringify(responseBody);\n }\n } else {\n message = serverError.bodyText;\n }\n\n setSchemaErrorMessage(\n message ?? 'There is an error in the deployed Flexkit schema. Fix flexkit.config.ts and run flexkit deploy.'\n );\n }\n\n if (serverError) {\n console.warn(`[Network error]: ${serverError.message}`);\n\n return;\n }\n\n if (error) {\n console.warn(`[Network error]: ${error.message}`);\n }\n });\n}\n\nfunction additiveLink(currentProjectId: string, setSchemaErrorMessage: (msg: string | null) => void): ApolloLink {\n return from([\n createErrorLink(setSchemaErrorMessage),\n new HttpLink({ uri: `/api/flexkit/${currentProjectId}/graphql` }),\n ]);\n}\n\nfunction client(\n currentProjectId: string | undefined,\n setSchemaErrorMessage: (msg: string | null) => void\n): ApolloClient {\n return new ApolloClient({\n link: additiveLink(currentProjectId ?? '', setSchemaErrorMessage),\n cache: new InMemoryCache({\n dataIdFromObject: (responseObject) => {\n return responseObject._id ? (responseObject._id as string) : defaultDataIdFromObject(responseObject);\n },\n }),\n });\n}\n\nexport function GraphQLProvider({ children }: { children: React.ReactNode }): JSX.Element {\n const { currentProjectId } = useConfig();\n const [schemaErrorMessage, setSchemaErrorMessage] = useState<string | null>(null);\n const ctx = useMemo(() => ({ schemaErrorMessage, setSchemaErrorMessage }), [schemaErrorMessage]);\n const apolloClient = useMemo(() => client(currentProjectId, setSchemaErrorMessage), [currentProjectId]);\n\n return (\n <GraphQLErrorContext.Provider value={ctx}>\n <ApolloProviderCompat client={apolloClient}>{children}</ApolloProviderCompat>\n </GraphQLErrorContext.Provider>\n );\n}\n\nexport { useGraphQLError };\n","'use client';\n\nimport { createContext, useContext, useReducer } from 'react';\nimport type { Dispatch, JSX, ReactNode } from 'react';\nimport { props, uniqBy } from 'ramda';\nimport type {\n Action,\n ActionAddEntity,\n ActionAlertDialog,\n ActionDeleteEntity,\n ActionEditEntity,\n ActionEditRelationship,\n} from './types';\n\nconst ActionsContext = createContext<Action[] | []>([]);\nconst EntityDispatchContext = createContext<Dispatch<Action>>(() => undefined);\n\nfunction actionsReducer(actions: Action[], action: Action): Action[] {\n const actionType = action.type;\n\n if (!action._id) {\n action._id = Date.now().toString();\n }\n\n switch (actionType) {\n case 'DeleteEntity': {\n return uniqBy(props(['type' as string, '_id']), [...(actions as ActionDeleteEntity[]), action]);\n }\n case 'AddEntity': {\n return uniqBy(props(['type' as string, '_id']), [...(actions as ActionAddEntity[]), action]);\n }\n case 'EditEntity': {\n return uniqBy(props(['type' as string, '_id']), [...(actions as ActionEditEntity[]), action]);\n }\n case 'EditRelationship': {\n return uniqBy(props(['type' as string, '_id']), [...(actions as ActionEditRelationship[]), action]);\n }\n case 'AlertDialog': {\n return uniqBy(props(['type' as string, '_id']), [...(actions as ActionAlertDialog[]), action]);\n }\n case 'Dismiss': {\n return actions.filter((item) => item._id !== action._id);\n }\n default: {\n throw Error(`Unknown action: ${actionType as string}`);\n }\n }\n}\n\nfunction ActionsProvider({ children }: { children: ReactNode }): JSX.Element {\n const [entityActions, dispatchEntityActions] = useReducer(actionsReducer, []);\n\n return (\n <ActionsContext.Provider value={entityActions}>\n <EntityDispatchContext.Provider value={dispatchEntityActions}>{children}</EntityDispatchContext.Provider>\n </ActionsContext.Provider>\n );\n}\n\nfunction useActions(): Action[] {\n return useContext(ActionsContext);\n}\n\nfunction useDispatch(): Dispatch<Action> {\n return useContext(EntityDispatchContext);\n}\n\nexport { ActionsProvider, useActions, useDispatch };\n"]}
@@ -0,0 +1,2 @@
1
+ import'./index.css';import {g,e,x}from'./chunk-DEG7QP5C.js';import'./chunk-KEGJNZLW.js';import {f}from'./chunk-TI3EHLRE.js';import'./chunk-MBBE4RND.js';import'./chunk-5CVDMZUI.js';import'./chunk-RULCANNM.js';import'./chunk-A4DPLZZF.js';import'./chunk-G5N6HEPW.js';import'./chunk-5JUG4BEF.js';import'./chunk-S7Z6KKIN.js';import'./chunk-U45E5X3H.js';import {b,c,e as e$1,a}from'./chunk-N33S7BSG.js';import {c as c$1}from'./chunk-X3SHNHHM.js';import {Waypoints}from'lucide-react';import {useNavigate}from'react-router-dom';import {jsxs,jsx}from'react/jsx-runtime';function S({entityName:n,selectedIds:t}){let{currentProjectId:i,currentProjectSchema:r}=f(),l=useNavigate(),e$2=g(r,n);if(!i||!e$2||e(e$2).length===0)return null;let a=t.length>0?`Open ${t.length} in Graph`:"Open in Graph";return jsxs(b,{children:[jsx(c,{asChild:true,children:jsxs(c$1,{"aria-label":a,className:"fk:mr-2 fk:h-8",onClick:()=>l(x(i,{entity:n,ids:t})),size:"sm",variant:"outline",children:[jsx(Waypoints,{className:"fk:size-4",strokeWidth:1.5}),t.length>0?`Graph (${t.length})`:"Graph"]})}),jsx(e$1,{children:t.length>0?"Show the selected records and their relationships":"Explore these records as a graph"})]})}function B({entityName:n,recordId:t,onNavigate:i}){let{currentProjectId:r,currentProjectSchema:l}=f(),e$2=useNavigate(),a$1=g(l,n);return !r||!a$1||!t||e(a$1).length===0?null:jsx(a,{children:jsxs(b,{children:[jsx(c,{asChild:true,children:jsx(c$1,{"aria-label":"View in Graph",className:"fk:h-9 fk:w-9",onClick:()=>{e$2(x(r,{entity:n,ids:[t]})),i?.();},size:"icon",variant:"outline",children:jsx(Waypoints,{className:"fk:size-4",strokeWidth:1.5})})}),jsx(e$1,{children:"View in Graph"})]})})}export{S as EntityGraphButton,B as RecordGraphButton};//# sourceMappingURL=entry-NQRN7SWV.js.map
2
+ //# sourceMappingURL=entry-NQRN7SWV.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/apps/graph/entry.tsx"],"names":["EntityGraphButton","entityName","selectedIds","currentProjectId","currentProjectSchema","useConfig","navigate","useNavigate","entity","getEntity","getRelationshipAttributes","label","jsxs","Tooltip","jsx","TooltipTrigger","Button","graphPath","WaypointsIcon","TooltipContent","RecordGraphButton","recordId","onNavigate","TooltipProvider"],"mappings":"6kBAaO,SAASA,CAAAA,CAAkB,CAAE,UAAA,CAAAC,CAAAA,CAAY,WAAA,CAAAC,CAAY,CAAA,CAAsE,CAChI,GAAM,CAAE,gBAAA,CAAAC,CAAAA,CAAkB,oBAAA,CAAAC,CAAqB,CAAA,CAAIC,CAAAA,EAAU,CACvDC,CAAAA,CAAWC,WAAAA,EAAY,CACvBC,IAASC,CAAAA,CAAUL,CAAAA,CAAsBH,CAAU,CAAA,CAEzD,GAAI,CAACE,GAAoB,CAACK,GAAAA,EAAUE,CAAAA,CAA0BF,GAAM,CAAA,CAAE,MAAA,GAAW,CAAA,CAC/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CAACa,CAAAA,EAAYX,CAAAA,CAA0BF,GAAM,CAAA,CAAE,MAAA,GAAW,CAAA,CACrF,IAAA,CAIPM,GAAAA,CAACS,CAAAA,CAAA,CACC,QAAA,CAAAX,KAACC,CAAAA,CAAA,CACC,QAAA,CAAA,CAAAC,GAAAA,CAACC,CAAAA,CAAA,CAAe,QAAO,IAAA,CACrB,QAAA,CAAAD,GAAAA,CAACE,GAAAA,CAAA,CACC,YAAA,CAAW,gBACX,SAAA,CAAU,eAAA,CACV,OAAA,CAAS,IAAM,CACbV,GAAAA,CAASW,CAAAA,CAAUd,CAAAA,CAAkB,CAAE,MAAA,CAAQF,CAAAA,CAAY,GAAA,CAAK,CAACoB,CAAQ,CAAE,CAAC,CAAC,CAAA,CAC7EC,CAAAA,KACF,CAAA,CACA,IAAA,CAAK,MAAA,CACL,OAAA,CAAQ,SAAA,CAER,QAAA,CAAAR,GAAAA,CAACI,SAAAA,CAAA,CAAc,UAAU,WAAA,CAAY,WAAA,CAAa,GAAA,CAAK,CAAA,CACzD,CAAA,CACF,CAAA,CACAJ,GAAAA,CAACK,GAAAA,CAAA,CAAe,QAAA,CAAA,eAAA,CAAa,CAAA,CAAA,CAC/B,CAAA,CACF,CAEJ","file":"entry-ROTT3ZDN.js","sourcesContent":["'use client';\n\nimport type { JSX } from 'react';\nimport { Waypoints as WaypointsIcon } from 'lucide-react';\nimport { useNavigate } from 'react-router-dom';\nimport { useConfig } from '../../core/config/config-context';\nimport { Button, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '../../ui';\nimport { getEntity, getRelationshipAttributes, graphPath } from './graph';\n\n/**\n * \"Open in Graph\" for a Desk list: the selected records, or a sample of the\n * entity when nothing is selected. Hidden for entities without relationships.\n */\nexport function EntityGraphButton({ entityName, selectedIds }: { entityName: string; selectedIds: string[] }): JSX.Element | null {\n const { currentProjectId, currentProjectSchema } = useConfig();\n const navigate = useNavigate();\n const entity = getEntity(currentProjectSchema, entityName);\n\n if (!currentProjectId || !entity || getRelationshipAttributes(entity).length === 0) {\n return null;\n }\n\n const label = selectedIds.length > 0 ? `Open ${selectedIds.length} in Graph` : 'Open in Graph';\n\n return (\n <Tooltip>\n <TooltipTrigger asChild>\n <Button\n aria-label={label}\n className=\"fk:mr-2 fk:h-8\"\n onClick={() => navigate(graphPath(currentProjectId, { entity: entityName, ids: selectedIds }))}\n size=\"sm\"\n variant=\"outline\"\n >\n <WaypointsIcon className=\"fk:size-4\" strokeWidth={1.5} />\n {selectedIds.length > 0 ? `Graph (${selectedIds.length})` : 'Graph'}\n </Button>\n </TooltipTrigger>\n <TooltipContent>\n {selectedIds.length > 0 ? 'Show the selected records and their relationships' : 'Explore these records as a graph'}\n </TooltipContent>\n </Tooltip>\n );\n}\n\n/**\n * \"View in Graph\" in a record drawer: the record expanded one hop. The drawer\n * is mounted outside any app, so the tooltip brings its own provider.\n */\nexport function RecordGraphButton({\n entityName,\n recordId,\n onNavigate,\n}: {\n entityName: string;\n recordId: string;\n onNavigate?: () => void;\n}): JSX.Element | null {\n const { currentProjectId, currentProjectSchema } = useConfig();\n const navigate = useNavigate();\n const entity = getEntity(currentProjectSchema, entityName);\n\n if (!currentProjectId || !entity || !recordId || getRelationshipAttributes(entity).length === 0) {\n return null;\n }\n\n return (\n <TooltipProvider>\n <Tooltip>\n <TooltipTrigger asChild>\n <Button\n aria-label=\"View in Graph\"\n className=\"fk:h-9 fk:w-9\"\n onClick={() => {\n navigate(graphPath(currentProjectId, { entity: entityName, ids: [recordId] }));\n onNavigate?.();\n }}\n size=\"icon\"\n variant=\"outline\"\n >\n <WaypointsIcon className=\"fk:size-4\" strokeWidth={1.5} />\n </Button>\n </TooltipTrigger>\n <TooltipContent>View in Graph</TooltipContent>\n </Tooltip>\n </TooltipProvider>\n );\n}\n"]}
1
+ {"version":3,"sources":["../src/apps/graph/entry.tsx"],"names":["EntityGraphButton","entityName","selectedIds","currentProjectId","currentProjectSchema","useConfig","navigate","useNavigate","entity","getEntity","getRelationshipAttributes","label","jsxs","Tooltip","jsx","TooltipTrigger","Button","graphPath","WaypointsIcon","TooltipContent","RecordGraphButton","recordId","onNavigate","TooltipProvider"],"mappings":"ijBAaO,SAASA,CAAAA,CAAkB,CAAE,UAAA,CAAAC,CAAAA,CAAY,WAAA,CAAAC,CAAY,CAAA,CAAsE,CAChI,GAAM,CAAE,gBAAA,CAAAC,CAAAA,CAAkB,oBAAA,CAAAC,CAAqB,CAAA,CAAIC,CAAAA,EAAU,CACvDC,CAAAA,CAAWC,WAAAA,EAAY,CACvBC,IAASC,CAAAA,CAAUL,CAAAA,CAAsBH,CAAU,CAAA,CAEzD,GAAI,CAACE,GAAoB,CAACK,GAAAA,EAAUE,CAAAA,CAA0BF,GAAM,CAAA,CAAE,MAAA,GAAW,CAAA,CAC/E,OAAO,IAAA,CAGT,IAAMG,CAAAA,CAAQT,CAAAA,CAAY,MAAA,CAAS,CAAA,CAAI,QAAQA,CAAAA,CAAY,MAAM,CAAA,SAAA,CAAA,CAAc,eAAA,CAE/E,OACEU,IAAAA,CAACC,EAAA,CACC,QAAA,CAAA,CAAAC,GAAAA,CAACC,CAAAA,CAAA,CAAe,OAAA,CAAO,KACrB,QAAA,CAAAH,IAAAA,CAACI,GAAAA,CAAA,CACC,YAAA,CAAYL,CAAAA,CACZ,SAAA,CAAU,gBAAA,CACV,OAAA,CAAS,IAAML,CAAAA,CAASW,CAAAA,CAAUd,CAAAA,CAAkB,CAAE,OAAQF,CAAAA,CAAY,GAAA,CAAKC,CAAY,CAAC,CAAC,CAAA,CAC7F,KAAK,IAAA,CACL,OAAA,CAAQ,SAAA,CAER,QAAA,CAAA,CAAAY,GAAAA,CAACI,SAAAA,CAAA,CAAc,SAAA,CAAU,WAAA,CAAY,WAAA,CAAa,GAAA,CAAK,CAAA,CACtDhB,CAAAA,CAAY,MAAA,CAAS,CAAA,CAAI,CAAA,OAAA,EAAUA,CAAAA,CAAY,MAAM,CAAA,CAAA,CAAA,CAAM,OAAA,CAAA,CAC9D,CAAA,C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F,CAEJ","file":"entry-NQRN7SWV.js","sourcesContent":["'use client';\n\nimport type { JSX } from 'react';\nimport { Waypoints as WaypointsIcon } from 'lucide-react';\nimport { useNavigate } from 'react-router-dom';\nimport { useConfig } from '../../core/config/config-context';\nimport { Button, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '../../ui';\nimport { getEntity, getRelationshipAttributes, graphPath } from './graph';\n\n/**\n * \"Open in Graph\" for a Desk list: the selected records, or a sample of the\n * entity when nothing is selected. Hidden for entities without relationships.\n */\nexport function EntityGraphButton({ entityName, selectedIds }: { entityName: string; selectedIds: string[] }): JSX.Element | null {\n const { currentProjectId, currentProjectSchema } = useConfig();\n const navigate = useNavigate();\n const entity = getEntity(currentProjectSchema, entityName);\n\n if (!currentProjectId || !entity || getRelationshipAttributes(entity).length === 0) {\n return null;\n }\n\n const label = selectedIds.length > 0 ? `Open ${selectedIds.length} in Graph` : 'Open in Graph';\n\n return (\n <Tooltip>\n <TooltipTrigger asChild>\n <Button\n aria-label={label}\n className=\"fk:mr-2 fk:h-8\"\n onClick={() => navigate(graphPath(currentProjectId, { entity: entityName, ids: selectedIds }))}\n size=\"sm\"\n variant=\"outline\"\n >\n <WaypointsIcon className=\"fk:size-4\" strokeWidth={1.5} />\n {selectedIds.length > 0 ? `Graph (${selectedIds.length})` : 'Graph'}\n </Button>\n </TooltipTrigger>\n <TooltipContent>\n {selectedIds.length > 0 ? 'Show the selected records and their relationships' : 'Explore these records as a graph'}\n </TooltipContent>\n </Tooltip>\n );\n}\n\n/**\n * \"View in Graph\" in a record drawer: the record expanded one hop. The drawer\n * is mounted outside any app, so the tooltip brings its own provider.\n */\nexport function RecordGraphButton({\n entityName,\n recordId,\n onNavigate,\n}: {\n entityName: string;\n recordId: string;\n onNavigate?: () => void;\n}): JSX.Element | null {\n const { currentProjectId, currentProjectSchema } = useConfig();\n const navigate = useNavigate();\n const entity = getEntity(currentProjectSchema, entityName);\n\n if (!currentProjectId || !entity || !recordId || getRelationshipAttributes(entity).length === 0) {\n return null;\n }\n\n return (\n <TooltipProvider>\n <Tooltip>\n <TooltipTrigger asChild>\n <Button\n aria-label=\"View in Graph\"\n className=\"fk:h-9 fk:w-9\"\n onClick={() => {\n navigate(graphPath(currentProjectId, { entity: entityName, ids: [recordId] }));\n onNavigate?.();\n }}\n size=\"icon\"\n variant=\"outline\"\n >\n <WaypointsIcon className=\"fk:size-4\" strokeWidth={1.5} />\n </Button>\n </TooltipTrigger>\n <TooltipContent>View in Graph</TooltipContent>\n </Tooltip>\n </TooltipProvider>\n );\n}\n"]}
package/dist/index.css CHANGED
@@ -23,6 +23,7 @@
23
23
  --fk-color-green-700: oklch(52.7% 0.154 150.069);
24
24
  --fk-color-emerald-400: oklch(76.5% 0.177 163.223);
25
25
  --fk-color-emerald-500: oklch(69.6% 0.17 162.48);
26
+ --fk-color-emerald-600: oklch(59.6% 0.145 163.225);
26
27
  --fk-color-emerald-700: oklch(50.8% 0.118 165.612);
27
28
  --fk-color-teal-100: oklch(95.3% 0.051 180.801);
28
29
  --fk-color-teal-300: oklch(85.5% 0.138 181.071);
@@ -53,6 +54,8 @@
53
54
  --fk-container-sm: 24rem;
54
55
  --fk-container-md: 28rem;
55
56
  --fk-container-lg: 32rem;
57
+ --fk-container-xl: 36rem;
58
+ --fk-container-2xl: 42rem;
56
59
  --fk-container-4xl: 56rem;
57
60
  --fk-container-5xl: 64rem;
58
61
  --fk-container-6xl: 72rem;
@@ -1832,6 +1835,9 @@
1832
1835
  .fk\:max-w-0 {
1833
1836
  max-width: calc(var(--fk-spacing) * 0);
1834
1837
  }
1838
+ .fk\:max-w-2xl {
1839
+ max-width: var(--fk-container-2xl);
1840
+ }
1835
1841
  .fk\:max-w-4xl {
1836
1842
  max-width: var(--fk-container-4xl);
1837
1843
  }
@@ -1895,6 +1901,9 @@
1895
1901
  .fk\:max-w-sm {
1896
1902
  max-width: var(--fk-container-sm);
1897
1903
  }
1904
+ .fk\:max-w-xl {
1905
+ max-width: var(--fk-container-xl);
1906
+ }
1898
1907
  .fk\:max-w-xs {
1899
1908
  max-width: var(--fk-container-xs);
1900
1909
  }
@@ -2647,6 +2656,12 @@
2647
2656
  border-color: color-mix(in oklab, var(--fk-color-emerald-500) 30%, transparent);
2648
2657
  }
2649
2658
  }
2659
+ .fk\:border-foreground\/70 {
2660
+ border-color: hsl(var(--foreground));
2661
+ @supports (color: color-mix(in lab, red, red)) {
2662
+ border-color: color-mix(in oklab, hsl(var(--foreground)) 70%, transparent);
2663
+ }
2664
+ }
2650
2665
  .fk\:border-green-700\/40 {
2651
2666
  border-color: var(--fk-color-green-700);
2652
2667
  @supports (color: color-mix(in lab, red, red)) {
@@ -2920,6 +2935,12 @@
2920
2935
  background-color: color-mix(in oklab, hsl(var(--primary)) 5%, transparent);
2921
2936
  }
2922
2937
  }
2938
+ .fk\:bg-primary\/10 {
2939
+ background-color: hsl(var(--primary));
2940
+ @supports (color: color-mix(in lab, red, red)) {
2941
+ background-color: color-mix(in oklab, hsl(var(--primary)) 10%, transparent);
2942
+ }
2943
+ }
2923
2944
  .fk\:bg-red-500\/5 {
2924
2945
  background-color: var(--fk-color-red-500);
2925
2946
  @supports (color: color-mix(in lab, red, red)) {
@@ -3157,6 +3178,9 @@
3157
3178
  .fk\:pt-0\.5 {
3158
3179
  padding-top: calc(var(--fk-spacing) * 0.5);
3159
3180
  }
3181
+ .fk\:pt-1 {
3182
+ padding-top: calc(var(--fk-spacing) * 1);
3183
+ }
3160
3184
  .fk\:pt-2 {
3161
3185
  padding-top: calc(var(--fk-spacing) * 2);
3162
3186
  }
@@ -3494,6 +3518,9 @@
3494
3518
  .fk\:text-emerald-500 {
3495
3519
  color: var(--fk-color-emerald-500);
3496
3520
  }
3521
+ .fk\:text-emerald-600 {
3522
+ color: var(--fk-color-emerald-600);
3523
+ }
3497
3524
  .fk\:text-emerald-700 {
3498
3525
  color: var(--fk-color-emerald-700);
3499
3526
  }
@@ -3716,6 +3743,12 @@
3716
3743
  --tw-ring-color: color-mix(in oklab, hsl(var(--border)) 60%, transparent);
3717
3744
  }
3718
3745
  }
3746
+ .fk\:ring-foreground\/20 {
3747
+ --tw-ring-color: hsl(var(--foreground));
3748
+ @supports (color: color-mix(in lab, red, red)) {
3749
+ --tw-ring-color: color-mix(in oklab, hsl(var(--foreground)) 20%, transparent);
3750
+ }
3751
+ }
3719
3752
  .fk\:ring-primary\/40 {
3720
3753
  --tw-ring-color: hsl(var(--primary));
3721
3754
  @supports (color: color-mix(in lab, red, red)) {
@@ -4972,6 +5005,16 @@
4972
5005
  }
4973
5006
  }
4974
5007
  }
5008
+ .fk\:hover\:bg-muted\/30 {
5009
+ &:hover {
5010
+ @media (hover: hover) {
5011
+ background-color: hsl(var(--muted));
5012
+ @supports (color: color-mix(in lab, red, red)) {
5013
+ background-color: color-mix(in oklab, hsl(var(--muted)) 30%, transparent);
5014
+ }
5015
+ }
5016
+ }
5017
+ }
4975
5018
  .fk\:hover\:bg-muted\/50 {
4976
5019
  &:hover {
4977
5020
  @media (hover: hover) {
package/dist/index.d.ts CHANGED
@@ -695,6 +695,8 @@ declare function getEntityQuery(entityNamePlural: string, scope: string, schema:
695
695
  includeCount?: boolean;
696
696
  countMode?: EntityQueryCountMode;
697
697
  operationName?: string;
698
+ /** The project's default scope (the one with `isDefault`). */
699
+ defaultScope?: string;
698
700
  }): EntityQuery;
699
701
  /**
700
702
  * Returns a string with the GraphQl query needed to mutate the dataToMutate object for the given entity and scope.
@@ -702,6 +704,7 @@ declare function getEntityQuery(entityNamePlural: string, scope: string, schema:
702
704
  declare function getEntityUpdateMutation(entityNamePlural: string, entityId: string, scope: string, schema: UiSchema, originalData: FormEntityItem, dataToMutate: FormEntityItem, options?: {
703
705
  currentUser?: User;
704
706
  responseFields?: string;
707
+ defaultScope?: string;
705
708
  }): string;
706
709
  /**
707
710
  * Returns a string with the GraphQl mutation needed to delete one or more entities.
@@ -716,8 +719,9 @@ declare function getEntityDeleteWhere(ids: string | readonly string[]): {
716
719
  in: string[];
717
720
  };
718
721
  };
719
- declare function getEntityCreateMutation(entityNamePlural: string, schema: UiSchema, entityData: FormEntityItem, _id: string, _options?: {
722
+ declare function getEntityCreateMutation(entityNamePlural: string, schema: UiSchema, entityData: FormEntityItem, _id: string, options?: {
720
723
  currentUser?: User;
724
+ defaultScope?: string;
721
725
  }): string;
722
726
  declare function getEntitySchema(schema: UiSchema, entityNamePlural: string): UiEntity | undefined;
723
727