@clepit/core 0.5.0-beta.341 → 0.5.0-beta.350
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/dist/core/editor/issues.d.ts +19 -0
- package/dist/core/element/index.d.ts +13 -1
- package/dist/core/managers/block/index.d.ts +3 -0
- package/dist/core/managers/event.d.ts +5 -0
- package/dist/index.d.ts +7 -2
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/tools/block/embed/css.d.ts +3 -3
- package/dist/tools/block/embed/input.d.ts +10 -1
- package/dist/tools/block/embed/issue-card.d.ts +17 -0
- package/dist/tools/block/embed/offer.d.ts +9 -0
- package/dist/tools/block/embed/output.d.ts +16 -2
- package/dist/tools/block/embed/paste.d.ts +16 -0
- package/dist/tools/block/embed/providers.d.ts +7 -2
- package/dist/tools/block/issues/css.d.ts +7 -0
- package/dist/tools/block/issues/index.d.ts +13 -0
- package/dist/tools/block/issues/input.d.ts +14 -0
- package/dist/tools/block/issues/output.d.ts +24 -0
- package/dist/tools/inline/issue/css.d.ts +10 -0
- package/dist/tools/inline/issue/index.d.ts +58 -0
- package/dist/tools/inline/issue/labels.d.ts +11 -0
- package/dist/tools/inline/issue/menu.d.ts +14 -0
- package/dist/tools/inline/issue/paste.d.ts +22 -0
- package/dist/tools/inline/issue/providers.d.ts +9 -0
- package/dist/types.d.ts +126 -5
- package/package.json +1 -1
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/** Five minutes: an issue's status is a slow thing, and a page left open all
|
|
2
|
+
* day should not cost a tracker a read a minute. */
|
|
3
|
+
export declare const REFRESH_EVERY_MS: number;
|
|
4
|
+
/**
|
|
5
|
+
* Keeps a page's issues current while it is open: one lookup on mount, again
|
|
6
|
+
* when the window regains focus (the reader came back from the tracker), and
|
|
7
|
+
* every five minutes. Chips, cards and tables are redrawn in place; the
|
|
8
|
+
* document is not marked changed, because nothing the author did changed.
|
|
9
|
+
*/
|
|
10
|
+
export declare class IssueRefresh {
|
|
11
|
+
private static timers;
|
|
12
|
+
private static focusHandlers;
|
|
13
|
+
static start(containerId: string): void;
|
|
14
|
+
static stop(containerId: string): void;
|
|
15
|
+
/** The URLs a refresh asks about: every chip and every issue card in the editor. */
|
|
16
|
+
static urls(containerId: string): string[];
|
|
17
|
+
static run(containerId: string): Promise<void>;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=issues.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Block } from '../../types';
|
|
1
|
+
import { Block, EmbedLabel, IssueChipParts, IssueLabel, IssueSnapshot } from '../../types';
|
|
2
2
|
/**
|
|
3
3
|
* The construction surface a block's render path is allowed to use.
|
|
4
4
|
*
|
|
@@ -54,6 +54,18 @@ export type DrawContext = {
|
|
|
54
54
|
mapsEmbedKey?: string;
|
|
55
55
|
/** How a doc card turns a page id into a link, which only the host knows. */
|
|
56
56
|
docHref?: (pageId: string) => string;
|
|
57
|
+
/** The workspace's switched-off embed tools, by wire key: a card where the
|
|
58
|
+
* workspace said so, on a public page as much as in the editor. */
|
|
59
|
+
disabledEmbedProviders?: readonly string[];
|
|
60
|
+
/** Translated embed words; English fallbacks otherwise. */
|
|
61
|
+
embedLabels?: Partial<Record<EmbedLabel, string>>;
|
|
62
|
+
/** The freshest issue snapshots the host resolved, by URL: a chip, a card or
|
|
63
|
+
* a Linked issues row draws these over what the document stored. */
|
|
64
|
+
issues?: Record<string, IssueSnapshot>;
|
|
65
|
+
/** The reader's two chip switches; both on when absent. */
|
|
66
|
+
issueChip?: IssueChipParts;
|
|
67
|
+
/** Translated issue words; English fallbacks otherwise. */
|
|
68
|
+
issueLabels?: Partial<Record<IssueLabel, string>>;
|
|
57
69
|
};
|
|
58
70
|
export type Backing = {
|
|
59
71
|
create(tag: string): ClepitElement;
|
|
@@ -8,6 +8,9 @@ export declare class BlockManager {
|
|
|
8
8
|
private static createBlockElement;
|
|
9
9
|
static insertBlock(block: Block, containerId: string, index: number): HTMLElement | null;
|
|
10
10
|
static removeBlock(containerId: string, index: number): null | undefined;
|
|
11
|
+
/** Insert first, then remove: `removeBlock` keeps the last block of a document,
|
|
12
|
+
* so replacing the only block by removing it first left the old block in
|
|
13
|
+
* place beside the new one. */
|
|
11
14
|
static replaceBlock(containerId: string, index: number, block: Block<BlockToolType>): void;
|
|
12
15
|
static moveBlock(containerId: string, fromIndex: number, toIndex: number): void;
|
|
13
16
|
static getBlock(blockId: string): HTMLElement | null;
|
|
@@ -8,6 +8,11 @@ export declare class EventManager {
|
|
|
8
8
|
} | null;
|
|
9
9
|
private static handleClick;
|
|
10
10
|
private static handleSelectionChange;
|
|
11
|
+
/**
|
|
12
|
+
* A paste is intercepted only when it is one this editor turns into a block:
|
|
13
|
+
* an image URL, a video URL, or a link a provider renders. Plain text and
|
|
14
|
+
* links no provider knows reach the browser's own paste untouched.
|
|
15
|
+
*/
|
|
11
16
|
static handlePaste(event: ClipboardEvent): void;
|
|
12
17
|
}
|
|
13
18
|
//# sourceMappingURL=event.d.ts.map
|
package/dist/index.d.ts
CHANGED
|
@@ -6,9 +6,14 @@ export { activateBlocks } from './core/renderer/activate';
|
|
|
6
6
|
export { drawBlock } from './core/renderer/draw';
|
|
7
7
|
export { type PublicPage, pageStylesheet, renderBlocks, renderPage } from './core/renderer/page';
|
|
8
8
|
export { type ThemeTokens, tokensToLightDarkBlock } from './core/theme';
|
|
9
|
+
export { EMBED_ENGLISH, EMBED_TOOL_NAMES, embedLabel } from './tools/block/embed/output';
|
|
10
|
+
export { EMBED_WIRE_KEYS, isEmbedProviderDisabled, resolveEmbed } from './tools/block/embed/providers';
|
|
9
11
|
export type { OpenApiGroup, OpenApiModel, OpenApiOperation, OpenApiServer } from './tools/block/openapi/spec';
|
|
10
12
|
export { parseOpenApi } from './tools/block/openapi/spec';
|
|
11
|
-
export
|
|
12
|
-
export {
|
|
13
|
+
export { chipsInHtml, IssueChip, readChipMarkup, refreshChipsInHtml } from './tools/inline/issue';
|
|
14
|
+
export { ISSUE_ENGLISH, ISSUE_TOOL_NAMES, issueLabel, issueToolName } from './tools/inline/issue/labels';
|
|
15
|
+
export { classifyIssueUrl } from './tools/inline/issue/providers';
|
|
16
|
+
export type { ALERT_VARIANTS, AlertData, AlertVariant, AudioData, Block, BlockClassNames, BlockMargins, BlockStyles, BlockTune, CodeData, CodeVariant, CSSProperties, CSSValue, DelimiterData, DelimiterVariant, EditorAPI, EditorClassNames, EditorConfig, EditorData, EditorStyles, EmbedAction, EmbedData, EmbedFile, EmbedGist, EmbedGistFile, EmbedLabel, EmbedProvider, EmbedReason, EmbedResolution, GlanceData, GlanceRow, HeaderData, HeaderLevel, ImageData, InlineToolType as InlineTool, InputClassNames, InputConfig, InputStyles, IssueAction, IssueCards, IssueCategory, IssueChipParts, IssueLabel, IssueReason, IssueSnapshot, IssuesData, IssueTarget, IssueTool, ListData, ListType, OpenApiData, OpenApiFilter, OutputComponent, OutputConfig, ParagraphData, PasteEmbeds, QuoteData, RendererConfig, TableData, ToolType as BlockType, UploadFunction, VideoData, } from './types';
|
|
17
|
+
export { BLOCK_TOOLS, EMBED_LABELS, INLINE_TOOLS, ISSUE_LABELS, ISSUE_TOOLS } from './types';
|
|
13
18
|
export { sanitizeHtmlWithoutDom } from './utils/sanitize-html-nodom';
|
|
14
19
|
//# sourceMappingURL=index.d.ts.map
|