Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

astro-portabletext

Package Overview
Dependencies
Maintainers
1
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

astro-portabletext - npm Package Compare versions

Comparing version 0.4.0-next.4 to 0.4.0-next.5

2

lib/utils.d.ts

@@ -5,4 +5,6 @@ import type { TypedObject, BlockStyle } from "./types";

/**
* @deprecated Has no purpose anymore
*
* Checks if (node) is of {@link BlockStyle}
*/
export declare const isBlockStyle: (node: TypedObject) => node is BlockStyle;
export { toPlainText } from "@portabletext/toolkit";
export { mergeComponents } from "./internal";
/**
* @deprecated Has no purpose anymore
*
* Checks if (node) is of {@link BlockStyle}
*/
export const isBlockStyle = (node) => typeof node.style === "string";

9

lib/warnings.d.ts

@@ -1,9 +0,6 @@

/**
* Credit: [react-portabletext]{@link https://github.com/portabletext/react-portabletext}
*/
export declare const unknownTypeWarning: (typeName: string) => string;
export declare const unknownTypeWarning: (type: string) => string;
export declare const unknownMarkWarning: (markType: string) => string;
export declare const unknownBlockWarning: (blockStyle: string) => string;
export declare const unknownListWarning: (listStyle: string) => string;
export declare const unknownBlockWarning: (style: string) => string;
export declare const unknownListWarning: (listItem: string) => string;
export declare const unknownListItemWarning: (listStyle: string) => string;
export declare function printWarning(message: string): void;

@@ -1,12 +0,9 @@

/**
* Credit: [react-portabletext]{@link https://github.com/portabletext/react-portabletext}
*/
const getTemplate = (type, prop) => `Absent ${type}, add component to [components.${prop}]`;
export const unknownTypeWarning = (typeName) => getTemplate(`block type "${typeName}"`, "type");
export const unknownMarkWarning = (markType) => getTemplate(`mark type "${markType}"`, "mark");
export const unknownBlockWarning = (blockStyle) => getTemplate(`block style "${blockStyle}"`, "block");
export const unknownListWarning = (listStyle) => getTemplate(`list style "${listStyle}"`, "list");
export const unknownListItemWarning = (listStyle) => getTemplate(`list item style "${listStyle}"`, "listItem");
const getTemplate = (prop, type) => `PortableText [components.${prop}] is missing "${type}"`;
export const unknownTypeWarning = (type) => getTemplate("type", type);
export const unknownMarkWarning = (markType) => getTemplate("mark", markType);
export const unknownBlockWarning = (style) => getTemplate("block", style);
export const unknownListWarning = (listItem) => getTemplate("list", listItem);
export const unknownListItemWarning = (listStyle) => getTemplate("listItem", listStyle);
export function printWarning(message) {
console.warn(message);
}
{
"name": "astro-portabletext",
"version": "0.4.0-next.4",
"version": "0.4.0-next.5",
"type": "module",

@@ -5,0 +5,0 @@ "description": "Render Portable Text with Astro",

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