@norio-office/rich-text 0.7.0 → 0.8.0
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/README.md +895 -816
- package/dist/ai/bridge.d.ts +335 -0
- package/dist/ai/consume-stream.d.ts +8 -0
- package/dist/ai/executor.d.ts +19 -0
- package/dist/ai/index.d.ts +8 -0
- package/dist/ai/index.js +4106 -0
- package/dist/ai/tools.d.ts +158 -0
- package/dist/ai-protocol/index.d.ts +12 -0
- package/dist/ai-protocol/index.js +2372 -0
- package/dist/ai-protocol/json-schema.d.ts +5 -0
- package/dist/ai-protocol/patch.d.ts +77 -0
- package/dist/ai-protocol/references.d.ts +11 -0
- package/dist/ai-protocol/stream.d.ts +94 -0
- package/dist/ai-protocol/tools.d.ts +8 -0
- package/dist/ai-protocol/validation.d.ts +20 -0
- package/dist/components/RichTextEditor.vue.d.ts +11 -8
- package/dist/components/TextSelectionMenu.vue.d.ts +29 -1
- package/dist/document/ai-identity.d.ts +4 -0
- package/dist/document/nodes/columns-block.d.ts +2 -0
- package/dist/document/nodes/countdown-block.d.ts +2 -0
- package/dist/document/nodes/formula-block.d.ts +2 -0
- package/dist/document/nodes/highlight-block.d.ts +2 -0
- package/dist/document/nodes/image-block.d.ts +8 -0
- package/dist/document/nodes/link-block.d.ts +2 -0
- package/dist/document/nodes/local-file-block.d.ts +2 -0
- package/dist/document/nodes/mention.d.ts +2 -0
- package/dist/document/nodes/office-code-block.d.ts +1 -0
- package/dist/document/nodes/table-cells.d.ts +2 -0
- package/dist/document/nodes/themed-table.d.ts +1 -0
- package/dist/document/nodes/video-block.d.ts +8 -0
- package/dist/document/schema.d.ts +17 -0
- package/dist/extensions/ai-identity.d.ts +1 -0
- package/dist/extensions/columns-block.d.ts +1 -2
- package/dist/extensions/countdown-block.d.ts +1 -2
- package/dist/extensions/formula-block.d.ts +1 -2
- package/dist/extensions/highlight-block.d.ts +1 -2
- package/dist/extensions/image-block.d.ts +4 -8
- package/dist/extensions/link-block.d.ts +1 -2
- package/dist/extensions/local-file-block.d.ts +1 -2
- package/dist/extensions/mention.d.ts +1 -2
- package/dist/extensions/video-block.d.ts +4 -8
- package/dist/{html2canvas-4hiP1s1t.js → html2canvas-BnDzIoab.js} +112 -126
- package/dist/index.js +8272 -7604
- package/dist/index.umd.cjs +2189 -1990
- package/dist/nordox/index.d.ts +95 -0
- package/dist/nordox/index.js +2094 -0
- package/dist/{chunk-C_CI6nMA.js → rolldown-runtime-VHNaYcLd.js} +3 -3
- package/dist/style.css +1 -1
- package/dist/types.d.ts +9 -1
- package/docs/ai/README.md +108 -0
- package/docs/ai/acceptance-report.md +88 -0
- package/docs/ai/capability-matrix.md +43 -0
- package/docs/ai/compatibility.md +9 -0
- package/docs/icons.md +21 -0
- package/examples/ai/browser/App.vue +151 -0
- package/examples/ai/browser/index.html +12 -0
- package/examples/ai/browser/main.ts +5 -0
- package/examples/ai/browser/tsconfig.json +7 -0
- package/examples/ai/browser/vite.config.ts +14 -0
- package/examples/ai/node.mjs +28 -0
- package/package.json +15 -1
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { JSONContent } from '@tiptap/core';
|
|
2
|
+
export declare const NORDOX_FORMAT_VERSION = 1;
|
|
3
|
+
export declare function getNordoxManifestJsonSchema(): Record<string, unknown>;
|
|
4
|
+
export type RichTextAssetPackaging = {
|
|
5
|
+
images?: 'embed' | 'reference';
|
|
6
|
+
videos?: 'embed' | 'reference';
|
|
7
|
+
files?: 'embed' | 'reference';
|
|
8
|
+
};
|
|
9
|
+
export type NordoxResourceKind = 'image' | 'video' | 'file';
|
|
10
|
+
export type NordoxResource = {
|
|
11
|
+
id: string;
|
|
12
|
+
kind: NordoxResourceKind;
|
|
13
|
+
storage: 'embedded' | 'external';
|
|
14
|
+
path?: string;
|
|
15
|
+
source?: string;
|
|
16
|
+
mimeType?: string;
|
|
17
|
+
name?: string;
|
|
18
|
+
byteLength?: number;
|
|
19
|
+
};
|
|
20
|
+
export type NordoxManifest = {
|
|
21
|
+
format: 'nordox';
|
|
22
|
+
formatVersion: 1;
|
|
23
|
+
schemaVersion: string;
|
|
24
|
+
title: string;
|
|
25
|
+
assetPackaging: Required<RichTextAssetPackaging>;
|
|
26
|
+
resources: NordoxResource[];
|
|
27
|
+
};
|
|
28
|
+
export type NordoxResourceRef = {
|
|
29
|
+
id: string;
|
|
30
|
+
kind: NordoxResourceKind;
|
|
31
|
+
source: string;
|
|
32
|
+
mimeType?: string;
|
|
33
|
+
name?: string;
|
|
34
|
+
};
|
|
35
|
+
export type NordoxResourceResolver = {
|
|
36
|
+
readBytes(ref: NordoxResourceRef, options: {
|
|
37
|
+
signal?: AbortSignal;
|
|
38
|
+
maxBytes: number;
|
|
39
|
+
}): Promise<{
|
|
40
|
+
bytes: Uint8Array;
|
|
41
|
+
mimeType?: string;
|
|
42
|
+
name?: string;
|
|
43
|
+
}>;
|
|
44
|
+
resolveReference?(ref: NordoxResourceRef): Promise<string> | string;
|
|
45
|
+
};
|
|
46
|
+
export type NordoxLimits = {
|
|
47
|
+
maxArchiveBytes: number;
|
|
48
|
+
maxEntries: number;
|
|
49
|
+
maxResourceBytes: number;
|
|
50
|
+
maxUncompressedBytes: number;
|
|
51
|
+
maxCompressionRatio: number;
|
|
52
|
+
};
|
|
53
|
+
export declare const DEFAULT_NORDOX_LIMITS: NordoxLimits;
|
|
54
|
+
export type NordoxErrorCode = 'INVALID_NORDOX_PACKAGE' | 'NORDOX_VERSION_UNSUPPORTED' | 'NORDOX_RESOURCE_MISSING' | 'NORDOX_LIMIT_EXCEEDED' | 'ASSET_REFERENCE_NOT_PERSISTABLE' | 'ASSET_EMBED_FAILED' | 'INVALID_DOCUMENT' | 'CANCELLED';
|
|
55
|
+
export declare class NordoxError extends Error {
|
|
56
|
+
readonly code: NordoxErrorCode;
|
|
57
|
+
constructor(code: NordoxErrorCode, message: string);
|
|
58
|
+
}
|
|
59
|
+
export type PackNordoxOptions = {
|
|
60
|
+
title?: string;
|
|
61
|
+
assetPackaging?: RichTextAssetPackaging;
|
|
62
|
+
resourceResolver?: NordoxResourceResolver;
|
|
63
|
+
existingResources?: Map<string, {
|
|
64
|
+
resource: NordoxResource;
|
|
65
|
+
bytes?: Uint8Array;
|
|
66
|
+
displayUrl?: string;
|
|
67
|
+
}>;
|
|
68
|
+
limits?: Partial<NordoxLimits>;
|
|
69
|
+
signal?: AbortSignal;
|
|
70
|
+
onProgress?: (progress: {
|
|
71
|
+
completed: number;
|
|
72
|
+
total: number;
|
|
73
|
+
phase: 'prepare' | 'zip';
|
|
74
|
+
}) => void;
|
|
75
|
+
};
|
|
76
|
+
export type UnpackNordoxOptions = {
|
|
77
|
+
limits?: Partial<NordoxLimits>;
|
|
78
|
+
signal?: AbortSignal;
|
|
79
|
+
onProgress?: (progress: {
|
|
80
|
+
completed: number;
|
|
81
|
+
total: number;
|
|
82
|
+
phase: 'scan' | 'complete';
|
|
83
|
+
}) => void;
|
|
84
|
+
};
|
|
85
|
+
export type UnpackedNordox = {
|
|
86
|
+
manifest: NordoxManifest;
|
|
87
|
+
document: JSONContent;
|
|
88
|
+
resources: Map<string, {
|
|
89
|
+
resource: NordoxResource;
|
|
90
|
+
bytes?: Uint8Array;
|
|
91
|
+
displayUrl?: string;
|
|
92
|
+
}>;
|
|
93
|
+
};
|
|
94
|
+
export declare function packNordox(documentSnapshot: unknown, options?: PackNordoxOptions): Promise<Uint8Array>;
|
|
95
|
+
export declare function unpackNordox(bytes: Uint8Array | ArrayBuffer, options?: UnpackNordoxOptions): Promise<UnpackedNordox>;
|