Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add custom upload config #335

Merged
merged 2 commits into from
Mar 7, 2024
Merged

feat: add custom upload config #335

merged 2 commits into from
Mar 7, 2024

Conversation

andrewdoro
Copy link
Collaborator

@andrewdoro andrewdoro commented Mar 6, 2024

Custom upload config using uploadFn function

  • Update docs for the editorProps
  • Write guide for using custom upload flow

closes #266 #206

@andrewdoro andrewdoro self-assigned this Mar 6, 2024
Copy link

vercel bot commented Mar 6, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
novel ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 7, 2024 11:59am

@andrewdoro andrewdoro merged commit 7499182 into main Mar 7, 2024
4 checks passed
@andrewdoro andrewdoro deleted the custom-upload branch March 7, 2024 12:56
nicolewhite pushed a commit to autoblocksai/autoblocks-examples that referenced this pull request Mar 11, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
|
[@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node)
([source](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node))
| [`20.11.24` ->
`20.11.25`](https://renovatebot.com/diffs/npm/@types%2fnode/20.11.24/20.11.25)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@types%2fnode/20.11.25?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@types%2fnode/20.11.25?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@types%2fnode/20.11.24/20.11.25?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@types%2fnode/20.11.24/20.11.25?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
|
[@types/react](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react)
([source](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react))
| [`18.2.61` ->
`18.2.64`](https://renovatebot.com/diffs/npm/@types%2freact/18.2.61/18.2.64)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@types%2freact/18.2.64?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@types%2freact/18.2.64?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@types%2freact/18.2.61/18.2.64?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@types%2freact/18.2.61/18.2.64?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
|
[@types/react-dom](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-dom)
([source](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react-dom))
| [`18.2.19` ->
`18.2.21`](https://renovatebot.com/diffs/npm/@types%2freact-dom/18.2.19/18.2.21)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@types%2freact-dom/18.2.21?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@types%2freact-dom/18.2.21?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@types%2freact-dom/18.2.19/18.2.21?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@types%2freact-dom/18.2.19/18.2.21?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
| [ai](https://sdk.vercel.ai/docs)
([source](https://github.com/vercel/ai)) | [`3.0.4` ->
`3.0.8`](https://renovatebot.com/diffs/npm/ai/3.0.4/3.0.8) |
[![age](https://developer.mend.io/api/mc/badges/age/npm/ai/3.0.8?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/ai/3.0.8?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/ai/3.0.4/3.0.8?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/ai/3.0.4/3.0.8?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
| [dotenv-cli](https://github.com/entropitor/dotenv-cli) | [`7.3.0` ->
`7.4.1`](https://renovatebot.com/diffs/npm/dotenv-cli/7.3.0/7.4.1) |
[![age](https://developer.mend.io/api/mc/badges/age/npm/dotenv-cli/7.4.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/dotenv-cli/7.4.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/dotenv-cli/7.3.0/7.4.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/dotenv-cli/7.3.0/7.4.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
|
[eslint-config-next](https://nextjs.org/docs/app/building-your-application/configuring/eslint#eslint-config)
([source](https://github.com/vercel/next.js/tree/HEAD/packages/eslint-config-next))
| [`14.1.1` ->
`14.1.3`](https://renovatebot.com/diffs/npm/eslint-config-next/14.1.1/14.1.3)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/eslint-config-next/14.1.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/eslint-config-next/14.1.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/eslint-config-next/14.1.1/14.1.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/eslint-config-next/14.1.1/14.1.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
| [next](https://nextjs.org)
([source](https://github.com/vercel/next.js)) | [`14.1.1` ->
`14.1.3`](https://renovatebot.com/diffs/npm/next/14.1.1/14.1.3) |
[![age](https://developer.mend.io/api/mc/badges/age/npm/next/14.1.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/next/14.1.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/next/14.1.1/14.1.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/next/14.1.1/14.1.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
| [novel](https://novel.sh)
([source](https://github.com/steven-tey/novel)) | [`0.2.7` ->
`0.2.11`](https://renovatebot.com/diffs/npm/novel/0.2.7/0.2.11) |
[![age](https://developer.mend.io/api/mc/badges/age/npm/novel/0.2.11?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/novel/0.2.11?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/novel/0.2.7/0.2.11?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/novel/0.2.7/0.2.11?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
| [typescript](https://www.typescriptlang.org/)
([source](https://github.com/Microsoft/TypeScript)) | [`5.3.3` ->
`5.4.2`](https://renovatebot.com/diffs/npm/typescript/5.3.3/5.4.2) |
[![age](https://developer.mend.io/api/mc/badges/age/npm/typescript/5.4.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/typescript/5.4.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/typescript/5.3.3/5.4.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/typescript/5.3.3/5.4.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>vercel/ai (ai)</summary>

### [`v3.0.8`](https://github.com/vercel/ai/releases/tag/ai%403.0.8)

[Compare
Source](https://github.com/vercel/ai/compare/[email protected]@3.0.8)

##### Patch Changes

- [`a94aab2`](https://github.com/vercel/ai/commit/a94aab2): ai/rsc:
optimize streamable value stream size

### [`v3.0.7`](https://github.com/vercel/ai/releases/tag/ai%403.0.7)

[Compare
Source](https://github.com/vercel/ai/compare/[email protected]@3.0.7)

##### Patch Changes

- [`9a9ae73`](https://github.com/vercel/ai/commit/9a9ae73):
feat(ai/rsc): readStreamableValue

### [`v3.0.6`](https://github.com/vercel/ai/releases/tag/ai%403.0.6)

[Compare
Source](https://github.com/vercel/ai/compare/[email protected]@3.0.6)

##### Patch Changes

- [`1355ad0`](https://github.com/vercel/ai/commit/1355ad0): Fix:
experimental_onToolCall is called with parsed tool args
- [`9348f06`](https://github.com/vercel/ai/commit/9348f06): ai/rsc:
improve dev error and warnings by trying to detect hanging streams
- [`8be9404`](https://github.com/vercel/ai/commit/8be9404): fix type
resolution

### [`v3.0.5`](https://github.com/vercel/ai/releases/tag/ai%403.0.5)

[Compare
Source](https://github.com/vercel/ai/compare/[email protected]@3.0.5)

##### Patch Changes

- [`a973f1e`](https://github.com/vercel/ai/commit/a973f1e): Support
Anthropic SDK v0.15.0
- [`e25f3ca`](https://github.com/vercel/ai/commit/e25f3ca): type
improvements

</details>

<details>
<summary>entropitor/dotenv-cli (dotenv-cli)</summary>

###
[`v7.4.1`](https://github.com/entropitor/dotenv-cli/compare/v7.4.0...ed62fc71afc952181913aa275d7a002a5178b2d6)

[Compare
Source](https://github.com/entropitor/dotenv-cli/compare/v7.4.0...v7.4.1)

###
[`v7.4.0`](https://github.com/entropitor/dotenv-cli/releases/tag/v7.4.0):
Release better variable usage (`-v`)

[Compare
Source](https://github.com/entropitor/dotenv-cli/compare/v7.3.0...v7.4.0)

Releases
[entropitor/dotenv-cli#105

</details>

<details>
<summary>vercel/next.js (eslint-config-next)</summary>

###
[`v14.1.3`](https://github.com/vercel/next.js/compare/v14.1.2...fc38ee190c9b7de09ebff13a17ebd948cf580ec3)

[Compare
Source](https://github.com/vercel/next.js/compare/v14.1.2...v14.1.3)

###
[`v14.1.2`](https://github.com/vercel/next.js/compare/v14.1.1...f564deef86be32a6b25125ddb8172c7c27d3f19a)

[Compare
Source](https://github.com/vercel/next.js/compare/v14.1.1...v14.1.2)

</details>

<details>
<summary>vercel/next.js (next)</summary>

###
[`v14.1.3`](https://github.com/vercel/next.js/compare/v14.1.2...fc38ee190c9b7de09ebff13a17ebd948cf580ec3)

[Compare
Source](https://github.com/vercel/next.js/compare/v14.1.2...v14.1.3)

###
[`v14.1.2`](https://github.com/vercel/next.js/compare/v14.1.1...f564deef86be32a6b25125ddb8172c7c27d3f19a)

[Compare
Source](https://github.com/vercel/next.js/compare/v14.1.1...v14.1.2)

</details>

<details>
<summary>steven-tey/novel (novel)</summary>

###
[`v0.2.11`](https://github.com/steven-tey/novel/releases/tag/novel%400.2.11)

[Compare
Source](https://github.com/steven-tey/novel/compare/[email protected]@0.2.11)

**Full Changelog**:
https://github.com/steven-tey/novel/compare/[email protected]@0.2.11

#### What's Changed

- feat: add ai features example by
[@&#8203;andrewdoro](https://github.com/andrewdoro) in
[steven-tey/novel#297
-   Novel now exports a couple of utilities for dealing with AI cases:

```tsx
//this extension is used for highlighting text for the AI
import { AIHighlight } from "novel/extensions";

//call this function when entering in AI mode to highlight current selection
import { addAIHighlight } from "novel/extensions";

//call this function when AI mode is no longer used
import { removeAIHighlight } from "novel/extensions";

//this function returns the current selection in Markdown
import { getPrevText } from "novel/extensions";

```

##### Implementation

You can see an example implementation

https://github.com/steven-tey/novel/tree/main/apps/web/components/tailwind/generative

**Full Changelog**:
https://github.com/steven-tey/novel/compare/[email protected]@0.2.11

###
[`v0.2.10`](https://github.com/steven-tey/novel/releases/tag/novel%400.2.10)

[Compare
Source](https://github.com/steven-tey/novel/compare/[email protected]@0.2.10)

-   Fixes missing types.

**Full Changelog**:
https://github.com/steven-tey/novel/compare/[email protected]@0.2.10

###
[`v0.2.9`](https://github.com/steven-tey/novel/releases/tag/novel%400.2.9)

[Compare
Source](https://github.com/steven-tey/novel/compare/[email protected]@0.2.9)

**## Update to 0.2.10, this version is missing type definitions**

#### Breaking Changes

**`defaultEditorProps` was removed from the library**
It was broken into multiple functions that have to be passed in the
`editorProps`.

- `handleImageDrop`, `handleImagePaste` require a custom uploadFn for
uploading images (See guide
[here](https://novel.sh/docs/guides/image-upload))

```tsx
import { handleImageDrop, handleImagePaste } from "novel/plugins";
import { handleCommandNavigation } from "novel/extensions";

<EditorContent
   editorProps={{
        handleDOMEvents: {
          keydown: (_view, event) => handleCommandNavigation(event),
        },
        handlePaste: (view, event) =>
          handleImagePaste(view, event, uploadFn),
        handleDrop: (view, event, _slice, moved) =>
          handleImageDrop(view, event, moved, uploadFn),
      
      }}

```

#### What's Changed

- Show grabbing cursor when grabbing drag handle by
[@&#8203;haydenbleasel](https://github.com/haydenbleasel) in
[steven-tey/novel#334
- feat: add custom upload config by
[@&#8203;andrewdoro](https://github.com/andrewdoro) in
[steven-tey/novel#335

**Full Changelog**:
https://github.com/steven-tey/novel/compare/[email protected]@0.2.9

###
[`v0.2.8`](https://github.com/steven-tey/novel/releases/tag/novel%400.2.8)

[Compare
Source](https://github.com/steven-tey/novel/compare/[email protected]@0.2.8)

#### What's Changed

- fix: rename updated image type by
[@&#8203;bouceka](https://github.com/bouceka) in
[steven-tey/novel#315
- feat: clear nodes on node selector by
[@&#8203;brunocroh](https://github.com/brunocroh) in
[steven-tey/novel#322
- Miscellaneous fixes by
[@&#8203;haydenbleasel](https://github.com/haydenbleasel) in
[steven-tey/novel#321
- fix: remove drag-handle on drop by
[@&#8203;brunocroh](https://github.com/brunocroh) in
[steven-tey/novel#323
- fix: dont trigger slash-command on codeBlock nodes by
[@&#8203;brunocroh](https://github.com/brunocroh) in
[steven-tey/novel#326

#### New Contributors

- [@&#8203;bouceka](https://github.com/bouceka) made their first
contribution in
[steven-tey/novel#315
- [@&#8203;haydenbleasel](https://github.com/haydenbleasel) made their
first contribution in
[steven-tey/novel#321

**Full Changelog**:
https://github.com/steven-tey/novel/compare/[email protected]@0.2.8

</details>

<details>
<summary>Microsoft/TypeScript (typescript)</summary>

###
[`v5.4.2`](https://github.com/microsoft/TypeScript/releases/tag/v5.4.2):
TypeScript 5.4

[Compare
Source](https://github.com/Microsoft/TypeScript/compare/v5.3.3...v5.4.2)

For release notes, check out the [release
announcement](https://devblogs.microsoft.com/typescript/announcing-typescript-5-4/).

For the complete list of fixed issues, check out the

- [fixed issues query for Typescript 5.4.0
(Beta)](https://github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93\&q=milestone%3A%22TypeScript+5.4.0%22+is%3Aclosed+).
- [fixed issues query for Typescript 5.4.1
(RC)](https://github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93\&q=milestone%3A%22TypeScript+5.4.1%22+is%3Aclosed+).
- [fixed issues query for Typescript 5.4.2
(Stable)](https://github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93\&q=milestone%3A%22TypeScript+5.4.2%22+is%3Aclosed+).

Downloads are available on:

- [NuGet
package](https://www.nuget.org/packages/Microsoft.TypeScript.MSBuild)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "before 4am on Monday" in timezone
America/Chicago, Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config help](https://github.com/renovatebot/renovate/discussions) if
that's undesired.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/autoblocksai/autoblocks-examples).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yMzAuMCIsInVwZGF0ZWRJblZlciI6IjM3LjIzMC4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant