Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@weave-md/core

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@weave-md/core - npm Package Compare versions

Comparing version
0.3.1-alpha.0
to
0.5.0
+1
-1
dist/index.d.ts

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

export declare const SPEC_VERSION = "0.1.0";
export declare const SPEC_VERSION = "0.5.0";
export * from './types/index.js';

@@ -3,0 +3,0 @@ export * from './types/extended.js';

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

export const SPEC_VERSION = "0.1.0";
export const SPEC_VERSION = "0.5.0";
export * from './types/index.js';

@@ -3,0 +3,0 @@ export * from './types/extended.js';

@@ -34,6 +34,2 @@ export interface ImageBlock {

}
export interface VoiceoverBlock {
type: 'voiceover';
file: string;
}
export interface MathBlock {

@@ -60,3 +56,3 @@ type: 'math';

}
export type ExtendedBlock = ImageBlock | GalleryBlock | AudioBlock | VideoBlock | EmbedBlock | VoiceoverBlock | MathBlock | PreBlock;
export type ExtendedBlock = ImageBlock | GalleryBlock | AudioBlock | VideoBlock | EmbedBlock | MathBlock | PreBlock;
export type InlineExtension = InlineMath | Sub;
{
"name": "@weave-md/core",
"version": "0.3.1-alpha.0",
"version": "0.5.0",
"description": "Weave Markdown language contract - spec, schemas, types, and pure helpers",

@@ -5,0 +5,0 @@ "type": "module",

@@ -120,14 +120,2 @@ {

},
"VoiceoverBlock": {
"type": "object",
"description": "YAML content for ```voiceover blocks",
"properties": {
"file": {
"type": "string",
"minLength": 1
}
},
"required": ["file"],
"additionalProperties": true
},
"MathBlock": {

@@ -210,3 +198,2 @@ "type": "object",

{ "$ref": "#/definitions/EmbedBlock" },
{ "$ref": "#/definitions/VoiceoverBlock" },
{ "$ref": "#/definitions/MathBlock" },

@@ -213,0 +200,0 @@ { "$ref": "#/definitions/PreBlock" }

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

# Weave Markdown Specification v0.1
# Weave Markdown Specification v0.5.0

@@ -34,2 +34,2 @@ ## Overview

Version **0.1.0** of the Weave Markdown specification.
Version **0.5.0** of the Weave Markdown specification.
# Weave Format
Weave Format is a collection of rich content blocks that extend CommonMark with support for:
Weave Format extends CommonMark with rich content capabilities for writing.
- **Text formatting** - Strikethrough, tables, autolink literals, task lists, and preformatted blocks
- **Mathematics** - Block and inline LaTeX rendering
- **Media** - Images, galleries, audio, video, embeds, and voiceover
## Extension Categories
All weave format blocks use fenced code block syntax with YAML frontmatter for configuration. This provides clean integration with standard Markdown parsers and tooling while enabling rich, structured content.
Extensions are organized into three categories based on their syntax:
## Text Formatting
### 1. GFM Features
Standard GitHub Flavored Markdown extensions for enhanced text formatting:
- Strikethrough, tables, autolink literals, task lists
### 2. Directives
Inline constructs using `:name[...]` syntax:
- `:math[...]` — Inline LaTeX expressions
- `:sub[...]{...}` — Expandable inline substitution
### 3. Fenced Blocks
Block-level constructs using fenced code block syntax with optional YAML configuration:
- `math` — Block LaTeX expressions
- `pre` — Preformatted text with preserved whitespace
- Media blocks: `image`, `gallery`, `audio`, `video`, `embed`
## GFM Features
### Strikethrough

@@ -71,33 +84,4 @@

### Preformatted Text
## Directives
Preserve exact spacing and line breaks using the `pre` language:
````markdown
```pre
Roses are red,
Violets are blue,
Spacing matters,
In poetry too.
```
````
**Behavior**: Whitespace and line breaks are preserved exactly as written.
## Mathematics
### Block Math
Use fenced code blocks with `math` language:
````markdown
```math
E = mc^2
```
````
**Note on Syntax Choice**: We use fenced code blocks with `math` language rather than the `$$...$$` delimiters common in LaTeX because `$$` delimiters can be ambiguous in Markdown and don't integrate well with standard Markdown parsers. Fenced code blocks provide clear boundaries and better tooling support.
**Rendering**: KaTeX or MathJax-based renderers recommended
### Inline Math

@@ -128,6 +112,39 @@

## Media Elements
## Fenced Blocks (Block-Level Constructs)
All media elements use YAML structure inside fenced code blocks to specify their properties. Required fields must be present for valid parsing, while optional fields provide additional configuration.
Fenced blocks use standard Markdown fenced code block syntax with language identifiers and optional YAML frontmatter for configuration.
### Block Math
Use fenced code blocks with `math` language:
````markdown
```math
E = mc^2
```
````
**Note on Syntax Choice**: We use fenced code blocks with `math` language rather than the `$$...$$` delimiters common in LaTeX because `$$` delimiters can be ambiguous in Markdown and don't integrate well with standard Markdown parsers. Fenced code blocks provide clear boundaries and better tooling support.
**Rendering**: KaTeX or MathJax-based renderers recommended
### Preformatted Text
Preserve exact spacing and line breaks using the `pre` language:
````markdown
```pre
Roses are red,
Violets are blue,
Spacing matters,
In poetry too.
```
````
**Behavior**: Whitespace and line breaks are preserved exactly as written.
---
**Media blocks** use YAML structure inside fenced code blocks to specify their properties. Required fields must be present for valid parsing, while optional fields provide additional configuration.
**Unknown Fields**: Implementations MUST preserve unknown YAML fields in media blocks. This allows renderer-specific extensions and custom configuration without breaking conformance. Implementations MAY emit info-level messages for unknown fields.

@@ -241,16 +258,1 @@

### Voiceover
Embed voiceover audio narration:
````markdown
```voiceover
file: https://example.com/voiceover.mp3
```
````
**Voiceover Fields**:
- `file` (required) — Audio file URL or file reference for the voiceover
**Behavior**:
- Embeds pre-recorded voiceover audio narration