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

notion-content-render

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

notion-content-render - npm Package Compare versions

Comparing version 0.2.6 to 0.2.7

7

dist/index.d.ts

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

import type { Block } from "@notionhq/client/build/src/api-types";
import type { Block, RichText } from "@notionhq/client/build/src/api-types";
export declare const BLOCK_TYPES: {

@@ -38,4 +38,7 @@ PARAGRAPH: string;

};
declare type Maker<B> = (block: Block) => B;
declare type Maker<B> = {
renderBlock: (block: Block) => B;
renderRichText: (richText: RichText[]) => B;
};
export default function <B>(styleFactory: StyleFactory<B>): Maker<B>;
export {};

@@ -71,16 +71,19 @@ "use strict";

}
return function (block) {
switch (block.type) {
case exports.BLOCK_TYPES.HEADING_1:
return toHeading_1(block);
case exports.BLOCK_TYPES.HEADING_2:
return toHeading_2(block);
case exports.BLOCK_TYPES.HEADING_3:
return toHeading_3(block);
case exports.BLOCK_TYPES.PARAGRAPH:
return toParagraph(block);
case exports.BLOCK_TYPES.BULLETED_LIST_ITEM:
return toBulletList(block);
default:
return styleFactory.unsupported(block);
return {
renderRichText: toRichTextBlock,
renderBlock: function (block) {
switch (block.type) {
case exports.BLOCK_TYPES.HEADING_1:
return toHeading_1(block);
case exports.BLOCK_TYPES.HEADING_2:
return toHeading_2(block);
case exports.BLOCK_TYPES.HEADING_3:
return toHeading_3(block);
case exports.BLOCK_TYPES.PARAGRAPH:
return toParagraph(block);
case exports.BLOCK_TYPES.BULLETED_LIST_ITEM:
return toBulletList(block);
default:
return styleFactory.unsupported(block);
}
}

@@ -87,0 +90,0 @@ };

{
"name": "notion-content-render",
"version": "0.2.6",
"version": "0.2.7",
"description": "A library to render notion content structure to React or MD",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

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