@draftably/editor 0.2.0 → 0.3.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.
@@ -1,23 +0,0 @@
1
- export declare function findChrome(): string;
2
- /** The width and height an SVG declares on its root, rounded up. */
3
- export declare function svgSize(svg: string): {
4
- w: number;
5
- h: number;
6
- };
7
- /**
8
- * Write `svg` as a PNG at `scale` times its own size, with `source` embedded when given. Returns
9
- * the image's size in pixels.
10
- */
11
- export declare function writePng(svg: string, out: string, scale?: number, source?: string): Promise<{
12
- w: number;
13
- h: number;
14
- }>;
15
- /**
16
- * Put the drawing on the macOS clipboard as a PNG at `scale` (with `source` in it when given) and
17
- * `svgText` as text, so it pastes as an image in a doc or chat and as markup in an editor. Returns
18
- * the PNG's size in pixels.
19
- */
20
- export declare function copyToClipboard(svg: string, svgText: string, scale?: number, source?: string): Promise<{
21
- w: number;
22
- h: number;
23
- }>;
@@ -1,17 +0,0 @@
1
- export declare const SOURCE_KEYWORD = "draftably";
2
- export declare const VERSION_KEYWORD = "draftably-version";
3
- export declare const DRAFTABLY_VERSION: string;
4
- /** The PNG with `source` in a `draftably` chunk before its end, replacing any earlier one. */
5
- export declare function embedPngSource(png: Uint8Array, source: string): Promise<Uint8Array>;
6
- /** The source in a PNG's `draftably` chunk, or null when it has none. */
7
- export declare function readPngSource(png: Uint8Array): Promise<string | null>;
8
- /** The `<metadata>` element that carries `source` in an SVG. */
9
- export declare const svgSourceElement: (source: string) => string;
10
- /** The SVG with `source` in a metadata element just inside its root. */
11
- export declare const embedSvgSource: (svg: string, source: string) => string;
12
- /** The source in an SVG's `draftably-source` metadata, or null when it has none. */
13
- export declare function readSvgSource(svg: string): string | null;
14
- /** The source embedded in PNG or SVG bytes, or null when there is none. */
15
- export declare function readImageSource(bytes: Uint8Array): Promise<string | null>;
16
- /** True for a file name the CLI and viewer read source out of. */
17
- export declare const isImageName: (name: string) => boolean;