Skip to content

[WIP] Extract reusable MDZip workspace functionality into monorepo#1

Draft
kylemwhite with Copilot wants to merge 1 commit into
mainfrom
copilot/extract-mdzip-workspace-functionality
Draft

[WIP] Extract reusable MDZip workspace functionality into monorepo#1
kylemwhite with Copilot wants to merge 1 commit into
mainfrom
copilot/extract-mdzip-workspace-functionality

Conversation

Copilot AI commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Thanks for asking me to work on this. I will get started on it and keep this PR's description up to date as I form a plan and make progress.

Original prompt

Extract Reusable MDZip Workspace Functionality from mdzip-vscode

Objective

Extract the reusable MDZip workspace functionality from mdzip-vscode into a new monorepo:

mdzip-editor

The goal is to separate:

  • MDZip viewing logic

  • MDZip editing logic

  • UI framework implementations

  • Host-specific integrations

into independent layers that can be reused throughout the MDZip ecosystem.

Target architecture:

mdzip-core-js
      ↓
 @mdzip/editor
      ↓
 ┌───────────────┬───────────────┐
 │                │               │
 ↓                ↓               ↓
mdzip-vscode  @mdzip/editor-ng  future hosts

Future applications such as a standalone MDZip desktop application should be able to consume @mdzip/editor-ng directly.

Future hosts should be able to consume @mdzip/editor without depending on Angular.


Scope

The current mdzip-vscode implementation provides both viewing and editing capabilities.

The extracted libraries must preserve both responsibilities.

The resulting architecture should support:

  • Viewing MDZip archives

  • Navigating MDZip archives

  • Inspecting archive contents

  • Rendering Markdown content

  • Viewing assets

  • Viewing manifests

  • Editing Markdown content

  • Managing assets

  • Managing manifests

  • Saving archives

This effort is not limited to editing functionality.

The goal is to create the canonical MDZip workspace library.


Existing Source

Use:

mdzip-vscode

as the source of truth.

Do not rewrite functionality unless necessary.

The objective is extraction and reuse.


Repository Structure

Repository:

mdzip-editor

Recommended structure:

mdzip-editor/
├── packages/
│   ├── editor/
│   └── editor-ng/
│
├── README.md
├── MIGRATION.md
├── package.json
├── tsconfig.json
└── .github/

Published packages:

@mdzip/editor
@mdzip/editor-ng

Future framework implementations may be added later:

packages/
├── editor/
├── editor-ng/
├── editor-react/
└── editor-vue/

Do not create React or Vue implementations at this time.

The architecture should simply allow them to be added later without modifying the core package.


Architecture

Layer 1

mdzip-core-js

Already exists.

Responsibilities:

  • MDZip archive reading

  • MDZip archive writing

  • Manifest support

  • Validation

  • Packaging

  • Extraction

Do not duplicate functionality already provided by mdzip-core-js.


Layer 2

@mdzip/editor

Framework-independent MDZip workspace library.

This is the primary deliverable of this effort.

Responsibilities:

  • Archive state management

  • Document management

  • Archive navigation

  • Archive inspection

  • Rendering coordination

  • Editing workflows

  • Asset management

  • Manifest management

  • Validation orchestration

  • Host abstractions

Must contain:

  • No Angular dependencies

  • No VS Code dependencies

  • No Electron dependencies


Layer 3

@mdzip/editor-ng

Angular implementation of the workspace UI.

Responsibilities:

  • Angular components

  • Angular services

  • Workspace UI

  • Viewer UI

  • Preview UI

  • Navigation UI

  • Asset browser UI

  • Manifest editor UI

Must depend on:

@mdzip/editor

Must contain:

  • No VS Code dependencies

Create Package: @mdzip/editor

Purpose

Provide a framework-independent MDZip workspace engine built on top of mdzip-core-js.

This package should support both viewing and editing scenarios.

This package should eventually be reusable by:

  • VS Code

  • Angular applications

  • Electron applications

  • Browser applications

  • Future React implementations

  • Future Vue implementations


Archive State

Maintain state for:

  • manifest

  • markdown files

  • assets

  • archive metadata

Track:

  • dirty state

  • modified files

  • created files

  • deleted files


Document Management

Support:

  • loading documents

  • switching documents

  • tracking changes

  • saving changes

Support:

  • document mode archives

  • project mode archives


Archive Navigation

Support:

  • archive structure

  • file navigation

  • project navigation

  • entry point discovery


Archive Inspection

Support:

  • read-only archive access

  • manifest inspection

  • asset inspection

  • metadata inspection

The package must be useful even when no editing is performed.


Rendering Coordination

Provide rendering-related abstractions and state management.

The package should support hosts that render Markdown content but should not be tightly coupled to a specific rendering implementation.


Asset Management

Support:

  • asset discovery

  • asset metadata

  • image references

  • asset insertion

Expose APIs only.

Do not create UI.


Manifest Management

Support:

  • manifest loading

  • manifest editing

  • manifest validation


Validation

Support:

  • entry point validation

  • manifest validation

  • archive consistency checks

Reuse existing MDZ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants