Skip to content

Commit

Permalink
fix: default export (#1505)
Browse files Browse the repository at this point in the history
  • Loading branch information
splincode authored Oct 4, 2024
1 parent c225ec8 commit 8c7efd6
Show file tree
Hide file tree
Showing 11 changed files with 26 additions and 46 deletions.
4 changes: 1 addition & 3 deletions projects/demo/src/app/pages/checkbox/examples/1/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@ import {
provide: TUI_EDITOR_EXTENSIONS,
useValue: [
import('@taiga-ui/editor').then(({TuiStarterKit}) => TuiStarterKit),
import('@tiptap/extension-text-style').then(
({default: TextStyle}) => TextStyle,
),
import('@tiptap/extension-text-style').then(({TextStyle}) => TextStyle),
],
},
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ import {CustomColorPicker} from './custom-color-picker';
provide: TUI_EDITOR_EXTENSIONS,
useValue: [
import('@taiga-ui/editor').then(({TuiStarterKit}) => TuiStarterKit),
import('@tiptap/extension-text-style').then(
({default: TextStyle}) => TextStyle,
),
import('@tiptap/extension-text-style').then(({TextStyle}) => TextStyle),
import('@taiga-ui/editor').then(({TuiFontColor}) => TuiFontColor),
import('@taiga-ui/editor').then(
({TuiBackgroundColor}) => TuiBackgroundColor,
Expand Down
24 changes: 7 additions & 17 deletions projects/demo/src/app/pages/focus/examples/1/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,14 @@ import {
.then((extension) =>
extension.configure({heading: {levels: [1, 2]}}),
),
import('@tiptap/extension-text-align').then(({default: TextAlign}) =>
import('@tiptap/extension-text-align').then(({TextAlign}) =>
TextAlign.configure({types: ['heading', 'paragraph']}),
),
import('@tiptap/extension-text-style').then(
({default: TextStyle}) => TextStyle,
),
import('@tiptap/extension-underline').then(
({default: Underline}) => Underline,
),
import('@tiptap/extension-subscript').then(
({default: Subscript}) => Subscript,
),
import('@tiptap/extension-text-style').then(({TextStyle}) => TextStyle),
import('@tiptap/extension-underline').then(({Underline}) => Underline),
import('@tiptap/extension-subscript').then(({Subscript}) => Subscript),
import('@tiptap/extension-superscript').then(
({default: Superscript}) => Superscript,
({Superscript}) => Superscript,
),
import('@taiga-ui/editor').then(({TuiFontColor}) => TuiFontColor),
import('@taiga-ui/editor').then(({TuiLink}) => TuiLink),
Expand All @@ -48,12 +42,8 @@ import {
import('@taiga-ui/editor').then(({TuiTable}) =>
TuiTable.configure({resizable: true}),
),
import('@tiptap/extension-table-row').then(
({default: TableRow}) => TableRow,
),
import('@tiptap/extension-table-cell').then(
({default: TableCell}) => TableCell,
),
import('@tiptap/extension-table-row').then(({TableRow}) => TableRow),
import('@tiptap/extension-table-cell').then(({TableCell}) => TableCell),
import('@tiptap/extension-table-header').then(
({TableHeader}) => TableHeader,
),
Expand Down
6 changes: 2 additions & 4 deletions projects/demo/src/app/pages/font/examples/1/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,8 @@ import {mergeAttributes} from '@tiptap/core';
import('@taiga-ui/editor').then(({TuiStarterKit}) =>
TuiStarterKit.configure({heading: false}),
),
import('@tiptap/extension-text-style').then(
({default: TextStyle}) => TextStyle,
),
import('@tiptap/extension-heading').then(({default: Heading}) =>
import('@tiptap/extension-text-style').then(({TextStyle}) => TextStyle),
import('@tiptap/extension-heading').then(({Heading}) =>
Heading.configure({levels: [1, 2, 3, 4, 5, 6]})
// @note: if you want to add custom css classes
// then you need customize Heading extension
Expand Down
4 changes: 1 addition & 3 deletions projects/demo/src/app/pages/font/examples/2/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@ import {
provide: TUI_EDITOR_EXTENSIONS,
useValue: [
import('@taiga-ui/editor').then(({TuiStarterKit}) => TuiStarterKit),
import('@tiptap/extension-text-style').then(
({default: TextStyle}) => TextStyle,
),
import('@tiptap/extension-text-style').then(({TextStyle}) => TextStyle),
import('@taiga-ui/editor').then(
({TuiFontSizeExtension}) => TuiFontSizeExtension,
),
Expand Down
4 changes: 1 addition & 3 deletions projects/demo/src/app/pages/font/examples/3/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@ import {ExampleTuiFontSizeTool} from './font-size-tool';
provide: TUI_EDITOR_EXTENSIONS,
useValue: [
import('@taiga-ui/editor').then(({TuiStarterKit}) => TuiStarterKit),
import('@tiptap/extension-text-style').then(
({default: TextStyle}) => TextStyle,
),
import('@tiptap/extension-text-style').then(({TextStyle}) => TextStyle),
import('@taiga-ui/editor').then(
({TuiFontSizeExtension}) => TuiFontSizeExtension,
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,10 @@ import {
provide: TUI_EDITOR_EXTENSIONS,
useValue: [
import('@taiga-ui/editor').then(({TuiStarterKit}) => TuiStarterKit),
import('@tiptap/extension-text-align').then(({default: TextAlign}) =>
import('@tiptap/extension-text-align').then(({TextAlign}) =>
TextAlign.configure({types: ['heading', 'paragraph']}),
),
import('@tiptap/extension-text-style').then(
({default: TextStyle}) => TextStyle,
),
import('@tiptap/extension-text-style').then(({TextStyle}) => TextStyle),
import('@tiptap/extension-highlight').then(({Highlight}) =>
Highlight.configure({
multicolor: true,
Expand Down
4 changes: 1 addition & 3 deletions projects/demo/src/app/pages/mention/examples/1/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@ import {Mentions} from './mention';
useValue: [
import('@taiga-ui/editor').then(({TuiStarterKit}) => TuiStarterKit),
import('@taiga-ui/editor').then(({TuiLink}) => TuiLink),
import('@tiptap/extension-text-style').then(
({default: TextStyle}) => TextStyle,
),
import('@tiptap/extension-text-style').then(({TextStyle}) => TextStyle),
import('@taiga-ui/editor').then(({TuiMention}) => TuiMention),
],
},
Expand Down
10 changes: 7 additions & 3 deletions projects/editor/extensions/font-size/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import {Extension} from '@tiptap/core';
import type * as ExtensionTextStyleType from '@tiptap/extension-text-style';

export type {ExtensionTextStyleType};

declare module '@tiptap/core' {
interface Commands<ReturnType> {
Expand All @@ -15,6 +12,13 @@ declare module '@tiptap/core' {
*/
unsetFontSize: () => ReturnType;
};
textStyle: {
/**
* Remove spans without inline style attributes.
* @example editor.commands.removeEmptyTextStyle()
*/
removeEmptyTextStyle: () => ReturnType;
};
}
}

Expand Down
2 changes: 1 addition & 1 deletion projects/editor/extensions/table-cell/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {mergeAttributes} from '@tiptap/core';
import TableCell from '@tiptap/extension-table-cell';
import {TableCell} from '@tiptap/extension-table-cell';

export const TuiTableCell = TableCell.extend({
renderHTML({HTMLAttributes}) {
Expand Down
4 changes: 2 additions & 2 deletions projects/editor/extensions/youtube/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import YoutubeExtension from '@tiptap/extension-youtube';
import {Youtube} from '@tiptap/extension-youtube';

export const TuiYoutube = YoutubeExtension.extend({}).configure({
export const TuiYoutube = Youtube.extend({}).configure({
autoplay: false,
ccLanguage: 'en',
interfaceLanguage: 'en',
Expand Down

0 comments on commit 8c7efd6

Please sign in to comment.