Skip to content

Commit

Permalink
Merge pull request #21 from basehub-ai/joaco/toc-renderer
Browse files Browse the repository at this point in the history
react/rich-text
  • Loading branch information
julianbenegas authored Oct 24, 2023
2 parents 065904a + 5d54c96 commit 638e199
Show file tree
Hide file tree
Showing 15 changed files with 1,218 additions and 623 deletions.
5 changes: 5 additions & 0 deletions .changeset/tall-birds-sort.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"basehub": patch
---

New RichText Renderer for React.
18 changes: 9 additions & 9 deletions internal/eslint-config-custom/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
"main": "index.js",
"private": true,
"dependencies": {
"@typescript-eslint/eslint-plugin": "^4.33.0",
"@typescript-eslint/parser": "^4.33.0",
"eslint": "^7.23.0",
"eslint-config-next": "^12.0.8",
"eslint-config-prettier": "^8.3.0",
"eslint-import-resolver-typescript": "^2.5.0",
"eslint-plugin-import": "2.25.4",
"eslint-plugin-react": "7.31.8",
"eslint-config-turbo": "latest"
"@typescript-eslint/eslint-plugin": "^6.9.0",
"@typescript-eslint/parser": "^6.9.0",
"eslint": "^8.52.0",
"eslint-config-next": "^13.5.6",
"eslint-config-prettier": "^9.0.0",
"eslint-config-turbo": "latest",
"eslint-import-resolver-typescript": "^3.6.1",
"eslint-plugin-import": "2.29.0",
"eslint-plugin-react": "7.33.2"
},
"publishConfig": {
"access": "public"
Expand Down
4 changes: 3 additions & 1 deletion internal/tsconfig/react-library.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
"lib": ["dom", "ES2015"],
"module": "ESNext",
"target": "es6",
"strict": true
"strict": true,
"alwaysStrict": true,
"strictNullChecks": true
}
}
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
"devDependencies": {
"@changesets/cli": "^2.22.0",
"eslint-config-custom": "workspace:*",
"prettier": "2.5.1",
"prettier": "3.0.3",
"turbo": "1.10.12",
"type-fest": "^3.0.0",
"typescript": "^4.7.4"
"typescript": "^5.2.2"
},
"packageManager": "[email protected]"
}
15 changes: 13 additions & 2 deletions packages/basehub/src/bin/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
runtime__getStuffFromEnvString,
} from "./util/get-stuff-from-env";

export const main = async (args: Args) => {
export const main = async (_args: Args) => {
console.log("🪄 Generating...");

const { url, headers } = getStuffFromEnv();
Expand Down Expand Up @@ -99,6 +99,8 @@ export const main = async (args: Args) => {
};

const basehubExport = `
import { createFetcher } from "./runtime";
// we limit options to only the ones we want to expose.
type Options = Omit<ClientOptions, 'url' | 'method' | 'batch' | 'credentials' | 'fetch' | 'fetcher' | 'headers' | 'integrity' | 'keepalive' | 'mode' | 'redirect' | 'referrer' | 'referrerPolicy' | 'window'>
Expand All @@ -118,5 +120,14 @@ type Options = Omit<ClientOptions, 'url' | 'method' | 'batch' | 'credentials' |
* console.log(firstQuery.__typename) // => 'Query'
*
*/
export const basehub = (options?: Options) => createClient(options)
export const basehub = (options?: Options) => {
const { url, headers } = getStuffFromEnv();
return {
...createClient(options),
raw: createFetcher({ ...options, url, headers }) as <Cast = unknown>(
gql: GraphqlOperation
) => Promise<Cast>,
};
};
`;
13 changes: 0 additions & 13 deletions packages/basehub/src/react/rich-text.tsx

This file was deleted.

Loading

0 comments on commit 638e199

Please sign in to comment.