@payloadcms/richtext-slate 3.28.0-internal.c4e1bed → 3.28.1

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.
@@ -8,7 +8,7 @@ const ElementButtonContext = /*#__PURE__*/ React.createContext({
8
8
  });
9
9
  export const ElementButtonProvider = (props)=>{
10
10
  const { children, ...rest } = props;
11
- return /*#__PURE__*/ _jsx(ElementButtonContext.Provider, {
11
+ return /*#__PURE__*/ _jsx(ElementButtonContext, {
12
12
  value: {
13
13
  ...rest
14
14
  },
@@ -16,7 +16,7 @@ export const ElementButtonProvider = (props)=>{
16
16
  });
17
17
  };
18
18
  export const useElementButton = ()=>{
19
- const path = React.useContext(ElementButtonContext);
19
+ const path = React.use(ElementButtonContext);
20
20
  return path;
21
21
  };
22
22
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/field/providers/ElementButtonProvider.tsx"],"sourcesContent":["'use client'\n\nimport React from 'react'\n\nimport type { LoadedSlateFieldProps } from '../types.js'\n\ntype ElementButtonContextType = {\n disabled?: boolean\n fieldProps: LoadedSlateFieldProps\n path: string\n schemaPath: string\n}\n\nconst ElementButtonContext = React.createContext<ElementButtonContextType>({\n fieldProps: {} as any,\n path: '',\n schemaPath: '',\n})\n\nexport const ElementButtonProvider: React.FC<\n {\n children: React.ReactNode\n } & ElementButtonContextType\n> = (props) => {\n const { children, ...rest } = props\n\n return (\n <ElementButtonContext.Provider\n value={{\n ...rest,\n }}\n >\n {children}\n </ElementButtonContext.Provider>\n )\n}\n\nexport const useElementButton = () => {\n const path = React.useContext(ElementButtonContext)\n return path\n}\n"],"names":["React","ElementButtonContext","createContext","fieldProps","path","schemaPath","ElementButtonProvider","props","children","rest","Provider","value","useElementButton","useContext"],"mappings":"AAAA;;AAEA,OAAOA,WAAW,QAAO;AAWzB,MAAMC,qCAAuBD,MAAME,aAAa,CAA2B;IACzEC,YAAY,CAAC;IACbC,MAAM;IACNC,YAAY;AACd;AAEA,OAAO,MAAMC,wBAIT,CAACC;IACH,MAAM,EAAEC,QAAQ,EAAE,GAAGC,MAAM,GAAGF;IAE9B,qBACE,KAACN,qBAAqBS,QAAQ;QAC5BC,OAAO;YACL,GAAGF,IAAI;QACT;kBAECD;;AAGP,EAAC;AAED,OAAO,MAAMI,mBAAmB;IAC9B,MAAMR,OAAOJ,MAAMa,UAAU,CAACZ;IAC9B,OAAOG;AACT,EAAC"}
1
+ {"version":3,"sources":["../../../src/field/providers/ElementButtonProvider.tsx"],"sourcesContent":["'use client'\n\nimport React from 'react'\n\nimport type { LoadedSlateFieldProps } from '../types.js'\n\ntype ElementButtonContextType = {\n disabled?: boolean\n fieldProps: LoadedSlateFieldProps\n path: string\n schemaPath: string\n}\n\nconst ElementButtonContext = React.createContext<ElementButtonContextType>({\n fieldProps: {} as any,\n path: '',\n schemaPath: '',\n})\n\nexport const ElementButtonProvider: React.FC<\n {\n children: React.ReactNode\n } & ElementButtonContextType\n> = (props) => {\n const { children, ...rest } = props\n\n return (\n <ElementButtonContext\n value={{\n ...rest,\n }}\n >\n {children}\n </ElementButtonContext>\n )\n}\n\nexport const useElementButton = () => {\n const path = React.use(ElementButtonContext)\n return path\n}\n"],"names":["React","ElementButtonContext","createContext","fieldProps","path","schemaPath","ElementButtonProvider","props","children","rest","value","useElementButton","use"],"mappings":"AAAA;;AAEA,OAAOA,WAAW,QAAO;AAWzB,MAAMC,qCAAuBD,MAAME,aAAa,CAA2B;IACzEC,YAAY,CAAC;IACbC,MAAM;IACNC,YAAY;AACd;AAEA,OAAO,MAAMC,wBAIT,CAACC;IACH,MAAM,EAAEC,QAAQ,EAAE,GAAGC,MAAM,GAAGF;IAE9B,qBACE,KAACN;QACCS,OAAO;YACL,GAAGD,IAAI;QACT;kBAECD;;AAGP,EAAC;AAED,OAAO,MAAMG,mBAAmB;IAC9B,MAAMP,OAAOJ,MAAMY,GAAG,CAACX;IACvB,OAAOG;AACT,EAAC"}
@@ -12,7 +12,7 @@ const ElementContext = /*#__PURE__*/ React.createContext({
12
12
  });
13
13
  export const ElementProvider = (props)=>{
14
14
  const { childNodes, children, ...rest } = props;
15
- return /*#__PURE__*/ _jsx(ElementContext.Provider, {
15
+ return /*#__PURE__*/ _jsx(ElementContext, {
16
16
  value: {
17
17
  ...rest,
18
18
  children: childNodes
@@ -21,7 +21,7 @@ export const ElementProvider = (props)=>{
21
21
  });
22
22
  };
23
23
  export const useElement = ()=>{
24
- return React.useContext(ElementContext);
24
+ return React.use(ElementContext);
25
25
  };
26
26
 
27
27
  //# sourceMappingURL=ElementProvider.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/field/providers/ElementProvider.tsx"],"sourcesContent":["'use client'\nimport type { Element } from 'slate'\n\nimport React from 'react'\n\nimport type { LoadedSlateFieldProps } from '../types.js'\n\ntype ElementContextType<T> = {\n attributes: Record<string, unknown>\n children: React.ReactNode\n editorRef: React.RefObject<HTMLDivElement>\n element: T\n fieldProps: LoadedSlateFieldProps\n path: string\n schemaPath: string\n}\n\nconst ElementContext = React.createContext<ElementContextType<Element>>({\n attributes: {},\n children: null,\n editorRef: null,\n element: {} as Element,\n fieldProps: {} as any,\n path: '',\n schemaPath: '',\n})\n\nexport const ElementProvider: React.FC<\n {\n childNodes: React.ReactNode\n } & ElementContextType<Element>\n> = (props) => {\n const { childNodes, children, ...rest } = props\n\n return (\n <ElementContext.Provider\n value={{\n ...rest,\n children: childNodes,\n }}\n >\n {children}\n </ElementContext.Provider>\n )\n}\n\nexport const useElement = <T,>(): ElementContextType<T> => {\n return React.useContext(ElementContext) as ElementContextType<T>\n}\n"],"names":["React","ElementContext","createContext","attributes","children","editorRef","element","fieldProps","path","schemaPath","ElementProvider","props","childNodes","rest","Provider","value","useElement","useContext"],"mappings":"AAAA;;AAGA,OAAOA,WAAW,QAAO;AAczB,MAAMC,+BAAiBD,MAAME,aAAa,CAA8B;IACtEC,YAAY,CAAC;IACbC,UAAU;IACVC,WAAW;IACXC,SAAS,CAAC;IACVC,YAAY,CAAC;IACbC,MAAM;IACNC,YAAY;AACd;AAEA,OAAO,MAAMC,kBAIT,CAACC;IACH,MAAM,EAAEC,UAAU,EAAER,QAAQ,EAAE,GAAGS,MAAM,GAAGF;IAE1C,qBACE,KAACV,eAAea,QAAQ;QACtBC,OAAO;YACL,GAAGF,IAAI;YACPT,UAAUQ;QACZ;kBAECR;;AAGP,EAAC;AAED,OAAO,MAAMY,aAAa;IACxB,OAAOhB,MAAMiB,UAAU,CAAChB;AAC1B,EAAC"}
1
+ {"version":3,"sources":["../../../src/field/providers/ElementProvider.tsx"],"sourcesContent":["'use client'\nimport type { Element } from 'slate'\n\nimport React from 'react'\n\nimport type { LoadedSlateFieldProps } from '../types.js'\n\ntype ElementContextType<T> = {\n attributes: Record<string, unknown>\n children: React.ReactNode\n editorRef: React.RefObject<HTMLDivElement>\n element: T\n fieldProps: LoadedSlateFieldProps\n path: string\n schemaPath: string\n}\n\nconst ElementContext = React.createContext<ElementContextType<Element>>({\n attributes: {},\n children: null,\n editorRef: null,\n element: {} as Element,\n fieldProps: {} as any,\n path: '',\n schemaPath: '',\n})\n\nexport const ElementProvider: React.FC<\n {\n childNodes: React.ReactNode\n } & ElementContextType<Element>\n> = (props) => {\n const { childNodes, children, ...rest } = props\n\n return (\n <ElementContext\n value={{\n ...rest,\n children: childNodes,\n }}\n >\n {children}\n </ElementContext>\n )\n}\n\nexport const useElement = <T,>(): ElementContextType<T> => {\n return React.use(ElementContext) as ElementContextType<T>\n}\n"],"names":["React","ElementContext","createContext","attributes","children","editorRef","element","fieldProps","path","schemaPath","ElementProvider","props","childNodes","rest","value","useElement","use"],"mappings":"AAAA;;AAGA,OAAOA,WAAW,QAAO;AAczB,MAAMC,+BAAiBD,MAAME,aAAa,CAA8B;IACtEC,YAAY,CAAC;IACbC,UAAU;IACVC,WAAW;IACXC,SAAS,CAAC;IACVC,YAAY,CAAC;IACbC,MAAM;IACNC,YAAY;AACd;AAEA,OAAO,MAAMC,kBAIT,CAACC;IACH,MAAM,EAAEC,UAAU,EAAER,QAAQ,EAAE,GAAGS,MAAM,GAAGF;IAE1C,qBACE,KAACV;QACCa,OAAO;YACL,GAAGD,IAAI;YACPT,UAAUQ;QACZ;kBAECR;;AAGP,EAAC;AAED,OAAO,MAAMW,aAAa;IACxB,OAAOf,MAAMgB,GAAG,CAACf;AACnB,EAAC"}
@@ -8,7 +8,7 @@ const LeafButtonContext = /*#__PURE__*/ React.createContext({
8
8
  });
9
9
  export const LeafButtonProvider = (props)=>{
10
10
  const { children, ...rest } = props;
11
- return /*#__PURE__*/ _jsx(LeafButtonContext.Provider, {
11
+ return /*#__PURE__*/ _jsx(LeafButtonContext, {
12
12
  value: {
13
13
  ...rest
14
14
  },
@@ -16,7 +16,7 @@ export const LeafButtonProvider = (props)=>{
16
16
  });
17
17
  };
18
18
  export const useLeafButton = ()=>{
19
- const path = React.useContext(LeafButtonContext);
19
+ const path = React.use(LeafButtonContext);
20
20
  return path;
21
21
  };
22
22
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/field/providers/LeafButtonProvider.tsx"],"sourcesContent":["'use client'\n\nimport React from 'react'\n\nimport type { LoadedSlateFieldProps } from '../types.js'\n\ntype LeafButtonContextType = {\n fieldProps: LoadedSlateFieldProps\n path: string\n schemaPath: string\n}\n\nconst LeafButtonContext = React.createContext<LeafButtonContextType>({\n fieldProps: {} as any,\n path: '',\n schemaPath: '',\n})\n\nexport const LeafButtonProvider: React.FC<\n {\n children: React.ReactNode\n } & LeafButtonContextType\n> = (props) => {\n const { children, ...rest } = props\n\n return (\n <LeafButtonContext.Provider\n value={{\n ...rest,\n }}\n >\n {children}\n </LeafButtonContext.Provider>\n )\n}\n\nexport const useLeafButton = () => {\n const path = React.useContext(LeafButtonContext)\n return path\n}\n"],"names":["React","LeafButtonContext","createContext","fieldProps","path","schemaPath","LeafButtonProvider","props","children","rest","Provider","value","useLeafButton","useContext"],"mappings":"AAAA;;AAEA,OAAOA,WAAW,QAAO;AAUzB,MAAMC,kCAAoBD,MAAME,aAAa,CAAwB;IACnEC,YAAY,CAAC;IACbC,MAAM;IACNC,YAAY;AACd;AAEA,OAAO,MAAMC,qBAIT,CAACC;IACH,MAAM,EAAEC,QAAQ,EAAE,GAAGC,MAAM,GAAGF;IAE9B,qBACE,KAACN,kBAAkBS,QAAQ;QACzBC,OAAO;YACL,GAAGF,IAAI;QACT;kBAECD;;AAGP,EAAC;AAED,OAAO,MAAMI,gBAAgB;IAC3B,MAAMR,OAAOJ,MAAMa,UAAU,CAACZ;IAC9B,OAAOG;AACT,EAAC"}
1
+ {"version":3,"sources":["../../../src/field/providers/LeafButtonProvider.tsx"],"sourcesContent":["'use client'\n\nimport React from 'react'\n\nimport type { LoadedSlateFieldProps } from '../types.js'\n\ntype LeafButtonContextType = {\n fieldProps: LoadedSlateFieldProps\n path: string\n schemaPath: string\n}\n\nconst LeafButtonContext = React.createContext<LeafButtonContextType>({\n fieldProps: {} as any,\n path: '',\n schemaPath: '',\n})\n\nexport const LeafButtonProvider: React.FC<\n {\n children: React.ReactNode\n } & LeafButtonContextType\n> = (props) => {\n const { children, ...rest } = props\n\n return (\n <LeafButtonContext\n value={{\n ...rest,\n }}\n >\n {children}\n </LeafButtonContext>\n )\n}\n\nexport const useLeafButton = () => {\n const path = React.use(LeafButtonContext)\n return path\n}\n"],"names":["React","LeafButtonContext","createContext","fieldProps","path","schemaPath","LeafButtonProvider","props","children","rest","value","useLeafButton","use"],"mappings":"AAAA;;AAEA,OAAOA,WAAW,QAAO;AAUzB,MAAMC,kCAAoBD,MAAME,aAAa,CAAwB;IACnEC,YAAY,CAAC;IACbC,MAAM;IACNC,YAAY;AACd;AAEA,OAAO,MAAMC,qBAIT,CAACC;IACH,MAAM,EAAEC,QAAQ,EAAE,GAAGC,MAAM,GAAGF;IAE9B,qBACE,KAACN;QACCS,OAAO;YACL,GAAGD,IAAI;QACT;kBAECD;;AAGP,EAAC;AAED,OAAO,MAAMG,gBAAgB;IAC3B,MAAMP,OAAOJ,MAAMY,GAAG,CAACX;IACvB,OAAOG;AACT,EAAC"}
@@ -12,7 +12,7 @@ const LeafContext = /*#__PURE__*/ React.createContext({
12
12
  });
13
13
  export const LeafProvider = (props)=>{
14
14
  const { children, result, ...rest } = props;
15
- return /*#__PURE__*/ _jsx(LeafContext.Provider, {
15
+ return /*#__PURE__*/ _jsx(LeafContext, {
16
16
  value: {
17
17
  ...rest,
18
18
  children: result
@@ -21,7 +21,7 @@ export const LeafProvider = (props)=>{
21
21
  });
22
22
  };
23
23
  export const useLeaf = ()=>{
24
- const path = React.useContext(LeafContext);
24
+ const path = React.use(LeafContext);
25
25
  return path;
26
26
  };
27
27
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/field/providers/LeafProvider.tsx"],"sourcesContent":["'use client'\n\nimport React from 'react'\n\nimport type { LoadedSlateFieldProps } from '../types.js'\n\ntype LeafContextType = {\n attributes: Record<string, unknown>\n children: React.ReactNode\n editorRef: React.RefObject<HTMLDivElement>\n fieldProps: LoadedSlateFieldProps\n leaf: string\n path: string\n schemaPath: string\n}\n\nconst LeafContext = React.createContext<LeafContextType>({\n attributes: {},\n children: null,\n editorRef: null,\n fieldProps: {} as any,\n leaf: '',\n path: '',\n schemaPath: '',\n})\n\nexport const LeafProvider: React.FC<\n {\n result: React.ReactNode\n } & LeafContextType\n> = (props) => {\n const { children, result, ...rest } = props\n\n return (\n <LeafContext.Provider\n value={{\n ...rest,\n children: result,\n }}\n >\n {children}\n </LeafContext.Provider>\n )\n}\n\nexport const useLeaf = () => {\n const path = React.useContext(LeafContext)\n return path\n}\n"],"names":["React","LeafContext","createContext","attributes","children","editorRef","fieldProps","leaf","path","schemaPath","LeafProvider","props","result","rest","Provider","value","useLeaf","useContext"],"mappings":"AAAA;;AAEA,OAAOA,WAAW,QAAO;AAczB,MAAMC,4BAAcD,MAAME,aAAa,CAAkB;IACvDC,YAAY,CAAC;IACbC,UAAU;IACVC,WAAW;IACXC,YAAY,CAAC;IACbC,MAAM;IACNC,MAAM;IACNC,YAAY;AACd;AAEA,OAAO,MAAMC,eAIT,CAACC;IACH,MAAM,EAAEP,QAAQ,EAAEQ,MAAM,EAAE,GAAGC,MAAM,GAAGF;IAEtC,qBACE,KAACV,YAAYa,QAAQ;QACnBC,OAAO;YACL,GAAGF,IAAI;YACPT,UAAUQ;QACZ;kBAECR;;AAGP,EAAC;AAED,OAAO,MAAMY,UAAU;IACrB,MAAMR,OAAOR,MAAMiB,UAAU,CAAChB;IAC9B,OAAOO;AACT,EAAC"}
1
+ {"version":3,"sources":["../../../src/field/providers/LeafProvider.tsx"],"sourcesContent":["'use client'\n\nimport React from 'react'\n\nimport type { LoadedSlateFieldProps } from '../types.js'\n\ntype LeafContextType = {\n attributes: Record<string, unknown>\n children: React.ReactNode\n editorRef: React.RefObject<HTMLDivElement>\n fieldProps: LoadedSlateFieldProps\n leaf: string\n path: string\n schemaPath: string\n}\n\nconst LeafContext = React.createContext<LeafContextType>({\n attributes: {},\n children: null,\n editorRef: null,\n fieldProps: {} as any,\n leaf: '',\n path: '',\n schemaPath: '',\n})\n\nexport const LeafProvider: React.FC<\n {\n result: React.ReactNode\n } & LeafContextType\n> = (props) => {\n const { children, result, ...rest } = props\n\n return (\n <LeafContext\n value={{\n ...rest,\n children: result,\n }}\n >\n {children}\n </LeafContext>\n )\n}\n\nexport const useLeaf = () => {\n const path = React.use(LeafContext)\n return path\n}\n"],"names":["React","LeafContext","createContext","attributes","children","editorRef","fieldProps","leaf","path","schemaPath","LeafProvider","props","result","rest","value","useLeaf","use"],"mappings":"AAAA;;AAEA,OAAOA,WAAW,QAAO;AAczB,MAAMC,4BAAcD,MAAME,aAAa,CAAkB;IACvDC,YAAY,CAAC;IACbC,UAAU;IACVC,WAAW;IACXC,YAAY,CAAC;IACbC,MAAM;IACNC,MAAM;IACNC,YAAY;AACd;AAEA,OAAO,MAAMC,eAIT,CAACC;IACH,MAAM,EAAEP,QAAQ,EAAEQ,MAAM,EAAE,GAAGC,MAAM,GAAGF;IAEtC,qBACE,KAACV;QACCa,OAAO;YACL,GAAGD,IAAI;YACPT,UAAUQ;QACZ;kBAECR;;AAGP,EAAC;AAED,OAAO,MAAMW,UAAU;IACrB,MAAMP,OAAOR,MAAMgB,GAAG,CAACf;IACvB,OAAOO;AACT,EAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"SlatePropsProvider.d.ts","sourceRoot":"","sources":["../../src/utilities/SlatePropsProvider.tsx"],"names":[],"mappings":"AAEA,OAAc,EAAiB,KAAK,SAAS,EAAc,MAAM,OAAO,CAAA;AAExE,UAAU,UAAU;IAClB,UAAU,EAAE,MAAM,CAAA;CACnB;AAID,wBAAgB,kBAAkB,CAAC,EACjC,QAAQ,EACR,UAAU,GACX,EAAE;IACD,QAAQ,EAAE,SAAS,CAAA;IACnB,UAAU,EAAE,MAAM,CAAA;CACnB,2CAEA;AAED,wBAAgB,aAAa,eAM5B"}
1
+ {"version":3,"file":"SlatePropsProvider.d.ts","sourceRoot":"","sources":["../../src/utilities/SlatePropsProvider.tsx"],"names":[],"mappings":"AAEA,OAAc,EAAiB,KAAK,SAAS,EAAO,MAAM,OAAO,CAAA;AAEjE,UAAU,UAAU;IAClB,UAAU,EAAE,MAAM,CAAA;CACnB;AAID,wBAAgB,kBAAkB,CAAC,EACjC,QAAQ,EACR,UAAU,GACX,EAAE;IACD,QAAQ,EAAE,SAAS,CAAA;IACnB,UAAU,EAAE,MAAM,CAAA;CACnB,2CAEA;AAED,wBAAgB,aAAa,eAM5B"}
@@ -1,9 +1,9 @@
1
1
  'use client';
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
- import React, { createContext, useContext } from 'react';
3
+ import React, { createContext, use } from 'react';
4
4
  const SlatePropsContext = /*#__PURE__*/ createContext(undefined);
5
5
  export function SlatePropsProvider({ children, schemaPath }) {
6
- return /*#__PURE__*/ _jsx(SlatePropsContext.Provider, {
6
+ return /*#__PURE__*/ _jsx(SlatePropsContext, {
7
7
  value: {
8
8
  schemaPath
9
9
  },
@@ -11,7 +11,7 @@ export function SlatePropsProvider({ children, schemaPath }) {
11
11
  });
12
12
  }
13
13
  export function useSlateProps() {
14
- const context = useContext(SlatePropsContext);
14
+ const context = use(SlatePropsContext);
15
15
  if (!context) {
16
16
  throw new Error('useSlateProps must be used within SlatePropsProvider');
17
17
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/utilities/SlatePropsProvider.tsx"],"sourcesContent":["'use client'\n\nimport React, { createContext, type ReactNode, useContext } from 'react'\n\ninterface SlateProps {\n schemaPath: string\n}\n\nconst SlatePropsContext = createContext<SlateProps | undefined>(undefined)\n\nexport function SlatePropsProvider({\n children,\n schemaPath,\n}: {\n children: ReactNode\n schemaPath: string\n}) {\n return <SlatePropsContext.Provider value={{ schemaPath }}>{children}</SlatePropsContext.Provider>\n}\n\nexport function useSlateProps() {\n const context = useContext(SlatePropsContext)\n if (!context) {\n throw new Error('useSlateProps must be used within SlatePropsProvider')\n }\n return context\n}\n"],"names":["React","createContext","useContext","SlatePropsContext","undefined","SlatePropsProvider","children","schemaPath","Provider","value","useSlateProps","context","Error"],"mappings":"AAAA;;AAEA,OAAOA,SAASC,aAAa,EAAkBC,UAAU,QAAQ,QAAO;AAMxE,MAAMC,kCAAoBF,cAAsCG;AAEhE,OAAO,SAASC,mBAAmB,EACjCC,QAAQ,EACRC,UAAU,EAIX;IACC,qBAAO,KAACJ,kBAAkBK,QAAQ;QAACC,OAAO;YAAEF;QAAW;kBAAID;;AAC7D;AAEA,OAAO,SAASI;IACd,MAAMC,UAAUT,WAAWC;IAC3B,IAAI,CAACQ,SAAS;QACZ,MAAM,IAAIC,MAAM;IAClB;IACA,OAAOD;AACT"}
1
+ {"version":3,"sources":["../../src/utilities/SlatePropsProvider.tsx"],"sourcesContent":["'use client'\n\nimport React, { createContext, type ReactNode, use } from 'react'\n\ninterface SlateProps {\n schemaPath: string\n}\n\nconst SlatePropsContext = createContext<SlateProps | undefined>(undefined)\n\nexport function SlatePropsProvider({\n children,\n schemaPath,\n}: {\n children: ReactNode\n schemaPath: string\n}) {\n return <SlatePropsContext value={{ schemaPath }}>{children}</SlatePropsContext>\n}\n\nexport function useSlateProps() {\n const context = use(SlatePropsContext)\n if (!context) {\n throw new Error('useSlateProps must be used within SlatePropsProvider')\n }\n return context\n}\n"],"names":["React","createContext","use","SlatePropsContext","undefined","SlatePropsProvider","children","schemaPath","value","useSlateProps","context","Error"],"mappings":"AAAA;;AAEA,OAAOA,SAASC,aAAa,EAAkBC,GAAG,QAAQ,QAAO;AAMjE,MAAMC,kCAAoBF,cAAsCG;AAEhE,OAAO,SAASC,mBAAmB,EACjCC,QAAQ,EACRC,UAAU,EAIX;IACC,qBAAO,KAACJ;QAAkBK,OAAO;YAAED;QAAW;kBAAID;;AACpD;AAEA,OAAO,SAASG;IACd,MAAMC,UAAUR,IAAIC;IACpB,IAAI,CAACO,SAAS;QACZ,MAAM,IAAIC,MAAM;IAClB;IACA,OAAOD;AACT"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@payloadcms/richtext-slate",
3
- "version": "3.28.0-internal.c4e1bed",
3
+ "version": "3.28.1",
4
4
  "description": "The officially supported Slate richtext adapter for Payload",
5
5
  "homepage": "https://payloadcms.com",
6
6
  "repository": {
@@ -46,20 +46,20 @@
46
46
  "slate-history": "0.86.0",
47
47
  "slate-hyperscript": "0.81.3",
48
48
  "slate-react": "0.92.0",
49
- "@payloadcms/translations": "3.28.0-internal.c4e1bed",
50
- "@payloadcms/ui": "3.28.0-internal.c4e1bed"
49
+ "@payloadcms/translations": "3.28.1",
50
+ "@payloadcms/ui": "3.28.1"
51
51
  },
52
52
  "devDependencies": {
53
53
  "@types/is-hotkey": "^0.1.10",
54
54
  "@types/node": "22.5.4",
55
55
  "@types/react": "19.0.10",
56
56
  "@types/react-dom": "19.0.4",
57
- "@payloadcms/eslint-config": "3.9.0",
58
- "payload": "3.28.0-internal.c4e1bed"
57
+ "@payloadcms/eslint-config": "3.28.0",
58
+ "payload": "3.28.1"
59
59
  },
60
60
  "peerDependencies": {
61
61
  "react": "^19.0.0 || ^19.0.0-rc-65a56d0e-20241020",
62
- "payload": "3.28.0-internal.c4e1bed"
62
+ "payload": "3.28.1"
63
63
  },
64
64
  "engines": {
65
65
  "node": "^18.20.2 || >=20.9.0"