@tooark/angular 1.6.0 → 1.7.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 +20 -13
- package/README.pt-BR.md +20 -13
- package/fesm2022/tooark-angular-chart.mjs +77 -0
- package/fesm2022/tooark-angular-chart.mjs.map +1 -0
- package/fesm2022/tooark-angular-code.mjs +165 -0
- package/fesm2022/tooark-angular-code.mjs.map +1 -0
- package/fesm2022/tooark-angular-wysiwyg.mjs +163 -0
- package/fesm2022/tooark-angular-wysiwyg.mjs.map +1 -0
- package/fesm2022/tooark-angular.mjs +1085 -136
- package/fesm2022/tooark-angular.mjs.map +1 -1
- package/package.json +43 -4
- package/types/tooark-angular-chart.d.ts +31 -0
- package/types/tooark-angular-code.d.ts +63 -0
- package/types/tooark-angular-wysiwyg.d.ts +61 -0
- package/types/tooark-angular.d.ts +361 -15
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tooark/angular",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.0",
|
|
4
4
|
"description": "Tooark Angular — standalone wrappers for ark-* components for Angular",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"tooark",
|
|
@@ -43,14 +43,41 @@
|
|
|
43
43
|
"access": "public",
|
|
44
44
|
"registry": "https://registry.npmjs.org/"
|
|
45
45
|
},
|
|
46
|
+
"typesVersions": {
|
|
47
|
+
"*": {
|
|
48
|
+
"chart": [
|
|
49
|
+
"types/tooark-angular-chart.d.ts"
|
|
50
|
+
],
|
|
51
|
+
"code": [
|
|
52
|
+
"types/tooark-angular-code.d.ts"
|
|
53
|
+
],
|
|
54
|
+
"wysiwyg": [
|
|
55
|
+
"types/tooark-angular-wysiwyg.d.ts"
|
|
56
|
+
]
|
|
57
|
+
}
|
|
58
|
+
},
|
|
46
59
|
"peerDependencies": {
|
|
60
|
+
"@tooark/chart": ">=1.0.0",
|
|
61
|
+
"@tooark/code": ">=1.6.0",
|
|
62
|
+
"@tooark/wysiwyg": ">=1.0.0",
|
|
47
63
|
"@angular/common": ">=21.2.19",
|
|
48
64
|
"@angular/core": ">=21.2.19"
|
|
49
65
|
},
|
|
66
|
+
"peerDependenciesMeta": {
|
|
67
|
+
"@tooark/chart": {
|
|
68
|
+
"optional": true
|
|
69
|
+
},
|
|
70
|
+
"@tooark/code": {
|
|
71
|
+
"optional": true
|
|
72
|
+
},
|
|
73
|
+
"@tooark/wysiwyg": {
|
|
74
|
+
"optional": true
|
|
75
|
+
}
|
|
76
|
+
},
|
|
50
77
|
"dependencies": {
|
|
51
|
-
"@tooark/core": "^1.
|
|
52
|
-
"@tooark/web-components": "^1.
|
|
53
|
-
"tslib": "^2.
|
|
78
|
+
"@tooark/core": "^1.7.0",
|
|
79
|
+
"@tooark/web-components": "^1.7.0",
|
|
80
|
+
"tslib": "^2.9.1"
|
|
54
81
|
},
|
|
55
82
|
"module": "fesm2022/tooark-angular.mjs",
|
|
56
83
|
"typings": "types/tooark-angular.d.ts",
|
|
@@ -61,6 +88,18 @@
|
|
|
61
88
|
".": {
|
|
62
89
|
"types": "./types/tooark-angular.d.ts",
|
|
63
90
|
"default": "./fesm2022/tooark-angular.mjs"
|
|
91
|
+
},
|
|
92
|
+
"./chart": {
|
|
93
|
+
"types": "./types/tooark-angular-chart.d.ts",
|
|
94
|
+
"default": "./fesm2022/tooark-angular-chart.mjs"
|
|
95
|
+
},
|
|
96
|
+
"./code": {
|
|
97
|
+
"types": "./types/tooark-angular-code.d.ts",
|
|
98
|
+
"default": "./fesm2022/tooark-angular-code.mjs"
|
|
99
|
+
},
|
|
100
|
+
"./wysiwyg": {
|
|
101
|
+
"types": "./types/tooark-angular-wysiwyg.d.ts",
|
|
102
|
+
"default": "./fesm2022/tooark-angular-wysiwyg.mjs"
|
|
64
103
|
}
|
|
65
104
|
},
|
|
66
105
|
"sideEffects": false,
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { EventEmitter } from '@angular/core';
|
|
3
|
+
import { ArkChart, EChartsOption } from '@tooark/chart';
|
|
4
|
+
|
|
5
|
+
declare class ArkChartComponent {
|
|
6
|
+
constructor();
|
|
7
|
+
private readonly host;
|
|
8
|
+
/** O `ark-chart` que este wrapper renderiza, com os métodos e propriedades do elemento; `null` antes da view. */
|
|
9
|
+
get element(): ArkChart | null;
|
|
10
|
+
testid: string | undefined;
|
|
11
|
+
/** Opções nativas do ECharts, pela propriedade (só com referência nova; cada uma re-renderiza com notMerge). */
|
|
12
|
+
option: EChartsOption | null;
|
|
13
|
+
/** auto (segue o color-scheme da página), light ou dark. Padrão: "auto". */
|
|
14
|
+
theme: "auto" | "light" | "dark" | undefined;
|
|
15
|
+
/** default ou tokens (cores dos tokens `--ark-color-*`, @tooark/chart 1.7+). Padrão: "default". */
|
|
16
|
+
palette: "default" | "tokens" | undefined;
|
|
17
|
+
renderer: "canvas" | "svg" | undefined;
|
|
18
|
+
/** Altura (comprimento CSS). Padrão: "320px". */
|
|
19
|
+
height: string | undefined;
|
|
20
|
+
/** false desliga o redimensionamento junto com o contêiner. Padrão: true. */
|
|
21
|
+
autoResize: boolean | undefined;
|
|
22
|
+
/** Nome do gráfico como imagem (`role="img"`). */
|
|
23
|
+
ariaLabel: string | undefined;
|
|
24
|
+
/** Clique numa série, com os params nativos do ECharts em `detail`. */
|
|
25
|
+
chartClick: EventEmitter<CustomEvent<any>>;
|
|
26
|
+
protected clickHandler: (event: Event) => void;
|
|
27
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ArkChartComponent, never>;
|
|
28
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ArkChartComponent, "ark-chart-wrapper", never, { "testid": { "alias": "testid"; "required": false; }; "option": { "alias": "option"; "required": false; }; "theme": { "alias": "theme"; "required": false; }; "palette": { "alias": "palette"; "required": false; }; "renderer": { "alias": "renderer"; "required": false; }; "height": { "alias": "height"; "required": false; }; "autoResize": { "alias": "autoResize"; "required": false; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; }; }, { "chartClick": "chartClick"; }, never, never, true, never>;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export { ArkChartComponent };
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { EventEmitter } from '@angular/core';
|
|
3
|
+
import { ArkCodeEditor, ArkCodeLanguage, ArkCodeIndentStyle, ArkCodeLineEnding, ArkCodeVariable, ArkCodeCompletion, ArkCodeCompletionSource, ArkCodeFormatter, ArkCodeExtension } from '@tooark/code';
|
|
4
|
+
import { ArkSize } from '@tooark/core';
|
|
5
|
+
|
|
6
|
+
declare class ArkCodeEditorComponent {
|
|
7
|
+
constructor();
|
|
8
|
+
private readonly host;
|
|
9
|
+
/** O `ark-code-editor` que este wrapper renderiza, com os métodos e propriedades do elemento; `null` antes da view. */
|
|
10
|
+
get element(): ArkCodeEditor | null;
|
|
11
|
+
testid: string | undefined;
|
|
12
|
+
/** Texto do editor; o valor que o `(changed)` acabou de entregar, repassado, não move o cursor. */
|
|
13
|
+
value: string | undefined;
|
|
14
|
+
language: ArkCodeLanguage | undefined;
|
|
15
|
+
theme: "auto" | "light" | "dark" | undefined;
|
|
16
|
+
readonly: boolean;
|
|
17
|
+
placeholder: string | undefined;
|
|
18
|
+
minHeight: string | undefined;
|
|
19
|
+
/** Altura máxima (comprimento CSS), com rolagem interna acima dela. */
|
|
20
|
+
maxHeight: string | undefined;
|
|
21
|
+
/** false tira a numeração. Padrão: true. */
|
|
22
|
+
lineNumbers: boolean | undefined;
|
|
23
|
+
/** false tira a calha de dobra. Padrão: true. */
|
|
24
|
+
fold: boolean | undefined;
|
|
25
|
+
wrap: boolean;
|
|
26
|
+
indentStyle: ArkCodeIndentStyle | undefined;
|
|
27
|
+
indentSize: number | undefined;
|
|
28
|
+
lineEnding: ArkCodeLineEnding | undefined;
|
|
29
|
+
/** false deixa Tab como navegação. Padrão: true. */
|
|
30
|
+
tabIndent: boolean | undefined;
|
|
31
|
+
/** false desliga as completions. Padrão: true. */
|
|
32
|
+
autocomplete: boolean | undefined;
|
|
33
|
+
markUnknownVariables: boolean;
|
|
34
|
+
singleLine: boolean;
|
|
35
|
+
size: ArkSize | undefined;
|
|
36
|
+
ariaLabel: string | undefined;
|
|
37
|
+
variableKeys: string[] | undefined;
|
|
38
|
+
variables: ArkCodeVariable[] | undefined;
|
|
39
|
+
completions: ArkCodeCompletion[] | undefined;
|
|
40
|
+
completionSource: ArkCodeCompletionSource | undefined;
|
|
41
|
+
formatter: ArkCodeFormatter | undefined;
|
|
42
|
+
/** Extensões do CodeMirror do app; mantenha a referência estável, uma nova reconfigura o editor. */
|
|
43
|
+
extensions: ArkCodeExtension | undefined;
|
|
44
|
+
/** Cada edição do usuário, com `detail: { value }`. */
|
|
45
|
+
changed: EventEmitter<CustomEvent<{
|
|
46
|
+
value: string;
|
|
47
|
+
}>>;
|
|
48
|
+
/** Enter em `singleLine`, com `detail: { value }`. */
|
|
49
|
+
arkSubmit: EventEmitter<CustomEvent<{
|
|
50
|
+
value: string;
|
|
51
|
+
}>>;
|
|
52
|
+
/** `format()` falhou, com `detail: { error }`. */
|
|
53
|
+
arkFormatError: EventEmitter<CustomEvent<{
|
|
54
|
+
error: unknown;
|
|
55
|
+
}>>;
|
|
56
|
+
protected changeHandler: (event: Event) => void;
|
|
57
|
+
protected submitHandler: (event: Event) => void;
|
|
58
|
+
protected formatErrorHandler: (event: Event) => void;
|
|
59
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ArkCodeEditorComponent, never>;
|
|
60
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ArkCodeEditorComponent, "ark-code-editor-wrapper", never, { "testid": { "alias": "testid"; "required": false; }; "value": { "alias": "value"; "required": false; }; "language": { "alias": "language"; "required": false; }; "theme": { "alias": "theme"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "minHeight": { "alias": "minHeight"; "required": false; }; "maxHeight": { "alias": "maxHeight"; "required": false; }; "lineNumbers": { "alias": "lineNumbers"; "required": false; }; "fold": { "alias": "fold"; "required": false; }; "wrap": { "alias": "wrap"; "required": false; }; "indentStyle": { "alias": "indentStyle"; "required": false; }; "indentSize": { "alias": "indentSize"; "required": false; }; "lineEnding": { "alias": "lineEnding"; "required": false; }; "tabIndent": { "alias": "tabIndent"; "required": false; }; "autocomplete": { "alias": "autocomplete"; "required": false; }; "markUnknownVariables": { "alias": "markUnknownVariables"; "required": false; }; "singleLine": { "alias": "singleLine"; "required": false; }; "size": { "alias": "size"; "required": false; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; }; "variableKeys": { "alias": "variableKeys"; "required": false; }; "variables": { "alias": "variables"; "required": false; }; "completions": { "alias": "completions"; "required": false; }; "completionSource": { "alias": "completionSource"; "required": false; }; "formatter": { "alias": "formatter"; "required": false; }; "extensions": { "alias": "extensions"; "required": false; }; }, { "changed": "changed"; "arkSubmit": "arkSubmit"; "arkFormatError": "arkFormatError"; }, never, never, true, never>;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export { ArkCodeEditorComponent };
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import * as _tiptap_core from '@tiptap/core';
|
|
2
|
+
import * as i0 from '@angular/core';
|
|
3
|
+
import { AfterViewInit, EventEmitter } from '@angular/core';
|
|
4
|
+
import { ArkLang } from '@tooark/core';
|
|
5
|
+
import { ArkWysiwygEditor, ArkWysiwygContent, ArkWysiwygUploader, ArkWysiwygUploadError, ArkWysiwygViewer } from '@tooark/wysiwyg';
|
|
6
|
+
|
|
7
|
+
declare class ArkWysiwygEditorComponent implements AfterViewInit {
|
|
8
|
+
constructor();
|
|
9
|
+
private readonly host;
|
|
10
|
+
/** O último JSON emitido ou atribuído: o getter `content` do elemento monta um objeto novo a cada leitura. */
|
|
11
|
+
private known;
|
|
12
|
+
private pending;
|
|
13
|
+
/** O `ark-wysiwyg-editor` que este wrapper renderiza; `null` antes da view. */
|
|
14
|
+
get element(): ArkWysiwygEditor | null;
|
|
15
|
+
testid: string | undefined;
|
|
16
|
+
/**
|
|
17
|
+
* Conteúdo como JSON do Tiptap. Atribuído só quando a referência muda e fora do histórico de desfazer: o objeto
|
|
18
|
+
* que o `(changed)` entregou, repassado, não reescreve o editor nem move o cursor.
|
|
19
|
+
*/
|
|
20
|
+
set content(value: ArkWysiwygContent | null | undefined);
|
|
21
|
+
get content(): ArkWysiwygContent | null | undefined;
|
|
22
|
+
/** Gancho de upload; sem ele não há botões de mídia e arquivos colados são recusados. */
|
|
23
|
+
uploadFile: ArkWysiwygUploader | null | undefined;
|
|
24
|
+
toolbar: string | undefined;
|
|
25
|
+
theme: "auto" | "light" | "dark" | undefined;
|
|
26
|
+
placeholder: string | undefined;
|
|
27
|
+
/** false desabilita a edição. Padrão: true. */
|
|
28
|
+
editable: boolean | undefined;
|
|
29
|
+
lang: ArkLang | undefined;
|
|
30
|
+
/** Rótulos próprios (objeto ou JSON), por cima do idioma. */
|
|
31
|
+
localeJson: string | Record<string, string> | undefined;
|
|
32
|
+
colors: string[] | undefined;
|
|
33
|
+
highlights: string[] | undefined;
|
|
34
|
+
maxFileSize: number | undefined;
|
|
35
|
+
ariaLabel: string | undefined;
|
|
36
|
+
/** Cada edição, com o JSON do Tiptap em `detail`. */
|
|
37
|
+
changed: EventEmitter<CustomEvent<_tiptap_core.JSONContent>>;
|
|
38
|
+
/** Arquivo recusado ou upload que falhou, com o motivo em `detail`. */
|
|
39
|
+
uploadError: EventEmitter<CustomEvent<ArkWysiwygUploadError>>;
|
|
40
|
+
get localeJsonAttr(): string | null;
|
|
41
|
+
ngAfterViewInit(): void;
|
|
42
|
+
protected stringify: (value: unknown) => string;
|
|
43
|
+
protected changeHandler: (event: Event) => void;
|
|
44
|
+
protected uploadErrorHandler: (event: Event) => void;
|
|
45
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ArkWysiwygEditorComponent, never>;
|
|
46
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ArkWysiwygEditorComponent, "ark-wysiwyg-editor-wrapper", never, { "testid": { "alias": "testid"; "required": false; }; "content": { "alias": "content"; "required": false; }; "uploadFile": { "alias": "uploadFile"; "required": false; }; "toolbar": { "alias": "toolbar"; "required": false; }; "theme": { "alias": "theme"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "editable": { "alias": "editable"; "required": false; }; "lang": { "alias": "lang"; "required": false; }; "localeJson": { "alias": "localeJson"; "required": false; }; "colors": { "alias": "colors"; "required": false; }; "highlights": { "alias": "highlights"; "required": false; }; "maxFileSize": { "alias": "maxFileSize"; "required": false; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; }; }, { "changed": "changed"; "uploadError": "uploadError"; }, never, never, true, never>;
|
|
47
|
+
}
|
|
48
|
+
declare class ArkWysiwygViewerComponent {
|
|
49
|
+
constructor();
|
|
50
|
+
private readonly host;
|
|
51
|
+
/** O `ark-wysiwyg-viewer` que este wrapper renderiza; `null` antes da view. */
|
|
52
|
+
get element(): ArkWysiwygViewer | null;
|
|
53
|
+
testid: string | undefined;
|
|
54
|
+
/** Conteúdo como JSON do Tiptap, sanitizado ao entrar. */
|
|
55
|
+
content: ArkWysiwygContent | null | undefined;
|
|
56
|
+
theme: "auto" | "light" | "dark" | undefined;
|
|
57
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ArkWysiwygViewerComponent, never>;
|
|
58
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ArkWysiwygViewerComponent, "ark-wysiwyg-viewer-wrapper", never, { "testid": { "alias": "testid"; "required": false; }; "content": { "alias": "content"; "required": false; }; "theme": { "alias": "theme"; "required": false; }; }, {}, never, never, true, never>;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export { ArkWysiwygEditorComponent, ArkWysiwygViewerComponent };
|