Skip to content

Commit

Permalink
Fixed Imports
Browse files Browse the repository at this point in the history
  • Loading branch information
R1c4rdCo5t4 committed Mar 28, 2024
1 parent 5d4e71f commit 2ed1f39
Show file tree
Hide file tree
Showing 15 changed files with 23 additions and 23 deletions.
2 changes: 1 addition & 1 deletion code/client/dev-dist/sw.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ define(['./workbox-fda11f75'], (function (workbox) { 'use strict';
"revision": "3ca0b8505b4bec776b69afdba2768812"
}, {
"url": "index.html",
"revision": "0.jepaoi887g"
"revision": "0.pmdqsqcitr8"
}], {});
workbox.cleanupOutdatedCaches();
workbox.registerRoute(new workbox.NavigationRoute(workbox.createHandlerBoundToURL("index.html"), {
Expand Down
2 changes: 1 addition & 1 deletion code/client/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { BrowserRouter as Router, Route, Routes } from 'react-router-dom';
import SlateEditor from '@editor/slate.js/SlateEditor.tsx';
import SlateEditor from '@editor/slate/SlateEditor.tsx';
import './App.scss';

function App() {
Expand Down
2 changes: 1 addition & 1 deletion code/client/src/editor/crdt/fugue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { FugueTree } from '@notespace/shared/crdt/FugueTree';
import { generateReplicaId } from './utils';
import { socket } from '@src/socket/socket';
import { type InsertNode } from '@editor/crdt/types';
import { Cursor, Selection } from '@editor/slate.js/model/cursor';
import { Cursor, Selection } from '@editor/slate/model/cursor';
import { isEmpty, isEqual } from 'lodash';

/**
Expand Down
2 changes: 1 addition & 1 deletion code/client/src/editor/hooks/useEvents.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import useSocketListeners from '@src/socket.io/useSocketListeners';
import useSocketListeners from '@src/socket/useSocketListeners';
import { type Fugue } from '@src/editor/crdt/fugue';
import { type Node } from '@notespace/shared/crdt/types/nodes';
import { type Operation } from '@notespace/shared/crdt/types/operations';
Expand Down
12 changes: 6 additions & 6 deletions code/client/src/editor/slate/SlateEditor.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import { Editable, Slate, withReact } from 'slate-react';
import useInputHandlers from '@editor/slate.js/hooks/useInputHandlers';
import useInputHandlers from '@editor/slate/hooks/useInputHandlers';
import useFugue from '@editor/hooks/useFugue';
import useEvents from '@editor/hooks/useEvents';
import useRenderers from '@editor/slate.js/hooks/useRenderers';
import useRenderers from '@editor/slate/hooks/useRenderers';
import './SlateEditor.scss';
import Toolbar from '@editor/slate.js/toolbar/Toolbar';
import Toolbar from '@editor/slate/toolbar/Toolbar';
import { withHistory } from 'slate-history';
import useEditor from '@editor/slate.js/hooks/useEditor';
import { withMarkdown } from '@editor/slate.js/plugins/markdown/withMarkdown';
import { toSlate } from '@editor/slate.js/utils/toSlate';
import useEditor from '@editor/slate/hooks/useEditor';
import { withMarkdown } from '@editor/slate/plugins/markdown/withMarkdown';
import { toSlate } from '@editor/slate/utils/toSlate';

const initialValue = [
{
Expand Down
2 changes: 1 addition & 1 deletion code/client/src/editor/slate/hooks/useInputHandlers.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type React from 'react';
import { type Fugue } from '@editor/crdt/fugue';
import CustomEditor from '@editor/slate.js/model/CustomEditor';
import CustomEditor from '@editor/slate/model/CustomEditor';
import { type Editor } from 'slate';
import { getSelection } from '../utils/selection';
import { isEqual } from 'lodash';
Expand Down
2 changes: 1 addition & 1 deletion code/client/src/editor/slate/hooks/useRenderers.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useCallback } from 'react';
import { type RenderElementProps, type RenderLeafProps } from 'slate-react';
import { getElementRenderer, getLeafRenderer } from '@editor/slate.js/plugins/markdown/rendering/renderers.tsx';
import { getElementRenderer, getLeafRenderer } from '@editor/slate/plugins/markdown/rendering/renderers.tsx';

/**
* Returns the renderers for the editor.
Expand Down
2 changes: 1 addition & 1 deletion code/client/src/editor/slate/model/CustomEditor.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Editor } from 'slate';
import { type Fugue } from '@editor/crdt/fugue.ts';
import { getSelection } from '@editor/slate.js/utils/selection.ts';
import { getSelection } from '@editor/slate/utils/selection.ts';

/**
* Custom editor operations.
Expand Down
2 changes: 1 addition & 1 deletion code/client/src/editor/slate/model/utils.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { type Descendant, Editor, Range } from 'slate';
import { type CustomText } from '@editor/slate.js/model/types.ts';
import { type CustomText } from '@editor/slate/model/types.ts';
import { type BlockStyle } from '@notespace/shared/crdt/types/styles';

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { type BaseEditor, Editor, Element, Point, Range, Text, type TextUnit, Transforms } from 'slate';
import { type CustomElement } from '@editor/slate.js/model/types.ts';
import { type CustomElement } from '@editor/slate/model/types.ts';
import { shortcuts } from './shortcuts.ts';
import { type ReactEditor } from 'slate-react';
import { type HistoryEditor } from 'slate-history';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { type RenderElementProps } from 'slate-react';
import { ElementRenderers, LeafRenderers } from './elements.tsx';
import { Paragraph } from './components/components.ts';
import { type CustomText } from '@editor/slate.js/model/types.ts';
import { type CustomText } from '@editor/slate/model/types.ts';
import { type ReactNode } from 'react';

export const getElementRenderer = (type: string, props: RenderElementProps) => {
Expand Down
4 changes: 2 additions & 2 deletions code/client/src/editor/slate/plugins/markdown/shortcuts.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { type CustomElement } from '@editor/slate.js/model/types.ts';
import { type CustomElement } from '@editor/slate/model/types.ts';
import { BlockStyles, InlineStyles } from '@notespace/shared/crdt/types/styles';
import { type Editor, Element, Range, Text, Transforms } from 'slate';
import { createDescendant } from '@editor/slate.js/model/utils.ts';
import { createDescendant } from '@editor/slate/model/utils.ts';

const escapeRegExp = (s: string) => s.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');

Expand Down
4 changes: 2 additions & 2 deletions code/client/src/editor/slate/toolbar/Toolbar.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useEffect } from 'react';
import { useFocused, useSlate } from 'slate-react';
import CustomEditor from '@editor/slate.js/model/CustomEditor';
import { isSelected } from '@editor/slate.js/utils/selection';
import CustomEditor from '@editor/slate/model/CustomEditor';
import { isSelected } from '@editor/slate/utils/selection';
import { FaBold, FaItalic, FaUnderline, FaStrikethrough, FaCode } from 'react-icons/fa';
import { type Fugue } from '@editor/crdt/fugue';

Expand Down
4 changes: 2 additions & 2 deletions code/client/src/editor/slate/utils/toSlate.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import type { Descendant } from 'slate';
import type { Style, BlockStyle } from '../../../../../shared/crdt/types/styles';
import type { CustomText } from '@editor/slate.js/model/types.ts';
import type { CustomText } from '@editor/slate/model/types.ts';
import { isEmpty, isEqual } from 'lodash';
import { createChildren, createDescendant } from '@editor/slate.js/model/utils.ts';
import { createChildren, createDescendant } from '@editor/slate/model/utils.ts';
import { Fugue } from '@editor/crdt/fugue.ts';

export function toSlate(fugue: Fugue): Descendant[] {
Expand Down
2 changes: 1 addition & 1 deletion code/client/tests/editor/crdt/fugue.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Fugue } from '@editor/crdt/fugue';
import { InsertOperation, DeleteOperation } from '@notespace/shared/crdt/types';
import { Selection, Cursor } from '@editor/slate.js/model/cursor';
import { Selection, Cursor } from '@editor/slate/model/cursor';
import { InsertNode } from '@editor/crdt/types';
import { describe, it, expect, beforeEach } from 'vitest';

Expand Down

0 comments on commit 2ed1f39

Please sign in to comment.