@opengeni/artifact-kernel-wasm-spreadsheet 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 ADDED
@@ -0,0 +1,190 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ Copyright 2026 Cloudgeni-ai
179
+
180
+ Licensed under the Apache License, Version 2.0 (the "License");
181
+ you may not use this file except in compliance with the License.
182
+ You may obtain a copy of the License at
183
+
184
+ http://www.apache.org/licenses/LICENSE-2.0
185
+
186
+ Unless required by applicable law or agreed to in writing, software
187
+ distributed under the License is distributed on an "AS IS" BASIS,
188
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
189
+ See the License for the specific language governing permissions and
190
+ limitations under the License.
package/README.md ADDED
@@ -0,0 +1,12 @@
1
+ # `@opengeni/artifact-kernel-wasm-spreadsheet`
2
+
3
+ Exact, capability-scoped WebAssembly runtime for the OpenGeni spreadsheet editor.
4
+ It is generated from the safe Rust artifact kernel and loaded only in the SDK's
5
+ dedicated module Worker. It performs no runtime download or version discovery.
6
+
7
+ ```ts
8
+ import { editableArtifactKernelRuntime } from "@opengeni/artifact-kernel-wasm-spreadsheet";
9
+ ```
10
+
11
+ Pass the runtime into `@opengeni/sdk/editable-artifacts`; the Worker verifies
12
+ its exact build/protocol/model/command identity before loading artifact state.
@@ -0,0 +1,60 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "runtimeIdentity": {
4
+ "schemaVersion": 1,
5
+ "target": "wasm-web",
6
+ "modality": "spreadsheet",
7
+ "packageName": "@opengeni/artifact-kernel-wasm-spreadsheet",
8
+ "packageVersion": "0.2.2",
9
+ "artifactToolVersion": "0.2.2",
10
+ "buildIdentity": "opengeni-artifact-kernel/0.1.0;abi=1;command=1;query=1;snapshot=1;document-snapshot=1;document-command=1;document-query=1;presentation-snapshot=1;presentation-command=1;presentation-query=1;text-layout-fonts=1;text-layout-request=1;text-layout-response=1;render-tile=1;render-patch=1;source=a9194d659991a0910e6f9f47510670b2857b927c2a1b818b13cf480521a986dd;toolchain=1367261bf04dd2fc4b2c6aa0ef397c21659ee1c973a9d98dcb8d84b46d68b06f",
11
+ "kernelVersion": "opengeni-artifact-kernel/0.1.0;abi=1;command=1;query=1;snapshot=1;document-snapshot=1;document-command=1;document-query=1;presentation-snapshot=1;presentation-command=1;presentation-query=1;text-layout-fonts=1;text-layout-request=1;text-layout-response=1;render-tile=1;render-patch=1;source=a9194d659991a0910e6f9f47510670b2857b927c2a1b818b13cf480521a986dd;toolchain=1367261bf04dd2fc4b2c6aa0ef397c21659ee1c973a9d98dcb8d84b46d68b06f",
12
+ "abiVersion": 1,
13
+ "protocolVersion": 1,
14
+ "modelSchemaVersion": 1,
15
+ "commandVersion": 1
16
+ },
17
+ "capabilities": {
18
+ "bytes": 1860,
19
+ "sha256": "sha256:2cf756ab9078f337b58f299f1ebd79512540b4e44234482c52b56a9231039903"
20
+ },
21
+ "sizeBudget": {
22
+ "wasmBytes": 786432,
23
+ "wasmGzipBytes": 245760,
24
+ "glueBytes": 32768
25
+ },
26
+ "files": [
27
+ {
28
+ "path": "artifact_kernel_spreadsheet_bg.wasm",
29
+ "bytes": 644645,
30
+ "sha256": "sha256:7284d5161966ae59170a2a738f81c50cb8e455ad55953b032e706443314bd84b",
31
+ "gzipBytes": 205911
32
+ },
33
+ {
34
+ "path": "artifact_kernel_spreadsheet_bg.wasm.d.ts",
35
+ "bytes": 1738,
36
+ "sha256": "sha256:173077b78f0f6d2c8a18a3bdf60acbfb2b99e28c894c9fe1193658c8a22625de"
37
+ },
38
+ {
39
+ "path": "artifact_kernel_spreadsheet.d.ts",
40
+ "bytes": 5125,
41
+ "sha256": "sha256:ccaed56b6a80551a55fc73410f0022a75e238f1c9650b63c331b861ceaa82076"
42
+ },
43
+ {
44
+ "path": "artifact_kernel_spreadsheet.js",
45
+ "bytes": 19333,
46
+ "sha256": "sha256:473ddbd6869475a33e30b395055c41a7f36f7153ccb035c0de037106d96359ce",
47
+ "gzipBytes": 3529
48
+ },
49
+ {
50
+ "path": "index.d.ts",
51
+ "bytes": 2304,
52
+ "sha256": "sha256:70eed3f182f3f2511e27eacfcb5782daa6769c6165d4eb2d0b9b960f5859bf19"
53
+ },
54
+ {
55
+ "path": "index.js",
56
+ "bytes": 2261,
57
+ "sha256": "sha256:1d2a0664d15884f58f184217c37fdab762c8933a4878d76eb61b17c79ac4b99c"
58
+ }
59
+ ]
60
+ }
@@ -0,0 +1,132 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+
4
+ /**
5
+ * Stateful authoritative collaboration/CRDT kernel handle.
6
+ */
7
+ export class ArtifactCollaborationSession {
8
+ private constructor();
9
+ free(): void;
10
+ [Symbol.dispose](): void;
11
+ /**
12
+ * Replays one whole canonical committed transaction atomically.
13
+ */
14
+ applyCommitted(operation_envelope: Uint8Array): void;
15
+ /**
16
+ * Authors and applies one canonical OGATX001 transaction.
17
+ */
18
+ authorTransaction(intent_bytes: Uint8Array, resolved_base: Uint8Array): Uint8Array;
19
+ /**
20
+ * Releases the in-memory collaboration state.
21
+ */
22
+ close(): void;
23
+ /**
24
+ * Creates an empty CRDT workbook from a canonical namespace envelope.
25
+ */
26
+ static create(namespace_envelope: Uint8Array): ArtifactCollaborationSession;
27
+ /**
28
+ * Idempotent lifecycle alias for `close()`.
29
+ */
30
+ dispose(): void;
31
+ /**
32
+ * Creates an independent in-memory collaboration branch.
33
+ */
34
+ fork(): ArtifactCollaborationSession;
35
+ /**
36
+ * Returns the canonical OGACF001 causal frontier.
37
+ */
38
+ frontier(): Uint8Array;
39
+ /**
40
+ * Reports whether the collaboration state has been released.
41
+ */
42
+ isClosed(): boolean;
43
+ /**
44
+ * Opens one canonical OGACRD01 full-state snapshot.
45
+ */
46
+ static open(snapshot: Uint8Array): ArtifactCollaborationSession;
47
+ /**
48
+ * Executes one bounded viewport or workbook-metadata projection.
49
+ */
50
+ query(query_envelope: Uint8Array): Uint8Array;
51
+ /**
52
+ * Returns the materialized workbook revision as a JavaScript `bigint`.
53
+ */
54
+ revision(): bigint;
55
+ /**
56
+ * Returns the full canonical OGACRD01 snapshot.
57
+ */
58
+ snapshot(): Uint8Array;
59
+ /**
60
+ * Returns SHA-256 of the exact canonical OGACRD01 snapshot.
61
+ */
62
+ stateHash(): string;
63
+ }
64
+
65
+ /**
66
+ * Returns the canonical encoded build-identity envelope.
67
+ *
68
+ * The identity lets loaders fail closed when the operation protocol, snapshot
69
+ * schema, or kernel implementation is incompatible.
70
+ */
71
+ export function buildIdentity(): Uint8Array;
72
+
73
+ /**
74
+ * Strictly validates and re-encodes a full OGACRD01 collaboration snapshot.
75
+ */
76
+ export function canonicalizeCollaborationSnapshot(snapshot: Uint8Array): Uint8Array;
77
+
78
+ /**
79
+ * Returns the canonical encoded capability envelope.
80
+ *
81
+ * JavaScript receives a fresh `Uint8Array`; callers may mutate it without
82
+ * affecting subsequent calls.
83
+ */
84
+ export function capabilities(): Uint8Array;
85
+
86
+ export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
87
+
88
+ export interface InitOutput {
89
+ readonly memory: WebAssembly.Memory;
90
+ readonly __wbg_artifactcollaborationsession_free: (a: number, b: number) => void;
91
+ readonly artifactcollaborationsession_applyCommitted: (a: number, b: number, c: number, d: number) => void;
92
+ readonly artifactcollaborationsession_authorTransaction: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
93
+ readonly artifactcollaborationsession_close: (a: number) => void;
94
+ readonly artifactcollaborationsession_create: (a: number, b: number, c: number) => void;
95
+ readonly artifactcollaborationsession_fork: (a: number, b: number) => void;
96
+ readonly artifactcollaborationsession_frontier: (a: number, b: number) => void;
97
+ readonly artifactcollaborationsession_isClosed: (a: number) => number;
98
+ readonly artifactcollaborationsession_open: (a: number, b: number, c: number) => void;
99
+ readonly artifactcollaborationsession_query: (a: number, b: number, c: number, d: number) => void;
100
+ readonly artifactcollaborationsession_revision: (a: number, b: number) => void;
101
+ readonly artifactcollaborationsession_snapshot: (a: number, b: number) => void;
102
+ readonly artifactcollaborationsession_stateHash: (a: number, b: number) => void;
103
+ readonly buildIdentity: (a: number) => void;
104
+ readonly canonicalizeCollaborationSnapshot: (a: number, b: number, c: number) => void;
105
+ readonly capabilities: (a: number) => void;
106
+ readonly artifactcollaborationsession_dispose: (a: number) => void;
107
+ readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
108
+ readonly __wbindgen_export: (a: number, b: number) => number;
109
+ readonly __wbindgen_export2: (a: number, b: number, c: number) => void;
110
+ }
111
+
112
+ export type SyncInitInput = BufferSource | WebAssembly.Module;
113
+
114
+ /**
115
+ * Instantiates the given `module`, which can either be bytes or
116
+ * a precompiled `WebAssembly.Module`.
117
+ *
118
+ * @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated.
119
+ *
120
+ * @returns {InitOutput}
121
+ */
122
+ export function initSync(module: { module: SyncInitInput } | SyncInitInput): InitOutput;
123
+
124
+ /**
125
+ * If `module_or_path` is {RequestInfo} or {URL}, makes a request and
126
+ * for everything else, calls `WebAssembly.instantiate` directly.
127
+ *
128
+ * @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated.
129
+ *
130
+ * @returns {Promise<InitOutput>}
131
+ */
132
+ export default function __wbg_init (module_or_path?: { module_or_path: InitInput | Promise<InitInput> } | InitInput | Promise<InitInput>): Promise<InitOutput>;
@@ -0,0 +1,531 @@
1
+ /* @ts-self-types="./artifact_kernel_spreadsheet.d.ts" */
2
+
3
+ /**
4
+ * Stateful authoritative collaboration/CRDT kernel handle.
5
+ */
6
+ export class ArtifactCollaborationSession {
7
+ static __wrap(ptr) {
8
+ const obj = Object.create(ArtifactCollaborationSession.prototype);
9
+ obj.__wbg_ptr = ptr;
10
+ ArtifactCollaborationSessionFinalization.register(obj, obj.__wbg_ptr, obj);
11
+ return obj;
12
+ }
13
+ __destroy_into_raw() {
14
+ const ptr = this.__wbg_ptr;
15
+ this.__wbg_ptr = 0;
16
+ ArtifactCollaborationSessionFinalization.unregister(this);
17
+ return ptr;
18
+ }
19
+ free() {
20
+ const ptr = this.__destroy_into_raw();
21
+ wasm.__wbg_artifactcollaborationsession_free(ptr, 0);
22
+ }
23
+ /**
24
+ * Replays one whole canonical committed transaction atomically.
25
+ * @param {Uint8Array} operation_envelope
26
+ */
27
+ applyCommitted(operation_envelope) {
28
+ try {
29
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
30
+ const ptr0 = passArray8ToWasm0(operation_envelope, wasm.__wbindgen_export);
31
+ const len0 = WASM_VECTOR_LEN;
32
+ wasm.artifactcollaborationsession_applyCommitted(retptr, this.__wbg_ptr, ptr0, len0);
33
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
34
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
35
+ if (r1) {
36
+ throw takeObject(r0);
37
+ }
38
+ } finally {
39
+ wasm.__wbindgen_add_to_stack_pointer(16);
40
+ }
41
+ }
42
+ /**
43
+ * Authors and applies one canonical OGATX001 transaction.
44
+ * @param {Uint8Array} intent_bytes
45
+ * @param {Uint8Array} resolved_base
46
+ * @returns {Uint8Array}
47
+ */
48
+ authorTransaction(intent_bytes, resolved_base) {
49
+ try {
50
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
51
+ const ptr0 = passArray8ToWasm0(intent_bytes, wasm.__wbindgen_export);
52
+ const len0 = WASM_VECTOR_LEN;
53
+ const ptr1 = passArray8ToWasm0(resolved_base, wasm.__wbindgen_export);
54
+ const len1 = WASM_VECTOR_LEN;
55
+ wasm.artifactcollaborationsession_authorTransaction(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1);
56
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
57
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
58
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
59
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
60
+ if (r3) {
61
+ throw takeObject(r2);
62
+ }
63
+ var v3 = getArrayU8FromWasm0(r0, r1).slice();
64
+ wasm.__wbindgen_export2(r0, r1 * 1, 1);
65
+ return v3;
66
+ } finally {
67
+ wasm.__wbindgen_add_to_stack_pointer(16);
68
+ }
69
+ }
70
+ /**
71
+ * Releases the in-memory collaboration state.
72
+ */
73
+ close() {
74
+ wasm.artifactcollaborationsession_close(this.__wbg_ptr);
75
+ }
76
+ /**
77
+ * Creates an empty CRDT workbook from a canonical namespace envelope.
78
+ * @param {Uint8Array} namespace_envelope
79
+ * @returns {ArtifactCollaborationSession}
80
+ */
81
+ static create(namespace_envelope) {
82
+ try {
83
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
84
+ const ptr0 = passArray8ToWasm0(namespace_envelope, wasm.__wbindgen_export);
85
+ const len0 = WASM_VECTOR_LEN;
86
+ wasm.artifactcollaborationsession_create(retptr, ptr0, len0);
87
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
88
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
89
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
90
+ if (r2) {
91
+ throw takeObject(r1);
92
+ }
93
+ return ArtifactCollaborationSession.__wrap(r0);
94
+ } finally {
95
+ wasm.__wbindgen_add_to_stack_pointer(16);
96
+ }
97
+ }
98
+ /**
99
+ * Idempotent lifecycle alias for `close()`.
100
+ */
101
+ dispose() {
102
+ wasm.artifactcollaborationsession_dispose(this.__wbg_ptr);
103
+ }
104
+ /**
105
+ * Creates an independent in-memory collaboration branch.
106
+ * @returns {ArtifactCollaborationSession}
107
+ */
108
+ fork() {
109
+ try {
110
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
111
+ wasm.artifactcollaborationsession_fork(retptr, this.__wbg_ptr);
112
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
113
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
114
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
115
+ if (r2) {
116
+ throw takeObject(r1);
117
+ }
118
+ return ArtifactCollaborationSession.__wrap(r0);
119
+ } finally {
120
+ wasm.__wbindgen_add_to_stack_pointer(16);
121
+ }
122
+ }
123
+ /**
124
+ * Returns the canonical OGACF001 causal frontier.
125
+ * @returns {Uint8Array}
126
+ */
127
+ frontier() {
128
+ try {
129
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
130
+ wasm.artifactcollaborationsession_frontier(retptr, this.__wbg_ptr);
131
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
132
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
133
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
134
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
135
+ if (r3) {
136
+ throw takeObject(r2);
137
+ }
138
+ var v1 = getArrayU8FromWasm0(r0, r1).slice();
139
+ wasm.__wbindgen_export2(r0, r1 * 1, 1);
140
+ return v1;
141
+ } finally {
142
+ wasm.__wbindgen_add_to_stack_pointer(16);
143
+ }
144
+ }
145
+ /**
146
+ * Reports whether the collaboration state has been released.
147
+ * @returns {boolean}
148
+ */
149
+ isClosed() {
150
+ const ret = wasm.artifactcollaborationsession_isClosed(this.__wbg_ptr);
151
+ return ret !== 0;
152
+ }
153
+ /**
154
+ * Opens one canonical OGACRD01 full-state snapshot.
155
+ * @param {Uint8Array} snapshot
156
+ * @returns {ArtifactCollaborationSession}
157
+ */
158
+ static open(snapshot) {
159
+ try {
160
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
161
+ const ptr0 = passArray8ToWasm0(snapshot, wasm.__wbindgen_export);
162
+ const len0 = WASM_VECTOR_LEN;
163
+ wasm.artifactcollaborationsession_open(retptr, ptr0, len0);
164
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
165
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
166
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
167
+ if (r2) {
168
+ throw takeObject(r1);
169
+ }
170
+ return ArtifactCollaborationSession.__wrap(r0);
171
+ } finally {
172
+ wasm.__wbindgen_add_to_stack_pointer(16);
173
+ }
174
+ }
175
+ /**
176
+ * Executes one bounded viewport or workbook-metadata projection.
177
+ * @param {Uint8Array} query_envelope
178
+ * @returns {Uint8Array}
179
+ */
180
+ query(query_envelope) {
181
+ try {
182
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
183
+ const ptr0 = passArray8ToWasm0(query_envelope, wasm.__wbindgen_export);
184
+ const len0 = WASM_VECTOR_LEN;
185
+ wasm.artifactcollaborationsession_query(retptr, this.__wbg_ptr, ptr0, len0);
186
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
187
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
188
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
189
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
190
+ if (r3) {
191
+ throw takeObject(r2);
192
+ }
193
+ var v2 = getArrayU8FromWasm0(r0, r1).slice();
194
+ wasm.__wbindgen_export2(r0, r1 * 1, 1);
195
+ return v2;
196
+ } finally {
197
+ wasm.__wbindgen_add_to_stack_pointer(16);
198
+ }
199
+ }
200
+ /**
201
+ * Returns the materialized workbook revision as a JavaScript `bigint`.
202
+ * @returns {bigint}
203
+ */
204
+ revision() {
205
+ try {
206
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
207
+ wasm.artifactcollaborationsession_revision(retptr, this.__wbg_ptr);
208
+ var r0 = getDataViewMemory0().getBigInt64(retptr + 8 * 0, true);
209
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
210
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
211
+ if (r3) {
212
+ throw takeObject(r2);
213
+ }
214
+ return BigInt.asUintN(64, r0);
215
+ } finally {
216
+ wasm.__wbindgen_add_to_stack_pointer(16);
217
+ }
218
+ }
219
+ /**
220
+ * Returns the full canonical OGACRD01 snapshot.
221
+ * @returns {Uint8Array}
222
+ */
223
+ snapshot() {
224
+ try {
225
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
226
+ wasm.artifactcollaborationsession_snapshot(retptr, this.__wbg_ptr);
227
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
228
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
229
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
230
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
231
+ if (r3) {
232
+ throw takeObject(r2);
233
+ }
234
+ var v1 = getArrayU8FromWasm0(r0, r1).slice();
235
+ wasm.__wbindgen_export2(r0, r1 * 1, 1);
236
+ return v1;
237
+ } finally {
238
+ wasm.__wbindgen_add_to_stack_pointer(16);
239
+ }
240
+ }
241
+ /**
242
+ * Returns SHA-256 of the exact canonical OGACRD01 snapshot.
243
+ * @returns {string}
244
+ */
245
+ stateHash() {
246
+ let deferred2_0;
247
+ let deferred2_1;
248
+ try {
249
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
250
+ wasm.artifactcollaborationsession_stateHash(retptr, this.__wbg_ptr);
251
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
252
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
253
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
254
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
255
+ var ptr1 = r0;
256
+ var len1 = r1;
257
+ if (r3) {
258
+ ptr1 = 0; len1 = 0;
259
+ throw takeObject(r2);
260
+ }
261
+ deferred2_0 = ptr1;
262
+ deferred2_1 = len1;
263
+ return getStringFromWasm0(ptr1, len1);
264
+ } finally {
265
+ wasm.__wbindgen_add_to_stack_pointer(16);
266
+ wasm.__wbindgen_export2(deferred2_0, deferred2_1, 1);
267
+ }
268
+ }
269
+ }
270
+ if (Symbol.dispose) ArtifactCollaborationSession.prototype[Symbol.dispose] = ArtifactCollaborationSession.prototype.free;
271
+
272
+ /**
273
+ * Returns the canonical encoded build-identity envelope.
274
+ *
275
+ * The identity lets loaders fail closed when the operation protocol, snapshot
276
+ * schema, or kernel implementation is incompatible.
277
+ * @returns {Uint8Array}
278
+ */
279
+ export function buildIdentity() {
280
+ try {
281
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
282
+ wasm.buildIdentity(retptr);
283
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
284
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
285
+ var v1 = getArrayU8FromWasm0(r0, r1).slice();
286
+ wasm.__wbindgen_export2(r0, r1 * 1, 1);
287
+ return v1;
288
+ } finally {
289
+ wasm.__wbindgen_add_to_stack_pointer(16);
290
+ }
291
+ }
292
+
293
+ /**
294
+ * Strictly validates and re-encodes a full OGACRD01 collaboration snapshot.
295
+ * @param {Uint8Array} snapshot
296
+ * @returns {Uint8Array}
297
+ */
298
+ export function canonicalizeCollaborationSnapshot(snapshot) {
299
+ try {
300
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
301
+ const ptr0 = passArray8ToWasm0(snapshot, wasm.__wbindgen_export);
302
+ const len0 = WASM_VECTOR_LEN;
303
+ wasm.canonicalizeCollaborationSnapshot(retptr, ptr0, len0);
304
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
305
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
306
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
307
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
308
+ if (r3) {
309
+ throw takeObject(r2);
310
+ }
311
+ var v2 = getArrayU8FromWasm0(r0, r1).slice();
312
+ wasm.__wbindgen_export2(r0, r1 * 1, 1);
313
+ return v2;
314
+ } finally {
315
+ wasm.__wbindgen_add_to_stack_pointer(16);
316
+ }
317
+ }
318
+
319
+ /**
320
+ * Returns the canonical encoded capability envelope.
321
+ *
322
+ * JavaScript receives a fresh `Uint8Array`; callers may mutate it without
323
+ * affecting subsequent calls.
324
+ * @returns {Uint8Array}
325
+ */
326
+ export function capabilities() {
327
+ try {
328
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
329
+ wasm.capabilities(retptr);
330
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
331
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
332
+ var v1 = getArrayU8FromWasm0(r0, r1).slice();
333
+ wasm.__wbindgen_export2(r0, r1 * 1, 1);
334
+ return v1;
335
+ } finally {
336
+ wasm.__wbindgen_add_to_stack_pointer(16);
337
+ }
338
+ }
339
+ function __wbg_get_imports() {
340
+ const import0 = {
341
+ __proto__: null,
342
+ __wbg_Error_408e67f47ca7b58b: function(arg0, arg1) {
343
+ const ret = Error(getStringFromWasm0(arg0, arg1));
344
+ return addHeapObject(ret);
345
+ },
346
+ __wbg___wbindgen_throw_bb96b2010945f0bc: function(arg0, arg1) {
347
+ throw new Error(getStringFromWasm0(arg0, arg1));
348
+ },
349
+ };
350
+ return {
351
+ __proto__: null,
352
+ "./artifact_kernel_spreadsheet_bg.js": import0,
353
+ };
354
+ }
355
+
356
+ const ArtifactCollaborationSessionFinalization = (typeof FinalizationRegistry === 'undefined')
357
+ ? { register: () => {}, unregister: () => {} }
358
+ : new FinalizationRegistry(ptr => wasm.__wbg_artifactcollaborationsession_free(ptr, 1));
359
+
360
+ function addHeapObject(obj) {
361
+ if (heap_next === heap.length) heap.push(heap.length + 1);
362
+ const idx = heap_next;
363
+ heap_next = heap[idx];
364
+
365
+ heap[idx] = obj;
366
+ return idx;
367
+ }
368
+
369
+ function dropObject(idx) {
370
+ if (idx < 1028) return;
371
+ heap[idx] = heap_next;
372
+ heap_next = idx;
373
+ }
374
+
375
+ function getArrayU8FromWasm0(ptr, len) {
376
+ ptr = ptr >>> 0;
377
+ return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
378
+ }
379
+
380
+ let cachedDataViewMemory0 = null;
381
+ function getDataViewMemory0() {
382
+ if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
383
+ cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
384
+ }
385
+ return cachedDataViewMemory0;
386
+ }
387
+
388
+ function getStringFromWasm0(ptr, len) {
389
+ return decodeText(ptr >>> 0, len);
390
+ }
391
+
392
+ let cachedUint8ArrayMemory0 = null;
393
+ function getUint8ArrayMemory0() {
394
+ if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
395
+ cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
396
+ }
397
+ return cachedUint8ArrayMemory0;
398
+ }
399
+
400
+ function getObject(idx) { return heap[idx]; }
401
+
402
+ let heap = new Array(1024).fill(undefined);
403
+ heap.push(undefined, null, true, false);
404
+
405
+ let heap_next = heap.length;
406
+
407
+ function passArray8ToWasm0(arg, malloc) {
408
+ const ptr = malloc(arg.length * 1, 1) >>> 0;
409
+ getUint8ArrayMemory0().set(arg, ptr / 1);
410
+ WASM_VECTOR_LEN = arg.length;
411
+ return ptr;
412
+ }
413
+
414
+ function takeObject(idx) {
415
+ const ret = getObject(idx);
416
+ dropObject(idx);
417
+ return ret;
418
+ }
419
+
420
+ let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
421
+ cachedTextDecoder.decode();
422
+ const MAX_SAFARI_DECODE_BYTES = 2146435072;
423
+ let numBytesDecoded = 0;
424
+ function decodeText(ptr, len) {
425
+ numBytesDecoded += len;
426
+ if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
427
+ cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
428
+ cachedTextDecoder.decode();
429
+ numBytesDecoded = len;
430
+ }
431
+ return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
432
+ }
433
+
434
+ let WASM_VECTOR_LEN = 0;
435
+
436
+ let wasmModule, wasmInstance, wasm;
437
+ function __wbg_finalize_init(instance, module) {
438
+ wasmInstance = instance;
439
+ wasm = instance.exports;
440
+ wasmModule = module;
441
+ cachedDataViewMemory0 = null;
442
+ cachedUint8ArrayMemory0 = null;
443
+ return wasm;
444
+ }
445
+
446
+ async function __wbg_load(module, imports) {
447
+ if (typeof Response === 'function' && module instanceof Response) {
448
+ if (!module.ok) {
449
+ throw new Error(`failed to fetch Wasm: ${module.status} ${module.statusText} fetching '${module.url}'`);
450
+ }
451
+
452
+ if (typeof WebAssembly.instantiateStreaming === 'function') {
453
+ try {
454
+ return await WebAssembly.instantiateStreaming(module, imports);
455
+ } catch (e) {
456
+ const validResponse = expectedResponseType(module.type);
457
+
458
+ if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') {
459
+ console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", e);
460
+
461
+ } else { throw e; }
462
+ }
463
+ }
464
+
465
+ const bytes = await module.arrayBuffer();
466
+ return await WebAssembly.instantiate(bytes, imports);
467
+ } else {
468
+ const instance = await WebAssembly.instantiate(module, imports);
469
+
470
+ if (instance instanceof WebAssembly.Instance) {
471
+ return { instance, module };
472
+ } else {
473
+ return instance;
474
+ }
475
+ }
476
+
477
+ function expectedResponseType(type) {
478
+ switch (type) {
479
+ case 'basic': case 'cors': case 'default': return true;
480
+ }
481
+ return false;
482
+ }
483
+ }
484
+
485
+ function initSync(module) {
486
+ if (wasm !== undefined) return wasm;
487
+
488
+
489
+ if (module !== undefined) {
490
+ if (Object.getPrototypeOf(module) === Object.prototype) {
491
+ ({module} = module)
492
+ } else {
493
+ console.warn('using deprecated parameters for `initSync()`; pass a single object instead')
494
+ }
495
+ }
496
+
497
+ const imports = __wbg_get_imports();
498
+ if (!(module instanceof WebAssembly.Module)) {
499
+ module = new WebAssembly.Module(module);
500
+ }
501
+ const instance = new WebAssembly.Instance(module, imports);
502
+ return __wbg_finalize_init(instance, module);
503
+ }
504
+
505
+ async function __wbg_init(module_or_path) {
506
+ if (wasm !== undefined) return wasm;
507
+
508
+
509
+ if (module_or_path !== undefined) {
510
+ if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
511
+ ({module_or_path} = module_or_path)
512
+ } else {
513
+ console.warn('using deprecated parameters for the initialization function; pass a single object instead')
514
+ }
515
+ }
516
+
517
+ if (module_or_path === undefined) {
518
+ module_or_path = new URL('artifact_kernel_spreadsheet_bg.wasm', import.meta.url);
519
+ }
520
+ const imports = __wbg_get_imports();
521
+
522
+ if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) {
523
+ module_or_path = fetch(module_or_path);
524
+ }
525
+
526
+ const { instance, module } = await __wbg_load(await module_or_path, imports);
527
+
528
+ return __wbg_finalize_init(instance, module);
529
+ }
530
+
531
+ export { initSync, __wbg_init as default };
@@ -0,0 +1,23 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ export const memory: WebAssembly.Memory;
4
+ export const __wbg_artifactcollaborationsession_free: (a: number, b: number) => void;
5
+ export const artifactcollaborationsession_applyCommitted: (a: number, b: number, c: number, d: number) => void;
6
+ export const artifactcollaborationsession_authorTransaction: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
7
+ export const artifactcollaborationsession_close: (a: number) => void;
8
+ export const artifactcollaborationsession_create: (a: number, b: number, c: number) => void;
9
+ export const artifactcollaborationsession_fork: (a: number, b: number) => void;
10
+ export const artifactcollaborationsession_frontier: (a: number, b: number) => void;
11
+ export const artifactcollaborationsession_isClosed: (a: number) => number;
12
+ export const artifactcollaborationsession_open: (a: number, b: number, c: number) => void;
13
+ export const artifactcollaborationsession_query: (a: number, b: number, c: number, d: number) => void;
14
+ export const artifactcollaborationsession_revision: (a: number, b: number) => void;
15
+ export const artifactcollaborationsession_snapshot: (a: number, b: number) => void;
16
+ export const artifactcollaborationsession_stateHash: (a: number, b: number) => void;
17
+ export const buildIdentity: (a: number) => void;
18
+ export const canonicalizeCollaborationSnapshot: (a: number, b: number, c: number) => void;
19
+ export const capabilities: (a: number) => void;
20
+ export const artifactcollaborationsession_dispose: (a: number) => void;
21
+ export const __wbindgen_add_to_stack_pointer: (a: number) => number;
22
+ export const __wbindgen_export: (a: number, b: number) => number;
23
+ export const __wbindgen_export2: (a: number, b: number, c: number) => void;
@@ -0,0 +1,31 @@
1
+ export type ArtifactKernelRuntimeIdentity = Readonly<{
2
+ schemaVersion: 1;
3
+ target: "wasm-web";
4
+ modality: "spreadsheet";
5
+ packageName: "@opengeni/artifact-kernel-wasm-spreadsheet";
6
+ packageVersion: "0.2.2";
7
+ artifactToolVersion: "0.2.2";
8
+ buildIdentity: "opengeni-artifact-kernel/0.1.0;abi=1;command=1;query=1;snapshot=1;document-snapshot=1;document-command=1;document-query=1;presentation-snapshot=1;presentation-command=1;presentation-query=1;text-layout-fonts=1;text-layout-request=1;text-layout-response=1;render-tile=1;render-patch=1;source=a9194d659991a0910e6f9f47510670b2857b927c2a1b818b13cf480521a986dd;toolchain=1367261bf04dd2fc4b2c6aa0ef397c21659ee1c973a9d98dcb8d84b46d68b06f";
9
+ kernelVersion: "opengeni-artifact-kernel/0.1.0;abi=1;command=1;query=1;snapshot=1;document-snapshot=1;document-command=1;document-query=1;presentation-snapshot=1;presentation-command=1;presentation-query=1;text-layout-fonts=1;text-layout-request=1;text-layout-response=1;render-tile=1;render-patch=1;source=a9194d659991a0910e6f9f47510670b2857b927c2a1b818b13cf480521a986dd;toolchain=1367261bf04dd2fc4b2c6aa0ef397c21659ee1c973a9d98dcb8d84b46d68b06f";
10
+ abiVersion: 1;
11
+ protocolVersion: 1;
12
+ modelSchemaVersion: 1;
13
+ commandVersion: 1;
14
+ }>;
15
+ export declare const artifactKernelRuntimeIdentity: ArtifactKernelRuntimeIdentity;
16
+ export declare const artifactKernelPackageIdentity: ArtifactKernelRuntimeIdentity;
17
+ export declare const editableArtifactKernelAssets: Readonly<{
18
+ modality: "spreadsheet";
19
+ wasmGlueUrl: URL;
20
+ wasmBinaryUrl: URL;
21
+ }>;
22
+ export declare const editableArtifactKernelRuntime: Readonly<{
23
+ modality: "spreadsheet";
24
+ wasmGlueUrl: URL;
25
+ wasmBinaryUrl: URL;
26
+ kernelVersion: "opengeni-artifact-kernel/0.1.0;abi=1;command=1;query=1;snapshot=1;document-snapshot=1;document-command=1;document-query=1;presentation-snapshot=1;presentation-command=1;presentation-query=1;text-layout-fonts=1;text-layout-request=1;text-layout-response=1;render-tile=1;render-patch=1;source=a9194d659991a0910e6f9f47510670b2857b927c2a1b818b13cf480521a986dd;toolchain=1367261bf04dd2fc4b2c6aa0ef397c21659ee1c973a9d98dcb8d84b46d68b06f";
27
+ protocolVersion: 1;
28
+ modelSchemaVersion: 1;
29
+ commandVersion: 1;
30
+ }>;
31
+ export declare function loadArtifactKernelBinding(): Promise<typeof import("./artifact_kernel_spreadsheet.js")>;
package/dist/index.js ADDED
@@ -0,0 +1,23 @@
1
+ export const artifactKernelRuntimeIdentity = Object.freeze({"schemaVersion":1,"target":"wasm-web","modality":"spreadsheet","packageName":"@opengeni/artifact-kernel-wasm-spreadsheet","packageVersion":"0.2.2","artifactToolVersion":"0.2.2","buildIdentity":"opengeni-artifact-kernel/0.1.0;abi=1;command=1;query=1;snapshot=1;document-snapshot=1;document-command=1;document-query=1;presentation-snapshot=1;presentation-command=1;presentation-query=1;text-layout-fonts=1;text-layout-request=1;text-layout-response=1;render-tile=1;render-patch=1;source=a9194d659991a0910e6f9f47510670b2857b927c2a1b818b13cf480521a986dd;toolchain=1367261bf04dd2fc4b2c6aa0ef397c21659ee1c973a9d98dcb8d84b46d68b06f","kernelVersion":"opengeni-artifact-kernel/0.1.0;abi=1;command=1;query=1;snapshot=1;document-snapshot=1;document-command=1;document-query=1;presentation-snapshot=1;presentation-command=1;presentation-query=1;text-layout-fonts=1;text-layout-request=1;text-layout-response=1;render-tile=1;render-patch=1;source=a9194d659991a0910e6f9f47510670b2857b927c2a1b818b13cf480521a986dd;toolchain=1367261bf04dd2fc4b2c6aa0ef397c21659ee1c973a9d98dcb8d84b46d68b06f","abiVersion":1,"protocolVersion":1,"modelSchemaVersion":1,"commandVersion":1});
2
+ export const artifactKernelPackageIdentity = artifactKernelRuntimeIdentity;
3
+ export const editableArtifactKernelAssets = Object.freeze({
4
+ modality: "spreadsheet",
5
+ wasmGlueUrl: new URL("./artifact_kernel_spreadsheet.js", import.meta.url),
6
+ wasmBinaryUrl: new URL("./artifact_kernel_spreadsheet_bg.wasm", import.meta.url),
7
+ });
8
+ export const editableArtifactKernelRuntime = Object.freeze({
9
+ ...editableArtifactKernelAssets,
10
+ kernelVersion: artifactKernelRuntimeIdentity.kernelVersion,
11
+ protocolVersion: artifactKernelRuntimeIdentity.protocolVersion,
12
+ modelSchemaVersion: artifactKernelRuntimeIdentity.modelSchemaVersion,
13
+ commandVersion: artifactKernelRuntimeIdentity.commandVersion,
14
+ });
15
+ let initialization;
16
+ export async function loadArtifactKernelBinding() {
17
+ initialization ??= (async () => {
18
+ const binding = await import(/* @vite-ignore */ editableArtifactKernelAssets.wasmGlueUrl.href);
19
+ await binding.default({ module_or_path: editableArtifactKernelAssets.wasmBinaryUrl });
20
+ return binding;
21
+ })();
22
+ return initialization;
23
+ }
package/package.json ADDED
@@ -0,0 +1,43 @@
1
+ {
2
+ "name": "@opengeni/artifact-kernel-wasm-spreadsheet",
3
+ "version": "0.2.2",
4
+ "description": "Exact lazy WebAssembly runtime for OpenGeni spreadsheet editing.",
5
+ "license": "Apache-2.0",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/Cloudgeni-ai/opengeni.git",
9
+ "directory": "packages/artifact-kernel-wasm-spreadsheet"
10
+ },
11
+ "files": [
12
+ "dist"
13
+ ],
14
+ "type": "module",
15
+ "sideEffects": false,
16
+ "main": "./dist/index.js",
17
+ "module": "./dist/index.js",
18
+ "types": "./dist/index.d.ts",
19
+ "exports": {
20
+ ".": {
21
+ "types": "./dist/index.d.ts",
22
+ "import": "./dist/index.js",
23
+ "default": "./dist/index.js"
24
+ },
25
+ "./runtime-manifest": "./dist/artifact-kernel-runtime.json"
26
+ },
27
+ "publishConfig": {
28
+ "access": "public",
29
+ "provenance": true
30
+ },
31
+ "scripts": {
32
+ "build": "bun ../../scripts/build-artifact-kernel-wasm-packages.ts --modality spreadsheet --asset-root ./dist",
33
+ "prepublishOnly": "bash ../../scripts/prepublish-guard"
34
+ },
35
+ "engines": {
36
+ "node": ">=18"
37
+ },
38
+ "opengeniArtifactKernelAsset": {
39
+ "schemaVersion": 1,
40
+ "target": "wasm-web",
41
+ "modality": "spreadsheet"
42
+ }
43
+ }