astro-portabletext
Advanced tools
Comparing version 0.4.0-next.4 to 0.4.0-next.5
@@ -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"; |
@@ -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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
25325
284