@embedpdf/plugin-redaction 3.0.0-next.19 → 3.0.0-next.20
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/contract-Ib0iOWF3.cjs.map +1 -1
- package/dist/{contract-TU9orxrO.d.ts → contract-UwvOcu7H.d.cts} +3 -3
- package/dist/{contract-TU9orxrO.d.cts → contract-UwvOcu7H.d.ts} +3 -3
- package/dist/contract-eQ3P0UU-.js.map +1 -1
- package/dist/contract.d.cts +1 -1
- package/dist/contract.d.ts +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/package.json +7 -7
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contract-Ib0iOWF3.cjs","names":[],"sources":["../src/token.ts","../src/contract.ts"],"sourcesContent":["/** The package token, created once here and re-exported by `contract.ts`. */\nimport { createCapabilityToken } from '@embedpdf/core';\n\nimport type { RedactionCapability } from './contract';\n\nexport const RedactionToken = createCapabilityToken<RedactionCapability>('redaction', {\n hint: `add redactionPlugin() from '@embedpdf/plugin-redaction' to your plugins list`,\n // Without a document, an adapter's stand-in rejects these with `not-ready`, as the\n // capability would; the type asks for every member that returns a promise.\n promises: {\n markSelection: true,\n markArea: true,\n markPage: true,\n markMatches: true,\n unmark: true,\n clearPending: true,\n updateLabel: true,\n apply: true,\n applyAll: true,\n applyPages: true,\n },\n});\n","/**\n * @embedpdf/plugin-redaction/contract: the public redaction vocabulary.\n * Marking is annotation authoring (a mark is a `redact` annotation); applying\n * is the destructive document mutation. The plugin owns no mark state: the\n * pending view is a live projection of the annotation plane.\n */\nimport type {\n BatchResult,\n DeepPartial,\n EventHook,\n EventOrigin,\n OperationOptions,\n SettingsApi,\n} from '@embedpdf/core';\nimport type { Rect } from '@embedpdf/core-geometry';\nimport type {\n AnnotationRef,\n FreeTextFont,\n PageRef,\n RedactionApplyResult,\n SearchQuery,\n} from '@embedpdf/engine-core';\n\nexport { RedactionToken } from './token';\nexport type { RedactionApplyResult } from '@embedpdf/engine-core';\n\n/**\n * The redaction plugin's settings. `redactionPlugin(config)` registers them\n * over {@link REDACTION_DEFAULTS}, and `updateSettings()` changes them for\n * every document while the app runs. They are PDF colors and fonts, written\n * into each mark, so CSS doesn't reach them.\n */\nexport interface RedactionSettings {\n /**\n * What applying paints over every mark, whichever way it was made: the\n * `redact` tool, the selected text, or code. They are the redact tool's\n * defaults from then on; a style panel can still change one mark.\n */\n readonly overlay: {\n /** The color of a redacted area. */\n readonly fill: string;\n readonly text: {\n /** The color of a label. */\n readonly color: string;\n /** The label's font: a standard font or a registered one. */\n readonly fontFamily: FreeTextFont;\n /** The label's size in points; `0` fits it to the area. */\n readonly fontSize: number;\n };\n };\n}\n\n/** What the redaction settings are when the app registers none. */\nexport const REDACTION_DEFAULTS: RedactionSettings = {\n overlay: {\n fill: '#000000',\n text: { color: '#ffffff', fontFamily: 'helvetica', fontSize: 0 },\n },\n};\n\n/** What `redactionPlugin(config)` takes: any of the settings, merged over the defaults. */\nexport type RedactionConfig = DeepPartial<RedactionSettings>;\n\n/**\n * One pending redaction mark — a live projection of a `redact` annotation on\n * the annotation plane (delete the annotation and the mark is gone).\n */\nexport interface RedactionMark {\n readonly ref: AnnotationRef;\n readonly page: PageRef;\n /** Display index (0-based) from the page registry — for \"page N\" labels. */\n readonly pageIndex: number;\n /** `area` = rect-only mark (marquee); `text` = per-line quads (selection). */\n readonly kind: 'area' | 'text';\n /** Page-space bounds of the region. */\n readonly bounds: Rect;\n /** `/OverlayText` label, when set. */\n readonly overlayText: string | null;\n /** Whether the label fills the area over and over, or shows once. */\n readonly repeat: boolean;\n}\n\nexport interface RedactionMarkFilter {\n /** One page's marks: its ref or its index. */\n readonly page?: PageRef | number;\n}\n\n/** A label edit: `overlayText: null` clears it; `repeat` tiles it. */\nexport interface RedactionLabelPatch {\n overlayText?: string | null;\n repeat?: boolean;\n}\n\n/** Which other annotations an apply would destroy (a client-side estimate; the result is authoritative). */\nexport interface RedactionCollateral {\n readonly count: number;\n readonly refs: readonly AnnotationRef[];\n}\n\n// ── events ──\n/** A confirmed apply, from this session or another. */\nexport interface RedactionAppliedEvent {\n readonly result: RedactionApplyResult;\n readonly origin: EventOrigin;\n}\n/** Marks were created, changed or removed on these pages. */\nexport interface RedactionPendingChangedEvent {\n readonly pages: readonly PageRef[];\n}\n\n/**\n * Redaction for one document: marking (a mark is a `redact` annotation), the\n * pending marks, and applying them, which can't be undone. A page argument\n * is a ref or an index: a read given a page that isn't there answers empty,\n * a verb refuses it with `not-found`. Every async verb takes a `signal`. The\n * settings belong to the plugin, not to a document.\n */\nexport interface RedactionCapability extends SettingsApi<RedactionSettings> {\n /**\n * Whether marking is allowed. Marking and applying are different powers: a\n * mark is an ordinary `redact` annotation, so this is annotation create\n * authority (matches Acrobat: any reviewer who can annotate can propose\n * redactions).\n */\n canMark(): boolean;\n /** Whether this mark may be removed before it's applied: it is a mark, and may be deleted (`annotations:delete`). */\n canUnmark(ref: AnnotationRef): boolean;\n /** Whether this mark's label may change: it is a mark, and may be changed (`annotations:update`). */\n canUpdateLabel(ref: AnnotationRef): boolean;\n /**\n * Whether applying is allowed: the engine has a redaction service and every\n * capability its apply asserts is granted (`doc.redact`, `doc.pages.modify`,\n * `doc.annotate.modify`).\n */\n canApply(): boolean;\n /** An apply of this session is running at the engine. */\n isApplying(): boolean;\n /** The last confirmed apply result, from this session or another. */\n getLastResult(): RedactionApplyResult | null;\n\n // ── the pending view ──\n /** Pending marks in page order, or one page's. Reference-stable while unchanged. */\n listPending(filter?: RedactionMarkFilter): readonly RedactionMark[];\n getPending(ref: AnnotationRef): RedactionMark | null;\n /** How many marks wait to be applied, in the document or on one page. */\n getPendingCount(page?: PageRef | number): number;\n /** Which other annotations applying these marks (default: all) would destroy. */\n estimateCollateral(refs?: readonly AnnotationRef[]): RedactionCollateral;\n\n // ── marking ──\n // Every marking verb rejects `permission-denied` without annotation create\n // authority (see `canMark`). Marks take the `overlay` settings.\n /**\n * Mark the current text selection (one mark per page) and clear it.\n * Resolves `{ marks }`, empty without a selection; rejects `unsupported`\n * without the selection plugin.\n */\n markSelection(options?: OperationOptions): Promise<{ marks: readonly RedactionMark[] }>;\n /** Mark a page-space rectangle. Resolves `{ mark }`; rejects `not-found` for a page that isn't there. */\n markArea(\n page: PageRef | number,\n bounds: Rect,\n options?: OperationOptions,\n ): Promise<{ mark: RedactionMark }>;\n /** Mark a whole page. Resolves `{ mark }`; rejects `not-found` for a page that isn't there. */\n markPage(page: PageRef | number, options?: OperationOptions): Promise<{ mark: RedactionMark }>;\n /**\n * Mark every match of a search, or the ones on some pages. Runs the query\n * through the search plugin, so it replaces the user's current search.\n * Resolves `{ marks }`, one per match; rejects `unsupported` without the\n * search plugin.\n */\n markMatches(\n query: SearchQuery,\n options?: { pages?: readonly (PageRef | number)[] } & OperationOptions,\n ): Promise<{ marks: readonly RedactionMark[] }>;\n /**\n * Remove marks without applying them. Refs that are not pending marks are\n * skipped; a mark this session may not delete fails with\n * `permission-denied` (see `canUnmark`).\n */\n unmark(\n refs: readonly AnnotationRef[],\n options?: OperationOptions,\n ): Promise<BatchResult<AnnotationRef, AnnotationRef>>;\n /** Remove every mark, as `unmark` does. */\n clearPending(options?: OperationOptions): Promise<BatchResult<AnnotationRef, AnnotationRef>>;\n /**\n * Set the label a mark shows once it's applied; `overlayText: null` clears\n * it. Keeps the mark's font and colors. Resolves `{ mark }`. Rejects\n * `not-found` for a ref that isn't a mark, `permission-denied` when\n * `canUpdateLabel(ref)` is false.\n */\n updateLabel(\n ref: AnnotationRef,\n patch: RedactionLabelPatch,\n options?: OperationOptions,\n ): Promise<{ mark: RedactionMark }>;\n\n // ── applying (irreversible) ──\n /**\n * Apply specific pending marks. Per-page outcomes ride the result. Applies\n * run one at a time in call order; when one resolves, `getLastResult()`\n * holds its result and `onApplied` has fired. Rejects with `not-found` when\n * none of the refs is a pending mark, `unsupported` without an engine\n * redaction service, or the engine's `permission-denied`.\n */\n apply(refs: readonly AnnotationRef[], options?: OperationOptions): Promise<RedactionApplyResult>;\n /**\n * Apply every redaction in the document, in pages scope, including marks\n * on pages this client never loaded. Rejects like `apply`, and with\n * `not-ready` when the document has no pages.\n */\n applyAll(options?: OperationOptions): Promise<RedactionApplyResult>;\n /**\n * Apply the marks on some pages. Rejects like `apply`, with\n * `invalid-input` for no pages, and `not-found` for a page that isn't there.\n */\n applyPages(\n pages: readonly (PageRef | number)[],\n options?: OperationOptions,\n ): Promise<RedactionApplyResult>;\n\n // ── events ──\n /** A confirmed apply, from this session or another; fires after `getLastResult()` changed. */\n readonly onApplied: EventHook<RedactionAppliedEvent>;\n /** Marks were created, changed or removed on some pages. */\n readonly onPendingChanged: EventHook<RedactionPendingChangedEvent>;\n}\n"],"mappings":";;AAKA,MAAa,kBAAA,2BAAA,CAAA,CAAA,sBAAA,CAA4D,aAAa;CACpF,MAAM;CAGN,UAAU;EACR,eAAe;EACf,UAAU;EACV,UAAU;EACV,aAAa;EACb,QAAQ;EACR,cAAc;EACd,aAAa;EACb,OAAO;EACP,UAAU;EACV,YAAY;CACd;AACF,CAAC;;;;ACgCD,MAAa,qBAAwC,EACnD,SAAS;CACP,MAAM;CACN,MAAM;EAAE,OAAO;EAAW,YAAY;EAAa,UAAU;CAAE;AACjE,EACF"}
|
|
1
|
+
{"version":3,"file":"contract-Ib0iOWF3.cjs","names":[],"sources":["../src/token.ts","../src/contract.ts"],"sourcesContent":["/** The package token, created once here and re-exported by `contract.ts`. */\nimport { createCapabilityToken } from '@embedpdf/core';\n\nimport type { RedactionCapability } from './contract';\n\nexport const RedactionToken = createCapabilityToken<RedactionCapability>('redaction', {\n hint: `add redactionPlugin() from '@embedpdf/plugin-redaction' to your plugins list`,\n // Without a document, an adapter's stand-in rejects these with `not-ready`, as the\n // capability would; the type asks for every member that returns a promise.\n promises: {\n markSelection: true,\n markArea: true,\n markPage: true,\n markMatches: true,\n unmark: true,\n clearPending: true,\n updateLabel: true,\n apply: true,\n applyAll: true,\n applyPages: true,\n },\n});\n","/**\n * @embedpdf/plugin-redaction/contract: the public redaction vocabulary.\n * Marking is annotation authoring (a mark is a `redact` annotation); applying\n * is the destructive document mutation. The plugin owns no mark state: the\n * pending view is a live projection of the annotation plane.\n */\nimport type {\n BatchResult,\n DeepPartial,\n EventHook,\n EventOrigin,\n OperationOptions,\n SettingsApi,\n} from '@embedpdf/core';\nimport type { Rect } from '@embedpdf/core-geometry';\nimport type {\n AnnotationRef,\n FontName,\n PageRef,\n RedactionApplyResult,\n SearchQuery,\n} from '@embedpdf/engine-core';\n\nexport { RedactionToken } from './token';\nexport type { RedactionApplyResult } from '@embedpdf/engine-core';\n\n/**\n * The redaction plugin's settings. `redactionPlugin(config)` registers them\n * over {@link REDACTION_DEFAULTS}, and `updateSettings()` changes them for\n * every document while the app runs. They are PDF colors and fonts, written\n * into each mark, so CSS doesn't reach them.\n */\nexport interface RedactionSettings {\n /**\n * What applying paints over every mark, whichever way it was made: the\n * `redact` tool, the selected text, or code. They are the redact tool's\n * defaults from then on; a style panel can still change one mark.\n */\n readonly overlay: {\n /** The color of a redacted area. */\n readonly fill: string;\n readonly text: {\n /** The color of a label. */\n readonly color: string;\n /** The label's font: a standard font or a registered one. */\n readonly fontFamily: FontName;\n /** The label's size in points; `0` fits it to the area. */\n readonly fontSize: number;\n };\n };\n}\n\n/** What the redaction settings are when the app registers none. */\nexport const REDACTION_DEFAULTS: RedactionSettings = {\n overlay: {\n fill: '#000000',\n text: { color: '#ffffff', fontFamily: 'helvetica', fontSize: 0 },\n },\n};\n\n/** What `redactionPlugin(config)` takes: any of the settings, merged over the defaults. */\nexport type RedactionConfig = DeepPartial<RedactionSettings>;\n\n/**\n * One pending redaction mark — a live projection of a `redact` annotation on\n * the annotation plane (delete the annotation and the mark is gone).\n */\nexport interface RedactionMark {\n readonly ref: AnnotationRef;\n readonly page: PageRef;\n /** Display index (0-based) from the page registry — for \"page N\" labels. */\n readonly pageIndex: number;\n /** `area` = rect-only mark (marquee); `text` = per-line quads (selection). */\n readonly kind: 'area' | 'text';\n /** Page-space bounds of the region. */\n readonly bounds: Rect;\n /** `/OverlayText` label, when set. */\n readonly overlayText: string | null;\n /** Whether the label fills the area over and over, or shows once. */\n readonly repeat: boolean;\n}\n\nexport interface RedactionMarkFilter {\n /** One page's marks: its ref or its index. */\n readonly page?: PageRef | number;\n}\n\n/** A label edit: `overlayText: null` clears it; `repeat` tiles it. */\nexport interface RedactionLabelPatch {\n overlayText?: string | null;\n repeat?: boolean;\n}\n\n/** Which other annotations an apply would destroy (a client-side estimate; the result is authoritative). */\nexport interface RedactionCollateral {\n readonly count: number;\n readonly refs: readonly AnnotationRef[];\n}\n\n// ── events ──\n/** A confirmed apply, from this session or another. */\nexport interface RedactionAppliedEvent {\n readonly result: RedactionApplyResult;\n readonly origin: EventOrigin;\n}\n/** Marks were created, changed or removed on these pages. */\nexport interface RedactionPendingChangedEvent {\n readonly pages: readonly PageRef[];\n}\n\n/**\n * Redaction for one document: marking (a mark is a `redact` annotation), the\n * pending marks, and applying them, which can't be undone. A page argument\n * is a ref or an index: a read given a page that isn't there answers empty,\n * a verb refuses it with `not-found`. Every async verb takes a `signal`. The\n * settings belong to the plugin, not to a document.\n */\nexport interface RedactionCapability extends SettingsApi<RedactionSettings> {\n /**\n * Whether marking is allowed. Marking and applying are different powers: a\n * mark is an ordinary `redact` annotation, so this is annotation create\n * authority (matches Acrobat: any reviewer who can annotate can propose\n * redactions).\n */\n canMark(): boolean;\n /** Whether this mark may be removed before it's applied: it is a mark, and may be deleted (`annotations:delete`). */\n canUnmark(ref: AnnotationRef): boolean;\n /** Whether this mark's label may change: it is a mark, and may be changed (`annotations:update`). */\n canUpdateLabel(ref: AnnotationRef): boolean;\n /**\n * Whether applying is allowed: the engine has a redaction service and every\n * capability its apply asserts is granted (`doc.redact`, `doc.pages.modify`,\n * `doc.annotate.modify`).\n */\n canApply(): boolean;\n /** An apply of this session is running at the engine. */\n isApplying(): boolean;\n /** The last confirmed apply result, from this session or another. */\n getLastResult(): RedactionApplyResult | null;\n\n // ── the pending view ──\n /** Pending marks in page order, or one page's. Reference-stable while unchanged. */\n listPending(filter?: RedactionMarkFilter): readonly RedactionMark[];\n getPending(ref: AnnotationRef): RedactionMark | null;\n /** How many marks wait to be applied, in the document or on one page. */\n getPendingCount(page?: PageRef | number): number;\n /** Which other annotations applying these marks (default: all) would destroy. */\n estimateCollateral(refs?: readonly AnnotationRef[]): RedactionCollateral;\n\n // ── marking ──\n // Every marking verb rejects `permission-denied` without annotation create\n // authority (see `canMark`). Marks take the `overlay` settings.\n /**\n * Mark the current text selection (one mark per page) and clear it.\n * Resolves `{ marks }`, empty without a selection; rejects `unsupported`\n * without the selection plugin.\n */\n markSelection(options?: OperationOptions): Promise<{ marks: readonly RedactionMark[] }>;\n /** Mark a page-space rectangle. Resolves `{ mark }`; rejects `not-found` for a page that isn't there. */\n markArea(\n page: PageRef | number,\n bounds: Rect,\n options?: OperationOptions,\n ): Promise<{ mark: RedactionMark }>;\n /** Mark a whole page. Resolves `{ mark }`; rejects `not-found` for a page that isn't there. */\n markPage(page: PageRef | number, options?: OperationOptions): Promise<{ mark: RedactionMark }>;\n /**\n * Mark every match of a search, or the ones on some pages. Runs the query\n * through the search plugin, so it replaces the user's current search.\n * Resolves `{ marks }`, one per match; rejects `unsupported` without the\n * search plugin.\n */\n markMatches(\n query: SearchQuery,\n options?: { pages?: readonly (PageRef | number)[] } & OperationOptions,\n ): Promise<{ marks: readonly RedactionMark[] }>;\n /**\n * Remove marks without applying them. Refs that are not pending marks are\n * skipped; a mark this session may not delete fails with\n * `permission-denied` (see `canUnmark`).\n */\n unmark(\n refs: readonly AnnotationRef[],\n options?: OperationOptions,\n ): Promise<BatchResult<AnnotationRef, AnnotationRef>>;\n /** Remove every mark, as `unmark` does. */\n clearPending(options?: OperationOptions): Promise<BatchResult<AnnotationRef, AnnotationRef>>;\n /**\n * Set the label a mark shows once it's applied; `overlayText: null` clears\n * it. Keeps the mark's font and colors. Resolves `{ mark }`. Rejects\n * `not-found` for a ref that isn't a mark, `permission-denied` when\n * `canUpdateLabel(ref)` is false.\n */\n updateLabel(\n ref: AnnotationRef,\n patch: RedactionLabelPatch,\n options?: OperationOptions,\n ): Promise<{ mark: RedactionMark }>;\n\n // ── applying (irreversible) ──\n /**\n * Apply specific pending marks. Per-page outcomes ride the result. Applies\n * run one at a time in call order; when one resolves, `getLastResult()`\n * holds its result and `onApplied` has fired. Rejects with `not-found` when\n * none of the refs is a pending mark, `unsupported` without an engine\n * redaction service, or the engine's `permission-denied`.\n */\n apply(refs: readonly AnnotationRef[], options?: OperationOptions): Promise<RedactionApplyResult>;\n /**\n * Apply every redaction in the document, in pages scope, including marks\n * on pages this client never loaded. Rejects like `apply`, and with\n * `not-ready` when the document has no pages.\n */\n applyAll(options?: OperationOptions): Promise<RedactionApplyResult>;\n /**\n * Apply the marks on some pages. Rejects like `apply`, with\n * `invalid-input` for no pages, and `not-found` for a page that isn't there.\n */\n applyPages(\n pages: readonly (PageRef | number)[],\n options?: OperationOptions,\n ): Promise<RedactionApplyResult>;\n\n // ── events ──\n /** A confirmed apply, from this session or another; fires after `getLastResult()` changed. */\n readonly onApplied: EventHook<RedactionAppliedEvent>;\n /** Marks were created, changed or removed on some pages. */\n readonly onPendingChanged: EventHook<RedactionPendingChangedEvent>;\n}\n"],"mappings":";;AAKA,MAAa,kBAAA,2BAAA,CAAA,CAAA,sBAAA,CAA4D,aAAa;CACpF,MAAM;CAGN,UAAU;EACR,eAAe;EACf,UAAU;EACV,UAAU;EACV,aAAa;EACb,QAAQ;EACR,cAAc;EACd,aAAa;EACb,OAAO;EACP,UAAU;EACV,YAAY;CACd;AACF,CAAC;;;;ACgCD,MAAa,qBAAwC,EACnD,SAAS;CACP,MAAM;CACN,MAAM;EAAE,OAAO;EAAW,YAAY;EAAa,UAAU;CAAE;AACjE,EACF"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BatchResult, DeepPartial, EventHook, EventOrigin, OperationOptions, SettingsApi } from "@embedpdf/core";
|
|
2
2
|
import { Rect } from "@embedpdf/core-geometry";
|
|
3
|
-
import { AnnotationRef,
|
|
3
|
+
import { AnnotationRef, FontName, PageRef, RedactionApplyResult, RedactionApplyResult as RedactionApplyResult$1, SearchQuery } from "@embedpdf/engine-core";
|
|
4
4
|
//#region src/token.d.ts
|
|
5
5
|
declare const RedactionToken: import("@embedpdf/core").CapabilityToken<RedactionCapability>;
|
|
6
6
|
//#endregion
|
|
@@ -24,7 +24,7 @@ interface RedactionSettings {
|
|
|
24
24
|
/** The color of a label. */
|
|
25
25
|
readonly color: string;
|
|
26
26
|
/** The label's font: a standard font or a registered one. */
|
|
27
|
-
readonly fontFamily:
|
|
27
|
+
readonly fontFamily: FontName;
|
|
28
28
|
/** The label's size in points; `0` fits it to the area. */
|
|
29
29
|
readonly fontSize: number;
|
|
30
30
|
};
|
|
@@ -181,4 +181,4 @@ interface RedactionCapability extends SettingsApi<RedactionSettings> {
|
|
|
181
181
|
}
|
|
182
182
|
//#endregion
|
|
183
183
|
export { RedactionCollateral as a, RedactionMark as c, RedactionSettings as d, RedactionToken as f, RedactionCapability as i, RedactionMarkFilter as l, RedactionAppliedEvent as n, RedactionConfig as o, RedactionApplyResult$1 as r, RedactionLabelPatch as s, REDACTION_DEFAULTS as t, RedactionPendingChangedEvent as u };
|
|
184
|
-
//# sourceMappingURL=contract-
|
|
184
|
+
//# sourceMappingURL=contract-UwvOcu7H.d.cts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BatchResult, DeepPartial, EventHook, EventOrigin, OperationOptions, SettingsApi } from "@embedpdf/core";
|
|
2
2
|
import { Rect } from "@embedpdf/core-geometry";
|
|
3
|
-
import { AnnotationRef,
|
|
3
|
+
import { AnnotationRef, FontName, PageRef, RedactionApplyResult, RedactionApplyResult as RedactionApplyResult$1, SearchQuery } from "@embedpdf/engine-core";
|
|
4
4
|
//#region src/token.d.ts
|
|
5
5
|
declare const RedactionToken: import("@embedpdf/core").CapabilityToken<RedactionCapability>;
|
|
6
6
|
//#endregion
|
|
@@ -24,7 +24,7 @@ interface RedactionSettings {
|
|
|
24
24
|
/** The color of a label. */
|
|
25
25
|
readonly color: string;
|
|
26
26
|
/** The label's font: a standard font or a registered one. */
|
|
27
|
-
readonly fontFamily:
|
|
27
|
+
readonly fontFamily: FontName;
|
|
28
28
|
/** The label's size in points; `0` fits it to the area. */
|
|
29
29
|
readonly fontSize: number;
|
|
30
30
|
};
|
|
@@ -181,4 +181,4 @@ interface RedactionCapability extends SettingsApi<RedactionSettings> {
|
|
|
181
181
|
}
|
|
182
182
|
//#endregion
|
|
183
183
|
export { RedactionCollateral as a, RedactionMark as c, RedactionSettings as d, RedactionToken as f, RedactionCapability as i, RedactionMarkFilter as l, RedactionAppliedEvent as n, RedactionConfig as o, RedactionApplyResult$1 as r, RedactionLabelPatch as s, REDACTION_DEFAULTS as t, RedactionPendingChangedEvent as u };
|
|
184
|
-
//# sourceMappingURL=contract-
|
|
184
|
+
//# sourceMappingURL=contract-UwvOcu7H.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contract-eQ3P0UU-.js","names":[],"sources":["../src/token.ts","../src/contract.ts"],"sourcesContent":["/** The package token, created once here and re-exported by `contract.ts`. */\nimport { createCapabilityToken } from '@embedpdf/core';\n\nimport type { RedactionCapability } from './contract';\n\nexport const RedactionToken = createCapabilityToken<RedactionCapability>('redaction', {\n hint: `add redactionPlugin() from '@embedpdf/plugin-redaction' to your plugins list`,\n // Without a document, an adapter's stand-in rejects these with `not-ready`, as the\n // capability would; the type asks for every member that returns a promise.\n promises: {\n markSelection: true,\n markArea: true,\n markPage: true,\n markMatches: true,\n unmark: true,\n clearPending: true,\n updateLabel: true,\n apply: true,\n applyAll: true,\n applyPages: true,\n },\n});\n","/**\n * @embedpdf/plugin-redaction/contract: the public redaction vocabulary.\n * Marking is annotation authoring (a mark is a `redact` annotation); applying\n * is the destructive document mutation. The plugin owns no mark state: the\n * pending view is a live projection of the annotation plane.\n */\nimport type {\n BatchResult,\n DeepPartial,\n EventHook,\n EventOrigin,\n OperationOptions,\n SettingsApi,\n} from '@embedpdf/core';\nimport type { Rect } from '@embedpdf/core-geometry';\nimport type {\n AnnotationRef,\n FreeTextFont,\n PageRef,\n RedactionApplyResult,\n SearchQuery,\n} from '@embedpdf/engine-core';\n\nexport { RedactionToken } from './token';\nexport type { RedactionApplyResult } from '@embedpdf/engine-core';\n\n/**\n * The redaction plugin's settings. `redactionPlugin(config)` registers them\n * over {@link REDACTION_DEFAULTS}, and `updateSettings()` changes them for\n * every document while the app runs. They are PDF colors and fonts, written\n * into each mark, so CSS doesn't reach them.\n */\nexport interface RedactionSettings {\n /**\n * What applying paints over every mark, whichever way it was made: the\n * `redact` tool, the selected text, or code. They are the redact tool's\n * defaults from then on; a style panel can still change one mark.\n */\n readonly overlay: {\n /** The color of a redacted area. */\n readonly fill: string;\n readonly text: {\n /** The color of a label. */\n readonly color: string;\n /** The label's font: a standard font or a registered one. */\n readonly fontFamily: FreeTextFont;\n /** The label's size in points; `0` fits it to the area. */\n readonly fontSize: number;\n };\n };\n}\n\n/** What the redaction settings are when the app registers none. */\nexport const REDACTION_DEFAULTS: RedactionSettings = {\n overlay: {\n fill: '#000000',\n text: { color: '#ffffff', fontFamily: 'helvetica', fontSize: 0 },\n },\n};\n\n/** What `redactionPlugin(config)` takes: any of the settings, merged over the defaults. */\nexport type RedactionConfig = DeepPartial<RedactionSettings>;\n\n/**\n * One pending redaction mark — a live projection of a `redact` annotation on\n * the annotation plane (delete the annotation and the mark is gone).\n */\nexport interface RedactionMark {\n readonly ref: AnnotationRef;\n readonly page: PageRef;\n /** Display index (0-based) from the page registry — for \"page N\" labels. */\n readonly pageIndex: number;\n /** `area` = rect-only mark (marquee); `text` = per-line quads (selection). */\n readonly kind: 'area' | 'text';\n /** Page-space bounds of the region. */\n readonly bounds: Rect;\n /** `/OverlayText` label, when set. */\n readonly overlayText: string | null;\n /** Whether the label fills the area over and over, or shows once. */\n readonly repeat: boolean;\n}\n\nexport interface RedactionMarkFilter {\n /** One page's marks: its ref or its index. */\n readonly page?: PageRef | number;\n}\n\n/** A label edit: `overlayText: null` clears it; `repeat` tiles it. */\nexport interface RedactionLabelPatch {\n overlayText?: string | null;\n repeat?: boolean;\n}\n\n/** Which other annotations an apply would destroy (a client-side estimate; the result is authoritative). */\nexport interface RedactionCollateral {\n readonly count: number;\n readonly refs: readonly AnnotationRef[];\n}\n\n// ── events ──\n/** A confirmed apply, from this session or another. */\nexport interface RedactionAppliedEvent {\n readonly result: RedactionApplyResult;\n readonly origin: EventOrigin;\n}\n/** Marks were created, changed or removed on these pages. */\nexport interface RedactionPendingChangedEvent {\n readonly pages: readonly PageRef[];\n}\n\n/**\n * Redaction for one document: marking (a mark is a `redact` annotation), the\n * pending marks, and applying them, which can't be undone. A page argument\n * is a ref or an index: a read given a page that isn't there answers empty,\n * a verb refuses it with `not-found`. Every async verb takes a `signal`. The\n * settings belong to the plugin, not to a document.\n */\nexport interface RedactionCapability extends SettingsApi<RedactionSettings> {\n /**\n * Whether marking is allowed. Marking and applying are different powers: a\n * mark is an ordinary `redact` annotation, so this is annotation create\n * authority (matches Acrobat: any reviewer who can annotate can propose\n * redactions).\n */\n canMark(): boolean;\n /** Whether this mark may be removed before it's applied: it is a mark, and may be deleted (`annotations:delete`). */\n canUnmark(ref: AnnotationRef): boolean;\n /** Whether this mark's label may change: it is a mark, and may be changed (`annotations:update`). */\n canUpdateLabel(ref: AnnotationRef): boolean;\n /**\n * Whether applying is allowed: the engine has a redaction service and every\n * capability its apply asserts is granted (`doc.redact`, `doc.pages.modify`,\n * `doc.annotate.modify`).\n */\n canApply(): boolean;\n /** An apply of this session is running at the engine. */\n isApplying(): boolean;\n /** The last confirmed apply result, from this session or another. */\n getLastResult(): RedactionApplyResult | null;\n\n // ── the pending view ──\n /** Pending marks in page order, or one page's. Reference-stable while unchanged. */\n listPending(filter?: RedactionMarkFilter): readonly RedactionMark[];\n getPending(ref: AnnotationRef): RedactionMark | null;\n /** How many marks wait to be applied, in the document or on one page. */\n getPendingCount(page?: PageRef | number): number;\n /** Which other annotations applying these marks (default: all) would destroy. */\n estimateCollateral(refs?: readonly AnnotationRef[]): RedactionCollateral;\n\n // ── marking ──\n // Every marking verb rejects `permission-denied` without annotation create\n // authority (see `canMark`). Marks take the `overlay` settings.\n /**\n * Mark the current text selection (one mark per page) and clear it.\n * Resolves `{ marks }`, empty without a selection; rejects `unsupported`\n * without the selection plugin.\n */\n markSelection(options?: OperationOptions): Promise<{ marks: readonly RedactionMark[] }>;\n /** Mark a page-space rectangle. Resolves `{ mark }`; rejects `not-found` for a page that isn't there. */\n markArea(\n page: PageRef | number,\n bounds: Rect,\n options?: OperationOptions,\n ): Promise<{ mark: RedactionMark }>;\n /** Mark a whole page. Resolves `{ mark }`; rejects `not-found` for a page that isn't there. */\n markPage(page: PageRef | number, options?: OperationOptions): Promise<{ mark: RedactionMark }>;\n /**\n * Mark every match of a search, or the ones on some pages. Runs the query\n * through the search plugin, so it replaces the user's current search.\n * Resolves `{ marks }`, one per match; rejects `unsupported` without the\n * search plugin.\n */\n markMatches(\n query: SearchQuery,\n options?: { pages?: readonly (PageRef | number)[] } & OperationOptions,\n ): Promise<{ marks: readonly RedactionMark[] }>;\n /**\n * Remove marks without applying them. Refs that are not pending marks are\n * skipped; a mark this session may not delete fails with\n * `permission-denied` (see `canUnmark`).\n */\n unmark(\n refs: readonly AnnotationRef[],\n options?: OperationOptions,\n ): Promise<BatchResult<AnnotationRef, AnnotationRef>>;\n /** Remove every mark, as `unmark` does. */\n clearPending(options?: OperationOptions): Promise<BatchResult<AnnotationRef, AnnotationRef>>;\n /**\n * Set the label a mark shows once it's applied; `overlayText: null` clears\n * it. Keeps the mark's font and colors. Resolves `{ mark }`. Rejects\n * `not-found` for a ref that isn't a mark, `permission-denied` when\n * `canUpdateLabel(ref)` is false.\n */\n updateLabel(\n ref: AnnotationRef,\n patch: RedactionLabelPatch,\n options?: OperationOptions,\n ): Promise<{ mark: RedactionMark }>;\n\n // ── applying (irreversible) ──\n /**\n * Apply specific pending marks. Per-page outcomes ride the result. Applies\n * run one at a time in call order; when one resolves, `getLastResult()`\n * holds its result and `onApplied` has fired. Rejects with `not-found` when\n * none of the refs is a pending mark, `unsupported` without an engine\n * redaction service, or the engine's `permission-denied`.\n */\n apply(refs: readonly AnnotationRef[], options?: OperationOptions): Promise<RedactionApplyResult>;\n /**\n * Apply every redaction in the document, in pages scope, including marks\n * on pages this client never loaded. Rejects like `apply`, and with\n * `not-ready` when the document has no pages.\n */\n applyAll(options?: OperationOptions): Promise<RedactionApplyResult>;\n /**\n * Apply the marks on some pages. Rejects like `apply`, with\n * `invalid-input` for no pages, and `not-found` for a page that isn't there.\n */\n applyPages(\n pages: readonly (PageRef | number)[],\n options?: OperationOptions,\n ): Promise<RedactionApplyResult>;\n\n // ── events ──\n /** A confirmed apply, from this session or another; fires after `getLastResult()` changed. */\n readonly onApplied: EventHook<RedactionAppliedEvent>;\n /** Marks were created, changed or removed on some pages. */\n readonly onPendingChanged: EventHook<RedactionPendingChangedEvent>;\n}\n"],"mappings":";;;AAKA,MAAa,iBAAiB,sBAA2C,aAAa;CACpF,MAAM;CAGN,UAAU;EACR,eAAe;EACf,UAAU;EACV,UAAU;EACV,aAAa;EACb,QAAQ;EACR,cAAc;EACd,aAAa;EACb,OAAO;EACP,UAAU;EACV,YAAY;CACd;AACF,CAAC;;;;ACgCD,MAAa,qBAAwC,EACnD,SAAS;CACP,MAAM;CACN,MAAM;EAAE,OAAO;EAAW,YAAY;EAAa,UAAU;CAAE;AACjE,EACF"}
|
|
1
|
+
{"version":3,"file":"contract-eQ3P0UU-.js","names":[],"sources":["../src/token.ts","../src/contract.ts"],"sourcesContent":["/** The package token, created once here and re-exported by `contract.ts`. */\nimport { createCapabilityToken } from '@embedpdf/core';\n\nimport type { RedactionCapability } from './contract';\n\nexport const RedactionToken = createCapabilityToken<RedactionCapability>('redaction', {\n hint: `add redactionPlugin() from '@embedpdf/plugin-redaction' to your plugins list`,\n // Without a document, an adapter's stand-in rejects these with `not-ready`, as the\n // capability would; the type asks for every member that returns a promise.\n promises: {\n markSelection: true,\n markArea: true,\n markPage: true,\n markMatches: true,\n unmark: true,\n clearPending: true,\n updateLabel: true,\n apply: true,\n applyAll: true,\n applyPages: true,\n },\n});\n","/**\n * @embedpdf/plugin-redaction/contract: the public redaction vocabulary.\n * Marking is annotation authoring (a mark is a `redact` annotation); applying\n * is the destructive document mutation. The plugin owns no mark state: the\n * pending view is a live projection of the annotation plane.\n */\nimport type {\n BatchResult,\n DeepPartial,\n EventHook,\n EventOrigin,\n OperationOptions,\n SettingsApi,\n} from '@embedpdf/core';\nimport type { Rect } from '@embedpdf/core-geometry';\nimport type {\n AnnotationRef,\n FontName,\n PageRef,\n RedactionApplyResult,\n SearchQuery,\n} from '@embedpdf/engine-core';\n\nexport { RedactionToken } from './token';\nexport type { RedactionApplyResult } from '@embedpdf/engine-core';\n\n/**\n * The redaction plugin's settings. `redactionPlugin(config)` registers them\n * over {@link REDACTION_DEFAULTS}, and `updateSettings()` changes them for\n * every document while the app runs. They are PDF colors and fonts, written\n * into each mark, so CSS doesn't reach them.\n */\nexport interface RedactionSettings {\n /**\n * What applying paints over every mark, whichever way it was made: the\n * `redact` tool, the selected text, or code. They are the redact tool's\n * defaults from then on; a style panel can still change one mark.\n */\n readonly overlay: {\n /** The color of a redacted area. */\n readonly fill: string;\n readonly text: {\n /** The color of a label. */\n readonly color: string;\n /** The label's font: a standard font or a registered one. */\n readonly fontFamily: FontName;\n /** The label's size in points; `0` fits it to the area. */\n readonly fontSize: number;\n };\n };\n}\n\n/** What the redaction settings are when the app registers none. */\nexport const REDACTION_DEFAULTS: RedactionSettings = {\n overlay: {\n fill: '#000000',\n text: { color: '#ffffff', fontFamily: 'helvetica', fontSize: 0 },\n },\n};\n\n/** What `redactionPlugin(config)` takes: any of the settings, merged over the defaults. */\nexport type RedactionConfig = DeepPartial<RedactionSettings>;\n\n/**\n * One pending redaction mark — a live projection of a `redact` annotation on\n * the annotation plane (delete the annotation and the mark is gone).\n */\nexport interface RedactionMark {\n readonly ref: AnnotationRef;\n readonly page: PageRef;\n /** Display index (0-based) from the page registry — for \"page N\" labels. */\n readonly pageIndex: number;\n /** `area` = rect-only mark (marquee); `text` = per-line quads (selection). */\n readonly kind: 'area' | 'text';\n /** Page-space bounds of the region. */\n readonly bounds: Rect;\n /** `/OverlayText` label, when set. */\n readonly overlayText: string | null;\n /** Whether the label fills the area over and over, or shows once. */\n readonly repeat: boolean;\n}\n\nexport interface RedactionMarkFilter {\n /** One page's marks: its ref or its index. */\n readonly page?: PageRef | number;\n}\n\n/** A label edit: `overlayText: null` clears it; `repeat` tiles it. */\nexport interface RedactionLabelPatch {\n overlayText?: string | null;\n repeat?: boolean;\n}\n\n/** Which other annotations an apply would destroy (a client-side estimate; the result is authoritative). */\nexport interface RedactionCollateral {\n readonly count: number;\n readonly refs: readonly AnnotationRef[];\n}\n\n// ── events ──\n/** A confirmed apply, from this session or another. */\nexport interface RedactionAppliedEvent {\n readonly result: RedactionApplyResult;\n readonly origin: EventOrigin;\n}\n/** Marks were created, changed or removed on these pages. */\nexport interface RedactionPendingChangedEvent {\n readonly pages: readonly PageRef[];\n}\n\n/**\n * Redaction for one document: marking (a mark is a `redact` annotation), the\n * pending marks, and applying them, which can't be undone. A page argument\n * is a ref or an index: a read given a page that isn't there answers empty,\n * a verb refuses it with `not-found`. Every async verb takes a `signal`. The\n * settings belong to the plugin, not to a document.\n */\nexport interface RedactionCapability extends SettingsApi<RedactionSettings> {\n /**\n * Whether marking is allowed. Marking and applying are different powers: a\n * mark is an ordinary `redact` annotation, so this is annotation create\n * authority (matches Acrobat: any reviewer who can annotate can propose\n * redactions).\n */\n canMark(): boolean;\n /** Whether this mark may be removed before it's applied: it is a mark, and may be deleted (`annotations:delete`). */\n canUnmark(ref: AnnotationRef): boolean;\n /** Whether this mark's label may change: it is a mark, and may be changed (`annotations:update`). */\n canUpdateLabel(ref: AnnotationRef): boolean;\n /**\n * Whether applying is allowed: the engine has a redaction service and every\n * capability its apply asserts is granted (`doc.redact`, `doc.pages.modify`,\n * `doc.annotate.modify`).\n */\n canApply(): boolean;\n /** An apply of this session is running at the engine. */\n isApplying(): boolean;\n /** The last confirmed apply result, from this session or another. */\n getLastResult(): RedactionApplyResult | null;\n\n // ── the pending view ──\n /** Pending marks in page order, or one page's. Reference-stable while unchanged. */\n listPending(filter?: RedactionMarkFilter): readonly RedactionMark[];\n getPending(ref: AnnotationRef): RedactionMark | null;\n /** How many marks wait to be applied, in the document or on one page. */\n getPendingCount(page?: PageRef | number): number;\n /** Which other annotations applying these marks (default: all) would destroy. */\n estimateCollateral(refs?: readonly AnnotationRef[]): RedactionCollateral;\n\n // ── marking ──\n // Every marking verb rejects `permission-denied` without annotation create\n // authority (see `canMark`). Marks take the `overlay` settings.\n /**\n * Mark the current text selection (one mark per page) and clear it.\n * Resolves `{ marks }`, empty without a selection; rejects `unsupported`\n * without the selection plugin.\n */\n markSelection(options?: OperationOptions): Promise<{ marks: readonly RedactionMark[] }>;\n /** Mark a page-space rectangle. Resolves `{ mark }`; rejects `not-found` for a page that isn't there. */\n markArea(\n page: PageRef | number,\n bounds: Rect,\n options?: OperationOptions,\n ): Promise<{ mark: RedactionMark }>;\n /** Mark a whole page. Resolves `{ mark }`; rejects `not-found` for a page that isn't there. */\n markPage(page: PageRef | number, options?: OperationOptions): Promise<{ mark: RedactionMark }>;\n /**\n * Mark every match of a search, or the ones on some pages. Runs the query\n * through the search plugin, so it replaces the user's current search.\n * Resolves `{ marks }`, one per match; rejects `unsupported` without the\n * search plugin.\n */\n markMatches(\n query: SearchQuery,\n options?: { pages?: readonly (PageRef | number)[] } & OperationOptions,\n ): Promise<{ marks: readonly RedactionMark[] }>;\n /**\n * Remove marks without applying them. Refs that are not pending marks are\n * skipped; a mark this session may not delete fails with\n * `permission-denied` (see `canUnmark`).\n */\n unmark(\n refs: readonly AnnotationRef[],\n options?: OperationOptions,\n ): Promise<BatchResult<AnnotationRef, AnnotationRef>>;\n /** Remove every mark, as `unmark` does. */\n clearPending(options?: OperationOptions): Promise<BatchResult<AnnotationRef, AnnotationRef>>;\n /**\n * Set the label a mark shows once it's applied; `overlayText: null` clears\n * it. Keeps the mark's font and colors. Resolves `{ mark }`. Rejects\n * `not-found` for a ref that isn't a mark, `permission-denied` when\n * `canUpdateLabel(ref)` is false.\n */\n updateLabel(\n ref: AnnotationRef,\n patch: RedactionLabelPatch,\n options?: OperationOptions,\n ): Promise<{ mark: RedactionMark }>;\n\n // ── applying (irreversible) ──\n /**\n * Apply specific pending marks. Per-page outcomes ride the result. Applies\n * run one at a time in call order; when one resolves, `getLastResult()`\n * holds its result and `onApplied` has fired. Rejects with `not-found` when\n * none of the refs is a pending mark, `unsupported` without an engine\n * redaction service, or the engine's `permission-denied`.\n */\n apply(refs: readonly AnnotationRef[], options?: OperationOptions): Promise<RedactionApplyResult>;\n /**\n * Apply every redaction in the document, in pages scope, including marks\n * on pages this client never loaded. Rejects like `apply`, and with\n * `not-ready` when the document has no pages.\n */\n applyAll(options?: OperationOptions): Promise<RedactionApplyResult>;\n /**\n * Apply the marks on some pages. Rejects like `apply`, with\n * `invalid-input` for no pages, and `not-found` for a page that isn't there.\n */\n applyPages(\n pages: readonly (PageRef | number)[],\n options?: OperationOptions,\n ): Promise<RedactionApplyResult>;\n\n // ── events ──\n /** A confirmed apply, from this session or another; fires after `getLastResult()` changed. */\n readonly onApplied: EventHook<RedactionAppliedEvent>;\n /** Marks were created, changed or removed on some pages. */\n readonly onPendingChanged: EventHook<RedactionPendingChangedEvent>;\n}\n"],"mappings":";;;AAKA,MAAa,iBAAiB,sBAA2C,aAAa;CACpF,MAAM;CAGN,UAAU;EACR,eAAe;EACf,UAAU;EACV,UAAU;EACV,aAAa;EACb,QAAQ;EACR,cAAc;EACd,aAAa;EACb,OAAO;EACP,UAAU;EACV,YAAY;CACd;AACF,CAAC;;;;ACgCD,MAAa,qBAAwC,EACnD,SAAS;CACP,MAAM;CACN,MAAM;EAAE,OAAO;EAAW,YAAY;EAAa,UAAU;CAAE;AACjE,EACF"}
|
package/dist/contract.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as RedactionCollateral, c as RedactionMark, d as RedactionSettings, f as RedactionToken, i as RedactionCapability, l as RedactionMarkFilter, n as RedactionAppliedEvent, o as RedactionConfig, r as RedactionApplyResult, s as RedactionLabelPatch, t as REDACTION_DEFAULTS, u as RedactionPendingChangedEvent } from "./contract-
|
|
1
|
+
import { a as RedactionCollateral, c as RedactionMark, d as RedactionSettings, f as RedactionToken, i as RedactionCapability, l as RedactionMarkFilter, n as RedactionAppliedEvent, o as RedactionConfig, r as RedactionApplyResult, s as RedactionLabelPatch, t as REDACTION_DEFAULTS, u as RedactionPendingChangedEvent } from "./contract-UwvOcu7H.cjs";
|
|
2
2
|
export { REDACTION_DEFAULTS, RedactionAppliedEvent, type RedactionApplyResult, RedactionCapability, RedactionCollateral, RedactionConfig, RedactionLabelPatch, RedactionMark, RedactionMarkFilter, RedactionPendingChangedEvent, RedactionSettings, RedactionToken };
|
package/dist/contract.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as RedactionCollateral, c as RedactionMark, d as RedactionSettings, f as RedactionToken, i as RedactionCapability, l as RedactionMarkFilter, n as RedactionAppliedEvent, o as RedactionConfig, r as RedactionApplyResult, s as RedactionLabelPatch, t as REDACTION_DEFAULTS, u as RedactionPendingChangedEvent } from "./contract-
|
|
1
|
+
import { a as RedactionCollateral, c as RedactionMark, d as RedactionSettings, f as RedactionToken, i as RedactionCapability, l as RedactionMarkFilter, n as RedactionAppliedEvent, o as RedactionConfig, r as RedactionApplyResult, s as RedactionLabelPatch, t as REDACTION_DEFAULTS, u as RedactionPendingChangedEvent } from "./contract-UwvOcu7H.js";
|
|
2
2
|
export { REDACTION_DEFAULTS, RedactionAppliedEvent, type RedactionApplyResult, RedactionCapability, RedactionCollateral, RedactionConfig, RedactionLabelPatch, RedactionMark, RedactionMarkFilter, RedactionPendingChangedEvent, RedactionSettings, RedactionToken };
|
package/dist/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as RedactionCollateral, c as RedactionMark, d as RedactionSettings, f as RedactionToken, i as RedactionCapability, l as RedactionMarkFilter, n as RedactionAppliedEvent, o as RedactionConfig, r as RedactionApplyResult, s as RedactionLabelPatch, t as REDACTION_DEFAULTS, u as RedactionPendingChangedEvent } from "./contract-
|
|
1
|
+
import { a as RedactionCollateral, c as RedactionMark, d as RedactionSettings, f as RedactionToken, i as RedactionCapability, l as RedactionMarkFilter, n as RedactionAppliedEvent, o as RedactionConfig, r as RedactionApplyResult, s as RedactionLabelPatch, t as REDACTION_DEFAULTS, u as RedactionPendingChangedEvent } from "./contract-UwvOcu7H.cjs";
|
|
2
2
|
import { RedactionApplyResult as RedactionApplyResult$1 } from "@embedpdf/engine-core";
|
|
3
3
|
//#region src/model.d.ts
|
|
4
4
|
interface RedactionModel {
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as RedactionCollateral, c as RedactionMark, d as RedactionSettings, f as RedactionToken, i as RedactionCapability, l as RedactionMarkFilter, n as RedactionAppliedEvent, o as RedactionConfig, r as RedactionApplyResult, s as RedactionLabelPatch, t as REDACTION_DEFAULTS, u as RedactionPendingChangedEvent } from "./contract-
|
|
1
|
+
import { a as RedactionCollateral, c as RedactionMark, d as RedactionSettings, f as RedactionToken, i as RedactionCapability, l as RedactionMarkFilter, n as RedactionAppliedEvent, o as RedactionConfig, r as RedactionApplyResult, s as RedactionLabelPatch, t as REDACTION_DEFAULTS, u as RedactionPendingChangedEvent } from "./contract-UwvOcu7H.js";
|
|
2
2
|
import { RedactionApplyResult as RedactionApplyResult$1 } from "@embedpdf/engine-core";
|
|
3
3
|
//#region src/model.d.ts
|
|
4
4
|
interface RedactionModel {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@embedpdf/plugin-redaction",
|
|
3
|
-
"version": "3.0.0-next.
|
|
3
|
+
"version": "3.0.0-next.20",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Document-scoped redaction: the destructive apply stage over redact annotation marks — pending queue view, collateral estimation, and the doc.redaction.apply wrapper. Marking itself rides the annotation plane.",
|
|
6
6
|
"type": "module",
|
|
@@ -22,12 +22,12 @@
|
|
|
22
22
|
"dist"
|
|
23
23
|
],
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@embedpdf/core": "3.0.0-next.
|
|
26
|
-
"@embedpdf/plugin-
|
|
27
|
-
"@embedpdf/
|
|
28
|
-
"@embedpdf/plugin-search": "3.0.0-next.
|
|
29
|
-
"@embedpdf/core
|
|
30
|
-
"@embedpdf/
|
|
25
|
+
"@embedpdf/core": "3.0.0-next.20",
|
|
26
|
+
"@embedpdf/plugin-annotation": "3.0.0-next.20",
|
|
27
|
+
"@embedpdf/plugin-selection": "3.0.0-next.20",
|
|
28
|
+
"@embedpdf/plugin-search": "3.0.0-next.20",
|
|
29
|
+
"@embedpdf/engine-core": "3.0.0-next.20",
|
|
30
|
+
"@embedpdf/core-geometry": "3.0.0-next.20"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"typescript": "^5.0.0",
|