@mlightcad/cad-pdf-plugin 1.6.3 → 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/README.md +39 -23
- package/dist/cad-pdf-plugin-register.js +11 -10
- package/dist/cad-pdf-plugin-register.umd.cjs +1 -1
- package/dist/cad-pdf-plugin.js +17050 -41432
- 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 +13 -3
- package/lib/AcApPdfPlugin.d.ts.map +1 -1
- package/lib/AcApPdfPlugin.js +19 -7
- package/lib/AcApPdfPlugin.js.map +1 -1
- package/lib/createPdfPlugin.d.ts +3 -2
- package/lib/createPdfPlugin.d.ts.map +1 -1
- package/lib/createPdfPlugin.js +4 -2
- package/lib/createPdfPlugin.js.map +1 -1
- package/lib/index.d.ts +4 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +3 -0
- package/lib/index.js.map +1 -1
- package/lib/register.d.ts +7 -3
- package/lib/register.d.ts.map +1 -1
- package/lib/register.js +12 -5
- package/lib/register.js.map +1 -1
- package/package.json +9 -9
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
|
*
|
|
@@ -76,11 +78,16 @@ export var PDF_PLUGIN_TRIGGERS = ['cpdf', 'ipdf'];
|
|
|
76
78
|
*
|
|
77
79
|
* @param pluginManager - Plugin manager that receives the lazy registration
|
|
78
80
|
*/
|
|
79
|
-
export function registerLazyPdfPlugin(pluginManager) {
|
|
81
|
+
export function registerLazyPdfPlugin(pluginManager, options) {
|
|
80
82
|
var _this = this;
|
|
83
|
+
if (options === void 0) { options = {}; }
|
|
84
|
+
var disableExport = options.disableExport === true;
|
|
85
|
+
var triggers = disableExport
|
|
86
|
+
? ['ipdf']
|
|
87
|
+
: __spreadArray([], __read(PDF_PLUGIN_TRIGGERS), false);
|
|
81
88
|
pluginManager.registerLazyPlugin({
|
|
82
89
|
name: PDF_PLUGIN_NAME,
|
|
83
|
-
triggers: __spreadArray([], __read(
|
|
90
|
+
triggers: __spreadArray([], __read(triggers), false),
|
|
84
91
|
loader: function () { return __awaiter(_this, void 0, void 0, function () {
|
|
85
92
|
var createPdfPlugin;
|
|
86
93
|
return __generator(this, function (_a) {
|
|
@@ -88,7 +95,7 @@ export function registerLazyPdfPlugin(pluginManager) {
|
|
|
88
95
|
case 0: return [4 /*yield*/, import('@mlightcad/cad-pdf-plugin')];
|
|
89
96
|
case 1:
|
|
90
97
|
createPdfPlugin = (_a.sent()).createPdfPlugin;
|
|
91
|
-
return [2 /*return*/, createPdfPlugin()];
|
|
98
|
+
return [2 /*return*/, createPdfPlugin({ disableExport: disableExport })];
|
|
92
99
|
}
|
|
93
100
|
});
|
|
94
101
|
}); }
|
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.
|
|
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",
|