Skip to content

Commit

Permalink
Merge branch 'ci/templates'
Browse files Browse the repository at this point in the history
  • Loading branch information
zbeyens committed Nov 1, 2024
2 parents 4db7227 + 60720a8 commit 462e7fb
Show file tree
Hide file tree
Showing 79 changed files with 1,291 additions and 656 deletions.
1 change: 0 additions & 1 deletion packages/ai/src/react/copilot/utils/getNextWord.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ export const getNextWord: GetNextWord = ({ text }) => {
} else {
// For non-CJK text (including mixed content), match until space or CJK char
const match =
// eslint-disable-next-line regexp/no-unused-capturing-group
/^(\s*\S+?)(?=[\s\u1100-\u11FF\u3040-\u30FF\u3400-\u4DBF\u4E00-\u9FFF\uAC00-\uD7AF\uF900-\uFAFF]|$)/.exec(
text
);
Expand Down
2 changes: 1 addition & 1 deletion packages/alignment/src/lib/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
*/

export * from './BaseAlignPlugin';
export * from './types';
export type * from './types';
export * from './transforms/index';
2 changes: 1 addition & 1 deletion packages/autoformat/src/lib/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/

export * from './BaseAutoformatPlugin';
export * from './types';
export type * from './types';
export * from './withAutoformat';
export * from './rules/index';
export * from './transforms/index';
Expand Down
2 changes: 1 addition & 1 deletion packages/break/src/lib/exit-break/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
*/

export * from './BaseExitBreakPlugin';
export * from './types';
export type * from './types';
export * from './queries/index';
export * from './transforms/index';
2 changes: 1 addition & 1 deletion packages/caption/src/lib/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
*/

export * from './BaseCaptionPlugin';
export * from './TCaptionElement';
export type * from './TCaptionElement';
export * from './withCaption';
2 changes: 1 addition & 1 deletion packages/cloud/src/attachment/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
*/

export * from './CloudAttachmentPlugin';
export * from './types';
export type * from './types';
export * from './useCloudAttachmentElementState';
2 changes: 1 addition & 1 deletion packages/cloud/src/cloud/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ export * from './generateSrcAndSrcSet';
export * from './getInProgressUploads';
export * from './getSaveValue';
export * from './handlers';
export * from './types';
export type * from './types';
export * from './uploadFiles';
2 changes: 1 addition & 1 deletion packages/cloud/src/image/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
*/

export * from './CloudImagePlugin';
export * from './types';
export type * from './types';
export * from './useCloudImageElementState';
2 changes: 1 addition & 1 deletion packages/cloud/src/upload/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
*/

export * from './createUploadStore';
export * from './types';
export type * from './types';
export * from './useUpload';
2 changes: 1 addition & 1 deletion packages/code-block/src/lib/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export * from './BaseCodeBlockPlugin';
export * from './decorateCodeLine';
export * from './htmlDeserializerCodeBlock';
export * from './insertFragmentCodeBlock';
export * from './types';
export type * from './types';
export * from './withCodeBlock';
export * from './normalizers/index';
export * from './queries/index';
Expand Down
2 changes: 1 addition & 1 deletion packages/combobox/src/lib/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
* @file Automatically generated by barrelsby.
*/

export * from './types';
export type * from './types';
export * from './withTriggerCombobox';
export * from './utils/index';
6 changes: 3 additions & 3 deletions packages/combobox/src/lib/utils/filterWords.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ export const filterWords = (
return needleWords[quantifier]((needleWord, i) => {
const allowPrefix = (() => {
switch (prefixMode) {
case 'none': {
return false;
}
case 'all-words': {
return true;
}
case 'last-word': {
return i === needleWords.length - 1;
}
case 'none': {
return false;
}
}
})();

Expand Down
2 changes: 1 addition & 1 deletion packages/comments/src/lib/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/

export * from './BaseCommentsPlugin';
export * from './types';
export type * from './types';
export * from './withComments';
export * from './queries/index';
export * from './transforms/index';
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/lib/editor/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
* @file Automatically generated by barrelsby.
*/

export * from './SlateEditor';
export type * from './SlateEditor';
export * from './withSlate';
2 changes: 1 addition & 1 deletion packages/core/src/lib/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ export * from './libs/index';
export * from './plugin/index';
export * from './plugins/index';
export * from './transforms/index';
export * from './types/index';
export type * from './types/index';
export * from './utils/index';
6 changes: 3 additions & 3 deletions packages/core/src/lib/plugin/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
* @file Automatically generated by barrelsby.
*/

export * from './BasePlugin';
export * from './HandlerReturnType';
export * from './SlatePlugin';
export type * from './BasePlugin';
export type * from './HandlerReturnType';
export type * from './SlatePlugin';
export * from './createSlatePlugin';
export * from './getEditorPlugin';
export * from './getSlatePlugin';
2 changes: 1 addition & 1 deletion packages/core/src/lib/plugins/html/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@

export * from './HtmlPlugin';
export * from './constants';
export * from './types';
export type * from './types';
export * from './utils/index';
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ export * from './collapseWhiteSpaceText';
export * from './inferWhiteSpaceRule';
export * from './isLastNonEmptyTextOfInlineFormattingContext';
export * from './stateTransforms';
export * from './types';
export type * from './types';
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ export const inferWhiteSpaceRule = (
const whiteSpaceProperty = element.style.whiteSpace;

switch (whiteSpaceProperty) {
case 'break-spaces':
case 'pre':
case 'pre-wrap': {
return 'pre';
}
case 'normal':
case 'nowrap': {
return 'normal';
}
case 'pre':
case 'pre-wrap':
case 'break-spaces': {
return 'pre';
}
case 'pre-line': {
return 'pre-line';
}
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/lib/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
* @file Automatically generated by barrelsby.
*/

export * from './misc/index';
export type * from './misc/index';
6 changes: 3 additions & 3 deletions packages/core/src/lib/types/misc/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
* @file Automatically generated by barrelsby.
*/

export * from './NoInfer';
export * from './Nullable';
export * from './types';
export type * from './NoInfer';
export type * from './Nullable';
export type * from './types';
12 changes: 6 additions & 6 deletions packages/core/src/react/editor/PlateEditor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,21 +34,21 @@ export type PlateEditor = {
C extends AnyPluginConfig,
K extends keyof InferOptions<C>,
F extends InferOptions<C>[K],
Args extends Parameters<((...args: any[]) => any) & F>,
>(
plugin: WithRequiredKey<C>,
optionKey: K,
...args: Args
): F extends (...args: any[]) => any ? ReturnType<F> : F;
optionKey: K
): F extends (...args: any[]) => any ? never : F;

<
C extends AnyPluginConfig,
K extends keyof InferOptions<C>,
F extends InferOptions<C>[K],
Args extends Parameters<((...args: any[]) => any) & F>,
>(
plugin: WithRequiredKey<C>,
optionKey: K
): F extends (...args: any[]) => any ? never : F;
optionKey: K,
...args: Args
): F extends (...args: any[]) => any ? ReturnType<F> : F;
};

useOptions: {
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/react/editor/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* @file Automatically generated by barrelsby.
*/

export * from './PlateEditor';
export type * from './PlateEditor';
export * from './getPlateCorePlugins';
export * from './usePlateEditor';
export * from './withPlate';
12 changes: 6 additions & 6 deletions packages/core/src/react/plugin/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
* @file Automatically generated by barrelsby.
*/

export * from './DOMHandlers';
export * from './KeyboardHandler';
export * from './PlatePlugin';
export * from './PlateRenderElementProps';
export * from './PlateRenderLeafProps';
export * from './PlateRenderNodeProps';
export type * from './DOMHandlers';
export type * from './KeyboardHandler';
export type * from './PlatePlugin';
export type * from './PlateRenderElementProps';
export type * from './PlateRenderLeafProps';
export type * from './PlateRenderNodeProps';
export * from './createPlatePlugin';
export * from './getEditorPlugin';
export * from './getPlugin';
Expand Down
2 changes: 1 addition & 1 deletion packages/cursor/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* @file Automatically generated by barrelsby.
*/

export * from './types';
export type * from './types';
export * from './components/index';
export * from './hooks/index';
export * from './queries/index';
12 changes: 6 additions & 6 deletions packages/diff/src/internal/transforms/transformDiffTexts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,12 +138,6 @@ function slateTextDiff(
const text = chunk[1]; // The text associated with this diff chunk

switch (op as any) {
case 0: {
// For unchanged text, just move the offset forward
offset += text.length;

break;
}
case -1: {
// For deletions, add a remove_text operation
operations.push({
Expand All @@ -157,6 +151,12 @@ function slateTextDiff(

break;
}
case 0: {
// For unchanged text, just move the offset forward
offset += text.length;

break;
}
case 1: {
// For insertions, add an insert_text operation
operations.push({
Expand Down
14 changes: 7 additions & 7 deletions packages/diff/src/internal/utils/with-change-tracking.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,18 +76,13 @@ const applyWithChangeTracking = <E extends BaseEditor>(

break;
}
case 'remove_text': {
applyRemoveText(editor, apply, op);

break;
}
case 'merge_node': {
applyMergeNode(editor, apply, op);

break;
}
case 'split_node': {
applySplitNode(editor, apply, op);
case 'remove_text': {
applyRemoveText(editor, apply, op);

break;
}
Expand All @@ -96,6 +91,11 @@ const applyWithChangeTracking = <E extends BaseEditor>(

break;
}
case 'split_node': {
applySplitNode(editor, apply, op);

break;
}

default: {
apply(op);
Expand Down
2 changes: 1 addition & 1 deletion packages/diff/src/lib/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
*/

export * from './computeDiff';
export * from './types';
export type * from './types';
export * from './withGetFragmentExcludeDiff';
2 changes: 1 addition & 1 deletion packages/dnd/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/

export * from './DndPlugin';
export * from './types';
export type * from './types';
export * from './components/index';
export * from './hooks/index';
export * from './queries/index';
Expand Down
2 changes: 1 addition & 1 deletion packages/docx/src/lib/docx-cleaner/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
*/

export * from './cleanDocx';
export * from './types';
export type * from './types';
export * from './utils/index';
2 changes: 1 addition & 1 deletion packages/emoji/src/lib/utils/EmojiLibrary/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
*/

export * from './EmojiInlineLibrary';
export * from './EmojiLibrary.types';
export type * from './EmojiLibrary.types';
2 changes: 1 addition & 1 deletion packages/emoji/src/lib/utils/Grid/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
*/

export * from './Grid';
export * from './Grid.types';
export type * from './Grid.types';
export * from './GridSection';
2 changes: 1 addition & 1 deletion packages/emoji/src/react/utils/EmojiLibrary/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
export * from './EmojiFloatingGrid';
export * from './EmojiFloatingGridBuilder';
export * from './EmojiFloatingLibrary';
export * from './EmojiFloatingLibrary.types';
export type * from './EmojiFloatingLibrary.types';
Loading

0 comments on commit 462e7fb

Please sign in to comment.