@embedpdf/plugin-attachment 1.0.11 → 1.0.12

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/dist/index.cjs CHANGED
@@ -1,74 +1,2 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
-
20
- // src/index.ts
21
- var index_exports = {};
22
- __export(index_exports, {
23
- ATTACHMENT_PLUGIN_ID: () => ATTACHMENT_PLUGIN_ID,
24
- AttachmentPlugin: () => AttachmentPlugin,
25
- AttachmentPluginPackage: () => AttachmentPluginPackage,
26
- manifest: () => manifest
27
- });
28
- module.exports = __toCommonJS(index_exports);
29
-
30
- // src/lib/attachment-plugin.ts
31
- var import_core = require("@embedpdf/core");
32
- var AttachmentPlugin = class extends import_core.BasePlugin {
33
- constructor(id, registry, engine) {
34
- super(id, registry);
35
- this.engine = engine;
36
- }
37
- async initialize(_) {
38
- }
39
- buildCapability() {
40
- return {};
41
- }
42
- };
43
- AttachmentPlugin.id = "attachment";
44
-
45
- // src/lib/manifest.ts
46
- var ATTACHMENT_PLUGIN_ID = "attachment";
47
- var manifest = {
48
- id: ATTACHMENT_PLUGIN_ID,
49
- name: "Attachment Plugin",
50
- version: "1.0.0",
51
- provides: ["attachment"],
52
- requires: [],
53
- optional: [],
54
- defaultConfig: {
55
- enabled: true
56
- }
57
- };
58
-
59
- // src/lib/index.ts
60
- var AttachmentPluginPackage = {
61
- manifest,
62
- create: (registry, engine) => new AttachmentPlugin(ATTACHMENT_PLUGIN_ID, registry, engine),
63
- reducer: () => {
64
- },
65
- initialState: {}
66
- };
67
- // Annotate the CommonJS export names for ESM import in node:
68
- 0 && (module.exports = {
69
- ATTACHMENT_PLUGIN_ID,
70
- AttachmentPlugin,
71
- AttachmentPluginPackage,
72
- manifest
73
- });
74
- //# sourceMappingURL=index.cjs.map
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("@embedpdf/core"),t=class extends e.BasePlugin{constructor(e,t,n){super(e,t),this.engine=n}async initialize(e){}buildCapability(){return{}}};t.id="attachment";let n=t;const i="attachment",a={id:i,name:"Attachment Plugin",version:"1.0.0",provides:["attachment"],requires:[],optional:[],defaultConfig:{enabled:!0}},r={manifest:a,create:(e,t)=>new n(i,e,t),reducer:()=>{},initialState:{}};exports.ATTACHMENT_PLUGIN_ID=i,exports.AttachmentPlugin=n,exports.AttachmentPluginPackage=r,exports.manifest=a;
2
+ //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts","../src/lib/attachment-plugin.ts","../src/lib/manifest.ts","../src/lib/index.ts"],"sourcesContent":["export * from './lib';\n","import { BasePlugin, PluginRegistry } from '@embedpdf/core';\nimport { PdfEngine } from '@embedpdf/models';\n\nimport { AttachmentCapability, AttachmentPluginConfig } from './types';\n\nexport class AttachmentPlugin extends BasePlugin<AttachmentPluginConfig, AttachmentCapability> {\n static readonly id = 'attachment' as const;\n\n private engine: PdfEngine;\n\n constructor(id: string, registry: PluginRegistry, engine: PdfEngine) {\n super(id, registry);\n\n this.engine = engine;\n }\n\n async initialize(_: AttachmentPluginConfig): Promise<void> {}\n\n protected buildCapability(): AttachmentCapability {\n return {};\n }\n}\n","import { PluginManifest } from '@embedpdf/core';\nimport { AttachmentPluginConfig } from './types';\n\nexport const ATTACHMENT_PLUGIN_ID = 'attachment';\n\nexport const manifest: PluginManifest<AttachmentPluginConfig> = {\n id: ATTACHMENT_PLUGIN_ID,\n name: 'Attachment Plugin',\n version: '1.0.0',\n provides: ['attachment'],\n requires: [],\n optional: [],\n defaultConfig: {\n enabled: true,\n },\n};\n","import { PluginPackage } from '@embedpdf/core';\n\nimport { AttachmentPlugin } from './attachment-plugin';\nimport { manifest, ATTACHMENT_PLUGIN_ID } from './manifest';\nimport { AttachmentPluginConfig } from './types';\n\nexport const AttachmentPluginPackage: PluginPackage<AttachmentPlugin, AttachmentPluginConfig> = {\n manifest,\n create: (registry, engine) => new AttachmentPlugin(ATTACHMENT_PLUGIN_ID, registry, engine),\n reducer: () => {},\n initialState: {},\n};\n\nexport * from './attachment-plugin';\nexport * from './types';\nexport * from './manifest';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,kBAA2C;AAKpC,IAAM,mBAAN,cAA+B,uBAAyD;AAAA,EAK7F,YAAY,IAAY,UAA0B,QAAmB;AACnE,UAAM,IAAI,QAAQ;AAElB,SAAK,SAAS;AAAA,EAChB;AAAA,EAEA,MAAM,WAAW,GAA0C;AAAA,EAAC;AAAA,EAElD,kBAAwC;AAChD,WAAO,CAAC;AAAA,EACV;AACF;AAhBa,iBACK,KAAK;;;ACHhB,IAAM,uBAAuB;AAE7B,IAAM,WAAmD;AAAA,EAC9D,IAAI;AAAA,EACJ,MAAM;AAAA,EACN,SAAS;AAAA,EACT,UAAU,CAAC,YAAY;AAAA,EACvB,UAAU,CAAC;AAAA,EACX,UAAU,CAAC;AAAA,EACX,eAAe;AAAA,IACb,SAAS;AAAA,EACX;AACF;;;ACTO,IAAM,0BAAmF;AAAA,EAC9F;AAAA,EACA,QAAQ,CAAC,UAAU,WAAW,IAAI,iBAAiB,sBAAsB,UAAU,MAAM;AAAA,EACzF,SAAS,MAAM;AAAA,EAAC;AAAA,EAChB,cAAc,CAAC;AACjB;","names":[]}
1
+ {"version":3,"file":"index.cjs","sources":["../src/lib/attachment-plugin.ts","../src/lib/manifest.ts","../src/lib/index.ts"],"sourcesContent":["import { BasePlugin, PluginRegistry } from '@embedpdf/core';\nimport { PdfEngine } from '@embedpdf/models';\n\nimport { AttachmentCapability, AttachmentPluginConfig } from './types';\n\nexport class AttachmentPlugin extends BasePlugin<AttachmentPluginConfig, AttachmentCapability> {\n static readonly id = 'attachment' as const;\n\n private engine: PdfEngine;\n\n constructor(id: string, registry: PluginRegistry, engine: PdfEngine) {\n super(id, registry);\n\n this.engine = engine;\n }\n\n async initialize(_: AttachmentPluginConfig): Promise<void> {}\n\n protected buildCapability(): AttachmentCapability {\n return {};\n }\n}\n","import { PluginManifest } from '@embedpdf/core';\nimport { AttachmentPluginConfig } from './types';\n\nexport const ATTACHMENT_PLUGIN_ID = 'attachment';\n\nexport const manifest: PluginManifest<AttachmentPluginConfig> = {\n id: ATTACHMENT_PLUGIN_ID,\n name: 'Attachment Plugin',\n version: '1.0.0',\n provides: ['attachment'],\n requires: [],\n optional: [],\n defaultConfig: {\n enabled: true,\n },\n};\n","import { PluginPackage } from '@embedpdf/core';\n\nimport { AttachmentPlugin } from './attachment-plugin';\nimport { manifest, ATTACHMENT_PLUGIN_ID } from './manifest';\nimport { AttachmentPluginConfig } from './types';\n\nexport const AttachmentPluginPackage: PluginPackage<AttachmentPlugin, AttachmentPluginConfig> = {\n manifest,\n create: (registry, engine) => new AttachmentPlugin(ATTACHMENT_PLUGIN_ID, registry, engine),\n reducer: () => {},\n initialState: {},\n};\n\nexport * from './attachment-plugin';\nexport * from './types';\nexport * from './manifest';\n"],"names":["_AttachmentPlugin","BasePlugin","constructor","id","registry","engine","super","this","initialize","_","buildCapability","AttachmentPlugin","ATTACHMENT_PLUGIN_ID","manifest","name","version","provides","requires","optional","defaultConfig","enabled","AttachmentPluginPackage","create","reducer","initialState"],"mappings":"kHAKaA,EAAN,cAA+BC,EAAAA,WAKpC,WAAAC,CAAYC,EAAYC,EAA0BC,GAChDC,MAAMH,EAAIC,GAEVG,KAAKF,OAASA,CAAA,CAGhB,gBAAMG,CAAWC,GAA0C,CAEjD,eAAAC,GACR,MAAO,CAAC,CAAA,GAbVV,EAAgBG,GAAK,aADhB,IAAMQ,EAANX,ECFA,MAAMY,EAAuB,aAEvBC,EAAmD,CAC9DV,GAAIS,EACJE,KAAM,oBACNC,QAAS,QACTC,SAAU,CAAC,cACXC,SAAU,GACVC,SAAU,GACVC,cAAe,CACbC,SAAS,ICPAC,EAAmF,CAC9FR,WACAS,OAAQ,CAAClB,EAAUC,IAAW,IAAIM,EAAiBC,EAAsBR,EAAUC,GACnFkB,QAAS,OACTC,aAAc,CAAA"}
package/dist/index.d.ts CHANGED
@@ -1,22 +1 @@
1
- import { BasePluginConfig, BasePlugin, PluginRegistry, PluginManifest, PluginPackage } from '@embedpdf/core';
2
- import { PdfEngine } from '@embedpdf/models';
3
-
4
- interface AttachmentPluginConfig extends BasePluginConfig {
5
- }
6
- interface AttachmentCapability {
7
- }
8
-
9
- declare class AttachmentPlugin extends BasePlugin<AttachmentPluginConfig, AttachmentCapability> {
10
- static readonly id: "attachment";
11
- private engine;
12
- constructor(id: string, registry: PluginRegistry, engine: PdfEngine);
13
- initialize(_: AttachmentPluginConfig): Promise<void>;
14
- protected buildCapability(): AttachmentCapability;
15
- }
16
-
17
- declare const ATTACHMENT_PLUGIN_ID = "attachment";
18
- declare const manifest: PluginManifest<AttachmentPluginConfig>;
19
-
20
- declare const AttachmentPluginPackage: PluginPackage<AttachmentPlugin, AttachmentPluginConfig>;
21
-
22
- export { ATTACHMENT_PLUGIN_ID, type AttachmentCapability, AttachmentPlugin, type AttachmentPluginConfig, AttachmentPluginPackage, manifest };
1
+ export * from './lib';
package/dist/index.js CHANGED
@@ -1,6 +1,5 @@
1
- // src/lib/attachment-plugin.ts
2
1
  import { BasePlugin } from "@embedpdf/core";
3
- var AttachmentPlugin = class extends BasePlugin {
2
+ const _AttachmentPlugin = class _AttachmentPlugin extends BasePlugin {
4
3
  constructor(id, registry, engine) {
5
4
  super(id, registry);
6
5
  this.engine = engine;
@@ -11,11 +10,10 @@ var AttachmentPlugin = class extends BasePlugin {
11
10
  return {};
12
11
  }
13
12
  };
14
- AttachmentPlugin.id = "attachment";
15
-
16
- // src/lib/manifest.ts
17
- var ATTACHMENT_PLUGIN_ID = "attachment";
18
- var manifest = {
13
+ _AttachmentPlugin.id = "attachment";
14
+ let AttachmentPlugin = _AttachmentPlugin;
15
+ const ATTACHMENT_PLUGIN_ID = "attachment";
16
+ const manifest = {
19
17
  id: ATTACHMENT_PLUGIN_ID,
20
18
  name: "Attachment Plugin",
21
19
  version: "1.0.0",
@@ -26,9 +24,7 @@ var manifest = {
26
24
  enabled: true
27
25
  }
28
26
  };
29
-
30
- // src/lib/index.ts
31
- var AttachmentPluginPackage = {
27
+ const AttachmentPluginPackage = {
32
28
  manifest,
33
29
  create: (registry, engine) => new AttachmentPlugin(ATTACHMENT_PLUGIN_ID, registry, engine),
34
30
  reducer: () => {
@@ -41,4 +37,4 @@ export {
41
37
  AttachmentPluginPackage,
42
38
  manifest
43
39
  };
44
- //# sourceMappingURL=index.js.map
40
+ //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/lib/attachment-plugin.ts","../src/lib/manifest.ts","../src/lib/index.ts"],"sourcesContent":["import { BasePlugin, PluginRegistry } from '@embedpdf/core';\nimport { PdfEngine } from '@embedpdf/models';\n\nimport { AttachmentCapability, AttachmentPluginConfig } from './types';\n\nexport class AttachmentPlugin extends BasePlugin<AttachmentPluginConfig, AttachmentCapability> {\n static readonly id = 'attachment' as const;\n\n private engine: PdfEngine;\n\n constructor(id: string, registry: PluginRegistry, engine: PdfEngine) {\n super(id, registry);\n\n this.engine = engine;\n }\n\n async initialize(_: AttachmentPluginConfig): Promise<void> {}\n\n protected buildCapability(): AttachmentCapability {\n return {};\n }\n}\n","import { PluginManifest } from '@embedpdf/core';\nimport { AttachmentPluginConfig } from './types';\n\nexport const ATTACHMENT_PLUGIN_ID = 'attachment';\n\nexport const manifest: PluginManifest<AttachmentPluginConfig> = {\n id: ATTACHMENT_PLUGIN_ID,\n name: 'Attachment Plugin',\n version: '1.0.0',\n provides: ['attachment'],\n requires: [],\n optional: [],\n defaultConfig: {\n enabled: true,\n },\n};\n","import { PluginPackage } from '@embedpdf/core';\n\nimport { AttachmentPlugin } from './attachment-plugin';\nimport { manifest, ATTACHMENT_PLUGIN_ID } from './manifest';\nimport { AttachmentPluginConfig } from './types';\n\nexport const AttachmentPluginPackage: PluginPackage<AttachmentPlugin, AttachmentPluginConfig> = {\n manifest,\n create: (registry, engine) => new AttachmentPlugin(ATTACHMENT_PLUGIN_ID, registry, engine),\n reducer: () => {},\n initialState: {},\n};\n\nexport * from './attachment-plugin';\nexport * from './types';\nexport * from './manifest';\n"],"mappings":";AAAA,SAAS,kBAAkC;AAKpC,IAAM,mBAAN,cAA+B,WAAyD;AAAA,EAK7F,YAAY,IAAY,UAA0B,QAAmB;AACnE,UAAM,IAAI,QAAQ;AAElB,SAAK,SAAS;AAAA,EAChB;AAAA,EAEA,MAAM,WAAW,GAA0C;AAAA,EAAC;AAAA,EAElD,kBAAwC;AAChD,WAAO,CAAC;AAAA,EACV;AACF;AAhBa,iBACK,KAAK;;;ACHhB,IAAM,uBAAuB;AAE7B,IAAM,WAAmD;AAAA,EAC9D,IAAI;AAAA,EACJ,MAAM;AAAA,EACN,SAAS;AAAA,EACT,UAAU,CAAC,YAAY;AAAA,EACvB,UAAU,CAAC;AAAA,EACX,UAAU,CAAC;AAAA,EACX,eAAe;AAAA,IACb,SAAS;AAAA,EACX;AACF;;;ACTO,IAAM,0BAAmF;AAAA,EAC9F;AAAA,EACA,QAAQ,CAAC,UAAU,WAAW,IAAI,iBAAiB,sBAAsB,UAAU,MAAM;AAAA,EACzF,SAAS,MAAM;AAAA,EAAC;AAAA,EAChB,cAAc,CAAC;AACjB;","names":[]}
1
+ {"version":3,"file":"index.js","sources":["../src/lib/attachment-plugin.ts","../src/lib/manifest.ts","../src/lib/index.ts"],"sourcesContent":["import { BasePlugin, PluginRegistry } from '@embedpdf/core';\nimport { PdfEngine } from '@embedpdf/models';\n\nimport { AttachmentCapability, AttachmentPluginConfig } from './types';\n\nexport class AttachmentPlugin extends BasePlugin<AttachmentPluginConfig, AttachmentCapability> {\n static readonly id = 'attachment' as const;\n\n private engine: PdfEngine;\n\n constructor(id: string, registry: PluginRegistry, engine: PdfEngine) {\n super(id, registry);\n\n this.engine = engine;\n }\n\n async initialize(_: AttachmentPluginConfig): Promise<void> {}\n\n protected buildCapability(): AttachmentCapability {\n return {};\n }\n}\n","import { PluginManifest } from '@embedpdf/core';\nimport { AttachmentPluginConfig } from './types';\n\nexport const ATTACHMENT_PLUGIN_ID = 'attachment';\n\nexport const manifest: PluginManifest<AttachmentPluginConfig> = {\n id: ATTACHMENT_PLUGIN_ID,\n name: 'Attachment Plugin',\n version: '1.0.0',\n provides: ['attachment'],\n requires: [],\n optional: [],\n defaultConfig: {\n enabled: true,\n },\n};\n","import { PluginPackage } from '@embedpdf/core';\n\nimport { AttachmentPlugin } from './attachment-plugin';\nimport { manifest, ATTACHMENT_PLUGIN_ID } from './manifest';\nimport { AttachmentPluginConfig } from './types';\n\nexport const AttachmentPluginPackage: PluginPackage<AttachmentPlugin, AttachmentPluginConfig> = {\n manifest,\n create: (registry, engine) => new AttachmentPlugin(ATTACHMENT_PLUGIN_ID, registry, engine),\n reducer: () => {},\n initialState: {},\n};\n\nexport * from './attachment-plugin';\nexport * from './types';\nexport * from './manifest';\n"],"names":[],"mappings":";AAKO,MAAM,oBAAN,MAAM,0BAAyB,WAAyD;AAAA,EAK7F,YAAY,IAAY,UAA0B,QAAmB;AACnE,UAAM,IAAI,QAAQ;AAElB,SAAK,SAAS;AAAA,EAAA;AAAA,EAGhB,MAAM,WAAW,GAA0C;AAAA,EAAA;AAAA,EAEjD,kBAAwC;AAChD,WAAO,CAAC;AAAA,EAAA;AAEZ;AAfE,kBAAgB,KAAK;AADhB,IAAM,mBAAN;ACFA,MAAM,uBAAuB;AAE7B,MAAM,WAAmD;AAAA,EAC9D,IAAI;AAAA,EACJ,MAAM;AAAA,EACN,SAAS;AAAA,EACT,UAAU,CAAC,YAAY;AAAA,EACvB,UAAU,CAAC;AAAA,EACX,UAAU,CAAC;AAAA,EACX,eAAe;AAAA,IACb,SAAS;AAAA,EAAA;AAEb;ACTO,MAAM,0BAAmF;AAAA,EAC9F;AAAA,EACA,QAAQ,CAAC,UAAU,WAAW,IAAI,iBAAiB,sBAAsB,UAAU,MAAM;AAAA,EACzF,SAAS,MAAM;AAAA,EAAC;AAAA,EAChB,cAAc,CAAA;AAChB;"}
@@ -0,0 +1,10 @@
1
+ import { BasePlugin, PluginRegistry } from '@embedpdf/core';
2
+ import { PdfEngine } from '@embedpdf/models';
3
+ import { AttachmentCapability, AttachmentPluginConfig } from './types';
4
+ export declare class AttachmentPlugin extends BasePlugin<AttachmentPluginConfig, AttachmentCapability> {
5
+ static readonly id: "attachment";
6
+ private engine;
7
+ constructor(id: string, registry: PluginRegistry, engine: PdfEngine);
8
+ initialize(_: AttachmentPluginConfig): Promise<void>;
9
+ protected buildCapability(): AttachmentCapability;
10
+ }
@@ -0,0 +1,7 @@
1
+ import { PluginPackage } from '@embedpdf/core';
2
+ import { AttachmentPlugin } from './attachment-plugin';
3
+ import { AttachmentPluginConfig } from './types';
4
+ export declare const AttachmentPluginPackage: PluginPackage<AttachmentPlugin, AttachmentPluginConfig>;
5
+ export * from './attachment-plugin';
6
+ export * from './types';
7
+ export * from './manifest';
@@ -0,0 +1,4 @@
1
+ import { PluginManifest } from '@embedpdf/core';
2
+ import { AttachmentPluginConfig } from './types';
3
+ export declare const ATTACHMENT_PLUGIN_ID = "attachment";
4
+ export declare const manifest: PluginManifest<AttachmentPluginConfig>;
@@ -0,0 +1,5 @@
1
+ import { BasePluginConfig } from '@embedpdf/core';
2
+ export interface AttachmentPluginConfig extends BasePluginConfig {
3
+ }
4
+ export interface AttachmentCapability {
5
+ }
@@ -0,0 +1 @@
1
+ export * from '@embedpdf/core/preact';
@@ -1,38 +1,2 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
-
20
- // src/preact/index.ts
21
- var preact_exports = {};
22
- __export(preact_exports, {
23
- useAttachmentCapability: () => useAttachmentCapability,
24
- useAttachmentPlugin: () => useAttachmentPlugin
25
- });
26
- module.exports = __toCommonJS(preact_exports);
27
-
28
- // src/preact/hooks/use-attachment.ts
29
- var import_preact = require("@embedpdf/core/preact");
30
- var import_plugin_attachment = require("@embedpdf/plugin-attachment");
31
- var useAttachmentPlugin = () => (0, import_preact.usePlugin)(import_plugin_attachment.AttachmentPlugin.id);
32
- var useAttachmentCapability = () => (0, import_preact.useCapability)(import_plugin_attachment.AttachmentPlugin.id);
33
- // Annotate the CommonJS export names for ESM import in node:
34
- 0 && (module.exports = {
35
- useAttachmentCapability,
36
- useAttachmentPlugin
37
- });
38
- //# sourceMappingURL=index.cjs.map
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("@embedpdf/core/preact"),t=require("@embedpdf/plugin-attachment");exports.useAttachmentCapability=()=>e.useCapability(t.AttachmentPlugin.id),exports.useAttachmentPlugin=()=>e.usePlugin(t.AttachmentPlugin.id);
2
+ //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/preact/index.ts","../../src/preact/hooks/use-attachment.ts"],"sourcesContent":["export * from './hooks';\n","import { useCapability, usePlugin } from '@embedpdf/core/preact';\nimport { AttachmentPlugin } from '@embedpdf/plugin-attachment';\n\nexport const useAttachmentPlugin = () => usePlugin<AttachmentPlugin>(AttachmentPlugin.id);\nexport const useAttachmentCapability = () => useCapability<AttachmentPlugin>(AttachmentPlugin.id);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,oBAAyC;AACzC,+BAAiC;AAE1B,IAAM,sBAAsB,UAAM,yBAA4B,0CAAiB,EAAE;AACjF,IAAM,0BAA0B,UAAM,6BAAgC,0CAAiB,EAAE;","names":[]}
1
+ {"version":3,"file":"index.cjs","sources":["../../src/shared/hooks/use-attachment.ts"],"sourcesContent":["import { useCapability, usePlugin } from '@embedpdf/core/@framework';\nimport { AttachmentPlugin } from '@embedpdf/plugin-attachment';\n\nexport const useAttachmentPlugin = () => usePlugin<AttachmentPlugin>(AttachmentPlugin.id);\nexport const useAttachmentCapability = () => useCapability<AttachmentPlugin>(AttachmentPlugin.id);\n"],"names":["useCapability","AttachmentPlugin","id","usePlugin"],"mappings":"kMAIuC,IAAMA,gBAAgCC,EAAAA,iBAAiBC,gCAD3D,IAAMC,YAA4BF,EAAAA,iBAAiBC"}
@@ -1,15 +1 @@
1
- import * as _embedpdf_plugin_attachment from '@embedpdf/plugin-attachment';
2
- import { AttachmentPlugin } from '@embedpdf/plugin-attachment';
3
-
4
- declare const useAttachmentPlugin: () => {
5
- plugin: AttachmentPlugin | null;
6
- isLoading: boolean;
7
- ready: Promise<void>;
8
- };
9
- declare const useAttachmentCapability: () => {
10
- provides: Readonly<_embedpdf_plugin_attachment.AttachmentCapability> | null;
11
- isLoading: boolean;
12
- ready: Promise<void>;
13
- };
14
-
15
- export { useAttachmentCapability, useAttachmentPlugin };
1
+ export * from '../shared-preact';
@@ -1,10 +1,9 @@
1
- // src/preact/hooks/use-attachment.ts
2
- import { useCapability, usePlugin } from "@embedpdf/core/preact";
1
+ import { usePlugin, useCapability } from "@embedpdf/core/preact";
3
2
  import { AttachmentPlugin } from "@embedpdf/plugin-attachment";
4
- var useAttachmentPlugin = () => usePlugin(AttachmentPlugin.id);
5
- var useAttachmentCapability = () => useCapability(AttachmentPlugin.id);
3
+ const useAttachmentPlugin = () => usePlugin(AttachmentPlugin.id);
4
+ const useAttachmentCapability = () => useCapability(AttachmentPlugin.id);
6
5
  export {
7
6
  useAttachmentCapability,
8
7
  useAttachmentPlugin
9
8
  };
10
- //# sourceMappingURL=index.js.map
9
+ //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/preact/hooks/use-attachment.ts"],"sourcesContent":["import { useCapability, usePlugin } from '@embedpdf/core/preact';\nimport { AttachmentPlugin } from '@embedpdf/plugin-attachment';\n\nexport const useAttachmentPlugin = () => usePlugin<AttachmentPlugin>(AttachmentPlugin.id);\nexport const useAttachmentCapability = () => useCapability<AttachmentPlugin>(AttachmentPlugin.id);\n"],"mappings":";AAAA,SAAS,eAAe,iBAAiB;AACzC,SAAS,wBAAwB;AAE1B,IAAM,sBAAsB,MAAM,UAA4B,iBAAiB,EAAE;AACjF,IAAM,0BAA0B,MAAM,cAAgC,iBAAiB,EAAE;","names":[]}
1
+ {"version":3,"file":"index.js","sources":["../../src/shared/hooks/use-attachment.ts"],"sourcesContent":["import { useCapability, usePlugin } from '@embedpdf/core/@framework';\nimport { AttachmentPlugin } from '@embedpdf/plugin-attachment';\n\nexport const useAttachmentPlugin = () => usePlugin<AttachmentPlugin>(AttachmentPlugin.id);\nexport const useAttachmentCapability = () => useCapability<AttachmentPlugin>(AttachmentPlugin.id);\n"],"names":[],"mappings":";;AAGO,MAAM,sBAAsB,MAAM,UAA4B,iBAAiB,EAAE;AACjF,MAAM,0BAA0B,MAAM,cAAgC,iBAAiB,EAAE;"}
@@ -0,0 +1 @@
1
+ export * from '@embedpdf/core/react';
@@ -1,38 +1,2 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
-
20
- // src/react/index.ts
21
- var react_exports = {};
22
- __export(react_exports, {
23
- useAttachmentCapability: () => useAttachmentCapability,
24
- useAttachmentPlugin: () => useAttachmentPlugin
25
- });
26
- module.exports = __toCommonJS(react_exports);
27
-
28
- // src/react/hooks/use-attachment.ts
29
- var import_react = require("@embedpdf/core/react");
30
- var import_plugin_attachment = require("@embedpdf/plugin-attachment");
31
- var useAttachmentPlugin = () => (0, import_react.usePlugin)(import_plugin_attachment.AttachmentPlugin.id);
32
- var useAttachmentCapability = () => (0, import_react.useCapability)(import_plugin_attachment.AttachmentPlugin.id);
33
- // Annotate the CommonJS export names for ESM import in node:
34
- 0 && (module.exports = {
35
- useAttachmentCapability,
36
- useAttachmentPlugin
37
- });
38
- //# sourceMappingURL=index.cjs.map
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("@embedpdf/core/react"),t=require("@embedpdf/plugin-attachment");exports.useAttachmentCapability=()=>e.useCapability(t.AttachmentPlugin.id),exports.useAttachmentPlugin=()=>e.usePlugin(t.AttachmentPlugin.id);
2
+ //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/react/index.ts","../../src/react/hooks/use-attachment.ts"],"sourcesContent":["export * from './hooks';\n","import { useCapability, usePlugin } from '@embedpdf/core/react';\nimport { AttachmentPlugin } from '@embedpdf/plugin-attachment';\n\nexport const useAttachmentPlugin = () => usePlugin<AttachmentPlugin>(AttachmentPlugin.id);\nexport const useAttachmentCapability = () => useCapability<AttachmentPlugin>(AttachmentPlugin.id);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,mBAAyC;AACzC,+BAAiC;AAE1B,IAAM,sBAAsB,UAAM,wBAA4B,0CAAiB,EAAE;AACjF,IAAM,0BAA0B,UAAM,4BAAgC,0CAAiB,EAAE;","names":[]}
1
+ {"version":3,"file":"index.cjs","sources":["../../src/shared/hooks/use-attachment.ts"],"sourcesContent":["import { useCapability, usePlugin } from '@embedpdf/core/@framework';\nimport { AttachmentPlugin } from '@embedpdf/plugin-attachment';\n\nexport const useAttachmentPlugin = () => usePlugin<AttachmentPlugin>(AttachmentPlugin.id);\nexport const useAttachmentCapability = () => useCapability<AttachmentPlugin>(AttachmentPlugin.id);\n"],"names":["useCapability","AttachmentPlugin","id","usePlugin"],"mappings":"iMAIuC,IAAMA,gBAAgCC,EAAAA,iBAAiBC,gCAD3D,IAAMC,YAA4BF,EAAAA,iBAAiBC"}
@@ -1,15 +1 @@
1
- import * as _embedpdf_plugin_attachment from '@embedpdf/plugin-attachment';
2
- import { AttachmentPlugin } from '@embedpdf/plugin-attachment';
3
-
4
- declare const useAttachmentPlugin: () => {
5
- plugin: AttachmentPlugin | null;
6
- isLoading: boolean;
7
- ready: Promise<void>;
8
- };
9
- declare const useAttachmentCapability: () => {
10
- provides: Readonly<_embedpdf_plugin_attachment.AttachmentCapability> | null;
11
- isLoading: boolean;
12
- ready: Promise<void>;
13
- };
14
-
15
- export { useAttachmentCapability, useAttachmentPlugin };
1
+ export * from '../shared-react';
@@ -1,10 +1,9 @@
1
- // src/react/hooks/use-attachment.ts
2
- import { useCapability, usePlugin } from "@embedpdf/core/react";
1
+ import { usePlugin, useCapability } from "@embedpdf/core/react";
3
2
  import { AttachmentPlugin } from "@embedpdf/plugin-attachment";
4
- var useAttachmentPlugin = () => usePlugin(AttachmentPlugin.id);
5
- var useAttachmentCapability = () => useCapability(AttachmentPlugin.id);
3
+ const useAttachmentPlugin = () => usePlugin(AttachmentPlugin.id);
4
+ const useAttachmentCapability = () => useCapability(AttachmentPlugin.id);
6
5
  export {
7
6
  useAttachmentCapability,
8
7
  useAttachmentPlugin
9
8
  };
10
- //# sourceMappingURL=index.js.map
9
+ //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/react/hooks/use-attachment.ts"],"sourcesContent":["import { useCapability, usePlugin } from '@embedpdf/core/react';\nimport { AttachmentPlugin } from '@embedpdf/plugin-attachment';\n\nexport const useAttachmentPlugin = () => usePlugin<AttachmentPlugin>(AttachmentPlugin.id);\nexport const useAttachmentCapability = () => useCapability<AttachmentPlugin>(AttachmentPlugin.id);\n"],"mappings":";AAAA,SAAS,eAAe,iBAAiB;AACzC,SAAS,wBAAwB;AAE1B,IAAM,sBAAsB,MAAM,UAA4B,iBAAiB,EAAE;AACjF,IAAM,0BAA0B,MAAM,cAAgC,iBAAiB,EAAE;","names":[]}
1
+ {"version":3,"file":"index.js","sources":["../../src/shared/hooks/use-attachment.ts"],"sourcesContent":["import { useCapability, usePlugin } from '@embedpdf/core/@framework';\nimport { AttachmentPlugin } from '@embedpdf/plugin-attachment';\n\nexport const useAttachmentPlugin = () => usePlugin<AttachmentPlugin>(AttachmentPlugin.id);\nexport const useAttachmentCapability = () => useCapability<AttachmentPlugin>(AttachmentPlugin.id);\n"],"names":[],"mappings":";;AAGO,MAAM,sBAAsB,MAAM,UAA4B,iBAAiB,EAAE;AACjF,MAAM,0BAA0B,MAAM,cAAgC,iBAAiB,EAAE;"}
@@ -0,0 +1 @@
1
+ export * from './use-attachment';
@@ -0,0 +1,11 @@
1
+ import { AttachmentPlugin } from '../../lib/index.ts';
2
+ export declare const useAttachmentPlugin: () => {
3
+ plugin: AttachmentPlugin | null;
4
+ isLoading: boolean;
5
+ ready: Promise<void>;
6
+ };
7
+ export declare const useAttachmentCapability: () => {
8
+ provides: Readonly<import('../../lib/index.ts').AttachmentCapability> | null;
9
+ isLoading: boolean;
10
+ ready: Promise<void>;
11
+ };
@@ -0,0 +1 @@
1
+ export * from './hooks';
@@ -0,0 +1 @@
1
+ export * from './use-attachment';
@@ -0,0 +1,11 @@
1
+ import { AttachmentPlugin } from '../../lib/index.ts';
2
+ export declare const useAttachmentPlugin: () => {
3
+ plugin: AttachmentPlugin | null;
4
+ isLoading: boolean;
5
+ ready: Promise<void>;
6
+ };
7
+ export declare const useAttachmentCapability: () => {
8
+ provides: Readonly<import('../../lib/index.ts').AttachmentCapability> | null;
9
+ isLoading: boolean;
10
+ ready: Promise<void>;
11
+ };
@@ -0,0 +1 @@
1
+ export * from './hooks';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@embedpdf/plugin-attachment",
3
- "version": "1.0.11",
3
+ "version": "1.0.12",
4
4
  "type": "module",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.js",
@@ -17,19 +17,20 @@
17
17
  "require": "./dist/preact/index.cjs"
18
18
  }
19
19
  },
20
- "dependencies": {},
20
+ "dependencies": {
21
+ "@embedpdf/models": "1.0.12"
22
+ },
21
23
  "devDependencies": {
22
24
  "@types/react": "^18.2.0",
23
- "tsup": "^8.0.0",
24
25
  "typescript": "^5.0.0",
25
- "@embedpdf/models": "1.0.11",
26
- "@embedpdf/core": "1.0.11"
26
+ "@embedpdf/build": "1.0.0",
27
+ "@embedpdf/core": "1.0.12"
27
28
  },
28
29
  "peerDependencies": {
29
30
  "react": ">=16.8.0",
30
31
  "react-dom": ">=16.8.0",
31
32
  "preact": "^10.26.4",
32
- "@embedpdf/core": "1.0.11"
33
+ "@embedpdf/core": "1.0.12"
33
34
  },
34
35
  "files": [
35
36
  "dist",
@@ -48,11 +49,12 @@
48
49
  "access": "public"
49
50
  },
50
51
  "scripts": {
51
- "build": "PROJECT_CWD=$(pwd) pnpm -w p:build",
52
- "build:watch": "PROJECT_CWD=$(pwd) pnpm -w p:build:watch",
53
- "clean": "PROJECT_CWD=$(pwd) pnpm -w p:clean",
54
- "lint": "PROJECT_CWD=$(pwd) pnpm -w p:lint",
55
- "lint:fix": "PROJECT_CWD=$(pwd) pnpm -w p:lint:fix",
56
- "typecheck": "PROJECT_CWD=$(pwd) pnpm -w p:typecheck"
52
+ "build:base": "vite build --mode base",
53
+ "build:react": "vite build --mode react",
54
+ "build:preact": "vite build --mode preact",
55
+ "build": "pnpm run clean && concurrently -c auto -n base,react,preact \"vite build --mode base\" \"vite build --mode react\" \"vite build --mode preact\"",
56
+ "clean": "rimraf dist",
57
+ "lint": "eslint src --color",
58
+ "lint:fix": "eslint src --color --fix"
57
59
  }
58
60
  }
package/dist/index.d.cts DELETED
@@ -1,22 +0,0 @@
1
- import { BasePluginConfig, BasePlugin, PluginRegistry, PluginManifest, PluginPackage } from '@embedpdf/core';
2
- import { PdfEngine } from '@embedpdf/models';
3
-
4
- interface AttachmentPluginConfig extends BasePluginConfig {
5
- }
6
- interface AttachmentCapability {
7
- }
8
-
9
- declare class AttachmentPlugin extends BasePlugin<AttachmentPluginConfig, AttachmentCapability> {
10
- static readonly id: "attachment";
11
- private engine;
12
- constructor(id: string, registry: PluginRegistry, engine: PdfEngine);
13
- initialize(_: AttachmentPluginConfig): Promise<void>;
14
- protected buildCapability(): AttachmentCapability;
15
- }
16
-
17
- declare const ATTACHMENT_PLUGIN_ID = "attachment";
18
- declare const manifest: PluginManifest<AttachmentPluginConfig>;
19
-
20
- declare const AttachmentPluginPackage: PluginPackage<AttachmentPlugin, AttachmentPluginConfig>;
21
-
22
- export { ATTACHMENT_PLUGIN_ID, type AttachmentCapability, AttachmentPlugin, type AttachmentPluginConfig, AttachmentPluginPackage, manifest };
@@ -1,15 +0,0 @@
1
- import * as _embedpdf_plugin_attachment from '@embedpdf/plugin-attachment';
2
- import { AttachmentPlugin } from '@embedpdf/plugin-attachment';
3
-
4
- declare const useAttachmentPlugin: () => {
5
- plugin: AttachmentPlugin | null;
6
- isLoading: boolean;
7
- ready: Promise<void>;
8
- };
9
- declare const useAttachmentCapability: () => {
10
- provides: Readonly<_embedpdf_plugin_attachment.AttachmentCapability> | null;
11
- isLoading: boolean;
12
- ready: Promise<void>;
13
- };
14
-
15
- export { useAttachmentCapability, useAttachmentPlugin };
@@ -1,15 +0,0 @@
1
- import * as _embedpdf_plugin_attachment from '@embedpdf/plugin-attachment';
2
- import { AttachmentPlugin } from '@embedpdf/plugin-attachment';
3
-
4
- declare const useAttachmentPlugin: () => {
5
- plugin: AttachmentPlugin | null;
6
- isLoading: boolean;
7
- ready: Promise<void>;
8
- };
9
- declare const useAttachmentCapability: () => {
10
- provides: Readonly<_embedpdf_plugin_attachment.AttachmentCapability> | null;
11
- isLoading: boolean;
12
- ready: Promise<void>;
13
- };
14
-
15
- export { useAttachmentCapability, useAttachmentPlugin };