@frontify/fondue 12.0.0-beta.254 → 12.0.0-beta.256

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,2 @@
1
- import { MentionPlugin, PlatePlugin } from '@udecode/plate';
2
- import { MentionItemData } from './types';
3
- export declare const mentionPlugin: Partial<PlatePlugin<MentionPlugin<MentionItemData>>>;
1
+ import { MentionItemData, MentionPlugin } from './types';
2
+ export declare const mentionPlugin: MentionPlugin<MentionItemData>;
@@ -1 +1 @@
1
- {"version":3,"file":"config.es.js","sources":["../../../../../src/components/RichTextEditor/Plugins/MentionPlugin/config.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { MentionPlugin, PlatePlugin } from '@udecode/plate';\nimport { MentionItemData } from './types';\n\nexport const mentionPlugin: Partial<PlatePlugin<MentionPlugin<MentionItemData>>> = {\n options: {\n trigger: '@',\n createMentionNode: (item) => ({\n value: item.text,\n category: item.data.category,\n id: item.data.id,\n }),\n },\n};\n"],"names":["mentionPlugin","item"],"mappings":"AAKO,MAAMA,IAAsE;AAAA,EAC/E,SAAS;AAAA,IACL,SAAS;AAAA,IACT,mBAAmB,CAACC,OAAU;AAAA,MAC1B,OAAOA,EAAK;AAAA,MACZ,UAAUA,EAAK,KAAK;AAAA,MACpB,IAAIA,EAAK,KAAK;AAAA,IAAA;AAAA,EAEtB;AACJ;"}
1
+ {"version":3,"file":"config.es.js","sources":["../../../../../src/components/RichTextEditor/Plugins/MentionPlugin/config.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { MentionItemData, MentionPlugin } from './types';\n\nexport const mentionPlugin: MentionPlugin<MentionItemData> = {\n options: {\n trigger: '@',\n createMentionNode: (item) => ({\n value: item.text,\n category: item.data.category,\n id: item.data.id,\n }),\n },\n};\n"],"names":["mentionPlugin","item"],"mappings":"AAIO,MAAMA,IAAgD;AAAA,EACzD,SAAS;AAAA,IACL,SAAS;AAAA,IACT,mBAAmB,CAACC,OAAU;AAAA,MAC1B,OAAOA,EAAK;AAAA,MACZ,UAAUA,EAAK,KAAK;AAAA,MACpB,IAAIA,EAAK,KAAK;AAAA,IAAA;AAAA,EAEtB;AACJ;"}
@@ -1,4 +1,4 @@
1
- import { TComboboxItemWithData } from '@udecode/plate';
1
+ import { CreateMentionNode, Data, NoData, TComboboxItemWithData, WithOverride } from '@udecode/plate';
2
2
  import { PluginProps } from '../Plugin';
3
3
  export declare enum MentionableCategory {
4
4
  GROUP = "group",
@@ -16,3 +16,10 @@ export type MentionPluginProps = PluginProps & {
16
16
  mentionableItems: MentionableItems;
17
17
  };
18
18
  export type MappedMentionableItems = Map<string, string>;
19
+ export interface MentionPlugin<TData extends Data = NoData> {
20
+ withOverrides?: WithOverride;
21
+ options: {
22
+ trigger: string;
23
+ createMentionNode?: CreateMentionNode<TData>;
24
+ };
25
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"types.es.js","sources":["../../../../../src/components/RichTextEditor/Plugins/MentionPlugin/types.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { TComboboxItemWithData } from '@udecode/plate';\nimport { PluginProps } from '../Plugin';\n\nexport enum MentionableCategory {\n GROUP = 'group',\n ALL = 'all',\n USER = 'user',\n}\n\nexport type MentionItemData = {\n id: string;\n category: MentionableCategory;\n image?: string;\n};\n\nexport type MentionableItem = TComboboxItemWithData<MentionItemData>;\n\nexport type MentionableItems = MentionableItem[];\n\nexport type MentionPluginProps = PluginProps & {\n mentionableItems: MentionableItems;\n};\n\nexport type MappedMentionableItems = Map<string, string>;\n"],"names":["MentionableCategory"],"mappings":"AAKY,IAAAA,sBAAAA,OACRA,EAAA,QAAQ,SACRA,EAAA,MAAM,OACNA,EAAA,OAAO,QAHCA,IAAAA,KAAA,CAAA,CAAA;"}
1
+ {"version":3,"file":"types.es.js","sources":["../../../../../src/components/RichTextEditor/Plugins/MentionPlugin/types.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { CreateMentionNode, Data, NoData, TComboboxItemWithData, WithOverride } from '@udecode/plate';\nimport { PluginProps } from '../Plugin';\n\nexport enum MentionableCategory {\n GROUP = 'group',\n ALL = 'all',\n USER = 'user',\n}\n\nexport type MentionItemData = {\n id: string;\n category: MentionableCategory;\n image?: string;\n};\n\nexport type MentionableItem = TComboboxItemWithData<MentionItemData>;\n\nexport type MentionableItems = MentionableItem[];\n\nexport type MentionPluginProps = PluginProps & {\n mentionableItems: MentionableItems;\n};\n\nexport type MappedMentionableItems = Map<string, string>;\n\nexport interface MentionPlugin<TData extends Data = NoData> {\n withOverrides?: WithOverride;\n options: {\n trigger: string;\n createMentionNode?: CreateMentionNode<TData>;\n };\n}\n"],"names":["MentionableCategory"],"mappings":"AAKY,IAAAA,sBAAAA,OACRA,EAAA,QAAQ,SACRA,EAAA,MAAM,OACNA,EAAA,OAAO,QAHCA,IAAAA,KAAA,CAAA,CAAA;"}
@@ -1,4 +1,4 @@
1
- import { AnyObject, PlatePlugin } from '@udecode/plate';
1
+ import { PlatePlugin } from '@udecode/plate';
2
2
  import { InlineData, PluginButton } from './types';
3
3
  import { Position } from '../EditorPositioningWrapper';
4
4
  import type { MarkupElement } from './MarkupElement';
@@ -28,5 +28,5 @@ export declare abstract class Plugin<P extends PluginProps = PluginProps> {
28
28
  readonly styles?: CSSProperties;
29
29
  constructor(id: string, rest?: P);
30
30
  inline(): InlineData | undefined;
31
- abstract plugins(): PlatePlugin<AnyObject>[];
31
+ abstract plugins(): PlatePlugin[];
32
32
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Plugin.es.js","sources":["../../../../src/components/RichTextEditor/Plugins/Plugin.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { AnyObject, PlatePlugin } from '@udecode/plate';\nimport { InlineData, PluginButton } from './types';\nimport { Position } from '../EditorPositioningWrapper';\nimport type { MarkupElement } from './MarkupElement';\nimport { CSSProperties } from 'react';\n\nexport type PluginProps = {\n id?: string;\n button?: PluginButton;\n markupElement?: MarkupElement;\n markupInputElement?: MarkupElement;\n leafMarkupElements?: MarkupElement | MarkupElement[];\n showIn?: Position[];\n columns?: number;\n gap?: string | number;\n label?: string;\n textStyles?: Plugin<PluginProps>[];\n styles?: CSSProperties;\n};\n\nexport abstract class Plugin<P extends PluginProps = PluginProps> {\n readonly id: string;\n readonly button?: PluginButton;\n readonly markupElement?: MarkupElement;\n readonly markupInputElement?: MarkupElement;\n readonly leafMarkupElements?: MarkupElement | MarkupElement[];\n readonly showIn: Position[];\n readonly props?: P;\n readonly textStyles?: Plugin<PluginProps>[];\n readonly styles?: CSSProperties;\n\n constructor(id: string, rest?: P) {\n this.id = rest?.id || id;\n this.button = rest?.button;\n this.markupElement = rest?.markupElement;\n this.markupInputElement = rest?.markupInputElement;\n this.leafMarkupElements = rest?.leafMarkupElements;\n this.showIn = rest?.showIn ?? [Position.BOTTOM, Position.TOP, Position.FLOATING];\n this.props = rest;\n }\n\n inline(): InlineData | undefined {\n return undefined;\n }\n\n abstract plugins(): PlatePlugin<AnyObject>[];\n}\n"],"names":["Plugin","id","rest","__publicField","Position"],"mappings":";;;;AAsBO,MAAeA,EAA4C;AAAA,EAW9D,YAAYC,GAAYC,GAAU;AAVzB,IAAAC,EAAA;AACA,IAAAA,EAAA;AACA,IAAAA,EAAA;AACA,IAAAA,EAAA;AACA,IAAAA,EAAA;AACA,IAAAA,EAAA;AACA,IAAAA,EAAA;AACA,IAAAA,EAAA;AACA,IAAAA,EAAA;AAGA,SAAA,MAAKD,KAAA,gBAAAA,EAAM,OAAMD,GACtB,KAAK,SAASC,KAAA,gBAAAA,EAAM,QACpB,KAAK,gBAAgBA,KAAA,gBAAAA,EAAM,eAC3B,KAAK,qBAAqBA,KAAA,gBAAAA,EAAM,oBAChC,KAAK,qBAAqBA,KAAA,gBAAAA,EAAM,oBAC3B,KAAA,UAASA,KAAA,gBAAAA,EAAM,WAAU,CAACE,EAAS,QAAQA,EAAS,KAAKA,EAAS,QAAQ,GAC/E,KAAK,QAAQF;AAAA,EACjB;AAAA,EAEA,SAAiC;AAAA,EAEjC;AAGJ;"}
1
+ {"version":3,"file":"Plugin.es.js","sources":["../../../../src/components/RichTextEditor/Plugins/Plugin.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { PlatePlugin } from '@udecode/plate';\nimport { InlineData, PluginButton } from './types';\nimport { Position } from '../EditorPositioningWrapper';\nimport type { MarkupElement } from './MarkupElement';\nimport { CSSProperties } from 'react';\n\nexport type PluginProps = {\n id?: string;\n button?: PluginButton;\n markupElement?: MarkupElement;\n markupInputElement?: MarkupElement;\n leafMarkupElements?: MarkupElement | MarkupElement[];\n showIn?: Position[];\n columns?: number;\n gap?: string | number;\n label?: string;\n textStyles?: Plugin<PluginProps>[];\n styles?: CSSProperties;\n};\n\nexport abstract class Plugin<P extends PluginProps = PluginProps> {\n readonly id: string;\n readonly button?: PluginButton;\n readonly markupElement?: MarkupElement;\n readonly markupInputElement?: MarkupElement;\n readonly leafMarkupElements?: MarkupElement | MarkupElement[];\n readonly showIn: Position[];\n readonly props?: P;\n readonly textStyles?: Plugin<PluginProps>[];\n readonly styles?: CSSProperties;\n\n constructor(id: string, rest?: P) {\n this.id = rest?.id || id;\n this.button = rest?.button;\n this.markupElement = rest?.markupElement;\n this.markupInputElement = rest?.markupInputElement;\n this.leafMarkupElements = rest?.leafMarkupElements;\n this.showIn = rest?.showIn ?? [Position.BOTTOM, Position.TOP, Position.FLOATING];\n this.props = rest;\n }\n\n inline(): InlineData | undefined {\n return undefined;\n }\n\n abstract plugins(): PlatePlugin[];\n}\n"],"names":["Plugin","id","rest","__publicField","Position"],"mappings":";;;;AAsBO,MAAeA,EAA4C;AAAA,EAW9D,YAAYC,GAAYC,GAAU;AAVzB,IAAAC,EAAA;AACA,IAAAA,EAAA;AACA,IAAAA,EAAA;AACA,IAAAA,EAAA;AACA,IAAAA,EAAA;AACA,IAAAA,EAAA;AACA,IAAAA,EAAA;AACA,IAAAA,EAAA;AACA,IAAAA,EAAA;AAGA,SAAA,MAAKD,KAAA,gBAAAA,EAAM,OAAMD,GACtB,KAAK,SAASC,KAAA,gBAAAA,EAAM,QACpB,KAAK,gBAAgBA,KAAA,gBAAAA,EAAM,eAC3B,KAAK,qBAAqBA,KAAA,gBAAAA,EAAM,oBAChC,KAAK,qBAAqBA,KAAA,gBAAAA,EAAM,oBAC3B,KAAA,UAASA,KAAA,gBAAAA,EAAM,WAAU,CAACE,EAAS,QAAQA,EAAS,KAAKA,EAAS,QAAQ,GAC/E,KAAK,QAAQF;AAAA,EACjB;AAAA,EAEA,SAAiC;AAAA,EAEjC;AAGJ;"}