# markhermano/paperizer architecture

> Architecture diagram of the GitHub repository markhermano/paperizer, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-01). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/markhermano/paperizer
- Repository: https://github.com/markhermano/paperizer

## Overview

Paperizer is a small Vue composable for printing a selected DOM element. A consumer invokes its entry point, which finds the element, resolves print-window options, opens a preview window, copies the element’s HTML into it, and attaches optional styles; the entry point then focuses and optionally prints and closes that window. The main runtime calls are visible in the excerpts; the README confirms the product purpose but does not document additional capabilities.

Main entry points: [`src/main.ts`](https://github.com/markhermano/paperizer/blob/main/src/main.ts) (Paperizer Entry), [`src/composables/options.ts`](https://github.com/markhermano/paperizer/blob/main/src/composables/options.ts) (Print Options), [`src/composables/window.ts`](https://github.com/markhermano/paperizer/blob/main/src/composables/window.ts) (Window Setup), [`src/composables/component.ts`](https://github.com/markhermano/paperizer/blob/main/src/composables/component.ts) (Element Lookup)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_consumer(("Vue Consumer"))
node_entry["Paperizer Entry<br/>[main.ts]"]
node_lookup["Element Lookup<br/>[component.ts]"]
node_options["Print Options<br/>[options.ts]"]
node_option_types["Option Types<br/>[types.ts]"]
node_window["Window Setup<br/>[window.ts]"]
node_content["HTML Copy<br/>[windowContent.ts]"]
node_styles["Style Attach<br/>[style.ts]"]
node_preview["Browser Preview"]

node_consumer -->|"invokes composable"| node_entry
node_entry -->|"selects element"| node_lookup
node_entry -->|"resolves options"| node_options
node_options -->|"uses option contract"| node_option_types
node_entry -->|"opens preview"| node_window
node_window -->|"opens window"| node_preview
node_entry -->|"writes HTML"| node_content
node_entry -->|"attaches styles"| node_styles
node_entry -->|"prints and focuses"| node_preview

click node_entry "https://github.com/markhermano/paperizer/blob/main/src/main.ts"
click node_lookup "https://github.com/markhermano/paperizer/blob/main/src/composables/component.ts"
click node_options "https://github.com/markhermano/paperizer/blob/main/src/composables/options.ts"
click node_option_types "https://github.com/markhermano/paperizer/blob/main/src/types/types.ts"
click node_window "https://github.com/markhermano/paperizer/blob/main/src/composables/window.ts"
click node_content "https://github.com/markhermano/paperizer/blob/main/src/composables/windowContent.ts"
click node_styles "https://github.com/markhermano/paperizer/blob/main/src/composables/style.ts"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_consumer toneIndigo
class node_entry,node_lookup,node_options,node_option_types,node_window,node_content,node_styles toneTeal
class node_preview toneBlue
```

## Components

### Other components

- **Vue Consumer**
- [Paperizer Entry](https://github.com/markhermano/paperizer/blob/main/src/main.ts): `src/main.ts`
- [Element Lookup](https://github.com/markhermano/paperizer/blob/main/src/composables/component.ts): `src/composables/component.ts`
- [Print Options](https://github.com/markhermano/paperizer/blob/main/src/composables/options.ts): `src/composables/options.ts`
- [Option Types](https://github.com/markhermano/paperizer/blob/main/src/types/types.ts): `src/types/types.ts`
- [Window Setup](https://github.com/markhermano/paperizer/blob/main/src/composables/window.ts): `src/composables/window.ts`
- [HTML Copy](https://github.com/markhermano/paperizer/blob/main/src/composables/windowContent.ts): `src/composables/windowContent.ts`
- [Style Attach](https://github.com/markhermano/paperizer/blob/main/src/composables/style.ts): `src/composables/style.ts`
- **Browser Preview**

## Connections

- Vue Consumer → Paperizer Entry: invokes composable (evidence: `README.md`)
- Paperizer Entry → Element Lookup: selects element (evidence: `src/main.ts`)
- Paperizer Entry → Print Options: resolves options (evidence: `src/main.ts`)
- Print Options → Option Types: uses option contract (evidence: `src/composables/options.ts`)
- Paperizer Entry → Window Setup: opens preview (evidence: `src/main.ts`)
- Window Setup → Browser Preview: opens window (evidence: `src/composables/window.ts`)
- Paperizer Entry → HTML Copy: writes HTML (evidence: `src/main.ts`)
- Paperizer Entry → Style Attach: attaches styles (evidence: `src/main.ts`)
- Paperizer Entry → Browser Preview: prints and focuses (evidence: `src/main.ts`)
