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

carta-md

Package Overview
Dependencies
Maintainers
1
Versions
96
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

carta-md - npm Package Compare versions

Comparing version 4.1.0 to 4.1.1

32

dist/internal/components/Input.svelte.d.ts

@@ -6,11 +6,25 @@ import { SvelteComponentTyped } from "svelte";

props: {
carta: Carta;
value?: string | undefined;
placeholder?: string | undefined;
elem: HTMLDivElement;
handleScroll: (e: UIEvent) => void;
props?: TextAreaProps | undefined;
resize?: (() => void) | undefined;
/**
* The Carta instance to use.
*/ carta: Carta;
/**
* The editor content.
*/ value?: string | undefined;
/**
* The placeholder text for the textarea.
*/ placeholder?: string | undefined;
/**
* The element of the wrapper div.
*/ elem: HTMLDivElement;
/**
* Additional textarea properties.
*/ props?: TextAreaProps | undefined;
/**
* Manually resize the textarea to fit the content, so that it
* always perfectly overlaps the highlighting overlay.
*/ resize?: (() => void) | undefined;
};
events: {
scroll: Event;
} & {
[evt: string]: CustomEvent<any>;

@@ -25,2 +39,6 @@ };

export type InputSlots = typeof __propDef.slots;
/**
* A wrapped textarea component integrated with Carta. It handles the highlighting
* and propagates events to the Carta instance.
*/
export default class Input extends SvelteComponentTyped<InputProps, InputEvents, InputSlots> {

@@ -27,0 +45,0 @@ get resize(): () => void;

@@ -5,8 +5,16 @@ import { SvelteComponentTyped } from "svelte";

props: {
carta: Carta;
value: string;
elem: HTMLDivElement;
handleScroll: (e: UIEvent) => void;
/**
* The Carta instance to use.
*/ carta: Carta;
/**
* The markdown content to render.
*/ value: string;
/**
* The element that wraps the rendered HTML.
*/ elem: HTMLDivElement;
};
events: {
scroll: Event;
render: CustomEvent<void>;
} & {
[evt: string]: CustomEvent<any>;

@@ -21,4 +29,8 @@ };

export type RendererSlots = typeof __propDef.slots;
/**
* This component wraps the Carta renderer and provides a debounced rendering
* for the editor.
*/
export default class Renderer extends SvelteComponentTyped<RendererProps, RendererEvents, RendererSlots> {
}
export {};

@@ -6,6 +6,14 @@ import { SvelteComponentTyped } from "svelte";

props: {
carta: Carta;
mode: 'tabs' | 'split';
tab: 'write' | 'preview';
labels: Labels;
/**
* The Carta instance to use.
*/ carta: Carta;
/**
* The current editor mode.
*/ mode: 'tabs' | 'split';
/**
* The current tab.
*/ tab: 'write' | 'preview';
/**
* Editor labels.
*/ labels: Labels;
};

@@ -20,4 +28,5 @@ events: {

export type ToolbarSlots = typeof __propDef.slots;
/** Displays the buttons to switch tabs and the icons to interact with the editor. */
export default class Toolbar extends SvelteComponentTyped<ToolbarProps, ToolbarEvents, ToolbarSlots> {
}
export {};

@@ -5,5 +5,11 @@ import { SvelteComponentTyped } from "svelte";

props: {
carta: Carta;
value: string;
theme?: string | undefined;
/**
* The Carta instance to use.
*/ carta: Carta;
/**
* Content to render.
*/ value: string;
/**
* The theme to use, which translates to the CSS class `carta-theme__{theme}`.
*/ theme?: string | undefined;
};

@@ -18,4 +24,9 @@ events: {

export type MarkdownSlots = typeof __propDef.slots;
/**
* This component is used to render Markdown once after being parsed twice
* by Carta. The first parsing is done in the server-side rendering (SSR) and the
* second (async) parsing is done in the client-side rendering.
*/
export default class Markdown extends SvelteComponentTyped<MarkdownProps, MarkdownEvents, MarkdownSlots> {
}
export {};

@@ -7,14 +7,41 @@ import { SvelteComponentTyped } from "svelte";

props: {
carta: Carta;
theme?: string | undefined;
value?: string | undefined;
mode?: "auto" | "split" | "tabs" | undefined;
scroll?: "sync" | "async" | undefined;
disableToolbar?: boolean | undefined;
placeholder?: string | undefined;
textarea?: TextAreaProps | undefined;
selectedTab?: "preview" | "write" | undefined;
labels?: Partial<Labels> | undefined;
/**
* The Carta instance to use.
*/ carta: Carta;
/**
* The theme to use, which translates to the CSS class `carta-theme__{theme}`.
*/ theme?: string | undefined;
/**
* The editor content.
*/ value?: string | undefined;
/**
* The mode to use. Can be 'tabs', 'split', or 'auto'
* - 'tabs': The input and renderer are displayed in tabs.
* - 'split': The input and renderer are displayed side by side.
* - 'auto': The mode is automatically selected based on the window width.
*/ mode?: "auto" | "split" | "tabs" | undefined;
/**
* The scroll synchronization mode. Can be 'sync' or 'async'.
* - 'sync': The scroll is synchronized between the input and renderer.
* - 'async': The scroll is not synchronized between the input and renderer.
*/ scroll?: "sync" | "async" | undefined;
/**
* Whether to disable the toolbar.
*/ disableToolbar?: boolean | undefined;
/**
* The placeholder text for the textarea.
*/ placeholder?: string | undefined;
/**
* Additional textarea properties.
*/ textarea?: TextAreaProps | undefined;
/**
* The selected tab. Can be 'write' or 'preview'.
*/ selectedTab?: "preview" | "write" | undefined;
/**
* The labels to use for the editor.
*/ labels?: Partial<Labels> | undefined;
};
events: {
'scroll{handleScroll}': CustomEvent<any>;
} & {
[evt: string]: CustomEvent<any>;

@@ -27,4 +54,9 @@ };

export type MarkdownEditorSlots = typeof __propDef.slots;
/**
* This is the main editor component that combines the input and renderer
* components. It also handles the scroll synchronization between the input and renderer
* components (if set to sync), and the window mode management (tabs or split).
*/
export default class MarkdownEditor extends SvelteComponentTyped<MarkdownEditorProps, MarkdownEditorEvents, MarkdownEditorSlots> {
}
export {};

@@ -19,3 +19,3 @@ {

},
"version": "4.1.0",
"version": "4.1.1",
"scripts": {

@@ -22,0 +22,0 @@ "dev": "vite dev",

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