quill-clausula 0.1.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 +133 -0
- package/dist/actions/action-buttons.d.ts +2 -0
- package/dist/actions/drag-organizer.d.ts +54 -0
- package/dist/actions/floating-bar.d.ts +19 -0
- package/dist/actions/ghost-cut.d.ts +55 -0
- package/dist/actions/move-delta.d.ts +7 -0
- package/dist/assinatura/assinatura-renderer.d.ts +5 -0
- package/dist/assinatura/assinatura-sync.d.ts +12 -0
- package/dist/autofill.d.ts +22 -0
- package/dist/blots/assinatura-embed.d.ts +11 -0
- package/dist/blots/clausula-container.d.ts +4 -0
- package/dist/blots/clausula-item.d.ts +15 -0
- package/dist/blots/objeto-container.d.ts +4 -0
- package/dist/blots/objeto-item.d.ts +12 -0
- package/dist/blots/parte-container.d.ts +4 -0
- package/dist/blots/parte-item.d.ts +13 -0
- package/dist/export/exporter.d.ts +64 -0
- package/dist/formats/agreed.d.ts +9 -0
- package/dist/formats/ghost.d.ts +7 -0
- package/dist/formats/locked.d.ts +2 -0
- package/dist/formats/spacing.d.ts +13 -0
- package/dist/import/markdown-importer.d.ts +37 -0
- package/dist/index.d.ts +32 -0
- package/dist/module.d.ts +112 -0
- package/dist/numbering/counter.d.ts +18 -0
- package/dist/numbering/extenso.d.ts +9 -0
- package/dist/numbering/formatter.d.ts +2 -0
- package/dist/numbering/roman.d.ts +2 -0
- package/dist/partes/partes-counter.d.ts +25 -0
- package/dist/quill-clausula.cjs +25 -0
- package/dist/quill-clausula.css +856 -0
- package/dist/quill-clausula.mjs +1779 -0
- package/dist/toolbar/handler.d.ts +18 -0
- package/dist/types.d.ts +68 -0
- package/package.json +57 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type Quill from 'quill';
|
|
2
|
+
declare const CLAUSULA_OPTIONS: {
|
|
3
|
+
value: string;
|
|
4
|
+
label: string;
|
|
5
|
+
}[];
|
|
6
|
+
export declare function clausulaHandler(this: {
|
|
7
|
+
quill: Quill;
|
|
8
|
+
}, value: string): void;
|
|
9
|
+
export declare function parteHandler(this: {
|
|
10
|
+
quill: Quill;
|
|
11
|
+
}, value: string): void;
|
|
12
|
+
export declare function objetoHandler(this: {
|
|
13
|
+
quill: Quill;
|
|
14
|
+
}, value: string): void;
|
|
15
|
+
export declare function assinaturaHandler(this: {
|
|
16
|
+
quill: Quill;
|
|
17
|
+
}): void;
|
|
18
|
+
export { CLAUSULA_OPTIONS };
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
export type ClausulaType = 'clausula' | 'subclausula' | 'paragrafo' | 'inciso' | 'alinea';
|
|
2
|
+
export type ClausulaFormat = 'extenso' | 'numeric' | 'numeric-padded' | 'ordinal' | 'abbreviation' | 'regular' | 'regular-padded';
|
|
3
|
+
export type SubclausulaFormat = 'dotted' | 'dotted-padded' | 'numeric' | 'extenso';
|
|
4
|
+
export type ParagrafoFormat = 'extenso' | 'uppercase' | 'numeric' | 'symbol';
|
|
5
|
+
export type IncisoFormat = 'roman' | 'roman-lower';
|
|
6
|
+
export type AlineaFormat = 'letter-parenthesis' | 'letter';
|
|
7
|
+
export interface ConversationContext {
|
|
8
|
+
/** The clausula type (clausula, subclausula, paragrafo, etc.) */
|
|
9
|
+
type: ClausulaType;
|
|
10
|
+
/** The text content of the clausula item */
|
|
11
|
+
text: string;
|
|
12
|
+
/** The DOM element of the clausula item */
|
|
13
|
+
domNode: HTMLElement;
|
|
14
|
+
/** The current user, if set */
|
|
15
|
+
currentUser?: string;
|
|
16
|
+
}
|
|
17
|
+
export interface ClausulaModuleOptions {
|
|
18
|
+
clausulaFormat: ClausulaFormat;
|
|
19
|
+
subclausulaFormat: SubclausulaFormat;
|
|
20
|
+
paragrafoFormat: ParagrafoFormat;
|
|
21
|
+
incisoFormat: IncisoFormat;
|
|
22
|
+
alineaFormat: AlineaFormat;
|
|
23
|
+
currentUser?: string;
|
|
24
|
+
users?: string[];
|
|
25
|
+
showActions?: boolean;
|
|
26
|
+
showFloatingBar?: boolean;
|
|
27
|
+
/** Floating drag handle to reorder clause blocks (default true) */
|
|
28
|
+
showDragHandle?: boolean;
|
|
29
|
+
/** Callback invoked when the conversation button is clicked on a clausula item */
|
|
30
|
+
onConversation?: (context: ConversationContext) => void;
|
|
31
|
+
/** Callback invoked when the AI Judge button is clicked */
|
|
32
|
+
onJudge?: () => void;
|
|
33
|
+
/** Callback invoked when the Share button is clicked */
|
|
34
|
+
onShare?: () => void;
|
|
35
|
+
/** Callback invoked when the Sign button is clicked */
|
|
36
|
+
onSign?: () => void;
|
|
37
|
+
}
|
|
38
|
+
export interface ClausulaIndex {
|
|
39
|
+
type: ClausulaType;
|
|
40
|
+
/** 1-based index within its parent scope */
|
|
41
|
+
index: number;
|
|
42
|
+
/** Parent cláusula 1-based index (for subclausula dotted format) */
|
|
43
|
+
parentClausulaIndex: number;
|
|
44
|
+
/** Whether this is the only parágrafo under its parent cláusula */
|
|
45
|
+
isUnico: boolean;
|
|
46
|
+
}
|
|
47
|
+
export declare const CLAUSULA_TYPES: ClausulaType[];
|
|
48
|
+
export declare const HIERARCHY: Record<ClausulaType, number>;
|
|
49
|
+
/** Tab promotes to next-deeper type; Shift+Tab demotes to next-shallower */
|
|
50
|
+
export declare const PROMOTE_ORDER: ClausulaType[];
|
|
51
|
+
export type ParteType = 'contratante' | 'contratado';
|
|
52
|
+
export interface ParteIndex {
|
|
53
|
+
type: ParteType;
|
|
54
|
+
/** 1-based index within its role (1st contratante, 2nd contratante, etc.) */
|
|
55
|
+
index: number;
|
|
56
|
+
/** Total count of parties with the same role */
|
|
57
|
+
total: number;
|
|
58
|
+
}
|
|
59
|
+
export interface AssinaturaConfig {
|
|
60
|
+
local?: string;
|
|
61
|
+
dataAssinatura?: string;
|
|
62
|
+
testemunhas?: number;
|
|
63
|
+
}
|
|
64
|
+
export interface SignatureLine {
|
|
65
|
+
nome: string;
|
|
66
|
+
role: ParteType;
|
|
67
|
+
}
|
|
68
|
+
export declare const DEFAULT_OPTIONS: ClausulaModuleOptions;
|
package/package.json
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "quill-clausula",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Brazilian legal document formatting module for Quill — auto-numbered Cláusulas, Parágrafos, Incisos, and Alíneas",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/quill-clausula.cjs",
|
|
7
|
+
"module": "dist/quill-clausula.mjs",
|
|
8
|
+
"types": "dist/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"import": "./dist/quill-clausula.mjs",
|
|
13
|
+
"require": "./dist/quill-clausula.cjs"
|
|
14
|
+
},
|
|
15
|
+
"./dist/quill-clausula.css": "./dist/quill-clausula.css",
|
|
16
|
+
"./package.json": "./package.json"
|
|
17
|
+
},
|
|
18
|
+
"files": [
|
|
19
|
+
"dist"
|
|
20
|
+
],
|
|
21
|
+
"scripts": {
|
|
22
|
+
"dev": "vite demo",
|
|
23
|
+
"build": "vite build && tsc --emitDeclarationOnly && cp src/styles/clausula.css dist/quill-clausula.css",
|
|
24
|
+
"test": "vitest run",
|
|
25
|
+
"test:watch": "vitest",
|
|
26
|
+
"prepare": "npm run build",
|
|
27
|
+
"prepublishOnly": "npm test && npm run build"
|
|
28
|
+
},
|
|
29
|
+
"repository": {
|
|
30
|
+
"type": "git",
|
|
31
|
+
"url": "git+https://github.com/ProcStudioOrg/prc_quill.git"
|
|
32
|
+
},
|
|
33
|
+
"homepage": "https://github.com/ProcStudioOrg/prc_quill#readme",
|
|
34
|
+
"bugs": {
|
|
35
|
+
"url": "https://github.com/ProcStudioOrg/prc_quill/issues"
|
|
36
|
+
},
|
|
37
|
+
"peerDependencies": {
|
|
38
|
+
"quill": "^2.0.0"
|
|
39
|
+
},
|
|
40
|
+
"devDependencies": {
|
|
41
|
+
"quill": "^2.0.3",
|
|
42
|
+
"typescript": "^5.4.2",
|
|
43
|
+
"vite": "^5.4.0",
|
|
44
|
+
"vitest": "^2.0.0",
|
|
45
|
+
"jsdom": "^24.0.0"
|
|
46
|
+
},
|
|
47
|
+
"keywords": [
|
|
48
|
+
"quill",
|
|
49
|
+
"quill-module",
|
|
50
|
+
"legal",
|
|
51
|
+
"brazilian-law",
|
|
52
|
+
"clausula",
|
|
53
|
+
"contract",
|
|
54
|
+
"rich-text"
|
|
55
|
+
],
|
|
56
|
+
"license": "MIT"
|
|
57
|
+
}
|