@dotit/editor 1.0.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/LICENSE +21 -0
- package/README.md +92 -0
- package/dist/DocsToolbar.d.ts +17 -0
- package/dist/IntentTextEditor.d.ts +29 -0
- package/dist/TrustBanner.d.ts +11 -0
- package/dist/VisualEditor.d.ts +17 -0
- package/dist/block-props.d.ts +25 -0
- package/dist/bridge.d.ts +14 -0
- package/dist/extensions.d.ts +17 -0
- package/dist/font-size.d.ts +11 -0
- package/dist/index.cjs +32 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.mjs +3142 -0
- package/dist/index.mjs.map +1 -0
- package/dist/keyword-styles.d.ts +18 -0
- package/dist/page-geometry.d.ts +23 -0
- package/dist/pagination.d.ts +11 -0
- package/dist/print-iframe.d.ts +1 -0
- package/dist/print.d.ts +7 -0
- package/dist/style.css +1364 -0
- package/dist/template-highlight.d.ts +13 -0
- package/dist/trust-state.d.ts +34 -0
- package/dist/types.d.ts +14 -0
- package/package.json +82 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Extension } from "@tiptap/core";
|
|
2
|
+
export declare const TemplateHighlight: Extension<any, any>;
|
|
3
|
+
/**
|
|
4
|
+
* Extract the template variables used in `.it` source — unique, in order of
|
|
5
|
+
* first appearance. Runtime print tokens ({{page}}/{{pages}}) and system
|
|
6
|
+
* variables are excluded; they resolve at print/merge time on their own.
|
|
7
|
+
*/
|
|
8
|
+
export declare function extractTemplateVariables(source: string): string[];
|
|
9
|
+
/**
|
|
10
|
+
* Build a sample-data skeleton for a set of variable paths:
|
|
11
|
+
* ["customer.name", "items.0.qty"] → { customer: { name: "" }, items: [{ qty: "" }] }
|
|
12
|
+
*/
|
|
13
|
+
export declare function buildSampleSkeleton(vars: string[]): Record<string, unknown>;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { IntentDocument } from "@dotit/core";
|
|
2
|
+
export interface TrustState {
|
|
3
|
+
lifecycle: "draft" | "tracked" | "approved" | "signed" | "sealed";
|
|
4
|
+
isTracked: boolean;
|
|
5
|
+
trackBlock: {
|
|
6
|
+
id: string;
|
|
7
|
+
by: string;
|
|
8
|
+
at: string;
|
|
9
|
+
} | null;
|
|
10
|
+
approvals: {
|
|
11
|
+
by: string;
|
|
12
|
+
role: string;
|
|
13
|
+
at: string;
|
|
14
|
+
note?: string;
|
|
15
|
+
}[];
|
|
16
|
+
signatures: {
|
|
17
|
+
by: string;
|
|
18
|
+
role: string;
|
|
19
|
+
at: string;
|
|
20
|
+
}[];
|
|
21
|
+
isSealed: boolean;
|
|
22
|
+
sealedBy: string | null;
|
|
23
|
+
sealedAt: string | null;
|
|
24
|
+
sealHash: string | null;
|
|
25
|
+
amendments: {
|
|
26
|
+
section: string;
|
|
27
|
+
was: string;
|
|
28
|
+
now: string;
|
|
29
|
+
by: string;
|
|
30
|
+
ref: string;
|
|
31
|
+
at: string;
|
|
32
|
+
}[];
|
|
33
|
+
}
|
|
34
|
+
export declare function extractTrustState(doc: IntentDocument | null): TrustState;
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Trust actions surfaced by the ribbon's Trust group. The host app decides
|
|
3
|
+
* what each action opens (a seal dialog, a signature flow, a verify panel…) —
|
|
4
|
+
* the editor only reports the intent.
|
|
5
|
+
*/
|
|
6
|
+
export type TrustAction = "seal" | "sign" | "verify";
|
|
7
|
+
export interface CategoryInfo {
|
|
8
|
+
label: string;
|
|
9
|
+
icon: string;
|
|
10
|
+
color: string;
|
|
11
|
+
}
|
|
12
|
+
export declare const CATEGORY_META: Record<string, CategoryInfo>;
|
|
13
|
+
export declare const READ_ONLY_KEYWORDS: Set<string>;
|
|
14
|
+
export declare const INLINE_EDITABLE_KEYWORDS: Set<string>;
|
package/package.json
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@dotit/editor",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Embeddable WYSIWYG visual editor for IntentText (.it) documents — Word-like pages, ribbon, trust banner, and WYSIWYG PDF/HTML export. Drop it into any React app (ERPs, portals, back offices).",
|
|
5
|
+
"main": "dist/index.cjs",
|
|
6
|
+
"module": "dist/index.mjs",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"import": "./dist/index.mjs",
|
|
12
|
+
"require": "./dist/index.cjs"
|
|
13
|
+
},
|
|
14
|
+
"./style.css": "./dist/style.css"
|
|
15
|
+
},
|
|
16
|
+
"sideEffects": [
|
|
17
|
+
"**/*.css"
|
|
18
|
+
],
|
|
19
|
+
"files": [
|
|
20
|
+
"dist",
|
|
21
|
+
"README.md"
|
|
22
|
+
],
|
|
23
|
+
"keywords": [
|
|
24
|
+
"intenttext",
|
|
25
|
+
"editor",
|
|
26
|
+
"wysiwyg",
|
|
27
|
+
"react",
|
|
28
|
+
"tiptap",
|
|
29
|
+
"document",
|
|
30
|
+
"erp"
|
|
31
|
+
],
|
|
32
|
+
"author": "IntentText Team",
|
|
33
|
+
"license": "MIT",
|
|
34
|
+
"repository": {
|
|
35
|
+
"type": "git",
|
|
36
|
+
"url": "https://github.com/intenttext/IntentText.git",
|
|
37
|
+
"directory": "packages/editor"
|
|
38
|
+
},
|
|
39
|
+
"homepage": "https://github.com/intenttext/IntentText#readme",
|
|
40
|
+
"bugs": {
|
|
41
|
+
"url": "https://github.com/intenttext/IntentText/issues"
|
|
42
|
+
},
|
|
43
|
+
"publishConfig": {
|
|
44
|
+
"access": "public"
|
|
45
|
+
},
|
|
46
|
+
"peerDependencies": {
|
|
47
|
+
"react": ">=18",
|
|
48
|
+
"react-dom": ">=18"
|
|
49
|
+
},
|
|
50
|
+
"dependencies": {
|
|
51
|
+
"@tiptap/core": "^3.20.1",
|
|
52
|
+
"@tiptap/extension-color": "^3.20.1",
|
|
53
|
+
"@tiptap/extension-font-family": "^3.20.1",
|
|
54
|
+
"@tiptap/extension-highlight": "^3.20.1",
|
|
55
|
+
"@tiptap/extension-paragraph": "^3.20.1",
|
|
56
|
+
"@tiptap/extension-placeholder": "^3.20.1",
|
|
57
|
+
"@tiptap/extension-subscript": "^3.20.1",
|
|
58
|
+
"@tiptap/extension-superscript": "^3.20.1",
|
|
59
|
+
"@tiptap/extension-text-align": "^3.20.1",
|
|
60
|
+
"@tiptap/extension-text-style": "^3.20.1",
|
|
61
|
+
"@tiptap/extension-underline": "^3.20.1",
|
|
62
|
+
"@tiptap/pm": "^3.20.1",
|
|
63
|
+
"@tiptap/react": "^3.20.1",
|
|
64
|
+
"@tiptap/starter-kit": "^3.20.1",
|
|
65
|
+
"lucide-react": "^0.577.0",
|
|
66
|
+
"@dotit/core": "^1.1.0"
|
|
67
|
+
},
|
|
68
|
+
"devDependencies": {
|
|
69
|
+
"@types/react": "^19.2.14",
|
|
70
|
+
"@types/react-dom": "^19.2.3",
|
|
71
|
+
"@vitejs/plugin-react": "^5.1.4",
|
|
72
|
+
"react": "^19.2.4",
|
|
73
|
+
"react-dom": "^19.2.4",
|
|
74
|
+
"typescript": "~5.9.3",
|
|
75
|
+
"vite": "^7.3.1"
|
|
76
|
+
},
|
|
77
|
+
"scripts": {
|
|
78
|
+
"build:core": "pnpm --filter @dotit/core build",
|
|
79
|
+
"build": "pnpm run build:core && rm -rf dist && vite build && tsc && cp src/styles.css dist/style.css",
|
|
80
|
+
"dev": "vite build --watch"
|
|
81
|
+
}
|
|
82
|
+
}
|