@clepit/core 0.2.0-beta.322
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/CHANGELOG.md +23 -0
- package/LICENSE +21 -0
- package/README.md +79 -0
- package/dist/core/editor/action-bar/css.d.ts +3 -0
- package/dist/core/editor/action-bar/index.d.ts +18 -0
- package/dist/core/editor/css.d.ts +3 -0
- package/dist/core/editor/index.d.ts +18 -0
- package/dist/core/editor/views/edit.d.ts +4 -0
- package/dist/core/editor/views/index.d.ts +4 -0
- package/dist/core/editor/views/json.d.ts +9 -0
- package/dist/core/editor/views/preview.d.ts +4 -0
- package/dist/core/element/index.d.ts +101 -0
- package/dist/core/i18n/index.d.ts +43 -0
- package/dist/core/managers/block/css.d.ts +3 -0
- package/dist/core/managers/block/index.d.ts +40 -0
- package/dist/core/managers/event.d.ts +13 -0
- package/dist/core/managers/style.d.ts +181 -0
- package/dist/core/renderer/draw.d.ts +27 -0
- package/dist/core/renderer/index.d.ts +15 -0
- package/dist/core/renderer/invalid-data.d.ts +4 -0
- package/dist/core/renderer/page.d.ts +37 -0
- package/dist/core/store.d.ts +42 -0
- package/dist/core/theme/css.d.ts +4 -0
- package/dist/core/theme/index.d.ts +42 -0
- package/dist/core/toolbars/block/css.d.ts +3 -0
- package/dist/core/toolbars/block/index.d.ts +38 -0
- package/dist/core/toolbars/inline/css.d.ts +6 -0
- package/dist/core/toolbars/inline/index.d.ts +43 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.js +2 -0
- package/dist/index.mjs +2 -0
- package/dist/tools/block/alert/css.d.ts +5 -0
- package/dist/tools/block/alert/index.d.ts +13 -0
- package/dist/tools/block/alert/input.d.ts +13 -0
- package/dist/tools/block/alert/output.d.ts +9 -0
- package/dist/tools/block/audio/css.d.ts +5 -0
- package/dist/tools/block/audio/index.d.ts +13 -0
- package/dist/tools/block/audio/input.d.ts +22 -0
- package/dist/tools/block/audio/output.d.ts +9 -0
- package/dist/tools/block/checklist/css.d.ts +5 -0
- package/dist/tools/block/checklist/index.d.ts +13 -0
- package/dist/tools/block/checklist/input.d.ts +14 -0
- package/dist/tools/block/checklist/output.d.ts +9 -0
- package/dist/tools/block/code/css.d.ts +5 -0
- package/dist/tools/block/code/grammar/engine.d.ts +52 -0
- package/dist/tools/block/code/grammar/languages.d.ts +6 -0
- package/dist/tools/block/code/highlight.d.ts +22 -0
- package/dist/tools/block/code/index.d.ts +13 -0
- package/dist/tools/block/code/input.d.ts +57 -0
- package/dist/tools/block/code/loaders/language.d.ts +17 -0
- package/dist/tools/block/code/loaders/theme.d.ts +21 -0
- package/dist/tools/block/code/output.d.ts +32 -0
- package/dist/tools/block/code/theme-css.d.ts +14 -0
- package/dist/tools/block/code/theme-generator.d.ts +27 -0
- package/dist/tools/block/code/variants.d.ts +14 -0
- package/dist/tools/block/collapsible/css.d.ts +6 -0
- package/dist/tools/block/collapsible/index.d.ts +13 -0
- package/dist/tools/block/collapsible/input.d.ts +13 -0
- package/dist/tools/block/collapsible/output.d.ts +16 -0
- package/dist/tools/block/collection/css.d.ts +6 -0
- package/dist/tools/block/collection/index.d.ts +13 -0
- package/dist/tools/block/collection/input.d.ts +11 -0
- package/dist/tools/block/collection/output.d.ts +12 -0
- package/dist/tools/block/columns/css.d.ts +6 -0
- package/dist/tools/block/columns/index.d.ts +13 -0
- package/dist/tools/block/columns/input.d.ts +12 -0
- package/dist/tools/block/columns/output.d.ts +11 -0
- package/dist/tools/block/date/css.d.ts +6 -0
- package/dist/tools/block/date/index.d.ts +13 -0
- package/dist/tools/block/date/input.d.ts +12 -0
- package/dist/tools/block/date/output.d.ts +10 -0
- package/dist/tools/block/delimiter/css.d.ts +5 -0
- package/dist/tools/block/delimiter/index.d.ts +13 -0
- package/dist/tools/block/delimiter/input.d.ts +12 -0
- package/dist/tools/block/delimiter/output.d.ts +9 -0
- package/dist/tools/block/doc-card/css.d.ts +6 -0
- package/dist/tools/block/doc-card/index.d.ts +13 -0
- package/dist/tools/block/doc-card/input.d.ts +11 -0
- package/dist/tools/block/doc-card/output.d.ts +11 -0
- package/dist/tools/block/embed/css.d.ts +6 -0
- package/dist/tools/block/embed/index.d.ts +13 -0
- package/dist/tools/block/embed/input.d.ts +11 -0
- package/dist/tools/block/embed/output.d.ts +23 -0
- package/dist/tools/block/embed/providers.d.ts +5 -0
- package/dist/tools/block/file/css.d.ts +6 -0
- package/dist/tools/block/file/index.d.ts +13 -0
- package/dist/tools/block/file/input.d.ts +14 -0
- package/dist/tools/block/file/output.d.ts +10 -0
- package/dist/tools/block/glance/css.d.ts +5 -0
- package/dist/tools/block/glance/index.d.ts +13 -0
- package/dist/tools/block/glance/input.d.ts +11 -0
- package/dist/tools/block/glance/output.d.ts +18 -0
- package/dist/tools/block/header/css.d.ts +5 -0
- package/dist/tools/block/header/index.d.ts +13 -0
- package/dist/tools/block/header/input.d.ts +13 -0
- package/dist/tools/block/header/output.d.ts +9 -0
- package/dist/tools/block/image/css.d.ts +5 -0
- package/dist/tools/block/image/index.d.ts +13 -0
- package/dist/tools/block/image/input.d.ts +22 -0
- package/dist/tools/block/image/output.d.ts +9 -0
- package/dist/tools/block/list/css.d.ts +5 -0
- package/dist/tools/block/list/index.d.ts +13 -0
- package/dist/tools/block/list/input.d.ts +16 -0
- package/dist/tools/block/list/output.d.ts +9 -0
- package/dist/tools/block/openapi/css.d.ts +5 -0
- package/dist/tools/block/openapi/index.d.ts +13 -0
- package/dist/tools/block/openapi/input.d.ts +11 -0
- package/dist/tools/block/openapi/output.d.ts +24 -0
- package/dist/tools/block/openapi/schema.d.ts +17 -0
- package/dist/tools/block/openapi/snippets.d.ts +5 -0
- package/dist/tools/block/openapi/spec.d.ts +46 -0
- package/dist/tools/block/paragraph/css.d.ts +5 -0
- package/dist/tools/block/paragraph/index.d.ts +13 -0
- package/dist/tools/block/paragraph/input.d.ts +12 -0
- package/dist/tools/block/paragraph/output.d.ts +13 -0
- package/dist/tools/block/quote/css.d.ts +5 -0
- package/dist/tools/block/quote/index.d.ts +13 -0
- package/dist/tools/block/quote/input.d.ts +15 -0
- package/dist/tools/block/quote/output.d.ts +14 -0
- package/dist/tools/block/sketch/css.d.ts +6 -0
- package/dist/tools/block/sketch/index.d.ts +13 -0
- package/dist/tools/block/sketch/input.d.ts +14 -0
- package/dist/tools/block/sketch/output.d.ts +16 -0
- package/dist/tools/block/table/css.d.ts +5 -0
- package/dist/tools/block/table/index.d.ts +13 -0
- package/dist/tools/block/table/input.d.ts +28 -0
- package/dist/tools/block/table/output.d.ts +28 -0
- package/dist/tools/block/toc/css.d.ts +6 -0
- package/dist/tools/block/toc/index.d.ts +13 -0
- package/dist/tools/block/toc/input.d.ts +11 -0
- package/dist/tools/block/toc/output.d.ts +18 -0
- package/dist/tools/block/typeset/css.d.ts +6 -0
- package/dist/tools/block/typeset/index.d.ts +22 -0
- package/dist/tools/block/typeset/input.d.ts +18 -0
- package/dist/tools/block/typeset/latex/layout.d.ts +32 -0
- package/dist/tools/block/typeset/latex/model.d.ts +64 -0
- package/dist/tools/block/typeset/latex/parse.d.ts +3 -0
- package/dist/tools/block/typeset/latex/render.d.ts +7 -0
- package/dist/tools/block/typeset/latex/symbols.d.ts +26 -0
- package/dist/tools/block/typeset/mermaid/layout.d.ts +71 -0
- package/dist/tools/block/typeset/mermaid/model.d.ts +78 -0
- package/dist/tools/block/typeset/mermaid/parse.d.ts +3 -0
- package/dist/tools/block/typeset/mermaid/render.d.ts +7 -0
- package/dist/tools/block/typeset/output.d.ts +46 -0
- package/dist/tools/block/updates/css.d.ts +6 -0
- package/dist/tools/block/updates/index.d.ts +13 -0
- package/dist/tools/block/updates/input.d.ts +14 -0
- package/dist/tools/block/updates/output.d.ts +19 -0
- package/dist/tools/block/video/css.d.ts +5 -0
- package/dist/tools/block/video/index.d.ts +13 -0
- package/dist/tools/block/video/input.d.ts +22 -0
- package/dist/tools/block/video/output.d.ts +9 -0
- package/dist/tools/index.d.ts +3 -0
- package/dist/tools/inline/bold/css.d.ts +3 -0
- package/dist/tools/inline/bold/index.d.ts +10 -0
- package/dist/tools/inline/code/css.d.ts +3 -0
- package/dist/tools/inline/code/index.d.ts +12 -0
- package/dist/tools/inline/italic/css.d.ts +3 -0
- package/dist/tools/inline/italic/index.d.ts +10 -0
- package/dist/tools/inline/link/css.d.ts +3 -0
- package/dist/tools/inline/link/dialog.d.ts +31 -0
- package/dist/tools/inline/link/index.d.ts +11 -0
- package/dist/tools/inline/marker/css.d.ts +3 -0
- package/dist/tools/inline/marker/index.d.ts +16 -0
- package/dist/tools/inline/mention/css.d.ts +3 -0
- package/dist/tools/inline/mention/index.d.ts +10 -0
- package/dist/tools/inline/status/css.d.ts +3 -0
- package/dist/tools/inline/status/dialog.d.ts +30 -0
- package/dist/tools/inline/status/index.d.ts +12 -0
- package/dist/tools/inline/strikethrough/css.d.ts +3 -0
- package/dist/tools/inline/strikethrough/index.d.ts +10 -0
- package/dist/tools/inline/tooltip/css.d.ts +3 -0
- package/dist/tools/inline/tooltip/dialog.d.ts +52 -0
- package/dist/tools/inline/tooltip/index.d.ts +21 -0
- package/dist/tools/inline/underline/css.d.ts +3 -0
- package/dist/tools/inline/underline/index.d.ts +10 -0
- package/dist/types.d.ts +947 -0
- package/dist/utils/dialogs/css.d.ts +3 -0
- package/dist/utils/dom.d.ts +20 -0
- package/dist/utils/icons.d.ts +7 -0
- package/dist/utils/platform.d.ts +82 -0
- package/dist/utils/sanitize-html-nodom.d.ts +2 -0
- package/dist/utils/switch/css.d.ts +3 -0
- package/dist/utils/switch/index.d.ts +30 -0
- package/dist/utils/tooltip/css.d.ts +3 -0
- package/dist/utils/tooltip/index.d.ts +4 -0
- package/dist/utils/url.d.ts +52 -0
- package/package.json +66 -0
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/** The parsed shape of a Mermaid diagram, independent of how it is drawn.
|
|
2
|
+
*
|
|
3
|
+
* Parsing yields this model and nothing else — no coordinates, no SVG — because
|
|
4
|
+
* the twin that draws it differs (TypeScript emits SVG, Dart paints), while what
|
|
5
|
+
* the source *means* must not. The layout pass turns this into geometry.
|
|
6
|
+
*
|
|
7
|
+
* The supported grammar is the closed list in the P7 design doc. Anything
|
|
8
|
+
* outside it must produce `{ ok: false, reason }` rather than a partial model:
|
|
9
|
+
* a diagram that disagrees with its own source is the failure P7-b exists to
|
|
10
|
+
* prevent, and dropping one unrecognised line is exactly how that happens. */
|
|
11
|
+
export type FlowDirection = 'BT' | 'LR' | 'RL' | 'TB' | 'TD';
|
|
12
|
+
export type FlowNodeShape = 'circle' | 'rect' | 'rhombus' | 'round' | 'stadium' | 'subroutine';
|
|
13
|
+
export type FlowEdgeLine = 'dotted' | 'solid' | 'thick';
|
|
14
|
+
export type FlowNode = {
|
|
15
|
+
id: string;
|
|
16
|
+
label: string;
|
|
17
|
+
shape: FlowNodeShape;
|
|
18
|
+
};
|
|
19
|
+
export type FlowEdge = {
|
|
20
|
+
arrow: boolean;
|
|
21
|
+
from: string;
|
|
22
|
+
label: string | null;
|
|
23
|
+
line: FlowEdgeLine;
|
|
24
|
+
to: string;
|
|
25
|
+
};
|
|
26
|
+
export type FlowchartModel = {
|
|
27
|
+
direction: FlowDirection;
|
|
28
|
+
edges: FlowEdge[];
|
|
29
|
+
kind: 'flowchart';
|
|
30
|
+
nodes: FlowNode[];
|
|
31
|
+
};
|
|
32
|
+
export type SequenceMessageLine = 'dotted' | 'solid';
|
|
33
|
+
/** `none` is a bare `->`, which Mermaid draws as a line with no terminator. */
|
|
34
|
+
export type SequenceMessageEnd = 'arrow' | 'cross' | 'none';
|
|
35
|
+
export type SequenceParticipant = {
|
|
36
|
+
actor: boolean;
|
|
37
|
+
id: string;
|
|
38
|
+
label: string;
|
|
39
|
+
};
|
|
40
|
+
export type SequenceMessage = {
|
|
41
|
+
/** `->>+B` opens an activation bar on the receiver as the message lands. */
|
|
42
|
+
activate: boolean;
|
|
43
|
+
deactivate: boolean;
|
|
44
|
+
end: SequenceMessageEnd;
|
|
45
|
+
from: string;
|
|
46
|
+
kind: 'message';
|
|
47
|
+
line: SequenceMessageLine;
|
|
48
|
+
text: string;
|
|
49
|
+
to: string;
|
|
50
|
+
};
|
|
51
|
+
export type SequenceNote = {
|
|
52
|
+
kind: 'note';
|
|
53
|
+
placement: 'left' | 'over' | 'right';
|
|
54
|
+
targets: string[];
|
|
55
|
+
text: string;
|
|
56
|
+
};
|
|
57
|
+
export type SequenceActivation = {
|
|
58
|
+
active: boolean;
|
|
59
|
+
kind: 'activation';
|
|
60
|
+
participant: string;
|
|
61
|
+
};
|
|
62
|
+
export type SequenceStep = SequenceActivation | SequenceMessage | SequenceNote;
|
|
63
|
+
export type SequenceModel = {
|
|
64
|
+
kind: 'sequence';
|
|
65
|
+
participants: SequenceParticipant[];
|
|
66
|
+
steps: SequenceStep[];
|
|
67
|
+
};
|
|
68
|
+
export type MermaidModel = FlowchartModel | SequenceModel;
|
|
69
|
+
/** `reason` is shown to the author in the fallback frame, so it names the
|
|
70
|
+
* construct that was not understood rather than a parser-internal position. */
|
|
71
|
+
export type MermaidParseResult = {
|
|
72
|
+
model: MermaidModel;
|
|
73
|
+
ok: true;
|
|
74
|
+
} | {
|
|
75
|
+
ok: false;
|
|
76
|
+
reason: string;
|
|
77
|
+
};
|
|
78
|
+
//# sourceMappingURL=model.d.ts.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Backing, ClepitElement } from '../../../../core/element';
|
|
2
|
+
import { MermaidLayout } from './layout';
|
|
3
|
+
/** One emission path, two destinations. The backing decides whether the diagram
|
|
4
|
+
* lands in a live document or in a string, so a server-rendered page and the
|
|
5
|
+
* editor cannot drift into drawing different pictures. */
|
|
6
|
+
export declare function renderMermaid(layout: MermaidLayout, backing?: Backing): ClepitElement;
|
|
7
|
+
//# sourceMappingURL=render.d.ts.map
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { Backing, ClepitElement } from '../../../core/element';
|
|
2
|
+
import { BlockClassNames, BlockStyles, OutputConfig, TypesetData } from '../../../types';
|
|
3
|
+
export type TypesetLanguage = 'LaTeX' | 'Mermaid';
|
|
4
|
+
/** Renders a typeset block's SOURCE in a labelled frame. Until an engine
|
|
5
|
+
* understands a construct this is the whole rendering, and it is deliberate: a
|
|
6
|
+
* diagram that silently renders as something other than what it says is worse
|
|
7
|
+
* than one showing exactly what the author wrote.
|
|
8
|
+
*
|
|
9
|
+
* Source is author text and goes in through `textContent` — never `innerHTML` —
|
|
10
|
+
* so `\href{javascript:…}` or a `<script>` in a mermaid label is inert. */
|
|
11
|
+
export declare class TypesetOutput {
|
|
12
|
+
static render(language: TypesetLanguage, data: TypesetData, _config?: OutputConfig, styles?: BlockStyles['latex'], classNames?: BlockClassNames['latex']): HTMLElement;
|
|
13
|
+
/** The kind label only appears here, not in the success path above: once a
|
|
14
|
+
* diagram or formula actually renders, the visual output says what it is —
|
|
15
|
+
* the label is only useful when the block is showing raw, unrendered source.
|
|
16
|
+
*
|
|
17
|
+
* The source frame is optionally preceded by the reason the engine could not
|
|
18
|
+
* draw it. Naming the unsupported construct is the whole point: a blank or
|
|
19
|
+
* partial diagram reads as "this diagram is empty" rather than "this engine
|
|
20
|
+
* does not understand it yet". */
|
|
21
|
+
private static appendFallback;
|
|
22
|
+
/**
|
|
23
|
+
* The same drawing, against the element layer, so it runs with no browser.
|
|
24
|
+
*
|
|
25
|
+
* The engines themselves are shared rather than reimplemented: `renderLatex`
|
|
26
|
+
* and `renderMermaid` now take a backing, so a formula drawn on a server and
|
|
27
|
+
* one drawn in the editor come out of the same emission code.
|
|
28
|
+
*
|
|
29
|
+
* Where `render` appends the title then prepends the kind label, this builds
|
|
30
|
+
* them in their final order directly. The order matters beyond looks:
|
|
31
|
+
* `.clepit-typeset__kind:has(+ .clepit-typeset__title)` styles the label only
|
|
32
|
+
* when it sits immediately before the title.
|
|
33
|
+
*/
|
|
34
|
+
static draw(language: TypesetLanguage, data: TypesetData, backing?: Backing): ClepitElement | null;
|
|
35
|
+
private static drawFallback;
|
|
36
|
+
private static validate;
|
|
37
|
+
}
|
|
38
|
+
export declare class LatexOutput {
|
|
39
|
+
static render(data: TypesetData, config?: OutputConfig, styles?: BlockStyles['latex'], classNames?: BlockClassNames['latex']): HTMLElement;
|
|
40
|
+
static draw(data: TypesetData, backing?: Backing): ClepitElement | null;
|
|
41
|
+
}
|
|
42
|
+
export declare class MermaidOutput {
|
|
43
|
+
static render(data: TypesetData, config?: OutputConfig, styles?: BlockStyles['mermaid'], classNames?: BlockClassNames['mermaid']): HTMLElement;
|
|
44
|
+
static draw(data: TypesetData, backing?: Backing): ClepitElement | null;
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=output.d.ts.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const inputStylesKey = "updates-input";
|
|
2
|
+
export declare const outputStylesKey = "updates-output";
|
|
3
|
+
export declare const sharedStyle = "\n.clepit-updates {\n display: flex;\n align-items: center;\n gap: 10px;\n padding: 12px;\n border: 1px solid rgba(127, 127, 127, 0.35);\n border-radius: 8px;\n color: inherit;\n}\n.clepit-updates__icon {\n font-size: 18px;\n line-height: 1;\n}\n.clepit-updates__label {\n opacity: 0.7;\n}\n";
|
|
4
|
+
export declare const inputStyle = "\n.clepit-updates {\n display: flex;\n align-items: center;\n gap: 10px;\n padding: 12px;\n border: 1px solid rgba(127, 127, 127, 0.35);\n border-radius: 8px;\n color: inherit;\n}\n.clepit-updates__icon {\n font-size: 18px;\n line-height: 1;\n}\n.clepit-updates__label {\n opacity: 0.7;\n}\n";
|
|
5
|
+
export declare const outputStyle = "\n.clepit-updates {\n display: flex;\n align-items: center;\n gap: 10px;\n padding: 12px;\n border: 1px solid rgba(127, 127, 127, 0.35);\n border-radius: 8px;\n color: inherit;\n}\n.clepit-updates__icon {\n font-size: 18px;\n line-height: 1;\n}\n.clepit-updates__label {\n opacity: 0.7;\n}\n";
|
|
6
|
+
//# sourceMappingURL=css.d.ts.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { UpdatesInput } from './input';
|
|
2
|
+
import { UpdatesOutput } from './output';
|
|
3
|
+
import { ToolType } from '../../../types';
|
|
4
|
+
export declare const UpdatesTool: {
|
|
5
|
+
icon: string;
|
|
6
|
+
readonly input: typeof UpdatesInput;
|
|
7
|
+
label: string;
|
|
8
|
+
readonly output: typeof UpdatesOutput;
|
|
9
|
+
shortcut: string;
|
|
10
|
+
testId: string;
|
|
11
|
+
type: ToolType;
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { InputConfig, UpdatesData } from '../../../types';
|
|
2
|
+
export declare class UpdatesInput {
|
|
3
|
+
static placeholder: string;
|
|
4
|
+
private static eventListenersMap;
|
|
5
|
+
static save(element: HTMLElement): UpdatesData;
|
|
6
|
+
static render(containerId: string, data?: UpdatesData, config?: InputConfig<'updates'>): HTMLElement;
|
|
7
|
+
/** Never empty. An absent page id is the meaningful default — "this document"
|
|
8
|
+
* — not a field the author failed to fill, so the block must not be swept up
|
|
9
|
+
* by empty-block cleanup. */
|
|
10
|
+
static isEmpty(_blockElement: HTMLElement): boolean;
|
|
11
|
+
static isEmptyData(_data: UpdatesData): boolean;
|
|
12
|
+
static destroy(containerId: string): void;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=input.d.ts.map
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Backing, ClepitElement } from '../../../core/element';
|
|
2
|
+
import { BlockClassNames, BlockStyles, OutputConfig, UpdatesData } from '../../../types';
|
|
3
|
+
/** An `updates` block renders as the reference it is. The activity list lives on
|
|
4
|
+
* the server and changes by the hour, so a public page or an export shows the
|
|
5
|
+
* pointer — never a frozen list that will read as current long after it is not. */
|
|
6
|
+
export declare class UpdatesOutput {
|
|
7
|
+
static render(data: UpdatesData, _config?: OutputConfig, styles?: BlockStyles['updates'], classNames?: BlockClassNames['updates']): HTMLElement;
|
|
8
|
+
/**
|
|
9
|
+
* The same drawing, against the element layer, so it runs with no browser.
|
|
10
|
+
*
|
|
11
|
+
* This one refuses data `render` would tolerate. `render` reads `data?.pageId`
|
|
12
|
+
* and draws the default pointer for anything, which is right in an editor
|
|
13
|
+
* where the block is always an object. What `draw` emits is served to the
|
|
14
|
+
* public internet, so it holds the same line every other drawer holds and
|
|
15
|
+
* refuses a payload that is not a block's data at all.
|
|
16
|
+
*/
|
|
17
|
+
static draw(data: UpdatesData, backing?: Backing): ClepitElement | null;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=output.d.ts.map
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const inputStylesKey = "clepit-video-input-styles";
|
|
2
|
+
export declare const inputStyle: string;
|
|
3
|
+
export declare const outputStylesKey = "clepit-video-output-styles";
|
|
4
|
+
export declare const outputStyle = "\n/* Output video styles */\n.clepit-output-video-container {\n margin: 1rem 0;\n text-align: center;\n}\n\n.clepit-output-video {\n max-width: 100%;\n height: auto;\n border-radius: 8px;\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);\n}\n\n.clepit-output-video-caption {\n margin-top: 0.5rem;\n font-size: 0.875rem;\n color: var(--clepit-text-muted);\n font-style: italic;\n text-align: center;\n}\n\n/* Output video alignment */\n.clepit-output-video-wr--left {\n justify-content: flex-start;\n}\n\n.clepit-output-video-wr--center {\n justify-content: center;\n}\n\n.clepit-output-video-wr--right {\n justify-content: flex-end;\n}\n";
|
|
5
|
+
//# sourceMappingURL=css.d.ts.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { VideoInput } from './input';
|
|
2
|
+
import { VideoOutput } from './output';
|
|
3
|
+
import { ToolType } from '../../../types';
|
|
4
|
+
export declare const VideoTool: {
|
|
5
|
+
icon: string;
|
|
6
|
+
readonly input: typeof VideoInput;
|
|
7
|
+
label: string;
|
|
8
|
+
readonly output: typeof VideoOutput;
|
|
9
|
+
shortcut: string;
|
|
10
|
+
testId: string;
|
|
11
|
+
type: ToolType;
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Alignment, InputConfig, UploadFunction, VideoData } from '../../../types';
|
|
2
|
+
export declare class VideoInput {
|
|
3
|
+
static placeholder: string;
|
|
4
|
+
private static eventListenersMap;
|
|
5
|
+
private static validTypes;
|
|
6
|
+
private static addEventListener;
|
|
7
|
+
static save(element: HTMLElement): VideoData;
|
|
8
|
+
static render(uploadFunction: UploadFunction, containerId: string, data?: VideoData, config?: InputConfig<'video'>): HTMLElement;
|
|
9
|
+
private static renderVideo;
|
|
10
|
+
private static renderDropArea;
|
|
11
|
+
private static handleFileDrop;
|
|
12
|
+
private static handleFileSelect;
|
|
13
|
+
private static isValidVideoFile;
|
|
14
|
+
private static processVideoFile;
|
|
15
|
+
private static showLoading;
|
|
16
|
+
private static showError;
|
|
17
|
+
static setAlignment(block: HTMLElement, alignment: Alignment): void;
|
|
18
|
+
static isEmpty(blockElement: HTMLElement): boolean;
|
|
19
|
+
static isEmptyData(data: VideoData): boolean;
|
|
20
|
+
static destroy(containerId: string): void;
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=input.d.ts.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Backing, ClepitElement } from '../../../core/element';
|
|
2
|
+
import { BlockClassNames, BlockStyles, OutputConfig, VideoData } from '../../../types';
|
|
3
|
+
export declare class VideoOutput {
|
|
4
|
+
static render(data: VideoData, config?: OutputConfig, styles?: BlockStyles['video'], classNames?: BlockClassNames['video']): HTMLElement;
|
|
5
|
+
/** The same drawing, against the element layer, so it runs with no browser. */
|
|
6
|
+
static draw(data: VideoData, backing?: Backing): ClepitElement | null;
|
|
7
|
+
private static validate;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=output.d.ts.map
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export declare const stylesKey = "clepit-bold-styles";
|
|
2
|
+
export declare const style = "\n/* Bold inline formatting styles */\n.clepit-toolbar-button strong,\n.clepit-toolbar-button em,\n.clepit-toolbar-button u,\n.clepit-toolbar-button code,\n.clepit-toolbar-button mark {\n font-size: inherit;\n font-weight: inherit;\n font-style: inherit;\n text-decoration: inherit;\n background: transparent;\n padding: 0;\n border-radius: 0;\n font-family: inherit;\n}\n";
|
|
3
|
+
//# sourceMappingURL=css.d.ts.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare class BoldInput {
|
|
2
|
+
static label: string;
|
|
3
|
+
static icon: string;
|
|
4
|
+
static shortcut: string;
|
|
5
|
+
static apply(range: Range): void;
|
|
6
|
+
static remove(range: Range): void;
|
|
7
|
+
static isActive(range: Range): boolean;
|
|
8
|
+
private static findBoldElement;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export declare const stylesKey = "clepit-inline-code-styles";
|
|
2
|
+
export declare const style = "\n/* Inline code styling when <code> is within editable text */\n.clepit-paragraph code,\n.clepit-header code,\n.clepit-list-item code,\n.clepit-quote-text code,\n.clepit-quote-caption code {\n background: var(--clepit-error-bg);\n color: var(--clepit-error);\n padding: 0 4px;\n border-radius: 4px;\n}\n\n/* Output inline code styling */\n.clepit-output-paragraph code,\n.clepit-output-header code,\n.clepit-output-list li code,\n.clepit-output-quote code,\n.clepit-output-quote cite code {\n background: var(--clepit-error-bg);\n color: var(--clepit-error);\n padding: 0 4px;\n border-radius: 4px;\n}\n\n/* Toolbar button code styling */\n.clepit-toolbar-button strong,\n.clepit-toolbar-button em,\n.clepit-toolbar-button u,\n.clepit-toolbar-button code,\n.clepit-toolbar-button mark {\n font-size: inherit;\n font-weight: inherit;\n font-style: inherit;\n text-decoration: inherit;\n background: transparent;\n padding: 0;\n border-radius: 0;\n font-family: inherit;\n}\n";
|
|
3
|
+
//# sourceMappingURL=css.d.ts.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { BlockClassNames, BlockStyles } from '../../../types';
|
|
2
|
+
export declare class InlineCodeInput {
|
|
3
|
+
static label: string;
|
|
4
|
+
static icon: string;
|
|
5
|
+
static shortcut: string;
|
|
6
|
+
static apply(range: Range, classNames: BlockClassNames['inline-code'], styles: BlockStyles['inline-code']): void;
|
|
7
|
+
static remove(range: Range): void;
|
|
8
|
+
static isActive(range: Range): boolean;
|
|
9
|
+
private static findCodeElement;
|
|
10
|
+
private static updateExistingCodeElements;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export declare const stylesKey = "clepit-italic-styles";
|
|
2
|
+
export declare const style = "\n/* Italic inline formatting styles */\n.clepit-toolbar-button strong,\n.clepit-toolbar-button em,\n.clepit-toolbar-button u,\n.clepit-toolbar-button code,\n.clepit-toolbar-button mark {\n font-size: inherit;\n font-weight: inherit;\n font-style: inherit;\n text-decoration: inherit;\n background: transparent;\n padding: 0;\n border-radius: 0;\n font-family: inherit;\n}\n\n.clepit-menu-icon--italic {\n font-style: italic;\n}\n";
|
|
3
|
+
//# sourceMappingURL=css.d.ts.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare class ItalicInput {
|
|
2
|
+
static label: string;
|
|
3
|
+
static icon: string;
|
|
4
|
+
static shortcut: string;
|
|
5
|
+
static apply(range: Range): void;
|
|
6
|
+
static remove(range: Range): void;
|
|
7
|
+
static isActive(range: Range): boolean;
|
|
8
|
+
private static findItalicElement;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { EditorClassNames, EditorStyles } from '../../../types';
|
|
2
|
+
export interface LinkDialogOptions {
|
|
3
|
+
text: string;
|
|
4
|
+
url: string;
|
|
5
|
+
onConfirm: (text: string, url: string) => void;
|
|
6
|
+
onCancel: () => void;
|
|
7
|
+
styles?: EditorStyles['dialogs'];
|
|
8
|
+
classNames?: EditorClassNames['dialogs'];
|
|
9
|
+
}
|
|
10
|
+
export declare class LinkDialog {
|
|
11
|
+
private static isOpen;
|
|
12
|
+
private overlay;
|
|
13
|
+
private dialog;
|
|
14
|
+
private textInput;
|
|
15
|
+
private urlInput;
|
|
16
|
+
private options;
|
|
17
|
+
constructor(options: LinkDialogOptions);
|
|
18
|
+
show(): void;
|
|
19
|
+
hide(): void;
|
|
20
|
+
private createDialog;
|
|
21
|
+
private createInputGroup;
|
|
22
|
+
private createButtonGroup;
|
|
23
|
+
private bindEvents;
|
|
24
|
+
private handleKeyDown;
|
|
25
|
+
private handleInputKeyDown;
|
|
26
|
+
private focusFirstInput;
|
|
27
|
+
private applyStyles;
|
|
28
|
+
private applyClassNames;
|
|
29
|
+
destroy(): void;
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=dialog.d.ts.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { EditorClassNames, EditorStyles } from '../../../types';
|
|
2
|
+
export declare class LinkInput {
|
|
3
|
+
static label: string;
|
|
4
|
+
static icon: string;
|
|
5
|
+
static shortcut: string;
|
|
6
|
+
static apply(range: Range, classNames: EditorClassNames['dialogs'], styles: EditorStyles['dialogs']): void;
|
|
7
|
+
static remove(range: Range): void;
|
|
8
|
+
private static findLinkElement;
|
|
9
|
+
static isActive(range: Range): boolean;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export declare const stylesKey = "clepit-marker-styles";
|
|
2
|
+
export declare const style = "\n/* Marker brush effect */\n.clepit-paragraph mark,\n.clepit-header mark,\n.clepit-list-item mark,\n.clepit-quote-text mark,\n.clepit-quote-caption mark {\n background: none;\n position: relative;\n color: inherit;\n display: inline-block;\n z-index: 0; /* create stacking context so ::before sits behind text, not page */\n white-space: pre-wrap; /* ensure leading/trailing spaces inside mark render */\n}\n.clepit-paragraph mark::before,\n.clepit-header mark::before,\n.clepit-list-item mark::before,\n.clepit-quote-text mark::before,\n.clepit-quote-caption mark::before {\n content: '';\n position: absolute;\n left: 0;\n right: 0;\n top: 0.15em;\n height: 1.25em;\n transform: rotate(-0.4deg);\n -webkit-mask-image: url(\"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 20' preserveAspectRatio='none'><path d='M0,8 C5,2 15,1 25,3 35,5 45,2 55,4 65,6 75,5 85,7 95,9 100,8 100,8 100,14 95,18 85,17 75,16 65,19 55,17 45,15 35,18 25,16 15,14 5,15 0,12 Z'/></svg>\");\n mask-image: url(\"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 20' preserveAspectRatio='none'><path d='M0,8 C5,2 15,1 25,3 35,5 45,2 55,4 65,6 75,5 85,7 95,9 100,8 100,8 100,14 95,18 85,17 75,16 65,19 55,17 45,15 35,18 25,16 15,14 5,15 0,12 Z'/></svg>\");\n -webkit-mask-size: 100% 100%;\n mask-size: 100% 100%;\n -webkit-mask-repeat: no-repeat;\n mask-repeat: no-repeat;\n background-color: var(--clepit-marker);\n z-index: -1; /* behind text but within mark's stacking context */\n}\n\n/* Output marker brush effect for <mark> */\n.clepit-output-paragraph mark,\n.clepit-output-header mark,\n.clepit-output-list li mark,\n.clepit-output-quote mark,\n.clepit-output-quote cite mark {\n background: none;\n position: relative;\n color: inherit;\n display: inline-block;\n z-index: 0;\n white-space: pre-wrap;\n}\n.clepit-output-paragraph mark::before,\n.clepit-output-header mark::before,\n.clepit-output-list li mark::before,\n.clepit-output-quote mark::before,\n.clepit-output-quote cite mark::before {\n content: '';\n position: absolute;\n left: 0;\n right: 0;\n top: 0.15em;\n height: 1.25em;\n transform: rotate(-0.4deg);\n -webkit-mask-image: url(\"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 20' preserveAspectRatio='none'><path d='M0,8 C5,2 15,1 25,3 35,5 45,2 55,4 65,6 75,5 85,7 95,9 100,8 100,8 100,14 95,18 85,17 75,16 65,19 55,17 45,15 35,18 25,16 15,14 5,15 0,12 Z'/></svg>\");\n mask-image: url(\"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 20' preserveAspectRatio='none'><path d='M0,8 C5,2 15,1 25,3 35,5 45,2 55,4 65,6 75,5 85,7 95,9 100,8 100,8 100,14 95,18 85,17 75,16 65,19 55,17 45,15 35,18 25,16 15,14 5,15 0,12 Z'/></svg>\");\n -webkit-mask-size: 100% 100%;\n mask-size: 100% 100%;\n -webkit-mask-repeat: no-repeat;\n mask-repeat: no-repeat;\n background-color: var(--clepit-marker);\n z-index: -1;\n}\n\n/* Marker wrapper styling */\n.clepit-marker-wrapper {\n position: relative;\n display: inline-block;\n z-index: 0;\n white-space: pre-wrap;\n color: inherit;\n}\n\n/* Marker stroke styling */\n.clepit-marker-stroke {\n content: '';\n position: absolute;\n left: 0;\n right: 0;\n top: 0.15em;\n height: 1.25em;\n transform: rotate(-0.4deg);\n z-index: -1;\n pointer-events: none;\n -webkit-mask-image: url(\"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 20' preserveAspectRatio='none'><path d='M0,8 C5,2 15,1 25,3 35,5 45,2 55,4 65,6 75,5 85,7 95,9 100,8 100,8 100,14 95,18 85,17 75,16 65,19 55,17 45,15 35,18 25,16 15,14 5,15 0,12 Z'/></svg>\");\n mask-image: url(\"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 20' preserveAspectRatio='none'><path d='M0,8 C5,2 15,1 25,3 35,5 45,2 55,4 65,6 75,5 85,7 95,9 100,8 100,8 100,14 95,18 85,17 75,16 65,19 55,17 45,15 35,18 25,16 15,14 5,15 0,12 Z'/></svg>\");\n -webkit-mask-size: 100% 100%;\n mask-size: 100% 100%;\n -webkit-mask-repeat: no-repeat;\n mask-repeat: no-repeat;\n background-color: var(--clepit-marker);\n}\n\n/* Toolbar button mark styling */\n.clepit-toolbar-button strong,\n.clepit-toolbar-button em,\n.clepit-toolbar-button u,\n.clepit-toolbar-button code,\n.clepit-toolbar-button mark {\n font-size: inherit;\n font-weight: inherit;\n font-style: inherit;\n text-decoration: inherit;\n background: transparent;\n padding: 0;\n border-radius: 0;\n font-family: inherit;\n}\n";
|
|
3
|
+
//# sourceMappingURL=css.d.ts.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { BlockClassNames, BlockStyles } from '../../../types';
|
|
2
|
+
export declare class MarkerInput {
|
|
3
|
+
static label: string;
|
|
4
|
+
static icon: string;
|
|
5
|
+
static shortcut: string;
|
|
6
|
+
static apply(range: Range, classNames: BlockClassNames['marker'], styles: BlockStyles['marker']): void;
|
|
7
|
+
static remove(range: Range): void;
|
|
8
|
+
private static cleanupSpaces;
|
|
9
|
+
static isActive(range: Range): boolean;
|
|
10
|
+
private static findMarkerElement;
|
|
11
|
+
private static findLegacyMarkElement;
|
|
12
|
+
private static applyUserStyles;
|
|
13
|
+
private static createStrokeSVG;
|
|
14
|
+
private static colorToHex;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export declare const stylesKey = "inline-mention";
|
|
2
|
+
export declare const style = "\n.clepit-mention {\n display: inline;\n padding: 1px 4px;\n border-radius: 4px;\n background: rgba(91, 91, 255, 0.12);\n color: #5b5bff;\n font-weight: 500;\n white-space: nowrap;\n}\n.clepit-doc-link {\n color: #5b5bff;\n text-decoration: underline;\n cursor: pointer;\n}\n";
|
|
3
|
+
//# sourceMappingURL=css.d.ts.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** Inline reference entities: `@mention` chips (`span[data-user-id]`) and
|
|
2
|
+
* doc links (`a[data-page-id]`). Hosts drive WHO/WHAT via their own pickers
|
|
3
|
+
* and call these helpers to insert the entity at the caret; the sanitizer
|
|
4
|
+
* whitelists both attributes so the chips survive save. */
|
|
5
|
+
export declare class MentionInput {
|
|
6
|
+
static insertMentionAtCaret(userId: string, label: string): boolean;
|
|
7
|
+
static insertDocLinkAtCaret(pageId: string, title: string): boolean;
|
|
8
|
+
private static insertAtCaret;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export declare const stylesKey = "clepit-inline-status-styles";
|
|
2
|
+
export declare const style = "\n/* Inline status \u2014 same visual language as the Alert block but inline. */\n.clepit-status {\n display: inline;\n padding: 2px 8px;\n border-radius: 4px;\n font-size: 0.9em;\n line-height: 1.5;\n vertical-align: baseline;\n}\n\n.clepit-status[data-status-variant=\"info\"] {\n background: var(--clepit-primary-bg);\n color: var(--clepit-primary-hover);\n}\n\n.clepit-status[data-status-variant=\"success\"] {\n background: var(--clepit-success-bg);\n color: var(--clepit-success);\n}\n\n.clepit-status[data-status-variant=\"warning\"] {\n background: var(--clepit-warning-bg);\n color: var(--clepit-warning);\n}\n\n.clepit-status[data-status-variant=\"error\"] {\n background: var(--clepit-error-bg);\n color: var(--clepit-error);\n}\n\n.clepit-status[data-status-variant=\"plain\"] {\n background: transparent;\n color: inherit;\n}\n\n/* Dialog variant picker \u2014 mirrors inline chip styling at rest, highlight on hover/selected. */\n.clepit-status-dialog-variants {\n display: flex;\n flex-wrap: wrap;\n gap: 8px;\n margin-top: 4px;\n}\n\n.clepit-status-dialog-variant {\n appearance: none;\n -webkit-appearance: none;\n background: transparent;\n border: 1px solid var(--clepit-border);\n border-radius: 4px;\n padding: 6px 12px;\n cursor: pointer;\n font-family: inherit;\n font-size: 13px;\n color: var(--clepit-text);\n transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;\n}\n\n.clepit-status-dialog-variant:hover {\n border-color: transparent;\n}\n\n.clepit-status-dialog-variant--info:hover,\n.clepit-status-dialog-variant--info[data-selected=\"true\"] {\n background: var(--clepit-primary-bg);\n color: var(--clepit-primary-hover);\n border-color: transparent;\n}\n\n.clepit-status-dialog-variant--success:hover,\n.clepit-status-dialog-variant--success[data-selected=\"true\"] {\n background: var(--clepit-success-bg);\n color: var(--clepit-success);\n border-color: transparent;\n}\n\n.clepit-status-dialog-variant--warning:hover,\n.clepit-status-dialog-variant--warning[data-selected=\"true\"] {\n background: var(--clepit-warning-bg);\n color: var(--clepit-warning);\n border-color: transparent;\n}\n\n.clepit-status-dialog-variant--error:hover,\n.clepit-status-dialog-variant--error[data-selected=\"true\"] {\n background: var(--clepit-error-bg);\n color: var(--clepit-error);\n border-color: transparent;\n}\n\n.clepit-status-dialog-variant--plain:hover,\n.clepit-status-dialog-variant--plain[data-selected=\"true\"] {\n background: var(--clepit-surface);\n color: var(--clepit-text);\n border-color: transparent;\n}\n";
|
|
3
|
+
//# sourceMappingURL=css.d.ts.map
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { EditorClassNames, EditorStyles } from '../../../types';
|
|
2
|
+
export type StatusVariant = 'info' | 'success' | 'warning' | 'error' | 'plain';
|
|
3
|
+
export declare const STATUS_VARIANTS: StatusVariant[];
|
|
4
|
+
export type StatusDialogOptions = {
|
|
5
|
+
text: string;
|
|
6
|
+
variant: StatusVariant;
|
|
7
|
+
onConfirm: (text: string, variant: StatusVariant) => void;
|
|
8
|
+
onCancel: () => void;
|
|
9
|
+
styles?: EditorStyles['dialogs'];
|
|
10
|
+
classNames?: EditorClassNames['dialogs'];
|
|
11
|
+
};
|
|
12
|
+
export declare class StatusDialog {
|
|
13
|
+
private static isOpen;
|
|
14
|
+
private overlay;
|
|
15
|
+
private dialog;
|
|
16
|
+
private textInput;
|
|
17
|
+
private variant;
|
|
18
|
+
private options;
|
|
19
|
+
constructor(options: StatusDialogOptions);
|
|
20
|
+
show(): void;
|
|
21
|
+
hide(): void;
|
|
22
|
+
private createDialog;
|
|
23
|
+
private bindEvents;
|
|
24
|
+
private focusFirstInput;
|
|
25
|
+
private handleConfirm;
|
|
26
|
+
private handleCancel;
|
|
27
|
+
private cleanupKeyHandler;
|
|
28
|
+
private applyStyles;
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=dialog.d.ts.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { EditorClassNames, EditorStyles } from '../../../types';
|
|
2
|
+
export declare class StatusInput {
|
|
3
|
+
static label: string;
|
|
4
|
+
static icon: string;
|
|
5
|
+
static apply(range: Range, classNames: EditorClassNames['dialogs'], styles: EditorStyles['dialogs']): void;
|
|
6
|
+
static remove(range: Range): void;
|
|
7
|
+
static isActive(range: Range): boolean;
|
|
8
|
+
private static unwrap;
|
|
9
|
+
private static findStatusElement;
|
|
10
|
+
private static readVariant;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export declare const stylesKey = "clepit-strikethrough-styles";
|
|
2
|
+
export declare const style = "\n/* Strikethrough inline formatting styles */\n.clepit-toolbar-button strong,\n.clepit-toolbar-button em,\n.clepit-toolbar-button u,\n.clepit-toolbar-button s,\n.clepit-toolbar-button del,\n.clepit-toolbar-button code,\n.clepit-toolbar-button mark {\n font-size: inherit;\n font-weight: inherit;\n font-style: inherit;\n text-decoration: inherit;\n background: transparent;\n padding: 0;\n border-radius: 0;\n font-family: inherit;\n}\n\n/* Keep strikethrough visual hint without changing size */\n.clepit-toolbar-button[data-tool=\"strikethrough\"] {\n text-decoration: line-through;\n}\n";
|
|
3
|
+
//# sourceMappingURL=css.d.ts.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare class StrikethroughInput {
|
|
2
|
+
static label: string;
|
|
3
|
+
static icon: string;
|
|
4
|
+
static shortcut: string;
|
|
5
|
+
static apply(range: Range): void;
|
|
6
|
+
static remove(range: Range): void;
|
|
7
|
+
static isActive(range: Range): boolean;
|
|
8
|
+
private static findStrikethroughElement;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { CSSProperties } from '../../../types';
|
|
2
|
+
export type TooltipDialogOptions = {
|
|
3
|
+
text: string;
|
|
4
|
+
tooltip: string;
|
|
5
|
+
onConfirm: (text: string, tooltip: string) => void;
|
|
6
|
+
onCancel: () => void;
|
|
7
|
+
onShow?: () => void;
|
|
8
|
+
onHide?: () => void;
|
|
9
|
+
styles?: {
|
|
10
|
+
overlay?: CSSProperties;
|
|
11
|
+
container?: CSSProperties;
|
|
12
|
+
title?: CSSProperties;
|
|
13
|
+
group?: CSSProperties;
|
|
14
|
+
label?: CSSProperties;
|
|
15
|
+
input?: CSSProperties;
|
|
16
|
+
buttons?: CSSProperties;
|
|
17
|
+
cancelButton?: CSSProperties;
|
|
18
|
+
saveButton?: CSSProperties;
|
|
19
|
+
};
|
|
20
|
+
classNames?: {
|
|
21
|
+
overlay?: string;
|
|
22
|
+
container?: string;
|
|
23
|
+
title?: string;
|
|
24
|
+
group?: string;
|
|
25
|
+
label?: string;
|
|
26
|
+
input?: string;
|
|
27
|
+
buttons?: string;
|
|
28
|
+
cancelButton?: string;
|
|
29
|
+
saveButton?: string;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
export declare class TooltipDialog {
|
|
33
|
+
private overlay;
|
|
34
|
+
private dialog;
|
|
35
|
+
private inputText;
|
|
36
|
+
private inputTooltip;
|
|
37
|
+
private options;
|
|
38
|
+
constructor(options: TooltipDialogOptions);
|
|
39
|
+
show(): void;
|
|
40
|
+
hide(): void;
|
|
41
|
+
private createDialog;
|
|
42
|
+
private createInputGroup;
|
|
43
|
+
private createButtonGroup;
|
|
44
|
+
private bindEvents;
|
|
45
|
+
private handleKeyDown;
|
|
46
|
+
private handleInputKeyDown;
|
|
47
|
+
private focusFirstInput;
|
|
48
|
+
private applyStyles;
|
|
49
|
+
private applyClassNames;
|
|
50
|
+
destroy(): void;
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=dialog.d.ts.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { BlockClassNames, BlockStyles, EditorClassNames, EditorStyles } from '../../../types';
|
|
2
|
+
type EditorStylesAndClassNames = {
|
|
3
|
+
classNames: EditorClassNames['tooltips'];
|
|
4
|
+
styles: EditorStyles['tooltips'];
|
|
5
|
+
};
|
|
6
|
+
type BlockStylesAndClassNames = {
|
|
7
|
+
classNames: BlockClassNames['tooltip'];
|
|
8
|
+
styles: BlockStyles['tooltip'];
|
|
9
|
+
};
|
|
10
|
+
export declare class TooltipInput {
|
|
11
|
+
static label: string;
|
|
12
|
+
static icon: string;
|
|
13
|
+
static shortcut: string;
|
|
14
|
+
static apply(range: Range, editorStylesAndClassNames: EditorStylesAndClassNames, blockStylesAndClassNames: BlockStylesAndClassNames): void;
|
|
15
|
+
static remove(range: Range): void;
|
|
16
|
+
static isActive(range: Range): boolean;
|
|
17
|
+
static initializeElements(container: HTMLElement, blockStylesAndClassNames: BlockStylesAndClassNames): void;
|
|
18
|
+
private static findTooltipSpan;
|
|
19
|
+
}
|
|
20
|
+
export {};
|
|
21
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export declare const stylesKey = "clepit-underline-styles";
|
|
2
|
+
export declare const style = "\n/* Underline inline formatting styles */\n.clepit-toolbar-button strong,\n.clepit-toolbar-button em,\n.clepit-toolbar-button u,\n.clepit-toolbar-button code,\n.clepit-toolbar-button mark {\n font-size: inherit;\n font-weight: inherit;\n font-style: inherit;\n text-decoration: inherit;\n background: transparent;\n padding: 0;\n border-radius: 0;\n font-family: inherit;\n}\n\n/* Keep underline visual hint without changing size */\n.clepit-toolbar-button[data-tool=\"underline\"] {\n text-decoration: underline;\n}\n";
|
|
3
|
+
//# sourceMappingURL=css.d.ts.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare class UnderlineInput {
|
|
2
|
+
static label: string;
|
|
3
|
+
static icon: string;
|
|
4
|
+
static shortcut: string;
|
|
5
|
+
static apply(range: Range): void;
|
|
6
|
+
static remove(range: Range): void;
|
|
7
|
+
static isActive(range: Range): boolean;
|
|
8
|
+
private static findUnderlineElement;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|