@opengeni/artifact-tool 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +190 -0
- package/README.md +104 -0
- package/dist/bounded-zip.d.ts +28 -0
- package/dist/chunk-4BSENMAE.js +39 -0
- package/dist/chunk-4BSENMAE.js.map +1 -0
- package/dist/chunk-4FRFNNBM.js +276 -0
- package/dist/chunk-4FRFNNBM.js.map +1 -0
- package/dist/chunk-5XIA6KHZ.js +49 -0
- package/dist/chunk-5XIA6KHZ.js.map +1 -0
- package/dist/chunk-66CT2ZRP.js +2229 -0
- package/dist/chunk-66CT2ZRP.js.map +1 -0
- package/dist/chunk-72SYDU4O.js +319 -0
- package/dist/chunk-72SYDU4O.js.map +1 -0
- package/dist/chunk-B2ZJRZDA.js +279 -0
- package/dist/chunk-B2ZJRZDA.js.map +1 -0
- package/dist/chunk-DCTLTNPW.js +2458 -0
- package/dist/chunk-DCTLTNPW.js.map +1 -0
- package/dist/chunk-FGZM4FQ6.js +473 -0
- package/dist/chunk-FGZM4FQ6.js.map +1 -0
- package/dist/chunk-HTJBLBDE.js +591 -0
- package/dist/chunk-HTJBLBDE.js.map +1 -0
- package/dist/chunk-IYFXZQ34.js +5306 -0
- package/dist/chunk-IYFXZQ34.js.map +1 -0
- package/dist/chunk-J6N7IR44.js +172 -0
- package/dist/chunk-J6N7IR44.js.map +1 -0
- package/dist/chunk-N2IHNWBS.js +1002 -0
- package/dist/chunk-N2IHNWBS.js.map +1 -0
- package/dist/chunk-NAG44K67.js +549 -0
- package/dist/chunk-NAG44K67.js.map +1 -0
- package/dist/chunk-O24KTEGP.js +33 -0
- package/dist/chunk-O24KTEGP.js.map +1 -0
- package/dist/chunk-PI2AZVGK.js +2074 -0
- package/dist/chunk-PI2AZVGK.js.map +1 -0
- package/dist/chunk-Q2FFHEY7.js +40 -0
- package/dist/chunk-Q2FFHEY7.js.map +1 -0
- package/dist/chunk-RBGQADXA.js +57 -0
- package/dist/chunk-RBGQADXA.js.map +1 -0
- package/dist/chunk-U5G2BKM2.js +613 -0
- package/dist/chunk-U5G2BKM2.js.map +1 -0
- package/dist/chunk-VOJHMSM3.js +39 -0
- package/dist/chunk-VOJHMSM3.js.map +1 -0
- package/dist/chunk-VUNV25KB.js +16 -0
- package/dist/chunk-VUNV25KB.js.map +1 -0
- package/dist/chunk-XIFUNVBO.js +101 -0
- package/dist/chunk-XIFUNVBO.js.map +1 -0
- package/dist/chunk-ZCJYRJGB.js +489 -0
- package/dist/chunk-ZCJYRJGB.js.map +1 -0
- package/dist/chunk-ZZXPEE4S.js +2260 -0
- package/dist/chunk-ZZXPEE4S.js.map +1 -0
- package/dist/document-docx-api.d.ts +49 -0
- package/dist/document-docx-codec.d.ts +9 -0
- package/dist/document-docx-codec.js +4765 -0
- package/dist/document-docx-codec.js.map +1 -0
- package/dist/document-docx-import.d.ts +261 -0
- package/dist/document-docx-packer.d.ts +18 -0
- package/dist/document-docx-state.d.ts +12 -0
- package/dist/document-render.d.ts +3 -0
- package/dist/document-render.js +492 -0
- package/dist/document-render.js.map +1 -0
- package/dist/document.d.ts +432 -0
- package/dist/document.js +37 -0
- package/dist/document.js.map +1 -0
- package/dist/errors.d.ts +23 -0
- package/dist/file-blob.d.ts +11 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +186 -0
- package/dist/index.js.map +1 -0
- package/dist/inspection.d.ts +12 -0
- package/dist/kernel.d.ts +101 -0
- package/dist/lib-GQLPACFK.js +9746 -0
- package/dist/lib-GQLPACFK.js.map +1 -0
- package/dist/materializer-cli-entry.d.ts +2 -0
- package/dist/materializer-cli-entry.js +29 -0
- package/dist/materializer-cli-entry.js.map +1 -0
- package/dist/materializer-cli.d.ts +24 -0
- package/dist/materializer-cli.js +24 -0
- package/dist/materializer-cli.js.map +1 -0
- package/dist/native-raster.d.ts +10 -0
- package/dist/native.d.ts +129 -0
- package/dist/native.js +31 -0
- package/dist/native.js.map +1 -0
- package/dist/office-import.d.ts +48 -0
- package/dist/office-import.js +154 -0
- package/dist/office-import.js.map +1 -0
- package/dist/presentation-pptx-api.d.ts +60 -0
- package/dist/presentation-pptx-import.d.ts +5 -0
- package/dist/presentation-pptx-state-digest-765CZZED.js +10 -0
- package/dist/presentation-pptx-state-digest-765CZZED.js.map +1 -0
- package/dist/presentation-pptx-state-digest.d.ts +3 -0
- package/dist/presentation-pptx-state.d.ts +4 -0
- package/dist/presentation-pptx-xml.d.ts +29 -0
- package/dist/presentation-pptx.d.ts +5 -0
- package/dist/presentation-pptx.js +2365 -0
- package/dist/presentation-pptx.js.map +1 -0
- package/dist/presentation-render.d.ts +29 -0
- package/dist/presentation-render.js +375 -0
- package/dist/presentation-render.js.map +1 -0
- package/dist/presentation.d.ts +565 -0
- package/dist/presentation.js +71 -0
- package/dist/presentation.js.map +1 -0
- package/dist/production-composite.d.ts +68 -0
- package/dist/production-document.d.ts +2 -0
- package/dist/production-document.js +176 -0
- package/dist/production-document.js.map +1 -0
- package/dist/production-native-codecs.d.ts +94 -0
- package/dist/production-presentation.d.ts +2 -0
- package/dist/production-presentation.js +176 -0
- package/dist/production-presentation.js.map +1 -0
- package/dist/production-sha256.d.ts +2 -0
- package/dist/production-spreadsheet-native.d.ts +12 -0
- package/dist/production-spreadsheet.d.ts +2 -0
- package/dist/production-spreadsheet.js +176 -0
- package/dist/production-spreadsheet.js.map +1 -0
- package/dist/production.d.ts +96 -0
- package/dist/raster-image.d.ts +34 -0
- package/dist/reference.d.ts +17 -0
- package/dist/reference.js +574 -0
- package/dist/reference.js.map +1 -0
- package/dist/runtime-cli-entry.d.ts +2 -0
- package/dist/runtime-cli-entry.js +21 -0
- package/dist/runtime-cli-entry.js.map +1 -0
- package/dist/runtime-cli.d.ts +76 -0
- package/dist/runtime-cli.js +26 -0
- package/dist/runtime-cli.js.map +1 -0
- package/dist/runtime-development.d.ts +73 -0
- package/dist/runtime-development.js +30 -0
- package/dist/runtime-development.js.map +1 -0
- package/dist/runtime-receipt.d.ts +19 -0
- package/dist/runtime.d.ts +355 -0
- package/dist/runtime.js +42 -0
- package/dist/runtime.js.map +1 -0
- package/dist/snapshot.d.ts +26 -0
- package/dist/snapshot.js +61 -0
- package/dist/snapshot.js.map +1 -0
- package/dist/spreadsheet-address.d.ts +18 -0
- package/dist/spreadsheet-file.d.ts +17 -0
- package/dist/spreadsheet-formula.d.ts +67 -0
- package/dist/spreadsheet-image.d.ts +17 -0
- package/dist/spreadsheet-render.d.ts +5 -0
- package/dist/spreadsheet-render.js +752 -0
- package/dist/spreadsheet-render.js.map +1 -0
- package/dist/spreadsheet-types.d.ts +155 -0
- package/dist/spreadsheet-xlsx-api.d.ts +88 -0
- package/dist/spreadsheet-xlsx-codec.d.ts +16 -0
- package/dist/spreadsheet-xlsx-codec.js +16 -0
- package/dist/spreadsheet-xlsx-codec.js.map +1 -0
- package/dist/spreadsheet-xlsx-state.d.ts +16 -0
- package/dist/spreadsheet.d.ts +724 -0
- package/dist/spreadsheet.js +67 -0
- package/dist/spreadsheet.js.map +1 -0
- package/package.json +129 -0
- package/src/bounded-zip.ts +450 -0
- package/src/document-docx-api.ts +64 -0
- package/src/document-docx-codec.ts +2253 -0
- package/src/document-docx-import.ts +3814 -0
- package/src/document-docx-packer.ts +72 -0
- package/src/document-docx-state.ts +59 -0
- package/src/document-render.ts +615 -0
- package/src/document.ts +2800 -0
- package/src/errors.ts +45 -0
- package/src/file-blob.ts +43 -0
- package/src/index.ts +4 -0
- package/src/inspection.ts +50 -0
- package/src/kernel.ts +525 -0
- package/src/materializer-cli-entry.ts +11 -0
- package/src/materializer-cli.ts +743 -0
- package/src/native-raster.ts +141 -0
- package/src/native.ts +390 -0
- package/src/office-import.ts +243 -0
- package/src/presentation-pptx-api.ts +107 -0
- package/src/presentation-pptx-import.ts +2065 -0
- package/src/presentation-pptx-state-digest.ts +46 -0
- package/src/presentation-pptx-state.ts +18 -0
- package/src/presentation-pptx-xml.ts +473 -0
- package/src/presentation-pptx.ts +447 -0
- package/src/presentation-render.ts +532 -0
- package/src/presentation.ts +2599 -0
- package/src/production-composite.ts +805 -0
- package/src/production-document.ts +2 -0
- package/src/production-native-codecs.ts +1141 -0
- package/src/production-presentation.ts +2 -0
- package/src/production-sha256.ts +150 -0
- package/src/production-spreadsheet-native.ts +686 -0
- package/src/production-spreadsheet.ts +2 -0
- package/src/production.ts +1022 -0
- package/src/raster-image.ts +586 -0
- package/src/reference.ts +17 -0
- package/src/runtime-cli-entry.ts +13 -0
- package/src/runtime-cli.ts +670 -0
- package/src/runtime-development.ts +689 -0
- package/src/runtime-receipt.ts +169 -0
- package/src/runtime.ts +1463 -0
- package/src/snapshot.ts +88 -0
- package/src/spreadsheet-address.ts +90 -0
- package/src/spreadsheet-file.ts +71 -0
- package/src/spreadsheet-formula.ts +1212 -0
- package/src/spreadsheet-image.ts +242 -0
- package/src/spreadsheet-render.ts +985 -0
- package/src/spreadsheet-types.ts +171 -0
- package/src/spreadsheet-xlsx-api.ts +123 -0
- package/src/spreadsheet-xlsx-codec.ts +3063 -0
- package/src/spreadsheet-xlsx-state.ts +191 -0
- package/src/spreadsheet.ts +5195 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export type HelpEntry = Record<string, unknown> & {
|
|
2
|
+
path: string;
|
|
3
|
+
summary: string;
|
|
4
|
+
examples: string[];
|
|
5
|
+
};
|
|
6
|
+
export declare function defineHelpEntries(entries: readonly (readonly [path: string, summary: string, ...examples: string[]])[]): HelpEntry[];
|
|
7
|
+
export declare function filterHelpEntries(entries: readonly HelpEntry[], query: string, search?: string, stripQueryPrefix?: string): HelpEntry[];
|
|
8
|
+
export declare function boundInspectionRecords(records: readonly Record<string, unknown>[], maxChars: number): {
|
|
9
|
+
records: Record<string, unknown>[];
|
|
10
|
+
ndjson: string;
|
|
11
|
+
truncated: boolean;
|
|
12
|
+
};
|
package/dist/kernel.d.ts
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { FileBlob } from "./file-blob.js";
|
|
2
|
+
export type ArtifactModality = "spreadsheet" | "presentation" | "document";
|
|
3
|
+
export type ArtifactKernelKind = "native" | "wasm" | "reference";
|
|
4
|
+
export type ArtifactObjectId = string & {
|
|
5
|
+
readonly __artifactObjectId: unique symbol;
|
|
6
|
+
};
|
|
7
|
+
export type ArtifactKernelCapabilities = {
|
|
8
|
+
modality: ArtifactModality;
|
|
9
|
+
modelSchemaVersion: number;
|
|
10
|
+
operationSchemaVersion: number;
|
|
11
|
+
inspect: boolean;
|
|
12
|
+
calculate: boolean;
|
|
13
|
+
layout: boolean;
|
|
14
|
+
renderFormats: readonly string[];
|
|
15
|
+
importFormats: readonly string[];
|
|
16
|
+
exportFormats: readonly string[];
|
|
17
|
+
collaboration: boolean;
|
|
18
|
+
};
|
|
19
|
+
export type ArtifactCausalVector = Readonly<Record<string, number>>;
|
|
20
|
+
export type ArtifactCommand = {
|
|
21
|
+
code: string;
|
|
22
|
+
targetId?: string;
|
|
23
|
+
precondition?: {
|
|
24
|
+
objectRevision?: number;
|
|
25
|
+
exists?: boolean;
|
|
26
|
+
};
|
|
27
|
+
payload?: unknown;
|
|
28
|
+
};
|
|
29
|
+
export type ArtifactCommandBatch = {
|
|
30
|
+
schemaVersion: 1;
|
|
31
|
+
artifactId: string;
|
|
32
|
+
modality: ArtifactModality;
|
|
33
|
+
transactionId: string;
|
|
34
|
+
actorId: string;
|
|
35
|
+
baseSequence: number;
|
|
36
|
+
baseVector: ArtifactCausalVector;
|
|
37
|
+
commands: readonly ArtifactCommand[];
|
|
38
|
+
};
|
|
39
|
+
export type ArtifactApplyResult = {
|
|
40
|
+
sequence: number;
|
|
41
|
+
vector: ArtifactCausalVector;
|
|
42
|
+
changedObjectIds: readonly string[];
|
|
43
|
+
inverse?: ArtifactCommandBatch;
|
|
44
|
+
};
|
|
45
|
+
export type ArtifactKernelOpenInput = {
|
|
46
|
+
modality: ArtifactModality;
|
|
47
|
+
snapshot?: Uint8Array;
|
|
48
|
+
operationTail?: readonly Uint8Array[];
|
|
49
|
+
};
|
|
50
|
+
export type ArtifactKernelDocument = {
|
|
51
|
+
readonly modality: ArtifactModality;
|
|
52
|
+
readonly revision: number;
|
|
53
|
+
apply(batch: ArtifactCommandBatch): ArtifactApplyResult;
|
|
54
|
+
snapshot(): Uint8Array;
|
|
55
|
+
inspect(options: Record<string, unknown>): Promise<readonly Record<string, unknown>[]>;
|
|
56
|
+
render(options: Record<string, unknown>): Promise<FileBlob>;
|
|
57
|
+
materialize(format: string, options?: Record<string, unknown>): Promise<FileBlob>;
|
|
58
|
+
close(): void;
|
|
59
|
+
};
|
|
60
|
+
export interface ArtifactKernel {
|
|
61
|
+
readonly kind: ArtifactKernelKind;
|
|
62
|
+
readonly version: string;
|
|
63
|
+
capabilities(modality: ArtifactModality): ArtifactKernelCapabilities;
|
|
64
|
+
open(input: ArtifactKernelOpenInput): Promise<ArtifactKernelDocument>;
|
|
65
|
+
}
|
|
66
|
+
export type ArtifactKernelSelection = {
|
|
67
|
+
kernel: ArtifactKernel;
|
|
68
|
+
capabilities: ArtifactKernelCapabilities;
|
|
69
|
+
};
|
|
70
|
+
/**
|
|
71
|
+
* Kernel registry used by the universal facade. Hosts register loaders without
|
|
72
|
+
* making application code depend on platform packages. Production selection is
|
|
73
|
+
* deliberately fail-closed: Node/Bun selects only native. Browser editing goes
|
|
74
|
+
* through the SDK's dedicated Worker/WASM session, and the reference backend is
|
|
75
|
+
* selected only when a development/conformance caller explicitly asks for it.
|
|
76
|
+
*/
|
|
77
|
+
export declare class ArtifactKernelRegistry {
|
|
78
|
+
private readonly kernels;
|
|
79
|
+
register(kernel: ArtifactKernel): () => void;
|
|
80
|
+
select(modality: ArtifactModality, required?: Partial<Pick<ArtifactKernelCapabilities, "calculate" | "layout" | "collaboration">>, order?: readonly ArtifactKernelKind[]): ArtifactKernelSelection;
|
|
81
|
+
available(): readonly ArtifactKernel[];
|
|
82
|
+
}
|
|
83
|
+
export declare const ARTIFACT_OPERATION_MAX_BYTES: number;
|
|
84
|
+
export declare const ARTIFACT_OPERATION_MAX_COMMANDS = 10000;
|
|
85
|
+
export declare const ARTIFACT_OPERATION_MAX_VECTOR_ACTORS = 1024;
|
|
86
|
+
export declare const ARTIFACT_OPERATION_MAX_STRING_BYTES: number;
|
|
87
|
+
export declare const ARTIFACT_OPERATION_MAX_JSON_DEPTH = 64;
|
|
88
|
+
export declare const ARTIFACT_OPERATION_MAX_JSON_NODES = 100000;
|
|
89
|
+
/**
|
|
90
|
+
* Deterministic codec retained only for historical TypeScript conformance
|
|
91
|
+
* fixtures.
|
|
92
|
+
*
|
|
93
|
+
* @deprecated OGAR duplicates authored identity/causality and must never be
|
|
94
|
+
* persisted, submitted, or lowered by a production runtime. Use the canonical
|
|
95
|
+
* OGATX001 envelope with an identity-free OGASC001 command payload from
|
|
96
|
+
* `@opengeni/contracts/editable-artifacts`.
|
|
97
|
+
*/
|
|
98
|
+
export declare const ArtifactCommandBatchCodec: {
|
|
99
|
+
encode(batch: ArtifactCommandBatch): Uint8Array;
|
|
100
|
+
decode(bytes: Uint8Array): ArtifactCommandBatch;
|
|
101
|
+
};
|