@payloadcms/richtext-lexical 3.0.0-beta.1 → 3.0.0-beta.10

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 (66) hide show
  1. package/dist/field/features/converters/html/field/index.d.ts +8 -2
  2. package/dist/field/features/converters/html/field/index.d.ts.map +1 -1
  3. package/dist/field/features/converters/html/field/index.js +6 -3
  4. package/dist/field/features/converters/html/field/index.js.map +1 -1
  5. package/dist/field/features/horizontalrule/component/index.d.ts +10 -0
  6. package/dist/field/features/horizontalrule/component/index.d.ts.map +1 -0
  7. package/dist/field/features/horizontalrule/component/index.js +64 -0
  8. package/dist/field/features/horizontalrule/component/index.js.map +1 -0
  9. package/dist/field/features/horizontalrule/feature.client.d.ts +3 -0
  10. package/dist/field/features/horizontalrule/feature.client.d.ts.map +1 -0
  11. package/dist/field/features/horizontalrule/feature.client.js +53 -0
  12. package/dist/field/features/horizontalrule/feature.client.js.map +1 -0
  13. package/dist/field/features/horizontalrule/feature.server.d.ts +3 -0
  14. package/dist/field/features/horizontalrule/feature.server.d.ts.map +1 -0
  15. package/dist/field/features/horizontalrule/feature.server.js +36 -0
  16. package/dist/field/features/horizontalrule/feature.server.js.map +1 -0
  17. package/dist/field/features/horizontalrule/markdownTransformer.d.ts +3 -0
  18. package/dist/field/features/horizontalrule/markdownTransformer.d.ts.map +1 -0
  19. package/dist/field/features/horizontalrule/markdownTransformer.js +23 -0
  20. package/dist/field/features/horizontalrule/markdownTransformer.js.map +1 -0
  21. package/dist/field/features/horizontalrule/nodes/HorizontalRuleNode.d.ts +55 -0
  22. package/dist/field/features/horizontalrule/nodes/HorizontalRuleNode.d.ts.map +1 -0
  23. package/dist/field/features/horizontalrule/nodes/HorizontalRuleNode.js +89 -0
  24. package/dist/field/features/horizontalrule/nodes/HorizontalRuleNode.js.map +1 -0
  25. package/dist/field/features/horizontalrule/plugin/index.d.ts +6 -0
  26. package/dist/field/features/horizontalrule/plugin/index.d.ts.map +1 -0
  27. package/dist/field/features/horizontalrule/plugin/index.js +34 -0
  28. package/dist/field/features/horizontalrule/plugin/index.js.map +1 -0
  29. package/dist/field/features/horizontalrule/plugin/index.scss +20 -0
  30. package/dist/field/features/lists/htmlConverter.d.ts.map +1 -1
  31. package/dist/field/features/lists/htmlConverter.js +12 -4
  32. package/dist/field/features/lists/htmlConverter.js.map +1 -1
  33. package/dist/field/features/upload/validate.d.ts.map +1 -1
  34. package/dist/field/features/upload/validate.js +4 -6
  35. package/dist/field/features/upload/validate.js.map +1 -1
  36. package/dist/field/lexical/config/server/default.d.ts.map +1 -1
  37. package/dist/field/lexical/config/server/default.js +3 -1
  38. package/dist/field/lexical/config/server/default.js.map +1 -1
  39. package/dist/field/lexical/plugins/handles/AddBlockHandlePlugin/index.d.ts.map +1 -1
  40. package/dist/field/lexical/plugins/handles/AddBlockHandlePlugin/index.js +11 -6
  41. package/dist/field/lexical/plugins/handles/AddBlockHandlePlugin/index.js.map +1 -1
  42. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/index.d.ts.map +1 -1
  43. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/index.js +8 -3
  44. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/index.js.map +1 -1
  45. package/dist/field/lexical/plugins/handles/utils/doesLineHeightAffectElement.d.ts +9 -0
  46. package/dist/field/lexical/plugins/handles/utils/doesLineHeightAffectElement.d.ts.map +1 -0
  47. package/dist/field/lexical/plugins/handles/utils/doesLineHeightAffectElement.js +35 -0
  48. package/dist/field/lexical/plugins/handles/utils/doesLineHeightAffectElement.js.map +1 -0
  49. package/dist/field/lexical/plugins/handles/utils/setHandlePosition.d.ts +1 -1
  50. package/dist/field/lexical/plugins/handles/utils/setHandlePosition.d.ts.map +1 -1
  51. package/dist/field/lexical/plugins/handles/utils/setHandlePosition.js +17 -7
  52. package/dist/field/lexical/plugins/handles/utils/setHandlePosition.js.map +1 -1
  53. package/dist/field/lexical/theme/EditorTheme.scss +4 -0
  54. package/dist/field/lexical/ui/icons/HorizontalRule/index.d.ts +3 -0
  55. package/dist/field/lexical/ui/icons/HorizontalRule/index.d.ts.map +1 -0
  56. package/dist/field/lexical/ui/icons/HorizontalRule/index.js +19 -0
  57. package/dist/field/lexical/ui/icons/HorizontalRule/index.js.map +1 -0
  58. package/dist/generateComponentMap.d.ts.map +1 -1
  59. package/dist/generateComponentMap.js +4 -2
  60. package/dist/generateComponentMap.js.map +1 -1
  61. package/dist/scss/app.scss +2 -3
  62. package/dist/scss/vars.scss +0 -7
  63. package/package.json +14 -14
  64. package/components.d.ts +0 -6
  65. package/components.js +0 -7
  66. package/dist/scss/fonts.scss +0 -75
@@ -0,0 +1,19 @@
1
+ import React from 'react';
2
+ export const HorizontalRuleIcon = ()=>/*#__PURE__*/ React.createElement("svg", {
3
+ "aria-hidden": "true",
4
+ className: "icon",
5
+ fill: "none",
6
+ focusable: "false",
7
+ height: "20",
8
+ viewBox: "0 0 20 20",
9
+ width: "20",
10
+ xmlns: "http://www.w3.org/2000/svg"
11
+ }, /*#__PURE__*/ React.createElement("rect", {
12
+ fill: "currentColor",
13
+ height: "1",
14
+ width: "12",
15
+ x: "4",
16
+ y: "9.5"
17
+ }));
18
+
19
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../src/field/lexical/ui/icons/HorizontalRule/index.tsx"],"sourcesContent":["import React from 'react'\n\nexport const HorizontalRuleIcon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"icon\"\n fill=\"none\"\n focusable=\"false\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n width=\"20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <rect fill=\"currentColor\" height=\"1\" width=\"12\" x=\"4\" y=\"9.5\" />\n </svg>\n)\n"],"names":["React","HorizontalRuleIcon","svg","aria-hidden","className","fill","focusable","height","viewBox","width","xmlns","rect","x","y"],"rangeMappings":";;;;;;;;;;;;;;;;","mappings":"AAAA,OAAOA,WAAW,QAAO;AAEzB,OAAO,MAAMC,qBAA+B,kBAC1C,oBAACC;QACCC,eAAY;QACZC,WAAU;QACVC,MAAK;QACLC,WAAU;QACVC,QAAO;QACPC,SAAQ;QACRC,OAAM;QACNC,OAAM;qBAEN,oBAACC;QAAKN,MAAK;QAAeE,QAAO;QAAIE,OAAM;QAAKG,GAAE;QAAIC,GAAE;QAE3D"}
@@ -1 +1 @@
1
- {"version":3,"file":"generateComponentMap.d.ts","sourceRoot":"","sources":["../src/generateComponentMap.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AAMpD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAA;AAKzE,eAAO,MAAM,uBAAuB,SAC3B;IACL,kBAAkB,EAAE,wBAAwB,CAAA;CAC7C,KAAG,eAAe,CAAC,sBAAsB,CAkHzC,CAAA"}
1
+ {"version":3,"file":"generateComponentMap.d.ts","sourceRoot":"","sources":["../src/generateComponentMap.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AAMpD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAA;AAKzE,eAAO,MAAM,uBAAuB,SAC3B;IACL,kBAAkB,EAAE,wBAAwB,CAAA;CAC7C,KAAG,eAAe,CAAC,sBAAsB,CAoHzC,CAAA"}
@@ -2,7 +2,7 @@ import { mapFields } from '@payloadcms/ui/utilities/buildComponentMap';
2
2
  import { sanitizeFields } from 'payload/config';
3
3
  import React from 'react';
4
4
  import { cloneDeep } from './field/lexical/utils/cloneDeep.js';
5
- export const getGenerateComponentMap = (args)=>({ config, i18n, schemaPath })=>{
5
+ export const getGenerateComponentMap = (args)=>({ WithServerSideProps, config, i18n, schemaPath })=>{
6
6
  const validRelationships = config.collections.map((c)=>c.slug) || [];
7
7
  const componentMap = new Map();
8
8
  // turn args.resolvedFeatureMap into an array of [key, value] pairs, ordered by value.order, lowest order first:
@@ -22,7 +22,8 @@ export const getGenerateComponentMap = (args)=>({ config, i18n, schemaPath })=>{
22
22
  for(const componentKey in components){
23
23
  const Component = components[componentKey];
24
24
  if (Component) {
25
- componentMap.set(`feature.${featureKey}.components.${componentKey}`, /*#__PURE__*/ React.createElement(Component, {
25
+ componentMap.set(`feature.${featureKey}.components.${componentKey}`, /*#__PURE__*/ React.createElement(WithServerSideProps, {
26
+ Component: Component,
26
27
  componentKey: componentKey,
27
28
  featureKey: resolvedFeature.key,
28
29
  key: `${resolvedFeature.key}-${componentKey}`
@@ -49,6 +50,7 @@ export const getGenerateComponentMap = (args)=>({ config, i18n, schemaPath })=>{
49
50
  validRelationships
50
51
  });
51
52
  const mappedFields = mapFields({
53
+ WithServerSideProps,
52
54
  config,
53
55
  disableAddingID: true,
54
56
  fieldSchema: sanitizedFields,
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/generateComponentMap.tsx"],"sourcesContent":["import type { RichTextAdapter } from 'payload/types'\n\nimport { mapFields } from '@payloadcms/ui/utilities/buildComponentMap'\nimport { sanitizeFields } from 'payload/config'\nimport React from 'react'\n\nimport type { ResolvedServerFeatureMap } from './field/features/types.js'\nimport type { GeneratedFeatureProviderComponent } from './types.js'\n\nimport { cloneDeep } from './field/lexical/utils/cloneDeep.js'\n\nexport const getGenerateComponentMap =\n (args: {\n resolvedFeatureMap: ResolvedServerFeatureMap\n }): RichTextAdapter['generateComponentMap'] =>\n ({ config, i18n, schemaPath }) => {\n const validRelationships = config.collections.map((c) => c.slug) || []\n\n const componentMap = new Map()\n\n // turn args.resolvedFeatureMap into an array of [key, value] pairs, ordered by value.order, lowest order first:\n const resolvedFeatureMapArray = Array.from(args.resolvedFeatureMap.entries()).sort(\n (a, b) => a[1].order - b[1].order,\n )\n\n componentMap.set(\n `features`,\n resolvedFeatureMapArray\n .map(([featureKey, resolvedFeature]) => {\n const ClientComponent = resolvedFeature.ClientComponent\n const clientComponentProps = resolvedFeature.clientFeatureProps\n\n /**\n * Handle Feature Component Maps\n */\n if (\n 'generateComponentMap' in resolvedFeature &&\n typeof resolvedFeature.generateComponentMap === 'function'\n ) {\n const components = resolvedFeature.generateComponentMap({\n config,\n i18n,\n props: resolvedFeature.serverFeatureProps,\n schemaPath,\n })\n\n for (const componentKey in components) {\n const Component = components[componentKey]\n\n if (Component) {\n componentMap.set(\n `feature.${featureKey}.components.${componentKey}`,\n <Component\n componentKey={componentKey}\n featureKey={resolvedFeature.key}\n key={`${resolvedFeature.key}-${componentKey}`}\n />,\n )\n }\n }\n }\n\n /**\n * Handle Feature Schema Maps (rendered fields)\n */\n if (\n 'generateSchemaMap' in resolvedFeature &&\n typeof resolvedFeature.generateSchemaMap === 'function'\n ) {\n const schemas = resolvedFeature.generateSchemaMap({\n config,\n i18n,\n props: resolvedFeature.serverFeatureProps,\n schemaMap: new Map(),\n schemaPath,\n })\n\n for (const schemaKey in schemas) {\n const fields = schemas[schemaKey]\n\n const sanitizedFields = sanitizeFields({\n config,\n fields: cloneDeep(fields),\n requireFieldLevelRichTextEditor: true,\n validRelationships,\n })\n\n const mappedFields = mapFields({\n config,\n disableAddingID: true,\n fieldSchema: sanitizedFields,\n i18n,\n parentPath: `${schemaPath}.feature.${featureKey}.fields.${schemaKey}`,\n readOnly: false,\n })\n\n componentMap.set(`feature.${featureKey}.fields.${schemaKey}`, mappedFields)\n }\n }\n\n if (!ClientComponent) {\n return null\n }\n\n return {\n ClientComponent:\n clientComponentProps && typeof clientComponentProps === 'object' ? (\n <ClientComponent\n {...clientComponentProps}\n featureKey={resolvedFeature.key}\n key={resolvedFeature.key}\n order={resolvedFeature.order}\n />\n ) : (\n <ClientComponent\n featureKey={resolvedFeature.key}\n key={resolvedFeature.key}\n order={resolvedFeature.order}\n />\n ),\n key: resolvedFeature.key,\n order: resolvedFeature.order,\n } as GeneratedFeatureProviderComponent\n })\n .filter((feature) => feature !== null),\n )\n\n return componentMap\n }\n"],"names":["mapFields","sanitizeFields","React","cloneDeep","getGenerateComponentMap","args","config","i18n","schemaPath","validRelationships","collections","map","c","slug","componentMap","Map","resolvedFeatureMapArray","Array","from","resolvedFeatureMap","entries","sort","a","b","order","set","featureKey","resolvedFeature","ClientComponent","clientComponentProps","clientFeatureProps","generateComponentMap","components","props","serverFeatureProps","componentKey","Component","key","generateSchemaMap","schemas","schemaMap","schemaKey","fields","sanitizedFields","requireFieldLevelRichTextEditor","mappedFields","disableAddingID","fieldSchema","parentPath","readOnly","filter","feature"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAEA,SAASA,SAAS,QAAQ,6CAA4C;AACtE,SAASC,cAAc,QAAQ,iBAAgB;AAC/C,OAAOC,WAAW,QAAO;AAKzB,SAASC,SAAS,QAAQ,qCAAoC;AAE9D,OAAO,MAAMC,0BACX,CAACC,OAGD,CAAC,EAAEC,MAAM,EAAEC,IAAI,EAAEC,UAAU,EAAE;QAC3B,MAAMC,qBAAqBH,OAAOI,WAAW,CAACC,GAAG,CAAC,CAACC,IAAMA,EAAEC,IAAI,KAAK,EAAE;QAEtE,MAAMC,eAAe,IAAIC;QAEzB,gHAAgH;QAChH,MAAMC,0BAA0BC,MAAMC,IAAI,CAACb,KAAKc,kBAAkB,CAACC,OAAO,IAAIC,IAAI,CAChF,CAACC,GAAGC,IAAMD,CAAC,CAAC,EAAE,CAACE,KAAK,GAAGD,CAAC,CAAC,EAAE,CAACC,KAAK;QAGnCV,aAAaW,GAAG,CACd,CAAC,QAAQ,CAAC,EACVT,wBACGL,GAAG,CAAC,CAAC,CAACe,YAAYC,gBAAgB;YACjC,MAAMC,kBAAkBD,gBAAgBC,eAAe;YACvD,MAAMC,uBAAuBF,gBAAgBG,kBAAkB;YAE/D;;WAEC,GACD,IACE,0BAA0BH,mBAC1B,OAAOA,gBAAgBI,oBAAoB,KAAK,YAChD;gBACA,MAAMC,aAAaL,g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YC,gBAAgBU,GAAG;oBAC/BA,KAAKV,gBAAgBU,GAAG;oBACxBb,OAAOG,gBAAgBH,KAAK;mCAG9B,oBAACI;oBACCF,YAAYC,gBAAgBU,GAAG;oBAC/BA,KAAKV,gBAAgBU,GAAG;oBACxBb,OAAOG,gBAAgBH,KAAK;;gBAGlCa,KAAKV,gBAAgBU,GAAG;gBACxBb,OAAOG,gBAAgBH,KAAK;YAC9B;QACF,GACC0B,MAAM,CAAC,CAACC,UAAYA,YAAY;QAGrC,OAAOrC;IACT,EAAC"}
1
+ {"version":3,"sources":["../src/generateComponentMap.tsx"],"sourcesContent":["import type { RichTextAdapter } from 'payload/types'\n\nimport { mapFields } from '@payloadcms/ui/utilities/buildComponentMap'\nimport { sanitizeFields } from 'payload/config'\nimport React from 'react'\n\nimport type { ResolvedServerFeatureMap } from './field/features/types.js'\nimport type { GeneratedFeatureProviderComponent } from './types.js'\n\nimport { cloneDeep } from './field/lexical/utils/cloneDeep.js'\n\nexport const getGenerateComponentMap =\n (args: {\n resolvedFeatureMap: ResolvedServerFeatureMap\n }): RichTextAdapter['generateComponentMap'] =>\n ({ WithServerSideProps, config, i18n, schemaPath }) => {\n const validRelationships = config.collections.map((c) => c.slug) || []\n\n const componentMap = new Map()\n\n // turn args.resolvedFeatureMap into an array of [key, value] pairs, ordered by value.order, lowest order first:\n const resolvedFeatureMapArray = Array.from(args.resolvedFeatureMap.entries()).sort(\n (a, b) => a[1].order - b[1].order,\n )\n\n componentMap.set(\n `features`,\n resolvedFeatureMapArray\n .map(([featureKey, resolvedFeature]) => {\n const ClientComponent = resolvedFeature.ClientComponent\n const clientComponentProps = resolvedFeature.clientFeatureProps\n\n /**\n * Handle Feature Component Maps\n */\n if (\n 'generateComponentMap' in resolvedFeature &&\n typeof resolvedFeature.generateComponentMap === 'function'\n ) {\n const components = resolvedFeature.generateComponentMap({\n config,\n i18n,\n props: resolvedFeature.serverFeatureProps,\n schemaPath,\n })\n\n for (const componentKey in components) {\n const Component = components[componentKey]\n\n if (Component) {\n componentMap.set(\n `feature.${featureKey}.components.${componentKey}`,\n <WithServerSideProps\n Component={Component}\n componentKey={componentKey}\n featureKey={resolvedFeature.key}\n key={`${resolvedFeature.key}-${componentKey}`}\n />,\n )\n }\n }\n }\n\n /**\n * Handle Feature Schema Maps (rendered fields)\n */\n if (\n 'generateSchemaMap' in resolvedFeature &&\n typeof resolvedFeature.generateSchemaMap === 'function'\n ) {\n const schemas = resolvedFeature.generateSchemaMap({\n config,\n i18n,\n props: resolvedFeature.serverFeatureProps,\n schemaMap: new Map(),\n schemaPath,\n })\n\n for (const schemaKey in schemas) {\n const fields = schemas[schemaKey]\n\n const sanitizedFields = sanitizeFields({\n config,\n fields: cloneDeep(fields),\n requireFieldLevelRichTextEditor: true,\n validRelationships,\n })\n\n const mappedFields = mapFields({\n WithServerSideProps,\n config,\n disableAddingID: true,\n fieldSchema: sanitizedFields,\n i18n,\n parentPath: `${schemaPath}.feature.${featureKey}.fields.${schemaKey}`,\n readOnly: false,\n })\n\n componentMap.set(`feature.${featureKey}.fields.${schemaKey}`, mappedFields)\n }\n }\n\n if (!ClientComponent) {\n return null\n }\n\n return {\n ClientComponent:\n clientComponentProps && typeof clientComponentProps === 'object' ? (\n <ClientComponent\n {...clientComponentProps}\n featureKey={resolvedFeature.key}\n key={resolvedFeature.key}\n order={resolvedFeature.order}\n />\n ) : (\n <ClientComponent\n featureKey={resolvedFeature.key}\n key={resolvedFeature.key}\n order={resolvedFeature.order}\n />\n ),\n key: resolvedFeature.key,\n order: resolvedFeature.order,\n } as GeneratedFeatureProviderComponent\n })\n .filter((feature) => feature !== null),\n )\n\n return componentMap\n }\n"],"names":["mapFields","sanitizeFields","React","cloneDeep","getGenerateComponentMap","args","WithServerSideProps","config","i18n","schemaPath","validRelationships","collections","map","c","slug","componentMap","Map","resolvedFeatureMapArray","Array","from","resolvedFeatureMap","entries","sort","a","b","order","set","featureKey","resolvedFeature","ClientComponent","clientComponentProps","clientFeatureProps","generateComponentMap","components","props","serverFeatureProps","componentKey","Component","key","generateSchemaMap","schemas","schemaMap","schemaKey","fields","sanitizedFields","requireFieldLevelRichTextEditor","mappedFields","disableAddingID","fieldSchema","parentPath","readOnly","filter","feature"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAEA,SAASA,SAAS,QAAQ,6CAA4C;AACtE,SAASC,cAAc,QAAQ,iBAAgB;AAC/C,OAAOC,WAAW,QAAO;AAKzB,SAASC,SAAS,QAAQ,qCAAoC;AAE9D,OAAO,MAAMC,0BACX,CAACC,OAGD,CAAC,EAAEC,mBAAmB,EAAEC,MAAM,EAAEC,IAAI,EAAEC,UAAU,EAAE;QAChD,MAAMC,qBAAqBH,OAAOI,WAAW,CAACC,GAAG,CAAC,CAACC,IAAMA,EAAEC,IAAI,KAAK,EAAE;QAEtE,MAAMC,eAAe,IAAIC;QAEzB,gHAAgH;QAChH,MAAMC,0BAA0BC,MAAMC,IAAI,CAACd,KAAKe,kBAAkB,CAACC,OAAO,IAAIC,IAAI,CAChF,CAACC,GAAGC,IAAMD,CAAC,CAAC,EAAE,CAACE,KAAK,GAAGD,CAAC,CAAC,EAAE,CAACC,KAAK;QAGnCV,aAAaW,GAAG,CACd,CAAC,QAAQ,CAAC,EACVT,wBACGL,GAAG,CAAC,CAAC,CAACe,YAAYC,gBAAgB;YACjC,MAAMC,kBAAkBD,gBAAgBC,eAAe;YACvD,MAAMC,uBAAuBF,gBAAgBG,kBAAkB;YAE/D;;WAEC,GACD,IACE,0BAA0BH,mBAC1B,OAAOA,gBAAgBI,oBAAoB,KAAK,YAChD;gBACA,MAAMC,aAAaL,gBAAgBI,oBAAoB,CAAC;oBACtDzB;oBACAC;oBACA0B,OAAON,gBAAgBO,kBAAkB;oBACzC1B;gBACF;gBAEA,IAAK,MAAM2B,gBAAgBH,WAAY;oBACrC,MAAMI,YAAYJ,UAA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G;oBAC/BA,KAAKV,gBAAgBU,GAAG;oBACxBb,OAAOG,gBAAgBH,KAAK;;gBAGlCa,KAAKV,gBAAgBU,GAAG;gBACxBb,OAAOG,gBAAgBH,KAAK;YAC9B;QACF,GACC0B,MAAM,CAAC,CAACC,UAAYA,YAAY;QAGrC,OAAOrC;IACT,EAAC"}
@@ -1,4 +1,3 @@
1
- @import 'fonts';
2
1
  @import 'styles';
3
2
  @import './toastify.scss';
4
3
  @import './colors.scss';
@@ -20,9 +19,9 @@
20
19
  --theme-overlay: rgba(5, 5, 5, 0.5);
21
20
  --theme-baseline: #{$baseline-px};
22
21
  --theme-baseline-body-size: #{$baseline-body-size};
23
- --font-body: 'Suisse Intl', system-ui;
22
+ --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
23
+ sans-serif;
24
24
  --font-mono: monospace;
25
- --font-serif: 'Merriweather', serif;
26
25
 
27
26
  --style-radius-s: #{$style-radius-s};
28
27
  --style-radius-m: #{$style-radius-m};
@@ -21,13 +21,6 @@ $baseline: math.div($baseline-px, $baseline-body-size) + rem;
21
21
  @return (math.div($baseline-px, $baseline-body-size) * $multiplier) + rem;
22
22
  }
23
23
 
24
- //////////////////////////////
25
- // FONTS (DEPRECATED. DO NOT USE. PREFER CSS VARIABLES)
26
- //////////////////////////////
27
-
28
- $font-body: 'Suisse Intl' !default;
29
- $font-mono: monospace !default;
30
-
31
24
  //////////////////////////////
32
25
  // COLORS (DEPRECATED. DO NOT USE. PREFER CSS VARIABLES)
33
26
  //////////////////////////////
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@payloadcms/richtext-lexical",
3
- "version": "3.0.0-beta.1",
3
+ "version": "3.0.0-beta.10",
4
4
  "description": "The officially supported Lexical richtext adapter for Payload",
5
5
  "repository": {
6
6
  "type": "git",
@@ -41,16 +41,16 @@
41
41
  "@types/react": "18.2.74",
42
42
  "@types/react-dom": "18.2.24",
43
43
  "@payloadcms/eslint-config": "1.1.1",
44
- "payload": "3.0.0-beta.1",
45
- "@payloadcms/translations": "3.0.0-beta.1",
46
- "@payloadcms/ui": "3.0.0-beta.1",
47
- "@payloadcms/next": "3.0.0-beta.1"
44
+ "@payloadcms/next": "3.0.0-beta.10",
45
+ "@payloadcms/translations": "3.0.0-beta.10",
46
+ "@payloadcms/ui": "3.0.0-beta.10",
47
+ "payload": "3.0.0-beta.10"
48
48
  },
49
49
  "peerDependencies": {
50
- "@payloadcms/translations": "3.0.0-beta.1",
51
- "@payloadcms/ui": "3.0.0-beta.1",
52
- "payload": "3.0.0-beta.1",
53
- "@payloadcms/next": "3.0.0-beta.1"
50
+ "@payloadcms/next": "3.0.0-beta.10",
51
+ "@payloadcms/translations": "3.0.0-beta.10",
52
+ "payload": "3.0.0-beta.10",
53
+ "@payloadcms/ui": "3.0.0-beta.10"
54
54
  },
55
55
  "exports": {
56
56
  ".": {
@@ -59,16 +59,16 @@
59
59
  "types": "./dist/index.d.ts"
60
60
  },
61
61
  "./*": {
62
- "import": "./src/exports/*.ts",
63
- "require": "./src/exports/*.ts",
64
- "types": "./src/exports/*.ts"
62
+ "import": "./dist/exports/*.js",
63
+ "require": "./dist/exports/*.js",
64
+ "types": "./dist/exports/*.d.ts"
65
65
  }
66
66
  },
67
67
  "publishConfig": {
68
68
  "registry": "https://registry.npmjs.org/"
69
69
  },
70
70
  "engines": {
71
- "node": ">=18.17.0"
71
+ "node": ">=18.20.2"
72
72
  },
73
73
  "files": [
74
74
  "dist",
@@ -76,7 +76,7 @@
76
76
  "components.d.ts"
77
77
  ],
78
78
  "scripts": {
79
- "build": "pnpm copyfiles && pnpm build:swc && pnpm build:types && tsx ../../scripts/exportPointerFiles.ts ../packages/richtext-lexical dist/exports",
79
+ "build": "pnpm copyfiles && pnpm build:swc && pnpm build:types",
80
80
  "build:swc": "swc ./src -d ./dist --config-file .swcrc",
81
81
  "build:types": "tsc --emitDeclarationOnly --outDir dist",
82
82
  "build:clean": "find . \\( -type d \\( -name build -o -name dist -o -name .cache \\) -o -type f -name tsconfig.tsbuildinfo \\) -exec rm -rf {} + && pnpm build",
package/components.d.ts DELETED
@@ -1,6 +0,0 @@
1
- export { RichTextCell } from './dist/cell/index.js';
2
- export { RichTextField } from './dist/field/index.js';
3
- export { defaultEditorLexicalConfig } from './dist/field/lexical/config/client/default.js';
4
- export { ToolbarButton } from './dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarButton/index.js';
5
- export { ToolbarDropdown } from './dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/index.js';
6
- //# sourceMappingURL=components.d.ts.map
package/components.js DELETED
@@ -1,7 +0,0 @@
1
- export { RichTextCell } from './dist/cell/index.js';
2
- export { RichTextField } from './dist/field/index.js';
3
- export { defaultEditorLexicalConfig } from './dist/field/lexical/config/client/default.js';
4
- export { ToolbarButton } from './dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarButton/index.js';
5
- export { ToolbarDropdown } from './dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/index.js';
6
-
7
- //# sourceMappingURL=components.js.map
@@ -1,75 +0,0 @@
1
- @font-face {
2
- font-family: 'Suisse Intl';
3
- src:
4
- url('../assets/fonts/SuisseIntl.woff2') format('woff2'),
5
- url('../assets/fonts/SuisseIntl.woff') format('woff');
6
- font-weight: normal;
7
- font-style: normal;
8
- }
9
-
10
- @font-face {
11
- font-family: 'Suisse Intl';
12
- src:
13
- url('../assets/fonts/SuisseIntl-Medium.woff2') format('woff2'),
14
- url('../assets/fonts/SuisseIntl-Medium.woff') format('woff');
15
- font-weight: 500;
16
- font-style: normal;
17
- }
18
-
19
- @font-face {
20
- font-family: 'Suisse Intl';
21
- src:
22
- url('../assets/fonts/SuisseIntl-SemiBold.woff2') format('woff2'),
23
- url('../assets/fonts/SuisseIntl-SemiBold.woff') format('woff');
24
- font-weight: 600;
25
- font-style: normal;
26
- }
27
-
28
- @font-face {
29
- font-family: 'Suisse Intl';
30
- src:
31
- url('../assets/fonts/SuisseIntl-Bold.woff2') format('woff2'),
32
- url('../assets/fonts/SuisseIntl-Bold.woff') format('woff');
33
- font-weight: bold;
34
- font-style: normal;
35
- }
36
-
37
- @font-face {
38
- font-family: 'Merriweather';
39
- font-style: normal;
40
- font-weight: 400;
41
- src:
42
- local(''),
43
- url('../assets/fonts/merriweather-v30-latin-regular.woff2') format('woff2'),
44
- url('../assets/fonts/merriweather-v30-latin-regular.woff') format('woff');
45
- }
46
-
47
- @font-face {
48
- font-family: 'Merriweather';
49
- font-style: italic;
50
- font-weight: 400;
51
- src:
52
- local(''),
53
- url('../assets/fonts/merriweather-v30-latin-italic.woff2') format('woff2'),
54
- url('../assets/fonts/merriweather-v30-latin-italic.woff') format('woff');
55
- }
56
-
57
- @font-face {
58
- font-family: 'Merriweather';
59
- font-style: normal;
60
- font-weight: 900;
61
- src:
62
- local(''),
63
- url('../assets/fonts/merriweather-v30-latin-900.woff2') format('woff2'),
64
- url('../assets/fonts/merriweather-v30-latin-900.woff') format('woff');
65
- }
66
-
67
- @font-face {
68
- font-family: 'Merriweather';
69
- font-style: italic;
70
- font-weight: 900;
71
- src:
72
- local(''),
73
- url('../assets/fonts/merriweather-v30-latin-900italic.woff2') format('woff2'),
74
- url('../assets/fonts/merriweather-v30-latin-900italic.woff') format('woff');
75
- }