@payloadcms/richtext-lexical 3.0.0-beta.30 → 3.0.0-beta.31

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.
Files changed (73) hide show
  1. package/dist/field/features/align/feature.client.d.ts +4 -1
  2. package/dist/field/features/align/feature.client.d.ts.map +1 -1
  3. package/dist/field/features/blockquote/feature.client.d.ts +4 -1
  4. package/dist/field/features/blockquote/feature.client.d.ts.map +1 -1
  5. package/dist/field/features/blocks/feature.client.d.ts +4 -1
  6. package/dist/field/features/blocks/feature.client.d.ts.map +1 -1
  7. package/dist/field/features/debug/testRecorder/feature.client.d.ts +4 -1
  8. package/dist/field/features/debug/testRecorder/feature.client.d.ts.map +1 -1
  9. package/dist/field/features/debug/treeView/feature.client.d.ts +4 -1
  10. package/dist/field/features/debug/treeView/feature.client.d.ts.map +1 -1
  11. package/dist/field/features/format/bold/feature.client.d.ts +4 -1
  12. package/dist/field/features/format/bold/feature.client.d.ts.map +1 -1
  13. package/dist/field/features/format/inlineCode/feature.client.d.ts +4 -1
  14. package/dist/field/features/format/inlineCode/feature.client.d.ts.map +1 -1
  15. package/dist/field/features/format/italic/feature.client.d.ts +4 -1
  16. package/dist/field/features/format/italic/feature.client.d.ts.map +1 -1
  17. package/dist/field/features/format/strikethrough/feature.client.d.ts +4 -1
  18. package/dist/field/features/format/strikethrough/feature.client.d.ts.map +1 -1
  19. package/dist/field/features/format/subscript/feature.client.d.ts +4 -1
  20. package/dist/field/features/format/subscript/feature.client.d.ts.map +1 -1
  21. package/dist/field/features/format/superscript/feature.client.d.ts +4 -1
  22. package/dist/field/features/format/superscript/feature.client.d.ts.map +1 -1
  23. package/dist/field/features/format/underline/feature.client.d.ts +4 -1
  24. package/dist/field/features/format/underline/feature.client.d.ts.map +1 -1
  25. package/dist/field/features/heading/feature.client.d.ts +4 -1
  26. package/dist/field/features/heading/feature.client.d.ts.map +1 -1
  27. package/dist/field/features/horizontalRule/feature.client.d.ts +4 -1
  28. package/dist/field/features/horizontalRule/feature.client.d.ts.map +1 -1
  29. package/dist/field/features/horizontalRule/feature.server.d.ts.map +1 -1
  30. package/dist/field/features/horizontalRule/feature.server.js +0 -1
  31. package/dist/field/features/horizontalRule/feature.server.js.map +1 -1
  32. package/dist/field/features/indent/feature.client.d.ts +4 -1
  33. package/dist/field/features/indent/feature.client.d.ts.map +1 -1
  34. package/dist/field/features/link/feature.client.d.ts +13 -1
  35. package/dist/field/features/link/feature.client.d.ts.map +1 -1
  36. package/dist/field/features/lists/checklist/feature.client.d.ts +4 -1
  37. package/dist/field/features/lists/checklist/feature.client.d.ts.map +1 -1
  38. package/dist/field/features/lists/orderedList/feature.client.d.ts +4 -1
  39. package/dist/field/features/lists/orderedList/feature.client.d.ts.map +1 -1
  40. package/dist/field/features/lists/unorderedList/feature.client.d.ts +4 -1
  41. package/dist/field/features/lists/unorderedList/feature.client.d.ts.map +1 -1
  42. package/dist/field/features/migrations/lexicalPluginToLexical/feature.client.d.ts +4 -1
  43. package/dist/field/features/migrations/lexicalPluginToLexical/feature.client.d.ts.map +1 -1
  44. package/dist/field/features/migrations/slateToLexical/feature.client.d.ts +4 -1
  45. package/dist/field/features/migrations/slateToLexical/feature.client.d.ts.map +1 -1
  46. package/dist/field/features/paragraph/feature.client.d.ts +4 -1
  47. package/dist/field/features/paragraph/feature.client.d.ts.map +1 -1
  48. package/dist/field/features/relationship/feature.client.d.ts +17 -2
  49. package/dist/field/features/relationship/feature.client.d.ts.map +1 -1
  50. package/dist/field/features/toolbars/fixed/Toolbar/index.scss +19 -9
  51. package/dist/field/features/toolbars/fixed/feature.client.d.ts +4 -1
  52. package/dist/field/features/toolbars/fixed/feature.client.d.ts.map +1 -1
  53. package/dist/field/features/toolbars/fixed/feature.server.d.ts.map +1 -1
  54. package/dist/field/features/toolbars/fixed/feature.server.js +0 -1
  55. package/dist/field/features/toolbars/fixed/feature.server.js.map +1 -1
  56. package/dist/field/features/toolbars/inline/feature.client.d.ts +4 -1
  57. package/dist/field/features/toolbars/inline/feature.client.d.ts.map +1 -1
  58. package/dist/field/features/toolbars/inline/feature.server.d.ts.map +1 -1
  59. package/dist/field/features/toolbars/inline/feature.server.js +0 -1
  60. package/dist/field/features/toolbars/inline/feature.server.js.map +1 -1
  61. package/dist/field/features/toolbars/types.d.ts +2 -2
  62. package/dist/field/features/toolbars/types.d.ts.map +1 -1
  63. package/dist/field/features/toolbars/types.js.map +1 -1
  64. package/dist/field/features/types.d.ts +9 -6
  65. package/dist/field/features/types.d.ts.map +1 -1
  66. package/dist/field/features/types.js.map +1 -1
  67. package/dist/field/features/upload/feature.client.d.ts +4 -1
  68. package/dist/field/features/upload/feature.client.d.ts.map +1 -1
  69. package/dist/field/index.scss +4 -0
  70. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.d.ts +3 -3
  71. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.d.ts.map +1 -1
  72. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js.map +1 -1
  73. package/package.json +9 -9
@@ -1,3 +1,6 @@
1
1
  /// <reference types="react" resolution-mode="require"/>
2
- export declare const AlignFeatureClientComponent: import("react").FC<undefined>;
2
+ export declare const AlignFeatureClientComponent: import("react").FC<{
3
+ featureKey: string;
4
+ order: number;
5
+ }>;
3
6
  //# sourceMappingURL=feature.client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../src/field/features/align/feature.client.tsx"],"names":[],"mappings":";AA8JA,eAAO,MAAM,2BAA2B,+BAA4C,CAAA"}
1
+ {"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../src/field/features/align/feature.client.tsx"],"names":[],"mappings":";AA8JA,eAAO,MAAM,2BAA2B;;;EAA4C,CAAA"}
@@ -1,3 +1,6 @@
1
1
  /// <reference types="react" resolution-mode="require"/>
2
- export declare const BlockquoteFeatureClientComponent: import("react").FC<undefined>;
2
+ export declare const BlockquoteFeatureClientComponent: import("react").FC<{
3
+ featureKey: string;
4
+ order: number;
5
+ }>;
3
6
  //# sourceMappingURL=feature.client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../src/field/features/blockquote/feature.client.tsx"],"names":[],"mappings":";AAkFA,eAAO,MAAM,gCAAgC,+BAAiD,CAAA"}
1
+ {"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../src/field/features/blockquote/feature.client.tsx"],"names":[],"mappings":";AAkFA,eAAO,MAAM,gCAAgC;;;EAAiD,CAAA"}
@@ -3,5 +3,8 @@ import type { ReducedBlock } from '@payloadcms/ui/utilities/buildComponentMap';
3
3
  export type BlocksFeatureClientProps = {
4
4
  reducedBlocks: ReducedBlock[];
5
5
  };
6
- export declare const BlocksFeatureClientComponent: import("react").FC<import("../types.js").ClientComponentProps<BlocksFeatureClientProps>>;
6
+ export declare const BlocksFeatureClientComponent: import("react").FC<{
7
+ featureKey: string;
8
+ order: number;
9
+ } & BlocksFeatureClientProps>;
7
10
  //# sourceMappingURL=feature.client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../src/field/features/blocks/feature.client.tsx"],"names":[],"mappings":";AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4CAA4C,CAAA;AAY9E,MAAM,MAAM,wBAAwB,GAAG;IACrC,aAAa,EAAE,YAAY,EAAE,CAAA;CAC9B,CAAA;AA+ED,eAAO,MAAM,4BAA4B,0FAA6C,CAAA"}
1
+ {"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../src/field/features/blocks/feature.client.tsx"],"names":[],"mappings":";AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4CAA4C,CAAA;AAY9E,MAAM,MAAM,wBAAwB,GAAG;IACrC,aAAa,EAAE,YAAY,EAAE,CAAA;CAC9B,CAAA;AA+ED,eAAO,MAAM,4BAA4B;;;6BAA6C,CAAA"}
@@ -1,3 +1,6 @@
1
1
  /// <reference types="react" resolution-mode="require"/>
2
- export declare const TestRecorderFeatureClientComponent: import("react").FC<undefined>;
2
+ export declare const TestRecorderFeatureClientComponent: import("react").FC<{
3
+ featureKey: string;
4
+ order: number;
5
+ }>;
3
6
  //# sourceMappingURL=feature.client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../../src/field/features/debug/testRecorder/feature.client.tsx"],"names":[],"mappings":";AAqBA,eAAO,MAAM,kCAAkC,+BAAmD,CAAA"}
1
+ {"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../../src/field/features/debug/testRecorder/feature.client.tsx"],"names":[],"mappings":";AAqBA,eAAO,MAAM,kCAAkC;;;EAAmD,CAAA"}
@@ -1,3 +1,6 @@
1
1
  /// <reference types="react" resolution-mode="require"/>
2
- export declare const TreeViewFeatureClientComponent: import("react").FC<undefined>;
2
+ export declare const TreeViewFeatureClientComponent: import("react").FC<{
3
+ featureKey: string;
4
+ order: number;
5
+ }>;
3
6
  //# sourceMappingURL=feature.client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../../src/field/features/debug/treeView/feature.client.tsx"],"names":[],"mappings":";AAqBA,eAAO,MAAM,8BAA8B,+BAA+C,CAAA"}
1
+ {"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../../src/field/features/debug/treeView/feature.client.tsx"],"names":[],"mappings":";AAqBA,eAAO,MAAM,8BAA8B;;;EAA+C,CAAA"}
@@ -1,3 +1,6 @@
1
1
  /// <reference types="react" resolution-mode="require"/>
2
- export declare const BoldFeatureClientComponent: import("react").FC<undefined>;
2
+ export declare const BoldFeatureClientComponent: import("react").FC<{
3
+ featureKey: string;
4
+ order: number;
5
+ }>;
3
6
  //# sourceMappingURL=feature.client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../../src/field/features/format/bold/feature.client.tsx"],"names":[],"mappings":";AA0DA,eAAO,MAAM,0BAA0B,+BAA2C,CAAA"}
1
+ {"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../../src/field/features/format/bold/feature.client.tsx"],"names":[],"mappings":";AA0DA,eAAO,MAAM,0BAA0B;;;EAA2C,CAAA"}
@@ -1,3 +1,6 @@
1
1
  /// <reference types="react" resolution-mode="require"/>
2
- export declare const InlineCodeFeatureClientComponent: import("react").FC<undefined>;
2
+ export declare const InlineCodeFeatureClientComponent: import("react").FC<{
3
+ featureKey: string;
4
+ order: number;
5
+ }>;
3
6
  //# sourceMappingURL=feature.client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../../src/field/features/format/inlineCode/feature.client.tsx"],"names":[],"mappings":";AAkDA,eAAO,MAAM,gCAAgC,+BAAiD,CAAA"}
1
+ {"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../../src/field/features/format/inlineCode/feature.client.tsx"],"names":[],"mappings":";AAkDA,eAAO,MAAM,gCAAgC;;;EAAiD,CAAA"}
@@ -1,3 +1,6 @@
1
1
  /// <reference types="react" resolution-mode="require"/>
2
- export declare const ItalicFeatureClientComponent: import("react").FC<undefined>;
2
+ export declare const ItalicFeatureClientComponent: import("react").FC<{
3
+ featureKey: string;
4
+ order: number;
5
+ }>;
3
6
  //# sourceMappingURL=feature.client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../../src/field/features/format/italic/feature.client.tsx"],"names":[],"mappings":";AAkDA,eAAO,MAAM,4BAA4B,+BAA6C,CAAA"}
1
+ {"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../../src/field/features/format/italic/feature.client.tsx"],"names":[],"mappings":";AAkDA,eAAO,MAAM,4BAA4B;;;EAA6C,CAAA"}
@@ -1,3 +1,6 @@
1
1
  /// <reference types="react" resolution-mode="require"/>
2
- export declare const StrikethroughFeatureClientComponent: import("react").FC<undefined>;
2
+ export declare const StrikethroughFeatureClientComponent: import("react").FC<{
3
+ featureKey: string;
4
+ order: number;
5
+ }>;
3
6
  //# sourceMappingURL=feature.client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../../src/field/features/format/strikethrough/feature.client.tsx"],"names":[],"mappings":";AAiDA,eAAO,MAAM,mCAAmC,+BAAoD,CAAA"}
1
+ {"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../../src/field/features/format/strikethrough/feature.client.tsx"],"names":[],"mappings":";AAiDA,eAAO,MAAM,mCAAmC;;;EAAoD,CAAA"}
@@ -1,3 +1,6 @@
1
1
  /// <reference types="react" resolution-mode="require"/>
2
- export declare const SubscriptFeatureClientComponent: import("react").FC<undefined>;
2
+ export declare const SubscriptFeatureClientComponent: import("react").FC<{
3
+ featureKey: string;
4
+ order: number;
5
+ }>;
3
6
  //# sourceMappingURL=feature.client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../../src/field/features/format/subscript/feature.client.tsx"],"names":[],"mappings":";AA+CA,eAAO,MAAM,+BAA+B,+BAAgD,CAAA"}
1
+ {"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../../src/field/features/format/subscript/feature.client.tsx"],"names":[],"mappings":";AA+CA,eAAO,MAAM,+BAA+B;;;EAAgD,CAAA"}
@@ -1,3 +1,6 @@
1
1
  /// <reference types="react" resolution-mode="require"/>
2
- export declare const SuperscriptFeatureClientComponent: import("react").FC<undefined>;
2
+ export declare const SuperscriptFeatureClientComponent: import("react").FC<{
3
+ featureKey: string;
4
+ order: number;
5
+ }>;
3
6
  //# sourceMappingURL=feature.client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../../src/field/features/format/superscript/feature.client.tsx"],"names":[],"mappings":";AA+CA,eAAO,MAAM,iCAAiC,+BAAkD,CAAA"}
1
+ {"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../../src/field/features/format/superscript/feature.client.tsx"],"names":[],"mappings":";AA+CA,eAAO,MAAM,iCAAiC;;;EAAkD,CAAA"}
@@ -1,3 +1,6 @@
1
1
  /// <reference types="react" resolution-mode="require"/>
2
- export declare const UnderlineFeatureClientComponent: import("react").FC<undefined>;
2
+ export declare const UnderlineFeatureClientComponent: import("react").FC<{
3
+ featureKey: string;
4
+ order: number;
5
+ }>;
3
6
  //# sourceMappingURL=feature.client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../../src/field/features/format/underline/feature.client.tsx"],"names":[],"mappings":";AA+CA,eAAO,MAAM,+BAA+B,+BAAgD,CAAA"}
1
+ {"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../../src/field/features/format/underline/feature.client.tsx"],"names":[],"mappings":";AA+CA,eAAO,MAAM,+BAA+B;;;EAAgD,CAAA"}
@@ -1,4 +1,7 @@
1
1
  /// <reference types="react" resolution-mode="require"/>
2
2
  import type { HeadingFeatureProps } from './feature.server.js';
3
- export declare const HeadingFeatureClientComponent: import("react").FC<import("../types.js").ClientComponentProps<HeadingFeatureProps>>;
3
+ export declare const HeadingFeatureClientComponent: import("react").FC<{
4
+ featureKey: string;
5
+ order: number;
6
+ } & HeadingFeatureProps>;
4
7
  //# sourceMappingURL=feature.client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../src/field/features/heading/feature.client.tsx"],"names":[],"mappings":";AAWA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AA0G9D,eAAO,MAAM,6BAA6B,qFAA8C,CAAA"}
1
+ {"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../src/field/features/heading/feature.client.tsx"],"names":[],"mappings":";AAWA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AA0G9D,eAAO,MAAM,6BAA6B;;;wBAA8C,CAAA"}
@@ -1,3 +1,6 @@
1
1
  /// <reference types="react" resolution-mode="require"/>
2
- export declare const HorizontalRuleFeatureClientComponent: import("react").FC<undefined>;
2
+ export declare const HorizontalRuleFeatureClientComponent: import("react").FC<{
3
+ featureKey: string;
4
+ order: number;
5
+ }>;
3
6
  //# sourceMappingURL=feature.client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../src/field/features/horizontalRule/feature.client.tsx"],"names":[],"mappings":";AA2EA,eAAO,MAAM,oCAAoC,+BAEhD,CAAA"}
1
+ {"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../src/field/features/horizontalRule/feature.client.tsx"],"names":[],"mappings":";AA2EA,eAAO,MAAM,oCAAoC;;;EAEhD,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"feature.server.d.ts","sourceRoot":"","sources":["../../../../src/field/features/horizontalRule/feature.server.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,aAAa,CAAA;AAOhE,eAAO,MAAM,qBAAqB,EAAE,6BAA6B,CAAC,SAAS,EAAE,SAAS,CA4BrF,CAAA"}
1
+ {"version":3,"file":"feature.server.d.ts","sourceRoot":"","sources":["../../../../src/field/features/horizontalRule/feature.server.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,aAAa,CAAA;AAOhE,eAAO,MAAM,qBAAqB,EAAE,6BAA6B,CAAC,SAAS,EAAE,SAAS,CA2BrF,CAAA"}
@@ -7,7 +7,6 @@ export const HorizontalRuleFeature = (props)=>{
7
7
  feature: ()=>{
8
8
  return {
9
9
  ClientComponent: HorizontalRuleFeatureClientComponent,
10
- clientFeatureProps: null,
11
10
  markdownTransformers: [
12
11
  MarkdownTransformer
13
12
  ],
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/field/features/horizontalRule/feature.server.ts"],"sourcesContent":["import type { FeatureProviderProviderServer } from '../types.js'\n\nimport { createNode } from '../typeUtilities.js'\nimport { HorizontalRuleFeatureClientComponent } from './feature.client.js'\nimport { MarkdownTransformer } from './markdownTransformer.js'\nimport { HorizontalRuleNode } from './nodes/HorizontalRuleNode.js'\n\nexport const HorizontalRuleFeature: FeatureProviderProviderServer<undefined, undefined> = (\n props,\n) => {\n return {\n feature: () => {\n return {\n ClientComponent: HorizontalRuleFeatureClientComponent,\n clientFeatureProps: null,\n markdownTransformers: [MarkdownTransformer],\n nodes: [\n createNode({\n converters: {\n html: {\n converter: () => {\n return `<hr/>`\n },\n nodeTypes: [HorizontalRuleNode.getType()],\n },\n },\n node: HorizontalRuleNode,\n }),\n ],\n serverFeatureProps: props,\n }\n },\n key: 'horizontalRule',\n serverFeatureProps: props,\n }\n}\n"],"names":["createNode","HorizontalRuleFeatureClientComponent","MarkdownTransformer","HorizontalRuleNode","HorizontalRuleFeature","props","feature","ClientComponent","clientFeatureProps","markdownTransformers","nodes","converters","html","converter","nodeTypes","getType","node","serverFeatureProps","key"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAEA,SAASA,UAAU,QAAQ,sBAAqB;AAChD,SAASC,oCAAoC,QAAQ,sBAAqB;AAC1E,SAASC,mBAAmB,QAAQ,2BAA0B;AAC9D,SAASC,kBAAkB,QAAQ,gCAA+B;AAElE,OAAO,MAAMC,wBAA6E,CACxFC;IAEA,OAAO;QACLC,SAAS;YACP,OAAO;gBACLC,iBAAiBN;gBACjBO,oBAAoB;gBACpBC,sBAAsB;oBAACP;iBAAoB;gBAC3CQ,OAAO;oBACLV,WAAW;wBACTW,YAAY;4BACVC,MAAM;gCACJC,WAAW;oCACT,OAAO,CAAC,KAAK,CAAC;gCAChB;gCACAC,WAAW;oCAACX,mBAAmBY,OAAO;iCAAG;4BAC3C;wBACF;wBACAC,MAAMb;oBACR;iBACD;gBACDc,oBAAoBZ;YACtB;QACF;QACAa,KAAK;QACLD,oBAAoBZ;IACtB;AACF,EAAC"}
1
+ {"version":3,"sources":["../../../../src/field/features/horizontalRule/feature.server.ts"],"sourcesContent":["import type { FeatureProviderProviderServer } from '../types.js'\n\nimport { createNode } from '../typeUtilities.js'\nimport { HorizontalRuleFeatureClientComponent } from './feature.client.js'\nimport { MarkdownTransformer } from './markdownTransformer.js'\nimport { HorizontalRuleNode } from './nodes/HorizontalRuleNode.js'\n\nexport const HorizontalRuleFeature: FeatureProviderProviderServer<undefined, undefined> = (\n props,\n) => {\n return {\n feature: () => {\n return {\n ClientComponent: HorizontalRuleFeatureClientComponent,\n markdownTransformers: [MarkdownTransformer],\n nodes: [\n createNode({\n converters: {\n html: {\n converter: () => {\n return `<hr/>`\n },\n nodeTypes: [HorizontalRuleNode.getType()],\n },\n },\n node: HorizontalRuleNode,\n }),\n ],\n serverFeatureProps: props,\n }\n },\n key: 'horizontalRule',\n serverFeatureProps: props,\n }\n}\n"],"names":["createNode","HorizontalRuleFeatureClientComponent","MarkdownTransformer","HorizontalRuleNode","HorizontalRuleFeature","props","feature","ClientComponent","markdownTransformers","nodes","converters","html","converter","nodeTypes","getType","node","serverFeatureProps","key"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAEA,SAASA,UAAU,QAAQ,sBAAqB;AAChD,SAASC,oCAAoC,QAAQ,sBAAqB;AAC1E,SAASC,mBAAmB,QAAQ,2BAA0B;AAC9D,SAASC,kBAAkB,QAAQ,gCAA+B;AAElE,OAAO,MAAMC,wBAA6E,CACxFC;IAEA,OAAO;QACLC,SAAS;YACP,OAAO;gBACLC,iBAAiBN;gBACjBO,sBAAsB;oBAACN;iBAAoB;gBAC3CO,OAAO;oBACLT,WAAW;wBACTU,YAAY;4BACVC,MAAM;gCACJC,WAAW;oCACT,OAAO,CAAC,KAAK,CAAC;gCAChB;gCACAC,WAAW;oCAACV,mBAAmBW,OAAO;iCAAG;4BAC3C;wBACF;wBACAC,MAAMZ;oBACR;iBACD;gBACDa,oBAAoBX;YACtB;QACF;QACAY,KAAK;QACLD,oBAAoBX;IACtB;AACF,EAAC"}
@@ -1,3 +1,6 @@
1
1
  /// <reference types="react" resolution-mode="require"/>
2
- export declare const IndentFeatureClientComponent: import("react").FC<undefined>;
2
+ export declare const IndentFeatureClientComponent: import("react").FC<{
3
+ featureKey: string;
4
+ order: number;
5
+ }>;
3
6
  //# sourceMappingURL=feature.client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../src/field/features/indent/feature.client.tsx"],"names":[],"mappings":";AAmEA,eAAO,MAAM,4BAA4B,+BAA6C,CAAA"}
1
+ {"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../src/field/features/indent/feature.client.tsx"],"names":[],"mappings":";AAmEA,eAAO,MAAM,4BAA4B;;;EAA6C,CAAA"}
@@ -1,5 +1,17 @@
1
1
  /// <reference types="react" resolution-mode="require"/>
2
2
  import type { ExclusiveLinkCollectionsProps } from './feature.server.js';
3
3
  export type ClientProps = ExclusiveLinkCollectionsProps;
4
- export declare const LinkFeatureClientComponent: import("react").FC<import("../types.js").ClientComponentProps<ExclusiveLinkCollectionsProps>>;
4
+ export declare const LinkFeatureClientComponent: import("react").FC<({
5
+ featureKey: string;
6
+ order: number;
7
+ } & {
8
+ disabledCollections?: string[];
9
+ enabledCollections?: never;
10
+ }) | ({
11
+ featureKey: string;
12
+ order: number;
13
+ } & {
14
+ disabledCollections?: never;
15
+ enabledCollections?: string[];
16
+ })>;
5
17
  //# sourceMappingURL=feature.client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../src/field/features/link/feature.client.tsx"],"names":[],"mappings":";AASA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,qBAAqB,CAAA;AAexE,MAAM,MAAM,WAAW,GAAG,6BAA6B,CAAA;AAyFvD,eAAO,MAAM,0BAA0B,+FAA2C,CAAA"}
1
+ {"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../src/field/features/link/feature.client.tsx"],"names":[],"mappings":";AASA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,qBAAqB,CAAA;AAexE,MAAM,MAAM,WAAW,GAAG,6BAA6B,CAAA;AAyFvD,eAAO,MAAM,0BAA0B;;;;;;;;;;;;GAA2C,CAAA"}
@@ -1,3 +1,6 @@
1
1
  /// <reference types="react" resolution-mode="require"/>
2
- export declare const ChecklistFeatureClientComponent: import("react").FC<undefined>;
2
+ export declare const ChecklistFeatureClientComponent: import("react").FC<{
3
+ featureKey: string;
4
+ order: number;
5
+ }>;
3
6
  //# sourceMappingURL=feature.client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../../src/field/features/lists/checklist/feature.client.tsx"],"names":[],"mappings":";AA6GA,eAAO,MAAM,+BAA+B,+BAAgD,CAAA"}
1
+ {"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../../src/field/features/lists/checklist/feature.client.tsx"],"names":[],"mappings":";AA6GA,eAAO,MAAM,+BAA+B;;;EAAgD,CAAA"}
@@ -1,3 +1,6 @@
1
1
  /// <reference types="react" resolution-mode="require"/>
2
- export declare const OrderedListFeatureClientComponent: import("react").FC<undefined>;
2
+ export declare const OrderedListFeatureClientComponent: import("react").FC<{
3
+ featureKey: string;
4
+ order: number;
5
+ }>;
3
6
  //# sourceMappingURL=feature.client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../../src/field/features/lists/orderedList/feature.client.tsx"],"names":[],"mappings":";AAkGA,eAAO,MAAM,iCAAiC,+BAAkD,CAAA"}
1
+ {"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../../src/field/features/lists/orderedList/feature.client.tsx"],"names":[],"mappings":";AAkGA,eAAO,MAAM,iCAAiC;;;EAAkD,CAAA"}
@@ -1,3 +1,6 @@
1
1
  /// <reference types="react" resolution-mode="require"/>
2
- export declare const UnorderedListFeatureClientComponent: import("react").FC<undefined>;
2
+ export declare const UnorderedListFeatureClientComponent: import("react").FC<{
3
+ featureKey: string;
4
+ order: number;
5
+ }>;
3
6
  //# sourceMappingURL=feature.client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../../src/field/features/lists/unorderedList/feature.client.tsx"],"names":[],"mappings":";AAiGA,eAAO,MAAM,mCAAmC,+BAAoD,CAAA"}
1
+ {"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../../src/field/features/lists/unorderedList/feature.client.tsx"],"names":[],"mappings":";AAiGA,eAAO,MAAM,mCAAmC;;;EAAoD,CAAA"}
@@ -1,3 +1,6 @@
1
1
  /// <reference types="react" resolution-mode="require"/>
2
- export declare const LexicalPluginToLexicalFeatureClientComponent: import("react").FC<null>;
2
+ export declare const LexicalPluginToLexicalFeatureClientComponent: import("react").FC<{
3
+ featureKey: string;
4
+ order: number;
5
+ }>;
3
6
  //# sourceMappingURL=feature.client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../../src/field/features/migrations/lexicalPluginToLexical/feature.client.tsx"],"names":[],"mappings":";AAqCA,eAAO,MAAM,4CAA4C,0BAExD,CAAA"}
1
+ {"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../../src/field/features/migrations/lexicalPluginToLexical/feature.client.tsx"],"names":[],"mappings":";AAqCA,eAAO,MAAM,4CAA4C;;;EAExD,CAAA"}
@@ -1,3 +1,6 @@
1
1
  /// <reference types="react" resolution-mode="require"/>
2
- export declare const SlateToLexicalFeatureClientComponent: import("react").FC<undefined>;
2
+ export declare const SlateToLexicalFeatureClientComponent: import("react").FC<{
3
+ featureKey: string;
4
+ order: number;
5
+ }>;
3
6
  //# sourceMappingURL=feature.client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../../src/field/features/migrations/slateToLexical/feature.client.tsx"],"names":[],"mappings":";AAyCA,eAAO,MAAM,oCAAoC,+BAEhD,CAAA"}
1
+ {"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../../src/field/features/migrations/slateToLexical/feature.client.tsx"],"names":[],"mappings":";AAyCA,eAAO,MAAM,oCAAoC;;;EAEhD,CAAA"}
@@ -1,3 +1,6 @@
1
1
  /// <reference types="react" resolution-mode="require"/>
2
- export declare const ParagraphFeatureClientComponent: import("react").FC<undefined>;
2
+ export declare const ParagraphFeatureClientComponent: import("react").FC<{
3
+ featureKey: string;
4
+ order: number;
5
+ }>;
3
6
  //# sourceMappingURL=feature.client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../src/field/features/paragraph/feature.client.tsx"],"names":[],"mappings":";AA6EA,eAAO,MAAM,+BAA+B,+BAAgD,CAAA"}
1
+ {"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../src/field/features/paragraph/feature.client.tsx"],"names":[],"mappings":";AA6EA,eAAO,MAAM,+BAA+B;;;EAAgD,CAAA"}
@@ -1,4 +1,19 @@
1
1
  /// <reference types="react" resolution-mode="require"/>
2
- import type { RelationshipFeatureProps } from './feature.server.js';
3
- export declare const RelationshipFeatureClientComponent: import("react").FC<import("../types.js").ClientComponentProps<RelationshipFeatureProps>>;
2
+ export declare const RelationshipFeatureClientComponent: import("react").FC<({
3
+ featureKey: string;
4
+ order: number;
5
+ } & {
6
+ disabledCollections?: string[];
7
+ enabledCollections?: never;
8
+ } & {
9
+ maxDepth?: number;
10
+ }) | ({
11
+ featureKey: string;
12
+ order: number;
13
+ } & {
14
+ disabledCollections?: never;
15
+ enabledCollections?: string[];
16
+ } & {
17
+ maxDepth?: number;
18
+ })>;
4
19
  //# sourceMappingURL=feature.client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../src/field/features/relationship/feature.client.tsx"],"names":[],"mappings":";AAKA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAA;AA0EnE,eAAO,MAAM,kCAAkC,0FAAmD,CAAA"}
1
+ {"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../src/field/features/relationship/feature.client.tsx"],"names":[],"mappings":";AA+EA,eAAO,MAAM,kCAAkC;;;;;;;;;;;;;;;;GAAmD,CAAA"}
@@ -1,6 +1,5 @@
1
1
  @import '../../../../../scss/styles';
2
2
 
3
-
4
3
  html[data-theme='dark'] {
5
4
  .fixed-toolbar {
6
5
  &__dropdown-items {
@@ -9,7 +8,8 @@ html[data-theme='dark'] {
9
8
  .toolbar-popup__dropdown-item {
10
9
  color: var(--theme-elevation-900);
11
10
 
12
- &:hover:not([disabled]), &.active {
11
+ &:hover:not([disabled]),
12
+ &.active {
13
13
  background-color: var(--theme-elevation-100);
14
14
  }
15
15
 
@@ -21,7 +21,8 @@ html[data-theme='dark'] {
21
21
 
22
22
  .toolbar-popup {
23
23
  &__button {
24
- &.active, &:hover:not([disabled]) {
24
+ &.active,
25
+ &:hover:not([disabled]) {
25
26
  background-color: var(--theme-elevation-100);
26
27
  }
27
28
  }
@@ -43,20 +44,17 @@ html[data-theme='dark'] {
43
44
  }
44
45
  }
45
46
 
46
-
47
47
  .fixed-toolbar {
48
48
  @include blur-bg(var(--theme-elevation-0));
49
49
  display: flex;
50
- flex-wrap: wrap;
51
- align-items: stretch;
52
- padding: 0 3.72px 0 6.25px;
50
+ align-items: center;
51
+ padding: calc(var(--base) / 4);
53
52
  vertical-align: middle;
54
53
  position: sticky;
55
54
  z-index: 2;
56
55
  top: var(--doc-controls-height);
57
- margin-bottom: $baseline;
58
56
  border: $style-stroke-width-s solid var(--theme-elevation-150);
59
-
57
+ transform: translateY(1px); // aligns with top bar pixel line when stuck
60
58
 
61
59
  &__group {
62
60
  display: flex;
@@ -78,4 +76,16 @@ html[data-theme='dark'] {
78
76
  }
79
77
  }
80
78
 
79
+ .toolbar-popup {
80
+ &__dropdown,
81
+ &__button {
82
+ border-radius: 0;
83
+ }
84
+ }
85
+
86
+ + .editor-scroller {
87
+ .ContentEditable__root {
88
+ padding-top: calc(var(--base) * 1.25);
89
+ }
90
+ }
81
91
  }
@@ -1,3 +1,6 @@
1
1
  /// <reference types="react" resolution-mode="require"/>
2
- export declare const FixedToolbarFeatureClientComponent: import("react").FC<undefined>;
2
+ export declare const FixedToolbarFeatureClientComponent: import("react").FC<{
3
+ featureKey: string;
4
+ order: number;
5
+ }>;
3
6
  //# sourceMappingURL=feature.client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../../src/field/features/toolbars/fixed/feature.client.tsx"],"names":[],"mappings":";AAsBA,eAAO,MAAM,kCAAkC,+BAAmD,CAAA"}
1
+ {"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../../src/field/features/toolbars/fixed/feature.client.tsx"],"names":[],"mappings":";AAsBA,eAAO,MAAM,kCAAkC;;;EAAmD,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"feature.server.d.ts","sourceRoot":"","sources":["../../../../../src/field/features/toolbars/fixed/feature.server.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,gBAAgB,CAAA;AAInE,eAAO,MAAM,mBAAmB,EAAE,6BAA6B,CAAC,SAAS,EAAE,SAAS,CAYnF,CAAA"}
1
+ {"version":3,"file":"feature.server.d.ts","sourceRoot":"","sources":["../../../../../src/field/features/toolbars/fixed/feature.server.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,gBAAgB,CAAA;AAInE,eAAO,MAAM,mBAAmB,EAAE,6BAA6B,CAAC,SAAS,EAAE,SAAS,CAWnF,CAAA"}
@@ -4,7 +4,6 @@ export const FixedToolbarFeature = (props)=>{
4
4
  feature: ()=>{
5
5
  return {
6
6
  ClientComponent: FixedToolbarFeatureClientComponent,
7
- clientFeatureProps: null,
8
7
  serverFeatureProps: props
9
8
  };
10
9
  },
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/field/features/toolbars/fixed/feature.server.ts"],"sourcesContent":["import type { FeatureProviderProviderServer } from '../../types.js'\n\nimport { FixedToolbarFeatureClientComponent } from './feature.client.js'\n\nexport const FixedToolbarFeature: FeatureProviderProviderServer<undefined, undefined> = (props) => {\n return {\n feature: () => {\n return {\n ClientComponent: FixedToolbarFeatureClientComponent,\n clientFeatureProps: null,\n serverFeatureProps: props,\n }\n },\n key: 'toolbarFixed',\n serverFeatureProps: props,\n }\n}\n"],"names":["FixedToolbarFeatureClientComponent","FixedToolbarFeature","props","feature","ClientComponent","clientFeatureProps","serverFeatureProps","key"],"rangeMappings":";;;;;;;;;;;;;","mappings":"AAEA,SAASA,kCAAkC,QAAQ,sBAAqB;AAExE,OAAO,MAAMC,sBAA2E,CAACC;IACvF,OAAO;QACLC,SAAS;YACP,OAAO;gBACLC,iBAAiBJ;gBACjBK,oBAAoB;gBACpBC,oBAAoBJ;YACtB;QACF;QACAK,KAAK;QACLD,oBAAoBJ;IACtB;AACF,EAAC"}
1
+ {"version":3,"sources":["../../../../../src/field/features/toolbars/fixed/feature.server.ts"],"sourcesContent":["import type { FeatureProviderProviderServer } from '../../types.js'\n\nimport { FixedToolbarFeatureClientComponent } from './feature.client.js'\n\nexport const FixedToolbarFeature: FeatureProviderProviderServer<undefined, undefined> = (props) => {\n return {\n feature: () => {\n return {\n ClientComponent: FixedToolbarFeatureClientComponent,\n serverFeatureProps: props,\n }\n },\n key: 'toolbarFixed',\n serverFeatureProps: props,\n }\n}\n"],"names":["FixedToolbarFeatureClientComponent","FixedToolbarFeature","props","feature","ClientComponent","serverFeatureProps","key"],"rangeMappings":";;;;;;;;;;;;","mappings":"AAEA,SAASA,kCAAkC,QAAQ,sBAAqB;AAExE,OAAO,MAAMC,sBAA2E,CAACC;IACvF,OAAO;QACLC,SAAS;YACP,OAAO;gBACLC,iBAAiBJ;gBACjBK,oBAAoBH;YACtB;QACF;QACAI,KAAK;QACLD,oBAAoBH;IACtB;AACF,EAAC"}
@@ -1,3 +1,6 @@
1
1
  /// <reference types="react" resolution-mode="require"/>
2
- export declare const InlineToolbarFeatureClientComponent: import("react").FC<undefined>;
2
+ export declare const InlineToolbarFeatureClientComponent: import("react").FC<{
3
+ featureKey: string;
4
+ order: number;
5
+ }>;
3
6
  //# sourceMappingURL=feature.client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../../src/field/features/toolbars/inline/feature.client.tsx"],"names":[],"mappings":";AAsBA,eAAO,MAAM,mCAAmC,+BAAoD,CAAA"}
1
+ {"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../../src/field/features/toolbars/inline/feature.client.tsx"],"names":[],"mappings":";AAsBA,eAAO,MAAM,mCAAmC;;;EAAoD,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"feature.server.d.ts","sourceRoot":"","sources":["../../../../../src/field/features/toolbars/inline/feature.server.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,gBAAgB,CAAA;AAInE,eAAO,MAAM,oBAAoB,EAAE,6BAA6B,CAAC,SAAS,EAAE,SAAS,CAcpF,CAAA"}
1
+ {"version":3,"file":"feature.server.d.ts","sourceRoot":"","sources":["../../../../../src/field/features/toolbars/inline/feature.server.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,gBAAgB,CAAA;AAInE,eAAO,MAAM,oBAAoB,EAAE,6BAA6B,CAAC,SAAS,EAAE,SAAS,CAapF,CAAA"}
@@ -4,7 +4,6 @@ export const InlineToolbarFeature = (props)=>{
4
4
  feature: ()=>{
5
5
  return {
6
6
  ClientComponent: InlineToolbarFeatureClientComponent,
7
- clientFeatureProps: null,
8
7
  serverFeatureProps: props
9
8
  };
10
9
  },
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/field/features/toolbars/inline/feature.server.ts"],"sourcesContent":["import type { FeatureProviderProviderServer } from '../../types.js'\n\nimport { InlineToolbarFeatureClientComponent } from './feature.client.js'\n\nexport const InlineToolbarFeature: FeatureProviderProviderServer<undefined, undefined> = (\n props,\n) => {\n return {\n feature: () => {\n return {\n ClientComponent: InlineToolbarFeatureClientComponent,\n clientFeatureProps: null,\n serverFeatureProps: props,\n }\n },\n key: 'toolbarInline',\n serverFeatureProps: props,\n }\n}\n"],"names":["InlineToolbarFeatureClientComponent","InlineToolbarFeature","props","feature","ClientComponent","clientFeatureProps","serverFeatureProps","key"],"rangeMappings":";;;;;;;;;;;;;","mappings":"AAEA,SAASA,mCAAmC,QAAQ,sBAAqB;AAEzE,OAAO,MAAMC,uBAA4E,CACvFC;IAEA,OAAO;QACLC,SAAS;YACP,OAAO;gBACLC,iBAAiBJ;gBACjBK,oBAAoB;gBACpBC,oBAAoBJ;YACtB;QACF;QACAK,KAAK;QACLD,oBAAoBJ;IACtB;AACF,EAAC"}
1
+ {"version":3,"sources":["../../../../../src/field/features/toolbars/inline/feature.server.ts"],"sourcesContent":["import type { FeatureProviderProviderServer } from '../../types.js'\n\nimport { InlineToolbarFeatureClientComponent } from './feature.client.js'\n\nexport const InlineToolbarFeature: FeatureProviderProviderServer<undefined, undefined> = (\n props,\n) => {\n return {\n feature: () => {\n return {\n ClientComponent: InlineToolbarFeatureClientComponent,\n serverFeatureProps: props,\n }\n },\n key: 'toolbarInline',\n serverFeatureProps: props,\n }\n}\n"],"names":["InlineToolbarFeatureClientComponent","InlineToolbarFeature","props","feature","ClientComponent","serverFeatureProps","key"],"rangeMappings":";;;;;;;;;;;;","mappings":"AAEA,SAASA,mCAAmC,QAAQ,sBAAqB;AAEzE,OAAO,MAAMC,uBAA4E,CACvFC;IAEA,OAAO;QACLC,SAAS;YACP,OAAO;gBACLC,iBAAiBJ;gBACjBK,oBAAoBH;YACtB;QACF;QACAI,KAAK;QACLD,oBAAoBH;IACtB;AACF,EAAC"}
@@ -1,4 +1,4 @@
1
- import type { I18n } from '@payloadcms/translations';
1
+ import type { I18nClient } from '@payloadcms/translations';
2
2
  import type { BaseSelection, LexicalEditor } from 'lexical';
3
3
  import type React from 'react';
4
4
  import type { EditorFocusContextType } from '../../lexical/EditorFocusProvider.js';
@@ -37,7 +37,7 @@ export type ToolbarGroupItem = {
37
37
  key: string;
38
38
  /** The label is displayed as text if the item is part of a dropdown group */
39
39
  label?: (({ i18n }: {
40
- i18n: I18n;
40
+ i18n: I18nClient;
41
41
  }) => string) | string;
42
42
  onSelect?: ({ editor, isActive }: {
43
43
  editor: LexicalEditor;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/field/features/toolbars/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAA;AACpD,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAC3D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAA;AAElF,MAAM,MAAM,YAAY,GACpB;IACE,cAAc,CAAC,EAAE,KAAK,CAAC,EAAE,CAAA;IACzB,KAAK,EAAE,KAAK,CAAC,gBAAgB,CAAC,CAAA;IAC9B,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,UAAU,CAAA;CACjB,GACD;IACE,KAAK,EAAE,KAAK,CAAC,gBAAgB,CAAC,CAAA;IAC9B,GAAG,EAAE,MAAM,CAAA;IACX,KAA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,MAAM,EAAE,aAAa,CAAA;QACrB,kBAAkB,EAAE,sBAAsB,CAAA;QAC1C,SAAS,EAAE,aAAa,CAAA;KACzB,KAAK,OAAO,CAAA;IACb,GAAG,EAAE,MAAM,CAAA;IACX,6EAA6E;IAC7E,KAAK,CAAC,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE;QAAE,IAAI,EAAE,UAAU,CAAA;KAAE,KAAK,MAAM,CAAC,GAAG,MAAM,CAAA;IAC7D,QAAQ,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE;QAAE,MAAM,EAAE,aAAa,CAAC;QAAC,QAAQ,EAAE,OAAO,CAAA;KAAE,KAAK,IAAI,CAAA;IACvF,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/field/features/toolbars/types.ts"],"sourcesContent":["import type { I18n } from '@payloadcms/translations'\nimport type { BaseSelection, LexicalEditor } from 'lexical'\nimport type React from 'react'\n\nimport type { EditorFocusContextType } from '../../lexical/EditorFocusProvider.js'\n\nexport type ToolbarGroup =\n | {\n ChildComponent?: React.FC\n items: Array<ToolbarGroupItem>\n key: string\n order?: number\n type: 'dropdown'\n }\n | {\n items: Array<ToolbarGroupItem>\n key: string\n order?: number\n type: 'buttons'\n }\n\nexport type ToolbarGroupItem = {\n ChildComponent?: React.FC\n /** Use component to ignore the children and onClick properties. It does not use the default, pre-defined format Button component */\n Component?: React.FC<{\n active?: boolean\n anchorElem: HTMLElement\n editor: LexicalEditor\n enabled?: boolean\n item: ToolbarGroupItem\n }>\n isActive?: ({\n editor,\n editorFocusContext,\n selection,\n }: {\n editor: LexicalEditor\n editorFocusContext: EditorFocusContextType\n selection: BaseSelection\n }) => boolean\n isEnabled?: ({\n editor,\n editorFocusContext,\n selection,\n }: {\n editor: LexicalEditor\n editorFocusContext: EditorFocusContextType\n selection: BaseSelection\n }) => boolean\n key: string\n /** The label is displayed as text if the item is part of a dropdown group */\n label?: (({ i18n }: { i18n: I18n }) => string) | string\n onSelect?: ({ editor, isActive }: { editor: LexicalEditor; isActive: boolean }) => void\n order?: number\n}\n"],"names":[],"rangeMappings":"","mappings":"AAqBA,WAiCC"}
1
+ {"version":3,"sources":["../../../../src/field/features/toolbars/types.ts"],"sourcesContent":["import type { I18nClient } from '@payloadcms/translations'\nimport type { BaseSelection, LexicalEditor } from 'lexical'\nimport type React from 'react'\n\nimport type { EditorFocusContextType } from '../../lexical/EditorFocusProvider.js'\n\nexport type ToolbarGroup =\n | {\n ChildComponent?: React.FC\n items: Array<ToolbarGroupItem>\n key: string\n order?: number\n type: 'dropdown'\n }\n | {\n items: Array<ToolbarGroupItem>\n key: string\n order?: number\n type: 'buttons'\n }\n\nexport type ToolbarGroupItem = {\n ChildComponent?: React.FC\n /** Use component to ignore the children and onClick properties. It does not use the default, pre-defined format Button component */\n Component?: React.FC<{\n active?: boolean\n anchorElem: HTMLElement\n editor: LexicalEditor\n enabled?: boolean\n item: ToolbarGroupItem\n }>\n isActive?: ({\n editor,\n editorFocusContext,\n selection,\n }: {\n editor: LexicalEditor\n editorFocusContext: EditorFocusContextType\n selection: BaseSelection\n }) => boolean\n isEnabled?: ({\n editor,\n editorFocusContext,\n selection,\n }: {\n editor: LexicalEditor\n editorFocusContext: EditorFocusContextType\n selection: BaseSelection\n }) => boolean\n key: string\n /** The label is displayed as text if the item is part of a dropdown group */\n label?: (({ i18n }: { i18n: I18nClient }) => string) | string\n onSelect?: ({ editor, isActive }: { editor: LexicalEditor; isActive: boolean }) => void\n order?: number\n}\n"],"names":[],"rangeMappings":"","mappings":"AAqBA,WAiCC"}
@@ -1,5 +1,5 @@
1
1
  import type { Transformer } from '@lexical/markdown';
2
- import type { I18n } from '@payloadcms/translations';
2
+ import type { I18nClient } from '@payloadcms/translations';
3
3
  import type { JSONSchema4 } from 'json-schema';
4
4
  import type { Klass, LexicalEditor, LexicalNode, SerializedEditorState } from 'lexical';
5
5
  import type { SerializedLexicalNode } from 'lexical';
@@ -67,7 +67,7 @@ export type FeatureProviderServer<ServerFeatureProps, ClientFeatureProps> = {
67
67
  /** Props which were passed into your feature will have to be passed here. This will allow them to be used / read in other places of the code, e.g. wherever you can use useEditorConfigContext */
68
68
  serverFeatureProps: ServerFeatureProps;
69
69
  };
70
- export type FeatureProviderProviderClient<ClientFeatureProps> = (props?: ClientComponentProps<ClientFeatureProps>) => FeatureProviderClient<ClientFeatureProps>;
70
+ export type FeatureProviderProviderClient<ClientFeatureProps> = (props: ClientComponentProps<ClientFeatureProps>) => FeatureProviderClient<ClientFeatureProps>;
71
71
  /**
72
72
  * No dependencies => Features need to be sorted on the server first, then sent to client in right order
73
73
  */
@@ -155,10 +155,13 @@ export type ClientFeature<ClientFeatureProps> = {
155
155
  groups: ToolbarGroup[];
156
156
  };
157
157
  };
158
- export type ClientComponentProps<ClientFeatureProps> = ClientFeatureProps & {
158
+ export type ClientComponentProps<ClientFeatureProps> = ClientFeatureProps extends undefined ? {
159
159
  featureKey: string;
160
160
  order: number;
161
- };
161
+ } : {
162
+ featureKey: string;
163
+ order: number;
164
+ } & ClientFeatureProps;
162
165
  export type FieldNodeHookArgs<T extends SerializedLexicalNode> = {
163
166
  context: RequestContext;
164
167
  /** Boolean to denote if this hook is running against finding one, or finding many within the afterRead hook. */
@@ -198,7 +201,7 @@ export type ServerFeature<ServerProps, ClientFeatureProps> = {
198
201
  clientFeatureProps?: ClientFeatureProps;
199
202
  generateComponentMap?: (args: {
200
203
  config: SanitizedConfig;
201
- i18n: I18n;
204
+ i18n: I18nClient;
202
205
  props: ServerProps;
203
206
  schemaPath: string;
204
207
  }) => {
@@ -209,7 +212,7 @@ export type ServerFeature<ServerProps, ClientFeatureProps> = {
209
212
  };
210
213
  generateSchemaMap?: (args: {
211
214
  config: SanitizedConfig;
212
- i18n: I18n;
215
+ i18n: I18nClient;
213
216
  props: ServerProps;
214
217
  schemaMap: Map<string, Field[]>;
215
218
  schemaPath: string;
@@ -1 +1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AC3D,kBAAkB,EAAE,GAAG,CAAC,MAAM,EAAE,KAAK,CAAC,iBAAiB,CAAC,CAAC,CAAA;IACzD,kDAAkD;IAClD,WAAW,EAAE,GAAG,CAAC,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC,CAAA;CAChD,CAAA;AAED,MAAM,MAAM,uBAAuB,GAAG,QAAQ,CAC5C,IAAI,CACF,qBAAqB,CAAC,OAAO,CAAC,EAC9B,sBAAsB,GAAG,OAAO,GAAG,cAAc,GAAG,eAAe,CACpE,CACF,GAAG;IACF,uCAAuC;IACvC,eAAe,EAAE,MAAM,EAAE,CAAA;IACzB,KAAK,EAAE;QACL,IAAI,EAAE,KAAK,CACT,CAAC,EACC,mBAAmB,GACpB,EAAE;YACD,mBAAmB,EAAE,qBAAqB,CAAA;SAC3C,KAAK,qBAAqB,CAC5B,CAAA;QACD,IAAI,EAAE,KAAK,CACT,CAAC,EACC,mBAAmB,GACpB,EAAE;YACD,mBAAmB,EAAE,qBAAqB,CAAA;SAC3C,KAAK,qBAAqB,CAC5B,CAAA;KACF,CAAA;IACD;;OAEG;IACH,OAAO,CAAC,EAAE,KAAK,CAAC,eAAe,CAAC,CAAA;IAChC,SAAS,EAAE;QACT;;;;;WAKG;QACH,aAAa,EAAE,KAAK,CAClB,CAAC,EAAE,MAAM,EAAE,WAAW,EAAE,EAAE;YAAE,MAAM,EAAE,aAAa,CAAC;YAAC,WAAW,EAAE,MAAM,CAAA;SAAE,KAAK,cAAc,EAAE,CAC9F,CAAA;QACD;;;WAGG;QACH,MAAM,EAAE,cAAc,EAAE,CAAA;KACzB,CAAA;CACF,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/field/features/types.ts"],"sourcesContent":["import type { Transformer } from '@lexical/markdown'\nimport type { I18n } from '@payloadcms/translations'\nimport type { JSONSchema4 } from 'json-schema'\nimport type { Klass, LexicalEditor, LexicalNode, SerializedEditorState } from 'lexical'\nimport type { SerializedLexicalNode } from 'lexical'\nimport type { LexicalNodeReplacement } from 'lexical'\nimport type { RequestContext } from 'payload'\nimport type { SanitizedConfig } from 'payload/config'\nimport type {\n Field,\n PayloadRequestWithData,\n ReplaceAny,\n RichTextField,\n ValidateOptions,\n} from 'payload/types'\nimport type React from 'react'\n\nimport type { AdapterProps } from '../../types.js'\nimport type { ClientEditorConfig, ServerEditorConfig } from '../lexical/config/types.js'\nimport type { SlashMenuGroup } from '../lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js'\nimport type { HTMLConverter } from './converters/html/converter/types.js'\nimport type { ToolbarGroup } from './toolbars/types.js'\n\nexport type PopulationPromise<T extends SerializedLexicalNode = SerializedLexicalNode> = ({\n context,\n currentDepth,\n depth,\n editorPopulationPromises,\n field,\n fieldPromises,\n findMany,\n flattenLocales,\n node,\n overrideAccess,\n populationPromises,\n req,\n showHiddenFields,\n siblingDoc,\n}: {\n context: RequestContext\n currentDepth: number\n depth: number\n draft: boolean\n /**\n * This maps all population promises to the node type\n */\n editorPopulationPromises: Map<string, Array<PopulationPromise>>\n field: RichTextField<SerializedEditorState, AdapterProps>\n /**\n * fieldPromises are used for things like field hooks. They will be awaited before awaiting populationPromises\n */\n fieldPromises: Promise<void>[]\n findMany: boolean\n flattenLocales: boolean\n node: T\n overrideAccess: boolean\n populationPromises: Promise<void>[]\n req: PayloadRequestWithData\n showHiddenFields: boolean\n siblingDoc: Record<string, unknown>\n}) => void\n\nexport type NodeValidation<T extends SerializedLexicalNode = SerializedLexicalNode> = ({\n node,\n nodeValidations,\n validation,\n}: {\n node: T\n nodeValidations: Map<string, Array<NodeValidation>>\n validation: {\n options: ValidateOptions<unknown, unknown, RichTextField>\n value: SerializedEditorState\n }\n}) => Promise<string | true> | string | true\n\nexport type FeatureProviderProviderServer<ServerFeatureProps, ClientFeatureProps> = (\n props?: ServerFeatureProps,\n) => FeatureProviderServer<ServerFeatureProps, ClientFeatureProps>\n\nexport type FeatureProviderServer<ServerFeatureProps, ClientFeatureProps> = {\n /** Keys of dependencies needed for this feature. These dependencies do not have to be loaded first */\n dependencies?: string[]\n /** Keys of priority dependencies needed for this feature. These dependencies have to be loaded first and are available in the `feature` property*/\n dependenciesPriority?: string[]\n /** Keys of soft-dependencies needed for this feature. The FeatureProviders dependencies are optional, but are considered as last-priority in the loading process */\n dependenciesSoft?: string[]\n\n /**\n * This is being called during the payload sanitization process\n */\n feature: (props: {\n config: SanitizedConfig\n /** unSanitizedEditorConfig.features, but mapped */\n featureProviderMap: ServerFeatureProviderMap\n isRoot?: boolean\n // other resolved features, which have been loaded before this one. All features declared in 'dependencies' should be available here\n resolvedFeatures: ResolvedServerFeatureMap\n // unSanitized EditorConfig,\n unSanitizedEditorConfig: ServerEditorConfig\n }) =>\n | Promise<ServerFeature<ServerFeatureProps, ClientFeatureProps>>\n | ServerFeature<ServerFeatureProps, ClientFeatureProps>\n key: string\n /** Props which were passed into your feature will have to be passed here. This will allow them to be used / read in other places of the code, e.g. wherever you can use useEditorConfigContext */\n serverFeatureProps: ServerFeatureProps\n}\n\nexport type FeatureProviderProviderClient<ClientFeatureProps> = (\n props?: ClientComponentProps<ClientFeatureProps>,\n) => FeatureProviderClient<ClientFeatureProps>\n\n/**\n * No dependencies => Features need to be sorted on the server first, then sent to client in right order\n */\nexport type FeatureProviderClient<ClientFeatureProps> = {\n /**\n * Return props, to make it easy to retrieve passed in props to this Feature for the client if anyone wants to\n */\n clientFeatureProps: ClientComponentProps<ClientFeatureProps>\n feature: (props: {\n clientFunctions: Record<string, any>\n /** unSanitizedEditorConfig.features, but mapped */\n featureProviderMap: ClientFeatureProviderMap\n // other resolved features, which have been loaded before this one. All features declared in 'dependencies' should be available here\n resolvedFeatures: ResolvedClientFeatureMap\n // unSanitized EditorConfig,\n unSanitizedEditorConfig: ClientEditorConfig\n }) => ClientFeature<ClientFeatureProps>\n}\n\nexport type PluginComponent<ClientFeatureProps = any> = React.FC<{\n clientProps: ClientFeatureProps\n}>\nexport type PluginComponentWithAnchor<ClientFeatureProps = any> = React.FC<{\n anchorElem: HTMLElement\n clientProps: ClientFeatureProps\n}>\n\nexport type ClientFeature<ClientFeatureProps> = {\n /**\n * Return props, to make it easy to retrieve passed in props to this Feature for the client if anyone wants to\n */\n clientFeatureProps: ClientComponentProps<ClientFeatureProps>\n hooks?: {\n load?: ({\n incomingEditorState,\n }: {\n incomingEditorState: SerializedEditorState\n }) => SerializedEditorState\n save?: ({\n incomingEditorState,\n }: {\n incomingEditorState: SerializedEditorState\n }) => SerializedEditorState\n }\n markdownTransformers?: Transformer[]\n nodes?: Array<Klass<LexicalNode> | LexicalNodeReplacement>\n /**\n * Plugins are react components which get added to the editor. You can use them to interact with lexical, e.g. to create a command which creates a node, or opens a modal, or some other more \"outside\" functionality\n */\n plugins?: Array<\n | {\n // plugins are anything which is not directly part of the editor. Like, creating a command which creates a node, or opens a modal, or some other more \"outside\" functionality\n Component: PluginComponent<ClientFeatureProps>\n position: 'bottom' // Determines at which position the Component will be added.\n }\n | {\n // plugins are anything which is not directly part of the editor. Like, creating a command which creates a node, or opens a modal, or some other more \"outside\" functionality\n Component: PluginComponent<ClientFeatureProps>\n position: 'normal' // Determines at which position the Component will be added.\n }\n | {\n // plugins are anything which is not directly part of the editor. Like, creating a command which creates a node, or opens a modal, or some other more \"outside\" functionality\n Component: PluginComponent<ClientFeatureProps>\n position: 'top' // Determines at which position the Component will be added.\n }\n | {\n // plugins are anything which is not directly part of the editor. Like, creating a command which creates a node, or opens a modal, or some other more \"outside\" functionality\n Component: PluginComponentWithAnchor<ClientFeatureProps>\n position: 'floatingAnchorElem' // Determines at which position the Component will be added.\n }\n >\n slashMenu?: {\n /**\n * Dynamic groups allow you to add different groups depending on the query string (so, the text after the slash).\n * Thus, to re-calculate the available groups, this function will be called every time you type after the /.\n *\n * The groups provided by dynamicGroups will be merged with the static groups provided by the groups property.\n */\n dynamicGroups?: ({\n editor,\n queryString,\n }: {\n editor: LexicalEditor\n queryString: string\n }) => SlashMenuGroup[]\n /**\n * Static array of groups together with the items in them. These will always be present.\n * While typing after the /, they will be filtered by the query string and the keywords, key and display name of the items.\n */\n groups?: SlashMenuGroup[]\n }\n /**\n * An opt-in, classic fixed toolbar which stays at the top of the editor\n */\n toolbarFixed?: {\n groups: ToolbarGroup[]\n }\n /**\n * The default, floating toolbar which appears when you select text.\n */\n toolbarInline?: {\n /**\n * Array of toolbar groups / sections. Each section can contain multiple toolbar items.\n */\n groups: ToolbarGroup[]\n }\n}\n\nexport type ClientComponentProps<ClientFeatureProps> = ClientFeatureProps & {\n featureKey: string\n order: number\n}\n\nexport type FieldNodeHookArgs<T extends SerializedLexicalNode> = {\n context: RequestContext\n /** Boolean to denote if this hook is running against finding one, or finding many within the afterRead hook. */\n findMany?: boolean\n /** The value of the field. */\n node?: T\n /** A string relating to which operation the field type is currently executing within. Useful within beforeValidate, beforeChange, and afterChange hooks to differentiate between create and update operations. */\n operation?: 'create' | 'delete' | 'read' | 'update'\n overrideAccess?: boolean\n /** The Express request object. It is mocked for Local API operations. */\n req: PayloadRequestWithData\n}\n\nexport type FieldNodeHook<T extends SerializedLexicalNode> = (\n args: FieldNodeHookArgs<T>,\n) => Promise<T> | T\n\n// Define the node with hooks that use the node's exportJSON return type\nexport type NodeWithHooks<T extends LexicalNode = any> = {\n converters?: {\n html?: HTMLConverter<ReturnType<ReplaceAny<T, LexicalNode>['exportJSON']>>\n }\n hooks?: {\n afterChange?: Array<FieldNodeHook<ReturnType<ReplaceAny<T, LexicalNode>['exportJSON']>>>\n afterRead?: Array<FieldNodeHook<ReturnType<ReplaceAny<T, LexicalNode>['exportJSON']>>>\n beforeChange?: Array<FieldNodeHook<ReturnType<ReplaceAny<T, LexicalNode>['exportJSON']>>>\n /**\n * Runs before a document is duplicated to prevent errors in unique fields or return null to use defaultValue.\n */\n beforeDuplicate?: Array<FieldNodeHook<ReturnType<ReplaceAny<T, LexicalNode>['exportJSON']>>>\n beforeValidate?: Array<FieldNodeHook<ReturnType<ReplaceAny<T, LexicalNode>['exportJSON']>>>\n }\n node: Klass<T> | LexicalNodeReplacement\n populationPromises?: Array<\n PopulationPromise<ReturnType<ReplaceAny<T, LexicalNode>['exportJSON']>>\n >\n validations?: Array<NodeValidation<ReturnType<ReplaceAny<T, LexicalNode>['exportJSON']>>>\n}\n\nexport type ServerFeature<ServerProps, ClientFeatureProps> = {\n ClientComponent?: React.FC<ClientComponentProps<ClientFeatureProps>>\n /**\n * This determines what props will be available on the Client.\n */\n clientFeatureProps?: ClientFeatureProps\n generateComponentMap?: (args: {\n config: SanitizedConfig\n i18n: I18n\n props: ServerProps\n schemaPath: string\n }) => {\n [key: string]: React.FC<{ componentKey: string; featureKey: string }>\n }\n generateSchemaMap?: (args: {\n config: SanitizedConfig\n i18n: I18n\n props: ServerProps\n schemaMap: Map<string, Field[]>\n schemaPath: string\n }) => Map<string, Field[]> | null\n generatedTypes?: {\n modifyOutputSchema: ({\n collectionIDFieldTypes,\n config,\n currentSchema,\n field,\n interfaceNameDefinitions,\n isRequired,\n }: {\n collectionIDFieldTypes: { [key: string]: 'number' | 'string' }\n config?: SanitizedConfig\n /**\n * Current schema which will be modified by this function.\n */\n currentSchema: JSONSchema4\n field: RichTextField<SerializedEditorState, AdapterProps>\n /**\n * Allows you to define new top-level interfaces that can be re-used in the output schema.\n */\n interfaceNameDefinitions: Map<string, JSONSchema4>\n isRequired: boolean\n }) => JSONSchema4\n }\n markdownTransformers?: Transformer[]\n nodes?: Array<NodeWithHooks>\n\n /** Props which were passed into your feature will have to be passed here. This will allow them to be used / read in other places of the code, e.g. wherever you can use useEditorConfigContext */\n serverFeatureProps: ServerProps\n}\n\nexport type ResolvedServerFeature<ServerProps, ClientFeatureProps> = ServerFeature<\n ServerProps,\n ClientFeatureProps\n> &\n Required<\n Pick<\n FeatureProviderServer<ServerProps, ClientFeatureProps>,\n 'dependencies' | 'dependenciesPriority' | 'dependenciesSoft' | 'key'\n >\n > & {\n order: number\n }\n\nexport type ResolvedClientFeature<ClientFeatureProps> = ClientFeature<ClientFeatureProps> & {\n key: string\n order: number\n}\n\nexport type ResolvedServerFeatureMap = Map<string, ResolvedServerFeature<unknown, unknown>>\nexport type ResolvedClientFeatureMap = Map<string, ResolvedClientFeature<unknown>>\n\nexport type ServerFeatureProviderMap = Map<string, FeatureProviderServer<unknown, unknown>>\nexport type ClientFeatureProviderMap = Map<string, FeatureProviderClient<unknown>>\n\n/**\n * Plugins are react components which get added to the editor. You can use them to interact with lexical, e.g. to create a command which creates a node, or opens a modal, or some other more \"outside\" functionality\n */\nexport type SanitizedPlugin =\n | {\n // plugins are anything which is not directly part of the editor. Like, creating a command which creates a node, or opens a modal, or some other more \"outside\" functionality\n Component: PluginComponent\n clientProps: any\n key: string\n position: 'bottom' // Determines at which position the Component will be added.\n }\n | {\n // plugins are anything which is not directly part of the editor. Like, creating a command which creates a node, or opens a modal, or some other more \"outside\" functionality\n Component: PluginComponent\n clientProps: any\n key: string\n position: 'normal' // Determines at which position the Component will be added.\n }\n | {\n // plugins are anything which is not directly part of the editor. Like, creating a command which creates a node, or opens a modal, or some other more \"outside\" functionality\n Component: PluginComponent\n clientProps: any\n key: string\n position: 'top' // Determines at which position the Component will be added.\n }\n | {\n // plugins are anything which is not directly part of the editor. Like, creating a command which creates a node, or opens a modal, or some other more \"outside\" functionality\n Component: PluginComponentWithAnchor\n clientProps: any\n desktopOnly?: boolean\n key: string\n position: 'floatingAnchorElem' // Determines at which position the Component will be added.\n }\n\nexport type SanitizedServerFeatures = Required<\n Pick<ResolvedServerFeature<unknown, unknown>, 'markdownTransformers' | 'nodes'>\n> & {\n /** The node types mapped to their converters */\n converters: {\n html: HTMLConverter[]\n }\n /** The keys of all enabled features */\n enabledFeatures: string[]\n generatedTypes: {\n modifyOutputSchemas: Array<\n ({\n collectionIDFieldTypes,\n config,\n currentSchema,\n field,\n interfaceNameDefinitions,\n isRequired,\n }: {\n collectionIDFieldTypes: { [key: string]: 'number' | 'string' }\n config?: SanitizedConfig\n /**\n * Current schema which will be modified by this function.\n */\n currentSchema: JSONSchema4\n field: RichTextField<SerializedEditorState, AdapterProps>\n /**\n * Allows you to define new top-level interfaces that can be re-used in the output schema.\n */\n interfaceNameDefinitions: Map<string, JSONSchema4>\n isRequired: boolean\n }) => JSONSchema4\n >\n }\n /** The node types mapped to their hooks */\n\n hooks?: {\n afterChange?: Map<string, Array<FieldNodeHook<SerializedLexicalNode>>>\n afterRead?: Map<string, Array<FieldNodeHook<SerializedLexicalNode>>>\n beforeChange?: Map<string, Array<FieldNodeHook<SerializedLexicalNode>>>\n /**\n * Runs before a document is duplicated to prevent errors in unique fields or return null to use defaultValue.\n */\n beforeDuplicate?: Map<string, Array<FieldNodeHook<SerializedLexicalNode>>>\n beforeValidate?: Map<string, Array<FieldNodeHook<SerializedLexicalNode>>>\n } /** The node types mapped to their populationPromises */\n populationPromises: Map<string, Array<PopulationPromise>>\n /** The node types mapped to their validations */\n validations: Map<string, Array<NodeValidation>>\n}\n\nexport type SanitizedClientFeatures = Required<\n Pick<\n ResolvedClientFeature<unknown>,\n 'markdownTransformers' | 'nodes' | 'toolbarFixed' | 'toolbarInline'\n >\n> & {\n /** The keys of all enabled features */\n enabledFeatures: string[]\n hooks: {\n load: Array<\n ({\n incomingEditorState,\n }: {\n incomingEditorState: SerializedEditorState\n }) => SerializedEditorState\n >\n save: Array<\n ({\n incomingEditorState,\n }: {\n incomingEditorState: SerializedEditorState\n }) => SerializedEditorState\n >\n }\n /**\n * Plugins are react components which get added to the editor. You can use them to interact with lexical, e.g. to create a command which creates a node, or opens a modal, or some other more \"outside\" functionality\n */\n plugins?: Array<SanitizedPlugin>\n slashMenu: {\n /**\n * Dynamic groups allow you to add different groups depending on the query string (so, the text after the slash).\n * Thus, to re-calculate the available groups, this function will be called every time you type after the /.\n *\n * The groups provided by dynamicGroups will be merged with the static groups provided by the groups property.\n */\n dynamicGroups: Array<\n ({ editor, queryString }: { editor: LexicalEditor; queryString: string }) => SlashMenuGroup[]\n >\n /**\n * Static array of groups together with the items in them. These will always be present.\n * While typing after the /, they will be filtered by the query string and the keywords, key and display name of the items.\n */\n groups: SlashMenuGroup[]\n }\n}\n"],"names":[],"rangeMappings":"","mappings":"AAuaA,WA4CC"}
1
+ {"version":3,"sources":["../../../src/field/features/types.ts"],"sourcesContent":["import type { Transformer } from '@lexical/markdown'\nimport type { I18n, I18nClient } from '@payloadcms/translations'\nimport type { JSONSchema4 } from 'json-schema'\nimport type { Klass, LexicalEditor, LexicalNode, SerializedEditorState } from 'lexical'\nimport type { SerializedLexicalNode } from 'lexical'\nimport type { LexicalNodeReplacement } from 'lexical'\nimport type { RequestContext } from 'payload'\nimport type { SanitizedConfig } from 'payload/config'\nimport type {\n Field,\n PayloadRequestWithData,\n ReplaceAny,\n RichTextField,\n ValidateOptions,\n} from 'payload/types'\nimport type React from 'react'\n\nimport type { AdapterProps } from '../../types.js'\nimport type { ClientEditorConfig, ServerEditorConfig } from '../lexical/config/types.js'\nimport type { SlashMenuGroup } from '../lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js'\nimport type { HTMLConverter } from './converters/html/converter/types.js'\nimport type { ToolbarGroup } from './toolbars/types.js'\n\nexport type PopulationPromise<T extends SerializedLexicalNode = SerializedLexicalNode> = ({\n context,\n currentDepth,\n depth,\n editorPopulationPromises,\n field,\n fieldPromises,\n findMany,\n flattenLocales,\n node,\n overrideAccess,\n populationPromises,\n req,\n showHiddenFields,\n siblingDoc,\n}: {\n context: RequestContext\n currentDepth: number\n depth: number\n draft: boolean\n /**\n * This maps all population promises to the node type\n */\n editorPopulationPromises: Map<string, Array<PopulationPromise>>\n field: RichTextField<SerializedEditorState, AdapterProps>\n /**\n * fieldPromises are used for things like field hooks. They will be awaited before awaiting populationPromises\n */\n fieldPromises: Promise<void>[]\n findMany: boolean\n flattenLocales: boolean\n node: T\n overrideAccess: boolean\n populationPromises: Promise<void>[]\n req: PayloadRequestWithData\n showHiddenFields: boolean\n siblingDoc: Record<string, unknown>\n}) => void\n\nexport type NodeValidation<T extends SerializedLexicalNode = SerializedLexicalNode> = ({\n node,\n nodeValidations,\n validation,\n}: {\n node: T\n nodeValidations: Map<string, Array<NodeValidation>>\n validation: {\n options: ValidateOptions<unknown, unknown, RichTextField>\n value: SerializedEditorState\n }\n}) => Promise<string | true> | string | true\n\nexport type FeatureProviderProviderServer<ServerFeatureProps, ClientFeatureProps> = (\n props?: ServerFeatureProps,\n) => FeatureProviderServer<ServerFeatureProps, ClientFeatureProps>\n\nexport type FeatureProviderServer<ServerFeatureProps, ClientFeatureProps> = {\n /** Keys of dependencies needed for this feature. These dependencies do not have to be loaded first */\n dependencies?: string[]\n /** Keys of priority dependencies needed for this feature. These dependencies have to be loaded first and are available in the `feature` property*/\n dependenciesPriority?: string[]\n /** Keys of soft-dependencies needed for this feature. The FeatureProviders dependencies are optional, but are considered as last-priority in the loading process */\n dependenciesSoft?: string[]\n\n /**\n * This is being called during the payload sanitization process\n */\n feature: (props: {\n config: SanitizedConfig\n /** unSanitizedEditorConfig.features, but mapped */\n featureProviderMap: ServerFeatureProviderMap\n isRoot?: boolean\n // other resolved features, which have been loaded before this one. All features declared in 'dependencies' should be available here\n resolvedFeatures: ResolvedServerFeatureMap\n // unSanitized EditorConfig,\n unSanitizedEditorConfig: ServerEditorConfig\n }) =>\n | Promise<ServerFeature<ServerFeatureProps, ClientFeatureProps>>\n | ServerFeature<ServerFeatureProps, ClientFeatureProps>\n key: string\n /** Props which were passed into your feature will have to be passed here. This will allow them to be used / read in other places of the code, e.g. wherever you can use useEditorConfigContext */\n serverFeatureProps: ServerFeatureProps\n}\n\nexport type FeatureProviderProviderClient<ClientFeatureProps> = (\n props: ClientComponentProps<ClientFeatureProps>,\n) => FeatureProviderClient<ClientFeatureProps>\n\n/**\n * No dependencies => Features need to be sorted on the server first, then sent to client in right order\n */\nexport type FeatureProviderClient<ClientFeatureProps> = {\n /**\n * Return props, to make it easy to retrieve passed in props to this Feature for the client if anyone wants to\n */\n clientFeatureProps: ClientComponentProps<ClientFeatureProps>\n feature: (props: {\n clientFunctions: Record<string, any>\n /** unSanitizedEditorConfig.features, but mapped */\n featureProviderMap: ClientFeatureProviderMap\n // other resolved features, which have been loaded before this one. All features declared in 'dependencies' should be available here\n resolvedFeatures: ResolvedClientFeatureMap\n // unSanitized EditorConfig,\n unSanitizedEditorConfig: ClientEditorConfig\n }) => ClientFeature<ClientFeatureProps>\n}\n\nexport type PluginComponent<ClientFeatureProps = any> = React.FC<{\n clientProps: ClientFeatureProps\n}>\nexport type PluginComponentWithAnchor<ClientFeatureProps = any> = React.FC<{\n anchorElem: HTMLElement\n clientProps: ClientFeatureProps\n}>\n\nexport type ClientFeature<ClientFeatureProps> = {\n /**\n * Return props, to make it easy to retrieve passed in props to this Feature for the client if anyone wants to\n */\n clientFeatureProps: ClientComponentProps<ClientFeatureProps>\n hooks?: {\n load?: ({\n incomingEditorState,\n }: {\n incomingEditorState: SerializedEditorState\n }) => SerializedEditorState\n save?: ({\n incomingEditorState,\n }: {\n incomingEditorState: SerializedEditorState\n }) => SerializedEditorState\n }\n markdownTransformers?: Transformer[]\n nodes?: Array<Klass<LexicalNode> | LexicalNodeReplacement>\n /**\n * Plugins are react components which get added to the editor. You can use them to interact with lexical, e.g. to create a command which creates a node, or opens a modal, or some other more \"outside\" functionality\n */\n plugins?: Array<\n | {\n // plugins are anything which is not directly part of the editor. Like, creating a command which creates a node, or opens a modal, or some other more \"outside\" functionality\n Component: PluginComponent<ClientFeatureProps>\n position: 'bottom' // Determines at which position the Component will be added.\n }\n | {\n // plugins are anything which is not directly part of the editor. Like, creating a command which creates a node, or opens a modal, or some other more \"outside\" functionality\n Component: PluginComponent<ClientFeatureProps>\n position: 'normal' // Determines at which position the Component will be added.\n }\n | {\n // plugins are anything which is not directly part of the editor. Like, creating a command which creates a node, or opens a modal, or some other more \"outside\" functionality\n Component: PluginComponent<ClientFeatureProps>\n position: 'top' // Determines at which position the Component will be added.\n }\n | {\n // plugins are anything which is not directly part of the editor. Like, creating a command which creates a node, or opens a modal, or some other more \"outside\" functionality\n Component: PluginComponentWithAnchor<ClientFeatureProps>\n position: 'floatingAnchorElem' // Determines at which position the Component will be added.\n }\n >\n slashMenu?: {\n /**\n * Dynamic groups allow you to add different groups depending on the query string (so, the text after the slash).\n * Thus, to re-calculate the available groups, this function will be called every time you type after the /.\n *\n * The groups provided by dynamicGroups will be merged with the static groups provided by the groups property.\n */\n dynamicGroups?: ({\n editor,\n queryString,\n }: {\n editor: LexicalEditor\n queryString: string\n }) => SlashMenuGroup[]\n /**\n * Static array of groups together with the items in them. These will always be present.\n * While typing after the /, they will be filtered by the query string and the keywords, key and display name of the items.\n */\n groups?: SlashMenuGroup[]\n }\n /**\n * An opt-in, classic fixed toolbar which stays at the top of the editor\n */\n toolbarFixed?: {\n groups: ToolbarGroup[]\n }\n /**\n * The default, floating toolbar which appears when you select text.\n */\n toolbarInline?: {\n /**\n * Array of toolbar groups / sections. Each section can contain multiple toolbar items.\n */\n groups: ToolbarGroup[]\n }\n}\n\nexport type ClientComponentProps<ClientFeatureProps> = ClientFeatureProps extends undefined\n ? {\n featureKey: string\n order: number\n }\n : {\n featureKey: string\n order: number\n } & ClientFeatureProps\n\nexport type FieldNodeHookArgs<T extends SerializedLexicalNode> = {\n context: RequestContext\n /** Boolean to denote if this hook is running against finding one, or finding many within the afterRead hook. */\n findMany?: boolean\n /** The value of the field. */\n node?: T\n /** A string relating to which operation the field type is currently executing within. Useful within beforeValidate, beforeChange, and afterChange hooks to differentiate between create and update operations. */\n operation?: 'create' | 'delete' | 'read' | 'update'\n overrideAccess?: boolean\n /** The Express request object. It is mocked for Local API operations. */\n req: PayloadRequestWithData\n}\n\nexport type FieldNodeHook<T extends SerializedLexicalNode> = (\n args: FieldNodeHookArgs<T>,\n) => Promise<T> | T\n\n// Define the node with hooks that use the node's exportJSON return type\nexport type NodeWithHooks<T extends LexicalNode = any> = {\n converters?: {\n html?: HTMLConverter<ReturnType<ReplaceAny<T, LexicalNode>['exportJSON']>>\n }\n hooks?: {\n afterChange?: Array<FieldNodeHook<ReturnType<ReplaceAny<T, LexicalNode>['exportJSON']>>>\n afterRead?: Array<FieldNodeHook<ReturnType<ReplaceAny<T, LexicalNode>['exportJSON']>>>\n beforeChange?: Array<FieldNodeHook<ReturnType<ReplaceAny<T, LexicalNode>['exportJSON']>>>\n /**\n * Runs before a document is duplicated to prevent errors in unique fields or return null to use defaultValue.\n */\n beforeDuplicate?: Array<FieldNodeHook<ReturnType<ReplaceAny<T, LexicalNode>['exportJSON']>>>\n beforeValidate?: Array<FieldNodeHook<ReturnType<ReplaceAny<T, LexicalNode>['exportJSON']>>>\n }\n node: Klass<T> | LexicalNodeReplacement\n populationPromises?: Array<\n PopulationPromise<ReturnType<ReplaceAny<T, LexicalNode>['exportJSON']>>\n >\n validations?: Array<NodeValidation<ReturnType<ReplaceAny<T, LexicalNode>['exportJSON']>>>\n}\n\nexport type ServerFeature<ServerProps, ClientFeatureProps> = {\n ClientComponent?: React.FC<ClientComponentProps<ClientFeatureProps>>\n /**\n * This determines what props will be available on the Client.\n */\n clientFeatureProps?: ClientFeatureProps\n generateComponentMap?: (args: {\n config: SanitizedConfig\n i18n: I18nClient\n props: ServerProps\n schemaPath: string\n }) => {\n [key: string]: React.FC<{ componentKey: string; featureKey: string }>\n }\n generateSchemaMap?: (args: {\n config: SanitizedConfig\n i18n: I18nClient\n props: ServerProps\n schemaMap: Map<string, Field[]>\n schemaPath: string\n }) => Map<string, Field[]> | null\n generatedTypes?: {\n modifyOutputSchema: ({\n collectionIDFieldTypes,\n config,\n currentSchema,\n field,\n interfaceNameDefinitions,\n isRequired,\n }: {\n collectionIDFieldTypes: { [key: string]: 'number' | 'string' }\n config?: SanitizedConfig\n /**\n * Current schema which will be modified by this function.\n */\n currentSchema: JSONSchema4\n field: RichTextField<SerializedEditorState, AdapterProps>\n /**\n * Allows you to define new top-level interfaces that can be re-used in the output schema.\n */\n interfaceNameDefinitions: Map<string, JSONSchema4>\n isRequired: boolean\n }) => JSONSchema4\n }\n markdownTransformers?: Transformer[]\n nodes?: Array<NodeWithHooks>\n\n /** Props which were passed into your feature will have to be passed here. This will allow them to be used / read in other places of the code, e.g. wherever you can use useEditorConfigContext */\n serverFeatureProps: ServerProps\n}\n\nexport type ResolvedServerFeature<ServerProps, ClientFeatureProps> = ServerFeature<\n ServerProps,\n ClientFeatureProps\n> &\n Required<\n Pick<\n FeatureProviderServer<ServerProps, ClientFeatureProps>,\n 'dependencies' | 'dependenciesPriority' | 'dependenciesSoft' | 'key'\n >\n > & {\n order: number\n }\n\nexport type ResolvedClientFeature<ClientFeatureProps> = ClientFeature<ClientFeatureProps> & {\n key: string\n order: number\n}\n\nexport type ResolvedServerFeatureMap = Map<string, ResolvedServerFeature<unknown, unknown>>\nexport type ResolvedClientFeatureMap = Map<string, ResolvedClientFeature<unknown>>\n\nexport type ServerFeatureProviderMap = Map<string, FeatureProviderServer<unknown, unknown>>\nexport type ClientFeatureProviderMap = Map<string, FeatureProviderClient<unknown>>\n\n/**\n * Plugins are react components which get added to the editor. You can use them to interact with lexical, e.g. to create a command which creates a node, or opens a modal, or some other more \"outside\" functionality\n */\nexport type SanitizedPlugin =\n | {\n // plugins are anything which is not directly part of the editor. Like, creating a command which creates a node, or opens a modal, or some other more \"outside\" functionality\n Component: PluginComponent\n clientProps: any\n key: string\n position: 'bottom' // Determines at which position the Component will be added.\n }\n | {\n // plugins are anything which is not directly part of the editor. Like, creating a command which creates a node, or opens a modal, or some other more \"outside\" functionality\n Component: PluginComponent\n clientProps: any\n key: string\n position: 'normal' // Determines at which position the Component will be added.\n }\n | {\n // plugins are anything which is not directly part of the editor. Like, creating a command which creates a node, or opens a modal, or some other more \"outside\" functionality\n Component: PluginComponent\n clientProps: any\n key: string\n position: 'top' // Determines at which position the Component will be added.\n }\n | {\n // plugins are anything which is not directly part of the editor. Like, creating a command which creates a node, or opens a modal, or some other more \"outside\" functionality\n Component: PluginComponentWithAnchor\n clientProps: any\n desktopOnly?: boolean\n key: string\n position: 'floatingAnchorElem' // Determines at which position the Component will be added.\n }\n\nexport type SanitizedServerFeatures = Required<\n Pick<ResolvedServerFeature<unknown, unknown>, 'markdownTransformers' | 'nodes'>\n> & {\n /** The node types mapped to their converters */\n converters: {\n html: HTMLConverter[]\n }\n /** The keys of all enabled features */\n enabledFeatures: string[]\n generatedTypes: {\n modifyOutputSchemas: Array<\n ({\n collectionIDFieldTypes,\n config,\n currentSchema,\n field,\n interfaceNameDefinitions,\n isRequired,\n }: {\n collectionIDFieldTypes: { [key: string]: 'number' | 'string' }\n config?: SanitizedConfig\n /**\n * Current schema which will be modified by this function.\n */\n currentSchema: JSONSchema4\n field: RichTextField<SerializedEditorState, AdapterProps>\n /**\n * Allows you to define new top-level interfaces that can be re-used in the output schema.\n */\n interfaceNameDefinitions: Map<string, JSONSchema4>\n isRequired: boolean\n }) => JSONSchema4\n >\n }\n /** The node types mapped to their hooks */\n\n hooks?: {\n afterChange?: Map<string, Array<FieldNodeHook<SerializedLexicalNode>>>\n afterRead?: Map<string, Array<FieldNodeHook<SerializedLexicalNode>>>\n beforeChange?: Map<string, Array<FieldNodeHook<SerializedLexicalNode>>>\n /**\n * Runs before a document is duplicated to prevent errors in unique fields or return null to use defaultValue.\n */\n beforeDuplicate?: Map<string, Array<FieldNodeHook<SerializedLexicalNode>>>\n beforeValidate?: Map<string, Array<FieldNodeHook<SerializedLexicalNode>>>\n } /** The node types mapped to their populationPromises */\n populationPromises: Map<string, Array<PopulationPromise>>\n /** The node types mapped to their validations */\n validations: Map<string, Array<NodeValidation>>\n}\n\nexport type SanitizedClientFeatures = Required<\n Pick<\n ResolvedClientFeature<unknown>,\n 'markdownTransformers' | 'nodes' | 'toolbarFixed' | 'toolbarInline'\n >\n> & {\n /** The keys of all enabled features */\n enabledFeatures: string[]\n hooks: {\n load: Array<\n ({\n incomingEditorState,\n }: {\n incomingEditorState: SerializedEditorState\n }) => SerializedEditorState\n >\n save: Array<\n ({\n incomingEditorState,\n }: {\n incomingEditorState: SerializedEditorState\n }) => SerializedEditorState\n >\n }\n /**\n * Plugins are react components which get added to the editor. You can use them to interact with lexical, e.g. to create a command which creates a node, or opens a modal, or some other more \"outside\" functionality\n */\n plugins?: Array<SanitizedPlugin>\n slashMenu: {\n /**\n * Dynamic groups allow you to add different groups depending on the query string (so, the text after the slash).\n * Thus, to re-calculate the available groups, this function will be called every time you type after the /.\n *\n * The groups provided by dynamicGroups will be merged with the static groups provided by the groups property.\n */\n dynamicGroups: Array<\n ({ editor, queryString }: { editor: LexicalEditor; queryString: string }) => SlashMenuGroup[]\n >\n /**\n * Static array of groups together with the items in them. These will always be present.\n * While typing after the /, they will be filtered by the query string and the keywords, key and display name of the items.\n */\n groups: SlashMenuGroup[]\n }\n}\n"],"names":[],"rangeMappings":"","mappings":"AA4aA,WA4CC"}
@@ -6,5 +6,8 @@ export type UploadFeaturePropsClient = {
6
6
  };
7
7
  };
8
8
  };
9
- export declare const UploadFeatureClientComponent: import("react").FC<import("../types.js").ClientComponentProps<UploadFeaturePropsClient>>;
9
+ export declare const UploadFeatureClientComponent: import("react").FC<{
10
+ featureKey: string;
11
+ order: number;
12
+ } & UploadFeaturePropsClient>;
10
13
  //# sourceMappingURL=feature.client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../src/field/features/upload/feature.client.tsx"],"names":[],"mappings":";AAaA,MAAM,MAAM,wBAAwB,GAAG;IACrC,WAAW,EAAE;QACX,CAAC,UAAU,EAAE,MAAM,GAAG;YACpB,cAAc,EAAE,OAAO,CAAA;SACxB,CAAA;KACF,CAAA;CACF,CAAA;AA+DD,eAAO,MAAM,4BAA4B,0FAA6C,CAAA"}
1
+ {"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../src/field/features/upload/feature.client.tsx"],"names":[],"mappings":";AAaA,MAAM,MAAM,wBAAwB,GAAG;IACrC,WAAW,EAAE;QACX,CAAC,UAAU,EAAE,MAAM,GAAG;YACpB,cAAc,EAAE,OAAO,CAAA;SACxB,CAAA;KACF,CAAA;CACF,CAAA;AA+DD,eAAO,MAAM,4BAA4B;;;6BAA6C,CAAA"}
@@ -14,6 +14,10 @@
14
14
  position: relative;
15
15
  }
16
16
 
17
+ .editor .ContentEditable__root {
18
+ min-height: base(10);
19
+ }
20
+
17
21
  &--read-only {
18
22
  .editor-shell {
19
23
  .editor {
@@ -1,4 +1,4 @@
1
- import type { I18n } from '@payloadcms/translations';
1
+ import type { I18nClient } from '@payloadcms/translations';
2
2
  import type { LexicalEditor } from 'lexical';
3
3
  import type { MutableRefObject } from 'react';
4
4
  import type React from 'react';
@@ -8,7 +8,7 @@ export type SlashMenuItem = {
8
8
  keyboardShortcut?: string;
9
9
  keywords?: Array<string>;
10
10
  label?: (({ i18n }: {
11
- i18n: I18n;
11
+ i18n: I18nClient;
12
12
  }) => string) | string;
13
13
  onSelect: ({ editor, queryString }: {
14
14
  editor: LexicalEditor;
@@ -19,7 +19,7 @@ export type SlashMenuGroup = {
19
19
  items: Array<SlashMenuItem>;
20
20
  key: string;
21
21
  label?: (({ i18n }: {
22
- i18n: I18n;
22
+ i18n: I18nClient;
23
23
  }) => string) | string;
24
24
  };
25
25
  export type SlashMenuItemInternal = SlashMenuItem & {
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAA;AACpD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAC5C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,OAAO,CAAA;AAC7C,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,MAAM,MAAM,aAAa,GAAG;IAE1B,IAAI,EAAE,KAAK,CAAC,EAAE,CAAA;IAGd,GAAG,EAAE,MAAM,CAAA;IAEX,gBAAgB,CAAC,EAAE,MAAM,CAAA;IAE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d,GAAG,EAAE,MAAM,CAAA;IAEX,gBAAgB,CAAC,EAAE,MAAM,CAAA;IAEzB,QAAQ,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAA;IACxB,KAAK,CAAC,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE;QAAE,IAAI,EAAE,UAAU,CAAA;KAAE,KAAK,MAAM,CAAC,GAAG,MAAM,CAAA;IAE7D,QAAQ,EAAE,CAAC,EAAE,MAAM,EAAE,WAAW,EAAE,EAAE;QAAE,MAAM,EAAE,aAAa,CAAC;QAAC,WAAW,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAA;CAC5F,CAAA;AAED,MAAM,MAAM,cAAc,GAAG;IAC3B,KAAK,EAAE,KAAK,CAAC,aAAa,CAAC,CAAA;IAC3B,GAAG,EAAE,MAAM,CAAA;IAEX,KAAK,CAAC,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE;QAAE,IAAI,EAAE,UAAU,CAAA;KAAE,KAAK,MAAM,CAAC,GAAG,MAAM,CAAA;CAC9D,CAAA;AAED,MAAM,MAAM,qBAAqB,GAAG,aAAa,GAAG;IAClD,GAAG,EAAE,gBAAgB,CAAC,iBAAiB,GAAG,IAAI,CAAC,CAAA;CAChD,CAAA;AAED,MAAM,MAAM,sBAAsB,GAAG,cAAc,GAAG;IACpD,KAAK,EAAE,KAAK,CAAC,qBAAqB,CAAC,CAAA;CACpC,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../src/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.ts"],"sourcesContent":["import type { I18n } from '@payloadcms/translations'\nimport type { LexicalEditor } from 'lexical'\nimport type { MutableRefObject } from 'react'\nimport type React from 'react'\n\nexport type SlashMenuItem = {\n // Icon for display\n Icon: React.FC\n\n // Used for class names and, if label is not provided, for display.\n key: string\n // TBD\n keyboardShortcut?: string\n // For extra searching.\n keywords?: Array<string>\n label?: (({ i18n }: { i18n: I18n }) => string) | string\n // What happens when you select this item?\n onSelect: ({ editor, queryString }: { editor: LexicalEditor; queryString: string }) => void\n}\n\nexport type SlashMenuGroup = {\n items: Array<SlashMenuItem>\n key: string\n // Used for class names and, if label is not provided, for display.\n label?: (({ i18n }: { i18n: I18n }) => string) | string\n}\n\nexport type SlashMenuItemInternal = SlashMenuItem & {\n ref: MutableRefObject<HTMLButtonElement | null>\n}\n\nexport type SlashMenuGroupInternal = SlashMenuGroup & {\n items: Array<SlashMenuItemInternal>\n}\n"],"names":[],"rangeMappings":"","mappings":"AA+BA,WAEC"}
1
+ {"version":3,"sources":["../../../../../../src/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.ts"],"sourcesContent":["import type { I18n, I18nClient } from '@payloadcms/translations'\nimport type { LexicalEditor } from 'lexical'\nimport type { MutableRefObject } from 'react'\nimport type React from 'react'\n\nexport type SlashMenuItem = {\n // Icon for display\n Icon: React.FC\n\n // Used for class names and, if label is not provided, for display.\n key: string\n // TBD\n keyboardShortcut?: string\n // For extra searching.\n keywords?: Array<string>\n label?: (({ i18n }: { i18n: I18nClient }) => string) | string\n // What happens when you select this item?\n onSelect: ({ editor, queryString }: { editor: LexicalEditor; queryString: string }) => void\n}\n\nexport type SlashMenuGroup = {\n items: Array<SlashMenuItem>\n key: string\n // Used for class names and, if label is not provided, for display.\n label?: (({ i18n }: { i18n: I18nClient }) => string) | string\n}\n\nexport type SlashMenuItemInternal = SlashMenuItem & {\n ref: MutableRefObject<HTMLButtonElement | null>\n}\n\nexport type SlashMenuGroupInternal = SlashMenuGroup & {\n items: Array<SlashMenuItemInternal>\n}\n"],"names":[],"rangeMappings":"","mappings":"AA+BA,WAEC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@payloadcms/richtext-lexical",
3
- "version": "3.0.0-beta.30",
3
+ "version": "3.0.0-beta.31",
4
4
  "description": "The officially supported Lexical richtext adapter for Payload",
5
5
  "homepage": "https://payloadcms.com",
6
6
  "repository": {
@@ -56,19 +56,19 @@
56
56
  "@types/node": "20.12.5",
57
57
  "@types/react": "18.2.74",
58
58
  "@types/react-dom": "18.2.24",
59
- "@payloadcms/ui": "3.0.0-beta.30",
60
- "payload": "3.0.0-beta.30",
61
59
  "@payloadcms/eslint-config": "1.1.1",
62
- "@payloadcms/next": "3.0.0-beta.30",
63
- "@payloadcms/translations": "3.0.0-beta.30"
60
+ "@payloadcms/ui": "3.0.0-beta.31",
61
+ "@payloadcms/translations": "3.0.0-beta.31",
62
+ "@payloadcms/next": "3.0.0-beta.31",
63
+ "payload": "3.0.0-beta.31"
64
64
  },
65
65
  "peerDependencies": {
66
66
  "react": "^16.8.0 || ^17.0.0 || ^18.0.0",
67
67
  "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0",
68
- "@payloadcms/next": "3.0.0-beta.30",
69
- "@payloadcms/ui": "3.0.0-beta.30",
70
- "payload": "3.0.0-beta.30",
71
- "@payloadcms/translations": "3.0.0-beta.30"
68
+ "@payloadcms/next": "3.0.0-beta.31",
69
+ "@payloadcms/translations": "3.0.0-beta.31",
70
+ "@payloadcms/ui": "3.0.0-beta.31",
71
+ "payload": "3.0.0-beta.31"
72
72
  },
73
73
  "engines": {
74
74
  "node": ">=18.20.2"