diff --git a/apps/typesync/client/src/Components/CmdPalette.tsx b/apps/typesync/client/src/Components/CmdPalette.tsx index b25efd5d..b35cc51e 100644 --- a/apps/typesync/client/src/Components/CmdPalette.tsx +++ b/apps/typesync/client/src/Components/CmdPalette.tsx @@ -169,13 +169,23 @@ export function CmdPalette() { as="ul" className="max-h-80 scroll-py-2 divide-y divide-gray-500/20 overflow-y-auto" > -
  • - -
  • + {query === '' && !isLoading && results.length === 0 ? ( +
    +

    No apps created

    +

    + Get started by creating a new App, building the App schema, and generating the hypergraph schema + code. Click the "Create new app" option below +

    +
    + ) : ( +
  • + +
  • + )} {query === '' && !isLoading ? (
  • Quick actions

    diff --git a/apps/typesync/client/src/clients/graphql.ts b/apps/typesync/client/src/clients/graphql.ts index 43069366..9c06730f 100644 --- a/apps/typesync/client/src/clients/graphql.ts +++ b/apps/typesync/client/src/clients/graphql.ts @@ -1,3 +1,3 @@ import { GraphQLClient } from 'graphql-request'; -export const graphqlClient = new GraphQLClient('https://hypergraph-v2.up.railway.app/graphql'); +export const graphqlClient = new GraphQLClient('https://hypergraph-v2-testnet.up.railway.app/graphql'); diff --git a/apps/typesync/client/src/generated/gql.ts b/apps/typesync/client/src/generated/gql.ts index 8d0c4207..63626ca7 100644 --- a/apps/typesync/client/src/generated/gql.ts +++ b/apps/typesync/client/src/generated/gql.ts @@ -1,7 +1,8 @@ /* eslint-disable */ -import * as types from './graphql'; import type { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core'; +import * as types from './graphql'; + /** * Map of all GraphQL operations in the project. * diff --git a/apps/typesync/client/src/generated/graphql.ts b/apps/typesync/client/src/generated/graphql.ts index 18eda941..e9fefc23 100644 --- a/apps/typesync/client/src/generated/graphql.ts +++ b/apps/typesync/client/src/generated/graphql.ts @@ -1,5 +1,6 @@ /* eslint-disable */ import type { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core'; + export type Maybe = T | null; export type InputMaybe = Maybe; export type Exact = { [K in keyof T]: T[K] }; @@ -16,6 +17,19 @@ export type Scalars = { Float: { input: number; output: number; } }; +export type Account = { + __typename?: 'Account'; + address: Scalars['String']['output']; + id: Scalars['ID']['output']; + spacesWhereEdtitor?: Maybe>>; + spacesWhereMember?: Maybe>>; +}; + +export type AddressFilter = { + in?: InputMaybe>; + is?: InputMaybe; +}; + export type Block = { __typename?: 'Block'; dataSourceType?: Maybe; @@ -50,6 +64,7 @@ export type DataType = export type Entity = { __typename?: 'Entity'; + backlinks: Array>; blocks: Array>; createdAt: Scalars['String']['output']; createdAtBlock: Scalars['String']['output']; @@ -65,6 +80,12 @@ export type Entity = { }; +export type EntityBacklinksArgs = { + filter?: InputMaybe; + spaceId?: InputMaybe; +}; + + export type EntityRelationsArgs = { filter?: InputMaybe; spaceId?: InputMaybe; @@ -77,11 +98,12 @@ export type EntityValuesArgs = { }; export type EntityFilter = { - NOT?: InputMaybe; - OR?: InputMaybe>; - fromRelation?: InputMaybe; + backlinks?: InputMaybe; id?: InputMaybe; - toRelation?: InputMaybe; + not?: InputMaybe; + or?: InputMaybe>; + relations?: InputMaybe; + types?: InputMaybe; value?: InputMaybe; }; @@ -89,14 +111,28 @@ export type IdFilter = { in?: InputMaybe>; }; +export type Membership = { + __typename?: 'Membership'; + address: Scalars['String']['output']; + id: Scalars['ID']['output']; + space?: Maybe; + spaceId: Scalars['String']['output']; +}; + +export type Meta = { + __typename?: 'Meta'; + blockCursor?: Maybe; + blockNumber?: Maybe; +}; + export type NumberFilter = { - NOT?: InputMaybe; exists?: InputMaybe; greaterThan?: InputMaybe; greaterThanOrEqual?: InputMaybe; is?: InputMaybe; lessThan?: InputMaybe; lessThanOrEqual?: InputMaybe; + not?: InputMaybe; }; export type PointFilter = { @@ -110,23 +146,36 @@ export type Property = { entity?: Maybe; id: Scalars['ID']['output']; relationValueTypes?: Maybe>>; - renderableType?: Maybe; + renderableType?: Maybe; }; export type PropertyFilter = { dataType?: InputMaybe; + id?: InputMaybe; }; export type Query = { __typename?: 'Query'; + account?: Maybe; entities: Array>; entity?: Maybe; + meta?: Maybe; properties: Array>; + property?: Maybe; + relation?: Maybe; + relations: Array>; search: Array>; + space?: Maybe; + spaces: Array>; types: Array>; }; +export type QueryAccountArgs = { + address: Scalars['String']['input']; +}; + + export type QueryEntitiesArgs = { filter?: InputMaybe; limit?: InputMaybe; @@ -148,7 +197,26 @@ export type QueryPropertiesArgs = { }; +export type QueryPropertyArgs = { + id: Scalars['String']['input']; +}; + + +export type QueryRelationArgs = { + id: Scalars['String']['input']; +}; + + +export type QueryRelationsArgs = { + filter?: InputMaybe; + limit?: InputMaybe; + offset?: InputMaybe; + spaceId?: InputMaybe; +}; + + export type QuerySearchArgs = { + filter?: InputMaybe; limit?: InputMaybe; offset?: InputMaybe; query: Scalars['String']['input']; @@ -157,6 +225,18 @@ export type QuerySearchArgs = { }; +export type QuerySpaceArgs = { + id: Scalars['String']['input']; +}; + + +export type QuerySpacesArgs = { + filter?: InputMaybe; + limit?: InputMaybe; + offset?: InputMaybe; +}; + + export type QueryTypesArgs = { limit?: InputMaybe; offset?: InputMaybe; @@ -181,21 +261,52 @@ export type Relation = { }; export type RelationFilter = { + fromEntity?: InputMaybe; fromEntityId?: InputMaybe; + relationEntity?: InputMaybe; + relationEntityId?: InputMaybe; + toEntity?: InputMaybe; toEntityId?: InputMaybe; + type?: InputMaybe; typeId?: InputMaybe; }; -export type RenderableType = - | 'IMAGE' - | 'URL'; +export type SearchFilter = { + not?: InputMaybe; + or?: InputMaybe>; + types?: InputMaybe; +}; + +export type Space = { + __typename?: 'Space'; + daoAddress: Scalars['String']['output']; + editors?: Maybe>; + entity?: Maybe; + id: Scalars['ID']['output']; + mainVotingAddress?: Maybe; + members?: Maybe>; + membershipAddress?: Maybe; + personalAddress?: Maybe; + spaceAddress: Scalars['String']['output']; + type: SpaceType; +}; + +export type SpaceFilter = { + editor?: InputMaybe; + id?: InputMaybe; + member?: InputMaybe; +}; + +export type SpaceType = + | 'PERSONAL' + | 'PUBLIC'; export type TextFilter = { - NOT?: InputMaybe; contains?: InputMaybe; endsWith?: InputMaybe; exists?: InputMaybe; is?: InputMaybe; + not?: InputMaybe; startsWith?: InputMaybe; }; diff --git a/apps/typesync/client/src/routes/__root.tsx b/apps/typesync/client/src/routes/__root.tsx index 40d32ff2..a146a559 100644 --- a/apps/typesync/client/src/routes/__root.tsx +++ b/apps/typesync/client/src/routes/__root.tsx @@ -1,17 +1,16 @@ 'use client'; -import { MagnifyingGlassIcon } from '@heroicons/react/20/solid'; +import { RectangleGroupIcon } from '@heroicons/react/24/outline'; +import { MagnifyingGlassIcon, PlusIcon } from '@heroicons/react/24/solid'; import { GithubLogoIcon } from '@phosphor-icons/react'; import type { QueryClient } from '@tanstack/react-query'; import { Link, Outlet, createRootRouteWithContext } from '@tanstack/react-router'; import type { GraphQLClient } from 'graphql-request'; import { useAtom } from 'jotai'; -import { AppSpacesNavbar, navbarExpandedAtom } from '../Components/AppsNavbar.js'; import { CmdPalette, cmdPaletteOpenAtom } from '../Components/CmdPalette.js'; import { appsQueryOptions } from '../hooks/useAppQuery.js'; import { useOSQuery } from '../hooks/useOSQuery.js'; -import { classnames } from '../utils/classnames.js'; export type RouterContext = Readonly<{ queryClient: QueryClient; @@ -28,28 +27,44 @@ export const Route = createRootRouteWithContext()({ function Layout() { const { data: os } = useOSQuery(); + const [, setCmdPaletteOpen] = useAtom(cmdPaletteOpenAtom); - const [navbarExpanded] = useAtom(navbarExpandedAtom); return (
    -
    -
    - - Hypergraph TypeSync - -
    - +
    +
    +
    + + Hypergraph TypeSync +
    -
    -
    - -
    -
    -
    + +