@mlightcad/cad-pdf-plugin 1.7.0 → 1.7.1
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/LICENSE +21 -21
- package/README.md +180 -164
- package/dist/cad-pdf-plugin-register.js +1 -1
- package/dist/cad-pdf-plugin-register.umd.cjs +1 -1
- package/dist/cad-pdf-plugin.js +17087 -41467
- package/dist/cad-pdf-plugin.umd.cjs +13 -270
- package/lib/AcApConvertToPdfCmd.d.ts +13 -2
- package/lib/AcApConvertToPdfCmd.d.ts.map +1 -1
- package/lib/AcApConvertToPdfCmd.js +153 -7
- package/lib/AcApConvertToPdfCmd.js.map +1 -1
- package/lib/AcApPdfConvertor.d.ts +18 -8
- package/lib/AcApPdfConvertor.d.ts.map +1 -1
- package/lib/AcApPdfConvertor.js +87 -94
- package/lib/AcApPdfConvertor.js.map +1 -1
- package/lib/AcApPdfExportOptions.d.ts +38 -0
- package/lib/AcApPdfExportOptions.d.ts.map +1 -0
- package/lib/AcApPdfExportOptions.js +12 -0
- package/lib/AcApPdfExportOptions.js.map +1 -0
- package/lib/AcApPdfFontResolver.d.ts +20 -0
- package/lib/AcApPdfFontResolver.d.ts.map +1 -0
- package/lib/AcApPdfFontResolver.js +105 -0
- package/lib/AcApPdfFontResolver.js.map +1 -0
- package/lib/AcApPdfGlyphProvider.d.ts +15 -0
- package/lib/AcApPdfGlyphProvider.d.ts.map +1 -0
- package/lib/AcApPdfGlyphProvider.js +277 -0
- package/lib/AcApPdfGlyphProvider.js.map +1 -0
- package/lib/AcApPdfPlugin.d.ts +5 -3
- package/lib/AcApPdfPlugin.d.ts.map +1 -1
- package/lib/AcApPdfPlugin.js +13 -6
- package/lib/AcApPdfPlugin.js.map +1 -1
- package/lib/index.d.ts +2 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +2 -0
- package/lib/index.js.map +1 -1
- package/lib/register.d.ts +4 -2
- package/lib/register.d.ts.map +1 -1
- package/lib/register.js +4 -2
- package/lib/register.js.map +1 -1
- package/package.json +9 -9
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
11
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
12
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
13
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
14
|
+
function step(op) {
|
|
15
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
16
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
17
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
18
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
19
|
+
switch (op[0]) {
|
|
20
|
+
case 0: case 1: t = op; break;
|
|
21
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
22
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
23
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
24
|
+
default:
|
|
25
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
26
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
27
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
28
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
29
|
+
if (t[2]) _.ops.pop();
|
|
30
|
+
_.trys.pop(); continue;
|
|
31
|
+
}
|
|
32
|
+
op = body.call(thisArg, _);
|
|
33
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
34
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
import { AcApFontUtil } from '@mlightcad/cad-simple-viewer';
|
|
38
|
+
/**
|
|
39
|
+
* Resolves embeddable TTF/OTF/WOFF font programs for `textMode: 'text'` PDF
|
|
40
|
+
* exports from the viewer font catalog.
|
|
41
|
+
*
|
|
42
|
+
* Lookup mirrors on-screen text rendering: direct catalog hit first, then the
|
|
43
|
+
* font manager's replacement chain (`getReplacementFontName`) for style fonts
|
|
44
|
+
* the catalog does not list ("Standard", localized aliases like "标准", …).
|
|
45
|
+
* Only a catalog *miss* falls through to the replacement — a direct SHX hit
|
|
46
|
+
* stays SHX so those texts keep their vector-glyph appearance in the PDF.
|
|
47
|
+
*
|
|
48
|
+
* The catalog entry's `url` is fetched on demand; bytes are not kept between
|
|
49
|
+
* calls beyond pdf-lib's own embed cache, so a document using several CJK
|
|
50
|
+
* faces embeds each subset once regardless of how many texts reference it.
|
|
51
|
+
*
|
|
52
|
+
* SHX fonts have no embeddable program and resolve `undefined` — the renderer
|
|
53
|
+
* then paints those texts as vector glyphs, matching the on-screen fallback.
|
|
54
|
+
*/
|
|
55
|
+
export var resolveViewerTextFont = function (fontName) { return __awaiter(void 0, void 0, void 0, function () {
|
|
56
|
+
var info, res, bytes, _a, error_1;
|
|
57
|
+
return __generator(this, function (_b) {
|
|
58
|
+
switch (_b.label) {
|
|
59
|
+
case 0:
|
|
60
|
+
info = findEmbeddableInfo(fontName);
|
|
61
|
+
if (!info || info.type !== 'mesh' || !info.url) {
|
|
62
|
+
// Called at most once per unique font name (negative results are cached
|
|
63
|
+
// by the renderer's font manager), so this cannot flood the log.
|
|
64
|
+
console.warn("[cad-pdf-plugin] No embeddable font for \"".concat(fontName, "\" ") +
|
|
65
|
+
"(catalog=".concat(info ? info.type : 'miss', ", url=").concat((info === null || info === void 0 ? void 0 : info.url) ? 'yes' : 'no', "); ") +
|
|
66
|
+
'texts using it are painted as vector glyphs');
|
|
67
|
+
return [2 /*return*/, undefined];
|
|
68
|
+
}
|
|
69
|
+
_b.label = 1;
|
|
70
|
+
case 1:
|
|
71
|
+
_b.trys.push([1, 4, , 5]);
|
|
72
|
+
return [4 /*yield*/, fetch(info.url)];
|
|
73
|
+
case 2:
|
|
74
|
+
res = _b.sent();
|
|
75
|
+
if (!res.ok) {
|
|
76
|
+
console.warn("[cad-pdf-plugin] Font \"".concat(fontName, "\" fetch failed (").concat(res.status, " ").concat(info.url, "); ") +
|
|
77
|
+
'texts using it are painted as vector glyphs');
|
|
78
|
+
return [2 /*return*/, undefined];
|
|
79
|
+
}
|
|
80
|
+
_a = Uint8Array.bind;
|
|
81
|
+
return [4 /*yield*/, res.arrayBuffer()];
|
|
82
|
+
case 3:
|
|
83
|
+
bytes = new (_a.apply(Uint8Array, [void 0, _b.sent()]))();
|
|
84
|
+
return [2 /*return*/, bytes.byteLength > 0 ? bytes : undefined];
|
|
85
|
+
case 4:
|
|
86
|
+
error_1 = _b.sent();
|
|
87
|
+
console.warn("[cad-pdf-plugin] Font \"".concat(fontName, "\" fetch errored (").concat(info.url, "): ") +
|
|
88
|
+
"".concat(error_1 instanceof Error ? error_1.message : String(error_1), "; ") +
|
|
89
|
+
'texts using it are painted as vector glyphs');
|
|
90
|
+
return [2 /*return*/, undefined];
|
|
91
|
+
case 5: return [2 /*return*/];
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
}); };
|
|
95
|
+
function findEmbeddableInfo(fontName) {
|
|
96
|
+
var direct = AcApFontUtil.findFontInfoByName(fontName);
|
|
97
|
+
if (direct) {
|
|
98
|
+
return direct;
|
|
99
|
+
}
|
|
100
|
+
var replacement = AcApFontUtil.getReplacementFontName(fontName);
|
|
101
|
+
return replacement && replacement !== fontName
|
|
102
|
+
? AcApFontUtil.findFontInfoByName(replacement)
|
|
103
|
+
: undefined;
|
|
104
|
+
}
|
|
105
|
+
//# sourceMappingURL=AcApPdfFontResolver.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AcApPdfFontResolver.js","sourceRoot":"","sources":["../src/AcApPdfFontResolver.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAG3D;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,CAAC,IAAM,qBAAqB,GAA0B,UAAM,QAAQ;;;;;gBAClE,IAAI,GAAG,kBAAkB,CAAC,QAAQ,CAAC,CAAA;gBACzC,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,KAAK,MAAM,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC;oBAC/C,wEAAwE;oBACxE,iEAAiE;oBACjE,OAAO,CAAC,IAAI,CACV,oDAA4C,QAAQ,QAAI;wBACtD,mBAAY,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,mBAAS,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,GAAG,EAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,QAAK;wBAC3E,6CAA6C,CAChD,CAAA;oBACD,sBAAO,SAAS,EAAA;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phProvider } from '@mlightcad/pdf-renderer';
|
|
2
|
+
/**
|
|
3
|
+
* Turns the viewer's already-initialized mtext renderer into PDF glyph
|
|
4
|
+
* geometry so TEXT/MTEXT are not dropped during export.
|
|
5
|
+
*
|
|
6
|
+
* Geometry is emitted as flat float32 buffers relative to the text's own
|
|
7
|
+
* insertion point. Large drawings carry tens of thousands of MTEXT instances;
|
|
8
|
+
* the previous per-triangle object graphs (`{x, y}` points inside
|
|
9
|
+
* per-primitive arrays) retained ~25 objects per triangle in the renderer's
|
|
10
|
+
* glyph cache and exhausted the tab's heap. Buffers are shared by reference
|
|
11
|
+
* across identical texts, so a drawing's unique text content costs ~24 bytes
|
|
12
|
+
* per triangle.
|
|
13
|
+
*/
|
|
14
|
+
export declare function createViewerPdfGlyphProvider(): AcPdfGlyphProvider;
|
|
15
|
+
//# sourceMappingURL=AcApPdfGlyphProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AcApPdfGlyphProvider.d.ts","sourceRoot":"","sources":["../src/AcApPdfGlyphProvider.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAGV,kBAAkB,EACnB,MAAM,yBAAyB,CAAA;AA0BhC;;;;;;;;;;;GAWG;AACH,wBAAgB,4BAA4B,IAAI,kBAAkB,CAgDjE"}
|
|
@@ -0,0 +1,277 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
11
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
12
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
13
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
14
|
+
function step(op) {
|
|
15
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
16
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
17
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
18
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
19
|
+
switch (op[0]) {
|
|
20
|
+
case 0: case 1: t = op; break;
|
|
21
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
22
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
23
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
24
|
+
default:
|
|
25
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
26
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
27
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
28
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
29
|
+
if (t[2]) _.ops.pop();
|
|
30
|
+
_.trys.pop(); continue;
|
|
31
|
+
}
|
|
32
|
+
op = body.call(thisArg, _);
|
|
33
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
34
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
var __values = (this && this.__values) || function(o) {
|
|
38
|
+
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
39
|
+
if (m) return m.call(o);
|
|
40
|
+
if (o && typeof o.length === "number") return {
|
|
41
|
+
next: function () {
|
|
42
|
+
if (o && i >= o.length) o = void 0;
|
|
43
|
+
return { value: o && o[i++], done: !o };
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
47
|
+
};
|
|
48
|
+
import { AcTrMTextRenderer } from '@mlightcad/three-renderer';
|
|
49
|
+
/**
|
|
50
|
+
* Turns the viewer's already-initialized mtext renderer into PDF glyph
|
|
51
|
+
* geometry so TEXT/MTEXT are not dropped during export.
|
|
52
|
+
*
|
|
53
|
+
* Geometry is emitted as flat float32 buffers relative to the text's own
|
|
54
|
+
* insertion point. Large drawings carry tens of thousands of MTEXT instances;
|
|
55
|
+
* the previous per-triangle object graphs (`{x, y}` points inside
|
|
56
|
+
* per-primitive arrays) retained ~25 objects per triangle in the renderer's
|
|
57
|
+
* glyph cache and exhausted the tab's heap. Buffers are shared by reference
|
|
58
|
+
* across identical texts, so a drawing's unique text content costs ~24 bytes
|
|
59
|
+
* per triangle.
|
|
60
|
+
*/
|
|
61
|
+
export function createViewerPdfGlyphProvider() {
|
|
62
|
+
var empty = {
|
|
63
|
+
triangles: new Float32Array(0),
|
|
64
|
+
polylines: new Float32Array(0)
|
|
65
|
+
};
|
|
66
|
+
var emptyBox = { min: { x: 0, y: 0 }, max: { x: 0, y: 0 } };
|
|
67
|
+
return {
|
|
68
|
+
renderMText: function (data, style) {
|
|
69
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
70
|
+
var renderer, object, contents, _a, primitives, box, _b;
|
|
71
|
+
var _c, _d, _e, _f, _g, _h;
|
|
72
|
+
return __generator(this, function (_j) {
|
|
73
|
+
switch (_j.label) {
|
|
74
|
+
case 0:
|
|
75
|
+
_j.trys.push([0, 2, , 3]);
|
|
76
|
+
renderer = AcTrMTextRenderer.getInstance();
|
|
77
|
+
return [4 /*yield*/, renderer.asyncRenderMText(
|
|
78
|
+
// AcGi and mtext-renderer attachment enums are structurally compatible
|
|
79
|
+
// at runtime but diverge in the TypeScript type graph.
|
|
80
|
+
data, style)];
|
|
81
|
+
case 1:
|
|
82
|
+
object = (_j.sent());
|
|
83
|
+
contents = (_d = (_c = data.contents) !== null && _c !== void 0 ? _c : data.text) !== null && _d !== void 0 ? _d : '';
|
|
84
|
+
_a = extractGlyphPrimitives(object, (_f = (_e = data.position) === null || _e === void 0 ? void 0 : _e.x) !== null && _f !== void 0 ? _f : 0, (_h = (_g = data.position) === null || _g === void 0 ? void 0 : _g.y) !== null && _h !== void 0 ? _h : 0), primitives = _a.primitives, box = _a.box;
|
|
85
|
+
return [2 /*return*/, { primitives: primitives, actualText: contents, box: box }];
|
|
86
|
+
case 2:
|
|
87
|
+
_b = _j.sent();
|
|
88
|
+
return [2 /*return*/, { primitives: empty, actualText: '', box: emptyBox }];
|
|
89
|
+
case 3: return [2 /*return*/];
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
});
|
|
93
|
+
},
|
|
94
|
+
renderShape: function (shape, style) {
|
|
95
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
96
|
+
var renderer, object, _a, primitives, box, _b;
|
|
97
|
+
var _c, _d, _e, _f;
|
|
98
|
+
return __generator(this, function (_g) {
|
|
99
|
+
switch (_g.label) {
|
|
100
|
+
case 0:
|
|
101
|
+
_g.trys.push([0, 2, , 3]);
|
|
102
|
+
renderer = AcTrMTextRenderer.getInstance();
|
|
103
|
+
return [4 /*yield*/, renderer.asyncRenderShape(shape, (style !== null && style !== void 0 ? style : {}))];
|
|
104
|
+
case 1:
|
|
105
|
+
object = (_g.sent());
|
|
106
|
+
_a = extractGlyphPrimitives(object, (_d = (_c = shape.position) === null || _c === void 0 ? void 0 : _c.x) !== null && _d !== void 0 ? _d : 0, (_f = (_e = shape.position) === null || _e === void 0 ? void 0 : _e.y) !== null && _f !== void 0 ? _f : 0), primitives = _a.primitives, box = _a.box;
|
|
107
|
+
return [2 /*return*/, { primitives: primitives, box: box }];
|
|
108
|
+
case 2:
|
|
109
|
+
_b = _g.sent();
|
|
110
|
+
return [2 /*return*/, { primitives: empty, box: emptyBox }];
|
|
111
|
+
case 3: return [2 /*return*/];
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Builds flat triangle/polyline buffers from the rendered scene graph,
|
|
120
|
+
* baking each node's world matrix and translating the result so (0,0) is the
|
|
121
|
+
* text's insertion point.
|
|
122
|
+
*/
|
|
123
|
+
function extractGlyphPrimitives(root, originX, originY) {
|
|
124
|
+
var e_1, _a;
|
|
125
|
+
var _b;
|
|
126
|
+
(_b = root.updateMatrixWorld) === null || _b === void 0 ? void 0 : _b.call(root, true);
|
|
127
|
+
var sources = [];
|
|
128
|
+
var triangleFloats = 0;
|
|
129
|
+
var lineFloats = 0;
|
|
130
|
+
root.traverse(function (node) {
|
|
131
|
+
var _a, _b;
|
|
132
|
+
var geom = node.geometry;
|
|
133
|
+
if (!geom) {
|
|
134
|
+
return;
|
|
135
|
+
}
|
|
136
|
+
var pos = geom.getAttribute('position');
|
|
137
|
+
if (!pos || pos.count < 1) {
|
|
138
|
+
return;
|
|
139
|
+
}
|
|
140
|
+
if (node.isMesh) {
|
|
141
|
+
var index = geom.getIndex();
|
|
142
|
+
var triCount = index ? index.count / 3 : Math.floor(pos.count / 3);
|
|
143
|
+
if (triCount < 1) {
|
|
144
|
+
return;
|
|
145
|
+
}
|
|
146
|
+
sources.push({
|
|
147
|
+
elements: (_a = node.matrixWorld) === null || _a === void 0 ? void 0 : _a.elements,
|
|
148
|
+
pos: pos,
|
|
149
|
+
index: index,
|
|
150
|
+
isMesh: true,
|
|
151
|
+
isSegments: false
|
|
152
|
+
});
|
|
153
|
+
triangleFloats += triCount * 6;
|
|
154
|
+
return;
|
|
155
|
+
}
|
|
156
|
+
if (node.isLine) {
|
|
157
|
+
// three.js: LineSegments extends Line, so `isLine` is true for both.
|
|
158
|
+
// Stroke-font glyphs (SHX) arrive as LineSegments where every vertex
|
|
159
|
+
// PAIR is an independent stroke — expanding them as one continuous
|
|
160
|
+
// polyline would connect glyph strokes end-to-end.
|
|
161
|
+
var segments = !!node.isLineSegments;
|
|
162
|
+
sources.push({
|
|
163
|
+
elements: (_b = node.matrixWorld) === null || _b === void 0 ? void 0 : _b.elements,
|
|
164
|
+
pos: pos,
|
|
165
|
+
index: null,
|
|
166
|
+
isMesh: false,
|
|
167
|
+
isSegments: segments
|
|
168
|
+
});
|
|
169
|
+
lineFloats += segments
|
|
170
|
+
? Math.floor(pos.count / 2) * 5
|
|
171
|
+
: pos.count * 2 + 1;
|
|
172
|
+
}
|
|
173
|
+
});
|
|
174
|
+
var triangles = new Float32Array(triangleFloats);
|
|
175
|
+
var polylines = new Float32Array(lineFloats);
|
|
176
|
+
var minX = Infinity;
|
|
177
|
+
var minY = Infinity;
|
|
178
|
+
var maxX = -Infinity;
|
|
179
|
+
var maxY = -Infinity;
|
|
180
|
+
var expand = function (x, y) {
|
|
181
|
+
if (x < minX) {
|
|
182
|
+
minX = x;
|
|
183
|
+
}
|
|
184
|
+
if (y < minY) {
|
|
185
|
+
minY = y;
|
|
186
|
+
}
|
|
187
|
+
if (x > maxX) {
|
|
188
|
+
maxX = x;
|
|
189
|
+
}
|
|
190
|
+
if (y > maxY) {
|
|
191
|
+
maxY = y;
|
|
192
|
+
}
|
|
193
|
+
};
|
|
194
|
+
var triOffset = 0;
|
|
195
|
+
var lineOffset = 0;
|
|
196
|
+
var _loop_1 = function (source) {
|
|
197
|
+
var el = source.elements;
|
|
198
|
+
var pos = source.pos;
|
|
199
|
+
// Full 4x4 transform with perspective divide, matching the previous
|
|
200
|
+
// per-point `applyWorldMatrix` behavior.
|
|
201
|
+
var world = function (i) {
|
|
202
|
+
var x = pos.getX(i);
|
|
203
|
+
var y = pos.getY(i);
|
|
204
|
+
if (!el) {
|
|
205
|
+
return { x: x, y: y };
|
|
206
|
+
}
|
|
207
|
+
var z = pos.getZ(i);
|
|
208
|
+
var w = el[3] * x + el[7] * y + el[11] * z + el[15];
|
|
209
|
+
var invW = w === 0 ? 1 : 1 / w;
|
|
210
|
+
return {
|
|
211
|
+
x: (el[0] * x + el[4] * y + el[8] * z + el[12]) * invW,
|
|
212
|
+
y: (el[1] * x + el[5] * y + el[9] * z + el[13]) * invW
|
|
213
|
+
};
|
|
214
|
+
};
|
|
215
|
+
if (source.isMesh) {
|
|
216
|
+
var count = source.index
|
|
217
|
+
? source.index.count / 3
|
|
218
|
+
: Math.floor(pos.count / 3);
|
|
219
|
+
for (var t = 0; t < count; t++) {
|
|
220
|
+
for (var k = 0; k < 3; k++) {
|
|
221
|
+
var vi = source.index ? source.index.getX(t * 3 + k) : t * 3 + k;
|
|
222
|
+
var p = world(vi);
|
|
223
|
+
var x = p.x - originX;
|
|
224
|
+
var y = p.y - originY;
|
|
225
|
+
triangles[triOffset++] = x;
|
|
226
|
+
triangles[triOffset++] = y;
|
|
227
|
+
expand(x, y);
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
else if (source.isSegments) {
|
|
232
|
+
// One polyline per vertex pair: each stroke stays independent.
|
|
233
|
+
var pairCount = Math.floor(pos.count / 2);
|
|
234
|
+
for (var s = 0; s < pairCount; s++) {
|
|
235
|
+
polylines[lineOffset++] = 2;
|
|
236
|
+
for (var k = 0; k < 2; k++) {
|
|
237
|
+
var p = world(s * 2 + k);
|
|
238
|
+
var x = p.x - originX;
|
|
239
|
+
var y = p.y - originY;
|
|
240
|
+
polylines[lineOffset++] = x;
|
|
241
|
+
polylines[lineOffset++] = y;
|
|
242
|
+
expand(x, y);
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
else {
|
|
247
|
+
polylines[lineOffset++] = pos.count;
|
|
248
|
+
for (var i = 0; i < pos.count; i++) {
|
|
249
|
+
var p = world(i);
|
|
250
|
+
var x = p.x - originX;
|
|
251
|
+
var y = p.y - originY;
|
|
252
|
+
polylines[lineOffset++] = x;
|
|
253
|
+
polylines[lineOffset++] = y;
|
|
254
|
+
expand(x, y);
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
};
|
|
258
|
+
try {
|
|
259
|
+
for (var sources_1 = __values(sources), sources_1_1 = sources_1.next(); !sources_1_1.done; sources_1_1 = sources_1.next()) {
|
|
260
|
+
var source = sources_1_1.value;
|
|
261
|
+
_loop_1(source);
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
265
|
+
finally {
|
|
266
|
+
try {
|
|
267
|
+
if (sources_1_1 && !sources_1_1.done && (_a = sources_1.return)) _a.call(sources_1);
|
|
268
|
+
}
|
|
269
|
+
finally { if (e_1) throw e_1.error; }
|
|
270
|
+
}
|
|
271
|
+
var primitives = { triangles: triangles, polylines: polylines };
|
|
272
|
+
var box = Number.isFinite(minX)
|
|
273
|
+
? { min: { x: minX, y: minY }, max: { x: maxX, y: maxY } }
|
|
274
|
+
: { min: { x: 0, y: 0 }, max: { x: 0, y: 0 } };
|
|
275
|
+
return { primitives: primitives, box: box };
|
|
276
|
+
}
|
|
277
|
+
//# sourceMappingURL=AcApPdfGlyphProvider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AcApPdfGlyphProvider.js","sourceRoot":"","sources":["../src/AcApPdfGlyphProvider.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAUA,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAA;AAyB7D;;;;;;;;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CAAC,CAAC,CAAC,CAAA;gBAClB,IAAM,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,OAAO,CAAA;gBACvB,IAAM,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,OAAO,CAAA;gBACvB,SAAS,CAAC,UAAU,EAAE,CAAC,GAAG,CAAC,CAAA;gBAC3B,SAAS,CAAC,UAAU,EAAE,CAAC,GAAG,CAAC,CAAA;gBAC3B,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;YACd,CAAC;QACH,CAAC;;;QA1DH,KAAqB,IAAA,YAAA,SAAA,OAAO,CAAA,gCAAA;YAAvB,IAAM,MAAM,oBAAA;oBAAN,MAAM;SA2DhB;;;;;;;;;IAED,IAAM,UAAU,GAAyB,EAAE,SAAS,WAAA,EAAE,SAAS,WAAA,EAAE,CAAA;IACjE,IAAM,GAAG,GAAkB,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC;QAC9C,CAAC,CAAC,EAAE,GAAG,EAAE,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,EAAE;QAC1D,CAAC,CAAC,EAAE,GAAG,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,CAAA;IAChD,OAAO,EAAE,UAAU,YAAA,EAAE,GAAG,KAAA,EAAE,CAAA;AAC5B,CAAC"}
|
package/lib/AcApPdfPlugin.d.ts
CHANGED
|
@@ -8,8 +8,9 @@ export interface AcApPdfPluginOptions {
|
|
|
8
8
|
/**
|
|
9
9
|
* PDF export/import plugin for cad-simple-viewer.
|
|
10
10
|
*
|
|
11
|
-
* Registers
|
|
12
|
-
*
|
|
11
|
+
* Registers `-cpdf` and `ipdf` when loaded. Also registers `cpdf` when no UI
|
|
12
|
+
* dialog command is already present. Register this plugin lazily via
|
|
13
|
+
* {@link registerLazyPdfPlugin} so the PDF renderer is fetched on demand.
|
|
13
14
|
*/
|
|
14
15
|
export declare class AcApPdfPlugin implements AcApPlugin {
|
|
15
16
|
/** @inheritdoc */
|
|
@@ -23,7 +24,8 @@ export declare class AcApPdfPlugin implements AcApPlugin {
|
|
|
23
24
|
private registeredCommands;
|
|
24
25
|
constructor(options?: AcApPdfPluginOptions);
|
|
25
26
|
/**
|
|
26
|
-
* Registers
|
|
27
|
+
* Registers `-cpdf` (when export is enabled) and `ipdf` system commands.
|
|
28
|
+
* Registers `cpdf` only when a host UI has not already claimed that name.
|
|
27
29
|
*
|
|
28
30
|
* @param _context - Application context (unused)
|
|
29
31
|
* @param commandManager - Command stack used to register PDF commands
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AcApPdfPlugin.d.ts","sourceRoot":"","sources":["../src/AcApPdfPlugin.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,UAAU,EACV,gBAAgB,EACjB,MAAM,8BAA8B,CAAA;AAMrC,MAAM,WAAW,oBAAoB;IACnC;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAA;CACxB;AAED
|
|
1
|
+
{"version":3,"file":"AcApPdfPlugin.d.ts","sourceRoot":"","sources":["../src/AcApPdfPlugin.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,UAAU,EACV,gBAAgB,EACjB,MAAM,8BAA8B,CAAA;AAMrC,MAAM,WAAW,oBAAoB;IACnC;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAA;CACxB;AAED;;;;;;GAMG;AACH,qBAAa,aAAc,YAAW,UAAU;IAC9C,kBAAkB;IAClB,IAAI,SAAc;IAClB,kBAAkB;IAClB,OAAO,SAAsB;IAC7B,kBAAkB;IAClB,WAAW,SAAyD;IAEpE,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAS;IAExC,6EAA6E;IAC7E,OAAO,CAAC,kBAAkB,CAA6C;gBAE3D,OAAO,GAAE,oBAAyB;IAI9C;;;;;;OAMG;IACH,MAAM,CAAC,QAAQ,EAAE,WAAW,EAAE,cAAc,EAAE,gBAAgB,GAAG,IAAI;IAerE;;;;;OAKG;IACH,QAAQ,CAAC,QAAQ,EAAE,WAAW,EAAE,cAAc,EAAE,gBAAgB,GAAG,IAAI;CAMxE"}
|
package/lib/AcApPdfPlugin.js
CHANGED
|
@@ -16,8 +16,9 @@ import { AcApImportPdfCmd } from './AcApImportPdfCmd';
|
|
|
16
16
|
/**
|
|
17
17
|
* PDF export/import plugin for cad-simple-viewer.
|
|
18
18
|
*
|
|
19
|
-
* Registers
|
|
20
|
-
*
|
|
19
|
+
* Registers `-cpdf` and `ipdf` when loaded. Also registers `cpdf` when no UI
|
|
20
|
+
* dialog command is already present. Register this plugin lazily via
|
|
21
|
+
* {@link registerLazyPdfPlugin} so the PDF renderer is fetched on demand.
|
|
21
22
|
*/
|
|
22
23
|
var AcApPdfPlugin = /** @class */ (function () {
|
|
23
24
|
function AcApPdfPlugin(options) {
|
|
@@ -27,13 +28,14 @@ var AcApPdfPlugin = /** @class */ (function () {
|
|
|
27
28
|
/** @inheritdoc */
|
|
28
29
|
this.version = packageJson.version;
|
|
29
30
|
/** @inheritdoc */
|
|
30
|
-
this.description = 'PDF export (cpdf) and import (ipdf) commands';
|
|
31
|
+
this.description = 'PDF export (-cpdf / cpdf) and import (ipdf) commands';
|
|
31
32
|
/** Commands registered in {@link onLoad} for cleanup in {@link onUnload}. */
|
|
32
33
|
this.registeredCommands = [];
|
|
33
34
|
this._disableExport = options.disableExport === true;
|
|
34
35
|
}
|
|
35
36
|
/**
|
|
36
|
-
* Registers
|
|
37
|
+
* Registers `-cpdf` (when export is enabled) and `ipdf` system commands.
|
|
38
|
+
* Registers `cpdf` only when a host UI has not already claimed that name.
|
|
37
39
|
*
|
|
38
40
|
* @param _context - Application context (unused)
|
|
39
41
|
* @param commandManager - Command stack used to register PDF commands
|
|
@@ -41,8 +43,13 @@ var AcApPdfPlugin = /** @class */ (function () {
|
|
|
41
43
|
AcApPdfPlugin.prototype.onLoad = function (_context, commandManager) {
|
|
42
44
|
var group = AcEdCommandStack.SYSTEMT_COMMAND_GROUP_NAME;
|
|
43
45
|
if (!this._disableExport) {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
+
var exportCmd = new AcApConvertToPdfCmd();
|
|
47
|
+
commandManager.addCommand(group, '-cpdf', '-cpdf', exportCmd);
|
|
48
|
+
this.registeredCommands.push({ group: group, name: '-cpdf' });
|
|
49
|
+
if (!commandManager.lookupGlobalCmd('cpdf')) {
|
|
50
|
+
commandManager.addCommand(group, 'cpdf', 'cpdf', exportCmd);
|
|
51
|
+
this.registeredCommands.push({ group: group, name: 'cpdf' });
|
|
52
|
+
}
|
|
46
53
|
}
|
|
47
54
|
commandManager.addCommand(group, 'ipdf', 'ipdf', new AcApImportPdfCmd());
|
|
48
55
|
this.registeredCommands.push({ group: group, name: 'ipdf' });
|
package/lib/AcApPdfPlugin.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AcApPdfPlugin.js","sourceRoot":"","sources":["../src/AcApPdfPlugin.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,EAGL,gBAAgB,EACjB,MAAM,8BAA8B,CAAA;AAErC,OAAO,WAAW,MAAM,iBAAiB,CAAA;AACzC,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AASrD
|
|
1
|
+
{"version":3,"file":"AcApPdfPlugin.js","sourceRoot":"","sources":["../src/AcApPdfPlugin.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,EAGL,gBAAgB,EACjB,MAAM,8BAA8B,CAAA;AAErC,OAAO,WAAW,MAAM,iBAAiB,CAAA;AACzC,OAAO,EAAE,mBAAmB,EAAE,MAAM,uB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AAC,IAAI,CAAC,EAAE,KAAK,OAAA,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAA;IACvD,CAAC;IAED;;;;;OAKG;IACH,gCAAQ,GAAR,UAAS,QAAqB,EAAE,cAAgC;;;YAC9D,KAAkB,IAAA,KAAA,SAAA,IAAI,CAAC,kBAAkB,CAAA,gBAAA,4BAAE,CAAC;gBAAvC,IAAM,GAAG,WAAA;gBACZ,cAAc,CAAC,SAAS,CAAC,GAAG,CAAC,KAAK,EAAE,GAAG,CAAC,IAAI,CAAC,CAAA;YAC/C,CAAC;;;;;;;;;QACD,IAAI,CAAC,kBAAkB,GAAG,EAAE,CAAA;IAC9B,CAAC;IACH,oBAAC;AAAD,CAAC,AAnDD,IAmDC"}
|
package/lib/index.d.ts
CHANGED
|
@@ -6,6 +6,8 @@
|
|
|
6
6
|
export { AcApConvertToPdfCmd } from './AcApConvertToPdfCmd';
|
|
7
7
|
export { AcApImportPdfCmd } from './AcApImportPdfCmd';
|
|
8
8
|
export { AcApPdfConvertor } from './AcApPdfConvertor';
|
|
9
|
+
export { resolveViewerTextFont } from './AcApPdfFontResolver';
|
|
10
|
+
export { type AcApPdfExportOptions, type AcApPdfModelSpaceFit, resolveAcApPdfExportOptions } from './AcApPdfExportOptions';
|
|
9
11
|
export { AcApPdfImportConvertor } from './AcApPdfImportConvertor';
|
|
10
12
|
export type { AcApPdfPluginOptions } from './AcApPdfPlugin';
|
|
11
13
|
export { AcApPdfPlugin } from './AcApPdfPlugin';
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AACrD,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAA;AACjE,YAAY,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAA;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AACrD,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAA;AAC7D,OAAO,EACL,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,2BAA2B,EAC5B,MAAM,wBAAwB,CAAA;AAC/B,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAA;AACjE,YAAY,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAA;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAA"}
|
package/lib/index.js
CHANGED
|
@@ -6,6 +6,8 @@
|
|
|
6
6
|
export { AcApConvertToPdfCmd } from './AcApConvertToPdfCmd';
|
|
7
7
|
export { AcApImportPdfCmd } from './AcApImportPdfCmd';
|
|
8
8
|
export { AcApPdfConvertor } from './AcApPdfConvertor';
|
|
9
|
+
export { resolveViewerTextFont } from './AcApPdfFontResolver';
|
|
10
|
+
export { resolveAcApPdfExportOptions } from './AcApPdfExportOptions';
|
|
9
11
|
export { AcApPdfImportConvertor } from './AcApPdfImportConvertor';
|
|
10
12
|
export { AcApPdfPlugin } from './AcApPdfPlugin';
|
|
11
13
|
export { createPdfPlugin } from './createPdfPlugin';
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AACrD,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAA;AAEjE,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AACrD,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAA;AAC7D,OAAO,EAGL,2BAA2B,EAC5B,MAAM,wBAAwB,CAAA;AAC/B,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAA;AAEjE,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAA"}
|
package/lib/register.d.ts
CHANGED
|
@@ -4,10 +4,12 @@ export declare const PDF_PLUGIN_NAME = "PdfPlugin";
|
|
|
4
4
|
/**
|
|
5
5
|
* Trigger commands handled by {@link PDF_PLUGIN_NAME}.
|
|
6
6
|
*
|
|
7
|
-
* -
|
|
7
|
+
* - `-cpdf` — export drawing to PDF via command-line prompts
|
|
8
|
+
* - `cpdf` — same as `-cpdf` when no UI dialog is registered; in cad-viewer,
|
|
9
|
+
* `cpdf` opens the export dialog and loads this plugin on confirm via `-cpdf`
|
|
8
10
|
* - `ipdf` — import vector geometry from PDF
|
|
9
11
|
*/
|
|
10
|
-
export declare const PDF_PLUGIN_TRIGGERS: readonly ["cpdf", "ipdf"];
|
|
12
|
+
export declare const PDF_PLUGIN_TRIGGERS: readonly ["-cpdf", "cpdf", "ipdf"];
|
|
11
13
|
/**
|
|
12
14
|
* Registers the PDF plugin for lazy loading.
|
|
13
15
|
*
|
package/lib/register.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"register.d.ts","sourceRoot":"","sources":["../src/register.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAA;AAErE,8CAA8C;AAC9C,eAAO,MAAM,eAAe,cAAc,CAAA;AAE1C
|
|
1
|
+
{"version":3,"file":"register.d.ts","sourceRoot":"","sources":["../src/register.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAA;AAErE,8CAA8C;AAC9C,eAAO,MAAM,eAAe,cAAc,CAAA;AAE1C;;;;;;;GAOG;AACH,eAAO,MAAM,mBAAmB,oCAAqC,CAAA;AAErE;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CACnC,aAAa,EAAE,iBAAiB,EAChC,OAAO,GAAE;IAAE,aAAa,CAAC,EAAE,OAAO,CAAA;CAAO,GACxC,IAAI,CAcN"}
|
package/lib/register.js
CHANGED
|
@@ -64,10 +64,12 @@ export var PDF_PLUGIN_NAME = 'PdfPlugin';
|
|
|
64
64
|
/**
|
|
65
65
|
* Trigger commands handled by {@link PDF_PLUGIN_NAME}.
|
|
66
66
|
*
|
|
67
|
-
* -
|
|
67
|
+
* - `-cpdf` — export drawing to PDF via command-line prompts
|
|
68
|
+
* - `cpdf` — same as `-cpdf` when no UI dialog is registered; in cad-viewer,
|
|
69
|
+
* `cpdf` opens the export dialog and loads this plugin on confirm via `-cpdf`
|
|
68
70
|
* - `ipdf` — import vector geometry from PDF
|
|
69
71
|
*/
|
|
70
|
-
export var PDF_PLUGIN_TRIGGERS = ['cpdf', 'ipdf'];
|
|
72
|
+
export var PDF_PLUGIN_TRIGGERS = ['-cpdf', 'cpdf', 'ipdf'];
|
|
71
73
|
/**
|
|
72
74
|
* Registers the PDF plugin for lazy loading.
|
|
73
75
|
*
|
package/lib/register.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"register.js","sourceRoot":"","sources":["../src/register.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,8CAA8C;AAC9C,MAAM,CAAC,IAAM,eAAe,GAAG,WAAW,CAAA;AAE1C
|
|
1
|
+
{"version":3,"file":"register.js","sourceRoot":"","sources":["../src/register.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,8CAA8C;AAC9C,MAAM,CAAC,IAAM,eAAe,GAAG,WAAW,CAAA;AAE1C;;;;;;;GAOG;AACH,MAAM,CAAC,IAAM,mBAAmB,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,CAAU,CAAA;AAErE;;;;;;;GAOG;AACH,MAAM,UAAU,qBAAqB,CACnC,aAAgC,EAChC,OAAyC;IAF3C,iBAiBC;IAfC,wBAAA,EAAA,YAAyC;IAEzC,IAAM,aAAa,GAAG,OAAO,CAAC,aAAa,KAAK,IAAI,CAAA;IACpD,IAAM,QAAQ,GAAG,aAAa;QAC5B,CAAC,CAAE,CAAC,MAAM,CAAW;QACrB,CAAC,0BAAK,mBAAmB,SAAC,CAAA;IAE5B,aAAa,CAAC,kBAAkB,CAAC;QAC/B,IAAI,EAAE,eAAe;QACrB,QAAQ,2BAAM,QAAQ,SAAC;QACvB,MAAM,EAAE;;;;4BACsB,qBAAM,MAAM,CAAC,2BAA2B,CAAC,EAAA;;wBAA7D,eAAe,GAAK,CAAA,SAAyC,CAAA,gBAA9C;wBACvB,sBAAO,eAAe,CAAC,EAAE,aAAa,eAAA,EAAE,CAAC,EAAA;;;aAC1C;KACF,CAAC,CAAA;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mlightcad/cad-pdf-plugin",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
@@ -37,17 +37,17 @@
|
|
|
37
37
|
}
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@mlightcad/data-model": "^1.14.
|
|
41
|
-
"jspdf": "^4.2.1",
|
|
40
|
+
"@mlightcad/data-model": "^1.14.8",
|
|
42
41
|
"pdfjs-dist": "^5.6.205",
|
|
43
|
-
"
|
|
44
|
-
"@mlightcad/
|
|
45
|
-
"@mlightcad/
|
|
42
|
+
"@mlightcad/cad-simple-viewer": "1.7.1",
|
|
43
|
+
"@mlightcad/pdf-renderer": "1.7.1",
|
|
44
|
+
"@mlightcad/three-renderer": "1.7.1"
|
|
46
45
|
},
|
|
47
46
|
"peerDependencies": {
|
|
48
|
-
"@mlightcad/data-model": "^1.14.
|
|
49
|
-
"@mlightcad/
|
|
50
|
-
"@mlightcad/
|
|
47
|
+
"@mlightcad/data-model": "^1.14.8",
|
|
48
|
+
"@mlightcad/pdf-renderer": "1.7.1",
|
|
49
|
+
"@mlightcad/three-renderer": "1.7.1",
|
|
50
|
+
"@mlightcad/cad-simple-viewer": "1.7.1"
|
|
51
51
|
},
|
|
52
52
|
"scripts": {
|
|
53
53
|
"clean": "rimraf dist lib tsconfig.tsbuildinfo",
|