@embedpdf/plugin-bookmark 1.0.18 → 1.0.19
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 +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2 -3
- package/dist/index.js.map +1 -1
- package/dist/lib/bookmark-plugin.d.ts +1 -3
- package/package.json +5 -5
package/dist/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("@embedpdf/core"),o="bookmark",t={id:o,name:"Bookmark Plugin",version:"1.0.0",provides:["bookmark"],requires:[],optional:[],defaultConfig:{enabled:!0}},r=class extends e.BasePlugin{constructor(e,o
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("@embedpdf/core"),o="bookmark",t={id:o,name:"Bookmark Plugin",version:"1.0.0",provides:["bookmark"],requires:[],optional:[],defaultConfig:{enabled:!0}},r=class extends e.BasePlugin{constructor(e,o){super(e,o)}async initialize(e){}buildCapability(){return{getBookmarks:this.getBookmarks.bind(this)}}getBookmarks(){const e=this.coreState.core.document;if(!e)throw new Error("Document not open");return this.engine.getBookmarks(e)}};r.id="bookmark";let i=r;const n={manifest:t,create:e=>new i(o,e),reducer:()=>{},initialState:{}};exports.BOOKMARK_PLUGIN_ID=o,exports.BookmarkPlugin=i,exports.BookmarkPluginPackage=n,exports.manifest=t;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../src/lib/manifest.ts","../src/lib/bookmark-plugin.ts","../src/lib/index.ts"],"sourcesContent":["import { PluginManifest } from '@embedpdf/core';\nimport { BookmarkPluginConfig } from './types';\n\nexport const BOOKMARK_PLUGIN_ID = 'bookmark';\n\nexport const manifest: PluginManifest<BookmarkPluginConfig> = {\n id: BOOKMARK_PLUGIN_ID,\n name: 'Bookmark Plugin',\n version: '1.0.0',\n provides: ['bookmark'],\n requires: [],\n optional: [],\n defaultConfig: {\n enabled: true,\n },\n};\n","import { BasePlugin, PluginRegistry } from '@embedpdf/core';\nimport { PdfBookmarkObject, PdfEngine, PdfErrorReason, Task } from '@embedpdf/models';\n\nimport { BookmarkCapability, BookmarkPluginConfig } from './types';\n\nexport class BookmarkPlugin extends BasePlugin<BookmarkPluginConfig, BookmarkCapability> {\n static readonly id = 'bookmark' as const;\n\n
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../src/lib/manifest.ts","../src/lib/bookmark-plugin.ts","../src/lib/index.ts"],"sourcesContent":["import { PluginManifest } from '@embedpdf/core';\nimport { BookmarkPluginConfig } from './types';\n\nexport const BOOKMARK_PLUGIN_ID = 'bookmark';\n\nexport const manifest: PluginManifest<BookmarkPluginConfig> = {\n id: BOOKMARK_PLUGIN_ID,\n name: 'Bookmark Plugin',\n version: '1.0.0',\n provides: ['bookmark'],\n requires: [],\n optional: [],\n defaultConfig: {\n enabled: true,\n },\n};\n","import { BasePlugin, PluginRegistry } from '@embedpdf/core';\nimport { PdfBookmarkObject, PdfEngine, PdfErrorReason, Task } from '@embedpdf/models';\n\nimport { BookmarkCapability, BookmarkPluginConfig } from './types';\n\nexport class BookmarkPlugin extends BasePlugin<BookmarkPluginConfig, BookmarkCapability> {\n static readonly id = 'bookmark' as const;\n\n constructor(id: string, registry: PluginRegistry) {\n super(id, registry);\n }\n\n async initialize(_: BookmarkPluginConfig): Promise<void> {}\n\n protected buildCapability(): BookmarkCapability {\n return {\n getBookmarks: this.getBookmarks.bind(this),\n };\n }\n\n private getBookmarks(): Task<{ bookmarks: PdfBookmarkObject[] }, PdfErrorReason> {\n const doc = this.coreState.core.document;\n if (!doc) throw new Error('Document not open');\n\n return this.engine.getBookmarks(doc);\n }\n}\n","import { PluginPackage } from '@embedpdf/core';\nimport { manifest, BOOKMARK_PLUGIN_ID } from './manifest';\nimport { BookmarkPluginConfig } from './types';\nimport { BookmarkPlugin } from './bookmark-plugin';\n\nexport const BookmarkPluginPackage: PluginPackage<BookmarkPlugin, BookmarkPluginConfig> = {\n manifest,\n create: (registry) => new BookmarkPlugin(BOOKMARK_PLUGIN_ID, registry),\n reducer: () => {},\n initialState: {},\n};\n\nexport * from './bookmark-plugin';\nexport * from './types';\nexport * from './manifest';\n"],"names":["BOOKMARK_PLUGIN_ID","manifest","id","name","version","provides","requires","optional","defaultConfig","enabled","_BookmarkPlugin","BasePlugin","constructor","registry","super","initialize","_","buildCapability","getBookmarks","this","bind","doc","coreState","core","document","Error","engine","BookmarkPlugin","BookmarkPluginPackage","create","reducer","initialState"],"mappings":"kHAGaA,EAAqB,WAErBC,EAAiD,CAC5DC,GAAIF,EACJG,KAAM,kBACNC,QAAS,QACTC,SAAU,CAAC,YACXC,SAAU,GACVC,SAAU,GACVC,cAAe,CACbC,SAAS,ICRAC,EAAN,cAA6BC,EAAAA,WAGlC,WAAAC,CAAYV,EAAYW,GACtBC,MAAMZ,EAAIW,EAAQ,CAGpB,gBAAME,CAAWC,GAAwC,CAE/C,eAAAC,GACD,MAAA,CACLC,aAAcC,KAAKD,aAAaE,KAAKD,MACvC,CAGM,YAAAD,GACA,MAAAG,EAAMF,KAAKG,UAAUC,KAAKC,SAChC,IAAKH,EAAW,MAAA,IAAII,MAAM,qBAEnB,OAAAN,KAAKO,OAAOR,aAAaG,EAAG,GAlBrCX,EAAgBR,GAAK,WADhB,IAAMyB,EAANjB,ECAA,MAAMkB,EAA6E,CACxF3B,WACA4B,OAAShB,GAAa,IAAIc,EAAe3B,EAAoBa,GAC7DiB,QAAS,OACTC,aAAc,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -12,9 +12,8 @@ const manifest = {
|
|
|
12
12
|
}
|
|
13
13
|
};
|
|
14
14
|
const _BookmarkPlugin = class _BookmarkPlugin extends BasePlugin {
|
|
15
|
-
constructor(id, registry
|
|
15
|
+
constructor(id, registry) {
|
|
16
16
|
super(id, registry);
|
|
17
|
-
this.engine = engine;
|
|
18
17
|
}
|
|
19
18
|
async initialize(_) {
|
|
20
19
|
}
|
|
@@ -33,7 +32,7 @@ _BookmarkPlugin.id = "bookmark";
|
|
|
33
32
|
let BookmarkPlugin = _BookmarkPlugin;
|
|
34
33
|
const BookmarkPluginPackage = {
|
|
35
34
|
manifest,
|
|
36
|
-
create: (registry
|
|
35
|
+
create: (registry) => new BookmarkPlugin(BOOKMARK_PLUGIN_ID, registry),
|
|
37
36
|
reducer: () => {
|
|
38
37
|
},
|
|
39
38
|
initialState: {}
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../src/lib/manifest.ts","../src/lib/bookmark-plugin.ts","../src/lib/index.ts"],"sourcesContent":["import { PluginManifest } from '@embedpdf/core';\nimport { BookmarkPluginConfig } from './types';\n\nexport const BOOKMARK_PLUGIN_ID = 'bookmark';\n\nexport const manifest: PluginManifest<BookmarkPluginConfig> = {\n id: BOOKMARK_PLUGIN_ID,\n name: 'Bookmark Plugin',\n version: '1.0.0',\n provides: ['bookmark'],\n requires: [],\n optional: [],\n defaultConfig: {\n enabled: true,\n },\n};\n","import { BasePlugin, PluginRegistry } from '@embedpdf/core';\nimport { PdfBookmarkObject, PdfEngine, PdfErrorReason, Task } from '@embedpdf/models';\n\nimport { BookmarkCapability, BookmarkPluginConfig } from './types';\n\nexport class BookmarkPlugin extends BasePlugin<BookmarkPluginConfig, BookmarkCapability> {\n static readonly id = 'bookmark' as const;\n\n
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/lib/manifest.ts","../src/lib/bookmark-plugin.ts","../src/lib/index.ts"],"sourcesContent":["import { PluginManifest } from '@embedpdf/core';\nimport { BookmarkPluginConfig } from './types';\n\nexport const BOOKMARK_PLUGIN_ID = 'bookmark';\n\nexport const manifest: PluginManifest<BookmarkPluginConfig> = {\n id: BOOKMARK_PLUGIN_ID,\n name: 'Bookmark Plugin',\n version: '1.0.0',\n provides: ['bookmark'],\n requires: [],\n optional: [],\n defaultConfig: {\n enabled: true,\n },\n};\n","import { BasePlugin, PluginRegistry } from '@embedpdf/core';\nimport { PdfBookmarkObject, PdfEngine, PdfErrorReason, Task } from '@embedpdf/models';\n\nimport { BookmarkCapability, BookmarkPluginConfig } from './types';\n\nexport class BookmarkPlugin extends BasePlugin<BookmarkPluginConfig, BookmarkCapability> {\n static readonly id = 'bookmark' as const;\n\n constructor(id: string, registry: PluginRegistry) {\n super(id, registry);\n }\n\n async initialize(_: BookmarkPluginConfig): Promise<void> {}\n\n protected buildCapability(): BookmarkCapability {\n return {\n getBookmarks: this.getBookmarks.bind(this),\n };\n }\n\n private getBookmarks(): Task<{ bookmarks: PdfBookmarkObject[] }, PdfErrorReason> {\n const doc = this.coreState.core.document;\n if (!doc) throw new Error('Document not open');\n\n return this.engine.getBookmarks(doc);\n }\n}\n","import { PluginPackage } from '@embedpdf/core';\nimport { manifest, BOOKMARK_PLUGIN_ID } from './manifest';\nimport { BookmarkPluginConfig } from './types';\nimport { BookmarkPlugin } from './bookmark-plugin';\n\nexport const BookmarkPluginPackage: PluginPackage<BookmarkPlugin, BookmarkPluginConfig> = {\n manifest,\n create: (registry) => new BookmarkPlugin(BOOKMARK_PLUGIN_ID, registry),\n reducer: () => {},\n initialState: {},\n};\n\nexport * from './bookmark-plugin';\nexport * from './types';\nexport * from './manifest';\n"],"names":[],"mappings":";AAGO,MAAM,qBAAqB;AAE3B,MAAM,WAAiD;AAAA,EAC5D,IAAI;AAAA,EACJ,MAAM;AAAA,EACN,SAAS;AAAA,EACT,UAAU,CAAC,UAAU;AAAA,EACrB,UAAU,CAAC;AAAA,EACX,UAAU,CAAC;AAAA,EACX,eAAe;AAAA,IACb,SAAS;AAAA,EAAA;AAEb;ACVO,MAAM,kBAAN,MAAM,wBAAuB,WAAqD;AAAA,EAGvF,YAAY,IAAY,UAA0B;AAChD,UAAM,IAAI,QAAQ;AAAA,EAAA;AAAA,EAGpB,MAAM,WAAW,GAAwC;AAAA,EAAA;AAAA,EAE/C,kBAAsC;AACvC,WAAA;AAAA,MACL,cAAc,KAAK,aAAa,KAAK,IAAI;AAAA,IAC3C;AAAA,EAAA;AAAA,EAGM,eAAyE;AACzE,UAAA,MAAM,KAAK,UAAU,KAAK;AAChC,QAAI,CAAC,IAAW,OAAA,IAAI,MAAM,mBAAmB;AAEtC,WAAA,KAAK,OAAO,aAAa,GAAG;AAAA,EAAA;AAEvC;AApBE,gBAAgB,KAAK;AADhB,IAAM,iBAAN;ACAA,MAAM,wBAA6E;AAAA,EACxF;AAAA,EACA,QAAQ,CAAC,aAAa,IAAI,eAAe,oBAAoB,QAAQ;AAAA,EACrE,SAAS,MAAM;AAAA,EAAC;AAAA,EAChB,cAAc,CAAA;AAChB;"}
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { BasePlugin, PluginRegistry } from '@embedpdf/core';
|
|
2
|
-
import { PdfEngine } from '@embedpdf/models';
|
|
3
2
|
import { BookmarkCapability, BookmarkPluginConfig } from './types';
|
|
4
3
|
export declare class BookmarkPlugin extends BasePlugin<BookmarkPluginConfig, BookmarkCapability> {
|
|
5
4
|
static readonly id: "bookmark";
|
|
6
|
-
|
|
7
|
-
constructor(id: string, registry: PluginRegistry, engine: PdfEngine);
|
|
5
|
+
constructor(id: string, registry: PluginRegistry);
|
|
8
6
|
initialize(_: BookmarkPluginConfig): Promise<void>;
|
|
9
7
|
protected buildCapability(): BookmarkCapability;
|
|
10
8
|
private getBookmarks;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@embedpdf/plugin-bookmark",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.19",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.cjs",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -23,19 +23,19 @@
|
|
|
23
23
|
}
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@embedpdf/models": "1.0.
|
|
26
|
+
"@embedpdf/models": "1.0.19"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@types/react": "^18.2.0",
|
|
30
30
|
"typescript": "^5.0.0",
|
|
31
|
-
"@embedpdf/
|
|
32
|
-
"@embedpdf/
|
|
31
|
+
"@embedpdf/build": "1.0.0",
|
|
32
|
+
"@embedpdf/core": "1.0.19"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
35
35
|
"react": ">=16.8.0",
|
|
36
36
|
"react-dom": ">=16.8.0",
|
|
37
37
|
"preact": "^10.26.4",
|
|
38
|
-
"@embedpdf/core": "1.0.
|
|
38
|
+
"@embedpdf/core": "1.0.19"
|
|
39
39
|
},
|
|
40
40
|
"files": [
|
|
41
41
|
"dist",
|