@memberjunction/ng-whiteboard 0.0.1 → 5.42.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +302 -28
- package/dist/lib/whiteboard-agent-sees-popover.component.d.ts +31 -0
- package/dist/lib/whiteboard-agent-sees-popover.component.d.ts.map +1 -0
- package/dist/lib/whiteboard-agent-sees-popover.component.js +132 -0
- package/dist/lib/whiteboard-agent-sees-popover.component.js.map +1 -0
- package/dist/lib/whiteboard-board.component.d.ts +458 -0
- package/dist/lib/whiteboard-board.component.d.ts.map +1 -0
- package/dist/lib/whiteboard-board.component.js +2357 -0
- package/dist/lib/whiteboard-board.component.js.map +1 -0
- package/dist/lib/whiteboard-context-menu.d.ts +57 -0
- package/dist/lib/whiteboard-context-menu.d.ts.map +1 -0
- package/dist/lib/whiteboard-context-menu.js +69 -0
- package/dist/lib/whiteboard-context-menu.js.map +1 -0
- package/dist/lib/whiteboard-export.d.ts +94 -0
- package/dist/lib/whiteboard-export.d.ts.map +1 -0
- package/dist/lib/whiteboard-export.js +592 -0
- package/dist/lib/whiteboard-export.js.map +1 -0
- package/dist/lib/whiteboard-host.component.d.ts +174 -0
- package/dist/lib/whiteboard-host.component.d.ts.map +1 -0
- package/dist/lib/whiteboard-host.component.js +758 -0
- package/dist/lib/whiteboard-host.component.js.map +1 -0
- package/dist/lib/whiteboard-pages.component.d.ts +83 -0
- package/dist/lib/whiteboard-pages.component.d.ts.map +1 -0
- package/dist/lib/whiteboard-pages.component.js +211 -0
- package/dist/lib/whiteboard-pages.component.js.map +1 -0
- package/dist/lib/whiteboard-snapshot.component.d.ts +30 -0
- package/dist/lib/whiteboard-snapshot.component.d.ts.map +1 -0
- package/dist/lib/whiteboard-snapshot.component.js +91 -0
- package/dist/lib/whiteboard-snapshot.component.js.map +1 -0
- package/dist/lib/whiteboard-srcdoc.pipe.d.ts +60 -0
- package/dist/lib/whiteboard-srcdoc.pipe.d.ts.map +1 -0
- package/dist/lib/whiteboard-srcdoc.pipe.js +75 -0
- package/dist/lib/whiteboard-srcdoc.pipe.js.map +1 -0
- package/dist/lib/whiteboard-state.d.ts +1113 -0
- package/dist/lib/whiteboard-state.d.ts.map +1 -0
- package/dist/lib/whiteboard-state.js +1396 -0
- package/dist/lib/whiteboard-state.js.map +1 -0
- package/dist/lib/whiteboard-toolbar.component.d.ts +95 -0
- package/dist/lib/whiteboard-toolbar.component.d.ts.map +1 -0
- package/dist/lib/whiteboard-toolbar.component.js +344 -0
- package/dist/lib/whiteboard-toolbar.component.js.map +1 -0
- package/dist/lib/whiteboard-tools.d.ts +103 -0
- package/dist/lib/whiteboard-tools.d.ts.map +1 -0
- package/dist/lib/whiteboard-tools.js +748 -0
- package/dist/lib/whiteboard-tools.js.map +1 -0
- package/dist/lib/whiteboard-widget-bridge.d.ts +217 -0
- package/dist/lib/whiteboard-widget-bridge.d.ts.map +1 -0
- package/dist/lib/whiteboard-widget-bridge.js +254 -0
- package/dist/lib/whiteboard-widget-bridge.js.map +1 -0
- package/dist/lib/whiteboard-zoom.component.d.ts +55 -0
- package/dist/lib/whiteboard-zoom.component.d.ts.map +1 -0
- package/dist/lib/whiteboard-zoom.component.js +139 -0
- package/dist/lib/whiteboard-zoom.component.js.map +1 -0
- package/dist/lib/whiteboard.module.d.ts +29 -0
- package/dist/lib/whiteboard.module.d.ts.map +1 -0
- package/dist/lib/whiteboard.module.js +78 -0
- package/dist/lib/whiteboard.module.js.map +1 -0
- package/dist/public-api.d.ts +49 -0
- package/dist/public-api.d.ts.map +1 -0
- package/dist/public-api.js +59 -0
- package/dist/public-api.js.map +1 -0
- package/package.json +43 -6
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { WhiteboardState } from './whiteboard-state';
|
|
2
|
+
/**
|
|
3
|
+
* LIVE WHITEBOARD — EXPORT builders (pure, Angular-free).
|
|
4
|
+
*
|
|
5
|
+
* {@link BuildWhiteboardExportHtml} renders a board snapshot as ONE fully self-contained
|
|
6
|
+
* HTML document (inline CSS only, zero external references) suitable for "Download HTML"
|
|
7
|
+
* and the host's Print path; {@link BuildWhiteboardExportSvg} renders the same snapshot
|
|
8
|
+
* as a standalone SVG document for "Download SVG".
|
|
9
|
+
*
|
|
10
|
+
* Rendering model (mirrors the live board):
|
|
11
|
+
* - BOX items (sticky / shape / text / image placeholder) become absolutely positioned
|
|
12
|
+
* divs honoring the optional text-style fields (FontSize / FontFamily / FontWeight /
|
|
13
|
+
* Color), each garnished with a small ownership chip (You / the agent's name);
|
|
14
|
+
* - MARKDOWN panels render their formatted content through {@link RenderMarkdownInert}
|
|
15
|
+
* (escape-FIRST, no raw-HTML passthrough); HTML widgets export as a placeholder card
|
|
16
|
+
* (title + note + escaped source in a <details>) — live widget HTML is NEVER inlined
|
|
17
|
+
* into the export document (no iframe sandbox exists there, so it would be XSS);
|
|
18
|
+
* - VECTOR items (ink strokes, connectors, highlight regions) render in one inline SVG
|
|
19
|
+
* layer underneath the boxes — connectors anchor to item centers via the engine's own
|
|
20
|
+
* {@link WhiteboardState.ResolveEndpoint} bounds math, highlights become dashed
|
|
21
|
+
* outlines;
|
|
22
|
+
* - the palette is a light, paper-friendly literal palette (exports must stand alone, so
|
|
23
|
+
* no design tokens here — this is the documented exception for self-contained output).
|
|
24
|
+
*
|
|
25
|
+
* SECURITY: every piece of user/agent-authored text (item text, labels, names, the title,
|
|
26
|
+
* the agent name, the timestamp) is HTML-escaped via {@link escapeHtml} before it touches
|
|
27
|
+
* the document. Output is deterministic for a given state + options (the caller passes
|
|
28
|
+
* `GeneratedAt`).
|
|
29
|
+
*/
|
|
30
|
+
/** Options for {@link BuildWhiteboardExportHtml}. */
|
|
31
|
+
export interface WhiteboardExportOptions {
|
|
32
|
+
/** Document / header title (e.g. the board title). */
|
|
33
|
+
Title: string;
|
|
34
|
+
/** Display name of the session's agent — ownership chips + header byline. */
|
|
35
|
+
AgentName: string;
|
|
36
|
+
/** Preformatted generation timestamp (passed in so output stays deterministic). */
|
|
37
|
+
GeneratedAt: string;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Minimal, SAFE markdown → HTML renderer for the self-contained exports (the live board
|
|
41
|
+
* renders through the shared `mj-markdown` Angular component instead — this exists only
|
|
42
|
+
* because export builders are pure functions with no Angular available).
|
|
43
|
+
*
|
|
44
|
+
* SECURITY: ESCAPE-FIRST — the whole source is HTML-escaped before any formatting, so raw
|
|
45
|
+
* HTML in the markdown can never become live markup (NO passthrough, ever). Supported:
|
|
46
|
+
* headings, bold/italic, inline code, fenced code blocks, un/ordered lists, paragraphs,
|
|
47
|
+
* and links restricted to http(s)/mailto.
|
|
48
|
+
*/
|
|
49
|
+
export declare function RenderMarkdownInert(markdown: string): string;
|
|
50
|
+
/**
|
|
51
|
+
* Build a fully self-contained HTML document for the given board snapshot — inline CSS
|
|
52
|
+
* only, light paper-friendly palette, header (title / generated-at / agent byline), the
|
|
53
|
+
* positioned board, ownership chips, item-count footer and print-friendly `@media print`
|
|
54
|
+
* rules. Deterministic for a given state + options; all text is HTML-escaped.
|
|
55
|
+
*
|
|
56
|
+
* Renders the ACTIVE page only — see {@link BuildWhiteboardExportHtmlAllPages} for the
|
|
57
|
+
* every-page document.
|
|
58
|
+
*/
|
|
59
|
+
export declare function BuildWhiteboardExportHtml(state: WhiteboardState, opts: WhiteboardExportOptions): string;
|
|
60
|
+
/**
|
|
61
|
+
* Build a standalone SVG document of the board snapshot: box items as SVG rects / shapes /
|
|
62
|
+
* single-line text, plus the same vector layer (ink, connectors, highlight outlines).
|
|
63
|
+
* All text is escaped; output is deterministic for a given state.
|
|
64
|
+
*
|
|
65
|
+
* Renders the ACTIVE page only — see {@link BuildWhiteboardExportSvgPages} for one SVG
|
|
66
|
+
* document per page.
|
|
67
|
+
*/
|
|
68
|
+
export declare function BuildWhiteboardExportSvg(state: WhiteboardState): string;
|
|
69
|
+
/** One page's rendered export document — the per-page output of the all-pages builders. */
|
|
70
|
+
export interface WhiteboardPageExport {
|
|
71
|
+
/** The page's stable id (e.g. `page-2`). */
|
|
72
|
+
PageID: string;
|
|
73
|
+
/** The page's display name — callers typically suffix download filenames with it. */
|
|
74
|
+
PageName: string;
|
|
75
|
+
/** The fully rendered export document for that page. */
|
|
76
|
+
Content: string;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Build one standalone SVG document PER PAGE (SVG is a single-image format, so "all
|
|
80
|
+
* pages" means one file per page — the host downloads them sequentially, suffixing each
|
|
81
|
+
* filename with the page name). Page order matches the board's page strip; each entry's
|
|
82
|
+
* content is exactly what {@link BuildWhiteboardExportSvg} produces for that page.
|
|
83
|
+
*/
|
|
84
|
+
export declare function BuildWhiteboardExportSvgPages(state: WhiteboardState): WhiteboardPageExport[];
|
|
85
|
+
/**
|
|
86
|
+
* Build ONE fully self-contained HTML document containing EVERY page of the board —
|
|
87
|
+
* each page renders as its own titled section ("name (n of m)") with the same
|
|
88
|
+
* board/chip/vector rendering as the single-page export, and the print CSS breaks
|
|
89
|
+
* between pages. The footer totals span all pages. Deterministic and escape-safe like
|
|
90
|
+
* the single-page builder. (The board's JSON/state persistence already carries all
|
|
91
|
+
* pages inherently — this is the human-readable counterpart.)
|
|
92
|
+
*/
|
|
93
|
+
export declare function BuildWhiteboardExportHtmlAllPages(state: WhiteboardState, opts: WhiteboardExportOptions): string;
|
|
94
|
+
//# sourceMappingURL=whiteboard-export.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"whiteboard-export.d.ts","sourceRoot":"","sources":["../../src/lib/whiteboard-export.ts"],"names":[],"mappings":"AAAA,OAAO,EAYL,eAAe,EAGhB,MAAM,oBAAoB,CAAC;AAE5B;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,qDAAqD;AACrD,MAAM,WAAW,uBAAuB;IACtC,sDAAsD;IACtD,KAAK,EAAE,MAAM,CAAC;IACd,6EAA6E;IAC7E,SAAS,EAAE,MAAM,CAAC;IAClB,mFAAmF;IACnF,WAAW,EAAE,MAAM,CAAC;CACrB;AA6ED;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAoE5D;AAqPD;;;;;;;;GAQG;AACH,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,eAAe,EAAE,IAAI,EAAE,uBAAuB,GAAG,MAAM,CA0BvG;AAwED;;;;;;;GAOG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,eAAe,GAAG,MAAM,CAuBvE;AAID,2FAA2F;AAC3F,MAAM,WAAW,oBAAoB;IACnC,4CAA4C;IAC5C,MAAM,EAAE,MAAM,CAAC;IACf,qFAAqF;IACrF,QAAQ,EAAE,MAAM,CAAC;IACjB,wDAAwD;IACxD,OAAO,EAAE,MAAM,CAAC;CACjB;AAgBD;;;;;GAKG;AACH,wBAAgB,6BAA6B,CAAC,KAAK,EAAE,eAAe,GAAG,oBAAoB,EAAE,CAM5F;AAED;;;;;;;GAOG;AACH,wBAAgB,iCAAiC,CAAC,KAAK,EAAE,eAAe,EAAE,IAAI,EAAE,uBAAuB,GAAG,MAAM,CAsC/G"}
|