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

solid-markdown

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

solid-markdown - npm Package Compare versions

Comparing version 2.0.8 to 2.0.9

dist/dev.js

107

dist/index.d.ts

@@ -1,5 +0,95 @@

import { type Component } from "solid-js";
import { type PluggableList } from "unified";
import type { Options as TransformOptions } from "./types";
import { type Options as FilterOptions } from "./rehype-filter";
import { Component, JSX } from 'solid-js';
import { PluggableList } from 'unified';
import { Position } from 'unist';
import { ElementContent, Text, Element, Root } from 'hast';
interface SolidMarkdownProps {
node: Element;
children: Component[];
/**
* Passed when `options.rawSourcePos` is given
*/
sourcePosition?: Position;
/**
* Passed when `options.includeElementIndex` is given
*/
index?: number;
/**
* Passed when `options.includeElementIndex` is given
*/
siblingCount?: number;
}
type NormalComponents = {
[TagName in keyof JSX.IntrinsicElements]: keyof JSX.IntrinsicElements | Component<JSX.IntrinsicElements[TagName] & SolidMarkdownProps>;
};
type TransformLink = (href: string, children: ElementContent[], title?: string) => string;
type TransformImage = (src: string, alt: string, title?: string) => string;
type TransformLinkTargetType = "_self" | "_blank" | "_parent" | "_top" | (string & {});
type TransformLinkTarget = (href: string, children: ElementContent[], title?: string) => TransformLinkTargetType | undefined;
type SolidMarkdownNames = keyof JSX.IntrinsicElements;
type CodeComponent = Component<JSX.IntrinsicElements["code"] & SolidMarkdownProps & {
inline?: boolean;
}>;
type HeadingComponent = Component<JSX.IntrinsicElements["h1"] & SolidMarkdownProps & {
level: number;
}>;
type LiComponent = Component<JSX.IntrinsicElements["li"] & SolidMarkdownProps & {
checked: boolean | null;
index: number;
ordered: boolean;
}>;
type OrderedListComponent = Component<JSX.IntrinsicElements["ol"] & SolidMarkdownProps & {
depth: number;
ordered: true;
}>;
type TableCellComponent = Component<JSX.IntrinsicElements["table"] & SolidMarkdownProps & {
style?: Record<string, unknown>;
isHeader: boolean;
}>;
type TableRowComponent = Component<JSX.IntrinsicElements["tr"] & SolidMarkdownProps & {
isHeader: boolean;
}>;
type UnorderedListComponent = Component<JSX.IntrinsicElements["ul"] & SolidMarkdownProps & {
depth: number;
ordered: false;
}>;
type SpecialComponents = {
code: CodeComponent | SolidMarkdownNames;
h1: HeadingComponent | SolidMarkdownNames;
h2: HeadingComponent | SolidMarkdownNames;
h3: HeadingComponent | SolidMarkdownNames;
h4: HeadingComponent | SolidMarkdownNames;
h5: HeadingComponent | SolidMarkdownNames;
h6: HeadingComponent | SolidMarkdownNames;
li: LiComponent | SolidMarkdownNames;
ol: OrderedListComponent | SolidMarkdownNames;
td: TableCellComponent | SolidMarkdownNames;
th: TableCellComponent | SolidMarkdownNames;
tr: TableRowComponent | SolidMarkdownNames;
ul: UnorderedListComponent | SolidMarkdownNames;
};
type Components = Omit<Partial<Omit<NormalComponents, keyof SpecialComponents>> & Partial<SpecialComponents>, "text"> & {
text?: Component<{
node: Text;
}>;
};
type Options$1 = {
sourcePos: boolean;
rawSourcePos: boolean;
skipHtml: boolean;
includeElementIndex: boolean;
transformLinkUri: null | false | TransformLink;
transformImageUri?: TransformImage;
linkTarget: TransformLinkTargetType | TransformLinkTarget;
components: Components;
};
type AllowElement = (element: Element, index: number, parent: Element | Root) => boolean | undefined;
type Options = {
allowedElements?: string[];
disallowedElements?: string[];
allowElement?: AllowElement;
unwrapDisallowed: boolean;
};
type CoreOptions = {

@@ -16,5 +106,6 @@ children: string;

};
export type SolidMarkdownOptions = CoreOptions & PluginOptions & LayoutOptions & FilterOptions & TransformOptions;
export type SolidMarkdownComponents = TransformOptions["components"];
export declare const SolidMarkdown: Component<Partial<SolidMarkdownOptions>>;
export {};
type SolidMarkdownOptions = CoreOptions & PluginOptions & LayoutOptions & Options & Options$1;
type SolidMarkdownComponents = Options$1["components"];
declare const SolidMarkdown: Component<Partial<SolidMarkdownOptions>>;
export { SolidMarkdown, type SolidMarkdownComponents, type SolidMarkdownOptions };
{
"name": "solid-markdown",
"version": "2.0.8",
"version": "2.0.9",
"description": "Markdown renderer for solid-js",

@@ -47,10 +47,65 @@ "license": "MIT",

"type": "module",
"main": "./dist/index.js",
"module": "./dist/index.js",
"main": "./dist/server.js",
"module": "./dist/server.js",
"types": "./dist/index.d.ts",
"browser": "./dist/index.js",
"browser": {
"./dist/server.js": "./dist/index.js"
},
"typesVersions": {},
"exports": {
"worker": {
"solid": "./dist/server.jsx",
"import": {
"types": "./dist/index.d.ts",
"default": "./dist/server.js"
}
},
"browser": {
"solid": {
"development": "./dist/dev.jsx",
"import": "./dist/index.jsx"
},
"development": {
"import": {
"types": "./dist/index.d.ts",
"default": "./dist/dev.js"
}
},
"import": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
}
},
"deno": {
"solid": "./dist/server.jsx",
"import": {
"types": "./dist/index.d.ts",
"default": "./dist/server.js"
}
},
"node": {
"solid": "./dist/server.jsx",
"import": {
"types": "./dist/index.d.ts",
"default": "./dist/server.js"
}
},
"solid": {
"development": "./dist/dev.jsx",
"import": "./dist/index.jsx"
},
"development": {
"import": {
"types": "./dist/index.d.ts",
"default": "./dist/dev.js"
}
},
"import": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
}
},
"scripts": {
"dev": "vite serve dev",
"build": "vite build && tsc",
"build": "tsup",
"prepublishOnly": "pnpm build",

@@ -105,2 +160,2 @@ "format": "prettier --ignore-path .gitignore -w \"src/**/*.{js,ts,json,css,tsx,jsx}\" \"dev/**/*.{js,ts,json,css,tsx,jsx}\"",

}
}
}
dist/index.umd.cjs

Sorry, the diff of this file is too big to display

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