Skip to content

Commit

Permalink
🚚
Browse files Browse the repository at this point in the history
  • Loading branch information
zbeyens committed Jul 13, 2023
1 parent ba04516 commit 8b3fc7d
Show file tree
Hide file tree
Showing 165 changed files with 466 additions and 372 deletions.
7 changes: 4 additions & 3 deletions packages/alignment/src/__tests__/setAlign/center.spec.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
/** @jsx jsx */

import { createAlignPlugin } from '@/packages/alignment/src/createAlignPlugin';
import { setAlign } from '@/packages/alignment/src/transforms/setAlign';
import { PlateEditor, createPlateEditor } from '@udecode/plate-common';
import { createPlateEditor, type PlateEditor } from '@udecode/plate-common';
import { jsx } from '@udecode/plate-test-utils';

import { createAlignPlugin } from '../../createAlignPlugin';
import { setAlign } from '../../transforms/index';

jsx;

const input = (
Expand Down
5 changes: 3 additions & 2 deletions packages/alignment/src/__tests__/setAlign/left.spec.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
/** @jsx jsx */

import { createAlignPlugin } from '@/packages/alignment/src/createAlignPlugin';
import { setAlign } from '@/packages/alignment/src/transforms/setAlign';
import { PlateEditor, createPlateEditor } from '@udecode/plate-common';
import { jsx } from '@udecode/plate-test-utils';

import { createAlignPlugin } from '../../createAlignPlugin';
import { setAlign } from '../../transforms/index';

jsx;

const input = (
Expand Down
5 changes: 3 additions & 2 deletions packages/alignment/src/__tests__/setAlign/no-type.spec.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
/** @jsx jsx */

import { createAlignPlugin } from '@/packages/alignment/src/createAlignPlugin';
import { setAlign } from '@/packages/alignment/src/transforms/setAlign';
import { PlateEditor, createPlateEditor } from '@udecode/plate-common';
import { jsx } from '@udecode/plate-test-utils';

import { createAlignPlugin } from '../../createAlignPlugin';
import { setAlign } from '../../transforms/index';

jsx;

describe('when type (h1) is not in types', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/** @jsx jsx */

import { withAutoformat } from '@/packages/autoformat/src/withAutoformat';
import { autoformatPlugin } from '@/plate/demo/plugins/autoformatPlugin';
import { mockPlugin } from '@udecode/plate-common';
import { jsx } from '@udecode/plate-test-utils';
import { withReact } from 'slate-react';
import { withAutoformat } from "../../../withAutoformat";

jsx;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,27 +1,26 @@
/** @jsx jsx */

import {
AutoformatPlugin,
withAutoformat,
} from '@/packages/autoformat/src/index';
import { autoformatPlugin } from '@/plate/demo/plugins/autoformatPlugin';
import { preFormat } from '@/plate/demo/plugins/autoformatUtils';
import { AutoformatPlugin } from '@udecode/plate-autoformat';
import {
ELEMENT_CODE_BLOCK,
insertEmptyCodeBlock,
} from '@udecode/plate-code-block';
import {
ELEMENT_DEFAULT,
PlateEditor,
getEditorString,
getPluginType,
getRangeFromBlockStart,
mockPlugin,
PlateEditor,
} from '@udecode/plate-common';
import { jsx } from '@udecode/plate-test-utils';
import { Range } from 'slate';
import { withReact } from 'slate-react';

import { withAutoformat } from '../../../withAutoformat';

jsx;

describe('when ``` at block start', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
/** @jsx jsx */

import { withAutoformat } from '@/packages/autoformat/src/withAutoformat';
import { autoformatPlugin } from '@/plate/demo/plugins/autoformatPlugin';
import { preFormat } from '@/plate/demo/plugins/autoformatUtils';
import { mockPlugin } from '@udecode/plate-common';
import { ELEMENT_H1 } from '@udecode/plate-heading/src/constants';
import { jsx } from '@udecode/plate-test-utils';
import { withReact } from 'slate-react';

import { withAutoformat } from '../../../withAutoformat';

jsx;

describe('when #space', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
/** @jsx jsx */

import { withAutoformat } from '@/packages/autoformat/src/withAutoformat';
import { autoformatPlugin } from '@/plate/demo/plugins/autoformatPlugin';
import { mockPlugin } from '@udecode/plate-common';
import { jsx } from '@udecode/plate-test-utils';
import { withReact } from 'slate-react';

import { withAutoformat } from '../../../withAutoformat';

jsx;

describe('when -space', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
/** @jsx jsx */

import { withAutoformat } from '@/packages/autoformat/src/withAutoformat';
import { autoformatPlugin } from '@/plate/demo/plugins/autoformatPlugin';
import { mockPlugin } from '@udecode/plate-common';
import { jsx } from '@udecode/plate-test-utils';
import { withReact } from 'slate-react';

import { withAutoformat } from '../../../withAutoformat';

jsx;

const input = (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/** @jsx jsx */

import { AutoformatPlugin } from '@/packages/autoformat/src/types';
import { withAutoformat } from '@/packages/autoformat/src/withAutoformat';
import {
getEditorString,
insertText,
Expand All @@ -12,6 +10,9 @@ import { ELEMENT_LINK } from '@udecode/plate-link';
import { jsx } from '@udecode/plate-test-utils';
import { withReact } from 'slate-react';

import { AutoformatPlugin } from '../../../types';
import { withAutoformat } from '../../../withAutoformat';

jsx;

const input = (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
/** @jsx jsx */

import { withAutoformat } from '@/packages/autoformat/src/withAutoformat';
import { autoformatPlugin } from '@/plate/demo/plugins/autoformatPlugin';
import { MARK_ITALIC } from '@udecode/plate-basic-marks/src/createItalicPlugin';
import { mockPlugin } from '@udecode/plate-common';
import { jsx } from '@udecode/plate-test-utils';
import { withReact } from 'slate-react';

import { withAutoformat } from '../../withAutoformat';

jsx;

describe('when ignoreTrim is true', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
/** @jsx jsx */

import { withAutoformat } from '@/packages/autoformat/src/withAutoformat';
import { autoformatPlugin } from '@/plate/demo/plugins/autoformatPlugin';
import { mockPlugin } from '@udecode/plate-common';
import { jsx } from '@udecode/plate-test-utils';
import { withReact } from 'slate-react';

import { withAutoformat } from '../../withAutoformat';

jsx;

describe('when the start match is not present and the end match is present', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
/** @jsx jsx */

import { withAutoformat } from '@/packages/autoformat/src/withAutoformat';
import { autoformatPlugin } from '@/plate/demo/plugins/autoformatPlugin';
import { mockPlugin } from '@udecode/plate-common';
import { jsx } from '@udecode/plate-test-utils';
import { withReact } from 'slate-react';

import { withAutoformat } from '../../../withAutoformat';

jsx;

const input = (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
/** @jsx jsx */

import { withAutoformat } from '@/packages/autoformat/src/withAutoformat';
import { autoformatPlugin } from '@/plate/demo/plugins/autoformatPlugin';
import { mockPlugin } from '@udecode/plate-common';
import { jsx } from '@udecode/plate-test-utils';
import { withReact } from 'slate-react';

import { withAutoformat } from '../../../withAutoformat';

jsx;

const input = (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
/** @jsx jsx */

import { withAutoformat } from '@/packages/autoformat/src/withAutoformat';
import { autoformatPlugin } from '@/plate/demo/plugins/autoformatPlugin';
import { mockPlugin } from '@udecode/plate-common';
import { jsx } from '@udecode/plate-test-utils';
import { withReact } from 'slate-react';

import { withAutoformat } from '../../../withAutoformat';

jsx;

const input = (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/** @jsx jsx */

import { withAutoformat } from '@/packages/autoformat/src/withAutoformat';
import { autoformatPlugin } from '@/plate/demo/plugins/autoformatPlugin';
import { MARK_BOLD } from '@udecode/plate-basic-marks/src/createBoldPlugin';
import { MARK_ITALIC } from '@udecode/plate-basic-marks/src/createItalicPlugin';
Expand All @@ -9,6 +8,8 @@ import { mockPlugin } from '@udecode/plate-common';
import { jsx } from '@udecode/plate-test-utils';
import { withReact } from 'slate-react';

import { withAutoformat } from '../../../withAutoformat';

jsx;

describe('when inserting ***', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
/** @jsx jsx */

import { withAutoformat } from '@/packages/autoformat/src/withAutoformat';
import { autoformatPlugin } from '@/plate/demo/plugins/autoformatPlugin';
import { mockPlugin } from '@udecode/plate-common';
import { jsx } from '@udecode/plate-test-utils';
import { withReact } from 'slate-react';

import { withAutoformat } from '../../../withAutoformat';

jsx;

const input = (
Expand Down
11 changes: 7 additions & 4 deletions packages/autoformat/src/__tests__/withAutoformat/markup.spec.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
/** @jsx jsx */

import { createAutoformatPlugin } from '@/packages/autoformat/src/createAutoformatPlugin';
import { MARK_BOLD } from '@/packages/basic-marks/src/createBoldPlugin';
import { MARK_ITALIC } from '@/packages/basic-marks/src/createItalicPlugin';
import { MARK_UNDERLINE } from '@/packages/basic-marks/src/createUnderlinePlugin';
import {
MARK_BOLD,
MARK_ITALIC,
MARK_UNDERLINE,
} from '@udecode/plate-basic-marks';
import { createPlateEditor } from '@udecode/plate-common';
import { jsx } from '@udecode/plate-test-utils';

import { createAutoformatPlugin } from '../../createAutoformatPlugin';

jsx;

describe('when match is an array', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
/** @jsx jsx */

import { withAutoformat } from '@/packages/autoformat/src/withAutoformat';
import { autoformatPlugin } from '@/plate/demo/plugins/autoformatPlugin';
import { mockPlugin } from '@udecode/plate-common';
import { jsx } from '@udecode/plate-test-utils';
import { withReact } from 'slate-react';

import { withAutoformat } from '../../withAutoformat';

jsx;

describe('when --space', () => {
Expand Down
19 changes: 11 additions & 8 deletions packages/autoformat/src/__tests__/withAutoformat/trigger.spec.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
/** @jsx jsx */

import {
KEY_AUTOFORMAT,
createAutoformatPlugin,
} from '@/packages/autoformat/src/createAutoformatPlugin';
import { onKeyDownAutoformat } from '@/packages/autoformat/src/onKeyDownAutoformat';
import { AutoformatPlugin } from '@/packages/autoformat/src/types';
import { MARK_BOLD } from '@/packages/basic-marks/src/createBoldPlugin';
import { MARK_ITALIC } from '@/packages/basic-marks/src/createItalicPlugin';
import { MARK_UNDERLINE } from '@/packages/basic-marks/src/createUnderlinePlugin';
MARK_BOLD,
MARK_ITALIC,
MARK_UNDERLINE,
} from '@udecode/plate-basic-marks';
import { createPlateEditor, getPlugin } from '@udecode/plate-common';
import { jsx } from '@udecode/plate-test-utils';

import {
createAutoformatPlugin,
KEY_AUTOFORMAT,
} from '../../createAutoformatPlugin';
import { onKeyDownAutoformat } from '../../onKeyDownAutoformat';
import { AutoformatPlugin } from '../../types';

jsx;

const input = (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
/** @jsx jsx */

import { onKeyDownExitBreak } from '@/packages/break/src/exit-break/onKeyDownExitBreak';
import { mockPlugin } from '@udecode/plate-common';
import { jsx } from '@udecode/plate-test-utils';
import * as isHotkey from 'is-hotkey';

import { onKeyDownExitBreak } from '../../onKeyDownExitBreak';

jsx;

const input = (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
/** @jsx jsx */

import { onKeyDownExitBreak } from '@/packages/break/src/exit-break/onKeyDownExitBreak';
import { mockPlugin } from '@udecode/plate-common';
import { jsx } from '@udecode/plate-test-utils';

import { onKeyDownExitBreak } from '../../onKeyDownExitBreak';

jsx;

const input = (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
/** @jsx jsx */

import { onKeyDownExitBreak } from '@/packages/break/src/exit-break/onKeyDownExitBreak';
import { ELEMENT_H1 } from '@/packages/heading/src/constants';
import { mockPlugin } from '@udecode/plate-common';
import { ELEMENT_H1 } from '@udecode/plate-heading';
import { jsx } from '@udecode/plate-test-utils';
import * as isHotkey from 'is-hotkey';

import { onKeyDownExitBreak } from '../../onKeyDownExitBreak';

jsx;

const input = (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
/** @jsx jsx */

import { onKeyDownExitBreak } from '@/packages/break/src/exit-break/onKeyDownExitBreak';
import { mockPlugin } from '@udecode/plate-common';
import { jsx } from '@udecode/plate-test-utils';
import * as isHotkey from 'is-hotkey';

import { onKeyDownExitBreak } from '../../onKeyDownExitBreak';

jsx;

const input = (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
/** @jsx jsx */

import { onKeyDownExitBreak } from '@/packages/break/src/exit-break/onKeyDownExitBreak';
import { mockPlugin } from '@udecode/plate-common';
import { jsx } from '@udecode/plate-test-utils';
import * as isHotkey from 'is-hotkey';

import { onKeyDownExitBreak } from '../../onKeyDownExitBreak';

jsx;

const input = (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
/** @jsx jsx */

import { onKeyDownExitBreak } from '@/packages/break/src/exit-break/onKeyDownExitBreak';
import { mockPlugin } from '@udecode/plate-common';
import { jsx } from '@udecode/plate-test-utils';
import * as isHotkey from 'is-hotkey';

import { onKeyDownExitBreak } from '../../onKeyDownExitBreak';

jsx;

const input = (
Expand Down
Loading

0 comments on commit 8b3fc7d

Please sign in to comment.