Skip to content

Commit

Permalink
Merge branch 'bm/es/serde-hooks' of github.com:hashintel/hash into bm…
Browse files Browse the repository at this point in the history
…/es/serde-hooks
  • Loading branch information
indietyp committed Dec 23, 2022
2 parents 1d976d0 + ceab0d2 commit aaca87f
Show file tree
Hide file tree
Showing 333 changed files with 2,037 additions and 1,554 deletions.
136 changes: 136 additions & 0 deletions CODE_OF_CONDUCT.md
@@ -0,0 +1,136 @@
# Code of Conduct

This code of conduct is an extension of the [community guidelines](https://hash.ai/legal/community) that can be found on the [hash.ai](https://hash.ai/) website. By participating in this repository, you agree to adhere to both the below _code of conduct_ and the linked _community guidelines_.

## Contributor Covenant Code of Conduct

### Our Pledge

We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, caste, color, religion, or sexual
identity and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.

### Our Standards

Examples of behavior that contributes to a positive environment for our
community include:

- Demonstrating empathy and kindness toward other people
- Being respectful of differing opinions, viewpoints, and experiences
- Giving and gracefully accepting constructive feedback
- Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
- Focusing on what is best not just for us as individuals, but for the overall
community

Examples of unacceptable behavior include:

- The use of sexualized language or imagery, and sexual attention or advances of
any kind
- Trolling, insulting or derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or email address,
without their explicit permission
- Other conduct which could reasonably be considered inappropriate in a
professional setting

### Enforcement Responsibilities

Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.

Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.

### Scope

This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.

### Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
[hash.ai/contact](https://hash.ai/contact).
All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the
reporter of any incident.

### Enforcement Guidelines

Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:

#### 1. Correction

**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.

**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.

#### 2. Warning

**Community Impact**: A violation through a single incident or series of
actions.

**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or permanent
ban.

#### 3. Temporary Ban

**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.

**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.

#### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within the
community.

### Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.1, available at
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].

Community Impact Guidelines were inspired by
[Mozilla's code of conduct enforcement ladder][mozilla coc].

For answers to common questions about this code of conduct, see the FAQ at
[https://www.contributor-covenant.org/faq][faq]. Translations are available at
[https://www.contributor-covenant.org/translations][translations].

[homepage]: https://www.contributor-covenant.org
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
[mozilla coc]: https://github.com/mozilla/diversity
[faq]: https://www.contributor-covenant.org/faq
[translations]: https://www.contributor-covenant.org/translations
12 changes: 6 additions & 6 deletions README.md
Expand Up @@ -14,15 +14,15 @@ This is HASH's _public monorepo_ which contains our open-source, fair-source and

### Packages

- [`blocks`](blocks): The source code for all of HASH's open-source [Block Protocol](https://github.com/blockprotocol/blockprotocol) blocks
- [`packages/hash`](packages/hash): The codebase for [HASH](https://hash.ai/platform/hash) - a data-driven, entity-centric, all-in-one workspace based on the Block Protocol
- [`packages/engine`](packages/engine): The codebase for our next-gen version of [HASH Engine](https://hash.ai/platform/engine) - a versatile agent-based simulation engine written in Rust
- [`packages/libs`](packages/libs): The source code for our open-source developer libraries
- [`/blocks`](blocks): The source code for all of HASH's open-source [Block Protocol](https://github.com/blockprotocol/blockprotocol) blocks
- [`/packages/hash`](packages/hash): The codebase for [HASH](https://hash.ai/platform/hash) - a data-driven, entity-centric, all-in-one workspace based on the Block Protocol
- [`/packages/engine`](packages/engine): The codebase for our next-gen version of [HASH Engine](https://hash.ai/platform/engine) - a versatile agent-based simulation engine written in Rust
- [`/packages/libs`](packages/libs): The source code for our open-source developer libraries

### Site code and content

- [`apps/hashdotai`](apps/hashdotai): contains the [HASH user guide](https://hash.ai/docs) and [glossary of terms](https://hash.ai/glossary) content
- [`apps/hashdotdev`](apps/hashdotdev): contains the [hash.dev](https://hash.dev/) developer-education website content and code
- [`/apps/hashdotai`](apps/hashdotai): contains the [HASH user guide](https://hash.ai/docs) and [glossary of terms](https://hash.ai/glossary) content
- [`/apps/hashdotdev`](apps/hashdotdev): contains the [hash.dev](https://hash.dev/) developer-education website content and code

### Infrastructure

Expand Down
5 changes: 5 additions & 0 deletions apps/hashdotai/.eslintrc.cjs
@@ -1,4 +1,9 @@
/** @type {import("eslint").Linter.Config} */
module.exports = {
...require("@local/eslint-config/generate-workspace-config.cjs")(__dirname),
rules: {
"simple-import-sort/exports": "error",
"simple-import-sort/imports": "error",
"unicorn/filename-case": "error",
},
};
3 changes: 2 additions & 1 deletion apps/hashdotai/scripts/sync-algolia-index.ts
@@ -1,8 +1,9 @@
import fs from "node:fs";
import path from "node:path";
import matter from "gray-matter";

import algoliasearch from "algoliasearch";
import * as envalid from "envalid";
import matter from "gray-matter";

const monorepoDirPath = path.resolve(__dirname, "../../..");

Expand Down
4 changes: 3 additions & 1 deletion apps/hashdotdev/.eslintrc.cjs
Expand Up @@ -6,10 +6,12 @@ module.exports = {
/* 2022-11-29: 13 */ "@typescript-eslint/no-unsafe-assignment",
/* 2022-11-29: 13 */ "@typescript-eslint/no-unsafe-member-access",
/* 2022-11-29: 11 */ "@typescript-eslint/restrict-template-expressions",
"unicorn/filename-case",
]),
"jsx-a11y/label-has-associated-control": "off",
"import/no-default-export": "error",
"simple-import-sort/exports": "error",
"simple-import-sort/imports": "error",
"unicorn/filename-case": "error",
},
overrides: [
{
Expand Down
@@ -1,14 +1,15 @@
import { Container, Stack, Typography } from "@mui/material";
import { Box, TypographyProps } from "@mui/system";
import { format } from "date-fns";
import Image from "next/legacy/image";
import { NextSeo } from "next-seo";
import { createContext, ReactNode, useContext, FunctionComponent } from "react";
import { format } from "date-fns";
import { createContext, FunctionComponent, ReactNode, useContext } from "react";

import { FRONTEND_URL } from "../config";
import { Link } from "./Link";
import { mdxImageClasses } from "./MdxImage";
import { FaIcon } from "./icons/FaIcon";
import { BlogPostAuthor as BlogPostAuthorType } from "../pages/blog/[...blogSlug].page";
import { BlogPostAuthor as BlogPostAuthorType } from "../pages/blog/[...blog-slug].page";
import { FaIcon } from "./icons/fa-icon";
import { Link } from "./link";
import { mdxImageClasses } from "./mdx-image";

export type BlogPostPagePhoto = {
src: string;
Expand Down
Expand Up @@ -7,9 +7,10 @@ import {
} from "@mui/material";
// eslint-disable-next-line no-restricted-imports
import Link from "next/link";
import { FunctionComponent, forwardRef, useMemo } from "react";
import { isHrefExternal } from "./Link";
import { LoadingSpinner } from "./LoadingSpinner";
import { forwardRef, FunctionComponent, useMemo } from "react";

import { isHrefExternal } from "./link";
import { LoadingSpinner } from "./loading-spinner";

export type ButtonProps = {
loading?: boolean;
Expand Down
@@ -1,12 +1,13 @@
import { Box, Container, Divider, Stack, Typography } from "@mui/material";
import { ComponentProps, FunctionComponent, ReactNode } from "react";

import { SITE_DESCRIPTION } from "../config";
import { DiscordIcon } from "./icons/DiscordIcon";
import { GithubIcon } from "./icons/GithubIcon";
import { TwitterIcon } from "./icons/TwitterIcon";
import { Link } from "./Link";
import { Logo } from "./Logo";
import { Spacer } from "./Spacer";
import { DiscordIcon } from "./icons/discord-icon";
import { GithubIcon } from "./icons/github-icon";
import { TwitterIcon } from "./icons/twitter-icon";
import { Link } from "./link";
import { Logo } from "./logo";
import { Spacer } from "./spacer";

const FooterLink: FunctionComponent<
{ href: string } & Omit<ComponentProps<typeof Typography>, "variant">
Expand Down
@@ -1,8 +1,8 @@
import { faArrowRight, faBullhorn } from "@fortawesome/free-solid-svg-icons";
import { Box, Container, Typography } from "@mui/material";

import { FontAwesomeIcon } from "./icons/FontAwesomeIcon";
import { Link } from "./Link";
import { FontAwesomeIcon } from "./icons/font-awesome-icon";
import { Link } from "./link";

const CAREERS_SITE = "https://hash.ai/careers";

Expand Down
@@ -1,5 +1,5 @@
import { FunctionComponent } from "react";
import { SvgIcon, SvgIconProps } from "@mui/material";
import { FunctionComponent } from "react";

export const DiscordIcon: FunctionComponent<SvgIconProps> = ({
sx = [],
Expand Down
@@ -1,5 +1,5 @@
import { SvgIcon, SvgIconProps } from "@mui/material";
import { IconDefinition } from "@fortawesome/free-solid-svg-icons";
import { SvgIcon, SvgIconProps } from "@mui/material";
import { forwardRef } from "react";

type FontAwesomeIconProps = {
Expand Down
@@ -1,5 +1,5 @@
import { FunctionComponent } from "react";
import { SvgIcon, SvgIconProps } from "@mui/material";
import { FunctionComponent } from "react";

export const GithubIcon: FunctionComponent<SvgIconProps> = ({
sx = [],
Expand Down
@@ -1,5 +1,5 @@
import { FunctionComponent } from "react";
import { SvgIcon, SvgIconProps } from "@mui/material";
import { FunctionComponent } from "react";

export const TwitterIcon: FunctionComponent<SvgIconProps> = ({
sx = [],
Expand Down
@@ -1,6 +1,7 @@
import { Box } from "@mui/material";
import { FunctionComponent, ReactNode } from "react";
import { mdxImageClasses } from "./MdxImage";

import { mdxImageClasses } from "./mdx-image";

export const ImageWithText: FunctionComponent<{ children?: ReactNode }> = ({
children,
Expand Down
@@ -1,3 +1,5 @@
import { UrlObject } from "node:url";

import {
Link as MuiLink,
LinkProps as MuiLinkProps,
Expand All @@ -8,9 +10,9 @@ import clsx from "clsx";
import NextLink, { LinkProps as NextLinkProps } from "next/link";
import { useRouter } from "next/router";
import { forwardRef, isValidElement } from "react";
import { UrlObject } from "node:url";

import { FRONTEND_URL } from "../config";
import { Button } from "./Button";
import { Button } from "./button";

// List of domains that are considered internal (i.e. should not be opened in a new tab)
const internalDomains = ["hash.dev", "hash.ai", "blockprotocol.org"];
Expand Down
@@ -1,6 +1,7 @@
import Image from "next/legacy/image";
import { ComponentProps, FunctionComponent } from "react";
import { Link } from "./Link";

import { Link } from "./link";

export const Logo: FunctionComponent<
Omit<ComponentProps<typeof Link>, "href">
Expand Down
@@ -1,8 +1,9 @@
import { Box } from "@mui/system";
import { ImageProps } from "next/dist/client/legacy/image";
import Image from "next/legacy/image";
import { HTMLProps, FunctionComponent } from "react";
import { useBlogPostPhotos } from "./BlogPost";
import { FunctionComponent, HTMLProps } from "react";

import { useBlogPostPhotos } from "./blog-post";

export const mdxImageClasses = { root: "MdxImage" };

Expand Down
@@ -1,7 +1,8 @@
// @todo update from blockprotocol
import { MDXRemote, MDXRemoteSerializeResult } from "next-mdx-remote";
import { FunctionComponent } from "react";
import { mdxComponents } from "../util/mdxComponents";

import { mdxComponents } from "../util/mdx-components";

type MdxPageContentProps = {
serializedPage: MDXRemoteSerializeResult<Record<string, unknown>>;
Expand Down
@@ -1,7 +1,7 @@
import { Box } from "@mui/material";
import { ReactElement } from "react";

import { Snippet } from "./Snippet";
import { Snippet } from "./snippet";

/**
* @todo copy button
Expand Down
File renamed without changes.
Expand Up @@ -14,11 +14,12 @@ import {
import { SxProps, Theme } from "@mui/system";
import clsx from "clsx";
import { useRouter } from "next/router";
import { useState, FunctionComponent } from "react";
import { Button } from "./Button";
import { FaIcon } from "./icons/FaIcon";
import { FontAwesomeIcon } from "./icons/FontAwesomeIcon";
import { Logo } from "./Logo";
import { FunctionComponent, useState } from "react";

import { Button } from "./button";
import { FaIcon } from "./icons/fa-icon";
import { FontAwesomeIcon } from "./icons/font-awesome-icon";
import { Logo } from "./logo";

export const NAV_HEIGHT = 58;

Expand Down
@@ -1,10 +1,10 @@
import { Box } from "@mui/material";
import { useTheme } from "@mui/system";
import { FunctionComponent, ReactNode } from "react";
import { Footer } from "./Footer";
import { HiringBanner } from "./HiringBanner";
import { Navbar } from "./Navbar";
import { PreFooter } from "./PreFooter";

import { Footer } from "./footer";
import { Navbar } from "./navbar";
import { PreFooter } from "./pre-footer";

// @todo extract NavLink component

Expand Down Expand Up @@ -59,7 +59,6 @@ export const PageLayout: FunctionComponent<{
<Box sx={{ flex: 1 }} />
<PreFooter subscribe={subscribe} />
<Footer />
<HiringBanner />
</Box>
);
};

0 comments on commit aaca87f

Please sign in to comment.