Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 0 additions & 18 deletions apps/web/app/api/openeditor/emoji-data/[locale]/[file]/route.ts

This file was deleted.

49 changes: 26 additions & 23 deletions apps/web/features/marketing/openeditor-demo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@ import {
import { OpenEditorContent, useOpenEditorController } from "@openeditor/react";
import {
OpenEditorBlockMenu,
OpenEditorEmojiPickerProvider,
OpenEditorSelectionBubble,
OpenEditorSlashMenu,
OpenEditorTableMenu,
OpenEditorThemeProvider,
} from "@openeditor/ui";
import "@openeditor/ui/styles.css";
} from "@openeditor/react";
import "@openeditor/react/styles.css";
import { useRef } from "react";
import { EditorParticleField } from "./editor-particle-field";

Expand Down Expand Up @@ -291,28 +292,30 @@ export function OpenEditorDemo() {
});

return (
<OpenEditorThemeProvider theme={baseBlocksOpenEditorTheme}>
<div className="landing-editor-demo">
<div
aria-hidden="true"
className="landing-editor-contour-target"
ref={contourRef}
/>
<EditorParticleField contourRef={contourRef} shape="masses" />
<div className="landing-editor-paper">
<div className="landing-editor-paper-inner">
<OpenEditorContent
className="oe-canvas landing-editor-canvas"
controller={controller}
/>
<OpenEditorEmojiPickerProvider>
<OpenEditorThemeProvider theme={baseBlocksOpenEditorTheme}>
<div className="landing-editor-demo">
<div
aria-hidden="true"
className="landing-editor-contour-target"
ref={contourRef}
/>
<EditorParticleField contourRef={contourRef} shape="masses" />
<div className="landing-editor-paper">
<div className="landing-editor-paper-inner">
<OpenEditorContent
className="oe-canvas landing-editor-canvas"
controller={controller}
/>
</div>
</div>
</div>

<OpenEditorBlockMenu controller={controller} />
<OpenEditorSelectionBubble controller={controller} />
<OpenEditorTableMenu controller={controller} />
<OpenEditorSlashMenu controller={controller} />
</div>
</OpenEditorThemeProvider>
<OpenEditorBlockMenu controller={controller} />
<OpenEditorSelectionBubble controller={controller} />
<OpenEditorTableMenu controller={controller} />
<OpenEditorSlashMenu controller={controller} />
</div>
</OpenEditorThemeProvider>
</OpenEditorEmojiPickerProvider>
);
}
4 changes: 2 additions & 2 deletions apps/web/features/openeditor/extensions/library.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ import {
SelectValue,
} from "@baseblocks/ui/select";
import { Switch } from "@baseblocks/ui/switch";
import { defineOpenEditorCustomBlockEditor } from "@openeditor/custom-block/editor";
import { defineOpenEditorCustomBlockViewer } from "@openeditor/custom-block/viewer";
import { defineOpenEditorCustomBlockEditor } from "@openeditor/react/extensions/editor";
import { defineOpenEditorCustomBlockViewer } from "@openeditor/react/extensions/viewer";
import { useMutation, useQuery } from "convex/react";
import { useId, useState } from "react";

Expand Down
4 changes: 2 additions & 2 deletions apps/web/features/openeditor/extensions/search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import { searchBlock } from "@baseblocks/openeditor-contracts/core-blocks";
import { Input } from "@baseblocks/ui/input";
import { Label } from "@baseblocks/ui/label";
import { Switch } from "@baseblocks/ui/switch";
import { defineOpenEditorCustomBlockEditor } from "@openeditor/custom-block/editor";
import { defineOpenEditorCustomBlockViewer } from "@openeditor/custom-block/viewer";
import { defineOpenEditorCustomBlockEditor } from "@openeditor/react/extensions/editor";
import { defineOpenEditorCustomBlockViewer } from "@openeditor/react/extensions/viewer";
import { useId } from "react";

function SearchPreview({ value }: { value: Required<SearchContent> }) {
Expand Down
61 changes: 32 additions & 29 deletions apps/web/features/openeditor/openeditor-page-editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import type {
} from "@openeditor/document";
import {
OpenEditorContent,
OpenEditorEmojiPickerProvider,
OpenEditorPageHeader,
type OpenEditorSlashMenuItem,
OpenEditorViewer,
Expand All @@ -31,8 +32,8 @@ import {
OpenEditorSlashMenu,
OpenEditorTableMenu,
OpenEditorThemeProvider,
} from "@openeditor/ui";
import "@openeditor/ui/styles.css";
} from "@openeditor/react";
import "@openeditor/react/styles.css";
import { useMutation } from "convex/react";
import { useEffect, useRef, useState, type ReactNode } from "react";
import { useTranslations } from "next-intl";
Expand Down Expand Up @@ -184,33 +185,35 @@ export function OpenEditorPageEditor({
: undefined;

return (
<SiteRenderActionsProvider actions={{ siteId }}>
{readOpenEditorPageTabs(document) ? (
<OpenEditorTabbedPageEditor
attachmentRuntime={attachmentRuntime}
canEdit={canEdit}
fullWidthStyle={fullWidthStyle}
imageRuntime={imageRuntime}
document={document}
onChange={onChange}
pageHeading={pageHeading}
pageRuntime={pageRuntime}
preview={preview}
/>
) : (
<OpenEditorDocumentEditor
attachmentRuntime={attachmentRuntime}
canEdit={canEdit}
fullWidthStyle={fullWidthStyle}
imageRuntime={imageRuntime}
document={document}
onChange={onChange}
pageHeading={pageHeading}
pageRuntime={pageRuntime}
preview={preview}
/>
)}
</SiteRenderActionsProvider>
<OpenEditorEmojiPickerProvider>
<SiteRenderActionsProvider actions={{ siteId }}>
{readOpenEditorPageTabs(document) ? (
<OpenEditorTabbedPageEditor
attachmentRuntime={attachmentRuntime}
canEdit={canEdit}
fullWidthStyle={fullWidthStyle}
imageRuntime={imageRuntime}
document={document}
onChange={onChange}
pageHeading={pageHeading}
pageRuntime={pageRuntime}
preview={preview}
/>
) : (
<OpenEditorDocumentEditor
attachmentRuntime={attachmentRuntime}
canEdit={canEdit}
fullWidthStyle={fullWidthStyle}
imageRuntime={imageRuntime}
document={document}
onChange={onChange}
pageHeading={pageHeading}
pageRuntime={pageRuntime}
preview={preview}
/>
)}
</SiteRenderActionsProvider>
</OpenEditorEmojiPickerProvider>
);
}

Expand Down
2 changes: 1 addition & 1 deletion apps/web/features/openeditor/openeditor-theme.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { OpenEditorTheme } from "@openeditor/ui";
import type { OpenEditorTheme } from "@openeditor/react";

export const baseBlocksOpenEditorTheme = {
surface: "var(--background)",
Expand Down
2 changes: 1 addition & 1 deletion apps/web/features/openeditor/page-tabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import {
OpenEditorSelectionBubble,
OpenEditorSlashMenu,
OpenEditorTableMenu,
} from "@openeditor/ui";
} from "@openeditor/react";
import {
useCallback,
useEffect,
Expand Down
4 changes: 2 additions & 2 deletions apps/web/features/published-sites/page-content.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ import type {
OpenEditorPageRuntime,
} from "@openeditor/document";
import { OpenEditorViewer } from "@openeditor/react";
import { OpenEditorThemeProvider } from "@openeditor/ui";
import "@openeditor/ui/styles.css";
import { OpenEditorThemeProvider } from "@openeditor/react";
import "@openeditor/react/styles.css";
import type { PublishedPageTarget } from "./page-targets";

const EMPTY_PAGE_TARGETS = new Map<string, PublishedPageTarget>();
Expand Down
9 changes: 3 additions & 6 deletions apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,9 @@
"@flags-sdk/vercel": "^1.4.6",
"@hugeicons/core-free-icons": "^4.2.3",
"@hugeicons/react": "^1.1.9",
"@openeditor/custom-block": "0.0.55",
"@openeditor/document": "0.0.55",
"@openeditor/export": "0.0.55",
"@openeditor/mutations": "0.0.55",
"@openeditor/react": "0.0.55",
"@openeditor/ui": "0.0.55",
"@openeditor/document": "1.0.0",
"@openeditor/export": "1.0.0",
"@openeditor/react": "1.0.0",
"@vercel/analytics": "^2.0.1",
"@vercel/sdk": "^1.28.8",
"ai": "7.0.49",
Expand Down
Loading