New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@payloadcms/richtext-slate

Package Overview
Dependencies
Maintainers
7
Versions
481
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@payloadcms/richtext-slate - npm Package Compare versions

Comparing version 3.0.0-canary.5390729 to 3.0.0-canary.5866281

dist/scss/toastify.scss

8

dist/data/populate.d.ts

@@ -1,2 +0,2 @@

import type { Collection, Field, PayloadRequestWithData, RichTextField } from 'payload';
import type { Collection, Field, PayloadRequest, RichTextField } from 'payload';
import type { AdapterArguments } from '../types.js';

@@ -11,11 +11,11 @@ type Arguments = {

overrideAccess?: boolean;
req: PayloadRequestWithData;
req: PayloadRequest;
showHiddenFields: boolean;
};
export declare const populate: ({ id, collection, currentDepth, data, depth, draft, key, overrideAccess, req, showHiddenFields, }: Omit<Arguments, "field"> & {
export declare const populate: ({ id, collection, currentDepth, data, depth, draft, key, overrideAccess, req, showHiddenFields, }: {
collection: Collection;
field: Field;
id: string;
}) => Promise<void>;
} & Omit<Arguments, "field">) => Promise<void>;
export {};
//# sourceMappingURL=populate.d.ts.map

@@ -1,2 +0,2 @@

import type { Field, PayloadRequestWithData } from 'payload';
import type { Field, PayloadRequest } from 'payload';
type NestedRichTextFieldsArgs = {

@@ -10,3 +10,3 @@ currentDepth?: number;

populationPromises: Promise<void>[];
req: PayloadRequestWithData;
req: PayloadRequest;
showHiddenFields: boolean;

@@ -13,0 +13,0 @@ };

@@ -1,2 +0,2 @@

import { fieldAffectsData, fieldHasSubFields, fieldIsArrayType } from 'payload/shared';
import { fieldAffectsData, fieldHasSubFields, fieldIsArrayType, tabHasName } from 'payload/shared';
import { populate } from './populate.js';

@@ -113,3 +113,3 @@ import { recurseRichText } from './richTextRelationshipPromise.js';

currentDepth,
data,
data: tabHasName(tab) ? data[tab.name] : data,
depth,

@@ -116,0 +116,0 @@ draft,

@@ -1,2 +0,2 @@

import type { PayloadRequestWithData, RichTextAdapter, RichTextField } from 'payload';
import type { PayloadRequest, RichTextAdapter, RichTextField } from 'payload';
import type { AdapterArguments } from '../types.js';

@@ -12,3 +12,3 @@ export type Args = Parameters<RichTextAdapter<any[], AdapterArguments>['graphQLPopulationPromises']>[0];

populationPromises: Promise<void>[];
req: PayloadRequestWithData;
req: PayloadRequest;
showHiddenFields: boolean;

@@ -15,0 +15,0 @@ };

'use client';
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { useConfig, useDrawerSlug, useFieldProps, useModal, useTranslation } from '@payloadcms/ui';
import { getFormState, reduceFieldsToValues } from '@payloadcms/ui/shared';
import { getFormState } from '@payloadcms/ui/shared';
import { reduceFieldsToValues } from 'payload/shared';
import React, { Fragment, useState } from 'react';

@@ -6,0 +7,0 @@ import { Editor, Range, Transforms } from 'slate';

@@ -5,4 +5,4 @@ 'use client';

import { Button, Popup, Translation, useAuth, useConfig, useDocumentInfo, useDrawerSlug, useLocale, useModal, useTranslation } from '@payloadcms/ui';
import { getFormState, reduceFieldsToValues } from '@payloadcms/ui/shared';
import { deepCopyObject } from 'payload/shared';
import { getFormState } from '@payloadcms/ui/shared';
import { deepCopyObject, reduceFieldsToValues } from 'payload/shared';
import React, { useCallback, useEffect, useState } from 'react';

@@ -9,0 +9,0 @@ import { Editor, Node, Transforms } from 'slate';

@@ -1,3 +0,2 @@

import type { FieldMap } from '@payloadcms/ui';
import type { FormState } from 'payload';
import type { FieldMap, FormState } from 'payload';
export type Props = {

@@ -4,0 +3,0 @@ drawerSlug: string;

import type { Element } from 'slate';
export type LinkElementType = Element & {
export type LinkElementType = {
doc: Record<string, unknown>;

@@ -8,3 +8,3 @@ fields: Record<string, unknown>;

url: string;
};
} & Element;
//# sourceMappingURL=types.d.ts.map

@@ -1,10 +0,10 @@

import type { FormFieldBase } from '@payloadcms/ui';
import type { FormFieldBase } from 'payload';
import React from 'react';
import './index.scss';
type Props = FormFieldBase & {
type Props = {
name: string;
richTextComponentMap: Map<string, React.ReactNode>;
};
} & FormFieldBase;
export declare const Element: (props: Props) => React.ReactNode;
export {};
//# sourceMappingURL=index.d.ts.map
import type { Element } from 'slate';
export type RelationshipElementType = Element & {
export type RelationshipElementType = {
relationTo: string;

@@ -7,3 +7,3 @@ value: {

} | null;
};
} & Element;
//# sourceMappingURL=types.d.ts.map

@@ -1,10 +0,10 @@

import type { FormFieldBase } from '@payloadcms/ui';
import type { FormFieldBase } from 'payload';
import React from 'react';
import './index.scss';
type Props = FormFieldBase & {
type Props = {
name: string;
richTextComponentMap: Map<string, React.ReactNode>;
};
} & FormFieldBase;
export declare const Element: (props: Props) => React.ReactNode;
export {};
//# sourceMappingURL=index.d.ts.map

@@ -1,3 +0,2 @@

import type { FormFieldBase } from '@payloadcms/ui';
import type { ClientCollectionConfig } from 'payload';
import type { ClientCollectionConfig, FormFieldBase } from 'payload';
import React from 'react';

@@ -8,6 +7,6 @@ import type { UploadElementType } from '../../types.js';

element: UploadElementType;
fieldProps: FormFieldBase & {
fieldProps: {
name: string;
richTextComponentMap: Map<string, React.ReactNode>;
};
} & FormFieldBase;
relatedCollection: ClientCollectionConfig;

@@ -14,0 +13,0 @@ schemaPath: string;

import type { Element } from 'slate';
export type UploadElementType = Element & {
export type UploadElementType = {
fields: Record<string, unknown>;

@@ -8,3 +8,3 @@ relationTo: string;

} | null;
};
} & Element;
//# sourceMappingURL=types.d.ts.map

@@ -1,7 +0,7 @@

import type { FormFieldBase } from '@payloadcms/ui';
import type { FormFieldBase } from 'payload';
import React from 'react';
export declare const RichTextField: React.FC<FormFieldBase & {
export declare const RichTextField: React.FC<{
name: string;
richTextComponentMap: Map<string, React.ReactNode>;
}>;
} & FormFieldBase>;
//# sourceMappingURL=index.d.ts.map

@@ -1,17 +0,17 @@

import type { FormFieldBase } from '@payloadcms/ui';
import type { FormFieldBase } from 'payload';
import React from 'react';
type ElementButtonContextType = {
disabled?: boolean;
fieldProps: FormFieldBase & {
fieldProps: {
name: string;
richTextComponentMap: Map<string, React.ReactNode>;
};
} & FormFieldBase;
path: string;
schemaPath: string;
};
export declare const ElementButtonProvider: React.FC<ElementButtonContextType & {
export declare const ElementButtonProvider: React.FC<{
children: React.ReactNode;
}>;
} & ElementButtonContextType>;
export declare const useElementButton: () => ElementButtonContextType;
export {};
//# sourceMappingURL=ElementButtonProvider.d.ts.map

@@ -1,2 +0,2 @@

import type { FormFieldBase } from '@payloadcms/ui';
import type { FormFieldBase } from 'payload';
import type { Element } from 'slate';

@@ -9,14 +9,14 @@ import React from 'react';

element: T;
fieldProps: FormFieldBase & {
fieldProps: {
name: string;
richTextComponentMap: Map<string, React.ReactNode>;
};
} & FormFieldBase;
path: string;
schemaPath: string;
};
export declare const ElementProvider: React.FC<ElementContextType<Element> & {
export declare const ElementProvider: React.FC<{
childNodes: React.ReactNode;
}>;
} & ElementContextType<Element>>;
export declare const useElement: <T>() => ElementContextType<T>;
export {};
//# sourceMappingURL=ElementProvider.d.ts.map

@@ -1,15 +0,15 @@

import type { FormFieldBase } from '@payloadcms/ui';
import type { FormFieldBase } from 'payload';
import React from 'react';
type LeafButtonContextType = {
fieldProps: FormFieldBase & {
fieldProps: {
name: string;
};
} & FormFieldBase;
path: string;
schemaPath: string;
};
export declare const LeafButtonProvider: React.FC<LeafButtonContextType & {
export declare const LeafButtonProvider: React.FC<{
children: React.ReactNode;
}>;
} & LeafButtonContextType>;
export declare const useLeafButton: () => LeafButtonContextType;
export {};
//# sourceMappingURL=LeafButtonProvider.d.ts.map

@@ -1,2 +0,2 @@

import type { FormFieldBase } from '@payloadcms/ui';
import type { FormFieldBase } from 'payload';
import React from 'react';

@@ -7,5 +7,5 @@ type LeafContextType = {

editorRef: React.MutableRefObject<HTMLDivElement>;
fieldProps: FormFieldBase & {
fieldProps: {
name: string;
};
} & FormFieldBase;
leaf: string;

@@ -15,7 +15,7 @@ path: string;

};
export declare const LeafProvider: React.FC<LeafContextType & {
export declare const LeafProvider: React.FC<{
result: React.ReactNode;
}>;
} & LeafContextType>;
export declare const useLeaf: () => LeafContextType;
export {};
//# sourceMappingURL=LeafProvider.d.ts.map

@@ -1,2 +0,2 @@

import type { FormFieldBase } from '@payloadcms/ui';
import type { FormFieldBase, RichTextFieldValidation } from 'payload';
import type { BaseEditor } from 'slate';

@@ -11,3 +11,3 @@ import type { HistoryEditor } from 'slate-history';

interface CustomTypes {
Editor: BaseEditor & ReactEditor & HistoryEditor;
Editor: BaseEditor & HistoryEditor & ReactEditor;
Element: ElementNode;

@@ -17,3 +17,3 @@ Text: TextNode;

}
export declare const RichText: React.FC<FormFieldBase & {
export declare const RichText: React.FC<{
elements: EnabledFeatures["elements"];

@@ -25,4 +25,5 @@ leaves: EnabledFeatures["leaves"];

richTextComponentMap: Map<string, React.ReactNode>;
validate?: RichTextFieldValidation;
width?: string;
}>;
} & Omit<FormFieldBase, "validate">>;
//# sourceMappingURL=RichText.d.ts.map

@@ -8,3 +8,3 @@ import { jsx as _jsx } from "react/jsx-runtime";

import { defaultLeaves as leafTypes } from './field/leaves/index.js';
export const getGenerateComponentMap = (args)=>({ WithServerSideProps, config, i18n })=>{
export const getGenerateComponentMap = (args)=>({ WithServerSideProps, config, i18n, payload })=>{
const componentMap = new Map();

@@ -55,2 +55,3 @@ (args?.admin?.leaves || Object.values(leafTypes)).forEach((leaf)=>{

i18n,
payload,
readOnly: false

@@ -76,2 +77,3 @@ });

i18n,
payload,
readOnly: false

@@ -78,0 +80,0 @@ });

{
"name": "@payloadcms/richtext-slate",
"version": "3.0.0-canary.5390729",
"version": "3.0.0-canary.5866281",
"description": "The officially supported Slate richtext adapter for Payload",

@@ -36,13 +36,13 @@ "homepage": "https://payloadcms.com",

"@types/node": "20.12.5",
"@types/react": "npm:types-react@19.0.0-beta.2",
"@types/react-dom": "npm:types-react-dom@19.0.0-beta.2",
"@payloadcms/eslint-config": "1.1.1",
"payload": "3.0.0-canary.5390729",
"@payloadcms/ui": "3.0.0-canary.5390729"
"@types/react": "npm:types-react@19.0.0-rc.0",
"@types/react-dom": "npm:types-react-dom@19.0.0-rc.0",
"@payloadcms/eslint-config": "3.0.0-beta.59",
"@payloadcms/ui": "3.0.0-canary.5866281",
"payload": "3.0.0-canary.5866281"
},
"peerDependencies": {
"react": "^19.0.0 || ^19.0.0-rc-f994737d14-20240522",
"@payloadcms/translations": "3.0.0-canary.5390729",
"payload": "3.0.0-canary.5390729",
"@payloadcms/ui": "3.0.0-canary.5390729"
"react": "^19.0.0 || ^19.0.0-rc-06d0b89e-20240801",
"payload": "3.0.0-canary.5866281",
"@payloadcms/translations": "3.0.0-canary.5866281",
"@payloadcms/ui": "3.0.0-canary.5866281"
},

@@ -56,4 +56,4 @@ "engines": {

"overrides": {
"@types/react": "npm:types-react@19.0.0-beta.2",
"@types/react-dom": "npm:types-react-dom@19.0.0-beta.2"
"@types/react": "npm:types-react@19.0.0-rc.0",
"@types/react-dom": "npm:types-react-dom@19.0.0-rc.0"
},

@@ -60,0 +60,0 @@ "scripts": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc